|
@@ -173,13 +173,18 @@ public class UseRecordServiceImpl extends ServiceImpl<UseRecordMapper, UseRecord
|
|
|
@Override
|
|
@Override
|
|
|
public Integer add(UseRecordDto recordDto) {
|
|
public Integer add(UseRecordDto recordDto) {
|
|
|
int result = 1;
|
|
int result = 1;
|
|
|
- R<LoginUser> userInfo = userService.getUserInfo(SecurityUtils.getUsername(), SecurityConstants.INNER);
|
|
|
|
|
|
|
+ /*R<LoginUser> userInfo = userService.getUserInfo(SecurityUtils.getUsername(), SecurityConstants.INNER);
|
|
|
if (userInfo.getCode() != HttpStatus.SUCCESS || userInfo.getData() == null) {
|
|
if (userInfo.getCode() != HttpStatus.SUCCESS || userInfo.getData() == null) {
|
|
|
throw new ServiceException("用户账号异常");
|
|
throw new ServiceException("用户账号异常");
|
|
|
}
|
|
}
|
|
|
//查询用户使用资格
|
|
//查询用户使用资格
|
|
|
LoginUser user = userInfo.getData();
|
|
LoginUser user = userInfo.getData();
|
|
|
- SysUser sysUser = user.getSysUser();
|
|
|
|
|
|
|
+ SysUser sysUser = user.getSysUser();*/
|
|
|
|
|
+
|
|
|
|
|
+ SysUser sysUser = tokenService.getLoginUser().getSysUser();
|
|
|
|
|
+ if(sysUser==null){
|
|
|
|
|
+ throw new ServiceException("用户账号异常");
|
|
|
|
|
+ }
|
|
|
Long storageId = recordDto.getStorageId();
|
|
Long storageId = recordDto.getStorageId();
|
|
|
LambdaQueryWrapper<UsegasApply> queryWrapper = Wrappers.lambdaQuery(UsegasApply.class);
|
|
LambdaQueryWrapper<UsegasApply> queryWrapper = Wrappers.lambdaQuery(UsegasApply.class);
|
|
|
queryWrapper.eq(UsegasApply::getUserId, sysUser.getUserId())
|
|
queryWrapper.eq(UsegasApply::getUserId, sysUser.getUserId())
|