Merge branch 'cc_20250702_getStore' into 'master'
Cc 20250702 get store See merge request hangzhou/java/custom_zxjp!123
This commit is contained in:
@@ -2,6 +2,7 @@ package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.mapper.StoreMapper;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -63,6 +64,14 @@ public class StoreDao {
|
||||
return storeMapper.listByMobile(mobile);
|
||||
}
|
||||
|
||||
public List<MiniShopsResponse> getSubStoreByRegionIdsAndMobile(List<String> regionIdList, String mobile,String storeName,String storeNum) {
|
||||
if(CollectionUtils.isEmpty(regionIdList)&&StringUtils.isBlank(mobile)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return storeMapper.getSubStoreByRegionIdsAndMobile(regionIdList,mobile,storeName,storeNum);
|
||||
}
|
||||
|
||||
|
||||
public List<StoreDO> list() {
|
||||
return storeMapper.list();
|
||||
}
|
||||
|
||||
@@ -33,7 +33,11 @@ public class SysRoleDao {
|
||||
if(CollectionUtils.isEmpty(roleIds)) {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return sysRoleMapper.getRoleByRoleIds( roleIds);
|
||||
List<SysRoleDO> roleByRoleIds = sysRoleMapper.getRoleByRoleIds(roleIds);
|
||||
if(CollectionUtils.isEmpty(roleByRoleIds)) {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return roleByRoleIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -31,6 +32,8 @@ public interface StoreMapper {
|
||||
*/
|
||||
List<StoreDO> listByMobile(@Param("mobile") String mobile);
|
||||
|
||||
List<MiniShopsResponse> getSubStoreByRegionIdsAndMobile(@Param("regionIdList") List<String> regionIdList, @Param("mobile") String mobile,
|
||||
@Param("storeName") String storeName, @Param("storeNum") String storeNum);
|
||||
/**
|
||||
* 分页查询门店数据
|
||||
* @return
|
||||
|
||||
@@ -90,6 +90,35 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getSubStoreByRegionIdsAndMobile" resultType="com.cool.store.response.MiniShopsResponse">
|
||||
select store_id as storeId, store_name as shopName, store_num as shopCode, store_address as detailAddress
|
||||
from store_${enterpriseId}
|
||||
where is_delete = 'effective'
|
||||
<if test="storeName!=null and storeName!=''">
|
||||
and store_name like concat('%', #{storeName}, '%')
|
||||
</if>
|
||||
<if test="storeNum!=null and storeNum!=''">
|
||||
and store_num = #{storeNum}
|
||||
</if>
|
||||
and (
|
||||
<if test="regionIdList != null and regionIdList.size >0 ">
|
||||
<foreach collection="regionIdList" item="regionId" separator=" or " open=" (" close=" )">
|
||||
region_path like concat('%/', #{regionId}, '/%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="mobile!=null and mobile !=''">
|
||||
<choose>
|
||||
<when test="regionIdList != null and regionIdList.size >0 ">
|
||||
or `extend_field` like concat('%', #{mobile}, '%')
|
||||
</when>
|
||||
<otherwise>
|
||||
`extend_field` like concat('%', #{mobile}, '%')
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="list" resultMap="BaseResultMap">
|
||||
select *
|
||||
from store_${enterpriseId} where is_delete = 'effective' order by id asc
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/03/10:54
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class ShopListSuccessOpenRequest {
|
||||
|
||||
@NotNull
|
||||
private Long lineId;
|
||||
private Integer pageNum = 1;
|
||||
private Integer pageSize = 10;
|
||||
private String storeName;
|
||||
@ApiModelProperty("门店编号")
|
||||
private String storeNum;
|
||||
|
||||
}
|
||||
@@ -20,4 +20,5 @@ public class MiniShopsResponse {
|
||||
private String ylsCode;
|
||||
@ApiModelProperty("店铺详细地址")
|
||||
private String detailAddress;
|
||||
private String storeId;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public interface ShopService {
|
||||
|
||||
Boolean dataHandler(Long shopId);
|
||||
|
||||
List<MiniShopsResponse> getShopListSuccessOpen(Long lineId);
|
||||
PageInfo<MiniShopsResponse> getShopListSuccessOpen(ShopListSuccessOpenRequest request);
|
||||
|
||||
ShopResponse getShopNameAndCode(Long shopId,Long lineId);
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.StoreDTO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
@@ -21,4 +23,6 @@ public interface StoreService {
|
||||
*/
|
||||
PageInfo<StoreDTO> getStoreExtendFieldInfo(Integer pageSize,Integer pageNum);
|
||||
|
||||
PageInfo<MiniShopsResponse> getStoreListByMobile(String mobile,Integer pageNum,Integer pageSize,String storeName,String storeNum);
|
||||
|
||||
}
|
||||
|
||||
@@ -108,6 +108,8 @@ public class ShopServiceImpl implements ShopService {
|
||||
DecorationMeasureDAO decorationMeasureDAO;
|
||||
@Resource
|
||||
DecorationDesignInfoDAO decorationDesignInfoDAO;
|
||||
@Resource
|
||||
StoreService storeService;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -235,13 +237,13 @@ public class ShopServiceImpl implements ShopService {
|
||||
// throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
// }
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfo.getId(), ShopSubStageEnum.SHOP_STAGE_7);
|
||||
if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.IS_EXIST_CLAIM);
|
||||
}
|
||||
List<LinePayDO> franchiseFeePayInfoByShopId = linePayDAO.getFranchiseFeePayInfoByShopId(request.getShopId());
|
||||
if (ListUtils.emptyIfNull(franchiseFeePayInfoByShopId)
|
||||
.stream()
|
||||
.anyMatch(lineInfoDO->lineInfoDO.getXgjClaimStatus().equals(ClaimStatusEnum.CLAIMED.getCode()))){
|
||||
.anyMatch(lineInfoDO -> lineInfoDO.getXgjClaimStatus().equals(ClaimStatusEnum.CLAIMED.getCode()))) {
|
||||
throw new ServiceException(ErrorCodeEnum.IS_EXIST_CLAIM);
|
||||
}
|
||||
// if (Objects.nonNull(shopInfo.getPointId())) {
|
||||
@@ -598,22 +600,20 @@ public class ShopServiceImpl implements ShopService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MiniShopsResponse> getShopListSuccessOpen(Long lineId) {
|
||||
public PageInfo<MiniShopsResponse> getShopListSuccessOpen(ShopListSuccessOpenRequest request) {
|
||||
Long lineId = request.getLineId();
|
||||
Integer pageNum = request.getPageNum();
|
||||
Integer pageSize = request.getPageSize();
|
||||
String storeName = request.getStoreName();
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(lineId);
|
||||
List<StoreDO> storeDOS = storeDao.listByMobile(lineInfoDO.getMobile());
|
||||
if (CollectionUtils.isEmpty(storeDOS)){
|
||||
return new ArrayList<>();
|
||||
PageInfo<MiniShopsResponse> storeListByMobile = storeService.getStoreListByMobile(lineInfoDO.getMobile(), pageNum, pageSize, storeName,request.getStoreNum());
|
||||
if (CollectionUtils.isEmpty(storeListByMobile.getList())) {
|
||||
return new PageInfo<>(new ArrayList<>());
|
||||
}
|
||||
List<MiniShopsResponse> responses = new ArrayList<>();
|
||||
for (StoreDO storeDO : storeDOS){
|
||||
MiniShopsResponse response = new MiniShopsResponse();
|
||||
response.setShopName(storeDO.getStoreName());
|
||||
response.setShopCode(storeDO.getStoreNum());
|
||||
response.setYlsCode("ZXA8_"+storeDO.getStoreNum());
|
||||
response.setDetailAddress(storeDO.getStoreAddress());
|
||||
responses.add(response);
|
||||
for (MiniShopsResponse response : storeListByMobile.getList()) {
|
||||
response.setYlsCode("ZXA8_" + response.getShopCode());
|
||||
}
|
||||
return responses;
|
||||
return storeListByMobile;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -646,7 +646,7 @@ public class ShopServiceImpl implements ShopService {
|
||||
}
|
||||
}
|
||||
List<StoreDO> storeDOS = storeDao.listByMobile(lineInfoDO.getMobile());
|
||||
storeDOS.stream().forEach(x->{
|
||||
storeDOS.stream().forEach(x -> {
|
||||
ShopNameAndCodeDTO dto = new ShopNameAndCodeDTO();
|
||||
dto.setShopName(x.getStoreName());
|
||||
dto.setShopCode(x.getStoreNum());
|
||||
@@ -666,7 +666,7 @@ public class ShopServiceImpl implements ShopService {
|
||||
))
|
||||
.values());
|
||||
response.setShopList(distinctList);
|
||||
log.info("shopInfo:{}",JSONObject.toJSONString(response));
|
||||
log.info("shopInfo:{}", JSONObject.toJSONString(response));
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -689,11 +689,11 @@ public class ShopServiceImpl implements ShopService {
|
||||
List<PointInfoDO> pointListByIds = pointInfoDAO.getPointListByIds(pointIdList);
|
||||
Map<Long, PointInfoDO> pointInfoDOMap = pointListByIds.stream().collect(Collectors.toMap(PointInfoDO::getId, Function.identity()));
|
||||
for (ShopInfoDO shopInfoDO : shopList) {
|
||||
if (shopInfoDO.getPointId() == null ){
|
||||
if (shopInfoDO.getPointId() == null) {
|
||||
continue;
|
||||
}
|
||||
PointInfoDO pointInfoDO = pointInfoDOMap.get(shopInfoDO.getPointId());
|
||||
if (pointInfoDO == null ){
|
||||
if (pointInfoDO == null) {
|
||||
continue;
|
||||
}
|
||||
shopInfoDO.setProvince(pointInfoDO.getProvince());
|
||||
@@ -704,26 +704,26 @@ public class ShopServiceImpl implements ShopService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserDTO> getIntendSubStageHandle(Long lineId,Integer subStage) {
|
||||
public List<UserDTO> getIntendSubStageHandle(Long lineId, Integer subStage) {
|
||||
//查询线索
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||
List<UserDTO> userList = new ArrayList<>();
|
||||
//如果阶段对应不上 直接返回空
|
||||
if(!lineInfo.getWorkflowSubStage().equals(subStage)){
|
||||
if (!lineInfo.getWorkflowSubStage().equals(subStage)) {
|
||||
return userList;
|
||||
}
|
||||
//加盟商处理时子阶段状态
|
||||
List<Integer> intendPartnerList = Arrays.asList(INTENT_0.getCode(), PAY_DEPOSIT_45.getCode());
|
||||
if (intendPartnerList.contains(lineInfo.getWorkflowSubStageStatus())){
|
||||
if (intendPartnerList.contains(lineInfo.getWorkflowSubStageStatus())) {
|
||||
UserDTO userDTO = new UserDTO(lineInfo.getUsername(), lineInfo.getMobile());
|
||||
userList.add(userDTO);
|
||||
return userList;
|
||||
}
|
||||
//督导处理阶段
|
||||
List<Integer> intendManagerList = Arrays.asList(INTENT_5.getCode(), PAY_DEPOSIT_50.getCode(),SIGN_INTENT_AGREEMENT_70.getCode());
|
||||
if (intendManagerList.contains(lineInfo.getWorkflowSubStageStatus())){
|
||||
List<Integer> intendManagerList = Arrays.asList(INTENT_5.getCode(), PAY_DEPOSIT_50.getCode(), SIGN_INTENT_AGREEMENT_70.getCode());
|
||||
if (intendManagerList.contains(lineInfo.getWorkflowSubStageStatus())) {
|
||||
EnterpriseUserDO userInfo = enterpriseUserDAO.getUserInfoById(lineInfo.getInvestmentManager());
|
||||
if (Objects.nonNull(userInfo)){
|
||||
if (Objects.nonNull(userInfo)) {
|
||||
UserDTO userDTO = new UserDTO(userInfo.getName(), userInfo.getMobile());
|
||||
userList.add(userDTO);
|
||||
}
|
||||
@@ -819,7 +819,7 @@ public class ShopServiceImpl implements ShopService {
|
||||
return getUsersByRoleAndRegion(UserRoleEnum.LOGISTICS, shopInfo.getRegionId());
|
||||
|
||||
case SHOP_SUB_STAGE_STATUS_152:
|
||||
UserRoleEnum financeRole = JoinModeEnum.OWN_STORE.getCode()==shopInfo.getJoinMode()
|
||||
UserRoleEnum financeRole = JoinModeEnum.OWN_STORE.getCode() == shopInfo.getJoinMode()
|
||||
? UserRoleEnum.OWN_SHOP_OFFICE
|
||||
: UserRoleEnum.FINANCE;
|
||||
return getUsersByRole(financeRole);
|
||||
@@ -872,12 +872,12 @@ public class ShopServiceImpl implements ShopService {
|
||||
|
||||
@Override
|
||||
public ShopStageInfoVO getShopStageStatus(Long shopId, Integer subStage) {
|
||||
if(shopId == null|| subStage == null ){
|
||||
if (shopId == null || subStage == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
}
|
||||
ShopStageInfoDO stage = shopStageInfoDAO.getByShopIdAndSubStage(shopId, subStage);
|
||||
if (stage!=null){
|
||||
return new ShopStageInfoVO(stage.getShopStage(), stage.getShopSubStage(), stage.getShopSubStageStatus(),stage.getIsTerminated());
|
||||
if (stage != null) {
|
||||
return new ShopStageInfoVO(stage.getShopStage(), stage.getShopSubStage(), stage.getShopSubStageStatus(), stage.getIsTerminated());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -906,7 +906,7 @@ public class ShopServiceImpl implements ShopService {
|
||||
private List<UserDTO> getUsersByRole(UserRoleEnum role) {
|
||||
SysRoleRequest request = new SysRoleRequest();
|
||||
request.setRoleName(role.getDesc());
|
||||
return convertToUserDTOs(userAuthMappingService.findUserListByRole(request,false));
|
||||
return convertToUserDTOs(userAuthMappingService.findUserListByRole(request, false));
|
||||
}
|
||||
|
||||
private List<UserDTO> getUsersByRoleAndRegion(UserRoleEnum role, Long regionId) {
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.EnterpriseUserRoleDao;
|
||||
import com.cool.store.dao.StoreDao;
|
||||
import com.cool.store.dao.SysRoleDao;
|
||||
import com.cool.store.dto.StoreDTO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.entity.SysRoleDO;
|
||||
import com.cool.store.entity.UserAuthMappingDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.ExtendFieldTypeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.RegionMapper;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import com.cool.store.service.StoreService;
|
||||
import com.cool.store.service.UserAuthMappingService;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.github.pagehelper.Page;
|
||||
@@ -18,9 +27,7 @@ import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -34,6 +41,16 @@ public class StoreServiceImpl implements StoreService {
|
||||
|
||||
@Resource
|
||||
StoreDao storeDao;
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private EnterpriseUserRoleDao enterpriseUserRoleDao;
|
||||
@Resource
|
||||
private SysRoleDao sysRoleDao;
|
||||
@Resource
|
||||
private UserAuthMappingService userAuthMappingService;
|
||||
@Resource
|
||||
private RegionMapper regionMapper;
|
||||
|
||||
@Override
|
||||
public PageInfo<StoreDTO> getStoreExtendFieldInfo(Integer pageSize, Integer pageNum) {
|
||||
@@ -51,6 +68,31 @@ public class StoreServiceImpl implements StoreService {
|
||||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<MiniShopsResponse> getStoreListByMobile(String mobile,Integer pageNum,Integer pageSize,String storeName,String storeNum) {
|
||||
//根据手机号查询 标品userId
|
||||
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.selectByMobile(mobile);
|
||||
if (enterpriseUserDO == null){
|
||||
return new PageInfo<>();
|
||||
}
|
||||
//获取用户职位
|
||||
List<Long> userRoleIds = enterpriseUserRoleDao.getUserRoleIds(enterpriseUserDO.getUserId());
|
||||
//查询职位详情,筛选掉店外职位
|
||||
List<SysRoleDO> roleIds = sysRoleDao.selectRoleByRoleIds(userRoleIds);
|
||||
List<SysRoleDO> sysRoleDOS = roleIds.stream().filter(role -> "store_inside".equals(role.getPositionType())).collect(Collectors.toList());
|
||||
List<String> regionIds = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(sysRoleDOS)){
|
||||
//获取用户管辖区域
|
||||
List<UserAuthMappingDO> userAuthMapping = userAuthMappingService.listUserAuthMappingByUserId(enterpriseUserDO.getUserId());
|
||||
if (CollectionUtils.isNotEmpty(userAuthMapping)){
|
||||
regionIds.addAll(userAuthMapping.stream().map(UserAuthMappingDO::getMappingId).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
PageHelper.startPage(pageNum,pageSize);
|
||||
List<MiniShopsResponse> list = storeDao.getSubStoreByRegionIdsAndMobile(regionIds,mobile,storeName,storeNum);
|
||||
return new PageInfo<>(list);
|
||||
}
|
||||
|
||||
|
||||
public static List<StoreDTO> processStores(List<StoreDO> stores) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
@@ -116,9 +116,9 @@ public class MiniShopController {
|
||||
return ResponseResult.success(pointService.updateRentContract(request));
|
||||
}
|
||||
@ApiOperation("成功开店的门店")
|
||||
@GetMapping("/getShopListSuccessOpen")
|
||||
public ResponseResult<List<MiniShopsResponse>> getShopListSuccessOpen(@RequestParam("lineId")Long lineId) {
|
||||
return ResponseResult.success(shopService.getShopListSuccessOpen(lineId));
|
||||
@PostMapping("/getShopListSuccessOpen")
|
||||
public ResponseResult<PageInfo<MiniShopsResponse>> getShopListSuccessOpen(@RequestBody @Validated ShopListSuccessOpenRequest request ) {
|
||||
return ResponseResult.success(shopService.getShopListSuccessOpen(request));
|
||||
}
|
||||
|
||||
@ApiOperation("获取推荐铺位和我创建的")
|
||||
|
||||
@@ -16,16 +16,20 @@ 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;
|
||||
import com.cool.store.response.xfsgFirstOderListResponse;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.poi.ExcelUtil;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.vo.RegionPathNameVO;
|
||||
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;
|
||||
|
||||
@@ -73,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());
|
||||
@@ -98,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());
|
||||
@@ -116,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);
|
||||
}
|
||||
|
||||
@@ -149,74 +155,90 @@ 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("成功开店的门店")
|
||||
// @GetMapping("/getShopListSuccessOpen")
|
||||
// public ResponseResult<PageInfo<MiniShopsResponse>> getShopListSuccessOpen(@RequestParam("lineId")Long lineId,
|
||||
// @RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize,
|
||||
// @RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,
|
||||
// @RequestParam(value = "storeName",required = false,defaultValue = "") String storeName
|
||||
// ) {
|
||||
// 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());
|
||||
@@ -254,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();
|
||||
}
|
||||
@@ -262,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());
|
||||
//已经含有测量阶段
|
||||
@@ -290,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;
|
||||
}
|
||||
@@ -307,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(){
|
||||
public void initTallyBook() {
|
||||
xxlJobHandler.initTallyBook();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user