From 9006b9705a222cce51daf973fa1bb989cbd2a873 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期四, 26 十二月 2024 13:54:10 +0800
Subject: [PATCH] 合并代码

---
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/CommissionServiceImpl.java           |    6 +-
 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/Price.java                                     |    2 
 ruoyi-service/ruoyi-account/src/main/resources/mapper/account/AgentApplicationMapper.xml                  |    6 ++
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java                   |    6 +-
 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AgentApplicationServiceImpl.java |   12 ++++-
 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java    |    8 ++--
 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java        |   16 ++++----
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java                    |   10 ++---
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java         |    2 
 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/OrderGood.java                              |    2 
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java                   |    2 
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/RefundPassController.java              |    4 +-
 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java             |    8 ++--
 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/MyShoppingCartVo.java                          |    2 
 ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java            |    2 
 ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/GoodsVip.java                          |    2 
 ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AgentApplication.java               |    3 +
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java                |    1 
 18 files changed, 53 insertions(+), 41 deletions(-)

diff --git a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java
index a9d893c..9acea8a 100644
--- a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java
+++ b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java
@@ -80,5 +80,5 @@
 
 
 	@PostMapping("/app-user/getAppUserByPhone1")
-	R<AppUser> getAppUserByPhone1(String phone);
+	R<AppUser> getAppUserByPhone1(@RequestParam("phone") String phone);
 }
diff --git a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AgentApplication.java b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AgentApplication.java
index a603a7d..a43adfe 100644
--- a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AgentApplication.java
+++ b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AgentApplication.java
@@ -90,5 +90,8 @@
     @TableField(exist = false)
     private VipSettingDto vipSettingDto;
 
+    @TableField(exist = false)
+    private String idStr;
+
 
 }
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/OrderGood.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/OrderGood.java
index 6545aff..fff54b2 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/OrderGood.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/OrderGood.java
@@ -76,7 +76,7 @@
     
     @ApiModelProperty(value = "获取返佣积分上级类型(1=直推上级,2=直帮上级)")
     @TableField("superior_type")
-    private String superiorType;
+    private Integer superiorType;
 
     @ApiModelProperty(value = "获取分佣金额上级类型(1=直推上级,2=直帮上级)")
     @TableField("superior_price_type")
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/MyShoppingCartVo.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/MyShoppingCartVo.java
index df3d45f..dbf7ed5 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/MyShoppingCartVo.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/MyShoppingCartVo.java
@@ -56,7 +56,7 @@
 	/**
 	 * 获取返佣积分上级类型(1=直推上级,2=直帮上级)
 	 */
-	private String superiorType;
+	private Integer superiorType;
 	/**
 	 * 核销门店可获得服务费
 	 */
diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/Price.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/Price.java
index c834d14..729ea24 100644
--- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/Price.java
+++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/Price.java
@@ -41,7 +41,7 @@
     /**
      * 获取返佣积分上级类型(1=直推上级,2=直帮上级)
      */
-    private String superiorType;
+    private Integer superiorType;
     /**
      * 核销门店可获得服务费
      */
diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/GoodsVip.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/GoodsVip.java
index 98ccca5..50de3d6 100644
--- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/GoodsVip.java
+++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/GoodsVip.java
@@ -70,7 +70,7 @@
 
     @ApiModelProperty(value = "获取返佣积分上级类型(1=直推上级,2=直帮上级)")
     @TableField("superior_type")
-    private String  superiorType;
+    private String superiorType;
 
     @ApiModelProperty(value = "获取分佣金额上级类型(1=直推上级,2=直帮上级)")
     @TableField("superior_price_type")
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java
index fb2524d..d9abd28 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java
@@ -56,12 +56,12 @@
     @GetMapping("/detail")
     @ApiOperation(value = "会员申请详情", tags = {"会员中心-小程序"})
     public R<AgentApplication> detail(@RequestParam Long id) {
-        R<VipSetting> vipSetting = vipSettingClient.getVipSetting(id.intValue());
+        AgentApplication agentApplication = agentApplicationService.getById(id);
+        R<VipSetting> vipSetting = vipSettingClient.getVipSetting(agentApplication.getApplicationVipId());
         VipSettingDto vipSettingDto = new VipSettingDto();
         BeanUtils.copyProperties(vipSetting.getData(),vipSettingDto);
-        AgentApplication byId = agentApplicationService.getById(id);
-        byId.setVipSettingDto(vipSettingDto);
-        return R.ok(byId);
+        agentApplication.setVipSettingDto(vipSettingDto);
+        return R.ok(agentApplication);
     }
     @Resource
     private UserChangeLogService userChangeLogService;
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
index 41cf35c..6a56371 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -389,10 +389,10 @@
      */
     @GetMapping("/getAppuserPage")
     @ApiOperation(value = "用户列表", tags = {"管理后台"})
-    public R<IPage<AppUser>> getAppuserPage(@ApiParam("页码") @RequestParam Integer pageCurr,
+    public R<IPage<AppUser>> getAppuserPage(@ApiParam("页码") @RequestParam Integer pageNum,
                                             @ApiParam("每一页数据大小") Integer pageSize,
                                             AppUser appUser) {
-        IPage<AppUser> appuserPage = appUserService.getAppuserPage(pageCurr, pageSize, appUser);
+        IPage<AppUser> appuserPage = appUserService.getAppuserPage(pageNum, pageSize, appUser);
         return R.ok(appuserPage);
     }
 
@@ -714,14 +714,14 @@
      * @return
      */
     @PostMapping("/upload")
-    public R<String> upload(MultipartFile file){
+    public String upload(MultipartFile file){
         String s = null;
         try {
             s = ObsUploadUtil.obsUpload(file);
         } catch (IOException e) {
             throw new RuntimeException(e);
         }
-        return R.ok(s);
+        return s;
     }
 }
 
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AgentApplicationServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AgentApplicationServiceImpl.java
index 5c148d8..5465fac 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AgentApplicationServiceImpl.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AgentApplicationServiceImpl.java
@@ -6,10 +6,12 @@
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.account.api.model.AgentApplication;
 import com.ruoyi.account.api.model.AppUser;
+import com.ruoyi.account.api.model.AppUserShop;
 import com.ruoyi.account.dto.AgentQuery;
 import com.ruoyi.account.mapper.AgentApplicationMapper;
 import com.ruoyi.account.service.AgentApplicationService;
 import com.ruoyi.account.service.AppUserService;
+import com.ruoyi.account.service.AppUserShopService;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.security.service.TokenService;
 import com.ruoyi.other.api.domain.Shop;
@@ -42,6 +44,11 @@
     @Resource
     private ShopClient shopClient;
 
+    @Resource
+    private AppUserShopService appUserShopService;
+
+
+
     @Override
     public void apply(AgentApplication agentApplication) {
         LoginUser loginUserApplet = tokenService.getLoginUserApplet();
@@ -66,9 +73,8 @@
         agentApplication.setDirectAgentNum(directAgentUserList.size());
 
         // 已绑定门店数量
-        R<List<Shop>> R = shopClient.getShopByUserIds(Collections.singletonList(loginUserApplet.getUserid()));
-        List<Shop> shopList = R.getData();
-        agentApplication.setBindShopNum(shopList.size());
+        long count = appUserShopService.count(new LambdaQueryWrapper<AppUserShop>().eq(AppUserShop::getAppUserId, loginUserApplet.getUserid()));
+        agentApplication.setBindShopNum(Long.valueOf(count).intValue());
         agentApplicationMapper.insert(agentApplication);
     }
 
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java
index db49f8f..f310b65 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java
@@ -58,7 +58,7 @@
         VipSetting vipSetting = vipSettingService.getVipSettingById(4);
         // 获取通过消费积分达成会员等级的开关
         Integer vipLevelUpShopRole = vipSetting.getVipLevelUpShopRole();
-        if (vipLevelUpShopRole == 1){
+        if (null != vipLevelUpShopRole && vipLevelUpShopRole == 1){
             // 消费积分阈值
             Integer vipLevelUpShop = vipSetting.getVipLevelUpShop();
             // 返佣积分阈值
@@ -70,7 +70,7 @@
         }
 
         Integer vipLevelUpNumRole = vipSetting.getVipLevelUpNumRole();
-        if (vipLevelUpNumRole == 1){
+        if (null != vipLevelUpNumRole && vipLevelUpNumRole == 1){
             // 直推钻石用户数阈值
             Integer vipDirectNum = vipSetting.getVipDirectNum();
             // 获取用户直推钻石用户数量
@@ -115,7 +115,7 @@
         VipSetting vipSetting = vipSettingService.getVipSettingById(5);
         // 获取通过消费积分达成会员等级的开关
         Integer vipLevelUpShopRole = vipSetting.getVipLevelUpShopRole();
-        if (vipLevelUpShopRole == 1){
+        if (null != vipLevelUpShopRole && vipLevelUpShopRole == 1){
             // 消费积分阈值
             Integer vipLevelUpShop = vipSetting.getVipLevelUpShop();
             // 返佣积分阈值
@@ -127,7 +127,7 @@
         }
 
         Integer vipLevelUpNumRole = vipSetting.getVipLevelUpNumRole();
-        if (vipLevelUpNumRole == 1){
+        if (null != vipLevelUpNumRole && vipLevelUpNumRole == 1){
             // 直推钻石用户数阈值
             Integer vipDirectNum = vipSetting.getVipDirectNum();
             // 获取用户直推钻石用户数量
@@ -178,7 +178,7 @@
         Integer sharePoint = appUser.getSharePoint();
         // 获取通过消费积分达成会员等级的开关
         Integer vipLevelUpShopRole = vipSetting.getVipLevelUpShopRole();
-        if (vipLevelUpShopRole == 1){
+        if (null != vipLevelUpShopRole && vipLevelUpShopRole == 1){
             // 消费积分阈值
             Integer vipLevelUpShop = vipSetting.getVipLevelUpShop();
             // 返佣积分阈值
@@ -190,7 +190,7 @@
         }
 
         Integer vipLevelUpNumRole = vipSetting.getVipLevelUpNumRole();
-        if (vipLevelUpNumRole == 1){
+        if (null != vipLevelUpNumRole && vipLevelUpNumRole == 1){
             // 直推代理用户数阈值
             Integer vipDirectNum = vipSetting.getVipDirectNum();
             // 准代理用户数阈值
@@ -244,7 +244,7 @@
         VipSetting vipSetting = vipSettingService.getVipSettingById(7);
         // 获取通过消费积分达成会员等级的开关
         Integer vipLevelUpShopRole = vipSetting.getVipLevelUpShopRole();
-        if (vipLevelUpShopRole == 1){
+        if (null != vipLevelUpShopRole && vipLevelUpShopRole == 1){
             // 消费积分阈值
             Integer vipLevelUpShop = vipSetting.getVipLevelUpShop();
             // 返佣积分阈值
@@ -255,7 +255,7 @@
             }
 
             Integer vipLevelUpNumRole = vipSetting.getVipLevelUpNumRole();
-            if (vipLevelUpNumRole == 1){
+            if (null != vipLevelUpNumRole && vipLevelUpNumRole == 1){
                 // 直推代理用户数阈值
                 Integer vipDirectNum = vipSetting.getVipDirectNum();
                 // 准代理用户数阈值
diff --git a/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/AgentApplicationMapper.xml b/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/AgentApplicationMapper.xml
index e4b75ad..e408dac 100644
--- a/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/AgentApplicationMapper.xml
+++ b/ruoyi-service/ruoyi-account/src/main/resources/mapper/account/AgentApplicationMapper.xml
@@ -24,7 +24,11 @@
         id, app_user_id, application_vip_id, application_time, status, shop_point, share_point, direct_vip_num, direct_agent_num, bind_shop_num, remark, del_flag, create_time
     </sql>
     <select id="pageList" resultType="com.ruoyi.account.api.model.AgentApplication">
-        select t1.*,t2.name as userName,t2.phone as userPhone
+        select
+        t1.*,
+        t1.id as idStr,
+        t2.name as userName,
+        t2.phone as userPhone
         from t_agent_application t1
         left join t_app_user t2 on t1.app_user_id = t2.id
         <where>
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
index 8c668ec..bffa467 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -230,7 +230,7 @@
     }
     @PostMapping("/byShopId")
     public R<List<Order>> byShopId(@RequestParam("shopId") Integer shopId){
-        return R.ok(orderService.lambdaQuery().isNotNull(Order::getEndTime).eq(Order::getShopId, shopId).groupBy(Order::getAppUserId).list());
+        return R.ok(orderService.lambdaQuery().isNotNull(Order::getEndTime).eq(Order::getShopId, shopId).list());
     }
 
     
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/RefundPassController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/RefundPassController.java
index 6affa54..2bb8ac1 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/RefundPassController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/RefundPassController.java
@@ -98,13 +98,13 @@
 	
 	
 	@ResponseBody
-	@PutMapping("/deliverGoodsRefundPass/{id}/{code}")
+	@PostMapping("/deliverGoodsRefundPass")
 	@ApiOperation(value = "售后已发货操作", tags = {"我的订单-个人中心-小程序"})
 	@ApiImplicitParams({
 			@ApiImplicitParam(name = "id", value = "售后数据id", required = true, dataType = "long"),
 			@ApiImplicitParam(name = "code", value = "快递单号", required = true, dataType = "string"),
 	})
-	public R deliverGoodsRefundPass(@PathVariable("id") Long id, @PathVariable("code") String code){
+	public R deliverGoodsRefundPass(@RequestParam("id") String id, @RequestParam("code") String code){
 		RefundPass refundPass = refundPassService.getById(id);
 		if(null == refundPass){
 			return R.fail();
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/CommissionServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/CommissionServiceImpl.java
index 4bedbeb..b31cce9 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/CommissionServiceImpl.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/CommissionServiceImpl.java
@@ -95,8 +95,8 @@
             for (OrderGood og : v) {// 累计分销金额
 
                 // 直推上级分佣金额
-                String superiorType = og.getSuperiorType();
-                if (superiorType.contains("1") && inviteUser != null){
+                Integer superiorType = og.getSuperiorType();
+                if (superiorType == 1 && inviteUser != null){
                     // 分佣金额
                     BigDecimal superiorSubcommission = og.getSuperiorSubcommission();
                     BigDecimal totalDistributionAmount = inviteUser.getTotalDistributionAmount();
@@ -112,7 +112,7 @@
                     appUserClient.editAppUserById(inviteUser);
                 }else
                     // 直帮上级分佣金额
-                    if (superiorType.contains("2") && superiorLeader != null){
+                    if (superiorType == 2 && superiorLeader != null){
                         // 分佣金额
                         BigDecimal superiorSubcommission = og.getSuperiorSubcommission();
                         BigDecimal totalDistributionAmount = superiorLeader.getTotalDistributionAmount();
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
index c71b1b9..c04e268 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -258,7 +258,7 @@
 			price.setEarnSpendingPoints(goodsSeckill.getEarnSpendingPoints());
 			price.setSuperiorSubcommission(goodsSeckill.getSuperiorSubcommission());
 			price.setSuperiorRebatePoints(goodsSeckill.getSuperiorRebatePoints());
-			price.setSuperiorType(String.valueOf(goodsSeckill.getSuperiorType()));
+			price.setSuperiorType(goodsSeckill.getSuperiorType());
 			price.setServuceShopCharges(goodsSeckill.getServuceShopCharges());
 			price.setServuceShopPoints(goodsSeckill.getServuceShopPoints());
 			price.setTechnicianPoints(goodsSeckill.getTechnicianPoints());
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java
index 8114a0d..d2adcc3 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java
@@ -148,13 +148,13 @@
 
     @ApiOperation(value = "广告管理-分享管理-列表", tags = {"管理后台"})
     @GetMapping("/manage/list")
-    public R<Page<Share>> managelist(String name, Integer addType, @RequestParam Integer pageNum, Integer pageSize) {
+    public R<Page<Share>> managelist(String name, Integer addType, @RequestParam Integer pageCurr, Integer pageSize) {
         //判断当前登陆人是平台还是门店
         if (tokenService.getLoginUser().getSysUser().getRoleType()==1) {
-            Page<Share> page = shareService.lambdaQuery().eq(Share::getAuditStatus, 1).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageNum, pageSize));
+            Page<Share> page = shareService.lambdaQuery().eq(Share::getAuditStatus, 1).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageCurr, pageSize));
             return R.ok(page);
         }else {
-            Page<Share> page = shareService.lambdaQuery().eq(Share::getAddType,3).eq(Share::getObjectId, tokenService.getLoginUser().getSysUser().getObjectId()).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageNum, pageSize));
+            Page<Share> page = shareService.lambdaQuery().eq(Share::getAddType,3).eq(Share::getObjectId, tokenService.getLoginUser().getSysUser().getObjectId()).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageCurr, pageSize));
             return R.ok(page);
         }
     }
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
index 24eda68..1dffb31 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -71,6 +71,7 @@
         if (!shopService.cheUserByPhone(phone)) {
             return R.fail("该手机号未注册");
         }
+        AppUser appUser = appUserClient.getAppUserByPhone1(phone).getData();
         shop.setShopAllPoint(0);
         shop.setShopPoint(0);
         shop.setSharePoint(0);
@@ -85,18 +86,15 @@
         shop.setOrderNumber(0);
         shop.setServerOrderNumber(0);
         shop.setCustomOrderNumber(0);
+        shop.setAppUserId(appUser.getId());
         shopService.save(shop);
 
-        LoginUser loginUserApplet = tokenService.getLoginUser();
+
         AppUserShop appUserShop = new AppUserShop();
-        appUserShop.setAppUserId(loginUserApplet.getUserid());
+        appUserShop.setAppUserId(appUser.getId());
         appUserShop.setShopId(shop.getId());
         R<Void> r = appUserClient.addAppUserShop(appUserShop);
         if (R.isError(r)){
-            throw new RuntimeException("添加失败");
-        }
-        AppUser appUser = appUserClient.getAppUserById(loginUserApplet.getUserid());
-        if (appUser == null){
             throw new RuntimeException("添加失败");
         }
         appUser.setUserType(2);
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
index 1a82c8c..a7bdf76 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -221,6 +221,7 @@
             for (GoodsArea goodsArea : goodsAreaList) {
                 List<GoodsArea> goodsAreaList1 = goodsArea.getGoodsAreaList();
                 for (GoodsArea area : goodsAreaList1) {
+                    area.setId(null);
                     area.setGoodsId(id);
                     area.setProvince(goodsArea.getProvince());
                     area.setCity(goodsArea.getCity());

--
Gitblit v1.7.1