管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-11-17 15375a1d0d07c61c132906ff8da45f67bcd711f6
src/main/java/com/lf/server/service/sys/TokenService.java
@@ -8,7 +8,6 @@
import com.lf.server.helper.StringHelper;
import com.lf.server.helper.WebHelper;
import com.lf.server.mapper.sys.TokenMapper;
import com.lf.server.service.all.PermsService;
import com.lf.server.service.all.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -37,10 +36,7 @@
    LoginService loginService;
    @Autowired
    public RedisService redisService;
    @Autowired
    public  PermsService permsService;
    RedisService redisService;
    @Override
    public Integer selectCount(String name, Integer type) {
@@ -100,14 +96,15 @@
    /**
     * 获取新的令牌实体类
     */
    public TokenEntity getNewToken(int userid, HttpServletRequest req) {
    public TokenEntity getNewToken(UserEntity ue, HttpServletRequest req) {
        TokenEntity te = new TokenEntity();
        te.setToken(WebHelper.getGuid());
        te.setDuration(SettingData.TOKEN_EXPIRE);
        te.setExpire(WebHelper.getTimestamp(SettingData.TOKEN_EXPIRE));
        te.setType(0);
        te.setIp(WebHelper.getIpAddress(req));
        te.setCreateUser(userid);
        te.setCreateUser(ue.getId());
        te.setUname(ue.getUname());
        return te;
    }