feat:预炸
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
<result column="latest_sale_time" jdbcType="TIMESTAMP" property="latestSaleTime" />
|
||||
<result column="current_stage" jdbcType="TINYINT" property="currentStage" />
|
||||
<result column="current_apply_type" jdbcType="TINYINT" property="currentApplyType" />
|
||||
<result column="violation_flag" jdbcType="TINYINT" property="violationFlag" />
|
||||
<result column="violation_reason" jdbcType="TINYINT" property="violationReason" />
|
||||
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||
</resultMap>
|
||||
@@ -67,6 +69,53 @@
|
||||
ORDER BY fry_date
|
||||
</select>
|
||||
|
||||
<select id="selectByQueryDTO" resultType="com.cool.store.dto.pre.fry.PreFryRecordsDTO">
|
||||
SELECT
|
||||
a.id as id,
|
||||
a.record_code as recordCode,
|
||||
a.current_stage as currentStage,
|
||||
a.fry_date as fryDate,
|
||||
a.violation_flag as violationFlag,
|
||||
a.violation_reason as violationReason,
|
||||
b.product_name as productName,
|
||||
b.product_code as productCode,
|
||||
c.store_name as storeName,
|
||||
c.store_num as storeNum
|
||||
FROM xfsg_pre_fry_records a
|
||||
LEFT JOIN xfsg_pre_fried_products b ON a.product_id = b.id
|
||||
LEFT JOIN store_5558ce7a3aa84e3590392fcaa8697ffb c ON a.store_code = c.store_num
|
||||
<where>
|
||||
<if test="query.recordCode != null and query.recordCode != ''">
|
||||
AND a.record_code LIKE CONCAT('%', #{query.recordCode}, '%')
|
||||
</if>
|
||||
<if test="query.storeCode != null and query.storeCode != ''">
|
||||
AND a.store_code LIKE CONCAT('%', #{query.storeCode}, '%')
|
||||
</if>
|
||||
<if test="query.storeName != null and query.storeName != ''">
|
||||
AND c.store_name LIKE CONCAT('%', #{query.storeName}, '%')
|
||||
</if>
|
||||
<if test="query.productCode != null and query.productCode != ''">
|
||||
AND b.product_code LIKE CONCAT('%', #{query.productCode}, '%')
|
||||
</if>
|
||||
<if test="query.productName != null and query.productName != ''">
|
||||
AND b.product_name LIKE CONCAT('%', #{query.productName}, '%')
|
||||
</if>
|
||||
<if test="query.currentStage != null">
|
||||
AND a.current_stage = #{query.currentStage}
|
||||
</if>
|
||||
<if test="query.fryStartDate != null and query.fryEndDate != null">
|
||||
AND a.fry_date BETWEEN #{query.fryStartDate} AND #{query.fryEndDate}
|
||||
</if>
|
||||
<if test="query.violationFlag != null">
|
||||
AND a.violation_flag = #{query.violationFlag}
|
||||
</if>
|
||||
<if test="query.violationReason != null">
|
||||
AND a.violation_reason = #{query.violationReason}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.fry_date DESC
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user