diff --git a/common-api/src/main/java/cn/lili/controller/common/UploadController.java b/common-api/src/main/java/cn/lili/controller/common/UploadController.java index d57c2d7a..82003a58 100644 --- a/common-api/src/main/java/cn/lili/controller/common/UploadController.java +++ b/common-api/src/main/java/cn/lili/controller/common/UploadController.java @@ -68,7 +68,7 @@ public class UploadController { throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR); } Setting setting = settingService.get(SettingEnum.OSS_SETTING.name()); - if (StrUtil.isEmpty(setting.getSettingValue())) { + if (setting == null || StrUtil.isBlank(setting.getSettingValue())) { throw new ServiceException(ResultCode.OSS_NOT_EXIST); } diff --git a/framework/src/main/java/cn/lili/modules/goods/entity/dos/Category.java b/framework/src/main/java/cn/lili/modules/goods/entity/dos/Category.java index 4dc0933e..d35e73df 100644 --- a/framework/src/main/java/cn/lili/modules/goods/entity/dos/Category.java +++ b/framework/src/main/java/cn/lili/modules/goods/entity/dos/Category.java @@ -52,7 +52,6 @@ public class Category extends BaseEntity { @ApiModelProperty(value = "佣金比例") private Double commissionRate; - @NotEmpty(message = "分类图标不能为空") @ApiModelProperty(value = "分类图标") private String image; diff --git a/framework/src/main/java/cn/lili/modules/store/entity/dto/StoreCompanyDTO.java b/framework/src/main/java/cn/lili/modules/store/entity/dto/StoreCompanyDTO.java index 022538bb..c6761160 100644 --- a/framework/src/main/java/cn/lili/modules/store/entity/dto/StoreCompanyDTO.java +++ b/framework/src/main/java/cn/lili/modules/store/entity/dto/StoreCompanyDTO.java @@ -23,17 +23,11 @@ public class StoreCompanyDTO { @ApiModelProperty(value = "公司名称") private String companyName; - @NotBlank(message = "地址不能为空") - @ApiModelProperty(value = "地址名称, ','分割") - private String storeAddressPath; + @ApiModelProperty(value = "公司地址地区Id") + private String companyAddressIdPath; - @NotBlank(message = "地址ID不能为空") - @ApiModelProperty(value = "地址id,','分割 ") - private String storeAddressIdPath; - - @NotBlank(message = "地址详情") - @ApiModelProperty(value = "地址详情") - private String storeAddressDetail; + @ApiModelProperty(value = "公司地址地区") + private String companyAddressPath; @Size(min = 1, max = 200) @NotBlank(message = "公司地址不能为空") diff --git a/framework/src/main/java/cn/lili/modules/store/entity/dto/StoreOtherInfoDTO.java b/framework/src/main/java/cn/lili/modules/store/entity/dto/StoreOtherInfoDTO.java index ab6caa35..08d35795 100644 --- a/framework/src/main/java/cn/lili/modules/store/entity/dto/StoreOtherInfoDTO.java +++ b/framework/src/main/java/cn/lili/modules/store/entity/dto/StoreOtherInfoDTO.java @@ -37,4 +37,16 @@ public class StoreOtherInfoDTO { @ApiModelProperty(value = "店铺经营类目") private String goodsManagementCategory; + @NotBlank(message = "地址不能为空") + @ApiModelProperty(value = "地址名称, ','分割") + private String storeAddressPath; + + @NotBlank(message = "地址ID不能为空") + @ApiModelProperty(value = "地址id,','分割 ") + private String storeAddressIdPath; + + @NotBlank(message = "地址详情") + @ApiModelProperty(value = "地址详情") + private String storeAddressDetail; + } diff --git a/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java b/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java index 60614ced..2e78ed5a 100644 --- a/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java @@ -239,15 +239,13 @@ public class StoreServiceImpl extends ServiceImpl implements BeanUtil.copyProperties(storeCompanyDTO, storeDetail); return storeDetailService.save(storeDetail); } else { - store.setStoreAddressDetail(storeCompanyDTO.getStoreAddressDetail()); - store.setStoreAddressIdPath(storeCompanyDTO.getStoreAddressIdPath()); - store.setStoreAddressPath(storeCompanyDTO.getStoreAddressPath()); - this.saveOrUpdate(store); + BeanUtil.copyProperties(storeCompanyDTO, store); + this.updateById(store); + //判断是否存在店铺详情,如果没有则进行新建,如果存在则进行修改 + StoreDetail storeDetail = storeDetailService.getStoreDetail(store.getId()); + BeanUtil.copyProperties(storeCompanyDTO, storeDetail); + return storeDetailService.updateById(storeDetail); } - //判断是否存在店铺详情,如果没有则进行新建,如果存在则进行修改 - StoreDetail storeDetail = storeDetailService.getStoreDetail(store.getId()); - BeanUtil.copyProperties(storeCompanyDTO, storeDetail); - return storeDetailService.updateById(storeDetail); } @Override @@ -265,6 +263,9 @@ public class StoreServiceImpl extends ServiceImpl implements public boolean applyThirdStep(StoreOtherInfoDTO storeOtherInfoDTO) { //获取当前操作的店铺 Store store = getStoreByMember(); + BeanUtil.copyProperties(storeOtherInfoDTO, store); + this.updateById(store); + StoreDetail storeDetail = storeDetailService.getStoreDetail(store.getId()); //设置店铺的其他信息 BeanUtil.copyProperties(storeOtherInfoDTO, storeDetail);