开新店
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
package com.cool.store.dto.partner;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/4/1 11:30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class PartnerOpenNewShopPageDTO {
|
||||
|
||||
@ApiModelProperty("记录id")
|
||||
private Long recordId;
|
||||
|
||||
@ApiModelProperty("线索ID")
|
||||
private Long lineId;
|
||||
|
||||
@ApiModelProperty("加盟商编号")
|
||||
private String partnerNum;
|
||||
|
||||
@ApiModelProperty("线索名称")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("意向加盟区域")
|
||||
private Long wantShopAreaId;
|
||||
|
||||
@ApiModelProperty("线索标签")
|
||||
private String userPortrait;
|
||||
|
||||
@ApiModelProperty("意向开店数量")
|
||||
private Integer wantShopNum;
|
||||
|
||||
@ApiModelProperty("扩展经理名称")
|
||||
private String developmentManager;
|
||||
|
||||
@ApiModelProperty("线索来源名称")
|
||||
private Integer lineSource;
|
||||
|
||||
@ApiModelProperty("审核状态 0待审核 1通过 2不通过")
|
||||
private Integer auditResult;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
@Data
|
||||
@Table(name = "xfsg_open_new_shop_record")
|
||||
public class OpenNewShopRecordDO {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 线索id
|
||||
*/
|
||||
@Column(name = "line_id")
|
||||
private Long lineId;
|
||||
|
||||
/**
|
||||
* 新开意向店铺数量
|
||||
*/
|
||||
@Column(name = "new_want_shop_num")
|
||||
private Integer newWantShopNum;
|
||||
|
||||
/**
|
||||
* 现有资金
|
||||
*/
|
||||
private Integer fund;
|
||||
|
||||
/**
|
||||
* 审核状态 0待审核 1通过 2不通过
|
||||
*/
|
||||
@Column(name = "audit_result")
|
||||
private Integer auditResult;
|
||||
|
||||
/**
|
||||
* 删除标识
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -24,4 +24,11 @@ public class AddShopRequest {
|
||||
@ApiModelProperty("店铺名称")
|
||||
private List<String> shopNameList;
|
||||
|
||||
public AddShopRequest() {
|
||||
}
|
||||
|
||||
public AddShopRequest(Long lineId, List<String> shopNameList) {
|
||||
this.lineId = lineId;
|
||||
this.shopNameList = shopNameList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: AuditOpenNewShopRequest
|
||||
* @Description:
|
||||
* @date 2024-05-09 17:28
|
||||
*/
|
||||
@Data
|
||||
public class AuditOpenNewShopRequest {
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty("记录id")
|
||||
private Long recordId;
|
||||
|
||||
@NotNull
|
||||
@Min(1)@Max(2)
|
||||
@ApiModelProperty("审核状态 0待审核 1通过 2不通过")
|
||||
private Integer auditResult;
|
||||
|
||||
@ApiModelProperty("店铺名称")
|
||||
private List<String> shopNameList;
|
||||
|
||||
public boolean check(){
|
||||
if(CommonConstants.ONE == this.auditResult && CollectionUtils.isEmpty(this.shopNameList)){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/4/1 11:21
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class PartnerOpenNewShopPageRequest extends PageBasicInfo {
|
||||
|
||||
@ApiModelProperty("加盟上姓名或者手机号")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("意向区域ID")
|
||||
private Long wantShopAreaId;
|
||||
|
||||
@ApiModelProperty("审核状态 0待审核 1通过 2不通过")
|
||||
private Integer auditResult;
|
||||
|
||||
@ApiModelProperty(value = "招商经理", hidden = true)
|
||||
private String investmentManager;
|
||||
|
||||
@ApiModelProperty(value = "区域路径", hidden = true)
|
||||
private String areaPath;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.entity.OpenNewShopRecordDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: SubmitOpenNewShopRequest
|
||||
* @Description:
|
||||
* @date 2024-05-10 10:17
|
||||
*/
|
||||
@Data
|
||||
public class SubmitOpenNewShopRequest {
|
||||
|
||||
@ApiModelProperty(value = "线索id", required = true)
|
||||
private Long lineId;
|
||||
|
||||
@NotNull
|
||||
@Min(1)@Max(10)
|
||||
@ApiModelProperty("新开意向店铺数量")
|
||||
private Integer newWantShopNum;
|
||||
|
||||
@Max(99999)
|
||||
@ApiModelProperty("现有资金")
|
||||
private Integer fund;
|
||||
|
||||
public OpenNewShopRecordDO convertDO(){
|
||||
OpenNewShopRecordDO result = new OpenNewShopRecordDO();
|
||||
result.setLineId(this.lineId);
|
||||
result.setNewWantShopNum(this.newWantShopNum);
|
||||
result.setFund(this.fund);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import com.cool.store.entity.OpenNewShopRecordDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: PartnerOpenNewShopDetailVO
|
||||
* @Description:加盟商开新店申请详情
|
||||
* @date 2024-05-10 10:04
|
||||
*/
|
||||
@Data
|
||||
public class PartnerOpenNewShopDetailVO {
|
||||
|
||||
@ApiModelProperty("记录id")
|
||||
private Long recordId;
|
||||
|
||||
@ApiModelProperty("线索id")
|
||||
private Long lineId;
|
||||
|
||||
@ApiModelProperty("新开意向店铺数量")
|
||||
private Integer newWantShopNum;
|
||||
|
||||
@ApiModelProperty("现有资金")
|
||||
private Integer fund;
|
||||
|
||||
@ApiModelProperty("审核结果 0通过,1拒绝")
|
||||
private Integer auditResult;
|
||||
|
||||
public static PartnerOpenNewShopDetailVO convert(OpenNewShopRecordDO openNewShopRecord) {
|
||||
if(Objects.isNull(openNewShopRecord)){
|
||||
return null;
|
||||
}
|
||||
PartnerOpenNewShopDetailVO result = new PartnerOpenNewShopDetailVO();
|
||||
result.setRecordId(openNewShopRecord.getId());
|
||||
result.setLineId(openNewShopRecord.getLineId());
|
||||
result.setNewWantShopNum(openNewShopRecord.getNewWantShopNum());
|
||||
result.setFund(openNewShopRecord.getFund());
|
||||
result.setAuditResult(openNewShopRecord.getAuditResult());
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import com.cool.store.dto.partner.PartnerOpenNewShopPageDTO;
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/4/1 11:30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class PartnerOpenNewShopPageVO {
|
||||
|
||||
@ApiModelProperty("记录id")
|
||||
private Long recordId;
|
||||
|
||||
@ApiModelProperty("线索ID")
|
||||
private Long lineId;
|
||||
|
||||
@ApiModelProperty("加盟商编号")
|
||||
private String partnerNum;
|
||||
|
||||
@ApiModelProperty("线索名称")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("意向加盟区域")
|
||||
private String wantShopAreaName;
|
||||
|
||||
@ApiModelProperty("线索标签")
|
||||
private List<String> userPortraitList;
|
||||
|
||||
@ApiModelProperty("意向开店数量")
|
||||
private Integer wantShopNum;
|
||||
|
||||
@ApiModelProperty("扩展经理名称")
|
||||
private String developmentManagerUserName;
|
||||
|
||||
@ApiModelProperty("线索来源名称")
|
||||
private String lineSourceName;
|
||||
|
||||
@ApiModelProperty("加盟时间")
|
||||
private Date joinTime;
|
||||
|
||||
@ApiModelProperty("审核状态 0待审核 1通过 2不通过")
|
||||
private Integer auditResult;
|
||||
|
||||
public static List<PartnerOpenNewShopPageVO> convertList(List<PartnerOpenNewShopPageDTO> list, Map<Long, Date> joinTimeMap, Map<Long, String> wantShopAreaMap,
|
||||
Map<String, String> userNameMap, Map<Integer, String> channelMap, Map<Long, String> userPortraitMap){
|
||||
if(CollectionUtils.isEmpty(list)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
List<PartnerOpenNewShopPageVO> resultList = new ArrayList<>();
|
||||
for (PartnerOpenNewShopPageDTO page : list) {
|
||||
PartnerOpenNewShopPageVO result = new PartnerOpenNewShopPageVO();
|
||||
result.setRecordId(page.getRecordId());
|
||||
result.setLineId(page.getLineId());
|
||||
result.setPartnerNum(page.getPartnerNum());
|
||||
result.setUsername(page.getUsername());
|
||||
result.setMobile(page.getMobile());
|
||||
result.setWantShopAreaName(wantShopAreaMap.get(page.getWantShopAreaId()));
|
||||
result.setWantShopNum(page.getWantShopNum());
|
||||
result.setDevelopmentManagerUserName(userNameMap.get(page.getDevelopmentManager()));
|
||||
result.setLineSourceName(channelMap.get(page.getLineSource()));
|
||||
result.setJoinTime(joinTimeMap.get(page.getLineId()));
|
||||
result.setAuditResult(page.getAuditResult());
|
||||
List<String> userPortraitList = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(page.getUserPortrait())){
|
||||
String[] parts = page.getUserPortrait().split(",");
|
||||
for (String part : parts) {
|
||||
String trimmedPart = part.trim();
|
||||
if (StringUtils.isNotBlank(trimmedPart)) {
|
||||
String s = userPortraitMap.get(Long.valueOf(part));
|
||||
if(StringUtils.isNotBlank(s)){
|
||||
userPortraitList.add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
result.setUserPortraitList(userPortraitList);
|
||||
}
|
||||
resultList.add(result);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user