feat:预炸
This commit is contained in:
@@ -59,6 +59,14 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectByProductIds" resultMap="BaseResultMap">
|
||||
SELECT * FROM xfsg_pre_fried_products where deleted = 0
|
||||
and id IN
|
||||
<foreach collection="productIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
<update id="forceUpdate">
|
||||
UPDATE xfsg_pre_fried_products
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
|
||||
<result column="product_code" jdbcType="INTEGER" property="productId" />
|
||||
<result column="product_id" jdbcType="INTEGER" property="productId" />
|
||||
<result column="record_code" jdbcType="VARCHAR" property="recordCode" />
|
||||
<result column="fry_date" jdbcType="DATE" property="fryDate" />
|
||||
<result column="fry_complete_time" jdbcType="TIMESTAMP" property="fryCompleteTime" />
|
||||
<result column="latest_sale_time" jdbcType="TIMESTAMP" property="latestSaleTime" />
|
||||
@@ -44,16 +45,28 @@
|
||||
SELECT * FROM xfsg_pre_fry_records
|
||||
WHERE store_code = #{storeCode}
|
||||
AND (
|
||||
(fry_date = DATE_SUB(CURDATE(), INTERVAL 1 DAY)
|
||||
(fry_date = DATE_SUB(#{queryDate}, INTERVAL 1 DAY)
|
||||
AND current_stage IN
|
||||
<foreach collection="yesterdayStageList" item="stage" open="(" separator="," close=")">
|
||||
#{stage}
|
||||
</foreach>)
|
||||
OR
|
||||
(fry_date = CURDATE() AND current_stage = #{todayStage})
|
||||
(fry_date = #{queryDate} AND current_stage = #{todayStage})
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="selectDailyFryCountInCurrentMonth" resultType="com.cool.store.dto.pre.fry.DailyFryCountDTO">
|
||||
SELECT
|
||||
fry_date as fryDate,
|
||||
COUNT(*) as count
|
||||
FROM xfsg_pre_fry_records
|
||||
WHERE store_code = #{storeCode}
|
||||
AND fry_date BETWEEN DATE_FORMAT(FROM_UNIXTIME(#{timestamp}/1000), '%Y-%m-01')
|
||||
AND LAST_DAY(FROM_UNIXTIME(#{timestamp}/1000)
|
||||
GROUP BY fry_date
|
||||
ORDER BY fry_date
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -34,6 +34,18 @@
|
||||
WHERE record_id = #{recordId}
|
||||
ORDER BY created_time DESC
|
||||
</select>
|
||||
<select id="selectByRecordIdList" resultType="com.cool.store.dto.pre.fry.PreFryStageImagesDTO">
|
||||
SELECT id, record_id, image1, image2, created_time,stage
|
||||
FROM xfsg_pre_fry_stage_changes
|
||||
<where>
|
||||
and record_id in
|
||||
<foreach collection="recordIdList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
ORDER BY created_time DESC
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user