铺位,选址改造
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -3,13 +3,11 @@ 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;
|
||||
@@ -79,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) {
|
||||
@@ -99,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;
|
||||
@@ -111,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) {
|
||||
@@ -123,7 +126,7 @@ public class PointInfoDAO {
|
||||
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);
|
||||
if(CollectionUtils.isEmpty(pointInfoDOPage)){
|
||||
return Lists.newArrayList();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +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;
|
||||
@@ -31,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);
|
||||
|
||||
/**
|
||||
* 获取线索选择门店数
|
||||
@@ -52,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);
|
||||
|
||||
/**
|
||||
* 更新铺位的拓展经理
|
||||
@@ -67,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);
|
||||
|
||||
/**
|
||||
* 回收铺位
|
||||
@@ -97,7 +95,7 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
|
||||
* @Date: 2025/3/31
|
||||
* @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
|
||||
@@ -112,4 +110,10 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
|
||||
* @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);
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
/**
|
||||
* 获取当前节点
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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},
|
||||
@@ -244,6 +246,7 @@
|
||||
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})
|
||||
@@ -275,6 +278,35 @@
|
||||
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})
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="recyclePoint">
|
||||
update xfsg_point_info set line_id = null, shop_id = null, select_status = 0, update_time = now(), point_status
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -302,4 +302,6 @@ public interface PointService {
|
||||
* @return
|
||||
*/
|
||||
Boolean linePointToShopPoint(Long lineId);
|
||||
|
||||
PageInfo<MiniPointPageVO> getRecommendedOrMyPointList(MiniPointRequest request);
|
||||
}
|
||||
|
||||
@@ -105,5 +105,5 @@ public interface ShopService {
|
||||
|
||||
Boolean dataHandler(Long shopId);
|
||||
|
||||
List<MiniShopsResponse> getShopListAndStatusIsOverByLineId(Long lineId);
|
||||
List<MiniShopsResponse> getShopListSuccessOpen(Long lineId);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ 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;
|
||||
@@ -139,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()));
|
||||
@@ -176,7 +179,7 @@ public class PointServiceImpl implements PointService {
|
||||
request1.setUserId(user.getUserId());
|
||||
request1.setMobile(user.getMobile());
|
||||
request1.setUserName(user.getName());
|
||||
}else{
|
||||
} else {
|
||||
request1.setUserId(lineInfoDO.getPartnerId());
|
||||
request1.setMobile(lineInfoDO.getMobile());
|
||||
request1.setUserName(lineInfoDO.getUsername());
|
||||
@@ -554,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());
|
||||
@@ -583,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());
|
||||
@@ -638,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());
|
||||
@@ -751,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());
|
||||
@@ -767,33 +770,16 @@ public class PointServiceImpl implements PointService {
|
||||
|
||||
@Override
|
||||
public PageInfo<MiniPointPageVO> getLineRecommendPointPage(MiniPointPageRequest request) {
|
||||
//todo
|
||||
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(enterpriseId,request);
|
||||
return new PageInfo<>(miniPointPage);
|
||||
}
|
||||
return new PageInfo<>();
|
||||
PageInfo resultPage = new PageInfo(pointPage);
|
||||
resultPage.setList(resultList);
|
||||
return resultPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1096,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());
|
||||
@@ -1194,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<>();
|
||||
//审核人
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user