feat:预炸

This commit is contained in:
苏竹红
2025-06-24 11:34:43 +08:00
parent 1dab792aad
commit 7eb5bf8059
9 changed files with 181 additions and 18 deletions

View File

@@ -15,7 +15,7 @@
<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="violation_reason" jdbcType="VARCHAR" property="violationReason" />
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
</resultMap>
@@ -43,6 +43,16 @@
</foreach>
</update>
<select id="selectByIds" resultMap="BaseResultMap">
SELECT * FROM xfsg_pre_fry_records
WHERE id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
ORDER BY created_time DESC
</select>
<select id="selectByStoreAndDateStage" resultMap="BaseResultMap">
SELECT * FROM xfsg_pre_fry_records
WHERE store_code = #{storeCode}
@@ -110,12 +120,33 @@
AND a.violation_flag = #{query.violationFlag}
</if>
<if test="query.violationReason != null">
AND a.violation_reason = #{query.violationReason}
AND a.violation_reason LIKE CONCAT('%', #{query.violationReason}, '%')
</if>
</where>
ORDER BY a.fry_date DESC
</select>
<update id="batchUpdateViolation">
UPDATE xfsg_pre_fry_records
SET
violation_flag = CASE id
<foreach collection="list" item="item">
WHEN #{item.id} THEN #{item.violationFlag}
</foreach>
ELSE violation_flag
END,
violation_reason = CASE id
<foreach collection="list" item="item">
WHEN #{item.id} THEN #{item.violationReason}
</foreach>
ELSE violation_reason
END,
updated_time = NOW()
WHERE id IN
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item.id}
</foreach>
</update>
</mapper>