From faac76cc33d74c6fa968c8bb8e21a4e7a1c8c438 Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Tue, 28 Oct 2025 17:49:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=80=E8=AF=B7=E4=BA=BA=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/DistributionUserController.java | 3 +- .../user/UDistributionController.java | 28 ++++++------------- .../czg/account/service/ShopUserService.java | 5 ++-- .../service/MkDistributionUserService.java | 2 +- .../java/com/czg/market/vo/InviteUserVO.java | 4 +++ .../account/mapper/ShopUserMapper.java | 2 +- .../service/impl/ShopUserServiceImpl.java | 5 ++-- .../main/resources/mapper/ShopUserMapper.xml | 15 +++++----- .../impl/MkDistributionUserServiceImpl.java | 6 ++-- 9 files changed, 31 insertions(+), 39 deletions(-) diff --git a/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionUserController.java b/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionUserController.java index 84602dc7..4ad91f4e 100644 --- a/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionUserController.java +++ b/cash-api/market-server/src/main/java/com/czg/controller/admin/DistributionUserController.java @@ -43,10 +43,11 @@ public class DistributionUserController { @GetMapping("/inviteUser") public CzgResult> getInviteUser( @RequestParam Long id, + @RequestParam Long shopUserId, @RequestParam(required = false, defaultValue = "1") Integer page, @RequestParam(required = false, defaultValue = "10") Integer size) { AssertUtil.isNull(id, "邀请人ID"); - return CzgResult.success(distributionUserService.getInviteUser(id, page, size)); + return CzgResult.success(distributionUserService.getInviteUser(id, shopUserId, page, size)); } /** diff --git a/cash-api/market-server/src/main/java/com/czg/controller/user/UDistributionController.java b/cash-api/market-server/src/main/java/com/czg/controller/user/UDistributionController.java index ec05567a..6dc39e79 100644 --- a/cash-api/market-server/src/main/java/com/czg/controller/user/UDistributionController.java +++ b/cash-api/market-server/src/main/java/com/czg/controller/user/UDistributionController.java @@ -1,9 +1,8 @@ package com.czg.controller.user; -import com.czg.market.dto.MkDistributionWithdrawFlowDTO; import com.czg.account.entity.UserInfo; import com.czg.market.dto.MkDistributionUserDTO; -import com.czg.market.entity.MkDistributionConfig; +import com.czg.market.dto.MkDistributionWithdrawFlowDTO; import com.czg.market.entity.MkDistributionWithdrawFlow; import com.czg.market.service.MkDistributionConfigService; import com.czg.market.service.MkDistributionFlowService; @@ -12,14 +11,11 @@ import com.czg.market.service.MkDistributionWithdrawFlowService; import com.czg.market.vo.DistributionCenterShopVO; import com.czg.market.vo.InviteUserVO; import com.czg.market.vo.MkDistributionConfigVO; -import com.czg.order.dto.MkDistributionPayDTO; import com.czg.resp.CzgResult; import com.czg.sa.StpKit; -import com.czg.utils.AssertUtil; import com.czg.service.market.service.impl.AppWxServiceImpl; -import com.czg.utils.PageUtil; +import com.czg.utils.AssertUtil; import com.mybatisflex.core.paginate.Page; -import com.mybatisflex.core.query.QueryWrapper; import jakarta.annotation.Resource; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -89,20 +85,10 @@ public class UDistributionController { * 分销员中心-获取邀请码 */ @GetMapping("/getInviteCode") - public CzgResult getInviteCode(@RequestParam Long shopId,@RequestParam Long shopUserId) { - return CzgResult.success(distributionUserService.getInviteCode(shopId,shopUserId)); + public CzgResult getInviteCode(@RequestParam Long shopId, @RequestParam Long shopUserId) { + return CzgResult.success(distributionUserService.getInviteCode(shopId, shopUserId)); } - - /** - * 分销员购买 - */ - @PostMapping("/pay") - public CzgResult> pay(@Validated @RequestBody MkDistributionPayDTO payDTO) { - return CzgResult.success(distributionUserService.pay(StpKit.USER.getLoginIdAsLong(), payDTO)); - } - - /** * 分销员中心-实名认证 */ @@ -136,11 +122,12 @@ public class UDistributionController { @RequestParam(required = false, defaultValue = "1") Integer page, @RequestParam(required = false, defaultValue = "10") Integer size) { AssertUtil.isNull(id, "邀请人ID"); - return CzgResult.success(distributionUserService.getInviteUser(id, page, size)); + return CzgResult.success(distributionUserService.getInviteUser(id, null, page, size)); } /** * 用户提现 + * * @param withdrawFlowDTO 提现信息 * @return 是否成功 */ @@ -169,10 +156,11 @@ public class UDistributionController { /** * 收益明细 + * * @param startTime * @param endTime * @param shopId - * @param status pending待入账 success已入账 + * @param status pending待入账 success已入账 */ @GetMapping("/distributionFlow") public CzgResult> distributionFlow(@RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime, diff --git a/cash-common/cash-common-service/src/main/java/com/czg/account/service/ShopUserService.java b/cash-common/cash-common-service/src/main/java/com/czg/account/service/ShopUserService.java index d69567d5..5aa2e450 100644 --- a/cash-common/cash-common-service/src/main/java/com/czg/account/service/ShopUserService.java +++ b/cash-common/cash-common-service/src/main/java/com/czg/account/service/ShopUserService.java @@ -1,10 +1,9 @@ package com.czg.account.service; -import com.czg.account.dto.shopuser.*; +import com.czg.account.dto.shopuser.ShopUserMoneyEditDTO; import com.czg.account.entity.ShopUser; import com.czg.market.vo.InviteUserVO; import com.mybatisflex.core.paginate.Page; -import com.mybatisflex.core.query.QueryWrapper; import com.mybatisflex.core.service.IService; import java.time.LocalDate; @@ -29,7 +28,7 @@ public interface ShopUserService extends IService { /** * 获取邀请用户列表 */ - Page getInviteUser(Long getDistributionUserId, Integer page, Integer size); + Page getInviteUser(Long getDistributionUserId, Long shopUserId, Integer page, Integer size); boolean updateInfo(ShopUser shopUser); diff --git a/cash-common/cash-common-service/src/main/java/com/czg/market/service/MkDistributionUserService.java b/cash-common/cash-common-service/src/main/java/com/czg/market/service/MkDistributionUserService.java index 04aa0018..646f8b40 100644 --- a/cash-common/cash-common-service/src/main/java/com/czg/market/service/MkDistributionUserService.java +++ b/cash-common/cash-common-service/src/main/java/com/czg/market/service/MkDistributionUserService.java @@ -65,7 +65,7 @@ public interface MkDistributionUserService extends IService /** * 获取分销员邀请人分页列表 */ - Page getInviteUser(Long id, Integer page, Integer size); + Page getInviteUser(Long id, Long shopUserId, Integer page, Integer size); /** * 分销员:按消费金额升级等级 diff --git a/cash-common/cash-common-service/src/main/java/com/czg/market/vo/InviteUserVO.java b/cash-common/cash-common-service/src/main/java/com/czg/market/vo/InviteUserVO.java index eeb74bfc..ef32844b 100644 --- a/cash-common/cash-common-service/src/main/java/com/czg/market/vo/InviteUserVO.java +++ b/cash-common/cash-common-service/src/main/java/com/czg/market/vo/InviteUserVO.java @@ -12,6 +12,10 @@ import java.time.LocalDateTime; */ @Data public class InviteUserVO implements Serializable { + /** + * id + */ + private Long shopUserId; /** * 用户头像 */ diff --git a/cash-service/account-service/src/main/java/com/czg/service/account/mapper/ShopUserMapper.java b/cash-service/account-service/src/main/java/com/czg/service/account/mapper/ShopUserMapper.java index e1150067..3669fe6f 100644 --- a/cash-service/account-service/src/main/java/com/czg/service/account/mapper/ShopUserMapper.java +++ b/cash-service/account-service/src/main/java/com/czg/service/account/mapper/ShopUserMapper.java @@ -70,5 +70,5 @@ public interface ShopUserMapper extends BaseMapper { * @param distributionUserId 分销员ID * @return 分页结果 */ - List getInviteUser(Long distributionUserId); + List getInviteUser(Long distributionUserId, Long shopUserId); } diff --git a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopUserServiceImpl.java b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopUserServiceImpl.java index fe16993e..9f86cfa0 100644 --- a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopUserServiceImpl.java +++ b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopUserServiceImpl.java @@ -18,7 +18,6 @@ import com.czg.market.service.TbMemberConfigService; import com.czg.market.vo.InviteUserVO; import com.czg.market.vo.MemberConfigVO; import com.czg.service.account.mapper.ShopUserMapper; -import com.czg.utils.MyQueryWrapper; import com.czg.utils.PageUtil; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -100,9 +99,9 @@ public class ShopUserServiceImpl extends ServiceImpl i } @Override - public Page getInviteUser(Long distributionUserId, Integer page, Integer size) { + public Page getInviteUser(Long distributionUserId, Long shopUserId, Integer page, Integer size) { PageHelper.startPage(page, size); - List inviteUser = mapper.getInviteUser(distributionUserId); + List inviteUser = mapper.getInviteUser(distributionUserId, shopUserId); return PageUtil.convert(new PageInfo<>(inviteUser)); } diff --git a/cash-service/account-service/src/main/resources/mapper/ShopUserMapper.xml b/cash-service/account-service/src/main/resources/mapper/ShopUserMapper.xml index 18831732..7e208974 100644 --- a/cash-service/account-service/src/main/resources/mapper/ShopUserMapper.xml +++ b/cash-service/account-service/src/main/resources/mapper/ShopUserMapper.xml @@ -263,17 +263,18 @@ order by u.create_time desc diff --git a/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkDistributionUserServiceImpl.java b/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkDistributionUserServiceImpl.java index 5ae00679..9666c3fe 100644 --- a/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkDistributionUserServiceImpl.java +++ b/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkDistributionUserServiceImpl.java @@ -113,7 +113,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl result = new HashMap<>(5); result.put("totalIncome", centerTopVO == null ? 0.0 : centerTopVO.getTotalIncome()); result.put("pendingIncome", centerTopVO == null ? 0.0 : centerTopVO.getPendingIncome()); - result.put("cashOutAmount", centerTopVO == null ? 0.0 : centerTopVO.getCashOutAmount()); + result.put("cashOutAmount", centerTopVO == null ? 0.0 : centerTopVO.getUnCashOutAmount()); result.put("activates", activates(userId, 1, 5)); result.put("unActivates", unActivates(userId, 1, 3)); @@ -380,8 +380,8 @@ public class MkDistributionUserServiceImpl extends ServiceImpl getInviteUser(Long id, Integer page, Integer size) { - return shopUserService.getInviteUser(id, page, size); + public Page getInviteUser(Long id, Long shopUserId, Integer page, Integer size) { + return shopUserService.getInviteUser(id, shopUserId, page, size); } @Override