This commit is contained in:
guohb
2024-05-28 15:19:01 +08:00
parent 9cc17211bc
commit 6041f49efa
2 changed files with 6 additions and 0 deletions

View File

@@ -59,6 +59,10 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
franchiseFeeDO.setId(request.getId());
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
} else {
FranchiseFeeDO isExist = franchiseFeeMapper.selectByShopId(request.getShopId());
if (Objects.nonNull(isExist)){
throw new ServiceException(ErrorCodeEnum.UNISSUED_STATEMENT_2);
}
franchiseFeeMapper.insertSelective(franchiseFeeDO);
}
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());