Commit 30520d7e by huluobin

update

parent a1c81ba4
...@@ -371,8 +371,10 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order ...@@ -371,8 +371,10 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
wrapper.like(OrderManage::getTelephone, param.getCustomerPhone()); wrapper.like(OrderManage::getTelephone, param.getCustomerPhone());
} }
if (param.getCustomerId() != null) { if (param.getCustomerId() != null) {
wrapper.and(wrapper2 -> wrapper.eq(OrderManage::getOrderUser, param.getCustomerId())
.or(wrapper3 -> wrapper3.eq(OrderManage::getPayUser, param.getCustomerId()))); wrapper.and(wrapperX -> wrapperX.and(wrapper2 -> wrapper.eq(OrderManage::getOrderUser, param.getCustomerId())
.or(wrapper3 -> wrapper3.eq(OrderManage::getPayUser, param.getCustomerId()))));
} }
if (param.getDepartmentId() != null) { if (param.getDepartmentId() != null) {
wrapper.eq(OrderManage::getDepartmentId, param.getDepartmentId()); wrapper.eq(OrderManage::getDepartmentId, param.getDepartmentId());
...@@ -390,7 +392,6 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order ...@@ -390,7 +392,6 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
IPage<OrderManage> orderManagePage = this.page(pageParam, wrapper); IPage<OrderManage> orderManagePage = this.page(pageParam, wrapper);
if (ListUtil.isEmpty(orderManagePage.getRecords())) { if (ListUtil.isEmpty(orderManagePage.getRecords())) {
return orderManagePage; return orderManagePage;
} }
......
...@@ -4,13 +4,19 @@ package com.gogirl.infrastructure.config; ...@@ -4,13 +4,19 @@ package com.gogirl.infrastructure.config;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.ApiInfo; import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Parameter;
import springfox.documentation.spi.DocumentationType; import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.ArrayList;
import java.util.List;
/** /**
* Swagger2配置类 * Swagger2配置类
* 在与spring boot集成时,放在与Application.java同级的目录下。 * 在与spring boot集成时,放在与Application.java同级的目录下。
...@@ -31,12 +37,23 @@ public class Swagger2Config { ...@@ -31,12 +37,23 @@ public class Swagger2Config {
*/ */
@Bean @Bean
public Docket createRestApi() { public Docket createRestApi() {
//添加head参数配置start
ParameterBuilder tokenPar = new ParameterBuilder();
List<Parameter> pars = new ArrayList<>();
tokenPar.name("token")
.description("登陆凭证")
.modelRef(new ModelRef("string"))
.parameterType("header").required(false).build();
pars.add(tokenPar.build());
return new Docket(DocumentationType.SWAGGER_2) return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo()) .apiInfo(apiInfo())
.select() .select()
.apis(RequestHandlerSelectors.basePackage("com.gogirl")) .apis(RequestHandlerSelectors.basePackage("com.gogirl"))
.paths(PathSelectors.any()) .paths(PathSelectors.any())
.build(); .build()
.globalOperationParameters(pars);//注意这里
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment