Bläddra i källkod

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_freeway into develop

tags/v1.0.0^2
wanjing 1 år sedan
förälder
incheckning
bbb9791c7d
3 ändrade filer med 15 tillägg och 11 borttagningar
  1. +7
    -5
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/InspectionFileServiceImpl.java
  2. +3
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionListService.java
  3. +5
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryNewInspectionListService.java

+ 7
- 5
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/InspectionFileServiceImpl.java Visa fil

@@ -30,6 +30,7 @@ import com.tuoheng.admin.vo.ListByDeptUserTypeVo;
import com.tuoheng.common.core.enums.ServiceExceptionEnum;
import com.tuoheng.common.core.exception.ServiceException;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.SecurityUserUtils;
import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
@@ -102,10 +103,10 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
@Override
public JsonResult getQuestionList() {
//获取当前登录人租户id
//String username = SecurityUserUtils.username();
String username = "admin";
String username = SecurityUserUtils.username();
User user = userMapper.selectOne(new LambdaQueryWrapper<User>()
.eq(User::getMark, 1)
.eq(User::getStatus,1)
.eq(User::getUsername, username));
if(ObjectUtil.isNull(user)){
return null;
@@ -166,13 +167,14 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
// JsonResult.error(ListByDeptUserTypeEnum.QUERY_IS_FAILED.getCode(),ListByDeptUserTypeEnum.QUERY_IS_FAILED.getMsg());
// }
//获取当前登录人信息
//String username = SecurityUserUtils.username();
String username = "admin";
String username = SecurityUserUtils.username();
if(StringUtils.isEmpty(username)){
JsonResult.error(ListByDeptUserTypeEnum.USER_NAME_IS_NULL.getCode(),ListByDeptUserTypeEnum.USER_NAME_IS_NULL.getMsg());
}
User user = userMapper.selectOne(new LambdaQueryWrapper<User>()
.eq(User::getMark, 1).eq(User::getUsername, username));
.eq(User::getMark, 1)
.eq(User::getStatus,1)
.eq(User::getUsername, username));
if(ObjectUtil.isNull(user)){
JsonResult.error(ListByDeptUserTypeEnum.USER_IS_NULL.getCode(),ListByDeptUserTypeEnum.USER_IS_NULL.getMsg());
}

+ 3
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionListService.java Visa fil

@@ -40,13 +40,13 @@ public class QueryInspectionListService {
// if(null == dto.getAirportId() && StringUtils.isEmpty(dto.getUserId())){
// return JsonResult.error(QueryInspectionListServiceEnum.QUERY_IS_FAILED.getCode(),QueryInspectionListServiceEnum.QUERY_IS_FAILED.getMsg());
// }
//String username = SecurityUserUtils.username();
String username = "admin";
String username = SecurityUserUtils.username();
if(StringUtils.isEmpty(username)){
return JsonResult.error(QueryInspectionListServiceEnum.QUERY_IS_FAILED.getCode(),QueryInspectionListServiceEnum.QUERY_IS_FAILED.getMsg());
}
User user = userMapper.selectOne(Wrappers.<User>lambdaQuery()
.eq(User::getMark, 1).eq(User::getUsername,username));
.eq(User::getMark, 1).eq(User::getStatus,1)
.eq(User::getUsername,username));

if(ObjectUtil.isNull(user)){
return JsonResult.error(QueryInspectionListServiceEnum.USER_IS_NOT_EXIST.getCode(),QueryInspectionListServiceEnum.USER_IS_NOT_EXIST.getMsg());

+ 5
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryNewInspectionListService.java Visa fil

@@ -14,6 +14,7 @@ import com.tuoheng.admin.vo.inspection.InspectionListVo;
import com.tuoheng.common.core.enums.ServiceExceptionEnum;
import com.tuoheng.common.core.exception.ServiceException;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.SecurityUserUtils;
import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
@@ -41,13 +42,14 @@ public class QueryNewInspectionListService {

public JsonResult getList() {
//获取登录用户信息
//String username = SecurityUserUtils.username();
String username = "admin";
String username = SecurityUserUtils.username();
if(StringUtils.isEmpty(username)){
JsonResult.error(ListByDeptUserTypeEnum.USER_NAME_IS_NULL.getCode(),ListByDeptUserTypeEnum.USER_NAME_IS_NULL.getMsg());
}
User user = userMapper.selectOne(Wrappers.<User>lambdaQuery()
.eq(User::getUsername, username).eq(User::getMark, 1));
.eq(User::getUsername, username)
.eq(User::getStatus,1)
.eq(User::getMark, 1));
if(ObjectUtil.isNull(user)){
JsonResult.error(ListByDeptUserTypeEnum.USER_IS_NULL.getCode(),ListByDeptUserTypeEnum.USER_IS_NULL.getMsg());
}

Laddar…
Avbryt
Spara