定时查询优化

cert
schry 2 years ago
parent b82c4c558b
commit f3d7d3f128

@ -70,7 +70,6 @@ public class TraceManuOrderController {
@AuthRuleAnnotation("udi/trace/manu/order/filter")
@GetMapping("udi/trace/manu/order/filter")
public BaseResponse filterLogs(TraceManuOrderRequest traceManuOrderRequest) {
List<TraceManuOrderResponse> traceManuOrderResponses = traceManuOrderService.filterTraces(traceManuOrderRequest);
PageInfo<TraceManuOrderResponse> pageInfo = new PageInfo<>(traceManuOrderResponses);
PageSimpleResponse<TraceManuOrderResponse> pageSimpleResponse = new PageSimpleResponse<>();
@ -83,13 +82,13 @@ public class TraceManuOrderController {
@AuthRuleAnnotation("udi/trace/manu/order/relCode")
@GetMapping("udi/trace/manu/order/relCode")
public BaseResponse filterDetail(TraceManuDetailRequest traceManuDetailRequest) {
List<TraceManuCodeRellResponse> traceManuCodeRellResponses = traceManuCodeRelService.filterList(traceManuDetailRequest);
PageInfo<TraceManuCodeRellResponse> pageInfo = new PageInfo<>(traceManuCodeRellResponses);
PageSimpleResponse<TraceManuCodeRellResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(traceManuCodeRellResponses);
return ResultVOUtils.success(pageSimpleResponse);
}
@Resource

@ -193,5 +193,9 @@ public class TraceOrderEntity implements Serializable {
@TableField(value = "sourceType")
private Long sourceType;
@ApiModelProperty(value = "记录号外键")
@TableField(value = "recordCode")
private String recordCode;
private static final long serialVersionUID = 1L;
}

@ -10,6 +10,9 @@
<if test="manuOrderNo != '' and manuOrderNo != null">
and manuOrderNo = #{manuOrderNo}
</if>
<if test="manuOrderIdFk != '' and manuOrderIdFk != null">
and manuOrderIdFk = #{manuOrderIdFk}
</if>
</where>
</select>
</mapper>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.trace.TraceManuOrderMapper">
<select id="filterTraces" parameterType="com.glxp.api.req.trace.TraceManuOrderRequest"
<select id="filterTraces2" parameterType="com.glxp.api.req.trace.TraceManuOrderRequest"
resultType="com.glxp.api.res.trace.TraceManuOrderResponse">
-- SELECT tmo.*, mid.*, uc.companyName
-- FROM trace_manu_order tmo
@ -41,6 +41,16 @@
</where>
AND trd.batchNo IS NOT NULL
</select>
<select id="filterTraces" parameterType="com.glxp.api.req.trace.TraceManuOrderRequest"
resultType="com.glxp.api.res.trace.TraceManuOrderResponse">
SELECT *
FROM trace_manu_order
<where>
<if test="recordCode != '' and recordCode != null">
and recordCode = #{recordCode}
</if>
</where>
</select>
<select id="filterTraces1" parameterType="com.glxp.api.req.trace.TraceManuOrderRequest"
resultType="com.glxp.api.res.trace.TraceManuOrderResponse">
select *

Loading…
Cancel
Save