fix: 安全工具获取用户信息失败
This commit is contained in:
@@ -14,7 +14,7 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.utils.SecurityUtils;
|
||||
import org.nl.common.utils.UserInfoUtil;
|
||||
import org.nl.wql.core.bean.ResultBean;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.nl.wql.util.WqlUtil;
|
||||
@@ -70,8 +70,8 @@ public class ${className}ServiceImpl implements ${className}Service {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(${className}Dto dto) {
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
Long currentUserId = UserInfoUtil.getCurrentUserId();
|
||||
String nickName = UserInfoUtil.getNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
dto.set${pkChangeColName ? cap_first }(IdUtil.getSnowflake(1, 1).nextId());
|
||||
@@ -93,8 +93,8 @@ public class ${className}ServiceImpl implements ${className}Service {
|
||||
${className}Dto entity = this.findById(dto.get${pkChangeColName ? cap_first }());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
Long currentUserId = UserInfoUtil.getCurrentUserId();
|
||||
String nickName = UserInfoUtil.getNickName();
|
||||
|
||||
String now = DateUtil.now();
|
||||
dto.setUpdate_time(now);
|
||||
@@ -109,8 +109,8 @@ public class ${className}ServiceImpl implements ${className}Service {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteAll(${pkColumnType}[] ids) {
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
Long currentUserId = UserInfoUtil.getCurrentUserId();
|
||||
String nickName = UserInfoUtil.getNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("${tableName}");
|
||||
@@ -124,5 +124,5 @@ public class ${className}ServiceImpl implements ${className}Service {
|
||||
wo.update(param);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user