铺位,选址改造

This commit is contained in:
shuo.wang
2025-04-03 14:11:53 +08:00
parent 874dd92bb9
commit 944695ab31
22 changed files with 220 additions and 128 deletions

View File

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

View File

@@ -3,13 +3,11 @@ 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.MiniShopDTO;
import com.cool.store.dto.PCPointListDTO;
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;
import com.cool.store.request.AllPointPageRequest; import com.cool.store.request.*;
import com.cool.store.request.MiniPointPageRequest;
import com.cool.store.request.PointPageRequest;
import com.cool.store.request.RecommendPointPageRequest;
import com.cool.store.utils.StringUtil; import com.cool.store.utils.StringUtil;
import com.cool.store.vo.point.MiniPointPageVO; import com.cool.store.vo.point.MiniPointPageVO;
import com.cool.store.vo.point.PointHomePageDataVO; import com.cool.store.vo.point.PointHomePageDataVO;
@@ -79,9 +77,9 @@ public class PointInfoDAO {
* @param request * @param request
* @return * @return
*/ */
public Page<PointInfoDO> getMyPointPage(PointPageRequest request) { public Page<PCPointListDTO> getMyPointPage(String eid,PointPageRequest request) {
PageHelper.startPage(request.getPageNum(), request.getPageSize()); PageHelper.startPage(request.getPageNum(), request.getPageSize());
return pointInfoMapper.getMyPointPage(request); return pointInfoMapper.getMyPointPage(eid,request);
} }
public Map<Long, Integer> getSelectedShopNumMap(List<Long> lineIds) { public Map<Long, Integer> getSelectedShopNumMap(List<Long> lineIds) {
@@ -99,11 +97,16 @@ public class PointInfoDAO {
return pointInfoMapper.getPointListByIds(pointIds); return pointInfoMapper.getPointListByIds(pointIds);
} }
public Page<PointInfoDO> getRecommendPointList(RecommendPointPageRequest request) { public Page<PCPointListDTO> getRecommendPointList(RecommendPointPageRequest request) {
PageHelper.startPage(request.getPageNum(), request.getPageSize()); PageHelper.startPage(request.getPageNum(), request.getPageSize());
return pointInfoMapper.getRecommendPointList(request); 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) { public Integer updateSelectedDevelopmentManager(Long shopId, String developmentManager) {
if(Objects.isNull(shopId) || StringUtils.isBlank(developmentManager)){ if(Objects.isNull(shopId) || StringUtils.isBlank(developmentManager)){
return null; return null;
@@ -111,9 +114,9 @@ public class PointInfoDAO {
return pointInfoMapper.updateSelectedDevelopmentManager(shopId, developmentManager); 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()); PageHelper.startPage(request.getPageNum(), request.getPageSize());
return pointInfoMapper.getTeamPointPage(request); return pointInfoMapper.getTeamPointPage(eid,request);
} }
public Integer recyclePoint(Long pointId) { public Integer recyclePoint(Long pointId) {
@@ -123,7 +126,7 @@ public class PointInfoDAO {
return pointInfoMapper.recyclePoint(pointId); return pointInfoMapper.recyclePoint(pointId);
} }
public List<MiniPointPageVO> getMiniPointPage(String eid,MiniPointPageRequest request ) { public List<MiniPointPageVO> getMiniPointPage(String eid,MiniPointRequest request ) {
List<MiniPointPageVO> pointInfoDOPage = pointInfoMapper.MiniPointPageVO(eid,request); List<MiniPointPageVO> pointInfoDOPage = pointInfoMapper.MiniPointPageVO(eid,request);
if(CollectionUtils.isEmpty(pointInfoDOPage)){ if(CollectionUtils.isEmpty(pointInfoDOPage)){
return Lists.newArrayList(); return Lists.newArrayList();

View File

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

View File

@@ -229,7 +229,13 @@ public class ShopInfoDAO {
} }
return shopInfoMapper.selectByLines(lineIds,regionIds); return shopInfoMapper.selectByLines(lineIds,regionIds);
} }
public List<MiniShopsResponse> getShopListAndStatusIsOverByLineId(Long lineId){ public List<MiniShopsResponse> getShopListSuccessOpen(String eid,Long lineId){
return shopInfoMapper.getShopListAndStatusIsOverByLineId(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,12 +1,10 @@
package com.cool.store.mapper; package com.cool.store.mapper;
import com.cool.store.dto.MiniShopDTO; import com.cool.store.dto.MiniShopDTO;
import com.cool.store.dto.PCPointListDTO;
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.*;
import com.cool.store.request.MiniPointPageRequest;
import com.cool.store.request.PointPageRequest;
import com.cool.store.request.RecommendPointPageRequest;
import com.cool.store.vo.point.MiniPointPageVO; import com.cool.store.vo.point.MiniPointPageVO;
import com.cool.store.vo.point.PointHomePageDataVO; import com.cool.store.vo.point.PointHomePageDataVO;
import com.cool.store.vo.point.PointPageVO; import com.cool.store.vo.point.PointPageVO;
@@ -31,7 +29,7 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
* @param request * @param request
* @return * @return
*/ */
Page<PointInfoDO> getMyPointPage(@Param("request") PointPageRequest request); Page<PCPointListDTO> getMyPointPage(@Param("eid") String eid,@Param("request") PointPageRequest request);
/** /**
* 获取线索选择门店数 * 获取线索选择门店数
@@ -52,7 +50,7 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
* @param request * @param request
* @return * @return
*/ */
Page<PointInfoDO> getRecommendPointList(@Param("request") RecommendPointPageRequest request); Page<PCPointListDTO> getRecommendPointList(@Param("request") RecommendPointPageRequest request);
/** /**
* 更新铺位的拓展经理 * 更新铺位的拓展经理
@@ -67,7 +65,7 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
* @param request * @param request
* @return * @return
*/ */
Page<PointInfoDO> getTeamPointPage(@Param("request") AllPointPageRequest request); Page<PCPointListDTO> getTeamPointPage(@Param("eid")String eid,@Param("request") AllPointPageRequest request);
/** /**
* 回收铺位 * 回收铺位
@@ -97,7 +95,7 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
* @Date: 2025/3/31 * @Date: 2025/3/31
* @description:获取铺位部分数据 * @description:获取铺位部分数据
*/ */
List<MiniPointPageVO> MiniPointPageVO(@Param("enterpriseId") String enterpriseId , @Param("request") MiniPointPageRequest request); List<MiniPointPageVO> MiniPointPageVO(@Param("enterpriseId") String enterpriseId , @Param("request") MiniPointRequest request);
/** /**
* @Auther: wangshuo * @Auther: wangshuo
@@ -112,4 +110,10 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
* @description:根据机会点code获取门店信息 * @description:根据机会点code获取门店信息
*/ */
List<MiniShopDTO> getShopByOpportunityPointCode(@Param("enterpriseId") String enterpriseId, @Param("code") String 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; package com.cool.store.mapper;
import com.cool.store.dto.PCPointListDTO;
import com.cool.store.entity.PointAuditRecordDO; import com.cool.store.entity.PointAuditRecordDO;
import com.cool.store.entity.PointInfoDO; import com.cool.store.entity.PointInfoDO;
import com.cool.store.entity.PointTodoInfoDO; import com.cool.store.entity.PointTodoInfoDO;
@@ -56,7 +57,7 @@ public interface PointTodoInfoMapper extends Mapper<PointTodoInfoDO> {
* @param request * @param request
* @return * @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<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

@@ -30,7 +30,6 @@
<result column="storage_status" jdbcType="TINYINT" property="storageStatus"/> <result column="storage_status" jdbcType="TINYINT" property="storageStatus"/>
<result column="opportunity_point_code" jdbcType="VARCHAR" property="opportunityPointCode"/> <result column="opportunity_point_code" jdbcType="VARCHAR" property="opportunityPointCode"/>
<result column="opportunity_point_name" jdbcType="VARCHAR" property="opportunityPointName"/> <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="province_code" jdbcType="VARCHAR" property="provinceCode"/>
<result column="city_code" jdbcType="VARCHAR" property="cityCode"/> <result column="city_code" jdbcType="VARCHAR" property="cityCode"/>
<result column="district_code" jdbcType="VARCHAR" property="districtCode"/> <result column="district_code" jdbcType="VARCHAR" property="districtCode"/>
@@ -41,7 +40,7 @@
development_manager, operate_user_id, development_manager, operate_user_id,
development_time, point_status, point_score, select_status, submit_audit_count, point_source, deleted, development_time, point_status, point_score, select_status, submit_audit_count, point_source, deleted,
create_time, update_time, 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 province_code, city_code, district_code
</sql> </sql>
@@ -56,26 +55,28 @@
from xfsg_point_info from xfsg_point_info
where deleted = 0 and development_manager = #{userId} where deleted = 0 and development_manager = #{userId}
</select> </select>
<select id="getMyPointPage" resultMap="BaseResultMap"> <select id="getMyPointPage" resultType="com.cool.store.dto.PCPointListDTO">
select select
id, a.id,
point_name, a.point_name,
point_code, a.point_code,
address, a.address,
region_id, a.region_id,
point_status, a.point_status,
point_score, a.point_score,
point_area, a.point_area,
development_manager, a.development_manager,
operate_user_id, a.operate_user_id,
development_time, a.development_time,
select_status, a.select_status,
create_time, a.create_time,
update_time, a.update_time,
open_shop_name, a.opportunity_point_code,
opportunity_point_code, a.opportunity_point_name,
opportunity_point_name c.store_name as openName
from xfsg_point_info 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} where deleted = 0 and development_manager = #{request.developmentManager}
<if test="request.keyword != null and request.keyword != ''"> <if test="request.keyword != null and request.keyword != ''">
and (point_code like concat('%', #{request.keyword}, '%') or point_name like concat('%', #{request.keyword}, and (point_code like concat('%', #{request.keyword}, '%') or point_name like concat('%', #{request.keyword},
@@ -136,7 +137,7 @@
#{pointId} #{pointId}
</foreach> </foreach>
</select> </select>
<select id="getRecommendPointList" resultType="com.cool.store.entity.PointInfoDO"> <select id="getRecommendPointList" resultType="com.cool.store.dto.PCPointListDTO">
select select
<include refid="allColumn"/> <include refid="allColumn"/>
from xfsg_point_info from xfsg_point_info
@@ -159,27 +160,28 @@
shop_id = #{shopId} and select_status = '1' and deleted = 0 shop_id = #{shopId} and select_status = '1' and deleted = 0
</update> </update>
<select id="getTeamPointPage" resultMap="BaseResultMap"> <select id="getTeamPointPage" resultType="com.cool.store.dto.PCPointListDTO">
select select
id, a.id,
point_name, a.point_name,
point_code, a.point_code,
address, a.address,
region_id, a.region_id,
point_status, a.point_status,
point_score, a.point_score,
point_area, a.point_area,
development_manager, a.development_manager,
operate_user_id, a.operate_user_id,
development_time, a.development_time,
select_status, a.select_status,
create_time, a.create_time,
update_time, a.update_time,
open_shop_name, a.opportunity_point_code,
opportunity_point_code, a.opportunity_point_name,
opportunity_point_name c.store_name as openName
from from xfsg_point_info a
xfsg_point_info 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) where deleted = 0 and point_status in (4,5,6,7)
<if test="request.keyword != null and request.keyword != ''"> <if test="request.keyword != null and request.keyword != ''">
and (point_code like concat('%', #{request.keyword}, '%') or point_name like concat('%', #{request.keyword}, and (point_code like concat('%', #{request.keyword}, '%') or point_name like concat('%', #{request.keyword},
@@ -244,6 +246,7 @@
left JOIN xfsg_shop_info b ON a.shop_id = b.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 left JOIN store_${enterpriseId} d ON b.shop_code = d.store_num
where a.deleted = 0
<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})
@@ -275,6 +278,35 @@
inner join store_${enterpriseId} c on b.shop_code = c.store_num inner join store_${enterpriseId} c on b.shop_code = c.store_num
where a.opportunity_point_code = #{code} where a.opportunity_point_code = #{code}
</select> </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})
</if>
</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

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 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> </update>
<select id="getUserTodoList" resultType="com.cool.store.entity.PointInfoDO"> <select id="getUserTodoList" resultType="com.cool.store.dto.PCPointListDTO">
select select
b.id, b.id,
b.point_name, b.point_name,

View File

@@ -412,10 +412,18 @@
from xfsg_shop_info from xfsg_shop_info
where shop_status = #{shopStatus} where shop_status = #{shopStatus}
</select> </select>
<select id="getShopListAndStatusIsOverByLineId" resultType="com.cool.store.response.MiniShopsResponse"> <select id="getShopListSuccessOpen" resultType="com.cool.store.response.MiniShopsResponse">
select id, shop_name as shopName select a.shop_name as shopName,
from xfsg_shop_info a.id as shopId
where line_id = #{lineId} and shop_status = 1 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> </select>
<update id="batchUpdate" parameterType="list"> <update id="batchUpdate" parameterType="list">

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

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

View File

@@ -25,14 +25,5 @@ public class MiniPointPageRequest extends PageBasicInfo {
@ApiModelProperty(value = "门店线索ID") @ApiModelProperty(value = "门店线索ID")
private Long shopId; 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

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

View File

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

View File

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

View File

@@ -302,4 +302,6 @@ public interface PointService {
* @return * @return
*/ */
Boolean linePointToShopPoint(Long lineId); Boolean linePointToShopPoint(Long lineId);
PageInfo<MiniPointPageVO> getRecommendedOrMyPointList(MiniPointRequest request);
} }

View File

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

View File

@@ -5,6 +5,7 @@ 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.context.LoginUserInfo;
import com.cool.store.dao.*; import com.cool.store.dao.*;
import com.cool.store.dto.PCPointListDTO;
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;
import com.cool.store.dto.point.ShopPointDTO; import com.cool.store.dto.point.ShopPointDTO;
@@ -139,8 +140,10 @@ public class PointServiceImpl implements PointService {
log.error("铺位详情信息不存在"); log.error("铺位详情信息不存在");
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
} }
String openName = shopInfoDAO.getOpenName(enterpriseId, pointInfo.getShopId());
String userName = enterpriseUserDAO.getUserName(pointInfo.getDevelopmentManager()); String userName = enterpriseUserDAO.getUserName(pointInfo.getDevelopmentManager());
PointDetailVO result = PointDetailVO.convertVO(pointInfo, pointDetailInfo); PointDetailVO result = PointDetailVO.convertVO(pointInfo, pointDetailInfo);
result.setOpenShopName(openName);
result.setDevelopmentManagerUserName(userName); result.setDevelopmentManagerUserName(userName);
result.setDevelopmentManagerUserId(pointInfo.getDevelopmentManager()); result.setDevelopmentManagerUserId(pointInfo.getDevelopmentManager());
result.setRegionNodeName(regionService.getBelongWarRegionName(pointInfo.getRegionId())); result.setRegionNodeName(regionService.getBelongWarRegionName(pointInfo.getRegionId()));
@@ -176,7 +179,7 @@ public class PointServiceImpl implements PointService {
request1.setUserId(user.getUserId()); request1.setUserId(user.getUserId());
request1.setMobile(user.getMobile()); request1.setMobile(user.getMobile());
request1.setUserName(user.getName()); request1.setUserName(user.getName());
}else{ } else {
request1.setUserId(lineInfoDO.getPartnerId()); request1.setUserId(lineInfoDO.getPartnerId());
request1.setMobile(lineInfoDO.getMobile()); request1.setMobile(lineInfoDO.getMobile());
request1.setUserName(lineInfoDO.getUsername()); request1.setUserName(lineInfoDO.getUsername());
@@ -554,7 +557,7 @@ public class PointServiceImpl implements PointService {
} }
} }
List<PointPageVO> resultList = new ArrayList(); 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())) { if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList()); List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
List<String> developmentManagers = pointPage.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList()); List<String> developmentManagers = pointPage.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList());
@@ -583,7 +586,7 @@ public class PointServiceImpl implements PointService {
request.setPointStatus(PointStatusEnum.POINT_STATUS_4.getCode()); request.setPointStatus(PointStatusEnum.POINT_STATUS_4.getCode());
} }
List<PointPageVO> resultList = new ArrayList(); 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())) { if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList()); List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
List<String> developmentManagers = pointPage.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList()); List<String> developmentManagers = pointPage.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList());
@@ -638,7 +641,7 @@ public class PointServiceImpl implements PointService {
@Override @Override
public PageInfo<PointPageVO> getRecommendPointList(RecommendPointPageRequest request) { public PageInfo<PointPageVO> getRecommendPointList(RecommendPointPageRequest request) {
List<PointPageVO> resultList = new ArrayList(); 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())) { if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList()); List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
List<String> developmentManagers = pointPage.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList()); List<String> developmentManagers = pointPage.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList());
@@ -751,7 +754,7 @@ public class PointServiceImpl implements PointService {
@Override @Override
public PageInfo<PointPageVO> getTodoList(PointTodoPageRequest request) { public PageInfo<PointPageVO> getTodoList(PointTodoPageRequest request) {
Page<PointInfoDO> pointPage = pointTodoInfoDAO.getUserTodoList(request); Page<PCPointListDTO> pointPage = pointTodoInfoDAO.getUserTodoList(request);
List<PointPageVO> resultList = new ArrayList<>(); List<PointPageVO> resultList = new ArrayList<>();
if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) { if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList()); List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
@@ -767,33 +770,16 @@ public class PointServiceImpl implements PointService {
@Override @Override
public PageInfo<MiniPointPageVO> getLineRecommendPointPage(MiniPointPageRequest request) { public PageInfo<MiniPointPageVO> getLineRecommendPointPage(MiniPointPageRequest request) {
//todo Page<MiniPointPageDTO> pointPage = pointRecommendDAO.getLineRecommendPointPage(request);
if (Objects.equals(request.getType(), PointListType.POINT_LIST_TYPE_1.getCode())) { List<MiniPointPageVO> resultList = new ArrayList<>();
Page<MiniPointPageDTO> pointPage = pointRecommendDAO.getLineRecommendPointPage(request); if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
List<MiniPointPageVO> resultList = new ArrayList<>(); List<Long> regionIds = pointPage.getResult().stream().map(MiniPointPageDTO::getRegionId).distinct().collect(Collectors.toList());
if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) { Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
List<Long> regionIds = pointPage.getResult().stream().map(MiniPointPageDTO::getRegionId).distinct().collect(Collectors.toList()); resultList = MiniPointPageVO.convertVO(pointPage, regionNameMap);
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;
} }
if (request.getType().equals(PointListType.POINT_LIST_TYPE_2.getCode())) { PageInfo resultPage = new PageInfo(pointPage);
PageHelper.startPage(request.getPageNum(), request.getPageSize()); resultPage.setList(resultList);
List<MiniPointPageVO> miniPointPage = pointInfoDAO.getMiniPointPage(enterpriseId,request); return resultPage;
return new PageInfo<>(miniPointPage);
}
return new PageInfo<>();
} }
@Override @Override
@@ -1096,7 +1082,7 @@ public class PointServiceImpl implements PointService {
request.setDevelopmentManager(userId); request.setDevelopmentManager(userId);
request.setPageNum(pageNumber); request.setPageNum(pageNumber);
request.setPageSize(pageSize); request.setPageSize(pageSize);
Page<PointInfoDO> pointPage = pointTodoInfoDAO.getUserTodoList(request); Page<PCPointListDTO> pointPage = pointTodoInfoDAO.getUserTodoList(request);
List<PointToDoVO> resultList = new ArrayList<>(); List<PointToDoVO> resultList = new ArrayList<>();
if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) { if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList()); List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
@@ -1194,6 +1180,14 @@ public class PointServiceImpl implements PointService {
return Boolean.TRUE; 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) { public List<AuditNodeDTO> dealAuditNode(AuditSettingVO auditSetting, Long regionId, String developmentManager) {
List<String> roleIds = new ArrayList<>(); List<String> roleIds = new ArrayList<>();
//审核人 //审核人

View File

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

View File

@@ -61,9 +61,6 @@ public class MiniShopController {
@ApiOperation("获取推荐给我的铺位") @ApiOperation("获取推荐给我的铺位")
@PostMapping("/getLineRecommendPointPage") @PostMapping("/getLineRecommendPointPage")
public ResponseResult<PageInfo<MiniPointPageVO>> getLineRecommendPointPage(@RequestBody MiniPointPageRequest request) { 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)); return ResponseResult.success(pointService.getLineRecommendPointPage(request));
} }
@@ -119,7 +116,13 @@ public class MiniShopController {
@ApiOperation("获取状态为完成的门店列表") @ApiOperation("获取状态为完成的门店列表")
@GetMapping("/getStatusOver") @GetMapping("/getStatusOver")
public ResponseResult<List<MiniShopsResponse>> getShopListAndStatusIsOverByLineId(@RequestParam("lineId")Long lineId) { 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));
}
} }