commit
Some checks failed
API接口参数变更检测 / api-param-check (push) Has been cancelled

This commit is contained in:
2026-06-05 16:18:40 +08:00
parent 1ca34c6bb2
commit 3cba3bb74e
4393 changed files with 450030 additions and 103 deletions

View File

@@ -0,0 +1,205 @@
package jnpf.doclibrary;
import com.github.pagehelper.PageInfo;
import io.swagger.v3.oas.annotations.Operation;
import jnpf.base.ActionResult;
import jnpf.doclibrary.fallback.StoreFallback;
import jnpf.entity.StoreEntity;
import jnpf.model.store.Store;
import jnpf.model.store.StorePositionInfoVo;
import jnpf.model.store.StoreUserNumVo;
import jnpf.model.store.dto.StoreAbnormalIdsQueryDTO;
import jnpf.model.store.dto.StorePageByIdsNoDsQueryDTO;
import jnpf.model.store.dto.StorePageByIdsQueryDTO;
import jnpf.model.store.vo.StoreBaseListVO;
import jnpf.model.store.vo.StoreLocationVO;
import jnpf.model.store.vo.UserStoreListVo;
import jnpf.model.vo.StoreExecutionVo;
import jnpf.util.NoDataSourceBind;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 门店内部调用api
*
* @author yanwenfu
* @create 2023-07-12
*/
@FeignClient(name = "jnpf-ftb", fallback = StoreFallback.class, path = "/Store")
public interface StoreApi {
/**
* 查询门店下岗位的成员数量
* @param storeId 门店id
* @param positionList 岗位id集合
* @return java.util.List<jnpf.model.store.StorePositionInfoVo>
*/
@GetMapping(value = "/storePositionInfo/list")
List<StorePositionInfoVo> getStorePositionInfoList(@RequestParam(value = "storeId") String storeId, @RequestParam(value = "positionList") List<String> positionList);
/**
* 查询门店下的成员数量
* @param storeIds 门店ids
* @return java.util.List<jnpf.model.store.StorePositionInfoVo>
*/
@GetMapping(value = "/storePositionInfo/getUserNum")
List<StoreUserNumVo> getUserNum(@RequestParam(value = "storeIds") List<String> storeIds);
/**
* 获取用户门店列表信息
* @return 返回值
*/
@GetMapping(value = "/userStoreList")
ActionResult<List<Store>> getUserStoreList();
/**
* 获取用户门店列表信息(值班)
*
* @return 返回值
*/
@GetMapping(value = "/userStoreListDuty")
ActionResult<List<Store>> getUserStoreListDuty();
/**
* 查询用户所属的门店
* @param userId 用户id
* @return jnpf.base.ActionResult<java.util.List < jnpf.model.store.Store>>
*/
@GetMapping(value = "/listByUserId/{userId}")
List<Store> getListByUserId(@PathVariable(value = "userId") String userId);
@GetMapping(value = "/getAllUserStores")
List<UserStoreListVo> getAllUserStores();
/**
* 根据门店ids查询门店信息
* @param storeIds 门店ids
* @return java.util.List<jnpf.model.store.Store>
*/
@GetMapping(value = "/listByIds")
List<Store> getListByIds(@RequestParam(value = "storeIds") List<String> storeIds);
@GetMapping("/getList")
ActionResult<List<Store>> getList(@RequestParam("selectKey") String selectKey,
@RequestParam("organizeid") String organizeId,
@RequestParam("longitude") String longitude,
@RequestParam("latitude") String latitude);
/**
* 查询组织下的门店
* @param organizeId 组织id
* @return java.util.List<jnpf.model.store.Store>
*/
@GetMapping(value = "/list")
List<Store> getStoreList(@RequestParam(value = "organizeId", required = false) String organizeId);
/**
* 查询组织下的门店(返回了上级组织)
* @param organizeId 组织id
* @return java.util.List<jnpf.model.store.Store>
*/
@GetMapping(value = "/orgList")
List<Store> getOrgStoreList(@RequestParam(value = "organizeId", required = false) String organizeId, @RequestParam(value = "queryStoreIds", required = false) List<String> queryStoreIds);
/**
* 查询门店信息
* @param id 门店id
* @return jnpf.model.store.Store
*/
@GetMapping("/info/{id}")
Store getStoreInfo(@PathVariable("id") String id);
/**
* 查询门店信息
* @param id 门店id
* @return jnpf.model.store.Store
*/
@GetMapping("/getStoreInfoNoData")
StoreEntity getStoreInfoNoData(@RequestParam("id") String id, @RequestParam("tenantId") String tenantId);
/**
* 根据门店ids分页查询门店记录
* @param storeIds 门店ids
* @param currentPage 当前页码
* @param pageSize 每页条数
* @return com.github.pagehelper.PageInfo<jnpf.model.vo.StoreExecutionVo>
*/
@PostMapping(value = "/store/pageByIds")
PageInfo<StoreExecutionVo> getStorePageByIds(@RequestBody StorePageByIdsQueryDTO query);
/**
* 根据门店ids分页查询门店记录
* @param storeIds 门店ids
* @param currentPage 当前页码
* @param pageSize 每页条数
* @return com.github.pagehelper.PageInfo<jnpf.model.vo.StoreExecutionVo>
*/
@PostMapping(value = "/store/pageByIdsNoDataSource")
PageInfo<StoreExecutionVo> getStorePageByIdsNoDataSource(@RequestBody StorePageByIdsNoDsQueryDTO query);
/**
* 查询异常的门店
* @param storeIds 门店ids
* @return java.util.List<java.lang.String>
*/
@PostMapping(value = "/store/abnormal/record")
List<String> getAbnormalStoreIds(@RequestBody StoreAbnormalIdsQueryDTO query);
/**
* 根据组织ids查询门店列表
* @param organizeIdList 组织ids
* @return java.util.List<jnpf.model.store.Store>
*/
@PostMapping(value = "/store/list/byOrganizeList")
List<Store> getStoreListByOrganizeList(@RequestBody List<String> organizeIdList);
/**
* 查询门店信息(未绑定数据库)
* @param tenantId 租户id
* @param storeIds 门店ids
* @return java.util.List<jnpf.model.store.Store>
*/
@GetMapping(value = "/store/list/noDataSource")
List<Store> getListByIdsNoDataSource(@RequestParam(value = "tenantId") String tenantId, @RequestParam(value = "storeIds") List<String> storeIds);
/**
* 校验是否是值班人
* @param userId 用户Id
*/
@GetMapping(value = "/store/checkStoreUser")
boolean checkStoreUser(@RequestParam(value = "userId") String userId);
@Operation(description = "[列表] 目标组织,及其子组织所有已启用的门店")
@GetMapping(value = "/store/list/organizeChildren")
ActionResult<List<StoreBaseListVO>> getStoreListByOrganizeIdAndChildOrganize(@RequestParam(value = "organizeId") String organizeId, @RequestParam(required = false, value = "disabled") Boolean disabled);
/**
* 查询门店下岗位的成员数量
* @param storeId 门店id
* @param positionList 岗位id集合
* @return java.util.List<jnpf.model.store.StorePositionInfoVo>
*/
@NoDataSourceBind
@GetMapping(value = "/storePositionInfo/list/nodata")
List<StorePositionInfoVo> getStorePositionInfoListNodata(@RequestParam(value = "storeId") String storeId, @RequestParam(value = "positionList") List<String> positionList, @RequestParam(value = "tenantId") String tenantId);
/**
* 查询用户所属的门店
* @param userId 用户id
* @return jnpf.base.ActionResult<java.util.List < jnpf.model.store.Store>>
*/
@GetMapping(value = "/listByUserId/nodata/{userId}")
@NoDataSourceBind
List<Store> getListByUserIdNodata(@PathVariable(value = "userId") String userId, @RequestParam(value = "tenantId") String tenantId);
/**
* 获取门店位置信息
* @param storeId 门店id
* @return jnpf.model.store.vo.StoreLocationVO
*/
@GetMapping(value = "/getStoreLocation")
StoreLocationVO getStoreLocation(@RequestParam(value = "storeId") String storeId);
}

