Commit 92f66199 authored by 廖旭伟's avatar 廖旭伟

去除多余代码

parent 2339b59c
...@@ -87,9 +87,9 @@ public class AuthTokenServiceImpl implements IAuthTokenService { ...@@ -87,9 +87,9 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
Claims claims = parseToken(token); Claims claims = parseToken(token);
String uuid = (String) claims.get(SysConstains.LOGIN_USER_KEY); String uuid = (String) claims.get(SysConstains.LOGIN_USER_KEY);
String userKey = getTokenKey(uuid); String userKey = getTokenKey(uuid);
cacheService.select(portalDb); // cacheService.select(portalDb);
String userStr = cacheService.get(userKey); String userStr = cacheService.get(userKey);
cacheService.select(db); // cacheService.select(db);
if (StringUtils.isNotEmpty(userStr)) { if (StringUtils.isNotEmpty(userStr)) {
UserEntity userEntity = JSONObject.parseObject(userStr, UserEntity.class); UserEntity userEntity = JSONObject.parseObject(userStr, UserEntity.class);
userEntity.setToken(token); userEntity.setToken(token);
......
package com.mortals.xhx.module.user.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.user.model.UserCollectEntity;
import com.mortals.xhx.module.user.service.UserCollectService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 用户收藏夹
*
* @author zxfei
* @date 2023-03-09
*/
@RestController
@RequestMapping("user/collect")
public class UserCollectController extends BaseCRUDJsonBodyMappingController<UserCollectService,UserCollectEntity,Long> {
@Autowired
private ParamService paramService;
public UserCollectController(){
super.setModuleDesc( "用户收藏夹");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "collectType", paramService.getParamBySecondOrganize("UserCollect","collectType"));
super.init(model, context);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment