feat:applyType
This commit is contained in:
@@ -70,13 +70,11 @@ public class PreFryRecordsDAO {
|
||||
}
|
||||
|
||||
public List<PreFryRecordsDO> selectByStoreAndDateStage(String storeCode,
|
||||
Integer applyType,
|
||||
List<Integer> yesterdayStageList,
|
||||
Integer todayStage, String queryDate){
|
||||
if (StringUtils.isBlank(storeCode) || CollectionUtils.isEmpty(yesterdayStageList)) {
|
||||
Integer applyType, String queryDate){
|
||||
if (StringUtils.isBlank(storeCode)) {
|
||||
return null;
|
||||
}
|
||||
return preFryRecordsMapper.selectByStoreAndDateStage(storeCode,applyType,yesterdayStageList,todayStage,queryDate);
|
||||
return preFryRecordsMapper.selectByStoreAndDateStage(storeCode,applyType,queryDate);
|
||||
}
|
||||
|
||||
public List<DailyFryCountDTO> selectDailyFryCountInCurrentMonth(String storeCode,Long time) {
|
||||
|
||||
@@ -23,8 +23,6 @@ public interface PreFryRecordsMapper extends Mapper<PreFryRecordsDO> {
|
||||
List<PreFryRecordsDO> selectByStoreAndDateStage(
|
||||
@Param("storeCode") String storeCode,
|
||||
@Param("applyType") Integer applyType,
|
||||
@Param("yesterdayStageList") List<Integer> yesterdayStageList,
|
||||
@Param("todayStage") Integer todayStage,
|
||||
@Param("queryDate") String queryDate);
|
||||
|
||||
|
||||
|
||||
@@ -55,18 +55,9 @@
|
||||
|
||||
<select id="selectByStoreAndDateStage" resultMap="BaseResultMap">
|
||||
SELECT * FROM xfsg_pre_fry_records
|
||||
WHERE store_code = #{storeCode}
|
||||
AND (
|
||||
(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 = #{queryDate} AND current_stage = #{todayStage})
|
||||
<if test="applyType!=null and applyType==2">
|
||||
or (fry_date = #{queryDate} AND current_stage = 2 and current_apply_type = 2)
|
||||
</if>
|
||||
)
|
||||
WHERE store_code = #{storeCode} and current_apply_type = #{applyType}
|
||||
AND ( (fry_date = DATE_SUB(#{queryDate}, INTERVAL 1 DAY) AND current_stage IN (3,4,5)
|
||||
OR (fry_date = #{queryDate} AND current_stage in (1, 2) )
|
||||
</select>
|
||||
|
||||
<select id="selectDailyFryCountInCurrentMonth" resultType="com.cool.store.dto.pre.fry.DailyFryCountDTO">
|
||||
|
||||
Reference in New Issue
Block a user