Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop

This commit is contained in:
Chopper 2021-11-16 15:27:47 +08:00
commit f9112c4b39
3 changed files with 19 additions and 2 deletions

View File

@ -180,11 +180,28 @@ public class StoreDetail extends BaseIdEntity {
public StoreDetail(Store store, AdminStoreApplyDTO adminStoreApplyDTO) {
this.storeId = store.getId();
//过滤字段值
isNotNull(adminStoreApplyDTO);
//设置店铺公司信息设置店铺银行信息设置店铺其他信息
BeanUtil.copyProperties(adminStoreApplyDTO, this);
this.settlementDay = DateUtil.date();
this.stockWarning = 10;
}
public void isNotNull(AdminStoreApplyDTO adminStoreApplyDTO){
if("null".equals(adminStoreApplyDTO.getSalesConsigneeName())){
adminStoreApplyDTO.setSalesConsigneeName("");
}
if("null".equals(adminStoreApplyDTO.getSalesConsigneeMobile())){
adminStoreApplyDTO.setSalesConsigneeMobile("");
}
if("null".equals(adminStoreApplyDTO.getSalesConsigneeDetail())){
adminStoreApplyDTO.setSalesConsigneeDetail("");
}
if("null".equals(adminStoreApplyDTO.getDdCode())){
adminStoreApplyDTO.setDdCode("");
}
}
}

View File

@ -75,7 +75,8 @@ public class StoreDetailServiceImpl extends ServiceImpl<StoreDetailMapper, Store
@Override
public StoreDetailVO getStoreDetailVO(String storeId) {
return this.baseMapper.getStoreDetail(storeId);
StoreDetailVO storeDetail = this.baseMapper.getStoreDetail(storeId);
return storeDetail;
}
@Override

View File

@ -115,7 +115,6 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
if (Boolean.TRUE.equals(member.getHaveStore())) {
throw new ServiceException(ResultCode.STORE_APPLY_DOUBLE_ERROR);
}
//添加店铺
Store store = new Store(member, adminStoreApplyDTO);
this.save(store);