Commit d4ce2826 by tyfanchz

添加日志

1 parent 6a86d4d6
......@@ -21,6 +21,7 @@ import com.glsx.shop.dao.system.UserRepository;
import com.glsx.shop.service.system.impl.ConstantFactory;
import com.glsx.shop.utils.Convert;
import com.glsx.shop.utils.HttpUtil;
import com.glsx.shop.utils.JsonUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -64,6 +65,9 @@ public class UserService {
String token = HttpUtil.getToken();
AuthorizationUser userBean = tokenCache.getUser(token);
this.logger.info("$$$$ getAuthorizationInfo account: {}, userBean = {}",
account, JsonUtil.toJson(userBean));
if (userBean != null) {
return userBean;
}
......@@ -71,6 +75,7 @@ public class UserService {
//构建后台用户认证信息
if (userType == JwtUser.MANAGER) {
User user = userRepository.findByAccount(account);
this.logger.info("$$$$ getAuthorizationInfo manager = {}", JsonUtil.toJson(user));
userBean.setId(user.getId());
userBean.setAccount(user.getAccount());
userBean.setDeptId(user.getDeptid());
......@@ -102,6 +107,8 @@ public class UserService {
if (userType == JwtUser.FRONT_USER) {
// 修改:使用 platform_user 表里面的用户信息进行校验
PlatformUser platformUser = this.platformUserRepository.findByContactNumber(account);
this.logger.info("$$$$ getAuthorizationInfo frontUser = {}",
JsonUtil.toJson(platformUser));
userBean.setId(platformUser.getId());
userBean.setAccount(platformUser.getContactNumber());
userBean.setPassword(platformUser.getRemark());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!