From fa960ac22a90b4d960865a66f88558924720d608 Mon Sep 17 00:00:00 2001 From: jiangqs <jiangqs> Date: 星期三, 07 六月 2023 18:00:53 +0800 Subject: [PATCH] 基础配置 --- ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java index d656658..b549e3b 100644 --- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java +++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java @@ -83,6 +83,10 @@ @Resource private ShopAuthenticationService shopAuthenticationService; + @Resource + private ShopProportionService shopProportionService; + + /** * 获取商户详情 @@ -220,6 +224,7 @@ } } if(newShop){ + //商户账户信息初始化 ShopAccount shopAccount = new ShopAccount(); shopAccount.setShopId(shop.getShopId()); shopAccount.setDelFlag(0); @@ -228,13 +233,23 @@ shopAccount.setTotalRefund(new BigDecimal("0")); shopAccount.setTotalProfitsharing(new BigDecimal("0")); shopAccount.setTotalMoney(new BigDecimal("0")); - shopAccountService.saveOrUpdate(shopAccount); + shopAccountService.save(shopAccount); + //商户认证信息初始化 String authId = IdUtils.simpleUUID(); ShopAuthentication shopAuthentication = new ShopAuthentication(); shopAuthentication.setAuthId(authId); shopAuthentication.setDelFlag(0); shopAuthentication.setShopId(shop.getShopId()); - shopAuthenticationService.saveOrUpdate(shopAuthentication); + shopAuthenticationService.save(shopAuthentication); + //商户分成信息初始化 + ShopProportion shopProportion = new ShopProportion(); + shopProportion.setDelFlag(0); + shopProportion.setShopId(shop.getShopId()); + shopProportion.setShopType(shop.getShopType()); + shopProportion.setProportionPercent(new BigDecimal("100.00")); + shopProportion.setUpdateTime(new Date()); + shopProportion.setUpdateUserId(MGTEditShopDto.getUserId()); + shopProportionService.save(shopProportion); } } -- Gitblit v1.7.1