装修调整
This commit is contained in:
@@ -355,4 +355,8 @@ public class ShopInfoDAO {
|
||||
}
|
||||
return shopInfoMapper.updateHqtShopId(shopId, hqtShopId);
|
||||
}
|
||||
//查询 需要推送红圈通的门店
|
||||
public List<ShopInfoDO> getPushHqtShopList(){
|
||||
return shopInfoMapper.getPushHqtShopList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,4 +150,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
Integer getNumByShopCode(@Param("shopCode") String shopCode);
|
||||
|
||||
Integer updateHqtShopId(@Param("shopId") Long shopId,@Param("hqtShopId") String hqtShopId);
|
||||
|
||||
List<ShopInfoDO> getPushHqtShopList();
|
||||
|
||||
}
|
||||
|
||||
@@ -563,6 +563,17 @@
|
||||
<select id="getNumByShopCode" resultType="java.lang.Integer">
|
||||
select count(1) from xfsg_shop_info where shop_code = #{shopCode} and deleted = 0 and shop_status != 2
|
||||
</select>
|
||||
<select id="getPushHqtShopList" resultType="com.cool.store.entity.ShopInfoDO">
|
||||
SELECT * FROM xfsg_shop_info a
|
||||
LEFT JOIN xfsg_shop_stage_info AS t0 ON a.id = t0.shop_id
|
||||
WHERE t0.shop_sub_stage_status = 891 and a.deleted = 0 and a.shop_status != 2 and
|
||||
a.id in
|
||||
(SELECT a.`shop_id`
|
||||
FROM xfsg_shop_stage_info a
|
||||
LEFT JOIN `xfsg_decoration_measure` b on a.`shop_id` = b.`shop_id`
|
||||
WHERE a.shop_sub_stage_status = 840 and b.`id` is null)
|
||||
;
|
||||
</select>
|
||||
|
||||
<update id="batchUpdate" parameterType="list">
|
||||
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
||||
|
||||
@@ -83,4 +83,11 @@ public interface DataHandlerServer {
|
||||
*/
|
||||
void dataHandlerCreateStore();
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/8/6
|
||||
* @description: 处理数据推送红圈通建店
|
||||
*/
|
||||
void dataHandlerPushHqt();
|
||||
|
||||
}
|
||||
|
||||
@@ -140,4 +140,6 @@ public interface ShopService {
|
||||
* @description: 校验门店编码重复
|
||||
*/
|
||||
Boolean checkShopCodeRepeat(String shopCode,Long shopId);
|
||||
|
||||
Boolean isShowButton(Long shopId);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.*;
|
||||
import com.cool.store.request.HqtBuildRequest;
|
||||
import com.cool.store.request.QueryBigRegionRequest;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
@@ -49,6 +50,8 @@ import static com.cool.store.utils.poi.DateUtils.YYYY_MM_DD;
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DataHandlerServerImpl implements DataHandlerServer {
|
||||
@Resource
|
||||
private HqtAPIService hqtAPIService;
|
||||
@Resource
|
||||
private RegionMapper regionMapper;
|
||||
@Resource
|
||||
@@ -1258,6 +1261,44 @@ public class DataHandlerServerImpl implements DataHandlerServer {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dataHandlerPushHqt() {
|
||||
List<ShopInfoDO> pushHqtShopList = shopInfoDAO.getPushHqtShopList();
|
||||
for (ShopInfoDO shopInfoDO : pushHqtShopList) {
|
||||
try{
|
||||
hqtAPIService.pushHqtBuild(getHqtBuildRequest(shopInfoDO.getId()));
|
||||
}catch (Exception e){
|
||||
log.info("推送HQT失败:shopId:{},mes:{}",shopInfoDO.getId(),e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
public HqtBuildRequest getHqtBuildRequest(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
EnterpriseUserDO userInfoById = enterpriseUserDAO.getUserInfoById(shopInfo.getInvestmentManager());
|
||||
BigRegionDO bigRegionDO = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
|
||||
if (com.cool.store.utils.poi.StringUtils.isBlank(bigRegionDO.getHqtRegionCode())){
|
||||
bigRegionDO = hqtAPIService.pushHqtRegion(bigRegionDO);
|
||||
}
|
||||
HqtBuildRequest request = new HqtBuildRequest();
|
||||
request.setShopId(shopId);
|
||||
request.setShopCode(shopInfo.getShopCode());
|
||||
request.setShopName(shopInfo.getShopName());
|
||||
request.setShopDecorationAttributes(shopInfo.getShopDecorationAttributes());
|
||||
request.setHqtRegionCode(bigRegionDO.getHqtRegionCode());
|
||||
request.setHqtRegionName(bigRegionDO.getHqtRegionName());
|
||||
request.setSupervisorName(userInfoById.getName());
|
||||
request.setSupervisorMobile(userInfoById.getMobile());
|
||||
request.setPartnershipSignatoryFirst(lineInfoDO.getUsername());
|
||||
request.setPartnershipSignatoryFirstMobile(lineInfoDO.getMobile());
|
||||
request.setShopAddress(shopInfo.getDetailAddress());
|
||||
request.setIsPayDesignFee(CommonConstants.ONE);
|
||||
if (com.cool.store.utils.poi.StringUtils.isNotBlank(shopInfo.getFranchiseBrand())) {
|
||||
request.setFranchiseBrand(Integer.valueOf(shopInfo.getFranchiseBrand()));
|
||||
}
|
||||
return request;
|
||||
}
|
||||
|
||||
private static @NotNull ShopStageInfoDO getShopStageInfoDO(ShopSubStageEnum shopSubStageEnum, ShopStageInfoDO shopStageInfoDO, ShopSubStageStatusEnum shopSubStageStatus) {
|
||||
ShopStageEnum shopStageEnum = shopSubStageEnum.getShopStageEnum();
|
||||
ShopStageInfoDO shopStageInfo = new ShopStageInfoDO();
|
||||
|
||||
@@ -60,6 +60,8 @@ import static com.cool.store.enums.WorkflowSubStageStatusEnum.*;
|
||||
@Slf4j
|
||||
public class ShopServiceImpl implements ShopService {
|
||||
|
||||
@Resource
|
||||
private DecorationMeasureDAO decorationMeasureDAO;
|
||||
@Resource
|
||||
private LinePayDAO linePayDAO;
|
||||
@Resource
|
||||
@@ -917,6 +919,16 @@ public class ShopServiceImpl implements ShopService {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean isShowButton(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
//店已关联HQT 不展示按钮
|
||||
if (StringUtils.isNotBlank(shopInfo.getHqtShopId())){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取招商经理信息
|
||||
* @param
|
||||
|
||||
@@ -184,4 +184,11 @@ public class DataHandlerController {
|
||||
dataHandlerServer.dataHandlerCreateStore();
|
||||
return ResponseResult.success(true);
|
||||
}
|
||||
|
||||
@ApiOperation("红圈通数据处理")
|
||||
@GetMapping("/dataHandlerPushHqt")
|
||||
public ResponseResult<Boolean> dataHandlerPushHqt(){
|
||||
dataHandlerServer.dataHandlerPushHqt();
|
||||
return ResponseResult.success(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,4 +171,10 @@ public class PCShopController {
|
||||
public ResponseResult<ShopStageInfoVO> getShopStageStatus(@RequestParam("shopId")Long shopId, @RequestParam("subStage")Integer subStage) {
|
||||
return ResponseResult.success(shopService.getShopStageStatus(shopId, subStage));
|
||||
}
|
||||
|
||||
@ApiOperation("是否展示装修阶段按钮")
|
||||
@GetMapping("/isShowButton")
|
||||
public ResponseResult<Boolean> isShowButton(@RequestParam("shopId")Long shopId) {
|
||||
return ResponseResult.success(shopService.isShowButton(shopId));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user