店铺会员返回优惠券数量

This commit is contained in:
张松
2025-02-28 13:59:04 +08:00
parent 5499e452fd
commit 9a3ba7dff4
5 changed files with 63 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
package com.czg.controller.user;
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.PointsExchangeRecord;
import com.czg.account.entity.ShopUser;
@@ -39,8 +40,8 @@ public class UShopUserController {
* @return 店铺会员信息
*/
@GetMapping
public CzgResult<ShopUser> get(Long shopId) {
return CzgResult.success(shopUserService.getOne(new QueryWrapper().eq(ShopUser::getShopId, shopId == null ? StpKit.USER.getShopId() : shopId)));
public CzgResult<ShopUserDetailDTO> get(Long shopId) {
return CzgResult.success(shopUserService.getInfo(shopId == null ? StpKit.USER.getShopId() : shopId, StpKit.USER.getLoginIdAsLong()));
}
/**

View File

@@ -37,8 +37,8 @@ public class UserAuthorizationController {
* @return 登录信息
*/
@PostMapping("/test")
public CzgResult<String> login() {
StpKit.USER.login(103L, "2342", null, MyStpLogic.LoginType.USER, false);
public CzgResult<String> login(@RequestParam long id) {
StpKit.USER.login(id, "2342", null, MyStpLogic.LoginType.USER, false);
return CzgResult.success(StpKit.USER.getTokenValue());
}
}