切换店铺统计 √
下单选择会员 √ 注册会员 √ 完善手机号 √ 会员流水信息同步 √
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
package com.czg.controller.admin;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.account.dto.shopuser.*;
|
||||
import com.czg.account.entity.ShopUser;
|
||||
import com.czg.account.entity.ShopUserFlow;
|
||||
import com.czg.account.service.ShopUserFlowService;
|
||||
import com.czg.account.service.ShopUserService;
|
||||
import com.czg.account.vo.ShopUserFlowVO;
|
||||
@@ -12,9 +10,7 @@ import com.czg.annotation.SaStaffCheckPermission;
|
||||
import com.czg.enums.ShopUserFlowBizEnum;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.utils.PageUtil;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -47,7 +43,7 @@ public class ShopUserController {
|
||||
@GetMapping("/summary")
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
public CzgResult<ShopUserSummaryDTO> summary(Integer isVip) {
|
||||
return CzgResult.success(shopUserService.getSummary(StpKit.USER.getShopId(), isVip));
|
||||
return CzgResult.success(shopUserService.getSummary(StpKit.USER.getHeadShopId(), isVip));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,7 +67,7 @@ public class ShopUserController {
|
||||
@GetMapping("/flow")
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
public CzgResult<Page<ShopUserFlowVO>> flow(Integer userId, String bizCode, String startTime, String endTime) {
|
||||
return CzgResult.success(shopUserFlowService.pageInfo(StpKit.USER.getShopId(), userId, bizCode, startTime, endTime));
|
||||
return CzgResult.success(shopUserFlowService.pageInfo(StpKit.USER.getHeadShopId(), userId, bizCode, startTime, endTime));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,7 +83,7 @@ public class ShopUserController {
|
||||
@GetMapping("/flow/download")
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
public void flowDownload(Integer userId, String bizCode, String startTime, String endTime, HttpServletResponse response) throws IOException {
|
||||
shopUserFlowService.flowDownload(StpKit.USER.getShopId(), userId, bizCode, startTime, endTime, response);
|
||||
shopUserFlowService.flowDownload(StpKit.USER.getHeadShopId(), userId, bizCode, startTime, endTime, response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -129,7 +125,7 @@ public class ShopUserController {
|
||||
@SaAdminCheckPermission(value = "shopUser:add", name = "店铺用户添加")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> add(@RequestBody @Validated ShopUserAddDTO shopUserAddDTO) {
|
||||
return CzgResult.success(shopUserService.add(StpKit.USER.getShopId(), shopUserAddDTO));
|
||||
return CzgResult.success(shopUserService.add(StpKit.USER.getHeadShopId(), shopUserAddDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,7 +137,7 @@ public class ShopUserController {
|
||||
@SaAdminCheckPermission(value = "shopUser:edit", name = "店铺用户修改")
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> edit(@RequestBody @Validated ShopUserEditDTO shopUserEditDTO) {
|
||||
return CzgResult.success(shopUserService.updateInfo(StpKit.USER.getShopId(), shopUserEditDTO));
|
||||
return CzgResult.success(shopUserService.updateInfo(StpKit.USER.getHeadShopId(), shopUserEditDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,7 +150,7 @@ public class ShopUserController {
|
||||
@PutMapping("/money")
|
||||
public CzgResult<Boolean> editMoney(@RequestBody @Validated ShopUserMoneyEditDTO shopUserMoneyEditDTO) {
|
||||
shopUserMoneyEditDTO.setBizEnum(ShopUserFlowBizEnum.ADMIN_IN);
|
||||
return CzgResult.success(shopUserService.updateMoney(StpKit.USER.getShopId(), shopUserMoneyEditDTO) > 0L);
|
||||
return CzgResult.success(shopUserService.updateMoney(StpKit.USER.getHeadShopId(), shopUserMoneyEditDTO) > 0L);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.czg.account.dto.shopuser.ShopUserAddDTO;
|
||||
import com.czg.account.dto.shopuser.ShopUserDetailDTO;
|
||||
import com.czg.account.dto.shopuser.ShopUserVipCardDTO;
|
||||
import com.czg.account.entity.MemberPointsLog;
|
||||
import com.czg.account.entity.PointsExchangeRecord;
|
||||
import com.czg.account.entity.ShopUser;
|
||||
import com.czg.account.entity.ShopUserFlow;
|
||||
import com.czg.account.service.MemberPointsLogService;
|
||||
@@ -18,14 +17,9 @@ import com.czg.utils.PageUtil;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 店铺会员相关
|
||||
*
|
||||
@@ -51,7 +45,7 @@ public class UShopUserController {
|
||||
*/
|
||||
@GetMapping
|
||||
public CzgResult<ShopUserDetailDTO> get(Long shopId) {
|
||||
return CzgResult.success(shopUserService.getInfo(shopId == null ? StpKit.USER.getShopId() : shopId, StpKit.USER.getLoginIdAsLong()));
|
||||
return CzgResult.success(shopUserService.getInfo(shopId == null ? StpKit.USER.getHeadShopId() : shopId, StpKit.USER.getLoginIdAsLong()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,7 +65,7 @@ public class UShopUserController {
|
||||
*/
|
||||
@GetMapping("/code")
|
||||
public CzgResult<String> code(Long shopId) {
|
||||
return shopUserService.getCode(StpKit.USER.getLoginIdAsLong(), shopId == null ? StpKit.USER.getShopId() : shopId);
|
||||
return shopUserService.getCode(StpKit.USER.getLoginIdAsLong(), shopId == null ? StpKit.USER.getHeadShopId() : shopId);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -82,7 +76,7 @@ public class UShopUserController {
|
||||
@PostMapping
|
||||
@Debounce("#shopUserAddDTO.phone")
|
||||
public CzgResult<Boolean> join(@RequestBody @Validated ShopUserAddDTO shopUserAddDTO) {
|
||||
return CzgResult.success(shopUserService.join(StpKit.USER.getShopId(), StpKit.USER.getLoginIdAsLong(), shopUserAddDTO));
|
||||
return CzgResult.success(shopUserService.join(StpKit.USER.getHeadShopId(), StpKit.USER.getLoginIdAsLong(), shopUserAddDTO));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
package com.czg.controller.user;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.czg.account.dto.user.userinfo.UserInfoDTO;
|
||||
import com.czg.account.dto.user.userinfo.UserInfoEditDTO;
|
||||
import com.czg.account.dto.user.userinfo.UserInfoPwdEditDTO;
|
||||
import com.czg.account.entity.UserInfo;
|
||||
import com.czg.account.service.UserInfoService;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -38,7 +34,7 @@ public class UserController {
|
||||
*/
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> update(@RequestBody UserInfoEditDTO userInfoEditDTO) {
|
||||
return CzgResult.success(userInfoService.updateInfo(StpKit.USER.getShopId(-1L), StpKit.USER.getLoginIdAsLong(), userInfoEditDTO));
|
||||
return CzgResult.success(userInfoService.updateInfo(StpKit.USER.getHeadShopId(), StpKit.USER.getLoginIdAsLong(), userInfoEditDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user