【update】规范传参null设置为空
This commit is contained in:
parent
21470758cf
commit
bd97a78306
|
@ -14,6 +14,6 @@ public class ConsumptionDetailQuery extends BaseQuery{
|
|||
* 0-火车 1飞机 2酒店 3打车
|
||||
*/
|
||||
private Integer productType;
|
||||
private String userName;
|
||||
private String orderNo;
|
||||
private String userName="";
|
||||
private String orderNo="";
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.List;
|
|||
|
||||
@Data
|
||||
public class ItineraryPageQuery extends BaseQuery {
|
||||
private String applicant;// 申请人
|
||||
private String actualOrderNo; //申请单号
|
||||
private String applicant="";// 申请人
|
||||
private String actualOrderNo=""; //申请单号
|
||||
private List<String> userIds=new ArrayList<>();
|
||||
}
|
||||
|
|
|
@ -9,13 +9,13 @@ import java.util.List;
|
|||
@Data
|
||||
public class OrderPageQuery extends BaseQuery {
|
||||
//订单号
|
||||
private String oderNo;
|
||||
private String oderNo="";
|
||||
//申请单号
|
||||
private String actualOrderNo;
|
||||
private String actualOrderNo="";
|
||||
//出行人
|
||||
private String travelers;
|
||||
private String travelers="";
|
||||
//预订人
|
||||
private String applicant;
|
||||
private String applicant="";
|
||||
//开始日期
|
||||
private String startTime;
|
||||
//结束日期
|
||||
|
@ -23,6 +23,6 @@ public class OrderPageQuery extends BaseQuery {
|
|||
//产品类型
|
||||
private String productType;
|
||||
//部门名称
|
||||
private String deptName;
|
||||
private String deptName="";
|
||||
private List<String> userIds=new ArrayList<>();
|
||||
}
|
||||
|
|
|
@ -54,7 +54,8 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
|
|||
}
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
if (dto.getActualOrderNo()!=null&&dto.getActualOrderNo().isEmpty()){
|
||||
//设置null
|
||||
if (dto.getActualOrderNo().isEmpty()){
|
||||
dto.setActualOrderNo(null);
|
||||
}
|
||||
params.put("actualOrderNo", dto.getActualOrderNo());
|
||||
|
@ -74,12 +75,6 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
|
|||
|
||||
@Override
|
||||
public PageResult<? extends BaseExcel> pageConsumptionDetail(ConsumptionDetailQuery dto) {
|
||||
if (dto.getUserName()==null){
|
||||
dto.setUserName("");
|
||||
}
|
||||
if (dto.getOrderNo()==null){
|
||||
dto.setOrderNo("");
|
||||
}
|
||||
PageRequest pageRequest = PageRequest
|
||||
.of(dto.getPageNum() - 1, dto.getPageSize(), Sort.by("id").descending());
|
||||
Page<? extends BaseExcel> data=new PageImpl<>(Collections.emptyList());
|
||||
|
|
|
@ -90,7 +90,7 @@ public class ManageServiceImpl implements ManageService {
|
|||
@Override
|
||||
public PageResult<ItineraryPageDto> itineraryPageQuery(ItineraryPageQuery dto) {
|
||||
List<User> users=new ArrayList<>();
|
||||
if (dto.getApplicant()!=null&&!dto.getApplicant().isEmpty()){
|
||||
if (!dto.getApplicant().isEmpty()){
|
||||
users=jdbcUserRepository.findAllByNameContains(dto.getApplicant());
|
||||
if (users==null||users.isEmpty()){
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue