团购扫码 token获取信息

This commit is contained in:
2026-01-14 17:35:13 +08:00
parent b473c82e4f
commit 721819c3e8
4 changed files with 5 additions and 27 deletions

View File

@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.czg.account.dto.SysLoginDTO;
import com.czg.account.entity.ShopInfo;
import com.czg.account.entity.SysUser;
import com.czg.account.service.*;
import com.czg.account.vo.LoginVO;
import com.czg.annotation.SaAdminCheckPermission;
@@ -35,11 +36,9 @@ public class AuthorizationController {
@Resource
private AuthorizationService authorizationService;
@Resource
private PermissionService permissionService;
@Resource
private ShopInfoService shopInfoService;
@Resource
private ShopStaffService shopStaffService;
private SysUserService sysUserService;
/**
@@ -105,14 +104,11 @@ public class AuthorizationController {
*/
@GetMapping("/userInfo")
public CzgResult<Map<String, Object>> getUserInfo() {
String account = StpKit.USER.getAccount();
ShopInfo shopInfo = shopInfoService.queryChain()
.select(ShopInfo::getId, ShopInfo::getShopName)
.eq(ShopInfo::getId, StpKit.USER.getShopId()).one();
if (account.contains("@")) {
account = account.split("@")[1];
}
Map<String, Object> map = Map.of("shopId", shopInfo.getId(), "shopName", shopInfo.getShopName(), "account", account);
SysUser one = sysUserService.queryChain().eq(SysUser::getId, StpKit.USER.getShopId()).one();
Map<String, Object> map = Map.of("shopId", shopInfo.getId(), "shopName", shopInfo.getShopName(), "account", one.getAccount());
return CzgResult.success(map);
}
}

View File

@@ -132,7 +132,7 @@ public class NotifyController {
/**
*
* 微信原生支付回调
*/
@RequestMapping("/native/wx/pay/distributionRecharge")
public String nativeNotify(HttpServletRequest request) throws IOException {

View File

@@ -1,7 +0,0 @@
package com.czg.account.service;
/**
* @author Administrator
*/
public interface PermissionService {
}

View File

@@ -1,11 +0,0 @@
package com.czg.service.account.service.impl;
import com.czg.account.service.PermissionService;
import org.springframework.stereotype.Service;
/**
* @author zs
*/
@Service
public class PermissionServiceImpl implements PermissionService {
}