Merge remote-tracking branch 'origin/cc_20250325_select' into cc_20250325_select

This commit is contained in:
苏竹红
2025-04-03 16:50:48 +08:00
49 changed files with 805 additions and 326 deletions

View File

@@ -0,0 +1,38 @@
package com.cool.store.enums;
/**
* @Author: WangShuo
* @Date: 2025/04/02/16:44
* @Version 1.0
* @注释:
*/
public enum OpTypeEnum {
//操作类型: 1(新增), 2(更新), 3(删除)
INSERT(1, "新增"),
UPDATE(2, "更新"),
DELETE(3, "删除");
private Integer code;
private String name;
OpTypeEnum(Integer code, String name) {
this.code = code;
this.name = name;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@@ -7,8 +7,8 @@ package com.cool.store.enums;
* @注释:
*/
public enum PointListType {
POINT_LIST_TYPE_1(1, "推荐铺位"),
POINT_LIST_TYPE_2(2, "我创建的"),
RECOMMENDED(1, "推荐铺位"),
MY_POINT_LIST(2, "我创建的"),
;
private Integer code;

View File

@@ -1,9 +1,11 @@
package com.cool.store.dao;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dto.UserDTO;
import com.cool.store.dto.openPreparation.UserNameDTO;
import com.cool.store.entity.EnterpriseUserDO;
import com.cool.store.mapper.EnterpriseUserMapper;
import com.cool.store.response.oppty.UserResponse;
import com.cool.store.utils.StringUtil;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
@@ -153,4 +155,7 @@ public class EnterpriseUserDAO {
}
return enterpriseUserMapper.getUserListByRegionId(regionId);
}
public List<UserDTO> getAllUser(String eid, String keyword){
return enterpriseUserMapper.getAllUser(eid,keyword);
}
}

View File

@@ -2,13 +2,12 @@ package com.cool.store.dao;
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dto.MiniShopDTO;
import com.cool.store.dto.PCPointListDTO;
import com.cool.store.dto.point.LineCountDTO;
import com.cool.store.entity.PointInfoDO;
import com.cool.store.mapper.PointInfoMapper;
import com.cool.store.request.AllPointPageRequest;
import com.cool.store.request.MiniPointPageRequest;
import com.cool.store.request.PointPageRequest;
import com.cool.store.request.RecommendPointPageRequest;
import com.cool.store.request.*;
import com.cool.store.utils.StringUtil;
import com.cool.store.vo.point.MiniPointPageVO;
import com.cool.store.vo.point.PointHomePageDataVO;
@@ -18,8 +17,10 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@@ -76,9 +77,9 @@ public class PointInfoDAO {
* @param request
* @return
*/
public Page<PointInfoDO> getMyPointPage(PointPageRequest request) {
public Page<PCPointListDTO> getMyPointPage(String eid,PointPageRequest request) {
PageHelper.startPage(request.getPageNum(), request.getPageSize());
return pointInfoMapper.getMyPointPage(request);
return pointInfoMapper.getMyPointPage(eid,request);
}
public Map<Long, Integer> getSelectedShopNumMap(List<Long> lineIds) {
@@ -96,11 +97,16 @@ public class PointInfoDAO {
return pointInfoMapper.getPointListByIds(pointIds);
}
public Page<PointInfoDO> getRecommendPointList(RecommendPointPageRequest request) {
public Page<PCPointListDTO> getRecommendPointList(RecommendPointPageRequest request) {
PageHelper.startPage(request.getPageNum(), request.getPageSize());
return pointInfoMapper.getRecommendPointList(request);
}
public List<MiniPointPageVO> getRecommendOrMyList(MiniPointRequest request) {
PageHelper.startPage(request.getPageNum(), request.getPageSize());
return pointInfoMapper.getRecommendOrMyList(request);
}
public Integer updateSelectedDevelopmentManager(Long shopId, String developmentManager) {
if(Objects.isNull(shopId) || StringUtils.isBlank(developmentManager)){
return null;
@@ -108,9 +114,9 @@ public class PointInfoDAO {
return pointInfoMapper.updateSelectedDevelopmentManager(shopId, developmentManager);
}
public Page<PointInfoDO> getTeamPointPage(AllPointPageRequest request) {
public Page<PCPointListDTO> getTeamPointPage(String eid,AllPointPageRequest request) {
PageHelper.startPage(request.getPageNum(), request.getPageSize());
return pointInfoMapper.getTeamPointPage(request);
return pointInfoMapper.getTeamPointPage(eid,request);
}
public Integer recyclePoint(Long pointId) {
@@ -120,12 +126,26 @@ public class PointInfoDAO {
return pointInfoMapper.recyclePoint(pointId);
}
public List<MiniPointPageVO> getMiniPointPage(MiniPointPageRequest request ) {
List<MiniPointPageVO> pointInfoDOPage = pointInfoMapper.MiniPointPageVO(request);
public List<MiniPointPageVO> getMiniPointPage(String eid,MiniPointRequest request ) {
List<MiniPointPageVO> pointInfoDOPage = pointInfoMapper.MiniPointPageVO(eid,request);
if(CollectionUtils.isEmpty(pointInfoDOPage)){
return Lists.newArrayList();
}
return pointInfoDOPage ;
}
public List<MiniPointPageVO> getPointByOpportunityPointCode(String code){
if (StringUtils.isBlank(code)){
return new ArrayList<>();
}
return pointInfoMapper.getPointByOpportunityPointCode(code);
}
public List<MiniShopDTO> getShopByOpportunityPointCode(String eid,String code){
if (StringUtils.isBlank(code)){
return new ArrayList<>();
}
return pointInfoMapper.getShopByOpportunityPointCode(eid,code);
}
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.dao;
import com.cool.store.dto.PCPointListDTO;
import com.cool.store.entity.PointAuditRecordDO;
import com.cool.store.entity.PointInfoDO;
import com.cool.store.entity.PointTodoInfoDO;
@@ -53,7 +54,7 @@ public class PointTodoInfoDAO {
return pointTodoInfoMapper.getPointToDoByUserIdAndPointId(userId, pointId);
}
public Page<PointInfoDO> getUserTodoList(PointTodoPageRequest request) {
public Page<PCPointListDTO> getUserTodoList(PointTodoPageRequest request) {
PageHelper.startPage(request.getPageNum(), request.getPageSize());
return pointTodoInfoMapper.getUserTodoList(request);
}

View File

@@ -229,7 +229,13 @@ public class ShopInfoDAO {
}
return shopInfoMapper.selectByLines(lineIds,regionIds);
}
public List<MiniShopsResponse> getShopListAndStatusIsOverByLineId(Long lineId){
return shopInfoMapper.getShopListAndStatusIsOverByLineId(lineId);
public List<MiniShopsResponse> getShopListSuccessOpen(String eid,Long lineId){
return shopInfoMapper.getShopListSuccessOpen(eid,lineId);
}
public String getOpenName(String eid,Long shopId){
if (shopId == null){
return null;
}
return shopInfoMapper.getOpenName(eid,shopId);
}
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.mapper;
import com.cool.store.dto.UserDTO;
import com.cool.store.dto.openPreparation.UserNameDTO;
import com.cool.store.entity.EnterpriseUserDO;
import org.apache.ibatis.annotations.Mapper;
@@ -89,4 +90,5 @@ public interface EnterpriseUserMapper {
*/
List<EnterpriseUserDO> getUserListByRegionId( @Param("regionId") Long regionId);
List<UserDTO> getAllUser(@Param("eid")String id, @Param("keyword") String keyword);
}

View File

@@ -1,11 +1,10 @@
package com.cool.store.mapper;
import com.cool.store.dto.MiniShopDTO;
import com.cool.store.dto.PCPointListDTO;
import com.cool.store.dto.point.LineCountDTO;
import com.cool.store.entity.PointInfoDO;
import com.cool.store.request.AllPointPageRequest;
import com.cool.store.request.MiniPointPageRequest;
import com.cool.store.request.PointPageRequest;
import com.cool.store.request.RecommendPointPageRequest;
import com.cool.store.request.*;
import com.cool.store.vo.point.MiniPointPageVO;
import com.cool.store.vo.point.PointHomePageDataVO;
import com.cool.store.vo.point.PointPageVO;
@@ -30,7 +29,7 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
* @param request
* @return
*/
Page<PointInfoDO> getMyPointPage(@Param("request") PointPageRequest request);
Page<PCPointListDTO> getMyPointPage(@Param("eid") String eid,@Param("request") PointPageRequest request);
/**
* 获取线索选择门店数
@@ -51,7 +50,7 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
* @param request
* @return
*/
Page<PointInfoDO> getRecommendPointList(@Param("request") RecommendPointPageRequest request);
Page<PCPointListDTO> getRecommendPointList(@Param("request") RecommendPointPageRequest request);
/**
* 更新铺位的拓展经理
@@ -66,7 +65,7 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
* @param request
* @return
*/
Page<PointInfoDO> getTeamPointPage(@Param("request") AllPointPageRequest request);
Page<PCPointListDTO> getTeamPointPage(@Param("eid")String eid,@Param("request") AllPointPageRequest request);
/**
* 回收铺位
@@ -96,5 +95,25 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
* @Date: 2025/3/31
* @description:获取铺位部分数据
*/
List<MiniPointPageVO> MiniPointPageVO(@Param("request") MiniPointPageRequest request);
List<MiniPointPageVO> MiniPointPageVO(@Param("enterpriseId") String enterpriseId , @Param("request") MiniPointRequest request);
/**
* @Auther: wangshuo
* @Date: 2025/4/2
* @description:根据机会点code获取铺位信息
*/
List<MiniPointPageVO> getPointByOpportunityPointCode(@Param("code") String code);
/**
* @Auther: wangshuo
* @Date: 2025/4/2
* @description:根据机会点code获取门店信息
*/
List<MiniShopDTO> getShopByOpportunityPointCode(@Param("enterpriseId") String enterpriseId, @Param("code") String code);
/**
* @Auther: wangshuo
* @Date: 2025/4/3
* @description:获取全部可推荐铺位
*/
List<MiniPointPageVO> getRecommendOrMyList(@Param("request") MiniPointRequest request);
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.mapper;
import com.cool.store.dto.PCPointListDTO;
import com.cool.store.entity.PointAuditRecordDO;
import com.cool.store.entity.PointInfoDO;
import com.cool.store.entity.PointTodoInfoDO;
@@ -56,7 +57,7 @@ public interface PointTodoInfoMapper extends Mapper<PointTodoInfoDO> {
* @param request
* @return
*/
Page<PointInfoDO> getUserTodoList(@Param("request") PointTodoPageRequest request);
Page<PCPointListDTO> getUserTodoList(@Param("request") PointTodoPageRequest request);
/**
* 获取当前节点

View File

@@ -123,5 +123,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
List<ShopInfoDO> getShopIdByShopStatus(@Param("shopStatus") Integer shopStatus);
List<MiniShopsResponse> getShopListAndStatusIsOverByLineId(Long lineId);
List<MiniShopsResponse> getShopListSuccessOpen(@Param("eid") String eid,@Param("lineId") Long lineId);
String getOpenName(@Param("eid") String eid,@Param("shopId")Long shopId);
}

View File

@@ -169,4 +169,14 @@
from enterprise_user_${enterpriseId}
where user_region_ids like concat('%', #{regionId}, '%') and active = true
</select>
<select id="getAllUser" resultType="com.cool.store.dto.UserDTO">
select
user_id as userId,
name
from enterprise_user_${eid}
where active = true
<if test="keyword!=null and keyword!=''">
and name like concat('%',#{keyword},'%')
</if>
</select>
</mapper>

View File

@@ -30,7 +30,6 @@
<result column="storage_status" jdbcType="TINYINT" property="storageStatus"/>
<result column="opportunity_point_code" jdbcType="VARCHAR" property="opportunityPointCode"/>
<result column="opportunity_point_name" jdbcType="VARCHAR" property="opportunityPointName"/>
<result column="open_shop_name" jdbcType="VARCHAR" property="openShopName"/>
<result column="province_code" jdbcType="VARCHAR" property="provinceCode"/>
<result column="city_code" jdbcType="VARCHAR" property="cityCode"/>
<result column="district_code" jdbcType="VARCHAR" property="districtCode"/>
@@ -41,7 +40,7 @@
development_manager, operate_user_id,
development_time, point_status, point_score, select_status, submit_audit_count, point_source, deleted,
create_time, update_time,
province, city, district, township, opportunity_point_code, opportunity_point_name,open_shop_name,
province, city, district, township, opportunity_point_code, opportunity_point_name,
province_code, city_code, district_code
</sql>
@@ -56,26 +55,28 @@
from xfsg_point_info
where deleted = 0 and development_manager = #{userId}
</select>
<select id="getMyPointPage" resultMap="BaseResultMap">
<select id="getMyPointPage" resultType="com.cool.store.dto.PCPointListDTO">
select
id,
point_name,
point_code,
address,
region_id,
point_status,
point_score,
point_area,
development_manager,
operate_user_id,
development_time,
select_status,
create_time,
update_time,
open_shop_name,
opportunity_point_code,
opportunity_point_name
from xfsg_point_info
a.id,
a.point_name,
a.point_code,
a.address,
a.region_id,
a.point_status,
a.point_score,
a.point_area,
a.development_manager,
a.operate_user_id,
a.development_time,
a.select_status,
a.create_time,
a.update_time,
a.opportunity_point_code,
a.opportunity_point_name,
c.store_name as openName
from xfsg_point_info a
left join xfsg_shop_info b on a.shop_id = b.id
left join store_${eid} c on b.shop_code = c.store_num
where deleted = 0 and development_manager = #{request.developmentManager}
<if test="request.keyword != null and request.keyword != ''">
and (point_code like concat('%', #{request.keyword}, '%') or point_name like concat('%', #{request.keyword},
@@ -136,7 +137,7 @@
#{pointId}
</foreach>
</select>
<select id="getRecommendPointList" resultType="com.cool.store.entity.PointInfoDO">
<select id="getRecommendPointList" resultType="com.cool.store.dto.PCPointListDTO">
select
<include refid="allColumn"/>
from xfsg_point_info
@@ -159,27 +160,28 @@
shop_id = #{shopId} and select_status = '1' and deleted = 0
</update>
<select id="getTeamPointPage" resultMap="BaseResultMap">
<select id="getTeamPointPage" resultType="com.cool.store.dto.PCPointListDTO">
select
id,
point_name,
point_code,
address,
region_id,
point_status,
point_score,
point_area,
development_manager,
operate_user_id,
development_time,
select_status,
create_time,
update_time,
open_shop_name,
opportunity_point_code,
opportunity_point_name
from
xfsg_point_info
a.id,
a.point_name,
a.point_code,
a.address,
a.region_id,
a.point_status,
a.point_score,
a.point_area,
a.development_manager,
a.operate_user_id,
a.development_time,
a.select_status,
a.create_time,
a.update_time,
a.opportunity_point_code,
a.opportunity_point_name,
c.store_name as openName
from xfsg_point_info a
left join xfsg_shop_info b on a.shop_id = b.id
left join store_${eid} c on b.shop_code = c.store_num
where deleted = 0 and point_status in (4,5,6,7)
<if test="request.keyword != null and request.keyword != ''">
and (point_code like concat('%', #{request.keyword}, '%') or point_name like concat('%', #{request.keyword},
@@ -226,6 +228,31 @@
AND deleted = 0
</select>
<select id="MiniPointPageVO" resultType="com.cool.store.vo.point.MiniPointPageVO">
select a.id as pointId,
a.point_name as pointName,
a.point_code as pointCode,
a.longitude as longitude,
a.latitude as latitude,
a.address as address,
a.create_time as createTime,
a.opportunity_point_code as opportunityPointCode,
a.opportunity_point_name as opportunityPointName,
c.picture_obj as pictureObj,
a.point_area as pointArea,
c.landlord_mobile as landlordMobile,
c.month_rent as monthRent,
d.store_name as openShopName
from xfsg_point_info a
left JOIN xfsg_shop_info b ON a.shop_id = b.id
LEFT JOIN xfsg_point_detail_info c on a.id = c.point_id
left JOIN store_${enterpriseId} d ON b.shop_code = d.store_num
where a.deleted = 0
<if test="request.areaCode!=null and request!=''">
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code =
#{request.areaCode})
</if>
</select>
<select id="getPointByOpportunityPointCode" resultType="com.cool.store.vo.point.MiniPointPageVO">
select a.id as pointId,
a.point_name as pointName,
a.point_code as pointCode,
@@ -240,8 +267,41 @@
c.landlord_mobile as landlordMobile,
c.month_rent as monthRent
from xfsg_point_info a
left join xfsg_point_recommend b on a.id = b.point_id
LEFT JOIN xfsg_point_detail_info c on a.id = c.point_id
where a.opportunity_point_code = #{code}
</select>
<select id="getShopByOpportunityPointCode" resultType="com.cool.store.dto.MiniShopDTO">
select c.store_name as shopName,
c.store_address as address
from xfsg_point_info a
inner join xfsg_shop_info b on a.shop_id = b.id
inner join store_${enterpriseId} c on b.shop_code = c.store_num
where a.opportunity_point_code = #{code}
</select>
<select id="getRecommendOrMyList" resultType="com.cool.store.vo.point.MiniPointPageVO">
select
a.id as pointId,
a.point_name as pointName,
a.point_code as pointCode,
a.longitude as longitude,
a.latitude as latitude,
a.address as address,
a.create_time as createTime,
a.opportunity_point_code as opportunityPointCode,
a.opportunity_point_name as opportunityPointName,
c.picture_obj as pictureObj,
a.point_area as pointArea,
c.landlord_mobile as landlordMobile,
c.month_rent as monthRent
from xfsg_point_info a
LEFT JOIN xfsg_point_detail_info c on a.id = c.point_id
where a.deleted = 0
<if test = "request.type == 1">
and a.point_status in( 4,5)
</if>
<if test="request.type == 2">
and a.line_id = #{request.lineId}
</if>
<if test="request.areaCode!=null and request!=''">
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code =
#{request.areaCode})

View File

@@ -1,207 +1,211 @@
<?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.PointRecommendMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.PointRecommendDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="line_id" jdbcType="BIGINT" property="lineId" />
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
<result column="point_id" jdbcType="BIGINT" property="pointId" />
<result column="development_manager" jdbcType="VARCHAR" property="developmentManager" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="reason" jdbcType="VARCHAR" property="reason" />
<result column="deleted" jdbcType="BIT" property="deleted" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap id="BaseResultMap" type="com.cool.store.entity.PointRecommendDO">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="line_id" jdbcType="BIGINT" property="lineId"/>
<result column="shop_id" jdbcType="BIGINT" property="shopId"/>
<result column="point_id" jdbcType="BIGINT" property="pointId"/>
<result column="development_manager" jdbcType="VARCHAR" property="developmentManager"/>
<result column="status" jdbcType="TINYINT" property="status"/>
<result column="reason" jdbcType="VARCHAR" property="reason"/>
<result column="deleted" jdbcType="BIT" property="deleted"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<sql id="allColumn">
id, line_id,shop_id, point_id, development_manager, status, reason, deleted, create_time, update_time
</sql>
<sql id="allColumn">
id, line_id,shop_id, point_id, development_manager, status, reason, deleted, create_time, update_time
</sql>
<update id="updateShopPointRecommendStatus">
update xfsg_point_recommend set status = #{status} where point_id = #{pointId} and deleted = 0
<if test="excludeStatus != null and excludeStatus.size()>0">
and status not in
<foreach collection="excludeStatus" separator="," open="(" close=")" item="status">
#{status}
</foreach>
</if>
</update>
<update id="updateShopPointRecommendStatus">
update xfsg_point_recommend set status = #{status} where point_id = #{pointId} and deleted = 0
<if test="excludeStatus != null and excludeStatus.size()>0">
and status not in
<foreach collection="excludeStatus" separator="," open="(" close=")" item="status">
#{status}
</foreach>
</if>
</update>
<update id="updateRecommendStatusByStatusAndPointId">
update xfsg_point_recommend set status = #{status} where point_id = #{pointId} and deleted = 0 and status in
<foreach collection="statusList" item="status" index="index" open="(" separator="," close=")">
#{status}
</foreach>
</update>
<update id="updateRecommendStatusByStatusAndPointId">
update xfsg_point_recommend set status = #{status} where point_id = #{pointId} and deleted = 0 and status in
<foreach collection="statusList" item="status" index="index" open="(" separator="," close=")">
#{status}
</foreach>
</update>
<select id="getPushShopNumMap" resultType="com.cool.store.dto.point.LineCountDTO">
select
line_id as lineId,
count(1) as recommendShopNum
from
xfsg_point_recommend
where
deleted = 0 and line_id in
<foreach collection="lineIds" item="lineId" index="index" open="(" separator="," close=")">
#{lineId}
</foreach>
group by line_id
</select>
<select id="getPushShopNumMap" resultType="com.cool.store.dto.point.LineCountDTO">
select
line_id as lineId,
count(1) as recommendShopNum
from
xfsg_point_recommend
where
deleted = 0 and line_id in
<foreach collection="lineIds" item="lineId" index="index" open="(" separator="," close=")">
#{lineId}
</foreach>
group by line_id
</select>
<select id="getShopPushPointNumMap" resultType="com.cool.store.dto.point.ShopCountDTO">
select
shop_id as shopId,
count(1) as recommendShopNum
from
xfsg_point_recommend
where
deleted = 0 and shop_id in
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
#{shopId}
</foreach>
group by shop_id
</select>
<select id="getShopPushPointNumMap" resultType="com.cool.store.dto.point.ShopCountDTO">
select
shop_id as shopId,
count(1) as recommendShopNum
from
xfsg_point_recommend
where
deleted = 0 and shop_id in
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
#{shopId}
</foreach>
group by shop_id
</select>
<select id="getRecommendPointList" resultMap="BaseResultMap">
select
id,
point_id,
line_id,
development_manager,
status,
reason
from
xfsg_point_recommend
where
line_id = #{lineId} and deleted = 0
</select>
<select id="getRecommendPointList" resultMap="BaseResultMap">
select
id,
point_id,
line_id,
development_manager,
status,
reason
from
xfsg_point_recommend
where
line_id = #{lineId} and deleted = 0
</select>
<select id="getShopRecommendPointList" resultMap="BaseResultMap">
select
id,
point_id,
line_id,
development_manager,
status,
reason
from
xfsg_point_recommend
where
shop_id = #{shopId} and deleted = 0
</select>
<select id="getShopRecommendPointList" resultMap="BaseResultMap">
select
id,
point_id,
line_id,
development_manager,
status,
reason
from
xfsg_point_recommend
where
shop_id = #{shopId} and deleted = 0
</select>
<insert id="batchInsert">
<foreach collection="recommendList" item="item" index="index" separator=";">
insert into xfsg_point_recommend (shop_id, point_id, development_manager, status)
values (#{item.shopId}, #{item.pointId}, #{item.developmentManager}, #{item.status})
</foreach>
</insert>
<insert id="batchInsert">
<foreach collection="recommendList" item="item" index="index" separator=";">
insert into xfsg_point_recommend (shop_id, point_id, development_manager, status)
values (#{item.shopId}, #{item.pointId}, #{item.developmentManager}, #{item.status})
</foreach>
</insert>
<update id="turnLineUpdateRecommendStatus">
update
xfsg_point_recommend
set
deleted = if(status = 1, 1, deleted),
development_manager = if(status in (2,4), #{developmentManager}, development_manager)
where
shop_id = #{shopId}
</update>
<update id="turnLineUpdateRecommendStatus">
update
xfsg_point_recommend
set
deleted = if(status = 1, 1, deleted),
development_manager = if(status in (2,4), #{developmentManager}, development_manager)
where
shop_id = #{shopId}
</update>
<select id="getLineRecommendPointPage" resultType="com.cool.store.dto.point.MiniPointPageDTO">
select
p.id as pointId,
pr.line_id as lineId,
p.point_name as pointName,
p.point_code as pointCode,
p.region_id as regionId,
p.longitude as longitude,
p.latitude as latitude,
p.address as address,
p.point_score as pointScore,
p.point_area as pointArea,
p.point_status as pointStatus,
p.select_status as selectStatus,
p.create_time as createTime,
p.opportunity_point_code as opportunityPointCode,
p.opportunity_point_name as opportunityPointName,
c.picture_obj as pictureObj,
pr.status as recommendStatus
from
xfsg_point_recommend pr
<select id="getLineRecommendPointPage" resultType="com.cool.store.dto.point.MiniPointPageDTO">
select
p.id as pointId,
pr.line_id as lineId,
p.point_name as pointName,
p.point_code as pointCode,
p.region_id as regionId,
p.longitude as longitude,
p.latitude as latitude,
p.address as address,
p.point_score as pointScore,
p.point_area as pointArea,
p.point_status as pointStatus,
p.select_status as selectStatus,
p.create_time as createTime,
p.opportunity_point_code as opportunityPointCode,
p.opportunity_point_name as opportunityPointName,
c.picture_obj as pictureObj,
pr.status as recommendStatus,
e.store_name as shopName
from
xfsg_point_recommend pr
inner join xfsg_point_info p on p.id = pr.point_id
left join xfsg_point_detail_info c on p.id = c.point_id
where
p.deleted = 0 and pr.shop_id = #{request.shopId} and pr.deleted = 0
<if test="request.status != null and request.status == 1">
and pr.status = 1 and p.select_status = 0
</if>
<if test="request.status != null and request.status == 2">
and pr.status = 2 and p.select_status = 1 and p.shop_id = #{request.shopId}
</if>
<if test="request.status != null and request.status == 3">
and pr.status in (5, 6)
</if>
<if test="request.areaCode!=null and request.areaCode !=''">
and (p.province_code = #{request.areaCode} or p.city_code = #{request.areaCode} or p.district_code = #{request.areaCode})
</if>
left JOIN xfsg_shop_info d ON c.shop_id = d.id
left JOIN store_${enterpriseId} e ON d.shop_code = e.store_num
where
p.deleted = 0 and pr.shop_id = #{request.shopId} and pr.deleted = 0
<if test="request.status != null and request.status == 1">
and pr.status = 1 and p.select_status = 0
</if>
<if test="request.status != null and request.status == 2">
and pr.status = 2 and p.select_status = 1 and p.shop_id = #{request.shopId}
</if>
<if test="request.status != null and request.status == 3">
and pr.status in (5, 6)
</if>
<if test="request.areaCode!=null and request.areaCode !=''">
and (p.province_code = #{request.areaCode} or p.city_code = #{request.areaCode} or p.district_code =
#{request.areaCode})
</if>
</select>
</select>
<update id="updateStatusByPointIdAndLineId">
update
xfsg_point_recommend
set
status = if(shop_id = #{shopId}, 2, 3)
where point_id = #{pointId} and deleted = 0 and status = 1
</update>
<update id="updateStatusByPointIdAndLineId">
update
xfsg_point_recommend
set
status = if(shop_id = #{shopId}, 2, 3)
where point_id = #{pointId} and deleted = 0 and status = 1
</update>
<update id="rejectPoint">
update
xfsg_point_recommend
set
status = 5,
reason = #{reason}
where point_id = #{pointId} and shop_id = #{shopId} and deleted = 0 and status = 1
</update>
<select id="getRecommendPointListByPointId" resultMap="BaseResultMap">
select
<include refid="allColumn"/>
from
xfsg_point_recommend
where
point_id = #{pointId} and deleted = 0
</select>
<update id="rejectPoint">
update
xfsg_point_recommend
set
status = 5,
reason = #{reason}
where point_id = #{pointId} and shop_id = #{shopId} and deleted = 0 and status = 1
</update>
<select id="getAllRecommendPointList" resultMap="BaseResultMap">
select
<include refid="allColumn"/>
from
xfsg_point_recommend
<where>
and (shop_id = 0 or shop_id is null)
<if test="lineId!=null">
and line_id = #{lineId}
</if>
</where>
</select>
<select id="getRecommendPointListByPointId" resultMap="BaseResultMap">
select
<include refid="allColumn"/>
from
xfsg_point_recommend
where
point_id = #{pointId} and deleted = 0
</select>
<select id="getAllRecommendPointList" resultMap="BaseResultMap">
select
<include refid="allColumn"/>
from
xfsg_point_recommend
<where>
and (shop_id = 0 or shop_id is null)
<if test="lineId!=null">
and line_id = #{lineId}
</if>
</where>
</select>
<update id="batchUpdateShopId">
update xfsg_point_recommend
set
shop_id = case id
<foreach collection="recommendList" item="item" index="index" >
when #{item.id} then #{item.shopId}
</foreach>
end
where
id in
<foreach collection="recommendList" item="entity" open="(" separator="," close=")">
#{entity.id}
</foreach>
</update>
<update id="batchUpdateShopId">
update xfsg_point_recommend
set
shop_id = case id
<foreach collection="recommendList" item="item" index="index">
when #{item.id} then #{item.shopId}
</foreach>
end
where
id in
<foreach collection="recommendList" item="entity" open="(" separator="," close=")">
#{entity.id}
</foreach>
</update>
</mapper>

View File

@@ -69,7 +69,7 @@
update xfsg_point_todo_info set status = if(handler_user_id = #{handlerUserId}, 1, 2), update_time = now() where point_id = #{pointId} and node_no = #{nodeNo} and cycle_count = #{cycleCount} and deleted = 0
</update>
<select id="getUserTodoList" resultType="com.cool.store.entity.PointInfoDO">
<select id="getUserTodoList" resultType="com.cool.store.dto.PCPointListDTO">
select
b.id,
b.point_name,

View File

@@ -412,10 +412,18 @@
from xfsg_shop_info
where shop_status = #{shopStatus}
</select>
<select id="getShopListAndStatusIsOverByLineId" resultType="com.cool.store.response.MiniShopsResponse">
select id, shop_name as shopName
from xfsg_shop_info
where line_id = #{lineId} and shop_status = 1
<select id="getShopListSuccessOpen" resultType="com.cool.store.response.MiniShopsResponse">
select a.shop_name as shopName,
a.id as shopId
from xfsg_shop_info a
inner join store_${eid} c on a.shop_code = c.store_num
where a.line_id = #{lineId}
</select>
<select id="getOpenName" resultType="java.lang.String">
select b.store_name
from xfsg_shop_info a
inner join store_${eid} b on a.shop_code = b.store_num
where a.id = #{shopId}
</select>
<update id="batchUpdate" parameterType="list">

View File

@@ -0,0 +1,19 @@
package com.cool.store.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author: WangShuo
* @Date: 2025/04/02/18:20
* @Version 1.0
* @注释:
*/
@Data
public class MiniShopDTO {
@ApiModelProperty("门店名称")
private String shopName;
@ApiModelProperty("地址")
private String address;
}

View File

@@ -0,0 +1,16 @@
package com.cool.store.dto;
import com.cool.store.entity.PointInfoDO;
import lombok.Data;
/**
* @Author: WangShuo
* @Date: 2025/04/03/11:17
* @Version 1.0
* @注释:
*/
@Data
public class PCPointListDTO extends PointInfoDO {
private String openName;
}

View File

@@ -0,0 +1,18 @@
package com.cool.store.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author: WangShuo
* @Date: 2025/04/03/14:40
* @Version 1.0
* @注释:
*/
@Data
public class UserDTO {
@ApiModelProperty(value = "用户id")
private String userId;
@ApiModelProperty(value = "用户名")
private String name;
}

View File

@@ -3,6 +3,8 @@ package com.cool.store.dto.point;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
public class MiniPointPageDTO {
@@ -38,4 +40,13 @@ public class MiniPointPageDTO {
@ApiModelProperty("1.待选择 2.已选择 3.已被他人选择 4.已签约 5.已拒绝 6.已失效")
private Integer recommendStatus;
@ApiModelProperty("机会点编号")
private String opportunityPointCode;
@ApiModelProperty("机会点名称")
private String opportunityPointName;
@ApiModelProperty("成功开店店名称")
private String openShopName;
}

View File

@@ -161,9 +161,6 @@ public class PointInfoDO {
@Column(name = "opportunity_point_name")
private String opportunityPointName;
@Column(name = "open_shop_name")
private String openShopName;
@Column(name = "province_code")
private String provinceCode;

View File

@@ -227,6 +227,24 @@ public class AddPointDetailRequest {
@ApiModelProperty("人流测算 1.>400人/时以上, 2.300400人/时, 3.200300人/时, 4.100200人/时")
private Integer flowRateCalculate;
@ApiModelProperty("机会点编号")
private String opportunityPointCode;
@ApiModelProperty("机会点名称")
private String opportunityPointName;
@ApiModelProperty("省编码")
private String provinceCode;
@ApiModelProperty("市编码")
private String cityCode;
@ApiModelProperty("区/县编码")
private String districtCode;
@ApiModelProperty("铺位经纬度geohash")
@NotBlank(message = "铺位经纬度geohash不能为空")
private String location;
public static PointDetailInfoDO convertDO(AddPointDetailRequest request) {
PointDetailInfoDO result = new PointDetailInfoDO();
@@ -280,6 +298,11 @@ public class AddPointDetailRequest {
public static PointInfoDO convertPointDO(AddPointDetailRequest request) {
PointInfoDO result = new PointInfoDO();
result.setOpportunityPointName(request.getOpportunityPointName());
result.setOpportunityPointCode(request.getOpportunityPointCode());
result.setProvinceCode(request.getProvinceCode());
result.setCityCode(request.getCityCode());
result.setDistrictCode(request.getDistrictCode());
result.setPointName(request.getPointName());
result.setRegionId(request.getRegionId());
result.setPointArea(request.getPointArea());

View File

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
@@ -22,6 +23,10 @@ public class AddSignFranchiseRequest {
private String shopName;
private String detailAddress;
@ApiModelProperty("店铺编码")
@NotBlank(message = "shopCode不能为空")
private String shopCode;
/**
* SignTypeEnum
*/

View File

@@ -5,6 +5,7 @@ import com.cool.store.entity.MemberQuestionDO;
import com.cool.store.entity.QualificationsInfoDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import javax.validation.constraints.NotBlank;
@@ -90,6 +91,8 @@ public class JoinIntentionRequest {
private String businessLicense;
@ApiModelProperty("统一社会信用代码")
private String unifiedSocialCreditCode;
@ApiModelProperty("督导")
private String supervisor;
public LineInfoDO toLineInfoDO() {
LineInfoDO lineInfoDO = new LineInfoDO();
@@ -100,6 +103,9 @@ public class JoinIntentionRequest {
lineInfoDO.setSex(String.valueOf(this.sex));
lineInfoDO.setWantShopAreaId(Long.valueOf(this.areaCode));
lineInfoDO.setId(this.lineId);
if (StringUtils.isNotBlank(this.supervisor)) {
lineInfoDO.setInvestmentManager(this.supervisor);
}
return lineInfoDO;
}

View File

@@ -101,6 +101,9 @@ public class MiniAddPointRequest {
@ApiModelProperty("区/县编码")
private String districtCode;
@ApiModelProperty("铺位经纬度geohash")
private String location;
public static PointDetailInfoDO convertDO(MiniAddPointRequest request) {
PointDetailInfoDO result = new PointDetailInfoDO();
result.setBusinessStatus(request.getBusinessStatus());

View File

@@ -25,14 +25,5 @@ public class MiniPointPageRequest extends PageBasicInfo {
@ApiModelProperty(value = "门店线索ID")
private Long shopId;
@ApiModelProperty(value = "1-推荐铺位,2-我创建的")
@NotNull
private Integer type;
private Long lineId;
private String partnerId;
@ApiModelProperty("省市区编码,传最后一级")
private String areaCode;
}

View File

@@ -0,0 +1,27 @@
package com.cool.store.request;
import com.cool.store.common.PageBasicInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @Author: WangShuo
* @Date: 2025/04/03/09:52
* @Version 1.0
* @注释:
*/
@Data
public class MiniPointRequest extends PageBasicInfo {
@ApiModelProperty(value = "1-推荐铺位,2-我创建的")
@NotNull
private Integer type;
private Long lineId;
private String partnerId;
@ApiModelProperty("省市区编码,传最后一级")
private String areaCode;
}

View File

@@ -72,6 +72,11 @@ public class UpdatePointDetailRequest extends AddPointDetailRequest {
public static PointInfoDO convertPointDO(UpdatePointDetailRequest request) {
PointInfoDO result = new PointInfoDO();
result.setOpportunityPointName(request.getOpportunityPointName());
result.setOpportunityPointCode(request.getOpportunityPointCode());
result.setProvinceCode(request.getProvinceCode());
result.setCityCode(request.getCityCode());
result.setDistrictCode(request.getDistrictCode());
result.setId(request.getPointId());
result.setPointName(request.getPointName());
result.setRegionId(request.getRegionId());

View File

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* @Author suzhuhong
@@ -13,8 +14,8 @@ import javax.validation.constraints.NotBlank;
@Data
public class BerthOperationRequest {
@ApiModelProperty(" 操作类型: 1(新增), 2(更新), 3(删除)")
@NotBlank(message = "操作类型不能为空")
private String opType;
@NotNull(message = "操作类型不能为空")
private Integer opType;
@ApiModelProperty("机会点编号")
@NotBlank(message = "机会点编号不能为空")
@@ -33,7 +34,7 @@ public class BerthOperationRequest {
private String userName;
@ApiModelProperty("铺位ID")
@NotBlank(message = "铺位ID不能为空")
@NotNull(message = "铺位ID不能为空")
private Integer berthId;
@ApiModelProperty("铺位名称")

View File

@@ -31,6 +31,6 @@ public class BerthInfoResponse {
* 铺位经纬度
*/
@ApiModelProperty("铺位经纬度")
private String geohash;
private String location;
}

View File

@@ -31,7 +31,7 @@ public class BrandResponse {
* 该品牌门店所在位置
*/
@ApiModelProperty("该品牌门店所在位置")
private String geohash;
private String location;
/**
* 品牌数量
*/

View File

@@ -25,7 +25,7 @@ public class OpportunityDetailResponse {
@ApiModelProperty("机会点地址")
private String address;
@ApiModelProperty("地理坐标 GeoHash 值")
private String geohash;
private String location;
@ApiModelProperty("省编码")
private Integer province;
@ApiModelProperty("市编码")

View File

@@ -46,5 +46,5 @@ public class StoreInfoResponse {
* 门店经纬度
*/
@ApiModelProperty("门店经纬度")
private String geohash;
private String location;
}

View File

@@ -66,6 +66,9 @@ public class MiniPointPageVO {
@ApiModelProperty("纬度")
private String latitude;
@ApiModelProperty("成功开店店名称")
private String openShopName;
public static List<MiniPointPageVO> convertVO(List<MiniPointPageDTO> pointList, Map<Long, String> regionNameMap) {
if(CollectionUtils.isEmpty(pointList)){
return Lists.newArrayList();

View File

@@ -352,7 +352,6 @@ public class PointDetailVO {
result.setCity(pointInfo.getCity());
result.setDistrict(pointInfo.getDistrict());
result.setTownship(pointInfo.getTownship());
result.setOpenShopName(pointInfo.getOpenShopName());
result.setOpportunityPointCode(pointInfo.getOpportunityPointCode());
result.setOpportunityPointName(pointInfo.getOpportunityPointName());
return result;

View File

@@ -1,5 +1,6 @@
package com.cool.store.vo.point;
import com.cool.store.dto.PCPointListDTO;
import com.cool.store.entity.PointInfoDO;
import com.cool.store.enums.point.PointStatusEnum;
import com.google.common.collect.Lists;
@@ -66,12 +67,12 @@ public class PointPageVO {
private String opportunityPointName;
public static List<PointPageVO> convertVO(List<PointInfoDO> pointList, Map<String, String> usernameMap, Map<Long, String> regionNameMap) {
public static List<PointPageVO> convertVO(List<PCPointListDTO> pointList, Map<String, String> usernameMap, Map<Long, String> regionNameMap) {
if(CollectionUtils.isEmpty(pointList)){
return Lists.newArrayList();
}
List<PointPageVO> resultList = new ArrayList<>();
for (PointInfoDO pointInfo : pointList) {
for (PCPointListDTO pointInfo : pointList) {
PointPageVO pointPageVO = new PointPageVO();
pointPageVO.setPointId(pointInfo.getId());
pointPageVO.setPointName(pointInfo.getPointName());
@@ -90,6 +91,7 @@ public class PointPageVO {
pointPageVO.setAddress(pointInfo.getAddress());
pointPageVO.setCreateTime(pointInfo.getCreateTime());
pointPageVO.setUpdateTime(pointInfo.getUpdateTime());
pointPageVO.setOpenShopName(pointInfo.getOpenName());
resultList.add(pointPageVO);
}
return resultList;

View File

@@ -1,5 +1,6 @@
package com.cool.store.vo.point;
import com.cool.store.dto.PCPointListDTO;
import com.cool.store.entity.PointInfoDO;
import com.cool.store.enums.point.PointStatusEnum;
import com.google.common.collect.Lists;
@@ -36,12 +37,12 @@ public class PointToDoVO {
@ApiModelProperty("提交时间")
private Date submitTime;
public static List<PointToDoVO> convertVO(List<PointInfoDO> pointList, Map<Long, String> regionNameMap, Map<Long, Date> submitTimeMap) {
public static List<PointToDoVO> convertVO(List<PCPointListDTO> pointList, Map<Long, String> regionNameMap, Map<Long, Date> submitTimeMap) {
if(CollectionUtils.isEmpty(pointList)){
return Lists.newArrayList();
}
List<PointToDoVO> resultList = new ArrayList<>();
for (PointInfoDO pointInfo : pointList) {
for (PCPointListDTO pointInfo : pointList) {
PointToDoVO pointPageVO = new PointToDoVO();
pointPageVO.setPointId(pointInfo.getId());
pointPageVO.setPointName(pointInfo.getPointName());

View File

@@ -0,0 +1,19 @@
package com.cool.store.service;
import com.cool.store.dto.MiniShopDTO;
import com.cool.store.vo.point.MiniPointPageVO;
import java.util.List;
/**
* @Author: WangShuo
* @Date: 2025/04/02/18:17
* @Version 1.0
* @注释:
*/
public interface OpportunityPointService {
List<MiniPointPageVO> getPointByOpportunityPointCode(String code);
List<MiniShopDTO> getShopByOpportunityPointCode(String code);
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.service;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.request.*;
import com.cool.store.vo.LinePointBaseInfoVO;
import com.cool.store.vo.point.*;
@@ -23,7 +24,7 @@ public interface PointService {
* @param userId
* @return
*/
Long addPointDetailInfo(AddPointDetailRequest shopPointDetailRequest, String userId);
Long addPointDetailInfo(AddPointDetailRequest shopPointDetailRequest, LoginUserInfo user);
/**
@@ -38,7 +39,7 @@ public interface PointService {
* @param shopPointDetailRequest
* @return
*/
Long updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest);
Long updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest,LoginUserInfo user);
/**
* 生成铺位评估报告
@@ -301,4 +302,6 @@ public interface PointService {
* @return
*/
Boolean linePointToShopPoint(Long lineId);
PageInfo<MiniPointPageVO> getRecommendedOrMyPointList(MiniPointRequest request);
}

View File

@@ -105,5 +105,5 @@ public interface ShopService {
Boolean dataHandler(Long shopId);
List<MiniShopsResponse> getShopListAndStatusIsOverByLineId(Long lineId);
List<MiniShopsResponse> getShopListSuccessOpen(Long lineId);
}

View File

@@ -1,8 +1,11 @@
package com.cool.store.service;
import com.cool.store.dto.UserDTO;
import com.cool.store.entity.EnterpriseUserDO;
import com.cool.store.entity.UserAuthMappingDO;
import com.cool.store.enums.UserRoleEnum;
import com.cool.store.response.oppty.UserResponse;
import com.github.pagehelper.PageInfo;
import java.util.List;
import java.util.Map;
@@ -91,4 +94,5 @@ public interface UserAuthMappingService {
*/
EnterpriseUserDO hierarchicalSearch(UserRoleEnum supervision, Long regionId);
PageInfo<UserDTO> getAllUser(String keyword, Integer pageNum, Integer pageSize);
}

View File

@@ -0,0 +1,39 @@
package com.cool.store.service.impl;
import com.cool.store.dao.PointInfoDAO;
import com.cool.store.dto.MiniShopDTO;
import com.cool.store.entity.PointInfoDO;
import com.cool.store.service.OpportunityPointService;
import com.cool.store.vo.point.MiniPointPageVO;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* @Author: WangShuo
* @Date: 2025/04/02/18:17
* @Version 1.0
* @注释:
*/
@Service
public class OpportunityPointServiceImpl implements OpportunityPointService {
@Autowired
private PointInfoDAO pointInfoDAO;
@Value("${mybatis.configuration.variables.enterpriseId}")
private String enterpriseId;
@Override
public List<MiniPointPageVO> getPointByOpportunityPointCode(String code) {
return pointInfoDAO.getPointByOpportunityPointCode(code);
}
@Override
public List<MiniShopDTO> getShopByOpportunityPointCode(String code) {
return pointInfoDAO.getShopByOpportunityPointCode(enterpriseId,code);
}
}

View File

@@ -3,7 +3,9 @@ package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
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.dto.PCPointListDTO;
import com.cool.store.dto.point.AuditNodeDTO;
import com.cool.store.dto.point.MiniPointPageDTO;
import com.cool.store.dto.point.ShopPointDTO;
@@ -12,6 +14,7 @@ import com.cool.store.enums.*;
import com.cool.store.enums.point.*;
import com.cool.store.exception.ServiceException;
import com.cool.store.request.*;
import com.cool.store.request.oppty.BerthOperationRequest;
import com.cool.store.service.*;
import com.cool.store.utils.RedisUtilPool;
import com.cool.store.utils.poi.DateUtils;
@@ -52,6 +55,8 @@ import java.util.stream.Collectors;
@Service
public class PointServiceImpl implements PointService {
@Resource
private ThirdOpportunityService thirdOpportunityService;
@Resource
private ShopInfoDAO shopInfoDAO;
@Resource
@@ -98,7 +103,8 @@ public class PointServiceImpl implements PointService {
@Override
@Transactional(rollbackFor = Exception.class)
public Long addPointDetailInfo(AddPointDetailRequest shopPointDetailRequest, String userId) {
public Long addPointDetailInfo(AddPointDetailRequest shopPointDetailRequest, LoginUserInfo user) {
String userId = user.getUserId();
PointInfoDO pointInfo = AddPointDetailRequest.convertPointDO(shopPointDetailRequest);
pointInfo.setPointCode(generateCode());
pointInfo.setDevelopmentManager(userId);
@@ -107,6 +113,18 @@ public class PointServiceImpl implements PointService {
PointDetailInfoDO shopPoint = AddPointDetailRequest.convertDO(shopPointDetailRequest);
shopPoint.setPointId(pointId);
pointDetailInfoDAO.addPointDetailInfo(shopPoint);
//推送铺位至三方平台
BerthOperationRequest request1 = new BerthOperationRequest();
request1.setOpType(OpTypeEnum.INSERT.getCode());
request1.setCode(shopPointDetailRequest.getOpportunityPointCode());
request1.setUserId(userId);
request1.setMobile(user.getMobile());
request1.setUserName(user.getName());
request1.setBerthId(Math.toIntExact(pointId));
request1.setName(pointInfo.getPointName());
request1.setAddress(pointInfo.getAddress());
request1.setLocation(shopPointDetailRequest.getLocation());
thirdOpportunityService.berthOperation(request1);
return pointId;
}
@@ -122,8 +140,10 @@ public class PointServiceImpl implements PointService {
log.error("铺位详情信息不存在");
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
}
String openName = shopInfoDAO.getOpenName(enterpriseId, pointInfo.getShopId());
String userName = enterpriseUserDAO.getUserName(pointInfo.getDevelopmentManager());
PointDetailVO result = PointDetailVO.convertVO(pointInfo, pointDetailInfo);
result.setOpenShopName(openName);
result.setDevelopmentManagerUserName(userName);
result.setDevelopmentManagerUserId(pointInfo.getDevelopmentManager());
result.setRegionNodeName(regionService.getBelongWarRegionName(pointInfo.getRegionId()));
@@ -140,7 +160,7 @@ public class PointServiceImpl implements PointService {
@Override
@Transactional(rollbackFor = Exception.class)
public Long updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest) {
public Long updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest, LoginUserInfo user) {
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(shopPointDetailRequest.getPointId());
if (Objects.isNull(pointInfo)) {
log.error("铺位基本信息不存在");
@@ -151,6 +171,25 @@ public class PointServiceImpl implements PointService {
shopPointInfo.setPointScore(shopPoint.getTotalPointScore());
pointInfoDAO.perfectPointInfo(shopPointInfo);
pointDetailInfoDAO.updatePartFieldPointDetail(shopPoint);
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(pointInfo.getLineId());
//推送铺位至三方平台
BerthOperationRequest request1 = new BerthOperationRequest();
request1.setCode(shopPointDetailRequest.getOpportunityPointCode());
if (pointInfo.getPointSource().equals(PointSourceEnum.POINT_SOURCE_1.getCode())) {
request1.setUserId(user.getUserId());
request1.setMobile(user.getMobile());
request1.setUserName(user.getName());
} else {
request1.setUserId(lineInfoDO.getPartnerId());
request1.setMobile(lineInfoDO.getMobile());
request1.setUserName(lineInfoDO.getUsername());
}
request1.setOpType(OpTypeEnum.UPDATE.getCode());
request1.setBerthId(Math.toIntExact(shopPointInfo.getId()));
request1.setName(shopPointInfo.getPointName());
request1.setAddress(shopPointInfo.getAddress());
request1.setLocation(shopPointDetailRequest.getLocation());
thirdOpportunityService.berthOperation(request1);
return shopPointDetailRequest.getPointId();
}
@@ -518,7 +557,7 @@ public class PointServiceImpl implements PointService {
}
}
List<PointPageVO> resultList = new ArrayList();
Page<PointInfoDO> pointPage = pointInfoDAO.getMyPointPage(request);
Page<PCPointListDTO> pointPage = pointInfoDAO.getMyPointPage(enterpriseId,request);
if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
List<String> developmentManagers = pointPage.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList());
@@ -547,7 +586,7 @@ public class PointServiceImpl implements PointService {
request.setPointStatus(PointStatusEnum.POINT_STATUS_4.getCode());
}
List<PointPageVO> resultList = new ArrayList();
Page<PointInfoDO> pointPage = pointInfoDAO.getTeamPointPage(request);
Page<PCPointListDTO> pointPage = pointInfoDAO.getTeamPointPage( enterpriseId,request);
if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
List<String> developmentManagers = pointPage.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList());
@@ -602,7 +641,7 @@ public class PointServiceImpl implements PointService {
@Override
public PageInfo<PointPageVO> getRecommendPointList(RecommendPointPageRequest request) {
List<PointPageVO> resultList = new ArrayList();
Page<PointInfoDO> pointPage = pointInfoDAO.getRecommendPointList(request);
Page<PCPointListDTO> pointPage = pointInfoDAO.getRecommendPointList(request);
if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
List<String> developmentManagers = pointPage.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList());
@@ -715,7 +754,7 @@ public class PointServiceImpl implements PointService {
@Override
public PageInfo<PointPageVO> getTodoList(PointTodoPageRequest request) {
Page<PointInfoDO> pointPage = pointTodoInfoDAO.getUserTodoList(request);
Page<PCPointListDTO> pointPage = pointTodoInfoDAO.getUserTodoList(request);
List<PointPageVO> resultList = new ArrayList<>();
if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
@@ -731,32 +770,16 @@ public class PointServiceImpl implements PointService {
@Override
public PageInfo<MiniPointPageVO> getLineRecommendPointPage(MiniPointPageRequest request) {
if (Objects.equals(request.getType(), PointListType.POINT_LIST_TYPE_1.getCode())) {
Page<MiniPointPageDTO> pointPage = pointRecommendDAO.getLineRecommendPointPage(request);
List<MiniPointPageVO> resultList = new ArrayList<>();
if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
List<Long> regionIds = pointPage.getResult().stream().map(MiniPointPageDTO::getRegionId).distinct().collect(Collectors.toList());
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
resultList = MiniPointPageVO.convertVO(pointPage, regionNameMap);
List<Long> pointList = pointPage.getResult().stream().map(MiniPointPageDTO::getPointId).distinct().collect(Collectors.toList());
List<PointDetailInfoDO> pointDetailList = pointDetailInfoDAO.getByPointIdList(pointList);
Map<Long, PointDetailInfoDO> map = pointDetailList.stream().collect(Collectors.toMap(PointDetailInfoDO::getPointId, Function.identity()));
resultList.forEach(x -> {
PointDetailInfoDO pointDetailInfoDO = map.getOrDefault(x.getPointId(),new PointDetailInfoDO());
x.setMonthRent(pointDetailInfoDO.getMonthRent());
x.setLandlordMobile(pointDetailInfoDO.getLandlordMobile());
});
}
PageInfo resultPage = new PageInfo(pointPage);
resultPage.setList(resultList);
return resultPage;
Page<MiniPointPageDTO> pointPage = pointRecommendDAO.getLineRecommendPointPage(request);
List<MiniPointPageVO> resultList = new ArrayList<>();
if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
List<Long> regionIds = pointPage.getResult().stream().map(MiniPointPageDTO::getRegionId).distinct().collect(Collectors.toList());
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
resultList = MiniPointPageVO.convertVO(pointPage, regionNameMap);
}
if (request.getType().equals(PointListType.POINT_LIST_TYPE_2.getCode())){
PageHelper.startPage(request.getPageNum(), request.getPageSize());
List<MiniPointPageVO> miniPointPage = pointInfoDAO.getMiniPointPage(request);
return new PageInfo<>(miniPointPage);
}
return new PageInfo<>();
PageInfo resultPage = new PageInfo(pointPage);
resultPage.setList(resultList);
return resultPage;
}
@Override
@@ -885,6 +908,18 @@ public class PointServiceImpl implements PointService {
updatePoint.setId(pointId);
updatePoint.setShopId(shopInfo.getId());
pointInfoDAO.updatePointInfo(updatePoint);
//推送铺位至三方平台
BerthOperationRequest request1 = new BerthOperationRequest();
request1.setOpType(OpTypeEnum.INSERT.getCode());
request1.setCode(request.getOpportunityPointCode());
request1.setUserId(lineInfo.getPartnerId());
request1.setMobile(lineInfo.getMobile());
request1.setUserName(lineInfo.getUsername());
request1.setBerthId(Math.toIntExact(pointId));
request1.setName(pointInfo.getPointName());
request1.setAddress(pointInfo.getAddress());
request1.setLocation(request.getLocation());
thirdOpportunityService.berthOperation(request1);
HashMap<String, String> map = new HashMap<>();
map.put("partnerUsername", lineInfo.getUsername());
map.put("partnerMobile", lineInfo.getMobile());
@@ -1047,7 +1082,7 @@ public class PointServiceImpl implements PointService {
request.setDevelopmentManager(userId);
request.setPageNum(pageNumber);
request.setPageSize(pageSize);
Page<PointInfoDO> pointPage = pointTodoInfoDAO.getUserTodoList(request);
Page<PCPointListDTO> pointPage = pointTodoInfoDAO.getUserTodoList(request);
List<PointToDoVO> resultList = new ArrayList<>();
if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
@@ -1145,6 +1180,14 @@ public class PointServiceImpl implements PointService {
return Boolean.TRUE;
}
@Override
public PageInfo<MiniPointPageVO> getRecommendedOrMyPointList(MiniPointRequest request) {
PageHelper.startPage(request.getPageNum(), request.getPageSize());
List<MiniPointPageVO> pointPage = pointInfoDAO.getRecommendOrMyList(request);
return new PageInfo<>(pointPage);
}
public List<AuditNodeDTO> dealAuditNode(AuditSettingVO auditSetting, Long regionId, String developmentManager) {
List<String> roleIds = new ArrayList<>();
//审核人

View File

@@ -32,6 +32,7 @@ import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -52,6 +53,8 @@ import static com.cool.store.enums.ErrorCodeEnum.UPDATE_INVESTMENT_MANAGER_FAIL;
@Service
@Slf4j
public class ShopServiceImpl implements ShopService {
@Value("${mybatis.configuration.variables.enterpriseId}")
private String eid;
@Resource
private SysRoleService sysRoleService;
@Resource
@@ -557,8 +560,8 @@ public class ShopServiceImpl implements ShopService {
}
@Override
public List<MiniShopsResponse> getShopListAndStatusIsOverByLineId(Long lineId) {
return shopInfoDAO.getShopListAndStatusIsOverByLineId(lineId);
public List<MiniShopsResponse> getShopListSuccessOpen(Long lineId) {
return shopInfoDAO.getShopListSuccessOpen(eid,lineId);
}

View File

@@ -205,6 +205,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
shopInfoDO.setRegionId(request.getRegionId());
shopInfoDO.setShopName(request.getShopName());
shopInfoDO.setDetailAddress(request.getDetailAddress());
shopInfoDO.setShopCode(request.getShopCode());
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
return new ResponseResult(200000, "提交成功");

View File

@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.RegionAreaConfigDao;
import com.cool.store.dto.UserDTO;
import com.cool.store.entity.*;
import com.cool.store.enums.*;
import com.cool.store.exception.ServiceException;
@@ -15,6 +16,8 @@ import com.cool.store.utils.RedisConstantUtil;
import com.cool.store.utils.RedisUtilPool;
import com.cool.store.utils.poi.constant.Constants;
import com.cool.store.vo.SysRoleVO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;
@@ -41,6 +44,9 @@ import java.util.stream.Collectors;
@Slf4j
public class UserAuthMappingServiceImpl implements UserAuthMappingService {
@Value("${mybatis.configuration.variables.enterpriseId}")
private String eid;
@Resource
private UserAuthMappingMapper userAuthMappingMapper;
@@ -446,6 +452,13 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
return supervisionUser;
}
@Override
public PageInfo<UserDTO> getAllUser(String keyword, Integer pageNum, Integer pageSize) {
PageHelper.startPage(pageNum,pageSize);
List<UserDTO> allUser = enterpriseUserDAO.getAllUser(eid, keyword);
return new PageInfo<>(allUser);
}
private List<String> extractNumbers(String regionPath) {
List<String> regionIds = new ArrayList<>();
Pattern pattern = Pattern.compile("\\d+");

View File

@@ -39,7 +39,7 @@ public class PointController {
@PostMapping("/add")
public ResponseResult<Long> addPointDetailInfo(@RequestBody @Validated AddPointDetailRequest shopPointDetailRequest) {
log.info("新增铺位:{}", JSONObject.toJSONString(shopPointDetailRequest));
return ResponseResult.success(pointService.addPointDetailInfo(shopPointDetailRequest, CurrentUserHolder.getUserId()));
return ResponseResult.success(pointService.addPointDetailInfo(shopPointDetailRequest, CurrentUserHolder.getUser()));
}
@ApiOperation("铺位详情")
@@ -52,7 +52,7 @@ public class PointController {
@ApiOperation("完善铺位")
@PostMapping("/update")
public ResponseResult<Long> updatePointDetailInfo(@RequestBody @Validated UpdatePointDetailRequest shopPointDetailRequest) {
return ResponseResult.success(pointService.updatePointDetailInfo(shopPointDetailRequest));
return ResponseResult.success(pointService.updatePointDetailInfo(shopPointDetailRequest,CurrentUserHolder.getUser()));
}
@ApiOperation("生成评估报告")

View File

@@ -1,14 +1,17 @@
package com.cool.store.controller.webc;
import com.cool.store.dto.UserDTO;
import com.cool.store.request.LinesRequest;
import com.cool.store.request.UpdatePartnerNameRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.LinePayService;
import com.cool.store.service.LineService;
import com.cool.store.service.UserAuthMappingService;
import com.cool.store.vo.IntendProcessTotalVO;
import com.cool.store.vo.LineInfoVO;
import com.cool.store.vo.LineVO;
import com.cool.store.vo.interview.AppointmentTimeVO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -39,7 +42,8 @@ public class LineController {
@Resource
LinePayService linePayService;
@Resource
private UserAuthMappingService userAuthMappingService;
@ApiOperation("查询线索详情")
@GetMapping("/getLineDetail")
@ApiImplicitParams({
@@ -70,7 +74,13 @@ public class LineController {
return ResponseResult.success(lineService.updatePartnerName(request.getUsername(),request.getLineId()));
}
@ApiOperation("查询所有人支持模糊查询")
@GetMapping("/getAllUser")
public ResponseResult<PageInfo<UserDTO>> getAllUser(@RequestParam("keyword")String keyword ,
@RequestParam("pageNum")Integer pageNum,
@RequestParam("pageSize")Integer pageSize ) {
return ResponseResult.success(userAuthMappingService.getAllUser(keyword,pageNum,pageSize));
}
}

View File

@@ -0,0 +1,38 @@
package com.cool.store.controller.webc;
import com.cool.store.dto.MiniShopDTO;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.OpportunityPointService;
import com.cool.store.vo.point.MiniPointPageVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: WangShuo
* @Date: 2025/04/02/18:44
* @Version 1.0
* @注释:
*/
@RestController
@Api(tags = "机会点详情")
@RequestMapping("/mini/opportunityPoint")
public class MiniOpportunityPointController {
@Resource
private OpportunityPointService opportunityPointService;
@GetMapping("/getPoints")
@ApiModelProperty("根据机会点编号获取铺位信息")
public ResponseResult<List<MiniPointPageVO> >getPointByOpportunityPointCode(String code) {
return ResponseResult.success(opportunityPointService.getPointByOpportunityPointCode(code));
}
@GetMapping("/getShops")
@ApiModelProperty("根据机会点编号获取门店信息")
public ResponseResult<List<MiniShopDTO> >getShopByOpportunityPointCode(String code) {
return ResponseResult.success(opportunityPointService.getShopByOpportunityPointCode(code));
}
}

View File

@@ -61,9 +61,6 @@ public class MiniShopController {
@ApiOperation("获取推荐给我的铺位")
@PostMapping("/getLineRecommendPointPage")
public ResponseResult<PageInfo<MiniPointPageVO>> getLineRecommendPointPage(@RequestBody MiniPointPageRequest request) {
PartnerUserInfoVO user = PartnerUserHolder.getUser();
request.setPartnerId(user.getPartnerId());
request.setLineId(user.getLineId());
return ResponseResult.success(pointService.getLineRecommendPointPage(request));
}
@@ -119,7 +116,13 @@ public class MiniShopController {
@ApiOperation("获取状态为完成的门店列表")
@GetMapping("/getStatusOver")
public ResponseResult<List<MiniShopsResponse>> getShopListAndStatusIsOverByLineId(@RequestParam("lineId")Long lineId) {
return ResponseResult.success(shopService.getShopListAndStatusIsOverByLineId(lineId));
return ResponseResult.success(shopService.getShopListSuccessOpen(lineId));
}
@ApiOperation("获取状态为完成的门店列表")
@GetMapping("/getRecommendedOrMyPointList")
public ResponseResult<PageInfo<MiniPointPageVO>> getRecommendedOrMyPointList(@RequestParam("request")MiniPointRequest request) {
request.setLineId(PartnerUserHolder.getUser().getLineId());
return ResponseResult.success(pointService.getRecommendedOrMyPointList( request));
}
}