切换店铺统计 √

下单选择会员 √
注册会员 √
完善手机号 √
会员流水信息同步 √
This commit is contained in:
Tankaikai
2025-04-11 17:46:22 +08:00
parent a12961e71f
commit 8d27753cf4
6 changed files with 19 additions and 17 deletions

View File

@@ -43,7 +43,7 @@ public class ShopUserController {
@GetMapping("/summary") @GetMapping("/summary")
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi") @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
public CzgResult<ShopUserSummaryDTO> summary(Integer isVip) { public CzgResult<ShopUserSummaryDTO> summary(Integer isVip) {
return CzgResult.success(shopUserService.getSummary(StpKit.USER.getVipHeadShopId(), isVip)); return CzgResult.success(shopUserService.getSummary(StpKit.USER.getUsableShopId(), isVip));
} }
/** /**
@@ -67,7 +67,7 @@ public class ShopUserController {
@GetMapping("/flow") @GetMapping("/flow")
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi") @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
public CzgResult<Page<ShopUserFlowVO>> flow(Integer userId, String bizCode, String startTime, String endTime) { public CzgResult<Page<ShopUserFlowVO>> flow(Integer userId, String bizCode, String startTime, String endTime) {
return CzgResult.success(shopUserFlowService.pageInfo(StpKit.USER.getVipHeadShopId(), userId, bizCode, startTime, endTime)); return CzgResult.success(shopUserFlowService.pageInfo(StpKit.USER.getUsableShopId(), userId, bizCode, startTime, endTime));
} }
/** /**
@@ -83,7 +83,7 @@ public class ShopUserController {
@GetMapping("/flow/download") @GetMapping("/flow/download")
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi") @SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
public void flowDownload(Integer userId, String bizCode, String startTime, String endTime, HttpServletResponse response) throws IOException { public void flowDownload(Integer userId, String bizCode, String startTime, String endTime, HttpServletResponse response) throws IOException {
shopUserFlowService.flowDownload(StpKit.USER.getVipHeadShopId(), userId, bizCode, startTime, endTime, response); shopUserFlowService.flowDownload(StpKit.USER.getUsableShopId(), userId, bizCode, startTime, endTime, response);
} }
/** /**
@@ -125,7 +125,7 @@ public class ShopUserController {
@SaAdminCheckPermission(value = "shopUser:add", name = "店铺用户添加") @SaAdminCheckPermission(value = "shopUser:add", name = "店铺用户添加")
@PostMapping @PostMapping
public CzgResult<Boolean> add(@RequestBody @Validated ShopUserAddDTO shopUserAddDTO) { public CzgResult<Boolean> add(@RequestBody @Validated ShopUserAddDTO shopUserAddDTO) {
return CzgResult.success(shopUserService.add(StpKit.USER.getVipHeadShopId(), shopUserAddDTO)); return CzgResult.success(shopUserService.add(StpKit.USER.getUsableShopId(), shopUserAddDTO));
} }
/** /**
@@ -137,7 +137,7 @@ public class ShopUserController {
@SaAdminCheckPermission(value = "shopUser:edit", name = "店铺用户修改") @SaAdminCheckPermission(value = "shopUser:edit", name = "店铺用户修改")
@PutMapping @PutMapping
public CzgResult<Boolean> edit(@RequestBody @Validated ShopUserEditDTO shopUserEditDTO) { public CzgResult<Boolean> edit(@RequestBody @Validated ShopUserEditDTO shopUserEditDTO) {
return CzgResult.success(shopUserService.updateInfo(StpKit.USER.getVipHeadShopId(), shopUserEditDTO)); return CzgResult.success(shopUserService.updateInfo(StpKit.USER.getUsableShopId(), shopUserEditDTO));
} }
/** /**
@@ -150,7 +150,7 @@ public class ShopUserController {
@PutMapping("/money") @PutMapping("/money")
public CzgResult<Boolean> editMoney(@RequestBody @Validated ShopUserMoneyEditDTO shopUserMoneyEditDTO) { public CzgResult<Boolean> editMoney(@RequestBody @Validated ShopUserMoneyEditDTO shopUserMoneyEditDTO) {
shopUserMoneyEditDTO.setBizEnum(ShopUserFlowBizEnum.ADMIN_IN); shopUserMoneyEditDTO.setBizEnum(ShopUserFlowBizEnum.ADMIN_IN);
return CzgResult.success(shopUserService.updateMoney(StpKit.USER.getVipHeadShopId(), shopUserMoneyEditDTO) > 0L); return CzgResult.success(shopUserService.updateMoney(StpKit.USER.getUsableShopId(), shopUserMoneyEditDTO) > 0L);
} }
} }

View File

@@ -45,7 +45,7 @@ public class UShopUserController {
*/ */
@GetMapping @GetMapping
public CzgResult<ShopUserDetailDTO> get(Long shopId) { public CzgResult<ShopUserDetailDTO> get(Long shopId) {
return CzgResult.success(shopUserService.getInfo(shopId == null ? StpKit.USER.getVipHeadShopId() : shopId, StpKit.USER.getLoginIdAsLong())); return CzgResult.success(shopUserService.getInfo(shopId == null ? StpKit.USER.getUsableShopId() : shopId, StpKit.USER.getLoginIdAsLong()));
} }
/** /**
@@ -65,7 +65,7 @@ public class UShopUserController {
*/ */
@GetMapping("/code") @GetMapping("/code")
public CzgResult<String> code(Long shopId) { public CzgResult<String> code(Long shopId) {
return shopUserService.getCode(StpKit.USER.getLoginIdAsLong(), shopId == null ? StpKit.USER.getVipHeadShopId() : shopId); return shopUserService.getCode(StpKit.USER.getLoginIdAsLong(), shopId == null ? StpKit.USER.getUsableShopId() : shopId);
} }
/** /**
@@ -76,7 +76,7 @@ public class UShopUserController {
@PostMapping @PostMapping
@Debounce("#shopUserAddDTO.phone") @Debounce("#shopUserAddDTO.phone")
public CzgResult<Boolean> join(@RequestBody @Validated ShopUserAddDTO shopUserAddDTO) { public CzgResult<Boolean> join(@RequestBody @Validated ShopUserAddDTO shopUserAddDTO) {
return CzgResult.success(shopUserService.join(StpKit.USER.getVipHeadShopId(), StpKit.USER.getLoginIdAsLong(), shopUserAddDTO)); return CzgResult.success(shopUserService.join(StpKit.USER.getUsableShopId(), StpKit.USER.getLoginIdAsLong(), shopUserAddDTO));
} }

View File

@@ -34,7 +34,7 @@ public class UserController {
*/ */
@PutMapping @PutMapping
public CzgResult<Boolean> update(@RequestBody UserInfoEditDTO userInfoEditDTO) { public CzgResult<Boolean> update(@RequestBody UserInfoEditDTO userInfoEditDTO) {
return CzgResult.success(userInfoService.updateInfo(StpKit.USER.getVipHeadShopId(), StpKit.USER.getLoginIdAsLong(), userInfoEditDTO)); return CzgResult.success(userInfoService.updateInfo(StpKit.USER.getUsableShopId(), StpKit.USER.getLoginIdAsLong(), userInfoEditDTO));
} }
/** /**

View File

@@ -61,15 +61,17 @@ public class SaTokenConfigure implements WebMvcConfigurer {
SaRouter.match("/user/**").notMatch("/user/login", "/user/test", "/user/geo/**", "/user/home/**", "/user/home/**", "/user/dict/**", "/user/openId") SaRouter.match("/user/**").notMatch("/user/login", "/user/test", "/user/geo/**", "/user/home/**", "/user/home/**", "/user/dict/**", "/user/openId")
.notMatch("/pay/**") .notMatch("/pay/**")
.notMatch("/notify/**") .notMatch("/order/notify/**")
.notMatch("/user/product/**")
.check(r -> MyStpLogic.CLIENT_LOGIC.checkLogin()) .check(r -> MyStpLogic.CLIENT_LOGIC.checkLogin())
.setHit(true) .setHit(true)
// .match("/**") // .match("/**")
.notMatch("/user/**") .notMatch("/user/**")
.notMatch("/pay/**") .notMatch("/pay/**")
.notMatch("/notify/**") .notMatch("/order/notify/**")
.notMatch("/admin/auth/**") .notMatch("/account/admin/auth/**")
.notMatch("/admin/shopMsgPush/subscribe/**") .notMatch("/user/product/**")
.notMatch("/account/admin/shopMsgPush/subscribe/**")
.check(r -> MyStpLogic.ADMIN_LOGIC.checkLogin()); .check(r -> MyStpLogic.ADMIN_LOGIC.checkLogin());
})).addPathPatterns("/**"); })).addPathPatterns("/**");

View File

@@ -52,7 +52,7 @@ public class MemberPointsServiceImpl extends ServiceImpl<MemberPointsMapper, Mem
queryWrapper.like(MemberPoints::getPhone, param.getPhone()); queryWrapper.like(MemberPoints::getPhone, param.getPhone());
} }
Long shopId = StpKit.USER.getShopId(0L); Long shopId = StpKit.USER.getUsableShopId();
queryWrapper.eq(MemberPoints::getShopId, shopId); queryWrapper.eq(MemberPoints::getShopId, shopId);
queryWrapper.orderBy(MemberPoints::getShopUserId, false); queryWrapper.orderBy(MemberPoints::getShopUserId, false);
return queryWrapper; return queryWrapper;

View File

@@ -83,7 +83,7 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
@Override @Override
public Page<ShopUserDTO> getPage(String key, Integer isVip, BigDecimal amount) { public Page<ShopUserDTO> getPage(String key, Integer isVip, BigDecimal amount) {
Long shopId = StpKit.USER.getVipHeadShopId(); Long shopId = StpKit.USER.getUsableShopId();
PageHelper.startPage(PageUtil.buildPageHelp()); PageHelper.startPage(PageUtil.buildPageHelp());
return PageUtil.convert(new PageInfo<>(mapper.selectPageByKeyAndIsVip(shopId, isVip, key, amount))); return PageUtil.convert(new PageInfo<>(mapper.selectPageByKeyAndIsVip(shopId, isVip, key, amount)));
} }
@@ -353,7 +353,7 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
@Override @Override
public ShopUser getDetail(Integer id, Integer userId) { public ShopUser getDetail(Integer id, Integer userId) {
ShopUser shopUser = getOne(new QueryWrapper().eq(ShopUser::getShopId, StpKit.USER.getVipHeadShopId()).eq(ShopUser::getId, id).eq(ShopUser::getUserId, userId)); ShopUser shopUser = getOne(new QueryWrapper().eq(ShopUser::getShopId, StpKit.USER.getUsableShopId()).eq(ShopUser::getId, id).eq(ShopUser::getUserId, userId));
long count = shopActivateCouponRecordService.count(new QueryWrapper().eq(ShopActivateCouponRecord::getShopUserId, shopUser.getId()).eq(ShopActivateCouponRecord::getStatus, 0)); long count = shopActivateCouponRecordService.count(new QueryWrapper().eq(ShopActivateCouponRecord::getShopUserId, shopUser.getId()).eq(ShopActivateCouponRecord::getStatus, 0));
ShopUserDTO shopUserDTO = BeanUtil.copyProperties(shopUser, ShopUserDTO.class); ShopUserDTO shopUserDTO = BeanUtil.copyProperties(shopUser, ShopUserDTO.class);
shopUserDTO.setCouponNum(count); shopUserDTO.setCouponNum(count);