View File

@@ -0,0 +1,178 @@
package jnpf.doclibrary.fallback;
import com.github.pagehelper.PageInfo;
import jnpf.base.ActionResult;
import jnpf.doclibrary.StoreApi;
import jnpf.entity.StoreEntity;
import jnpf.model.store.Store;
import jnpf.model.store.StorePositionInfoVo;
import jnpf.model.store.StoreUserNumVo;
import jnpf.model.store.dto.StoreAbnormalIdsQueryDTO;
import jnpf.model.store.dto.StorePageByIdsNoDsQueryDTO;
import jnpf.model.store.dto.StorePageByIdsQueryDTO;
import jnpf.model.store.vo.StoreBaseListVO;
import jnpf.model.store.vo.StoreLocationVO;
import jnpf.model.store.vo.UserStoreListVo;
import jnpf.model.vo.StoreExecutionVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
/**
* 资料库内部调用fallback
*
* @author yanwenfu
* @create 2023-07-12
*/
@Slf4j
@Component
public class StoreFallback implements StoreApi {
@Override
public List<StorePositionInfoVo> getStorePositionInfoList(String storeId, List<String> positionList) {
log.error("类名: StoreFallback, 方法名: getStorePositionInfoList, 错误信息: 调用失败...");
return new ArrayList<>();
}
@Override
public List<StoreUserNumVo> getUserNum(List<String> storeIds) {
log.error("类名: StoreFallback, 方法名: getUserNum, 错误信息: 调用失败...");
return new ArrayList<>();
}
@Override
public List<Store> getListByUserId(String userId) {
log.error("类名: StoreFallback, 方法名: getStoreListByUser, 错误信息: 调用失败...");
return new ArrayList<>();
}
@Override
public List<UserStoreListVo> getAllUserStores() {
log.error("类名: StoreFallback, 方法名: getAllUserStores, 错误信息: 调用失败...");
return null;
}
@Override
public List<Store> getListByIds(List<String> storeIds) {
log.error("类名: StoreFallback, 方法名: getListByIds, 错误信息: 调用失败...");
return new ArrayList<>();
}
@Override
public ActionResult<List<Store>> getList(String selectKey, String organizeId, String longitude, String latitude) {
log.error("类名: StoreFallback, 方法名: getList, 错误信息: 调用失败...");
return null;
}
@Override
public ActionResult<List<Store>> getUserStoreList() {
log.error("类名: StoreFallback, 方法名: getUserStoreList, 错误信息: 调用失败...");
return null;
}
@Override
public ActionResult<List<Store>> getUserStoreListDuty() {
return null;
}
@Override
public List<Store> getStoreList(String organizeId) {
log.error("类名: StoreFallback, 方法名: getStoreList, 错误信息: 调用失败...");
return new ArrayList<>();
}
@Override
public List<Store> getOrgStoreList(String organizeId, List<String> queryStoreIds) {
log.error("类名: StoreFallback, 方法名: getOrgStoreList, 错误信息: 调用失败...");
return null;
}
@Override
public Store getStoreInfo(String id) {
log.error("类名: StoreFallback, 方法名: getStoreInfo, 错误信息: 调用失败...");
return null;
}
/**
* 查询门店信息
*
* @param id 门店id
* @param tenantId
* @return jnpf.model.store.Store
*/
@Override
public StoreEntity getStoreInfoNoData(String id, String tenantId) {
log.error("FTB_类名: StoreFallback, 方法名: getStoreInfoDutyQuery, 错误信息: 调用失败..., 当前租户号[{}] - 门店号[{}]", tenantId, id);
log.error(" getStoreInfoDutyQuery 没有拿到门店信息,走了fallback");
return null;
}
@Override
public PageInfo<StoreExecutionVo> getStorePageByIds(StorePageByIdsQueryDTO query) {
return new PageInfo<>();
}
@Override
public boolean checkStoreUser(String userId) {
log.error("类名: StoreFallback, 方法名: checkStoreUser, 错误信息: 调用失败...");
return false;
}
@Override
public ActionResult<List<StoreBaseListVO>> getStoreListByOrganizeIdAndChildOrganize(String organizeId, Boolean disabled) {
return null;
}
@Override
public List<StorePositionInfoVo> getStorePositionInfoListNodata(String storeId, List<String> positionList, String tenantId) {
return null;
}
@Override
public List<Store> getListByUserIdNodata(String userId, String tenantId) {
return null;
}
@Override
public StoreLocationVO getStoreLocation(String storeId) {
return null;
}
@Override
public PageInfo<StoreExecutionVo> getStorePageByIdsNoDataSource(StorePageByIdsNoDsQueryDTO query) {
return new PageInfo<>();
}
@Override
public List<String> getAbnormalStoreIds(StoreAbnormalIdsQueryDTO query) {
return new ArrayList<>();
}
@Override
public List<Store> getStoreListByOrganizeList(List<String> organizeIdList) {
return new ArrayList<>();
}
@Override
public List<Store> getListByIdsNoDataSource(String tenantId, List<String> storeIds) {
return new ArrayList<>();
}
// @Override
// public ActionResult<Store> info(String id) {
// return null;
// }
}