fix:最新订货时间定时任务过滤门店状态
This commit is contained in:
@@ -99,7 +99,7 @@ public class StoreDao {
|
||||
/**
|
||||
* 查询所有门店id和门店编码
|
||||
*/
|
||||
public List<StoreDO> getAllStoreIdAndNum() {
|
||||
return storeMapper.getAllStoreIdAndNum();
|
||||
public List<StoreDO> getAllStoreIdAndNum(List<String> storeStatus) {
|
||||
return storeMapper.getAllStoreIdAndNum(storeStatus);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,5 +58,5 @@ public interface StoreMapper {
|
||||
/**
|
||||
* 查询所有门店id和门店编码
|
||||
*/
|
||||
List<StoreDO> getAllStoreIdAndNum();
|
||||
List<StoreDO> getAllStoreIdAndNum(@Param("storeStatus") List<String> storeStatus);
|
||||
}
|
||||
|
||||
@@ -248,5 +248,11 @@
|
||||
SELECT store_id, store_num
|
||||
FROM store_${enterpriseId}
|
||||
WHERE is_delete = 'effective'
|
||||
<if test="storeStatus != null and !storeStatus.isEmpty()">
|
||||
AND store_status IN
|
||||
<foreach item="item" collection="storeStatus" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -407,13 +407,18 @@ public class XxlJobHandler {
|
||||
@XxlJob("latestOrderDate")
|
||||
public void latestOrderDate() {
|
||||
log.info("------start latestOrderDate------");
|
||||
String param = XxlJobHelper.getJobParam();
|
||||
List<String> storeStatus = null;
|
||||
if (StringUtils.isNotBlank(param)) {
|
||||
storeStatus = Arrays.asList(param.split(","));
|
||||
}
|
||||
boolean hasNext = true;
|
||||
int pageNum = 1;
|
||||
int pageSize = CommonConstants.BATCH_SIZE;
|
||||
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
while (hasNext) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<StoreDO> storeList = storeDao.getAllStoreIdAndNum();
|
||||
List<StoreDO> storeList = storeDao.getAllStoreIdAndNum(storeStatus);
|
||||
if (CollectionUtils.isEmpty(storeList)) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user