|
|
|
@ -20,14 +20,18 @@ public class DeliveryShopService {
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public void createShopNoById(Long businessId) { |
|
|
|
|
SysBusinessVo sysBusinessVo = sysBusinessMapper.selectVoById(businessId); |
|
|
|
|
SysBusinessVo sysBusinessVo = sysBusinessMapper.selectVoById(businessId); |
|
|
|
|
/* if (sysBusinessVo.getIdCardInfo() == null) { |
|
|
|
|
throw new ServiceException("商家身份证信息未上传"); |
|
|
|
|
}*/ |
|
|
|
|
if (sysBusinessVo.getGoodsTypeId() == null) { |
|
|
|
|
sysBusinessVo.setGoodsTypeId(2L); |
|
|
|
|
} |
|
|
|
|
DeliveryShopNoResp shopNo = deliveryService.createShopNo(sysBusinessVo); |
|
|
|
|
sysBusinessVo.setShopNo(shopNo.getStoreNo()); |
|
|
|
|
UpdateWrapper<SysBusiness> updateWrapper = new UpdateWrapper<>(); |
|
|
|
|
updateWrapper.set("shop_no", shopNo.getStoreNo()); |
|
|
|
|
updateWrapper.set("goods_type_id", sysBusinessVo.getGoodsTypeId()); |
|
|
|
|
updateWrapper.eq("id", businessId); |
|
|
|
|
sysBusinessMapper.update(updateWrapper); |
|
|
|
|
} |
|
|
|
|