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 53eb72b9b..7f5ef9245 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 @@ -15,6 +15,7 @@ import com.czg.resp.CzgResult; import com.czg.sa.StpKit; import com.czg.task.DistributionTask; import com.czg.utils.AssertUtil; +import com.czg.utils.FunUtils; import com.mybatisflex.core.paginate.Page; import jakarta.annotation.Resource; import org.springframework.validation.annotation.Validated; @@ -115,6 +116,19 @@ public class UDistributionController { return CzgResult.success(); } + /** + * 分销员中心-无感-绑定邀请人 + */ + @PostMapping("/autoBindInviteUser") + public CzgResult> autoBindInviteUser(@RequestBody MkDistributionUserDTO param) { + AssertUtil.isNull(param.getId(), "店铺用户ID不能为空"); + AssertUtil.isNull(param.getShopId(), "店铺ID不能为空"); + AssertUtil.isNull(param.getInviteCode(), "邀请码不能为空"); + FunUtils.asyncSafeRunVoid(() -> distributionUserService.bindInviteUser(param), "无感绑定上级"); + return CzgResult.success(); + } + + /** * 分销员中心-绑定邀请人 */ @@ -171,10 +185,6 @@ public class UDistributionController { /** * 收益明细 - * - * @param startTime - * @param endTime - * @param shopId * @param status pending待入账 success已入账 */ @GetMapping("/distributionFlow") diff --git a/cash-service/account-service/src/main/resources/mapper/ShopTableMapper.xml b/cash-service/account-service/src/main/resources/mapper/ShopTableMapper.xml index 6be66bbc8..917a83375 100644 --- a/cash-service/account-service/src/main/resources/mapper/ShopTableMapper.xml +++ b/cash-service/account-service/src/main/resources/mapper/ShopTableMapper.xml @@ -27,7 +27,7 @@ and a.table_code is not null group by a.id - ORDER BY a.create_time + ORDER BY a.area_id,a.id