Merge branch 'refs/heads/master' into cc_20251112_wallet
# Conflicts: # coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package com.cool.store.enums.Decoration;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/11/3 9:40
|
||||
* @Version 1.0
|
||||
*/
|
||||
public enum DecorationDescStatus {
|
||||
|
||||
TO_BE_ASSIGNED(0, "待分配"),
|
||||
ASSIGNED(1, "已分配"),
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String descStatus;
|
||||
|
||||
DecorationDescStatus(Integer code, String descStatus) {
|
||||
this.code = code;
|
||||
this.descStatus = descStatus;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDescStatus() {
|
||||
return descStatus;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.cool.store.enums.Decoration;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/10/30 14:35
|
||||
* @Version 1.0
|
||||
*/
|
||||
public enum DecorationUseSystemEnum {
|
||||
|
||||
CRM(1,"CRM"),
|
||||
HQT(2,"红圈通");
|
||||
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String userSystemName;
|
||||
|
||||
|
||||
DecorationUseSystemEnum(Integer code, String userSystemName) {
|
||||
this.code = code;
|
||||
this.userSystemName = userSystemName;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getUserSystemName() {
|
||||
return userSystemName;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -316,6 +316,8 @@ public enum ErrorCodeEnum {
|
||||
NOT_FLAGSHIP_STORE_NOT_EXIST(1610011,"当前阶段加盟类型不能变更!",null),
|
||||
JOIN_MODE_NOT_ALLOW_OPERATE(1610012,"加盟部人员只能新建加盟店或联营店,请确认!",null),
|
||||
STORE_NOT_FIND(1610013,"门店不存在",null),
|
||||
//装修
|
||||
TEAM_USED(1612001,"该装修团队有门店使用,无法删除,请确认!",null),
|
||||
|
||||
WALLET_OPEN_ACCOUNT_FAIL(1620001,"钱包开通失败",null),
|
||||
WALLET_WITH_DRAWER_FAIL(1620002,"提现失败",null),
|
||||
|
||||
@@ -33,7 +33,8 @@ public enum RocketMqGroupEnum {
|
||||
FEI_SHU_EVENT_LISTENER("fei_shu_event_listener", new ArrayList<>(Arrays.asList(RocketMqTagEnum.USER_EVENT, RocketMqTagEnum.AUTH_SCOPE_CHANGE, RocketMqTagEnum.DEPT_EVENT))),
|
||||
|
||||
|
||||
STORE_USER_UPDATE("store_user_update", new ArrayList<>(Arrays.asList(RocketMqTagEnum.STORE_USER_UPDATE)))
|
||||
STORE_USER_UPDATE("store_user_update", new ArrayList<>(Arrays.asList(RocketMqTagEnum.STORE_USER_UPDATE))),
|
||||
SHOP_DECORATION_ASSIGN("shop_decoration_assign", new ArrayList<>(Arrays.asList(RocketMqTagEnum.DELAY_SHOP_DECORATION_ASSIGN)))
|
||||
|
||||
;
|
||||
|
||||
|
||||
@@ -18,7 +18,8 @@ public enum RocketMqTagEnum {
|
||||
ZXJP_CREATE_STORE("zxjp_create_store", "正新鸡排招商创建门店"),
|
||||
PARTNER_LICENSE_SYNC_QUEUE("partner_license_sync_queue", "招商证照信息同步"),
|
||||
BUSINESS_SYNC("business_sync", "工商食安信息同步"),
|
||||
STORE_USER_UPDATE("store_user_update", "门店信息人员变更同步菜品");
|
||||
STORE_USER_UPDATE("store_user_update", "门店信息人员变更同步菜品"),
|
||||
DELAY_SHOP_DECORATION_ASSIGN("shop_decoration_assign","门店装修分配");
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@ package com.cool.store.enums;
|
||||
*/
|
||||
public enum SMSMsgEnum {
|
||||
|
||||
PAY_FRANCHISE_FEES("缴纳加盟费/保证金", "", "SMS_474655067"),
|
||||
SIGN_CONTRACT("合同签署", "", "SMS_474450102"),
|
||||
DESIGN_STAGE("设计阶段", "", "SMS_474490087"),
|
||||
CONSTRUCTION_STAGE("施工阶段", "", "SMS_474525082"),
|
||||
PLATFORM_BUILD_STORE("平台建店", "", "SMS_474645064"),
|
||||
PAY_FRANCHISE_FEES("缴纳加盟费/保证金", "", "SMS_498895215"),
|
||||
SIGN_CONTRACT("合同签署", "", "SMS_498840165"),
|
||||
DESIGN_STAGE("设计阶段", "", "SMS_498750214"),
|
||||
CONSTRUCTION_STAGE("施工阶段", "", "SMS_498870170"),
|
||||
PLATFORM_BUILD_STORE("平台建店", "", "SMS_498730163"),
|
||||
;
|
||||
|
||||
private String title;
|
||||
|
||||
@@ -70,7 +70,7 @@ public enum UserRoleEnum {
|
||||
JING_DONG_OPERATIONS_CUSTOMER(500000000L,"京东运营大区客服"),
|
||||
JING_DONG_HEADQUARTERS_BUILD_CUSTOMER(510000000L,"京东总部建店客服"),
|
||||
FRANCHISEES(530000000L,"加盟商"),
|
||||
SERVICE_PACKAGE_DEDICATED(1725431698852L,"服务包专用"),
|
||||
SERVICE_PACKAGE_DEDICATED(1762761165005L,"服务包专用"),
|
||||
;
|
||||
|
||||
private Long code;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.cool.store.dao.decoration;
|
||||
|
||||
import com.cool.store.dto.decoration.DecorationTeamDTO;
|
||||
import com.cool.store.entity.decoration.DecorationTeamConfigDO;
|
||||
import com.cool.store.mapper.decoration.DecorationTeamConfigMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/10/29 15:07
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Repository
|
||||
public class DecorationTeamConfigDAO {
|
||||
|
||||
@Resource
|
||||
private DecorationTeamConfigMapper decorationTeamConfigMapper;
|
||||
|
||||
public void addTeam(DecorationTeamConfigDO decorationTeamConfigDO){
|
||||
decorationTeamConfigMapper.insertSelective(decorationTeamConfigDO);
|
||||
}
|
||||
|
||||
public void updateTeam(DecorationTeamConfigDO decorationTeamConfigDO){
|
||||
decorationTeamConfigMapper.updateByPrimaryKeySelective(decorationTeamConfigDO);
|
||||
}
|
||||
|
||||
public DecorationTeamConfigDO getById(Long id){
|
||||
if (id == null){
|
||||
return null;
|
||||
}
|
||||
return decorationTeamConfigMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<DecorationTeamDTO> listByCondition(){
|
||||
return decorationTeamConfigMapper.listByCondition();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.cool.store.dao.decoration;
|
||||
|
||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||
import com.cool.store.dto.decoration.DecorationListDTO;
|
||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
import com.cool.store.entity.decoration.ShopDecorationAssignDO;
|
||||
import com.cool.store.mapper.decoration.ShopDecorationAssignMapper;
|
||||
import com.cool.store.request.decoration.DecorationListRequest;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/10/29 15:07
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Repository
|
||||
public class ShopDecorationAssignDAO {
|
||||
|
||||
@Resource
|
||||
private ShopDecorationAssignMapper shopDecorationAssignMapper;
|
||||
@Resource
|
||||
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
||||
|
||||
|
||||
public Integer insert(ShopDecorationAssignDO shopDecorationAssignDO) {
|
||||
if (shopDecorationAssignDO == null){
|
||||
return 0;
|
||||
}
|
||||
return shopDecorationAssignMapper.insert(shopDecorationAssignDO);
|
||||
}
|
||||
|
||||
public ShopDecorationAssignDO getById(Long id) {
|
||||
if (id == null){
|
||||
return null;
|
||||
}
|
||||
return shopDecorationAssignMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public Integer update(ShopDecorationAssignDO shopDecorationAssignDO) {
|
||||
if (shopDecorationAssignDO == null){
|
||||
return 0;
|
||||
}
|
||||
return shopDecorationAssignMapper.updateByPrimaryKey(shopDecorationAssignDO);
|
||||
}
|
||||
|
||||
public Integer countByTeamId(Long teamId) {
|
||||
if (teamId == null){
|
||||
return 0;
|
||||
}
|
||||
return shopDecorationAssignMapper.countByTeamId(teamId);
|
||||
}
|
||||
|
||||
public List<DecorationListDTO> listByCondition(DecorationListRequest request) {
|
||||
if (request == null){
|
||||
return null;
|
||||
}
|
||||
if (request.getWantShopAreaId()!=null){
|
||||
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(request.getWantShopAreaId());
|
||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOList = hyOpenAreaInfoDAO.queryByKeyword(hyOpenAreaInfoDO.getAreaPath(), null, null, false);
|
||||
List<Long> wantShopAreaIds = hyOpenAreaInfoDOList.stream().map(HyOpenAreaInfoDO::getId).collect(Collectors.toList());
|
||||
request.setWantShopAreaIds(wantShopAreaIds);
|
||||
}
|
||||
return shopDecorationAssignMapper.listByCondition(request);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.cool.store.dao.decoration;
|
||||
|
||||
import com.aliyun.openservices.shade.com.google.common.collect.Maps;
|
||||
import com.cool.store.dto.decoration.TeamAreaMappingDTO;
|
||||
import com.cool.store.entity.decoration.TeamAreaMappingDO;
|
||||
import com.cool.store.mapper.decoration.TeamAreaMappingMapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/10/29 15:08
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Repository
|
||||
public class TeamAreaMappingDAO {
|
||||
|
||||
@Resource
|
||||
private TeamAreaMappingMapper teamAreaMappingMapper;
|
||||
|
||||
public void batchInsert(Long teamId,List<Long> cityId){
|
||||
if (teamId == null || CollectionUtils.isEmpty(cityId)){
|
||||
return;
|
||||
}
|
||||
List<TeamAreaMappingDO> list = new ArrayList<>();
|
||||
cityId.forEach(x->{
|
||||
TeamAreaMappingDO teamAreaMappingDO = new TeamAreaMappingDO();
|
||||
teamAreaMappingDO.setTeamId(teamId);
|
||||
teamAreaMappingDO.setOpenCityId(x);
|
||||
list.add(teamAreaMappingDO);
|
||||
});
|
||||
teamAreaMappingMapper.batchInsert(list);
|
||||
}
|
||||
|
||||
public int deletedByTeamId(Long teamId){
|
||||
if (teamId == null){
|
||||
return 0;
|
||||
}
|
||||
return teamAreaMappingMapper.deletedByTeamId(teamId);
|
||||
}
|
||||
|
||||
public int deletedIds(List<Long> ids){
|
||||
if (CollectionUtils.isEmpty(ids)){
|
||||
return 0;
|
||||
}
|
||||
return teamAreaMappingMapper.deletedIds(ids);
|
||||
}
|
||||
|
||||
public TeamAreaMappingDO getByCityId(Long cityId){
|
||||
return teamAreaMappingMapper.getByCityId(cityId);
|
||||
}
|
||||
|
||||
|
||||
public Map<Long, List<TeamAreaMappingDTO>> listByTeamIdList(List<Long> teamIdList){
|
||||
if (CollectionUtils.isEmpty(teamIdList)){
|
||||
return Maps.newHashMap();
|
||||
}
|
||||
List<TeamAreaMappingDTO> teamAreaMappingDTOS = teamAreaMappingMapper.listByTeamIdList(teamIdList);
|
||||
Map<Long, List<TeamAreaMappingDTO>> map = teamAreaMappingDTOS.stream().collect(Collectors.groupingBy(TeamAreaMappingDTO::getTeamId));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.cool.store.mapper.decoration;
|
||||
|
||||
import com.cool.store.dto.decoration.DecorationTeamDTO;
|
||||
import com.cool.store.entity.decoration.DecorationTeamConfigDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DecorationTeamConfigMapper extends Mapper<DecorationTeamConfigDO> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询团队
|
||||
* @return
|
||||
*/
|
||||
List<DecorationTeamDTO> listByCondition();
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.cool.store.mapper.decoration;
|
||||
|
||||
import com.cool.store.dto.decoration.DecorationListDTO;
|
||||
import com.cool.store.entity.decoration.ShopDecorationAssignDO;
|
||||
import com.cool.store.request.decoration.DecorationListRequest;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ShopDecorationAssignMapper extends Mapper<ShopDecorationAssignDO> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询团队被门店使用次数
|
||||
* @param teamId
|
||||
* @return
|
||||
*/
|
||||
Integer countByTeamId(Long teamId);
|
||||
|
||||
/**
|
||||
* 查询分配装修团队列表
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
List<DecorationListDTO> listByCondition(DecorationListRequest request);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.cool.store.mapper.decoration;
|
||||
|
||||
import com.cool.store.dto.decoration.TeamAreaMappingDTO;
|
||||
import com.cool.store.entity.decoration.TeamAreaMappingDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TeamAreaMappingMapper extends Mapper<TeamAreaMappingDO> {
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
Integer batchInsert(@Param("list") List<TeamAreaMappingDO> list);
|
||||
/**
|
||||
* 根据团队id删除 更新团队id时候删除
|
||||
* @param teamId
|
||||
* @return
|
||||
*/
|
||||
Integer deletedByTeamId(@Param("teamId") Long teamId);
|
||||
|
||||
/**
|
||||
* 根据ids删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
Integer deletedIds(@Param("ids") List<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据城市id查询
|
||||
* @param cityId
|
||||
* @return
|
||||
*/
|
||||
TeamAreaMappingDO getByCityId(@Param("cityId") Long cityId);
|
||||
|
||||
/**
|
||||
* 根据团队id批量查询
|
||||
* @param teamIdList
|
||||
* @return
|
||||
*/
|
||||
List<TeamAreaMappingDTO> listByTeamIdList(@Param("teamIdList") List<Long> teamIdList);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.decoration.DecorationTeamConfigMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.decoration.DecorationTeamConfigDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="team_name" jdbcType="VARCHAR" property="teamName" />
|
||||
<result column="team_code" jdbcType="VARCHAR" property="teamCode" />
|
||||
<result column="use_system" jdbcType="TINYINT" property="useSystem" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="TINYINT" property="deleted" />
|
||||
</resultMap>
|
||||
|
||||
<select id="listByCondition" resultType="com.cool.store.dto.decoration.DecorationTeamDTO">
|
||||
select
|
||||
t.id,
|
||||
t.team_name,
|
||||
t.team_code,
|
||||
t.use_system
|
||||
from
|
||||
zxjp_decoration_team_config t
|
||||
where t.deleted = 0
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.decoration.ShopDecorationAssignMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.decoration.ShopDecorationAssignDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||
<result column="decoration_desc_status" jdbcType="TINYINT" property="decorationDescStatus" />
|
||||
<result column="decoration_team_id" jdbcType="BIGINT" property="decorationTeamId" />
|
||||
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||
</resultMap>
|
||||
|
||||
<select id="countByTeamId" resultType="java.lang.Integer">
|
||||
select count(1) from zxjp_shop_decoration_assign where decoration_team_id = #{teamId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="listByCondition" resultType="com.cool.store.dto.decoration.DecorationListDTO">
|
||||
SELECT
|
||||
zsda.id as id ,
|
||||
zsda.shop_id AS shopId,
|
||||
zsda.decoration_desc_status as decorationDescStatus,
|
||||
zsda.decoration_team_id as teamId,
|
||||
xsi.shop_name AS shopName,
|
||||
xsi.shop_code AS shopCode,
|
||||
xsi.region_id AS regionId,
|
||||
xsi.province AS province,
|
||||
xsi.city AS city,
|
||||
xsi.district AS district,
|
||||
xsi.detail_address AS detailAddress,
|
||||
xsi.store_type AS storeType,
|
||||
xsf.sign_type AS signType
|
||||
FROM zxjp_shop_decoration_assign zsda
|
||||
LEFT JOIN xfsg_shop_info xsi ON zsda.shop_id = xsi.id
|
||||
LEFT JOIN xfsg_sign_franchise xsf ON zsda.shop_id = xsf.shop_id
|
||||
<where>
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (xsi.shop_name LIKE CONCAT('%', #{keyword}, '%') OR xsi.shop_code LIKE CONCAT('%', #{keyword}, '%'))
|
||||
</if>
|
||||
<if test="storeType != null">
|
||||
AND xsi.store_type = #{storeType}
|
||||
</if>
|
||||
<if test="signType != null">
|
||||
AND xsf.sign_type = #{signType}
|
||||
</if>
|
||||
<if test="regionId != null">
|
||||
AND xsi.region_id = #{regionId}
|
||||
</if>
|
||||
<if test="decorationDescStatus != null">
|
||||
AND zsda.decoration_desc_status = #{decorationDescStatus}
|
||||
</if>
|
||||
<if test="wantShopAreaIds != null and wantShopAreaIds.size() > 0">
|
||||
and b.want_shop_area_id in
|
||||
<foreach collection="wantShopAreaIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.decoration.TeamAreaMappingMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.decoration.TeamAreaMappingDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="team_id" jdbcType="BIGINT" property="teamId" />
|
||||
<result column="open_city_id" jdbcType="BIGINT" property="openCityId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="batchInsert" parameterType="java.util.List">
|
||||
INSERT INTO zxjp_team_area_mapping (
|
||||
team_id,
|
||||
open_city_id
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.teamId},
|
||||
#{item.openCityId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 根据团队id删除 更新团队id时候删除 -->
|
||||
<delete id="deletedByTeamId" parameterType="java.lang.Long">
|
||||
DELETE FROM zxjp_team_area_mapping
|
||||
WHERE team_id = #{teamId}
|
||||
</delete>
|
||||
|
||||
<!-- 根据ids删除 -->
|
||||
<delete id="deletedIds" parameterType="java.util.List">
|
||||
DELETE FROM zxjp_team_area_mapping
|
||||
WHERE id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getByCityId" parameterType="java.lang.Long" resultType="com.cool.store.entity.decoration.TeamAreaMappingDO">
|
||||
SELECT
|
||||
*
|
||||
FROM zxjp_team_area_mapping
|
||||
WHERE open_city_id = #{cityId}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="listByTeamIdList" parameterType="java.util.List" resultType="com.cool.store.dto.decoration.TeamAreaMappingDTO">
|
||||
SELECT
|
||||
a.team_id as teamId,
|
||||
a.open_city_id as openCityId,
|
||||
b.area_name as openCityName
|
||||
FROM zxjp_team_area_mapping a
|
||||
left join xfsg_open_area_info b on a.open_city_id = b.id
|
||||
WHERE a.team_id IN
|
||||
<foreach collection="teamIdList" item="teamId" open="(" separator="," close=")">
|
||||
#{teamId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cool.store.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/11/3 15:22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ShopSignerInfoDTO {
|
||||
|
||||
@ApiModelProperty("签约人1姓名")
|
||||
private String partnershipSignatoryFirst;
|
||||
|
||||
@ApiModelProperty("签约人1手机号")
|
||||
private String partnershipSignatoryFirstMobile;
|
||||
|
||||
@ApiModelProperty("签约人2姓名")
|
||||
private String partnershipSignatorySecond;
|
||||
|
||||
@ApiModelProperty("签约人2手机号")
|
||||
private String partnershipSignatorySecondMobile;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.cool.store.dto.decoration;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/11/3 11:23
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class DecorationListDTO {
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("装修团队ID")
|
||||
private Long teamId;
|
||||
|
||||
@ApiModelProperty("门店ID")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("门店名称")
|
||||
private String shopName;
|
||||
|
||||
@ApiModelProperty("门店编号")
|
||||
private String shopCode;
|
||||
|
||||
@ApiModelProperty("门店区域ID")
|
||||
private String regionId;
|
||||
|
||||
@ApiModelProperty("门店区域名称")
|
||||
private String regionName;
|
||||
|
||||
@ApiModelProperty("门店省")
|
||||
private String province;
|
||||
|
||||
@ApiModelProperty("门店市")
|
||||
private String city;
|
||||
|
||||
@ApiModelProperty("门店县")
|
||||
private String district;
|
||||
|
||||
@ApiModelProperty("门店详细地址")
|
||||
private String detailAddress;
|
||||
|
||||
@ApiModelProperty("门店类型")
|
||||
private Integer storeType;
|
||||
|
||||
@ApiModelProperty("门店签约类型")
|
||||
private Integer signType;
|
||||
|
||||
@ApiModelProperty("门店装修分配状态")
|
||||
private Integer decorationDescStatus;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.cool.store.dto.decoration;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/10/29 18:41
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class DecorationTeamDTO {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String teamName;
|
||||
|
||||
private String teamCode;
|
||||
|
||||
private Integer useSystem;
|
||||
|
||||
private List<TeamAreaMappingDTO> cityList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.cool.store.dto.decoration;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Column;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/10/29 19:01
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class TeamAreaMappingDTO {
|
||||
|
||||
private Long teamId;
|
||||
|
||||
private Long openCityId;
|
||||
|
||||
private String openCityName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
package com.cool.store.entity.decoration;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
@Table(name = "zxjp_decoration_team_config")
|
||||
public class DecorationTeamConfigDO {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 团队名称
|
||||
*/
|
||||
@Column(name = "team_name")
|
||||
private String teamName;
|
||||
|
||||
/**
|
||||
* 团队编号
|
||||
*/
|
||||
@Column(name = "team_code")
|
||||
private String teamCode;
|
||||
|
||||
/**
|
||||
* 使用系统(1-CRM,2-红圈通)
|
||||
*/
|
||||
@Column(name = "use_system")
|
||||
private Integer useSystem;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 删除状态(0-正常,1-删除)
|
||||
*/
|
||||
private Integer deleted;
|
||||
|
||||
/**
|
||||
* @return id
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取团队名称
|
||||
*
|
||||
* @return team_name - 团队名称
|
||||
*/
|
||||
public String getTeamName() {
|
||||
return teamName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置团队名称
|
||||
*
|
||||
* @param teamName 团队名称
|
||||
*/
|
||||
public void setTeamName(String teamName) {
|
||||
this.teamName = teamName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取团队编号
|
||||
*
|
||||
* @return team_code - 团队编号
|
||||
*/
|
||||
public String getTeamCode() {
|
||||
return teamCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置团队编号
|
||||
*
|
||||
* @param teamCode 团队编号
|
||||
*/
|
||||
public void setTeamCode(String teamCode) {
|
||||
this.teamCode = teamCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取使用系统(1-CRM,2-红圈通)
|
||||
*
|
||||
* @return use_system - 使用系统(1-CRM,2-红圈通)
|
||||
*/
|
||||
public Integer getUseSystem() {
|
||||
return useSystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置使用系统(1-CRM,2-红圈通)
|
||||
*
|
||||
* @param useSystem 使用系统(1-CRM,2-红圈通)
|
||||
*/
|
||||
public void setUseSystem(Integer useSystem) {
|
||||
this.useSystem = useSystem;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取创建时间
|
||||
*
|
||||
* @return create_time - 创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置创建时间
|
||||
*
|
||||
* @param createTime 创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取更新时间
|
||||
*
|
||||
* @return update_time - 更新时间
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新时间
|
||||
*
|
||||
* @param updateTime 更新时间
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取删除状态(0-正常,1-删除)
|
||||
*
|
||||
* @return deleted - 删除状态(0-正常,1-删除)
|
||||
*/
|
||||
public Integer getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置删除状态(0-正常,1-删除)
|
||||
*
|
||||
* @param deleted 删除状态(0-正常,1-删除)
|
||||
*/
|
||||
public void setDeleted(Integer deleted) {
|
||||
this.deleted = deleted;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
package com.cool.store.entity.decoration;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
@Table(name = "zxjp_shop_decoration_assign")
|
||||
public class ShopDecorationAssignDO {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 装修团队id
|
||||
*/
|
||||
@Column(name = "shop_id")
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 分配状态(0-待分配,1-已分配)
|
||||
*/
|
||||
@Column(name = "decoration_desc_status")
|
||||
private Integer decorationDescStatus;
|
||||
|
||||
/**
|
||||
* 装修团队id
|
||||
*/
|
||||
@Column(name = "decoration_team_id")
|
||||
private Long decorationTeamId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "created_time")
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "updated_time")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* @return id
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取装修团队id
|
||||
*
|
||||
* @return shop_id - 装修团队id
|
||||
*/
|
||||
public Long getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置装修团队id
|
||||
*
|
||||
* @param shopId 装修团队id
|
||||
*/
|
||||
public void setShopId(Long shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分配状态(0-待分配,1-已分配)
|
||||
*
|
||||
* @return decoration_desc_status - 分配状态(0-待分配,1-已分配)
|
||||
*/
|
||||
public Integer getDecorationDescStatus() {
|
||||
return decorationDescStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置分配状态(0-待分配,1-已分配)
|
||||
*
|
||||
* @param decorationDescStatus 分配状态(0-待分配,1-已分配)
|
||||
*/
|
||||
public void setDecorationDescStatus(Integer decorationDescStatus) {
|
||||
this.decorationDescStatus = decorationDescStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取装修团队id
|
||||
*
|
||||
* @return decoration_team_id - 装修团队id
|
||||
*/
|
||||
public Long getDecorationTeamId() {
|
||||
return decorationTeamId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置装修团队id
|
||||
*
|
||||
* @param decorationTeamId 装修团队id
|
||||
*/
|
||||
public void setDecorationTeamId(Long decorationTeamId) {
|
||||
this.decorationTeamId = decorationTeamId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取创建时间
|
||||
*
|
||||
* @return created_time - 创建时间
|
||||
*/
|
||||
public Date getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置创建时间
|
||||
*
|
||||
* @param createdTime 创建时间
|
||||
*/
|
||||
public void setCreatedTime(Date createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取更新时间
|
||||
*
|
||||
* @return updated_time - 更新时间
|
||||
*/
|
||||
public Date getUpdatedTime() {
|
||||
return updatedTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新时间
|
||||
*
|
||||
* @param updatedTime 更新时间
|
||||
*/
|
||||
public void setUpdatedTime(Date updatedTime) {
|
||||
this.updatedTime = updatedTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.cool.store.entity.decoration;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
@Table(name = "zxjp_team_area_mapping")
|
||||
public class TeamAreaMappingDO {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 团队ID
|
||||
*/
|
||||
@Column(name = "team_id")
|
||||
private Long teamId;
|
||||
|
||||
/**
|
||||
* 城市ID
|
||||
*/
|
||||
@Column(name = "open_city_id")
|
||||
private Long openCityId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* @return id
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取团队ID
|
||||
*
|
||||
* @return team_id - 团队ID
|
||||
*/
|
||||
public Long getTeamId() {
|
||||
return teamId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置团队ID
|
||||
*
|
||||
* @param teamId 团队ID
|
||||
*/
|
||||
public void setTeamId(Long teamId) {
|
||||
this.teamId = teamId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取城市ID
|
||||
*
|
||||
* @return open_city_id - 城市ID
|
||||
*/
|
||||
public Long getOpenCityId() {
|
||||
return openCityId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置城市ID
|
||||
*
|
||||
* @param openCityId 城市ID
|
||||
*/
|
||||
public void setOpenCityId(Long openCityId) {
|
||||
this.openCityId = openCityId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取创建时间
|
||||
*
|
||||
* @return create_time - 创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置创建时间
|
||||
*
|
||||
* @param createTime 创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.cool.store.request.decoration;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/10/29 16:13
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class AddTeamRequest {
|
||||
@ApiModelProperty("团队名称")
|
||||
private String teamName;
|
||||
@ApiModelProperty("负责区域列表 直传市ID,选择省时,将市Id全部传入")
|
||||
private List<Long> openCityIdList;
|
||||
@ApiModelProperty("团队名称")
|
||||
private Integer userSystem;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.cool.store.request.decoration;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/11/3 13:31
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class DecorationListRequest extends PageBasicInfo {
|
||||
|
||||
@ApiModelProperty("关键字 门店名称/门店编码")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("门店类型")
|
||||
private Integer storeType;
|
||||
|
||||
@ApiModelProperty("门店签约类型")
|
||||
private Integer signType;
|
||||
|
||||
@ApiModelProperty("门店区域ID")
|
||||
private Integer regionId;
|
||||
|
||||
@ApiModelProperty("门店意向开店区域")
|
||||
private Long wantShopAreaId;
|
||||
|
||||
@ApiModelProperty(value = "门店意向开店区域IDs",hidden = true)
|
||||
private List<Long> wantShopAreaIds;
|
||||
|
||||
@ApiModelProperty("门店装修分配状态")
|
||||
private Integer decorationDescStatus;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.cool.store.request.decoration;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/11/3 16:40
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class DeletedRequest {
|
||||
|
||||
private Long teamId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.cool.store.request.decoration;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/11/3 16:00
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class UpdateConstructionTeamRequest {
|
||||
|
||||
private Long id;
|
||||
|
||||
private Long teamId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.request.decoration;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/10/29 16:16
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class UpdateTeamRequest {
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
private Long id;
|
||||
@ApiModelProperty("团队名称")
|
||||
private String teamCode;
|
||||
@ApiModelProperty("团队名称")
|
||||
private String teamName;
|
||||
@ApiModelProperty("负责区域列表 直传市ID,选择省时,将市Id全部传入")
|
||||
private List<Long> openCityIdList;
|
||||
@ApiModelProperty("团队名称")
|
||||
private Integer userSystem;
|
||||
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import com.aliyun.openservices.ons.api.bean.Subscription;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.enums.RocketMqGroupEnum;
|
||||
import com.cool.store.mq.RocketMqConfig;
|
||||
import com.cool.store.mq.consumer.listener.ShopDecorationAssignListener;
|
||||
import com.cool.store.mq.consumer.listener.StoreUserUpdateListener;
|
||||
import com.cool.store.mq.consumer.listener.XfsgTrainingPersonSyncListener;
|
||||
import com.google.common.collect.Maps;
|
||||
@@ -35,6 +36,8 @@ public class ConsumerClient {
|
||||
private XfsgTrainingPersonSyncListener xfsgTrainingPersonSyncListener;
|
||||
@Resource
|
||||
private StoreUserUpdateListener storeUserUpdateListener;
|
||||
@Resource
|
||||
private ShopDecorationAssignListener shopDecorationAssignListener;
|
||||
|
||||
/**
|
||||
* 获取通用配置
|
||||
@@ -101,4 +104,17 @@ public class ConsumerClient {
|
||||
return consumerBean;
|
||||
}
|
||||
|
||||
@Bean(initMethod = "start", destroyMethod = "shutdown")
|
||||
public ConsumerBean shopDecorationAssign() {
|
||||
RocketMqGroupEnum groupEnum = RocketMqGroupEnum.SHOP_DECORATION_ASSIGN;
|
||||
ConsumerBean consumerBean = new ConsumerBean();
|
||||
//配置文件
|
||||
Properties properties = getCommonProperties(groupEnum);
|
||||
consumerBean.setProperties(properties);
|
||||
Map<Subscription, MessageListener> commonSubscriptionTable = getCommonSubscriptionTable(groupEnum, shopDecorationAssignListener);
|
||||
//订阅多个topic如上面设置
|
||||
consumerBean.setSubscriptionTable(commonSubscriptionTable);
|
||||
return consumerBean;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.cool.store.mq.consumer.listener;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyun.openservices.ons.api.Action;
|
||||
import com.aliyun.openservices.ons.api.ConsumeContext;
|
||||
import com.aliyun.openservices.ons.api.Message;
|
||||
import com.aliyun.openservices.ons.api.MessageListener;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.decoration.ShopDecorationAssignDAO;
|
||||
import com.cool.store.dto.store.StoreUserPositionDTO;
|
||||
import com.cool.store.dto.store.StoreUserUpdateDTO;
|
||||
import com.cool.store.entity.decoration.ShopDecorationAssignDO;
|
||||
import com.cool.store.service.DecorationHandleService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/11/3 10:13
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ShopDecorationAssignListener implements MessageListener {
|
||||
|
||||
@Autowired
|
||||
public RedisUtilPool redisUtilPool;
|
||||
@Resource
|
||||
DecorationHandleService decorationHandleService;
|
||||
@Resource
|
||||
ShopDecorationAssignDAO shopDecorationAssignDAO;
|
||||
|
||||
@Override
|
||||
public Action consume(Message message, ConsumeContext context) {
|
||||
String text = new String(message.getBody());
|
||||
if(StringUtils.isBlank(text)){
|
||||
log.info("消息体为空,tag:{},messageId:{}",message.getTag(),message.getMsgID());
|
||||
return Action.CommitMessage;
|
||||
}
|
||||
String lockKey = "ShopDecorationAssignListener:" + message.getMsgID();
|
||||
boolean lock = redisUtilPool.setNxExpire(lockKey, message.getMsgID(), CommonConstants.NORMAL_LOCK_TIMES);
|
||||
if(lock){
|
||||
try {
|
||||
ShopDecorationAssignDO shopDecorationAssignDO = shopDecorationAssignDAO.getById(Long.valueOf(text));
|
||||
decorationHandleService.handleDecorationTeam(shopDecorationAssignDO);
|
||||
}catch (Exception e){
|
||||
log.error("ShopDecorationAssignListener consume error",e);
|
||||
return Action.ReconsumeLater;
|
||||
}finally {
|
||||
redisUtilPool.delKey(lockKey);
|
||||
}
|
||||
log.info("消费成功,tag:{},messageId:{},reqBody={}",message.getTag(),message.getMsgID(),text);
|
||||
return Action.CommitMessage;
|
||||
}
|
||||
return Action.ReconsumeLater;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import com.cool.store.dto.ShopSignerInfoDTO;
|
||||
import com.cool.store.dto.decoration.DecorationListDTO;
|
||||
import com.cool.store.dto.decoration.DecorationTeamDTO;
|
||||
import com.cool.store.entity.decoration.ShopDecorationAssignDO;
|
||||
import com.cool.store.request.decoration.AddTeamRequest;
|
||||
import com.cool.store.request.decoration.DecorationListRequest;
|
||||
import com.cool.store.request.decoration.UpdateConstructionTeamRequest;
|
||||
import com.cool.store.request.decoration.UpdateTeamRequest;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/10/29 15:54
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface DecorationHandleService {
|
||||
|
||||
|
||||
/**
|
||||
* 新增团队
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
Boolean addTeam(AddTeamRequest request);
|
||||
|
||||
/**
|
||||
* 修改团队
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
Boolean update(UpdateTeamRequest request);
|
||||
|
||||
/**
|
||||
* 删除团队
|
||||
* @param teamId
|
||||
* @return
|
||||
*/
|
||||
Boolean deleteByTeamId(Long teamId);
|
||||
|
||||
/**
|
||||
* pageBasicInfo
|
||||
* 根据条件查询团队
|
||||
* @return
|
||||
*/
|
||||
PageInfo<DecorationTeamDTO> listByCondition(PageBasicInfo pageBasicInfo );
|
||||
|
||||
/**
|
||||
* openCityId
|
||||
* @param openCityId
|
||||
* @return
|
||||
*/
|
||||
Long getDecorationTeamIdByCityId(Long openCityId);
|
||||
|
||||
/**
|
||||
* 处理团队
|
||||
* @param teamId
|
||||
* @return
|
||||
*/
|
||||
Boolean handleDecorationTeam(ShopDecorationAssignDO shopDecorationAssignDO);
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
PageInfo<DecorationListDTO> getDecorationAssignList(DecorationListRequest request);
|
||||
|
||||
/**
|
||||
* 获取门店签约信息
|
||||
* @param shopId
|
||||
* @return
|
||||
*/
|
||||
ShopSignerInfoDTO getShopSignerInfo(Long shopId);
|
||||
|
||||
/**
|
||||
* 更新施工团队
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
Boolean updateConstructionTeam(UpdateConstructionTeamRequest request);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.request.AddSignFranchiseRequest;
|
||||
import com.cool.store.request.AuditApproveRequest;
|
||||
import com.cool.store.request.AuditResultRequest;
|
||||
import com.cool.store.request.HqtBuildRequest;
|
||||
import com.cool.store.response.AddSignFranchiseResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
|
||||
@@ -42,4 +43,6 @@ public interface SignFranchiseService {
|
||||
Boolean rePay(Long shopId);
|
||||
|
||||
Integer dateHandle();
|
||||
|
||||
HqtBuildRequest getHqtBuildRequest(Long shopId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,251 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dao.decoration.DecorationTeamConfigDAO;
|
||||
import com.cool.store.dao.decoration.ShopDecorationAssignDAO;
|
||||
import com.cool.store.dao.decoration.TeamAreaMappingDAO;
|
||||
import com.cool.store.dto.ShopSignerInfoDTO;
|
||||
import com.cool.store.dto.decoration.DecorationListDTO;
|
||||
import com.cool.store.dto.decoration.DecorationTeamDTO;
|
||||
import com.cool.store.dto.decoration.TeamAreaMappingDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.entity.decoration.DecorationTeamConfigDO;
|
||||
import com.cool.store.entity.decoration.ShopDecorationAssignDO;
|
||||
import com.cool.store.entity.decoration.TeamAreaMappingDO;
|
||||
import com.cool.store.enums.Decoration.DecorationDescStatus;
|
||||
import com.cool.store.enums.Decoration.DecorationUseSystemEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.JoinModeEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.decoration.AddTeamRequest;
|
||||
import com.cool.store.request.decoration.DecorationListRequest;
|
||||
import com.cool.store.request.decoration.UpdateConstructionTeamRequest;
|
||||
import com.cool.store.request.decoration.UpdateTeamRequest;
|
||||
import com.cool.store.service.DecorationHandleService;
|
||||
import com.cool.store.service.HqtAPIService;
|
||||
import com.cool.store.service.SignFranchiseService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import springfox.documentation.service.ApiListing;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/10/29 15:55
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DecorationHandleServiceImpl implements DecorationHandleService {
|
||||
|
||||
|
||||
@Resource
|
||||
private DecorationTeamConfigDAO decorationTeamConfigDAO;
|
||||
@Resource
|
||||
private TeamAreaMappingDAO teamAreaMappingDAO;
|
||||
@Resource
|
||||
ShopDecorationAssignDAO shopDecorationAssignDAO;
|
||||
@Resource
|
||||
RedisUtilPool redisUtilPool;
|
||||
@Resource
|
||||
private HqtAPIService hqtAPIService;
|
||||
@Resource
|
||||
ShopStageInfoDAO shopStageInfoDAO;
|
||||
@Resource
|
||||
ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
SignFranchiseService signFranchiseService;
|
||||
@Resource
|
||||
RegionDao regionDao;
|
||||
@Resource
|
||||
LineInfoDAO lineInfoDAO;
|
||||
@Resource
|
||||
private SignFranchiseDAO signFranchiseDAO;
|
||||
|
||||
@Override
|
||||
public Boolean addTeam(AddTeamRequest request) {
|
||||
//校验
|
||||
if (Objects.isNull(request)||CollectionUtils.isEmpty(request.getOpenCityIdList()) || StringUtil.isEmpty(request.getTeamName())){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
//先删除城市团队关系
|
||||
teamAreaMappingDAO.deletedIds(request.getOpenCityIdList());
|
||||
|
||||
DecorationTeamConfigDO decorationTeamConfigDO = new DecorationTeamConfigDO();
|
||||
decorationTeamConfigDO.setTeamName(request.getTeamName());
|
||||
decorationTeamConfigDO.setTeamCode(getNextNumber());
|
||||
decorationTeamConfigDO.setUseSystem(request.getUserSystem());
|
||||
decorationTeamConfigDAO.addTeam(decorationTeamConfigDO);
|
||||
teamAreaMappingDAO.batchInsert(decorationTeamConfigDO.getId(),request.getOpenCityIdList());
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean update(UpdateTeamRequest request) {
|
||||
if (request.getId() == null||CollectionUtils.isEmpty(request.getOpenCityIdList()) || StringUtil.isEmpty(request.getTeamName())){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
DecorationTeamConfigDO teamConfigDO = decorationTeamConfigDAO.getById(request.getId());
|
||||
if (teamConfigDO==null){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
}
|
||||
teamConfigDO.setTeamName(request.getTeamName());
|
||||
teamConfigDO.setUseSystem(request.getUserSystem());
|
||||
decorationTeamConfigDAO.updateTeam(teamConfigDO);
|
||||
//删除团队城市关系
|
||||
teamAreaMappingDAO.deletedByTeamId(teamConfigDO.getId());
|
||||
//新增更新之后的团队城市关系
|
||||
teamAreaMappingDAO.batchInsert(teamConfigDO.getId(),request.getOpenCityIdList());
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteByTeamId(Long teamId) {
|
||||
DecorationTeamConfigDO teamConfigDO = decorationTeamConfigDAO.getById(teamId);
|
||||
if (teamConfigDO==null){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
}
|
||||
//查询当前团队是否有门店使用 有的话 不能删除
|
||||
Integer count = shopDecorationAssignDAO.countByTeamId(teamId);
|
||||
if (count != null && count > 0){
|
||||
throw new ServiceException(ErrorCodeEnum.TEAM_USED);
|
||||
}
|
||||
teamConfigDO.setDeleted(1);
|
||||
teamAreaMappingDAO.deletedByTeamId(teamId);
|
||||
decorationTeamConfigDAO.updateTeam(teamConfigDO);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<DecorationTeamDTO> listByCondition(PageBasicInfo pageBasicInfo) {
|
||||
PageHelper.startPage(pageBasicInfo.getPageNum(), pageBasicInfo.getPageSize());
|
||||
List<DecorationTeamDTO> list = decorationTeamConfigDAO.listByCondition();
|
||||
if (CollectionUtils.isEmpty(list)){
|
||||
return new PageInfo<>();
|
||||
}
|
||||
List<Long> teamIds = list.stream().map(DecorationTeamDTO::getId).collect(Collectors.toList());
|
||||
Map<Long, List<TeamAreaMappingDTO>> listMap = teamAreaMappingDAO.listByTeamIdList(teamIds);
|
||||
list.forEach(x->{
|
||||
x.setCityList(listMap.get(x.getId()));
|
||||
});
|
||||
PageInfo<DecorationTeamDTO> result = new PageInfo<>(list);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getDecorationTeamIdByCityId(Long openCityId) {
|
||||
if (openCityId==null){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
TeamAreaMappingDO cityInfo = teamAreaMappingDAO.getByCityId(openCityId);
|
||||
if (Objects.isNull(cityInfo)){
|
||||
return null;
|
||||
}
|
||||
DecorationTeamConfigDO teamInfo = decorationTeamConfigDAO.getById(cityInfo.getTeamId());
|
||||
return teamInfo.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean handleDecorationTeam(ShopDecorationAssignDO shopDecorationAssign) {
|
||||
//先查询
|
||||
if (shopDecorationAssign == null){
|
||||
log.info("handleDecorationTeam_error data not exist");
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
//如果门店是已经分配状态 则不能再次分配
|
||||
if (DecorationDescStatus.ASSIGNED.getCode().equals(shopDecorationAssign.getDecorationDescStatus())){
|
||||
log.info("handleDecorationTeam id:{},门店已分配", JSONObject.toJSONString(shopDecorationAssign));
|
||||
}
|
||||
//没有分配的门店 开始分配
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(shopDecorationAssign.getShopId());
|
||||
//查询装修团队
|
||||
DecorationTeamConfigDO teamInfo = decorationTeamConfigDAO.getById(shopDecorationAssign.getDecorationTeamId());
|
||||
if (teamInfo == null){
|
||||
log.info("handleDecorationTeam_error team not exist");
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
//配置的系统是红圈通 且不是加盟公司自有店 则推送数据 也就是配置了crm或者是加盟公司自有店 走crm流程
|
||||
if (teamInfo.getUseSystem().equals(DecorationUseSystemEnum.HQT.getCode())&&!shopInfoDO.getJoinMode().equals(JoinModeEnum.OWN_STORE.getCode())){
|
||||
hqtAPIService.pushHqtBuild(signFranchiseService.getHqtBuildRequest(shopInfoDO.getId()));
|
||||
}
|
||||
shopDecorationAssign.setDecorationDescStatus(DecorationDescStatus.ASSIGNED.getCode());
|
||||
shopDecorationAssignDAO.update(shopDecorationAssign);
|
||||
//阶段
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_861);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<DecorationListDTO> getDecorationAssignList(DecorationListRequest request) {
|
||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||
List<DecorationListDTO> decorationListDTOS = shopDecorationAssignDAO.listByCondition(request);
|
||||
if (CollectionUtils.isEmpty(decorationListDTOS)){
|
||||
return new PageInfo<>();
|
||||
}
|
||||
Set<String> regionIds = decorationListDTOS.stream().map(DecorationListDTO::getRegionId).collect(Collectors.toSet());
|
||||
List<RegionDO> regionList = regionDao.getRegionByRegionIds(new ArrayList<>(regionIds));
|
||||
//转为map
|
||||
Map<String, String> regionMap = regionList.stream().collect(Collectors.toMap(RegionDO::getRegionId, RegionDO::getName));
|
||||
decorationListDTOS.forEach(x->{
|
||||
x.setRegionName(regionMap.get(x.getRegionId()));
|
||||
});
|
||||
return new PageInfo<>(decorationListDTOS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopSignerInfoDTO getShopSignerInfo(Long shopId) {
|
||||
if (shopId==null){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
if (shopInfo == null){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
ShopSignerInfoDTO shopSignerInfoDTO = new ShopSignerInfoDTO();
|
||||
shopSignerInfoDTO.setPartnershipSignatoryFirst(lineInfo.getUsername());
|
||||
shopSignerInfoDTO.setPartnershipSignatoryFirstMobile(lineInfo.getMobile());
|
||||
SignFranchiseDO signFranchiseDO = signFranchiseDAO.selectByShopId(shopId);
|
||||
if (signFranchiseDO!=null){
|
||||
shopSignerInfoDTO.setPartnershipSignatorySecond(signFranchiseDO.getPartnershipSignatorySecond());
|
||||
shopSignerInfoDTO.setPartnershipSignatorySecondMobile(signFranchiseDO.getPartnershipSignatorySecondMobile());
|
||||
}
|
||||
return shopSignerInfoDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateConstructionTeam(UpdateConstructionTeamRequest request) {
|
||||
//查询待分配门店信息
|
||||
ShopDecorationAssignDO shopDecorationAssign = shopDecorationAssignDAO.getById(request.getId());
|
||||
if (shopDecorationAssign == null){
|
||||
log.info("handleDecorationTeam_error data not exist");
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
shopDecorationAssign.setDecorationTeamId(request.getTeamId());
|
||||
handleDecorationTeam(shopDecorationAssign);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
public String getNextNumber() {
|
||||
Long current = redisUtilPool.incrby("counter_key", 1);
|
||||
if (current == 1) {
|
||||
// 如果是第一次,重新设置为 1(因为 increment 从 0 开始)
|
||||
redisUtilPool.setString("counter_key", "1");
|
||||
current = 1L;
|
||||
}
|
||||
return String.format("TD%04d", current);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,13 +5,21 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dao.decoration.DecorationTeamConfigDAO;
|
||||
import com.cool.store.dao.decoration.ShopDecorationAssignDAO;
|
||||
import com.cool.store.dao.decoration.TeamAreaMappingDAO;
|
||||
import com.cool.store.dto.PartnerBankInfoDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.entity.decoration.DecorationTeamConfigDO;
|
||||
import com.cool.store.entity.decoration.ShopDecorationAssignDO;
|
||||
import com.cool.store.entity.decoration.TeamAreaMappingDO;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.enums.Decoration.DecorationDescStatus;
|
||||
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.mq.producer.SimpleMessageService;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.AddSignFranchiseResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
@@ -27,6 +35,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import sun.font.Decoration;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
@@ -120,6 +129,14 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
OperationLogService operationLogService;
|
||||
@Resource
|
||||
OperationLogDAO operationLogDAO;
|
||||
@Resource
|
||||
TeamAreaMappingDAO teamAreaMappingDAO;
|
||||
@Resource
|
||||
DecorationTeamConfigDAO decorationTeamConfigDAO;
|
||||
@Resource
|
||||
ShopDecorationAssignDAO shopDecorationAssignDAO;
|
||||
@Resource
|
||||
private SimpleMessageService simpleMessageService;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -395,10 +412,26 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
));
|
||||
}else{
|
||||
//,加盟公司自有店->加盟公司建店 不推送数据 再crm中完成
|
||||
if ( !shopInfoDO.getJoinMode().equals(JoinModeEnum.OWN_STORE.getCode())){
|
||||
hqtAPIService.pushHqtBuild(getHqtBuildRequest(request.getShopId()));
|
||||
//v2.0.0 先确认装修团队
|
||||
TeamAreaMappingDO city = teamAreaMappingDAO.getByCityId(shopInfoDO.getWantShopAreaId());
|
||||
//默认团队
|
||||
Long teamId = 1L;
|
||||
if (Objects.nonNull(city)) {
|
||||
//v2.0.0 确认团队
|
||||
DecorationTeamConfigDO decorationTeamConfigDO = decorationTeamConfigDAO.getById(city.getTeamId());
|
||||
if (Objects.nonNull(decorationTeamConfigDO)) {
|
||||
//v2.0.0 确认团队
|
||||
teamId = decorationTeamConfigDO.getId();
|
||||
}
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_861);
|
||||
|
||||
}
|
||||
ShopDecorationAssignDO shopDecorationAssignDO = new ShopDecorationAssignDO();
|
||||
shopDecorationAssignDO.setDecorationDescStatus(DecorationDescStatus.TO_BE_ASSIGNED.getCode());
|
||||
shopDecorationAssignDO.setDecorationTeamId(teamId);
|
||||
shopDecorationAssignDO.setShopId(shopId);
|
||||
shopDecorationAssignDAO.insert(shopDecorationAssignDO);
|
||||
//新增一个延迟队列 四个小时之后确定是否手动分配 没有手动分配 直接自动分配 红圈通推送和下一个流程开始改为分配团队之后 触发
|
||||
simpleMessageService.send(String.valueOf(shopDecorationAssignDO.getId()), RocketMqTagEnum.DELAY_SHOP_DECORATION_ASSIGN,System.currentTimeMillis() + 4*60*60 * 1000);
|
||||
}
|
||||
shopAuditInfoDO.setResultType(Constants.ZERO_INTEGER);
|
||||
shopAuditInfoDO.setPassReason(request.getCause());
|
||||
@@ -454,6 +487,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HqtBuildRequest getHqtBuildRequest(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import com.cool.store.dto.ShopSignerInfoDTO;
|
||||
import com.cool.store.dto.decoration.DecorationListDTO;
|
||||
import com.cool.store.dto.decoration.DecorationTeamDTO;
|
||||
import com.cool.store.request.decoration.*;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.DecorationHandleService;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/10/30 18:00
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RequestMapping("/pc/decoration")
|
||||
@RestController
|
||||
@Api(tags = "装修分配团队")
|
||||
@Slf4j
|
||||
public class DecorationAllocationController {
|
||||
|
||||
@Resource
|
||||
private DecorationHandleService decorationHandleService;
|
||||
|
||||
|
||||
@PostMapping("/addTeam")
|
||||
@ApiOperation("添加团队")
|
||||
public ResponseResult<Boolean> addTeam(@RequestBody AddTeamRequest request){
|
||||
return ResponseResult.success(decorationHandleService.addTeam(request));
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("修改团队")
|
||||
public ResponseResult<Boolean> update(@RequestBody UpdateTeamRequest request){
|
||||
return ResponseResult.success(decorationHandleService.update(request));
|
||||
}
|
||||
|
||||
@PostMapping("/deleteByTeamId")
|
||||
@ApiOperation("删除团队")
|
||||
public ResponseResult<Boolean> deleteByTeamId(@RequestBody DeletedRequest request){
|
||||
return ResponseResult.success(decorationHandleService.deleteByTeamId(request.getTeamId()));
|
||||
}
|
||||
|
||||
@PostMapping("/listByCondition")
|
||||
@ApiOperation("查询团队")
|
||||
public ResponseResult<PageInfo<DecorationTeamDTO>> listByCondition(@RequestBody PageBasicInfo pageBasicInfo){
|
||||
return ResponseResult.success(decorationHandleService.listByCondition(pageBasicInfo));
|
||||
}
|
||||
|
||||
@PostMapping("/getDecorationAssignList")
|
||||
@ApiOperation("装修分配列表/待办列表 查询待办时 分配状态传-0")
|
||||
public ResponseResult<PageInfo<DecorationListDTO>> getDecorationAssignList(@RequestBody DecorationListRequest pageBasicInfo){
|
||||
return ResponseResult.success(decorationHandleService.getDecorationAssignList(pageBasicInfo));
|
||||
}
|
||||
|
||||
@GetMapping("/getShopSignerInfo")
|
||||
@ApiOperation("详情中获取签约人信息")
|
||||
public ResponseResult<ShopSignerInfoDTO> getShopSignerInfo(@RequestParam("shopId") Long shopId){
|
||||
return ResponseResult.success(decorationHandleService.getShopSignerInfo(shopId));
|
||||
}
|
||||
|
||||
@PostMapping("/confirm")
|
||||
@ApiOperation("确认")
|
||||
public ResponseResult<Boolean> updateConstructionTeam(@RequestBody UpdateConstructionTeamRequest request){
|
||||
return ResponseResult.success(decorationHandleService.updateConstructionTeam(request));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user