Commit 0f2f6a018a87b1aec14c380c3dc7ec30a439aa3e
1 parent
4ea8b8de
feat: 超时取消订单,确认趟次重置验证码
Showing
11 changed files
with
165 additions
and
11 deletions
trash-admin/src/main/java/com/trash/Application.java
| ... | ... | @@ -3,6 +3,7 @@ package com.trash; |
| 3 | 3 | import org.springframework.boot.SpringApplication; |
| 4 | 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| 5 | 5 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
| 6 | +import org.springframework.scheduling.annotation.EnableScheduling; | |
| 6 | 7 | |
| 7 | 8 | /** |
| 8 | 9 | * 启动程序 |
| ... | ... | @@ -10,6 +11,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
| 10 | 11 | * @author trash |
| 11 | 12 | */ |
| 12 | 13 | @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) |
| 14 | +@EnableScheduling | |
| 13 | 15 | public class Application |
| 14 | 16 | { |
| 15 | 17 | public static void main(String[] args) | ... | ... |
trash-common/src/main/java/com/trash/common/core/redis/RedisCache.java
| ... | ... | @@ -93,6 +93,10 @@ public class RedisCache |
| 93 | 93 | { |
| 94 | 94 | return redisTemplate.delete(key); |
| 95 | 95 | } |
| 96 | + public boolean deleteObject(final String key,final String hashKey) | |
| 97 | + { | |
| 98 | + return redisTemplate.opsForHash().delete(key,hashKey) != 0L; | |
| 99 | + } | |
| 96 | 100 | |
| 97 | 101 | /** |
| 98 | 102 | * 删除集合对象 | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/global/GlobalStatus.java
| ... | ... | @@ -14,6 +14,10 @@ public class GlobalStatus { |
| 14 | 14 | * 已注销 |
| 15 | 15 | */ |
| 16 | 16 | public static final int DEL_FLAG_YES = 1; |
| 17 | + /** 订单超时 */ | |
| 18 | + public static final boolean ORDER_TIME_OUT_FLAG_YES = true; | |
| 19 | + /** 订单未超时 */ | |
| 20 | + public static final boolean ORDER_TIME_OUT_FLAG_NO = false; | |
| 17 | 21 | |
| 18 | 22 | /** |
| 19 | 23 | * 地址查询类型 当前地址 |
| ... | ... | @@ -88,6 +92,8 @@ public class GlobalStatus { |
| 88 | 92 | * 订单 |
| 89 | 93 | */ |
| 90 | 94 | public enum GarOrderStatus { |
| 95 | + ORDER_TIME_OUT_FLAG_YES(1,"已超时"), | |
| 96 | + ORDER_TIME_OUT_FLAG_NO(0,"未超时"), | |
| 91 | 97 | NEW_ORDER(0, "新订单"), |
| 92 | 98 | ACTIVE_ORDER(1, "处理中"), |
| 93 | 99 | ALL_ORDER(2, "全部订单"), | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/interceptor/MyMetaObjectHandler.java
| ... | ... | @@ -23,13 +23,21 @@ public class MyMetaObjectHandler implements MetaObjectHandler { |
| 23 | 23 | this.strictInsertFill(metaObject, "garCreateTime", Date.class, new Date()); |
| 24 | 24 | } |
| 25 | 25 | if (metaObject.hasGetter("garCreateBy")) { |
| 26 | - this.strictInsertFill(metaObject, "garCreateBy", String.class, SecurityUtils.getLoginUser().getUser().getUserId()); | |
| 26 | + try { | |
| 27 | + this.strictInsertFill(metaObject, "garCreateBy", String.class, SecurityUtils.getLoginUser().getUser().getUserId()); | |
| 28 | + }catch (Exception e) { | |
| 29 | + log.info("当前操作定时任务"); | |
| 30 | + } | |
| 27 | 31 | } |
| 28 | 32 | if (metaObject.hasGetter("garUpdateTime")) { |
| 29 | 33 | this.strictInsertFill(metaObject, "garUpdateTime", Date.class, new Date()); |
| 30 | 34 | } |
| 31 | 35 | if (metaObject.hasGetter("garUpdateBy")) { |
| 32 | - this.strictInsertFill(metaObject, "garUpdateBy", String.class, SecurityUtils.getLoginUser().getUser().getUserId()); | |
| 36 | + try { | |
| 37 | + this.strictInsertFill(metaObject, "garUpdateBy", String.class, SecurityUtils.getLoginUser().getUser().getUserId()); | |
| 38 | + }catch (Exception e) { | |
| 39 | + log.info("当前操作定时任务"); | |
| 40 | + } | |
| 33 | 41 | } |
| 34 | 42 | } |
| 35 | 43 | |
| ... | ... | @@ -39,7 +47,11 @@ public class MyMetaObjectHandler implements MetaObjectHandler { |
| 39 | 47 | this.strictUpdateFill(metaObject, "garUpdateTime", Date.class, new Date()); |
| 40 | 48 | } |
| 41 | 49 | if (metaObject.hasGetter("garUpdateBy")) { |
| 42 | - this.strictUpdateFill(metaObject, "garUpdateBy", String.class, SecurityUtils.getLoginUser().getUser().getUserId()); | |
| 50 | + try { | |
| 51 | + this.strictUpdateFill(metaObject, "garUpdateBy", String.class, SecurityUtils.getLoginUser().getUser().getUserId()); | |
| 52 | + }catch (Exception e) { | |
| 53 | + log.info("当前操作定时任务"); | |
| 54 | + } | |
| 43 | 55 | } |
| 44 | 56 | } |
| 45 | 57 | } |
| 46 | 58 | \ No newline at end of file | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/job/OrderJob.java
0 → 100644
| 1 | +package com.trash.garbage.job; | |
| 2 | + | |
| 3 | +import com.trash.common.utils.DateUtils; | |
| 4 | +import com.trash.garbage.global.GlobalStatus; | |
| 5 | +import com.trash.garbage.pojo.domain.GarOrder; | |
| 6 | +import com.trash.garbage.pojo.domain.GarUserOrderMessage; | |
| 7 | +import com.trash.garbage.service.GarOrderService; | |
| 8 | +import com.trash.garbage.service.GarUserOrderMessageService; | |
| 9 | +import com.trash.garbage.utils.SMSUtils; | |
| 10 | +import org.slf4j.Logger; | |
| 11 | +import org.slf4j.LoggerFactory; | |
| 12 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 13 | +import org.springframework.scheduling.annotation.Scheduled; | |
| 14 | +import org.springframework.stereotype.Component; | |
| 15 | + | |
| 16 | +import javax.annotation.Resource; | |
| 17 | +import java.util.ArrayList; | |
| 18 | +import java.util.Date; | |
| 19 | +import java.util.List; | |
| 20 | +import java.util.stream.Collectors; | |
| 21 | + | |
| 22 | +@Component | |
| 23 | +public class OrderJob { | |
| 24 | + | |
| 25 | + Logger log = LoggerFactory.getLogger(OrderJob.class); | |
| 26 | + @Resource | |
| 27 | + private SMSUtils smsUtils; | |
| 28 | + | |
| 29 | + @Autowired | |
| 30 | + private GarOrderService garOrderService; | |
| 31 | + @Autowired | |
| 32 | + private GarUserOrderMessageService orderMessageService; | |
| 33 | + | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * 超时订单直接完成 | |
| 37 | + */ | |
| 38 | + @Scheduled(cron = "0 0/1 * * * ?") | |
| 39 | + public void computedOrderIsTimeOut() { | |
| 40 | + // 每3分钟遍历一次订单 超时未处理得修改订单状态为完成,并设置订单超时 | |
| 41 | + // 查询依据是 新订单,未超时,未取消 | |
| 42 | + List<GarOrder> list = garOrderService.queryUnprocessedOrder(GlobalStatus.GarOrderStatus.NEW_ORDER.getValue(), GlobalStatus.GarOrderStatus.ORDER_TIME_OUT_FLAG_NO.getValue(), GlobalStatus.GarOrderStatus.CANCEL_FLAG_NO.getValue()); | |
| 43 | + List<GarOrder> timeOutList = new ArrayList<>(); | |
| 44 | + Date now = new Date(); | |
| 45 | + for (GarOrder order : list) { | |
| 46 | + String agreementTime = order.getGarOrderAgreementTime(); | |
| 47 | + // 2024-05-22 10:00-11:00 | |
| 48 | + String[] dateSplit = agreementTime.split(" "); | |
| 49 | + String dateStr = dateSplit[0] + " " + dateSplit[1].split("-")[0] + ":00"; | |
| 50 | + Date date = DateUtils.dateTime("yyyy-MM-dd HH:mm:ss", dateStr); | |
| 51 | + if (date.compareTo(now) < 0) { | |
| 52 | + timeOutList.add(order); | |
| 53 | + } | |
| 54 | + } | |
| 55 | + log.info("检索订单超时完毕,当前共:{}个订单超时", timeOutList.size()); | |
| 56 | + garOrderService.updateTimeOutOrderStatus(timeOutList); | |
| 57 | + // 发送消息 | |
| 58 | + List<String> tels = timeOutList.stream().map(GarOrder::getGarOrderContactTel).collect(Collectors.toList()); | |
| 59 | + smsUtils.sendMessage(tels, "订单超时,已取消,请及时登录处理。"); | |
| 60 | + userOrderMessageSend(timeOutList, "订单超时,已取消。"); | |
| 61 | + } | |
| 62 | + | |
| 63 | + private void userOrderMessageSend(List<GarOrder> orderList, String message) { | |
| 64 | + for (GarOrder order : orderList) { | |
| 65 | + GarUserOrderMessage guom = new GarUserOrderMessage(); | |
| 66 | + guom.setGarMessageState(GlobalStatus.GarUserStatusEnum.ORDER_MESSAGE_UNREAD.getStatus()); | |
| 67 | + guom.setGarContent(message); | |
| 68 | + guom.setGarUserId(order.getGarCreateBy()); | |
| 69 | + guom.setGarUserTel(order.getGarOrderContactTel()); | |
| 70 | + orderMessageService.save(guom); | |
| 71 | + } | |
| 72 | + } | |
| 73 | +} | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/mapper/GarOrderMapper.java
| ... | ... | @@ -30,6 +30,9 @@ public interface GarOrderMapper extends BaseMapper<GarOrder> { |
| 30 | 30 | |
| 31 | 31 | OrderDetailTransportVo queryOrderTransportDetail(@Param("orderId") String id); |
| 32 | 32 | |
| 33 | + List<GarOrder> queryUnprocessedOrder(@Param("orderType")Integer orderType,@Param("timeOutFlag")Integer timeOutFlag,@Param("cancelFlag")Integer cancelFlag); | |
| 34 | + | |
| 35 | + void updateTimeOutOrderStatus(@Param("list") List<GarOrder> timeOutList, @Param("status")Integer status,@Param("timeOutFlag") Integer timeOutFlag); | |
| 33 | 36 | } |
| 34 | 37 | |
| 35 | 38 | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/pojo/domain/GarOrder.java
| ... | ... | @@ -165,6 +165,8 @@ public class GarOrder implements Serializable { |
| 165 | 165 | */ |
| 166 | 166 | private String garReason; |
| 167 | 167 | |
| 168 | + private Integer garTimeOutFlag; | |
| 169 | + | |
| 168 | 170 | |
| 169 | 171 | @TableField(exist = false) |
| 170 | 172 | private static final long serialVersionUID = 1L; |
| ... | ... | @@ -440,4 +442,12 @@ public class GarOrder implements Serializable { |
| 440 | 442 | public void setGarInCarStore(Boolean garInCarStore) { |
| 441 | 443 | this.garInCarStore = garInCarStore; |
| 442 | 444 | } |
| 445 | + | |
| 446 | + public Integer getGarTimeOutFlag() { | |
| 447 | + return garTimeOutFlag; | |
| 448 | + } | |
| 449 | + | |
| 450 | + public void setGarTimeOutFlag(Integer garTimeOutFlag) { | |
| 451 | + this.garTimeOutFlag = garTimeOutFlag; | |
| 452 | + } | |
| 443 | 453 | } |
| 444 | 454 | \ No newline at end of file | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/pojo/vo/OrderDetailVo.java
| ... | ... | @@ -106,6 +106,8 @@ public class OrderDetailVo { |
| 106 | 106 | */ |
| 107 | 107 | private String garOrderContactTel; |
| 108 | 108 | |
| 109 | + private Integer garTimeOutFlag; | |
| 110 | + | |
| 109 | 111 | /** |
| 110 | 112 | * 承接经营单位 |
| 111 | 113 | */ |
| ... | ... | @@ -401,4 +403,12 @@ public class OrderDetailVo { |
| 401 | 403 | public void setGarOrderScanHandlerFlag(Integer garOrderScanHandlerFlag) { |
| 402 | 404 | this.garOrderScanHandlerFlag = garOrderScanHandlerFlag; |
| 403 | 405 | } |
| 406 | + | |
| 407 | + public Integer getGarTimeOutFlag() { | |
| 408 | + return garTimeOutFlag; | |
| 409 | + } | |
| 410 | + | |
| 411 | + public void setGarTimeOutFlag(Integer garTimeOutFlag) { | |
| 412 | + this.garTimeOutFlag = garTimeOutFlag; | |
| 413 | + } | |
| 404 | 414 | } | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/GarOrderService.java
| ... | ... | @@ -95,4 +95,8 @@ public interface GarOrderService extends IService<GarOrder> { |
| 95 | 95 | String readMessage(List<String> messageIds); |
| 96 | 96 | |
| 97 | 97 | Integer queryOrderMessageCount(); |
| 98 | + | |
| 99 | + List<GarOrder> queryUnprocessedOrder(Integer value, Integer orderTimeOutFlagNo, Integer value1); | |
| 100 | + | |
| 101 | + void updateTimeOutOrderStatus(List<GarOrder> timeOutList); | |
| 98 | 102 | } | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarOrderServiceImpl.java
| ... | ... | @@ -89,6 +89,7 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 89 | 89 | order.setGarOrderScanHandlerFlag(GlobalStatus.GarOrderStatus.SCAN_HANDLER_NO.getValue()); |
| 90 | 90 | // 预估车辆等于用户选择得车辆 |
| 91 | 91 | order.setGarRealCarCount(dto.getGarCarInfoList().stream().mapToInt(OrderDto.CarInfo::getGarOrderCarNumber).sum()); |
| 92 | + order.setGarTimeOutFlag(GlobalStatus.GarOrderStatus.ORDER_TIME_OUT_FLAG_NO.getValue()); | |
| 92 | 93 | save(order); |
| 93 | 94 | |
| 94 | 95 | // 保存车辆信息 |
| ... | ... | @@ -215,7 +216,8 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 215 | 216 | || GlobalStatus.GarOrderStatus.SUCCESS_ORDER.getValue().equals(type)) { |
| 216 | 217 | qw.eq(GarOrder::getGarOrderUserId, userId) |
| 217 | 218 | .eq(GarOrder::getGarCancelFlag, GlobalStatus.GarOrderStatus.CANCEL_FLAG_NO.getValue()) |
| 218 | - .eq(GarOrder::getGarOrderHandlerStatus, type); | |
| 219 | + .eq(GarOrder::getGarOrderHandlerStatus, type) | |
| 220 | + .orderByDesc(GarOrder::getGarCreateTime); | |
| 219 | 221 | List<GarOrder> orderList = list(qw); |
| 220 | 222 | PageInfo<GarOrder> pageInfo = new PageInfo<GarOrder>(orderList, pageSize); |
| 221 | 223 | return pageInfo; |
| ... | ... | @@ -305,7 +307,7 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 305 | 307 | // 完成订单 |
| 306 | 308 | GarOrder order = getById(dto.getGarOrderId()); |
| 307 | 309 | // TODO 发送短信 通知企业和用户 修改订单状态为完成 disposal 和 handler表的状态一起修改 |
| 308 | - String message = "您的清运订单已完成,可前往小程序进行评价,感谢您的使用"; | |
| 310 | + String message = "您的清运订单已完成,可前往小程序进行评价,感谢您的使用。"; | |
| 309 | 311 | smsUtils.sendMessage(order.getGarOrderContactTel(), message); |
| 310 | 312 | smsUtils.sendMessage(order.getGarOrderCompanyTel(), "您的清运订单已完成,详情可在小程序查看。"); |
| 311 | 313 | successOrder(order); |
| ... | ... | @@ -590,6 +592,7 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 590 | 592 | } |
| 591 | 593 | |
| 592 | 594 | List<Long> enterpriseIds = list.stream().map(TransportationEnterprise::getId).collect(Collectors.toList()); |
| 595 | + // 企业id为空说明没有公司 | |
| 593 | 596 | List<GarOrder> orderList = baseMapper.queryCleanNumberByEnterpriseIds(enterpriseIds, GlobalStatus.GarOrderStatus.SUCCESS_ORDER.getValue()); |
| 594 | 597 | List<GarOrderEvaluate> evaluateList = garOrderEvaluateService.queryEvaluateByEnterpriseIds(enterpriseIds, GlobalStatus.GarOrderStatus.EVALUATE_TYPE_COMPANY.getValue()); |
| 595 | 598 | Map<String, List<GarOrderEvaluate>> evaluateMap = new HashMap<>(); |
| ... | ... | @@ -833,9 +836,10 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 833 | 836 | imageList.add(image); |
| 834 | 837 | } |
| 835 | 838 | garOrderImageService.saveBatch(imageList); |
| 839 | + // TODO 删除验证码 | |
| 840 | + redisCache.deleteObject(orderId, dto.getGarOrderHandlerId()); | |
| 836 | 841 | return "当前趟次记录成功"; |
| 837 | 842 | } |
| 838 | - | |
| 839 | 843 | throw new BizException(ResultCode.CODE_400, "当前记录无效,已完成所有趟次!"); |
| 840 | 844 | } |
| 841 | 845 | |
| ... | ... | @@ -950,6 +954,18 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 950 | 954 | return count; |
| 951 | 955 | } |
| 952 | 956 | |
| 957 | + @Override | |
| 958 | + public List<GarOrder> queryUnprocessedOrder(Integer value, Integer orderTimeOutFlag, Integer value1) { | |
| 959 | + return baseMapper.queryUnprocessedOrder(value, orderTimeOutFlag, value1); | |
| 960 | + } | |
| 961 | + | |
| 962 | + @Override | |
| 963 | + public void updateTimeOutOrderStatus(List<GarOrder> timeOutList) { | |
| 964 | + if (CollectionUtil.isNotEmpty(timeOutList)) { | |
| 965 | + baseMapper.updateTimeOutOrderStatus(timeOutList, GlobalStatus.GarOrderStatus.SUCCESS_ORDER.getValue(), GlobalStatus.GarOrderStatus.ORDER_TIME_OUT_FLAG_YES.getValue()); | |
| 966 | + } | |
| 967 | + } | |
| 968 | + | |
| 953 | 969 | private void handleCleanNumber(TransportationEnterpriseVo vo, List<GarOrder> orderList) { |
| 954 | 970 | Long cleanNumber = 0L; |
| 955 | 971 | for (GarOrder order : orderList) { | ... | ... |
trash-garbage/src/main/resources/mapper/GarOrderMapper.xml
| ... | ... | @@ -8,6 +8,7 @@ |
| 8 | 8 | <id property="garOrderId" column="gar_order_id" jdbcType="VARCHAR"/> |
| 9 | 9 | <result property="garOrderUserId" column="gar_order_user_id" jdbcType="VARCHAR"/> |
| 10 | 10 | <result property="garOrderAddress" column="gar_order_address" jdbcType="VARCHAR"/> |
| 11 | + <result property="garTimeOutFlag" column="gar_time_out_flag" jdbcType="TINYINT"/> | |
| 11 | 12 | <result property="garOrderAddressDetails" column="gar_order_address_details" jdbcType="VARCHAR"/> |
| 12 | 13 | <result property="garOrderContactName" column="gar_order_contact_name" jdbcType="VARCHAR"/> |
| 13 | 14 | <result property="garOrderTrashType" column="gar_order_trash_type" jdbcType="VARCHAR"/> |
| ... | ... | @@ -64,24 +65,30 @@ |
| 64 | 65 | gar_order_address,gar_order_address_details,gar_order_contact_name, |
| 65 | 66 | gar_order_trash_type,gar_order_contact_tel,gar_order_company_id, |
| 66 | 67 | gar_order_company_name,gar_order_company_tel,gar_order_handler_status, |
| 67 | - gar_order_agreement_time,gar_create_time,gar_update_time, | |
| 68 | + gar_order_agreement_time,gar_create_time,gar_update_time,gar_time_out_flag, | |
| 68 | 69 | gar_create_by,gar_update_by,gar_remark,gar_reason,gar_cancel_flag, |
| 69 | 70 | gar_evaluate_flag,gar_handler_evaluate_flag,gar_order_scan_handler_flag,gar_coordinate,gar_longitude,gar_latitude,gar_real_car_count |
| 70 | 71 | </sql> |
| 72 | + <update id="updateTimeOutOrderStatus"> | |
| 73 | + update gar_order set gar_order_handler_status = #{status},gar_time_out_flag = #{timeOutFlag} | |
| 74 | + where gar_order_id in | |
| 75 | + <foreach collection="list" item="item" open="(" separator="," close=")"> | |
| 76 | + #{item.garOrderId} | |
| 77 | + </foreach> | |
| 78 | + </update> | |
| 71 | 79 | <select id="queryCleanNumberByEnterpriseIds" resultType="com.trash.garbage.pojo.domain.GarOrder"> |
| 80 | + | |
| 81 | + <if test="list != null and list.size() > 0"> | |
| 72 | 82 | select gar_order_company_id, count(gar_order_company_id) as count |
| 73 | 83 | from gar_order |
| 74 | 84 | where gar_order_handler_status = #{status} |
| 75 | - <if test="list != null and list.size() > 0"> | |
| 76 | 85 | and gar_order_company_id in |
| 77 | 86 | <foreach collection="list" item="item" open="(" separator="," close=")"> |
| 78 | 87 | #{item} |
| 79 | 88 | </foreach> |
| 80 | 89 | group by gar_order_company_id |
| 81 | 90 | </if> |
| 82 | - <if test="list == null or list.size() == 0"> | |
| 83 | - and 1 = 0 | |
| 84 | - </if> | |
| 91 | + | |
| 85 | 92 | </select> |
| 86 | 93 | <select id="queryDriverOrderListByTelWithType" resultType="com.trash.garbage.pojo.vo.GarOrderDriverVo"> |
| 87 | 94 | SELECT |
| ... | ... | @@ -103,6 +110,7 @@ |
| 103 | 110 | AND `handler`.gar_cancel_flag = #{cancelFlag} |
| 104 | 111 | </if> |
| 105 | 112 | </where> |
| 113 | + order by desc `order`.gar_order_agreement_time | |
| 106 | 114 | </select> |
| 107 | 115 | <select id="queryOrderByTelWithType" resultType="com.trash.garbage.pojo.vo.GarOrderDriverVo"> |
| 108 | 116 | SELECT |
| ... | ... | @@ -159,6 +167,7 @@ |
| 159 | 167 | AND `disposal`.gar_order_disposal_status = #{type} |
| 160 | 168 | </if> |
| 161 | 169 | </where> |
| 170 | + order by desc `order`.gar_order_agreement_time | |
| 162 | 171 | </select> |
| 163 | 172 | <select id="queryDriverDetailByTelWithOrderId" resultType="com.trash.garbage.pojo.vo.ScanDriverDetailVo"> |
| 164 | 173 | SELECT |
| ... | ... | @@ -207,4 +216,9 @@ |
| 207 | 216 | LEFT JOIN gar_order_match_ask `ask` ON `ask`.gar_order_id = `order`.gar_order_id |
| 208 | 217 | WHERE `order`.gar_order_id = #{orderId} |
| 209 | 218 | </select> |
| 219 | + <select id="queryUnprocessedOrder" resultType="com.trash.garbage.pojo.domain.GarOrder"> | |
| 220 | + select * | |
| 221 | + from gar_order | |
| 222 | + where gar_order.gar_order_handler_status = #{orderType} and gar_order.gar_time_out_flag = #{timeOutFlag} and gar_order.gar_cancel_flag = #{cancelFlag} | |
| 223 | + </select> | |
| 210 | 224 | </mapper> | ... | ... |