fix
This commit is contained in:
@@ -608,7 +608,7 @@ public class ShopServiceImpl implements ShopService {
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(lineId);
|
||||
PageInfo<MiniShopsResponse> storeListByMobile = storeService.getStoreListByMobile(lineInfoDO.getMobile(), pageNum, pageSize, storeName,request.getStoreNum());
|
||||
if (CollectionUtils.isEmpty(storeListByMobile.getList())) {
|
||||
return new PageInfo<>();
|
||||
return new PageInfo<>(new ArrayList<>());
|
||||
}
|
||||
for (MiniShopsResponse response : storeListByMobile.getList()) {
|
||||
response.setYlsCode("ZXA8_" + response.getShopCode());
|
||||
|
||||
@@ -90,9 +90,6 @@ public class StoreServiceImpl implements StoreService {
|
||||
}
|
||||
PageHelper.startPage(pageNum,pageSize);
|
||||
List<MiniShopsResponse> list = storeDao.getSubStoreByRegionIdsAndMobile(regionIds,mobile,storeName,storeNum);
|
||||
if (CollectionUtils.isEmpty(list)){
|
||||
list= new ArrayList<>();
|
||||
}
|
||||
return new PageInfo<>(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.job.XxlJobHandler;
|
||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||
import com.cool.store.request.ShopListSuccessOpenRequest;
|
||||
import com.cool.store.request.xfsgFirstOrderListRequest;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
@@ -28,6 +29,7 @@ import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@@ -75,13 +77,15 @@ public class TestController {
|
||||
|
||||
@Resource
|
||||
ShopStageInfoDAO shopStageInfoDAO;
|
||||
|
||||
@PostMapping("/getFirstOrders")
|
||||
public ResponseResult<xfsgFirstOderListResponse> getFirstOrders(@RequestBody xfsgFirstOrderListRequest storeCodeList) {
|
||||
xfsgFirstOderListResponse firstOrderList = coolStoreStartFlowService.getFirstOrderList(storeCodeList);
|
||||
return ResponseResult.success(firstOrderList);
|
||||
}
|
||||
|
||||
@PostMapping("/importCity")
|
||||
public ResponseResult<Integer> importCity(MultipartFile file){
|
||||
public ResponseResult<Integer> importCity(MultipartFile file) {
|
||||
ExcelUtil<OpenCityDTO> util = new ExcelUtil<>(OpenCityDTO.class);
|
||||
try {
|
||||
List<OpenCityDTO> lineDOList = util.importExcel(file.getInputStream());
|
||||
@@ -100,14 +104,14 @@ public class TestController {
|
||||
try {
|
||||
List<OpenCityDTO> acityDTOS = importTask;
|
||||
HashMap<Integer, String> first = new HashMap<>(8);
|
||||
for (OpenCityDTO acityDTO : acityDTOS){
|
||||
for (OpenCityDTO acityDTO : acityDTOS) {
|
||||
Integer code = acityDTO.getCode();
|
||||
//如果code后面三位都是0
|
||||
int i = code % 10000;
|
||||
if (i == 0){
|
||||
if (i == 0) {
|
||||
//表示是一级菜单
|
||||
acityDTO.setPath("/"+acityDTO.getName()+"/");
|
||||
first.put(code / 10000,acityDTO.getName());
|
||||
acityDTO.setPath("/" + acityDTO.getName() + "/");
|
||||
first.put(code / 10000, acityDTO.getName());
|
||||
HyOpenAreaInfoDO hyOpenAreaInfoDO = new HyOpenAreaInfoDO();
|
||||
hyOpenAreaInfoDO.setAreaPath(acityDTO.getPath());
|
||||
hyOpenAreaInfoDO.setId(acityDTO.getCode().longValue());
|
||||
@@ -118,28 +122,28 @@ public class TestController {
|
||||
}
|
||||
//二级菜单
|
||||
int j = code % 100;
|
||||
if (j == 0){
|
||||
if (j == 0) {
|
||||
//北京市直辖市
|
||||
String name = acityDTO.getName();
|
||||
//code
|
||||
int k = code / 10000;
|
||||
String firstName = first.get(k);
|
||||
if (firstName == null){
|
||||
if (firstName == null) {
|
||||
codes.add(acityDTO);
|
||||
log.info("========================={}",acityDTO);
|
||||
log.info("========================={}", acityDTO);
|
||||
continue;
|
||||
}
|
||||
// 先对name中相同的字段进行去重
|
||||
String newName = name.replace(firstName, "");
|
||||
// 然后拼接path
|
||||
acityDTO.setPath("/"+firstName+"/"+newName+"/");
|
||||
acityDTO.setPath("/" + firstName + "/" + newName + "/");
|
||||
acityDTO.setName(newName);
|
||||
HyOpenAreaInfoDO hyOpenAreaInfoDO = new HyOpenAreaInfoDO();
|
||||
hyOpenAreaInfoDO.setAreaPath(acityDTO.getPath());
|
||||
hyOpenAreaInfoDO.setId(acityDTO.getCode().longValue());
|
||||
hyOpenAreaInfoDO.setAreaName(acityDTO.getName());
|
||||
hyOpenAreaInfoDO.setAreaStatus("open");
|
||||
hyOpenAreaInfoDO.setParentId(k*10000L);
|
||||
hyOpenAreaInfoDO.setParentId(k * 10000L);
|
||||
hyOpenAreaInfoMapper.insertSelective(hyOpenAreaInfoDO);
|
||||
}
|
||||
|
||||
@@ -151,70 +155,73 @@ public class TestController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/getUserInfo")
|
||||
public ResponseResult getUserInfo(@RequestParam("userId")String userId){
|
||||
public ResponseResult getUserInfo(@RequestParam("userId") String userId) {
|
||||
EnterpriseUserDO enterpriseUser = enterpriseUserDAO.getUserInfoById(userId);
|
||||
return ResponseResult.success(enterpriseUser);
|
||||
}
|
||||
|
||||
@GetMapping("/getUserInfoByUserIds")
|
||||
public ResponseResult getUserInfoByUserIds(@RequestParam(value = "userIdList", required = false) List<String> userIdList){
|
||||
public ResponseResult getUserInfoByUserIds(@RequestParam(value = "userIdList", required = false) List<String> userIdList) {
|
||||
List<EnterpriseUserDO> enterpriseUserDOList = enterpriseUserDAO.getUserInfoByUserIds(userIdList);
|
||||
return ResponseResult.success(enterpriseUserDOList);
|
||||
}
|
||||
|
||||
@GetMapping("/getUserRoleIds")
|
||||
public ResponseResult getUserRoleIds(@RequestParam("userId")String userId){
|
||||
public ResponseResult getUserRoleIds(@RequestParam("userId") String userId) {
|
||||
List<Long> roleIdList = enterpriseUserRoleDao.getUserRoleIds(userId);
|
||||
return ResponseResult.success(roleIdList);
|
||||
}
|
||||
|
||||
@GetMapping("/selectByMobile")
|
||||
public ResponseResult selectByMobile(@RequestParam("mobile")String mobile){
|
||||
public ResponseResult selectByMobile(@RequestParam("mobile") String mobile) {
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(mobile);
|
||||
return ResponseResult.success(hyPartnerUserInfoDO);
|
||||
}
|
||||
|
||||
@GetMapping("/getRegionById")
|
||||
public ResponseResult getRegionById(@RequestParam("regionId")Long regionId){
|
||||
public ResponseResult getRegionById(@RequestParam("regionId") Long regionId) {
|
||||
RegionDO regionDO = regionDao.getRegionById(regionId);
|
||||
return ResponseResult.success(regionDO);
|
||||
}
|
||||
|
||||
@GetMapping("/selectRoleByRoleIds")
|
||||
public ResponseResult selectRoleByRoleIds(@RequestParam("roleIds")List<Long> roleIds){
|
||||
public ResponseResult selectRoleByRoleIds(@RequestParam("roleIds") List<Long> roleIds) {
|
||||
List<SysRoleDO> sysRoleDOList = sysRoleDao.selectRoleByRoleIds(roleIds);
|
||||
return ResponseResult.success(sysRoleDOList);
|
||||
}
|
||||
|
||||
@GetMapping("/listUserRegionMappingByUserId")
|
||||
public ResponseResult listUserRegionMappingByUserId(@RequestParam("userIds")List<String> userIds){
|
||||
public ResponseResult listUserRegionMappingByUserId(@RequestParam("userIds") List<String> userIds) {
|
||||
List<UserRegionMappingDO> userRegionMappingDOList = userRegionMappingDAO.listUserRegionMappingByUserId(userIds);
|
||||
return ResponseResult.success(userRegionMappingDOList);
|
||||
}
|
||||
|
||||
@GetMapping("/getAllRegionName")
|
||||
public ResponseResult getAllRegionName(@RequestParam("regionId")Long regionId){
|
||||
public ResponseResult getAllRegionName(@RequestParam("regionId") Long regionId) {
|
||||
RegionPathNameVO regionPathNameVO = regionService.getAllRegionName(regionId);
|
||||
return ResponseResult.success(regionPathNameVO);
|
||||
}
|
||||
|
||||
@GetMapping("/updateFirstOrder")
|
||||
public ResponseResult updateFirstOrder(){
|
||||
public ResponseResult updateFirstOrder() {
|
||||
// xxlJobHandler.updateFirstOrder();
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("updateEntryTime")
|
||||
public ResponseResult updateEntryTime(){
|
||||
public ResponseResult updateEntryTime() {
|
||||
xxlJobHandler.updateEntryTime();
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/threeAcceptanceBookingMessage")
|
||||
public ResponseResult threeAcceptanceBookingMessage(){
|
||||
public ResponseResult threeAcceptanceBookingMessage() {
|
||||
xxlJobHandler.threeAcceptanceBookingMessage();
|
||||
return ResponseResult.success();
|
||||
}
|
||||
// @ApiOperation("成功开店的门店")
|
||||
|
||||
// @ApiOperation("成功开店的门店")
|
||||
// @GetMapping("/getShopListSuccessOpen")
|
||||
// public ResponseResult<PageInfo<MiniShopsResponse>> getShopListSuccessOpen(@RequestParam("lineId")Long lineId,
|
||||
// @RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize,
|
||||
@@ -223,10 +230,15 @@ public class TestController {
|
||||
// ) {
|
||||
// return ResponseResult.success(shopService.getShopListSuccessOpen(lineId,pageNum,pageSize,storeName));
|
||||
// }
|
||||
@ApiOperation("成功开店的门店")
|
||||
@PostMapping("/getShopListSuccessOpen")
|
||||
public ResponseResult<PageInfo<MiniShopsResponse>> getShopListSuccessOpen(@RequestBody @Validated ShopListSuccessOpenRequest request) {
|
||||
return ResponseResult.success(shopService.getShopListSuccessOpen(request));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/stageDataHandler")
|
||||
public ResponseResult stageDataHandler(){
|
||||
public ResponseResult stageDataHandler() {
|
||||
|
||||
//查询所有完成初始化铺位加盟合同的完成情况
|
||||
List<ShopStageInfoDO> subStages = shopStageInfoDAO.getSubStages(ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
||||
@@ -264,7 +276,7 @@ public class TestController {
|
||||
shopStageInfo.setPlanCompleteTime(shopSubStageEnum.getPlanCompleteTime(localDate));
|
||||
list.add(shopStageInfo);
|
||||
}
|
||||
log.info("list:{}",JSONObject.toJSONString(list));
|
||||
log.info("list:{}", JSONObject.toJSONString(list));
|
||||
shopStageInfoDAO.batchInsert(list);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
@@ -272,7 +284,7 @@ public class TestController {
|
||||
|
||||
@ApiModelProperty("装修阶段数据处理")
|
||||
@GetMapping("/decorationStageDataHandler")
|
||||
public ResponseResult decorationStageDataHandler(){
|
||||
public ResponseResult decorationStageDataHandler() {
|
||||
//查询设计阶段
|
||||
List<ShopStageInfoDO> subStages = shopStageInfoDAO.getSubStages(ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage());
|
||||
//已经含有测量阶段
|
||||
@@ -300,13 +312,13 @@ public class TestController {
|
||||
* 原设计阶段为【未开始】,测量阶段为【未开始】
|
||||
*/
|
||||
ShopSubStageStatusEnum initStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00;
|
||||
if (x.getShopSubStageStatus()==900){
|
||||
if (x.getShopSubStageStatus() == 900) {
|
||||
//当前状态回退 测量阶段为【待分配测量员、设计组】
|
||||
initStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_861;
|
||||
x.setShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus());
|
||||
x.setRemark("设计阶段" + CommonConstants.PATH_BAR + ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatusName());
|
||||
shopStageInfoDAO.updateByPrimaryKeySelective(x);
|
||||
}else if (x.getShopSubStageStatus()==905||x.getShopSubStageStatus()==910){
|
||||
} else if (x.getShopSubStageStatus() == 905 || x.getShopSubStageStatus() == 910) {
|
||||
//测量阶段已完成
|
||||
initStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_863;
|
||||
}
|
||||
@@ -317,31 +329,29 @@ public class TestController {
|
||||
shopStageInfo.setPlanCompleteTime(shopSubStageEnum.getPlanCompleteTime(localDate));
|
||||
list.add(shopStageInfo);
|
||||
}
|
||||
log.info("list:{}",JSONObject.toJSONString(list));
|
||||
log.info("list:{}", JSONObject.toJSONString(list));
|
||||
shopStageInfoDAO.batchInsert(list);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Resource
|
||||
PointService pointService;
|
||||
@Resource
|
||||
ShopService shopService;
|
||||
|
||||
@GetMapping("/linePointToShopPoint")
|
||||
public ResponseResult linePointToShopPoint(@RequestParam(value = "shopId",required = false)Long shopId){
|
||||
public ResponseResult linePointToShopPoint(@RequestParam(value = "shopId", required = false) Long shopId) {
|
||||
return ResponseResult.success(pointService.linePointToShopPoint(shopId));
|
||||
}
|
||||
|
||||
@GetMapping("/dataHandler")
|
||||
public ResponseResult dataHandler(@RequestParam(value = "lineId",required = false)Long lineId){
|
||||
public ResponseResult dataHandler(@RequestParam(value = "lineId", required = false) Long lineId) {
|
||||
return ResponseResult.success(shopService.dataHandler(lineId));
|
||||
}
|
||||
|
||||
@GetMapping("/initTallyBook")
|
||||
public void initTallyBook(){
|
||||
xxlJobHandler.initTallyBook();
|
||||
public void initTallyBook() {
|
||||
xxlJobHandler.initTallyBook();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user