加接口+新管家店名名称
This commit is contained in:
@@ -25,9 +25,7 @@ public class UpdateLineRequest {
|
||||
@ApiModelProperty("所属区域")
|
||||
private Long regionId;
|
||||
@NotNull
|
||||
@Min(1)
|
||||
@Max(3)
|
||||
@ApiModelProperty("加盟模式 1-社会加盟模式/加盟部加盟店 2-强加盟模式/加盟公司加盟店 3-加盟公司自有店")
|
||||
@ApiModelProperty("加盟模式 1-社会加盟模式/加盟部加盟店 2-强加盟模式/加盟公司加盟店 3-加盟公司自有店 4-强加盟")
|
||||
private Integer joinMode;
|
||||
@NotNull
|
||||
@ApiModelProperty("加盟品牌")
|
||||
|
||||
@@ -109,4 +109,6 @@ public interface LineService {
|
||||
*/
|
||||
Integer updatePartnerName(String username,Long lineId);
|
||||
|
||||
Integer updateRegionId(Long regionId,Long lineId);
|
||||
|
||||
}
|
||||
|
||||
@@ -109,4 +109,6 @@ public interface ShopService {
|
||||
List<MiniShopsResponse> getShopListSuccessOpen(Long lineId);
|
||||
|
||||
ShopResponse getShopNameAndCode(Long shopId,Long lineId);
|
||||
|
||||
String getFranchiseBrandName(Long shopId);
|
||||
}
|
||||
|
||||
@@ -640,6 +640,17 @@ public class LineServiceImpl implements LineService {
|
||||
return lineInfoDAO.updateLineInfo(lineInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer updateRegionId(Long regionId, Long lineId) {
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||
if (lineInfo == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
lineInfo.setRegionId(regionId);
|
||||
lineInfo.setUpdateTime(new Date());
|
||||
return lineInfoDAO.updateLineInfo(lineInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算预期时间
|
||||
* @param startTime
|
||||
|
||||
@@ -628,5 +628,14 @@ public class ShopServiceImpl implements ShopService {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFranchiseBrandName(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
if (shopInfo == null){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
return FranchiseBrandEnum.getDescByCode(shopInfo.getFranchiseBrand());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ public class SyncDataServiceImpl implements SyncDataService {
|
||||
request.setWqfAccount(shopInfo.getShopCode());
|
||||
request.setDownstreamSystemShopName(shopInfo.getShopName());
|
||||
if (systemType.equals(DownSystemTypeEnum.XGJ)) {
|
||||
//todo
|
||||
request.setDownstreamSystemShopName(getXgjShopName(lineInfoDO, shopInfo));
|
||||
}
|
||||
if (systemType.equals(DownSystemTypeEnum.POS)) {
|
||||
if (buildInformationDO != null) {
|
||||
@@ -242,4 +242,51 @@ public class SyncDataServiceImpl implements SyncDataService {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getXgjShopName(LineInfoDO lineInfoDO, ShopInfoDO shopInfoDO) {
|
||||
if (StringUtils.isBlank(shopInfoDO.getShopCode())) {
|
||||
return null;
|
||||
}
|
||||
if (String.valueOf(FranchiseBrandEnum.ZXJP.getCode()).equals(shopInfoDO.getFranchiseBrand())) {
|
||||
//M10001
|
||||
if (shopInfoDO.getShopCode().matches("M\\d*")) {
|
||||
return "MX" + shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
|
||||
}
|
||||
//FS10001
|
||||
if (shopInfoDO.getShopCode().matches("FS\\d*")) {
|
||||
return "FS" + shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
|
||||
}
|
||||
// MS10001
|
||||
if (shopInfoDO.getShopCode().matches("MS\\d*")) {
|
||||
return "MS" + shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
|
||||
}
|
||||
// S10001
|
||||
if (shopInfoDO.getShopCode().matches("S\\d*")) {
|
||||
return shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
|
||||
}
|
||||
}
|
||||
if (String.valueOf(FranchiseBrandEnum.MZG.getCode()).equals(shopInfoDO.getFranchiseBrand())) {
|
||||
if (shopInfoDO.getShopCode().matches("MZGM\\d*")) {
|
||||
return FranchiseBrandEnum.MZG.getDesc() + shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
|
||||
}
|
||||
if (shopInfoDO.getShopCode().matches("MZGS\\d*")) {
|
||||
return FranchiseBrandEnum.MZG.getDesc() + shopInfoDO.getShopName();
|
||||
}
|
||||
}
|
||||
if (String.valueOf(FranchiseBrandEnum.ZJS.getCode()).equals(shopInfoDO.getFranchiseBrand())) {
|
||||
if (shopInfoDO.getShopCode().matches("LX\\d*")) {
|
||||
return "LX" + FranchiseBrandEnum.ZJS.getDesc() + shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
|
||||
}
|
||||
if (shopInfoDO.getShopCode().matches("X\\d*")) {
|
||||
return "X" + FranchiseBrandEnum.ZJS.getDesc() + shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
|
||||
}
|
||||
if (shopInfoDO.getShopCode().matches("Q\\d*")) {
|
||||
return "Q" + FranchiseBrandEnum.ZJS.getDesc() + shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
|
||||
}
|
||||
if (shopInfoDO.getShopCode().matches("Z\\d*")) {
|
||||
return FranchiseBrandEnum.ZJS.getDesc() + shopInfoDO.getShopName();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,4 +179,11 @@ public class LineInfoController {
|
||||
public ResponseResult<PageInfo<LineVO>> getLines(@RequestBody LinesRequest request) {
|
||||
return ResponseResult.success(lineService.getLines(request));
|
||||
}
|
||||
|
||||
@ApiOperation("修改所属大区/分公司")
|
||||
@GetMapping("/updateLineRegion")
|
||||
public ResponseResult<Integer> updateLineRegion(@RequestParam("regionId")Long regionId,@RequestParam("lineId")Long lineId) {
|
||||
return ResponseResult.success(lineService.updateRegionId(regionId,lineId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -132,5 +132,10 @@ public class MiniShopController {
|
||||
public ResponseResult<ShopResponse> getShopNameAndCode(@RequestParam(name = "shopId",required = false)Long shopId, @RequestParam("lineId")Long lineId) {
|
||||
return ResponseResult.success(shopService.getShopNameAndCode(shopId,lineId));
|
||||
}
|
||||
@ApiOperation("获取店铺所属品牌")
|
||||
@GetMapping("/getFranchiseBrandName")
|
||||
public ResponseResult<String> getFranchiseBrandName(@RequestParam(name = "shopId")Long shopId) {
|
||||
return ResponseResult.success(shopService.getFranchiseBrandName(shopId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user