Merge #19 into master from cc_20251223_orgChange
组织架构迁移
* cc_20251223_orgChange: (32 commits squashed)
- fix:角色枚举值变更
- fix:待办-缴纳加盟费/保证金中,删除企微督导查询权限,督导查询权限改为招商经理;待办-建店资料中,删除企微督导查询权限
- fix:开店管理-查询我负责的招商经理或运营顾问为当前用户的;查询我管辖的如果当前用户是招商经理则查招商区域
- feat:组织架构切换调整
- Merge remote-tracking branch 'origin/cc_20251223_orgChange' into cc_20251223_orgChange
- feat:门店详情新增招商所属大区 运营顾问
- fix:获取可选择的大区新增type字段
- Merge remote-tracking branch 'origin/cc_20251223_orgChange' into cc_20251223_orgChange
- feat:修改招商所属大区
- Merge remote-tracking branch 'origin/cc_20251223_orgChange' into cc_20251223_orgChange
- feat:新增分店 修改分店
- feat:operations_consultant
- fix:获取平台建店左侧小窗详情接口新增招商区域名称字段
- feat:合同开始之后需要分配才能触发后续阶段
- Merge remote-tracking branch 'origin/cc_20251223_orgChange' into cc_20251223_orgChange
- fix:新增招商区域名称字段
- Merge remote-tracking branch 'origin/cc_20251223_orgChange' into cc_20251223_orgChange
- fix:大区查询添加enableFlag字段
- Merge remote-tracking branch 'origin/cc_20251223_orgChange' into cc_20251223_orgChange
- fix:代办查询bug修改
- fix:字段缺失补充
- Merge branch 'master' into cc_20251223_orgChange
# Conflicts:
#	coolstore-partner-common/src/main/java/com/cool/store/enums/UserRoleEnum.java
#	coolstore-partner-service/src/main/java/com/cool/store/service/impl/ShopServiceImpl.java
#	coolstore-partner-web/src/main/java/com/cool/store/controller/webb/DeskController.java
- fix:修改基本资料bug
- fix:线索列表接口新增招商所属区域名称字段
- fix:加盟商资质审核通过自动建店时带出招商所属区域
- fix:补充提交
- fix:修改开店详情接口修改招商所属区域
- fix:工作台待办返回招商区域名称字段
- fix:开店详情接口招商所属区域id为0的数据返回null
- fix:字段补充
- fix:招商所属大区字段补充
- fix:字段补充
Signed-off-by: 王非凡 <accounts_67eba0c5fee9c49c80c8e2b4@mail.teambition.com>
Reviewed-by: 苏竹红 <570057076@qq.com>
Merged-by: 苏竹红 <570057076@qq.com>
CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/19
This commit is contained in:
@@ -27,8 +27,8 @@ public class BigRegionDAO {
|
||||
@Resource
|
||||
BigRegionMapper bigRegionMapper;
|
||||
|
||||
public List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand){
|
||||
return bigRegionMapper.queryAllBigRegion(keyword, joinBrand);
|
||||
public List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand,Integer type){
|
||||
return bigRegionMapper.queryAllBigRegion(keyword, joinBrand,type);
|
||||
}
|
||||
|
||||
public BigRegionDO queryOrgInfoByBigRegionAndJoinMode(Long regionId, Integer joinMode){
|
||||
|
||||
@@ -194,11 +194,11 @@ public class LineInfoDAO {
|
||||
return lineMobile.stream().filter(o->StringUtils.isNotBlank(o.getMobile())).collect(Collectors.toMap(LineInfoDO::getId, LineInfoDO::getMobile, (k1, k2)-> k1));
|
||||
}
|
||||
|
||||
public Integer batchUpdateInvestmentManager( List<Long> lineIds, Integer status, String investmentManager,Long regionId){
|
||||
public Integer batchUpdateInvestmentManager( List<Long> lineIds, Integer status, String investmentManager,Long regionId,Long investRegionId){
|
||||
if(CollectionUtils.isEmpty(lineIds)|| status == null|| StringUtils.isBlank(investmentManager) || regionId == null){
|
||||
return 0;
|
||||
}
|
||||
return lineInfoMapper.batchUpdateInvestmentManager(lineIds, status, investmentManager,regionId);
|
||||
return lineInfoMapper.batchUpdateInvestmentManager(lineIds, status, investmentManager,regionId,investRegionId);
|
||||
}
|
||||
|
||||
public List<LineVO> getLines(String keyword){
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.OperationsConsultantAssignDO;
|
||||
import com.cool.store.mapper.OperationsConsultantAssignMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2025/12/25 14:29
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Repository
|
||||
public class OperationsConsultantAssignDAO {
|
||||
|
||||
@Resource
|
||||
private OperationsConsultantAssignMapper operationsConsultantAssignMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 新增分配数据
|
||||
* @param operationsConsultantAssignDO
|
||||
* @return
|
||||
*/
|
||||
public Integer addOperationsConsultantAssign(OperationsConsultantAssignDO operationsConsultantAssignDO){
|
||||
return operationsConsultantAssignMapper.insertSelective(operationsConsultantAssignDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据Id更新数据
|
||||
* @param operationsConsultantAssignDO
|
||||
* @return
|
||||
*/
|
||||
public Integer updateById(OperationsConsultantAssignDO operationsConsultantAssignDO){
|
||||
return operationsConsultantAssignMapper.updateByPrimaryKey(operationsConsultantAssignDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据门店信息查询分配信息
|
||||
* @param shopId
|
||||
* @return
|
||||
*/
|
||||
public OperationsConsultantAssignDO selectByShopId(Long shopId){
|
||||
if(shopId == null){
|
||||
return null;
|
||||
}
|
||||
return operationsConsultantAssignMapper.selectByShopId(shopId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取未分配的数据
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
public List<OperationsConsultantAssignDO> getNoAssign(String keyword,List<String> regionIds){
|
||||
return operationsConsultantAssignMapper.getNoAssign(keyword,regionIds);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
@@ -213,4 +214,12 @@ public class RegionDao {
|
||||
}
|
||||
return regionMapper.getSubRegionByParentIdsAndRegionType(parentIdList, regionType);
|
||||
}
|
||||
|
||||
public List<String> getSubIdsByRegionIdsAndType(List<String> regionIds,String regionType){
|
||||
if (CollectionUtils.isEmpty(regionIds)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return regionMapper.getSubIdsByRegionIdsAndType(regionIds, regionType);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public interface BigRegionMapper extends Mapper<BigRegionDO> {
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
List<BigRegionDTO> queryAllBigRegion(@Param("keyword") String keyword, @Param("joinBrand") Integer joinBrand);
|
||||
List<BigRegionDTO> queryAllBigRegion(@Param("keyword") String keyword, @Param("joinBrand") Integer joinBrand, @Param("type") Integer type);
|
||||
|
||||
/**
|
||||
* 根据所属大区与加盟模式查询新管家信息
|
||||
|
||||
@@ -126,7 +126,9 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||
*/
|
||||
Integer batchUpdateInvestmentManager(@Param("lineIds") List<Long> lineIds,
|
||||
@Param("status") Integer status,
|
||||
@Param("investmentManager") String investmentManager, @Param("regionId") Long regionId);
|
||||
@Param("investmentManager") String investmentManager,
|
||||
@Param("regionId") Long regionId,
|
||||
@Param("investRegionId") Long investRegionId);
|
||||
|
||||
List<LineVO> getLinesByKeyword(@Param("keyword") String keyword);
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.OperationsConsultantAssignDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface OperationsConsultantAssignMapper extends Mapper<OperationsConsultantAssignDO> {
|
||||
|
||||
/**
|
||||
* 根据门店查询运营顾问分配信息
|
||||
* @param shopId
|
||||
* @return
|
||||
*/
|
||||
OperationsConsultantAssignDO selectByShopId(Long shopId);
|
||||
|
||||
|
||||
/**
|
||||
* 获取待分配
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
List<OperationsConsultantAssignDO> getNoAssign(@Param("keyword") String keyword, @Param("regionIds") List<String> regionIds);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -118,4 +118,8 @@ public interface RegionMapper {
|
||||
|
||||
|
||||
List<RegionDO> getSubRegionByParentIdsAndRegionType( @Param("parentIds")List<Long> parentIds, @Param("regionType")String regionType);
|
||||
|
||||
|
||||
List<String> getSubIdsByRegionIdsAndType(@Param("regionIds") List<String> regionIds, @Param("regionType")String regionType);
|
||||
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
region_id as regionId,
|
||||
region_name as regionName,
|
||||
group_name as groupName,
|
||||
enable_flag as enableFlag,
|
||||
store_manage_region_id as storeManageRegionId
|
||||
FROM `xfsg_big_region`
|
||||
<where>
|
||||
@@ -41,7 +42,11 @@
|
||||
<if test="joinBrand != null">
|
||||
and join_brand = #{joinBrand}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type = #{type}
|
||||
</if>
|
||||
</where>
|
||||
order by enable_flag desc
|
||||
</select>
|
||||
|
||||
<select id="queryOrgInfoByBigRegionAndJoinMode" resultMap="BaseResultMap">
|
||||
@@ -69,5 +74,13 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<choose>
|
||||
<when test="request.type == null or request.type == 1">
|
||||
AND type = 1
|
||||
</when>
|
||||
<otherwise>
|
||||
AND type = 2
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -33,6 +33,7 @@
|
||||
<result column="partner_num" jdbcType="VARCHAR" property="partnerNum" />
|
||||
<result column="big_region_id" jdbcType="BIGINT" property="bigRegionId" />
|
||||
<result column="franchise_brand" jdbcType="VARCHAR" property="franchiseBrand" />
|
||||
<result column="invest_region_id" jdbcType="BIGINT" property="investRegionId" />
|
||||
</resultMap>
|
||||
<insert id="insertOrUpdate" parameterType="com.cool.store.entity.LineInfoDO" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO xfsg_line_info
|
||||
@@ -46,6 +47,9 @@
|
||||
<if test="param.regionId != null">
|
||||
region_id,
|
||||
</if>
|
||||
<if test="param.investRegionId != null">
|
||||
invest_region_id,
|
||||
</if>
|
||||
<if test="param.bigRegionId != null">
|
||||
big_region_id,
|
||||
</if>
|
||||
@@ -141,6 +145,9 @@
|
||||
<if test="param.regionId != null">
|
||||
#{param.regionId},
|
||||
</if>
|
||||
<if test="param.investRegionId != null">
|
||||
#{param.investRegionId},
|
||||
</if>
|
||||
<if test="param.bigRegionId != null">
|
||||
#{param.bigRegionId},
|
||||
</if>
|
||||
@@ -234,6 +241,9 @@
|
||||
<if test="param.regionId != null">
|
||||
region_id = #{param.regionId},
|
||||
</if>
|
||||
<if test="param.investRegionId != null">
|
||||
invest_region_id = #{param.investRegionId},
|
||||
</if>
|
||||
<if test="param.bigRegionId != null">
|
||||
big_region_id = #{param.bigRegionId},
|
||||
</if>
|
||||
@@ -637,7 +647,7 @@
|
||||
|
||||
|
||||
<update id="batchUpdateInvestmentManager">
|
||||
update xfsg_line_info set line_status = #{status} , investment_manager = #{investmentManager} ,region_id = #{regionId} where id in
|
||||
update xfsg_line_info set line_status = #{status} , investment_manager = #{investmentManager} ,region_id = #{regionId},invest_region_id = #{investRegionId} where id in
|
||||
<foreach collection="lineIds" item="lineId" open="(" separator="," close=")">
|
||||
#{lineId}
|
||||
</foreach>
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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.OperationsConsultantAssignMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.OperationsConsultantAssignDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||
<result column="region_id" jdbcType="BIGINT" property="regionId" />
|
||||
<result column="assign_status" jdbcType="TINYINT" property="assignStatus" />
|
||||
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByShopId" resultMap="BaseResultMap">
|
||||
select * from zxjp_operations_consultant_assign
|
||||
<where>
|
||||
<if test="shopId!=null">
|
||||
and shop_id = #{shopId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getNoAssign" resultMap="BaseResultMap">
|
||||
select * from zxjp_operations_consultant_assign zoca
|
||||
left join xfsg_shop_info xsi on zoca.shop_id = xsi.id
|
||||
<where>
|
||||
and zoca.assign_status = 0
|
||||
<if test="keyword!=null and keyword!=''">
|
||||
and (xsi.shop_name like concat('%', #{keyword}, '%') or xsi.shop_code like concat('%', #{keyword}, '%'))
|
||||
</if>
|
||||
<if test="regionIds!=null and regionIds.size>0">
|
||||
<foreach collection="regionIds" item="regionId" open="and xsi.region_id in (" close=")" separator=",">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
order by zoca.id desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -450,4 +450,22 @@
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getSubIdsByRegionIdsAndType" resultType="String">
|
||||
select
|
||||
id
|
||||
from
|
||||
region_${enterpriseId}
|
||||
where
|
||||
deleted = 0
|
||||
<if test="regionType!=null">
|
||||
and region_type = #{regionType}
|
||||
</if>
|
||||
and
|
||||
<foreach collection="regionIds" separator=" or " open="(" close=")" item="region" >
|
||||
region_path like concat("%/", #{region}, "/%")
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -39,6 +39,8 @@
|
||||
<result column="shop_decoration_attributes" jdbcType="INTEGER" property="shopDecorationAttributes"/>
|
||||
<result column="hqt_shop_id" jdbcType="VARCHAR" property="hqtShopId"/>
|
||||
<result column="store_id" jdbcType="VARCHAR" property="storeId"/>
|
||||
<result column="invest_region_id" jdbcType="BIGINT" property="investRegionId"/>
|
||||
<result column="operations_consultant" jdbcType="VARCHAR" property="operationsConsultant"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="allColumn">
|
||||
@@ -47,17 +49,17 @@
|
||||
shop_code, store_num, shop_manager_user_id, supervisor_user_id,
|
||||
plan_open_time, cur_progress, shop_type, shop_stage, deleted, create_time, update_time,
|
||||
join_mode,detail_address,franchise_brand,development_manager,want_shop_area_id,investment_manager,shop_status,create_user_id,update_user_id,store_type
|
||||
, province,province_code,city,city_code,district,district_code,manager_region_id,shop_decoration_attributes,hqt_shop_id,store_id
|
||||
, province,province_code,city,city_code,district,district_code,manager_region_id,shop_decoration_attributes,hqt_shop_id,store_id, invest_region_id, operations_consultant
|
||||
</sql>
|
||||
|
||||
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
insert into xfsg_shop_info(region_id, line_id, partner_id, shop_name,
|
||||
store_num,supervisor_user_id,create_time,join_mode,franchise_brand,
|
||||
development_manager,want_shop_area_id,investment_manager,store_id) values
|
||||
development_manager,want_shop_area_id,investment_manager,store_id,invest_region_id) values
|
||||
<foreach collection="shopInfoList" item="shop" separator=",">
|
||||
(#{shop.regionId}, #{shop.lineId}, #{shop.partnerId}, #{shop.shopName},
|
||||
#{shop.storeNum},#{shop.supervisorUserId},#{shop.createTime},#{shop.joinMode},#{shop.franchiseBrand},#{shop.developmentManager},
|
||||
#{shop.wantShopAreaId},#{shop.investmentManager},#{shop.storeId})
|
||||
#{shop.wantShopAreaId},#{shop.investmentManager},#{shop.storeId},#{shop.investRegionId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@@ -312,7 +314,8 @@
|
||||
a.shop_status as shopStatus,
|
||||
a.detail_address as shopAddress,
|
||||
a.manager_region_id as managerRegionId,
|
||||
a.store_id as storeId
|
||||
a.store_id as storeId,
|
||||
a.invest_region_id as investRegionId
|
||||
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
|
||||
<if test="request.contractStartTime !=null and request.contractEndTime != null">
|
||||
left join xfsg_sign_franchise c on a.id = c.shop_id
|
||||
@@ -370,7 +373,7 @@
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.flag == 1">
|
||||
and a.investment_manager = #{userId}
|
||||
and (a.investment_manager = #{userId} or a.operations_consultant = #{userId})
|
||||
</if>
|
||||
<if test="request.authRegionIds != null and request.authRegionIds.size() > 0">
|
||||
and a.region_id in
|
||||
@@ -378,6 +381,12 @@
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.authInvestRegionIds != null and request.authInvestRegionIds.size() > 0">
|
||||
and a.invest_region_id in
|
||||
<foreach collection="request.authInvestRegionIds" item="investRegionId" index="index" open="(" separator="," close=")">
|
||||
#{investRegionId}
|
||||
</foreach>
|
||||
</if>
|
||||
order by a.update_time desc
|
||||
</select>
|
||||
<select id="getShopListByRegion" resultType="com.cool.store.entity.ShopInfoDO">
|
||||
|
||||
Reference in New Issue
Block a user