fix
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.cool.store.dao;
|
|||||||
|
|
||||||
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
|
import com.cool.store.dto.MiniShopDTO;
|
||||||
import com.cool.store.dto.point.LineCountDTO;
|
import com.cool.store.dto.point.LineCountDTO;
|
||||||
import com.cool.store.entity.PointInfoDO;
|
import com.cool.store.entity.PointInfoDO;
|
||||||
import com.cool.store.mapper.PointInfoMapper;
|
import com.cool.store.mapper.PointInfoMapper;
|
||||||
@@ -18,6 +19,7 @@ import com.google.common.collect.Lists;
|
|||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -120,12 +122,26 @@ public class PointInfoDAO {
|
|||||||
return pointInfoMapper.recyclePoint(pointId);
|
return pointInfoMapper.recyclePoint(pointId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<MiniPointPageVO> getMiniPointPage(MiniPointPageRequest request ) {
|
public List<MiniPointPageVO> getMiniPointPage(String eid,MiniPointPageRequest request ) {
|
||||||
List<MiniPointPageVO> pointInfoDOPage = pointInfoMapper.MiniPointPageVO(request);
|
List<MiniPointPageVO> pointInfoDOPage = pointInfoMapper.MiniPointPageVO(eid,request);
|
||||||
if(CollectionUtils.isEmpty(pointInfoDOPage)){
|
if(CollectionUtils.isEmpty(pointInfoDOPage)){
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
|
|
||||||
return pointInfoDOPage ;
|
return pointInfoDOPage ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<MiniPointPageVO> getPointByOpportunityPointCode(String code){
|
||||||
|
if (StringUtils.isBlank(code)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return pointInfoMapper.getPointByOpportunityPointCode(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MiniShopDTO> getShopByOpportunityPointCode(String eid,String code){
|
||||||
|
if (StringUtils.isBlank(code)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return pointInfoMapper.getShopByOpportunityPointCode(eid,code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.mapper;
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.dto.MiniShopDTO;
|
||||||
import com.cool.store.dto.point.LineCountDTO;
|
import com.cool.store.dto.point.LineCountDTO;
|
||||||
import com.cool.store.entity.PointInfoDO;
|
import com.cool.store.entity.PointInfoDO;
|
||||||
import com.cool.store.request.AllPointPageRequest;
|
import com.cool.store.request.AllPointPageRequest;
|
||||||
@@ -96,5 +97,19 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
|
|||||||
* @Date: 2025/3/31
|
* @Date: 2025/3/31
|
||||||
* @description:获取铺位部分数据
|
* @description:获取铺位部分数据
|
||||||
*/
|
*/
|
||||||
List<MiniPointPageVO> MiniPointPageVO(@Param("request") MiniPointPageRequest request);
|
List<MiniPointPageVO> MiniPointPageVO(@Param("enterpriseId") String enterpriseId , @Param("request") MiniPointPageRequest 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);
|
||||||
}
|
}
|
||||||
@@ -238,15 +238,43 @@
|
|||||||
c.picture_obj as pictureObj,
|
c.picture_obj as pictureObj,
|
||||||
a.point_area as pointArea,
|
a.point_area as pointArea,
|
||||||
c.landlord_mobile as landlordMobile,
|
c.landlord_mobile as landlordMobile,
|
||||||
c.month_rent as monthRent
|
c.month_rent as monthRent,
|
||||||
|
d.store_name as openShopName
|
||||||
from xfsg_point_info a
|
from xfsg_point_info a
|
||||||
left join xfsg_point_recommend b on a.id = b.point_id
|
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 xfsg_point_detail_info c on a.id = c.point_id
|
||||||
|
left JOIN store_${enterpriseId} d ON b.shop_code = d.store_num
|
||||||
<if test="request.areaCode!=null and request!=''">
|
<if test="request.areaCode!=null and request!=''">
|
||||||
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code =
|
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code =
|
||||||
#{request.areaCode})
|
#{request.areaCode})
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</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,
|
||||||
|
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.opportunity_point_code = #{code}
|
||||||
|
</select>
|
||||||
|
<select id="getShopByOpportunityPointCode" resultType="com.cool.store.dto.MiniShopDTO">
|
||||||
|
select c.shop_name as shopName,
|
||||||
|
c.store_address as address
|
||||||
|
from xfsg_point_info a
|
||||||
|
inner join xfsg_shop 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>
|
||||||
|
|
||||||
<update id="recyclePoint">
|
<update id="recyclePoint">
|
||||||
update xfsg_point_info set line_id = null, shop_id = null, select_status = 0, update_time = now(), point_status
|
update xfsg_point_info set line_id = null, shop_id = null, select_status = 0, update_time = now(), point_status
|
||||||
|
|||||||
@@ -1,207 +1,211 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!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">
|
<mapper namespace="com.cool.store.mapper.PointRecommendMapper">
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.PointRecommendDO">
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.PointRecommendDO">
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||||
<result column="line_id" jdbcType="BIGINT" property="lineId" />
|
<result column="line_id" jdbcType="BIGINT" property="lineId"/>
|
||||||
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
<result column="shop_id" jdbcType="BIGINT" property="shopId"/>
|
||||||
<result column="point_id" jdbcType="BIGINT" property="pointId" />
|
<result column="point_id" jdbcType="BIGINT" property="pointId"/>
|
||||||
<result column="development_manager" jdbcType="VARCHAR" property="developmentManager" />
|
<result column="development_manager" jdbcType="VARCHAR" property="developmentManager"/>
|
||||||
<result column="status" jdbcType="TINYINT" property="status" />
|
<result column="status" jdbcType="TINYINT" property="status"/>
|
||||||
<result column="reason" jdbcType="VARCHAR" property="reason" />
|
<result column="reason" jdbcType="VARCHAR" property="reason"/>
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="allColumn">
|
<sql id="allColumn">
|
||||||
id, line_id,shop_id, point_id, development_manager, status, reason, deleted, create_time, update_time
|
id, line_id,shop_id, point_id, development_manager, status, reason, deleted, create_time, update_time
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<update id="updateShopPointRecommendStatus">
|
<update id="updateShopPointRecommendStatus">
|
||||||
update xfsg_point_recommend set status = #{status} where point_id = #{pointId} and deleted = 0
|
update xfsg_point_recommend set status = #{status} where point_id = #{pointId} and deleted = 0
|
||||||
<if test="excludeStatus != null and excludeStatus.size()>0">
|
<if test="excludeStatus != null and excludeStatus.size()>0">
|
||||||
and status not in
|
and status not in
|
||||||
<foreach collection="excludeStatus" separator="," open="(" close=")" item="status">
|
<foreach collection="excludeStatus" separator="," open="(" close=")" item="status">
|
||||||
#{status}
|
#{status}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateRecommendStatusByStatusAndPointId">
|
<update id="updateRecommendStatusByStatusAndPointId">
|
||||||
update xfsg_point_recommend set status = #{status} where point_id = #{pointId} and deleted = 0 and status in
|
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=")">
|
<foreach collection="statusList" item="status" index="index" open="(" separator="," close=")">
|
||||||
#{status}
|
#{status}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getPushShopNumMap" resultType="com.cool.store.dto.point.LineCountDTO">
|
<select id="getPushShopNumMap" resultType="com.cool.store.dto.point.LineCountDTO">
|
||||||
select
|
select
|
||||||
line_id as lineId,
|
line_id as lineId,
|
||||||
count(1) as recommendShopNum
|
count(1) as recommendShopNum
|
||||||
from
|
from
|
||||||
xfsg_point_recommend
|
xfsg_point_recommend
|
||||||
where
|
where
|
||||||
deleted = 0 and line_id in
|
deleted = 0 and line_id in
|
||||||
<foreach collection="lineIds" item="lineId" index="index" open="(" separator="," close=")">
|
<foreach collection="lineIds" item="lineId" index="index" open="(" separator="," close=")">
|
||||||
#{lineId}
|
#{lineId}
|
||||||
</foreach>
|
</foreach>
|
||||||
group by line_id
|
group by line_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getShopPushPointNumMap" resultType="com.cool.store.dto.point.ShopCountDTO">
|
<select id="getShopPushPointNumMap" resultType="com.cool.store.dto.point.ShopCountDTO">
|
||||||
select
|
select
|
||||||
shop_id as shopId,
|
shop_id as shopId,
|
||||||
count(1) as recommendShopNum
|
count(1) as recommendShopNum
|
||||||
from
|
from
|
||||||
xfsg_point_recommend
|
xfsg_point_recommend
|
||||||
where
|
where
|
||||||
deleted = 0 and shop_id in
|
deleted = 0 and shop_id in
|
||||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||||
#{shopId}
|
#{shopId}
|
||||||
</foreach>
|
</foreach>
|
||||||
group by shop_id
|
group by shop_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRecommendPointList" resultMap="BaseResultMap">
|
<select id="getRecommendPointList" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
id,
|
id,
|
||||||
point_id,
|
point_id,
|
||||||
line_id,
|
line_id,
|
||||||
development_manager,
|
development_manager,
|
||||||
status,
|
status,
|
||||||
reason
|
reason
|
||||||
from
|
from
|
||||||
xfsg_point_recommend
|
xfsg_point_recommend
|
||||||
where
|
where
|
||||||
line_id = #{lineId} and deleted = 0
|
line_id = #{lineId} and deleted = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="getShopRecommendPointList" resultMap="BaseResultMap">
|
<select id="getShopRecommendPointList" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
id,
|
id,
|
||||||
point_id,
|
point_id,
|
||||||
line_id,
|
line_id,
|
||||||
development_manager,
|
development_manager,
|
||||||
status,
|
status,
|
||||||
reason
|
reason
|
||||||
from
|
from
|
||||||
xfsg_point_recommend
|
xfsg_point_recommend
|
||||||
where
|
where
|
||||||
shop_id = #{shopId} and deleted = 0
|
shop_id = #{shopId} and deleted = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="batchInsert">
|
<insert id="batchInsert">
|
||||||
<foreach collection="recommendList" item="item" index="index" separator=";">
|
<foreach collection="recommendList" item="item" index="index" separator=";">
|
||||||
insert into xfsg_point_recommend (shop_id, point_id, development_manager, status)
|
insert into xfsg_point_recommend (shop_id, point_id, development_manager, status)
|
||||||
values (#{item.shopId}, #{item.pointId}, #{item.developmentManager}, #{item.status})
|
values (#{item.shopId}, #{item.pointId}, #{item.developmentManager}, #{item.status})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="turnLineUpdateRecommendStatus">
|
<update id="turnLineUpdateRecommendStatus">
|
||||||
update
|
update
|
||||||
xfsg_point_recommend
|
xfsg_point_recommend
|
||||||
set
|
set
|
||||||
deleted = if(status = 1, 1, deleted),
|
deleted = if(status = 1, 1, deleted),
|
||||||
development_manager = if(status in (2,4), #{developmentManager}, development_manager)
|
development_manager = if(status in (2,4), #{developmentManager}, development_manager)
|
||||||
where
|
where
|
||||||
shop_id = #{shopId}
|
shop_id = #{shopId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getLineRecommendPointPage" resultType="com.cool.store.dto.point.MiniPointPageDTO">
|
<select id="getLineRecommendPointPage" resultType="com.cool.store.dto.point.MiniPointPageDTO">
|
||||||
select
|
select
|
||||||
p.id as pointId,
|
p.id as pointId,
|
||||||
pr.line_id as lineId,
|
pr.line_id as lineId,
|
||||||
p.point_name as pointName,
|
p.point_name as pointName,
|
||||||
p.point_code as pointCode,
|
p.point_code as pointCode,
|
||||||
p.region_id as regionId,
|
p.region_id as regionId,
|
||||||
p.longitude as longitude,
|
p.longitude as longitude,
|
||||||
p.latitude as latitude,
|
p.latitude as latitude,
|
||||||
p.address as address,
|
p.address as address,
|
||||||
p.point_score as pointScore,
|
p.point_score as pointScore,
|
||||||
p.point_area as pointArea,
|
p.point_area as pointArea,
|
||||||
p.point_status as pointStatus,
|
p.point_status as pointStatus,
|
||||||
p.select_status as selectStatus,
|
p.select_status as selectStatus,
|
||||||
p.create_time as createTime,
|
p.create_time as createTime,
|
||||||
p.opportunity_point_code as opportunityPointCode,
|
p.opportunity_point_code as opportunityPointCode,
|
||||||
p.opportunity_point_name as opportunityPointName,
|
p.opportunity_point_name as opportunityPointName,
|
||||||
c.picture_obj as pictureObj,
|
c.picture_obj as pictureObj,
|
||||||
pr.status as recommendStatus
|
pr.status as recommendStatus,
|
||||||
from
|
e.store_name as shopName
|
||||||
xfsg_point_recommend pr
|
from
|
||||||
|
xfsg_point_recommend pr
|
||||||
inner join xfsg_point_info p on p.id = pr.point_id
|
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
|
left join xfsg_point_detail_info c on p.id = c.point_id
|
||||||
where
|
left JOIN xfsg_shop_info d ON c.shop_id = d.id
|
||||||
p.deleted = 0 and pr.shop_id = #{request.shopId} and pr.deleted = 0
|
left JOIN store_${enterpriseId} e ON d.shop_code = e.store_num
|
||||||
<if test="request.status != null and request.status == 1">
|
where
|
||||||
and pr.status = 1 and p.select_status = 0
|
p.deleted = 0 and pr.shop_id = #{request.shopId} and pr.deleted = 0
|
||||||
</if>
|
<if test="request.status != null and request.status == 1">
|
||||||
<if test="request.status != null and request.status == 2">
|
and pr.status = 1 and p.select_status = 0
|
||||||
and pr.status = 2 and p.select_status = 1 and p.shop_id = #{request.shopId}
|
</if>
|
||||||
</if>
|
<if test="request.status != null and request.status == 2">
|
||||||
<if test="request.status != null and request.status == 3">
|
and pr.status = 2 and p.select_status = 1 and p.shop_id = #{request.shopId}
|
||||||
and pr.status in (5, 6)
|
</if>
|
||||||
</if>
|
<if test="request.status != null and request.status == 3">
|
||||||
<if test="request.areaCode!=null and request.areaCode !=''">
|
and pr.status in (5, 6)
|
||||||
and (p.province_code = #{request.areaCode} or p.city_code = #{request.areaCode} or p.district_code = #{request.areaCode})
|
</if>
|
||||||
</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 id="updateStatusByPointIdAndLineId">
|
||||||
update
|
update
|
||||||
xfsg_point_recommend
|
xfsg_point_recommend
|
||||||
set
|
set
|
||||||
status = if(shop_id = #{shopId}, 2, 3)
|
status = if(shop_id = #{shopId}, 2, 3)
|
||||||
where point_id = #{pointId} and deleted = 0 and status = 1
|
where point_id = #{pointId} and deleted = 0 and status = 1
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="rejectPoint">
|
<update id="rejectPoint">
|
||||||
update
|
update
|
||||||
xfsg_point_recommend
|
xfsg_point_recommend
|
||||||
set
|
set
|
||||||
status = 5,
|
status = 5,
|
||||||
reason = #{reason}
|
reason = #{reason}
|
||||||
where point_id = #{pointId} and shop_id = #{shopId} and deleted = 0 and status = 1
|
where point_id = #{pointId} and shop_id = #{shopId} and deleted = 0 and status = 1
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<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 id="getRecommendPointListByPointId" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
<include refid="allColumn"/>
|
<include refid="allColumn"/>
|
||||||
from
|
from
|
||||||
xfsg_point_recommend
|
xfsg_point_recommend
|
||||||
<where>
|
where
|
||||||
and (shop_id = 0 or shop_id is null)
|
point_id = #{pointId} and deleted = 0
|
||||||
<if test="lineId!=null">
|
</select>
|
||||||
and line_id = #{lineId}
|
|
||||||
</if>
|
<select id="getAllRecommendPointList" resultMap="BaseResultMap">
|
||||||
</where>
|
select
|
||||||
</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 id="batchUpdateShopId">
|
||||||
update xfsg_point_recommend
|
update xfsg_point_recommend
|
||||||
set
|
set
|
||||||
shop_id = case id
|
shop_id = case id
|
||||||
<foreach collection="recommendList" item="item" index="index" >
|
<foreach collection="recommendList" item="item" index="index">
|
||||||
when #{item.id} then #{item.shopId}
|
when #{item.id} then #{item.shopId}
|
||||||
</foreach>
|
</foreach>
|
||||||
end
|
end
|
||||||
where
|
where
|
||||||
id in
|
id in
|
||||||
<foreach collection="recommendList" item="entity" open="(" separator="," close=")">
|
<foreach collection="recommendList" item="entity" open="(" separator="," close=")">
|
||||||
#{entity.id}
|
#{entity.id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -3,6 +3,8 @@ package com.cool.store.dto.point;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class MiniPointPageDTO {
|
public class MiniPointPageDTO {
|
||||||
|
|
||||||
@@ -38,4 +40,13 @@ public class MiniPointPageDTO {
|
|||||||
|
|
||||||
@ApiModelProperty("1.待选择 2.已选择 3.已被他人选择 4.已签约 5.已拒绝 6.已失效")
|
@ApiModelProperty("1.待选择 2.已选择 3.已被他人选择 4.已签约 5.已拒绝 6.已失效")
|
||||||
private Integer recommendStatus;
|
private Integer recommendStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("机会点编号")
|
||||||
|
private String opportunityPointCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("机会点名称")
|
||||||
|
private String opportunityPointName;
|
||||||
|
|
||||||
|
@ApiModelProperty("成功开店店名称")
|
||||||
|
private String openShopName;
|
||||||
}
|
}
|
||||||
@@ -227,6 +227,24 @@ public class AddPointDetailRequest {
|
|||||||
@ApiModelProperty("人流测算 1.>400人/时以上, 2.300~400人/时, 3.200~300人/时, 4.100~200人/时")
|
@ApiModelProperty("人流测算 1.>400人/时以上, 2.300~400人/时, 3.200~300人/时, 4.100~200人/时")
|
||||||
private Integer flowRateCalculate;
|
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) {
|
public static PointDetailInfoDO convertDO(AddPointDetailRequest request) {
|
||||||
PointDetailInfoDO result = new PointDetailInfoDO();
|
PointDetailInfoDO result = new PointDetailInfoDO();
|
||||||
@@ -280,6 +298,11 @@ public class AddPointDetailRequest {
|
|||||||
|
|
||||||
public static PointInfoDO convertPointDO(AddPointDetailRequest request) {
|
public static PointInfoDO convertPointDO(AddPointDetailRequest request) {
|
||||||
PointInfoDO result = new PointInfoDO();
|
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.setPointName(request.getPointName());
|
||||||
result.setRegionId(request.getRegionId());
|
result.setRegionId(request.getRegionId());
|
||||||
result.setPointArea(request.getPointArea());
|
result.setPointArea(request.getPointArea());
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -22,6 +23,10 @@ public class AddSignFranchiseRequest {
|
|||||||
private String shopName;
|
private String shopName;
|
||||||
|
|
||||||
private String detailAddress;
|
private String detailAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty("店铺编码")
|
||||||
|
@NotBlank(message = "shopCode不能为空")
|
||||||
|
private String shopCode;
|
||||||
/**
|
/**
|
||||||
* SignTypeEnum
|
* SignTypeEnum
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.cool.store.entity.MemberQuestionDO;
|
|||||||
import com.cool.store.entity.QualificationsInfoDO;
|
import com.cool.store.entity.QualificationsInfoDO;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
@@ -90,6 +91,8 @@ public class JoinIntentionRequest {
|
|||||||
private String businessLicense;
|
private String businessLicense;
|
||||||
@ApiModelProperty("统一社会信用代码")
|
@ApiModelProperty("统一社会信用代码")
|
||||||
private String unifiedSocialCreditCode;
|
private String unifiedSocialCreditCode;
|
||||||
|
@ApiModelProperty("督导")
|
||||||
|
private String supervisor;
|
||||||
|
|
||||||
public LineInfoDO toLineInfoDO() {
|
public LineInfoDO toLineInfoDO() {
|
||||||
LineInfoDO lineInfoDO = new LineInfoDO();
|
LineInfoDO lineInfoDO = new LineInfoDO();
|
||||||
@@ -100,6 +103,9 @@ public class JoinIntentionRequest {
|
|||||||
lineInfoDO.setSex(String.valueOf(this.sex));
|
lineInfoDO.setSex(String.valueOf(this.sex));
|
||||||
lineInfoDO.setWantShopAreaId(Long.valueOf(this.areaCode));
|
lineInfoDO.setWantShopAreaId(Long.valueOf(this.areaCode));
|
||||||
lineInfoDO.setId(this.lineId);
|
lineInfoDO.setId(this.lineId);
|
||||||
|
if (StringUtils.isNotBlank(this.supervisor)) {
|
||||||
|
lineInfoDO.setInvestmentManager(this.supervisor);
|
||||||
|
}
|
||||||
return lineInfoDO;
|
return lineInfoDO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,6 +101,9 @@ public class MiniAddPointRequest {
|
|||||||
@ApiModelProperty("区/县编码")
|
@ApiModelProperty("区/县编码")
|
||||||
private String districtCode;
|
private String districtCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("铺位经纬度geohash")
|
||||||
|
private String location;
|
||||||
|
|
||||||
public static PointDetailInfoDO convertDO(MiniAddPointRequest request) {
|
public static PointDetailInfoDO convertDO(MiniAddPointRequest request) {
|
||||||
PointDetailInfoDO result = new PointDetailInfoDO();
|
PointDetailInfoDO result = new PointDetailInfoDO();
|
||||||
result.setBusinessStatus(request.getBusinessStatus());
|
result.setBusinessStatus(request.getBusinessStatus());
|
||||||
|
|||||||
@@ -72,6 +72,11 @@ public class UpdatePointDetailRequest extends AddPointDetailRequest {
|
|||||||
|
|
||||||
public static PointInfoDO convertPointDO(UpdatePointDetailRequest request) {
|
public static PointInfoDO convertPointDO(UpdatePointDetailRequest request) {
|
||||||
PointInfoDO result = new PointInfoDO();
|
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.setId(request.getPointId());
|
||||||
result.setPointName(request.getPointName());
|
result.setPointName(request.getPointName());
|
||||||
result.setRegionId(request.getRegionId());
|
result.setRegionId(request.getRegionId());
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
@@ -13,8 +14,8 @@ import javax.validation.constraints.NotBlank;
|
|||||||
@Data
|
@Data
|
||||||
public class BerthOperationRequest {
|
public class BerthOperationRequest {
|
||||||
@ApiModelProperty(" 操作类型: 1(新增), 2(更新), 3(删除)")
|
@ApiModelProperty(" 操作类型: 1(新增), 2(更新), 3(删除)")
|
||||||
@NotBlank(message = "操作类型不能为空")
|
@NotNull(message = "操作类型不能为空")
|
||||||
private String opType;
|
private Integer opType;
|
||||||
|
|
||||||
@ApiModelProperty("机会点编号")
|
@ApiModelProperty("机会点编号")
|
||||||
@NotBlank(message = "机会点编号不能为空")
|
@NotBlank(message = "机会点编号不能为空")
|
||||||
@@ -33,7 +34,7 @@ public class BerthOperationRequest {
|
|||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
@ApiModelProperty("铺位ID")
|
@ApiModelProperty("铺位ID")
|
||||||
@NotBlank(message = "铺位ID不能为空")
|
@NotNull(message = "铺位ID不能为空")
|
||||||
private Integer berthId;
|
private Integer berthId;
|
||||||
|
|
||||||
@ApiModelProperty("铺位名称")
|
@ApiModelProperty("铺位名称")
|
||||||
|
|||||||
@@ -66,6 +66,9 @@ public class MiniPointPageVO {
|
|||||||
@ApiModelProperty("纬度")
|
@ApiModelProperty("纬度")
|
||||||
private String latitude;
|
private String latitude;
|
||||||
|
|
||||||
|
@ApiModelProperty("成功开店店名称")
|
||||||
|
private String openShopName;
|
||||||
|
|
||||||
public static List<MiniPointPageVO> convertVO(List<MiniPointPageDTO> pointList, Map<Long, String> regionNameMap) {
|
public static List<MiniPointPageVO> convertVO(List<MiniPointPageDTO> pointList, Map<Long, String> regionNameMap) {
|
||||||
if(CollectionUtils.isEmpty(pointList)){
|
if(CollectionUtils.isEmpty(pointList)){
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.vo.LinePointBaseInfoVO;
|
import com.cool.store.vo.LinePointBaseInfoVO;
|
||||||
import com.cool.store.vo.point.*;
|
import com.cool.store.vo.point.*;
|
||||||
@@ -23,7 +24,7 @@ public interface PointService {
|
|||||||
* @param userId
|
* @param userId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Long addPointDetailInfo(AddPointDetailRequest shopPointDetailRequest, String userId);
|
Long addPointDetailInfo(AddPointDetailRequest shopPointDetailRequest, LoginUserInfo user);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,7 +39,7 @@ public interface PointService {
|
|||||||
* @param shopPointDetailRequest
|
* @param shopPointDetailRequest
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Long updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest);
|
Long updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest,LoginUserInfo user);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成铺位评估报告
|
* 生成铺位评估报告
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ package com.cool.store.service.impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.point.AuditNodeDTO;
|
import com.cool.store.dto.point.AuditNodeDTO;
|
||||||
import com.cool.store.dto.point.MiniPointPageDTO;
|
import com.cool.store.dto.point.MiniPointPageDTO;
|
||||||
@@ -12,6 +13,7 @@ import com.cool.store.enums.*;
|
|||||||
import com.cool.store.enums.point.*;
|
import com.cool.store.enums.point.*;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
|
import com.cool.store.request.oppty.BerthOperationRequest;
|
||||||
import com.cool.store.service.*;
|
import com.cool.store.service.*;
|
||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
@@ -52,6 +54,8 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
public class PointServiceImpl implements PointService {
|
public class PointServiceImpl implements PointService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ThirdOpportunityService thirdOpportunityService;
|
||||||
@Resource
|
@Resource
|
||||||
private ShopInfoDAO shopInfoDAO;
|
private ShopInfoDAO shopInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
@@ -98,7 +102,8 @@ public class PointServiceImpl implements PointService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@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);
|
PointInfoDO pointInfo = AddPointDetailRequest.convertPointDO(shopPointDetailRequest);
|
||||||
pointInfo.setPointCode(generateCode());
|
pointInfo.setPointCode(generateCode());
|
||||||
pointInfo.setDevelopmentManager(userId);
|
pointInfo.setDevelopmentManager(userId);
|
||||||
@@ -107,6 +112,18 @@ public class PointServiceImpl implements PointService {
|
|||||||
PointDetailInfoDO shopPoint = AddPointDetailRequest.convertDO(shopPointDetailRequest);
|
PointDetailInfoDO shopPoint = AddPointDetailRequest.convertDO(shopPointDetailRequest);
|
||||||
shopPoint.setPointId(pointId);
|
shopPoint.setPointId(pointId);
|
||||||
pointDetailInfoDAO.addPointDetailInfo(shopPoint);
|
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;
|
return pointId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,7 +157,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Long updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest) {
|
public Long updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest, LoginUserInfo user) {
|
||||||
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(shopPointDetailRequest.getPointId());
|
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(shopPointDetailRequest.getPointId());
|
||||||
if (Objects.isNull(pointInfo)) {
|
if (Objects.isNull(pointInfo)) {
|
||||||
log.error("铺位基本信息不存在");
|
log.error("铺位基本信息不存在");
|
||||||
@@ -151,6 +168,25 @@ public class PointServiceImpl implements PointService {
|
|||||||
shopPointInfo.setPointScore(shopPoint.getTotalPointScore());
|
shopPointInfo.setPointScore(shopPoint.getTotalPointScore());
|
||||||
pointInfoDAO.perfectPointInfo(shopPointInfo);
|
pointInfoDAO.perfectPointInfo(shopPointInfo);
|
||||||
pointDetailInfoDAO.updatePartFieldPointDetail(shopPoint);
|
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();
|
return shopPointDetailRequest.getPointId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -731,6 +767,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<MiniPointPageVO> getLineRecommendPointPage(MiniPointPageRequest request) {
|
public PageInfo<MiniPointPageVO> getLineRecommendPointPage(MiniPointPageRequest request) {
|
||||||
|
//todo
|
||||||
if (Objects.equals(request.getType(), PointListType.POINT_LIST_TYPE_1.getCode())) {
|
if (Objects.equals(request.getType(), PointListType.POINT_LIST_TYPE_1.getCode())) {
|
||||||
Page<MiniPointPageDTO> pointPage = pointRecommendDAO.getLineRecommendPointPage(request);
|
Page<MiniPointPageDTO> pointPage = pointRecommendDAO.getLineRecommendPointPage(request);
|
||||||
List<MiniPointPageVO> resultList = new ArrayList<>();
|
List<MiniPointPageVO> resultList = new ArrayList<>();
|
||||||
@@ -742,7 +779,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
List<PointDetailInfoDO> pointDetailList = pointDetailInfoDAO.getByPointIdList(pointList);
|
List<PointDetailInfoDO> pointDetailList = pointDetailInfoDAO.getByPointIdList(pointList);
|
||||||
Map<Long, PointDetailInfoDO> map = pointDetailList.stream().collect(Collectors.toMap(PointDetailInfoDO::getPointId, Function.identity()));
|
Map<Long, PointDetailInfoDO> map = pointDetailList.stream().collect(Collectors.toMap(PointDetailInfoDO::getPointId, Function.identity()));
|
||||||
resultList.forEach(x -> {
|
resultList.forEach(x -> {
|
||||||
PointDetailInfoDO pointDetailInfoDO = map.getOrDefault(x.getPointId(),new PointDetailInfoDO());
|
PointDetailInfoDO pointDetailInfoDO = map.getOrDefault(x.getPointId(), new PointDetailInfoDO());
|
||||||
x.setMonthRent(pointDetailInfoDO.getMonthRent());
|
x.setMonthRent(pointDetailInfoDO.getMonthRent());
|
||||||
x.setLandlordMobile(pointDetailInfoDO.getLandlordMobile());
|
x.setLandlordMobile(pointDetailInfoDO.getLandlordMobile());
|
||||||
});
|
});
|
||||||
@@ -751,9 +788,9 @@ public class PointServiceImpl implements PointService {
|
|||||||
resultPage.setList(resultList);
|
resultPage.setList(resultList);
|
||||||
return resultPage;
|
return resultPage;
|
||||||
}
|
}
|
||||||
if (request.getType().equals(PointListType.POINT_LIST_TYPE_2.getCode())){
|
if (request.getType().equals(PointListType.POINT_LIST_TYPE_2.getCode())) {
|
||||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||||
List<MiniPointPageVO> miniPointPage = pointInfoDAO.getMiniPointPage(request);
|
List<MiniPointPageVO> miniPointPage = pointInfoDAO.getMiniPointPage(enterpriseId,request);
|
||||||
return new PageInfo<>(miniPointPage);
|
return new PageInfo<>(miniPointPage);
|
||||||
}
|
}
|
||||||
return new PageInfo<>();
|
return new PageInfo<>();
|
||||||
@@ -885,6 +922,18 @@ public class PointServiceImpl implements PointService {
|
|||||||
updatePoint.setId(pointId);
|
updatePoint.setId(pointId);
|
||||||
updatePoint.setShopId(shopInfo.getId());
|
updatePoint.setShopId(shopInfo.getId());
|
||||||
pointInfoDAO.updatePointInfo(updatePoint);
|
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<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
map.put("partnerUsername", lineInfo.getUsername());
|
map.put("partnerUsername", lineInfo.getUsername());
|
||||||
map.put("partnerMobile", lineInfo.getMobile());
|
map.put("partnerMobile", lineInfo.getMobile());
|
||||||
|
|||||||
@@ -205,6 +205,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
shopInfoDO.setRegionId(request.getRegionId());
|
shopInfoDO.setRegionId(request.getRegionId());
|
||||||
shopInfoDO.setShopName(request.getShopName());
|
shopInfoDO.setShopName(request.getShopName());
|
||||||
shopInfoDO.setDetailAddress(request.getDetailAddress());
|
shopInfoDO.setDetailAddress(request.getDetailAddress());
|
||||||
|
shopInfoDO.setShopCode(request.getShopCode());
|
||||||
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
||||||
|
|
||||||
return new ResponseResult(200000, "提交成功");
|
return new ResponseResult(200000, "提交成功");
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class PointController {
|
|||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public ResponseResult<Long> addPointDetailInfo(@RequestBody @Validated AddPointDetailRequest shopPointDetailRequest) {
|
public ResponseResult<Long> addPointDetailInfo(@RequestBody @Validated AddPointDetailRequest shopPointDetailRequest) {
|
||||||
log.info("新增铺位:{}", JSONObject.toJSONString(shopPointDetailRequest));
|
log.info("新增铺位:{}", JSONObject.toJSONString(shopPointDetailRequest));
|
||||||
return ResponseResult.success(pointService.addPointDetailInfo(shopPointDetailRequest, CurrentUserHolder.getUserId()));
|
return ResponseResult.success(pointService.addPointDetailInfo(shopPointDetailRequest, CurrentUserHolder.getUser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("铺位详情")
|
@ApiOperation("铺位详情")
|
||||||
@@ -52,7 +52,7 @@ public class PointController {
|
|||||||
@ApiOperation("完善铺位")
|
@ApiOperation("完善铺位")
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public ResponseResult<Long> updatePointDetailInfo(@RequestBody @Validated UpdatePointDetailRequest shopPointDetailRequest) {
|
public ResponseResult<Long> updatePointDetailInfo(@RequestBody @Validated UpdatePointDetailRequest shopPointDetailRequest) {
|
||||||
return ResponseResult.success(pointService.updatePointDetailInfo(shopPointDetailRequest));
|
return ResponseResult.success(pointService.updatePointDetailInfo(shopPointDetailRequest,CurrentUserHolder.getUser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("生成评估报告")
|
@ApiOperation("生成评估报告")
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
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 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("机会点详情")
|
||||||
|
@RequestMapping("/mini/opportunityPoint")
|
||||||
|
public class MiniOpportunityPointController {
|
||||||
|
@Resource
|
||||||
|
private OpportunityPointService opportunityPointService;
|
||||||
|
@GetMapping("/getPoints")
|
||||||
|
public ResponseResult<List<MiniPointPageVO> >getPointByOpportunityPointCode(String code) {
|
||||||
|
return ResponseResult.success(opportunityPointService.getPointByOpportunityPointCode(code));
|
||||||
|
}
|
||||||
|
@GetMapping("/getShops")
|
||||||
|
public ResponseResult<List<MiniShopDTO> >getShopByOpportunityPointCode(String code) {
|
||||||
|
return ResponseResult.success(opportunityPointService.getShopByOpportunityPointCode(code));
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user