Merge branch 'cc_20250818_shopCodeFix' into 'master'

feat:更新门店数据

See merge request hangzhou/java/custom_zxjp!152
This commit is contained in:
苏竹红
2025-08-18 11:03:52 +00:00

View File

@@ -434,13 +434,15 @@ public class ShopServiceImpl implements ShopService {
@Override @Override
public Integer updateBranchShopDetail(BranchShopDetailRequest request, String userId) { public Integer updateBranchShopDetail(BranchShopDetailRequest request, String userId) {
//检验门店编码是否重复 //检验门店编码是否重复
if(this.checkShopCodeRepeat(request.getShopCode(), request.getShopId())){ if(StringUtils.isNotEmpty(request.getShopCode())&&this.checkShopCodeRepeat(request.getShopCode(), request.getShopId())){
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST); throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
} }
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId()); ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
shopInfo.setUpdateUserId(userId); shopInfo.setUpdateUserId(userId);
shopInfo.setUpdateTime(new Date()); shopInfo.setUpdateTime(new Date());
shopInfo.setShopCode(request.getShopCode().trim()); if (StringUtils.isNotEmpty(request.getShopCode())){
shopInfo.setShopCode(request.getShopCode().trim());
}
shopInfo.setShopName(request.getShopName()); shopInfo.setShopName(request.getShopName());
shopInfo.setWantShopAreaId(request.getWantShopAreaId()); shopInfo.setWantShopAreaId(request.getWantShopAreaId());
shopInfo.setRegionId(request.getRegionId()); shopInfo.setRegionId(request.getRegionId());