新建分店接口

This commit is contained in:
shuo.wang
2025-01-08 16:08:56 +08:00
parent 3579bb5f7c
commit 96f8ad4a7e
8 changed files with 144 additions and 2 deletions

View File

@@ -111,4 +111,20 @@ public class ShopInfoDO {
@Column(name = "update_time")
private Date updateTime;
@Column(name = "join_mode")
private Integer joinMode;
@Column(name = "franchise_brand")
private String franchiseBrand;
@Column(name = "development_manager")
private String developmentManager;
@Column(name = "want_shop_area_id")
private Long wantShopAreaId;
@Column(name = "investment_manager")
private String investmentManager;
@Column(name = "shop_status")
private Integer shopStatus;
}

View File

@@ -0,0 +1,61 @@
package com.cool.store.request;
import com.cool.store.entity.ShopInfoDO;
import com.cool.store.enums.point.ShopStageEnum;
import com.cool.store.enums.point.ShopStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
* @Author: WangShuo
* @Date: 2025/01/08/下午2:20
* @Version 1.0
* @注释:
*/
@Data
public class AddBranchShopRequest {
@NotNull
private Long lineId;
@ApiModelProperty("门店名称")
@NotBlank
private String shopName;
@ApiModelProperty("意向开店区域")
@NotNull
private Long wantShopAreaId;
@NotNull
@Min(1)
@Max(3)
@ApiModelProperty(" //'1-社会加盟模式/加盟部加盟店 2-强加盟模式/加盟公司加盟店 3-加盟公司自有店',")
private Integer joinMode;
@ApiModelProperty("督导")
private String investmentManagerUserId;
@NotNull
@ApiModelProperty("所属大区")
private Long regionId;
public ShopInfoDO toDO(AddBranchShopRequest request,String partnerId){
ShopInfoDO shopInfoDO = new ShopInfoDO();
shopInfoDO.setLineId(request.getLineId());
shopInfoDO.setShopName(request.getShopName());
shopInfoDO.setRegionId(request.getRegionId());
shopInfoDO.setShopName(request.getShopName());
shopInfoDO.setWantShopAreaId(request.getWantShopAreaId());
shopInfoDO.setJoinMode(request.getJoinMode());
shopInfoDO.setInvestmentManager(request.getInvestmentManagerUserId());
shopInfoDO.setDevelopmentManager(request.getInvestmentManagerUserId());
shopInfoDO.setSupervisorUserId(request.getInvestmentManagerUserId());
shopInfoDO.setCreateTime(new Date());
shopInfoDO.setShopStatus(ShopStatusEnum.ING.getCode());
shopInfoDO.setShopStage(ShopStageEnum.SHOP_STAGE_1.getShopStage());
shopInfoDO.setPartnerId(partnerId);
return shopInfoDO;
}
}