| | |
| | | } |
| | | } |
| | | if(newShop){ |
| | | //生成商户关联记录 |
| | | initNewShop(shop,mgtEditShopDto.getUserId()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 商户关联类初始化 |
| | | * @author jqs |
| | | * @date 2023/7/7 11:25 |
| | | * @param shop |
| | | * @param userId |
| | | * @return void |
| | | */ |
| | | private void initNewShop(Shop shop,Long userId){ |
| | | BigDecimal zeroBig = new BigDecimal("0.00"); |
| | | //商户账户信息初始化 |
| | | ShopAccount shopAccount = new ShopAccount(); |
| | | shopAccount.setShopId(shop.getShopId()); |
| | |
| | | shopProportion.setShopType(shop.getShopType()); |
| | | shopProportion.setProportionPercent(new BigDecimal("100.00")); |
| | | shopProportion.setUpdateTime(new Date()); |
| | | shopProportion.setUpdateUserId(mgtEditShopDto.getUserId()); |
| | | shopProportion.setUpdateUserId(userId); |
| | | shopProportionService.save(shopProportion); |
| | | //商户统计 |
| | | ShopTotal shopTotal = new ShopTotal(); |
| | |
| | | shopTotal.setTotalServiceMoney(zeroBig); |
| | | shopTotal.setTotalGoodsMoney(zeroBig); |
| | | shopTotalService.save(shopTotal); |
| | | } |
| | | } |
| | | |
| | | /** |