多品牌使用
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
package com.cool.store.enums;/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2024/11/04/下午7:00
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
public enum FranchiseBrandEnum {
|
||||||
|
ZXJP(1,"正新鸡排"),
|
||||||
|
ZXSMZ(2,"正新三明治"),
|
||||||
|
ZJS(3,"正烧记"),
|
||||||
|
DGMX(4,"大鼓米线"),
|
||||||
|
CXM(5,"串小妹"),
|
||||||
|
MZG(6,"茂掌柜");
|
||||||
|
private int code;
|
||||||
|
private String desc;
|
||||||
|
FranchiseBrandEnum(int code, String desc) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -123,13 +123,13 @@ public class LineInfoDAO {
|
|||||||
return lineInfo;
|
return lineInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<LineInfoDO> lineList(LineListRequest lineListRequest,String wantShopAreaName, String userId, List<Long> wantShopAreaIds) {
|
public List<LineInfoDO> lineList(LineListRequest lineListRequest,String wantShopAreaName, String userId, List<Long> regionIds) {
|
||||||
List<LineInfoDO> lineInfo = lineInfoMapper.lineList(lineListRequest,wantShopAreaName,userId,wantShopAreaIds);
|
List<LineInfoDO> lineInfo = lineInfoMapper.lineList(lineListRequest,wantShopAreaName,userId,regionIds);
|
||||||
return lineInfo;
|
return lineInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<LineInfoDO> partnerList(PartnerRequest partnerRequest,String wantShopAreaName, String userId, List<Long> wantShopAreaIds) {
|
public List<LineInfoDO> partnerList(PartnerRequest partnerRequest,String wantShopAreaName, String userId, List<Long> regionIds) {
|
||||||
List<LineInfoDO> lineInfo = lineInfoMapper.partnerList(partnerRequest,wantShopAreaName,userId,wantShopAreaIds);
|
List<LineInfoDO> lineInfo = lineInfoMapper.partnerList(partnerRequest,wantShopAreaName,userId,regionIds);
|
||||||
return lineInfo;
|
return lineInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,12 +47,12 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
|||||||
List<LineInfoDO> lineList(@Param("request") LineListRequest lineListRequest,
|
List<LineInfoDO> lineList(@Param("request") LineListRequest lineListRequest,
|
||||||
@Param("wantShopAreaName") String wantShopAreaName,
|
@Param("wantShopAreaName") String wantShopAreaName,
|
||||||
@Param("userId") String userId,
|
@Param("userId") String userId,
|
||||||
@Param("wantShopAreaIds") List<Long> wantShopAreaIds);
|
@Param("regionIds") List<Long> regionIds);
|
||||||
|
|
||||||
List<LineInfoDO> partnerList(@Param("request") PartnerRequest partnerRequest,
|
List<LineInfoDO> partnerList(@Param("request") PartnerRequest partnerRequest,
|
||||||
@Param("wantShopAreaName") String wantShopAreaName,
|
@Param("wantShopAreaName") String wantShopAreaName,
|
||||||
@Param("userId") String userId,
|
@Param("userId") String userId,
|
||||||
@Param("wantShopAreaIds") List<Long> wantShopAreaIds);
|
@Param("regionIds") List<Long> regionIds);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||||
<result column="partner_num" jdbcType="VARCHAR" property="partnerNum" />
|
<result column="partner_num" jdbcType="VARCHAR" property="partnerNum" />
|
||||||
<result column="big_region_id" jdbcType="BIGINT" property="bigRegionId" />
|
<result column="big_region_id" jdbcType="BIGINT" property="bigRegionId" />
|
||||||
|
<result column="franchise_brand" jdbcType="TINYINT" property="franchiseBrand" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<insert id="insertOrUpdate" parameterType="com.cool.store.entity.LineInfoDO" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertOrUpdate" parameterType="com.cool.store.entity.LineInfoDO" useGeneratedKeys="true" keyProperty="id">
|
||||||
INSERT INTO xfsg_line_info
|
INSERT INTO xfsg_line_info
|
||||||
@@ -437,9 +438,9 @@
|
|||||||
<if test="request.investmentManagerUserId != null and request.investmentManagerUserId != ''">
|
<if test="request.investmentManagerUserId != null and request.investmentManagerUserId != ''">
|
||||||
and a.investment_manager = #{request.investmentManagerUserId}
|
and a.investment_manager = #{request.investmentManagerUserId}
|
||||||
</if>
|
</if>
|
||||||
<if test="wantShopAreaIds !=null and wantShopAreaIds.size>0">
|
<if test="regionIds !=null and regionIds.size>0">
|
||||||
<foreach collection="wantShopAreaIds" item="wantShopAreaId" open="and a.want_shop_area_id in (" close=")" separator=",">
|
<foreach collection="regionIds" item="regionId" open="and a.region_id in (" close=")" separator=",">
|
||||||
#{wantShopAreaId}
|
#{regionId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
order by a.id desc
|
order by a.id desc
|
||||||
@@ -472,9 +473,9 @@
|
|||||||
and a.development_manager = #{request.queryUserId}
|
and a.development_manager = #{request.queryUserId}
|
||||||
</if>
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="wantShopAreaIds !=null and wantShopAreaIds.size>0">
|
<if test="regionIds !=null and regionIds.size>0">
|
||||||
<foreach collection="wantShopAreaIds" item="wantShopAreaId" open="and a.want_shop_area_id in (" close=")" separator=",">
|
<foreach collection="regionIds" item="regionId" open="and a.region_id in (" close=")" separator=",">
|
||||||
#{wantShopAreaId}
|
#{regionId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
order by a.id desc
|
order by a.id desc
|
||||||
|
|||||||
@@ -175,5 +175,6 @@ public class LineInfoDO {
|
|||||||
|
|
||||||
@Column(name = "join_mode")
|
@Column(name = "join_mode")
|
||||||
private Integer joinMode;
|
private Integer joinMode;
|
||||||
|
@Column(name = "franchise_brand")
|
||||||
|
private Integer franchiseBrand;
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import io.swagger.models.auth.In;
|
import io.swagger.models.auth.In;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
* @Date 2024/3/27 16:32
|
* @Date 2024/3/27 16:32
|
||||||
@@ -18,6 +20,8 @@ public class LineListRequest extends PageBasicInfo {
|
|||||||
private String userName;
|
private String userName;
|
||||||
@ApiModelProperty("线索手机号")
|
@ApiModelProperty("线索手机号")
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
@ApiModelProperty("所属区域")
|
||||||
|
private List<Long> regionIds;
|
||||||
@ApiModelProperty("关键字")
|
@ApiModelProperty("关键字")
|
||||||
private String keyword;
|
private String keyword;
|
||||||
@ApiModelProperty("线索子阶段")
|
@ApiModelProperty("线索子阶段")
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import com.cool.store.common.PageBasicInfo;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
* @Date 2024/4/1 11:21
|
* @Date 2024/4/1 11:21
|
||||||
@@ -12,7 +14,8 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class PartnerRequest extends PageBasicInfo {
|
public class PartnerRequest extends PageBasicInfo {
|
||||||
|
|
||||||
|
@ApiModelProperty("所属区域")
|
||||||
|
private List<Long> regionIds;
|
||||||
@ApiModelProperty("加密状态 1-蓄水池 2-正式")
|
@ApiModelProperty("加密状态 1-蓄水池 2-正式")
|
||||||
private Integer joinStatus;
|
private Integer joinStatus;
|
||||||
@ApiModelProperty("加盟上姓名或者手机号")
|
@ApiModelProperty("加盟上姓名或者手机号")
|
||||||
|
|||||||
@@ -21,12 +21,15 @@ public class UpdateLineRequest {
|
|||||||
private String lineName;
|
private String lineName;
|
||||||
@ApiModelProperty("加盟意向区域")
|
@ApiModelProperty("加盟意向区域")
|
||||||
private Long wantShopAreaId;
|
private Long wantShopAreaId;
|
||||||
|
@ApiModelProperty("所属区域")
|
||||||
|
private Long regionId;
|
||||||
@NotNull
|
@NotNull
|
||||||
@Min(1)
|
@Min(1)
|
||||||
@Max(2)
|
@Max(2)
|
||||||
@ApiModelProperty("加盟模式 1-社会加盟 2-强加盟")
|
@ApiModelProperty("加盟模式 1-社会加盟 2-强加盟")
|
||||||
private Integer joinMode;
|
private Integer joinMode;
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty("加盟品牌")
|
||||||
|
private Integer franchiseBrand;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class BaseInfoVO {
|
public class BaseInfoVO {
|
||||||
|
@ApiModelProperty("所属区域")
|
||||||
|
private String regionName;
|
||||||
@ApiModelProperty("线索ID")
|
@ApiModelProperty("线索ID")
|
||||||
private Long lineId;
|
private Long lineId;
|
||||||
|
|
||||||
|
|||||||
@@ -228,5 +228,6 @@ public class LineInfoVO {
|
|||||||
|
|
||||||
private Long bigRegionId;
|
private Long bigRegionId;
|
||||||
|
|
||||||
|
private Integer franchiseBrand;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,26 +76,26 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
|||||||
lineInfoParam.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
|
lineInfoParam.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
|
||||||
lineInfoParam.setWorkflowSubStage(WorkflowSubStageEnum.INTEND.getCode());
|
lineInfoParam.setWorkflowSubStage(WorkflowSubStageEnum.INTEND.getCode());
|
||||||
lineInfoParam.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_5.getCode());
|
lineInfoParam.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_5.getCode());
|
||||||
if ((Objects.nonNull(request.getAreaCode()) && Objects.nonNull(lineInfoDO) && StringUtils.isBlank(lineInfoDO.getInvestmentManager())) || (Objects.isNull(lineInfoDO))) {
|
// if ((Objects.nonNull(request.getAreaCode()) && Objects.nonNull(lineInfoDO) && StringUtils.isBlank(lineInfoDO.getInvestmentManager())) || (Objects.isNull(lineInfoDO))) {
|
||||||
EnterpriseUserDO userByRoleNameAndAreaId = userAuthMappingService.getUserByRoleEnumAndWantShopAreaId(UserRoleEnum.SUPERVISION, Long.valueOf(request.getAreaCode()));
|
// EnterpriseUserDO userByRoleNameAndAreaId = userAuthMappingService.getUserByRoleEnumAndWantShopAreaId(UserRoleEnum.SUPERVISION, Long.valueOf(request.getAreaCode()));
|
||||||
lineInfoParam.setInvestmentManager(userByRoleNameAndAreaId.getUserId());
|
// lineInfoParam.setInvestmentManager(userByRoleNameAndAreaId.getUserId());
|
||||||
}
|
// }
|
||||||
lineInfoParam.setLineStatus(1);
|
lineInfoParam.setLineStatus(0);
|
||||||
//强加盟 前期不确定意向区域
|
//强加盟 前期不确定意向区域
|
||||||
if (lineInfoParam.getWantShopAreaId() != null&&lineInfoDO.getJoinMode()==1) {
|
// if (lineInfoParam.getWantShopAreaId() != null&&lineInfoDO.getJoinMode()==1) {
|
||||||
Long regionId = regionAreaConfigDao.getByWantShopAreaId(lineInfoParam.getWantShopAreaId());
|
// Long regionId = regionAreaConfigDao.getByWantShopAreaId(lineInfoParam.getWantShopAreaId());
|
||||||
lineInfoParam.setRegionId(regionId);
|
// lineInfoParam.setRegionId(regionId);
|
||||||
}
|
// }
|
||||||
lineInfoDAO.insertOrUpdate(lineInfoParam);
|
lineInfoDAO.insertOrUpdate(lineInfoParam);
|
||||||
QualificationsInfoDO qualificationsInfoDO = request.toQualificationsInfoDO();
|
QualificationsInfoDO qualificationsInfoDO = request.toQualificationsInfoDO();
|
||||||
qualificationsInfoDAO.insertOrUpdate(qualificationsInfoDO);
|
qualificationsInfoDAO.insertOrUpdate(qualificationsInfoDO);
|
||||||
|
|
||||||
Map<String, String> requestMap = new HashMap<>();
|
// Map<String, String> requestMap = new HashMap<>();
|
||||||
requestMap.put("partnerUsername", lineInfoParam.getUsername());
|
// requestMap.put("partnerUsername", lineInfoParam.getUsername());
|
||||||
requestMap.put("partnerMobile", lineInfoParam.getMobile());
|
// requestMap.put("partnerMobile", lineInfoParam.getMobile());
|
||||||
requestMap.put("lineId", String.valueOf(lineInfoParam.getId()));
|
// requestMap.put("lineId", String.valueOf(lineInfoParam.getId()));
|
||||||
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoParam.getWantShopAreaId());
|
// HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoParam.getWantShopAreaId());
|
||||||
requestMap.put("regionName", openAreaInfoDO.getAreaName());
|
// requestMap.put("regionName", openAreaInfoDO.getAreaName());
|
||||||
//工作通知后面对接企业微信
|
//工作通知后面对接企业微信
|
||||||
// commonService.sendMessage(Collections.singletonList(lineInfoParam.getInvestmentManager()),
|
// commonService.sendMessage(Collections.singletonList(lineInfoParam.getInvestmentManager()),
|
||||||
// MessageEnum.MESSAGE_29,
|
// MessageEnum.MESSAGE_29,
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
@@ -163,11 +164,15 @@ public class LineServiceImpl implements LineService {
|
|||||||
List<String> userIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getInvestmentManager() != null).map(LineInfoDO::getInvestmentManager).collect(Collectors.toList());
|
List<String> userIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getInvestmentManager() != null).map(LineInfoDO::getInvestmentManager).collect(Collectors.toList());
|
||||||
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getUpdateUserId() != null).map(LineInfoDO::getUpdateUserId).collect(Collectors.toList()));
|
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getUpdateUserId() != null).map(LineInfoDO::getUpdateUserId).collect(Collectors.toList()));
|
||||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(userIds);
|
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(userIds);
|
||||||
|
List<Long> regionIds = lineInfoDOS.stream().filter(x -> x.getRegionId() != null).map(LineInfoDO::getRegionId).collect(Collectors.toList());
|
||||||
|
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(regionIds);
|
||||||
List<LineListVO> result = new ArrayList<>();
|
List<LineListVO> result = new ArrayList<>();
|
||||||
lineInfoDOS.forEach(x->{
|
lineInfoDOS.forEach(x->{
|
||||||
BaseInfoVO baseInfoVO = deskService.convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
|
BaseInfoVO baseInfoVO = deskService.convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
|
||||||
LineListVO lineListVO = new LineListVO(baseInfoVO);
|
LineListVO lineListVO = new LineListVO(baseInfoVO);
|
||||||
|
if (regionNameMap!=null){
|
||||||
|
lineListVO.setRegionName(regionNameMap.get(x.getRegionId()));
|
||||||
|
}
|
||||||
lineListVO.setCreateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getCreateTime()));
|
lineListVO.setCreateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getCreateTime()));
|
||||||
lineListVO.setUpdateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getUpdateTime()));
|
lineListVO.setUpdateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getUpdateTime()));
|
||||||
lineListVO.setLineSourceName(channelMapByIds.get(x.getLineSource()));
|
lineListVO.setLineSourceName(channelMapByIds.get(x.getLineSource()));
|
||||||
@@ -194,7 +199,6 @@ public class LineServiceImpl implements LineService {
|
|||||||
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getCreateUserId() != null).map(LineInfoDO::getCreateUserId).collect(Collectors.toList()));
|
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getCreateUserId() != null).map(LineInfoDO::getCreateUserId).collect(Collectors.toList()));
|
||||||
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getDevelopmentManager() != null).map(LineInfoDO::getDevelopmentManager).collect(Collectors.toList()));
|
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getDevelopmentManager() != null).map(LineInfoDO::getDevelopmentManager).collect(Collectors.toList()));
|
||||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(userIds);
|
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(userIds);
|
||||||
|
|
||||||
List<PublicLineListVO> result = new ArrayList<>();
|
List<PublicLineListVO> result = new ArrayList<>();
|
||||||
lineInfoDOS.forEach(x->{
|
lineInfoDOS.forEach(x->{
|
||||||
BaseInfoVO baseInfoVO = deskService.convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
|
BaseInfoVO baseInfoVO = deskService.convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
|
||||||
@@ -215,15 +219,17 @@ public class LineServiceImpl implements LineService {
|
|||||||
@Override
|
@Override
|
||||||
public PageInfo<PartnerListVO> getPartnerList(PartnerRequest partnerRequest, LoginUserInfo loginUserInfo, Boolean teamFlag) {
|
public PageInfo<PartnerListVO> getPartnerList(PartnerRequest partnerRequest, LoginUserInfo loginUserInfo, Boolean teamFlag) {
|
||||||
|
|
||||||
List<Long> wantShopAreaIds = new ArrayList<>();
|
List<Long> regionId = new ArrayList<>();
|
||||||
String userId = null;
|
String userId = null;
|
||||||
if(!teamFlag){
|
if(!teamFlag){
|
||||||
userId = loginUserInfo.getUserId();
|
userId = loginUserInfo.getUserId();
|
||||||
}
|
}
|
||||||
if (teamFlag && !sysRoleService.checkIsAdmin(loginUserInfo.getUserId())){
|
if (teamFlag && !sysRoleService.checkIsAdmin(loginUserInfo.getUserId())){
|
||||||
List<Long> list = userAuthMappingService.listWantShopAreaIdByUserId(loginUserInfo.getUserId());
|
List<String> list = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(loginUserInfo.getUserId());
|
||||||
if (CollectionUtils.isNotEmpty(list)){
|
if (CollectionUtils.isNotEmpty(list)){
|
||||||
wantShopAreaIds = list;
|
for (String s : list){
|
||||||
|
regionId.add(Long.valueOf(s));
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
userId = loginUserInfo.getUserId();
|
userId = loginUserInfo.getUserId();
|
||||||
}
|
}
|
||||||
@@ -234,7 +240,7 @@ public class LineServiceImpl implements LineService {
|
|||||||
areaName = hyOpenAreaInfoDO.getAreaPath();
|
areaName = hyOpenAreaInfoDO.getAreaPath();
|
||||||
}
|
}
|
||||||
PageHelper.startPage(partnerRequest.getPageNum(), partnerRequest.getPageSize());
|
PageHelper.startPage(partnerRequest.getPageNum(), partnerRequest.getPageSize());
|
||||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.partnerList(partnerRequest,areaName, userId, wantShopAreaIds);
|
List<LineInfoDO> lineInfoDOS = lineInfoDAO.partnerList(partnerRequest,areaName, userId, regionId);
|
||||||
PageInfo page = new PageInfo(lineInfoDOS);
|
PageInfo page = new PageInfo(lineInfoDOS);
|
||||||
Map<Long, HyPartnerLabelDO> userPortraitMap = deskService.getUserPortraitMap(lineInfoDOS);
|
Map<Long, HyPartnerLabelDO> userPortraitMap = deskService.getUserPortraitMap(lineInfoDOS);
|
||||||
List<Long> wantShopAreaIdList = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
List<Long> wantShopAreaIdList = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
||||||
@@ -252,6 +258,8 @@ public class LineServiceImpl implements LineService {
|
|||||||
List<SigningBaseInfoDO> signingBaseInfoDOS = intentAgreementMapper.selectByLineIds(lineIds);
|
List<SigningBaseInfoDO> signingBaseInfoDOS = intentAgreementMapper.selectByLineIds(lineIds);
|
||||||
Map<Long, Date> dateMap = signingBaseInfoDOS.stream().collect(Collectors.toMap(SigningBaseInfoDO::getLineId, SigningBaseInfoDO::getCreateTime));
|
Map<Long, Date> dateMap = signingBaseInfoDOS.stream().collect(Collectors.toMap(SigningBaseInfoDO::getLineId, SigningBaseInfoDO::getCreateTime));
|
||||||
|
|
||||||
|
List<Long> regionIds = lineInfoDOS.stream().filter(x -> x.getRegionId() != null).map(LineInfoDO::getRegionId).collect(Collectors.toList());
|
||||||
|
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(regionIds);
|
||||||
List<PartnerListVO> result = new ArrayList<>();
|
List<PartnerListVO> result = new ArrayList<>();
|
||||||
lineInfoDOS.forEach(x->{
|
lineInfoDOS.forEach(x->{
|
||||||
BaseInfoVO baseInfoVO = deskService.convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
|
BaseInfoVO baseInfoVO = deskService.convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
|
||||||
@@ -260,6 +268,9 @@ public class LineServiceImpl implements LineService {
|
|||||||
if (date != null){
|
if (date != null){
|
||||||
partnerListVO.setJoinTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, date));
|
partnerListVO.setJoinTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, date));
|
||||||
}
|
}
|
||||||
|
if (regionNameMap!=null){
|
||||||
|
partnerListVO.setRegionName(regionNameMap.get(x.getId()));
|
||||||
|
}
|
||||||
partnerListVO.setUpdateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getUpdateTime()));
|
partnerListVO.setUpdateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getUpdateTime()));
|
||||||
partnerListVO.setLineSourceName(channelMapByIds.get(x.getLineSource()));
|
partnerListVO.setLineSourceName(channelMapByIds.get(x.getLineSource()));
|
||||||
partnerListVO.setJoinStatus(x.getJoinStatus());
|
partnerListVO.setJoinStatus(x.getJoinStatus());
|
||||||
@@ -332,9 +343,9 @@ public class LineServiceImpl implements LineService {
|
|||||||
if (lineInfo==null){
|
if (lineInfo==null){
|
||||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||||
}
|
}
|
||||||
|
lineInfo.setFranchiseBrand(updateLineRequest.getFranchiseBrand());
|
||||||
lineInfo.setJoinMode(updateLineRequest.getJoinMode());
|
lineInfo.setJoinMode(updateLineRequest.getJoinMode());
|
||||||
Long regionId = regionAreaConfigDao.getByWantShopAreaId(updateLineRequest.getWantShopAreaId());
|
lineInfo.setRegionId(updateLineRequest.getRegionId());
|
||||||
lineInfo.setRegionId(regionId);
|
|
||||||
lineInfo.setWantShopAreaId(updateLineRequest.getWantShopAreaId());
|
lineInfo.setWantShopAreaId(updateLineRequest.getWantShopAreaId());
|
||||||
lineInfo.setUsername(updateLineRequest.getLineName());
|
lineInfo.setUsername(updateLineRequest.getLineName());
|
||||||
lineInfo.setUpdateTime(new Date());
|
lineInfo.setUpdateTime(new Date());
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.cool.store.controller.webb;
|
|||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dto.TransferLogDTO;
|
import com.cool.store.dto.TransferLogDTO;
|
||||||
|
import com.cool.store.entity.LineInfoDO;
|
||||||
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
@@ -19,6 +20,9 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
|
|||||||
Reference in New Issue
Block a user