From f318c9c7c127b00f353bf45f273096d1dc4b424f Mon Sep 17 00:00:00 2001 From: admin <1101184511@qq.com> Date: 星期三, 20 八月 2025 01:10:48 +0800 Subject: [PATCH] 功能完善 --- src/main/java/com/taoke/autopay/factory/js2/OrderTaskExecutionDetailFactory.java | 14 +- src/main/resources/mapper/OrderTaskExecutionDetailMapper.xml | 30 ++-- src/main/java/com/taoke/autopay/dao/OrderTaskMapper.java | 1 src/main/resources/static/admin/order-task-update.html | 6 src/main/resources/static/admin/order-client-update.html | 14 -- src/main/resources/mapper/OrderTaskMapper.xml | 11 + src/main/resources/static/admin/order-task-assigned-clients.html | 75 ++++++++++++ src/main/java/com/taoke/autopay/controller/client/js2/OrderTaskController.java | 96 ++++++++++----- src/main/java/com/taoke/autopay/dao/OrderTaskExecutionDetailMapper.java | 1 src/main/resources/logback.xml | 19 +++ src/main/java/com/taoke/autopay/factory/js2/OrderTaskFactory.java | 4 src/main/resources/static/admin/order-client-list.html | 5 src/main/java/com/taoke/autopay/service/impl/js2/OrderTaskExecutionDetailServiceImpl.java | 2 src/main/resources/mapper/KeyOrderMapper.xml | 2 src/main/java/com/taoke/autopay/service/impl/js2/OrderTaskServiceImpl.java | 2 src/main/java/com/taoke/autopay/vo/OrderTaskExecutionDetailVO.java | 5 src/main/java/com/taoke/autopay/vo/admin/js2/OrderTaskVO.java | 4 src/main/resources/static/admin/order-task-list.html | 18 +- src/main/java/com/taoke/autopay/entity/js2/OrderTaskExecutionDetail.java | 6 + src/main/java/com/taoke/autopay/service/impl/ClientInfoServiceImpl.java | 2 src/main/java/com/taoke/autopay/controller/admin/js2/AdminOrderTaskController.java | 27 ++++ src/main/java/com/taoke/autopay/entity/js2/OrderTask.java | 6 + 22 files changed, 253 insertions(+), 97 deletions(-) diff --git a/src/main/java/com/taoke/autopay/controller/admin/js2/AdminOrderTaskController.java b/src/main/java/com/taoke/autopay/controller/admin/js2/AdminOrderTaskController.java index d5d3d2b..bda539e 100644 --- a/src/main/java/com/taoke/autopay/controller/admin/js2/AdminOrderTaskController.java +++ b/src/main/java/com/taoke/autopay/controller/admin/js2/AdminOrderTaskController.java @@ -11,10 +11,12 @@ import com.taoke.autopay.entity.js2.OrderTaskExecutionDetail; import com.taoke.autopay.exception.OrderTaskException; import com.taoke.autopay.factory.js2.OrderTaskFactory; +import com.taoke.autopay.service.js2.OrderTaskExecutionDetailService; import com.taoke.autopay.service.js2.OrderTaskService; import com.taoke.autopay.utils.TimeUtil; import com.taoke.autopay.vo.admin.js2.OrderTaskVO; import net.sf.json.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -24,6 +26,7 @@ import javax.annotation.Resource; import java.io.IOException; +import java.sql.Time; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Arrays; @@ -63,6 +66,8 @@ return new Date(); } }).create(); + @Autowired + private OrderTaskExecutionDetailService orderTaskExecutionDetailService; /** * 浠诲姟鍒楄〃鏌ヨ锛堟寜鐓у叧閿瓧锛屾棩鏈熸煡璇級 @@ -267,4 +272,26 @@ return JsonUtil.loadFalseResult("绯荤粺寮傚父锛�" + e.getMessage()); } } + + @ResponseBody + @RequestMapping("updateExpectedReviewTime") + public String updateExpectedReviewTime(String id, String expectedReviewTime) { + try { + if (StringUtil.isNullOrEmpty(id)) { + return JsonUtil.loadFalseResult("ID涓嶈兘涓虹┖"); + } + + OrderTaskExecutionDetail update = OrderTaskExecutionDetail.builder() + .id( id) + .expectedReviewTime(new Date(TimeUtil.convertToTimeTemp(expectedReviewTime, "yyyy-MM-dd HH:mm:ss"))) + .updateTime(new Date()) + .build(); + orderTaskExecutionDetailService.updateOrderTaskExecutionDetail(update); + return JsonUtil.loadTrueResult(""); + } catch (Exception e) { + return JsonUtil.loadFalseResult("绯荤粺寮傚父锛�" + e.getMessage()); + } + } + + } \ No newline at end of file diff --git a/src/main/java/com/taoke/autopay/controller/client/js2/OrderTaskController.java b/src/main/java/com/taoke/autopay/controller/client/js2/OrderTaskController.java index d2ec13d..fb232a6 100644 --- a/src/main/java/com/taoke/autopay/controller/client/js2/OrderTaskController.java +++ b/src/main/java/com/taoke/autopay/controller/client/js2/OrderTaskController.java @@ -11,6 +11,7 @@ import com.taoke.autopay.entity.js2.OrderTaskExecutionDetail; import com.taoke.autopay.factory.js2.OrderTaskExecutionDetailFactory; import com.taoke.autopay.service.ClientAdditionalInfoService; +import com.taoke.autopay.service.ClientInfoService; import com.taoke.autopay.service.js2.OrderTaskExecutionDetailService; import com.taoke.autopay.service.js2.OrderTaskService; import com.taoke.autopay.utils.TimeUtil; @@ -36,6 +37,8 @@ @Controller @RequestMapping("api/client/js2/task") public class OrderTaskController { + + private Logger loggerDoOrder = LoggerFactory.getLogger("doOrderLogger"); @Resource private ClientAdditionalInfoService clientAdditionalInfoService; @@ -66,11 +69,14 @@ @Resource private OrderTaskService orderTaskService; + @Resource + private ClientInfoService clientInfoService; + /** * 鑾峰彇璁惧鍙墽琛岀殑浠诲姟鍒楄〃 * - * @param uid 瀹㈡埛绔疘D - * @param page 椤电爜 + * @param uid 瀹㈡埛绔疘D + * @param page 椤电爜 * @param pageSize 姣忛〉鏁伴噺 * @return 浠诲姟鍒楄〃 */ @@ -81,54 +87,77 @@ if (uid == null) { return JsonUtil.loadFalseResult("瀹㈡埛绔疘D涓嶈兘涓虹┖"); } - List<OrderTaskExecutionDetailVO> voList= new ArrayList<>(); - List<OrderTaskExecutionDetail> list = orderTaskExecutionDetailService.listCanExcuteTaskDetail(uid, (page-1)*pageSize,pageSize); - if(!list.isEmpty()){ - List<Long> taskIds=new ArrayList<>(); + clientInfoService.setActiveTime(uid, new Date()); + List<OrderTaskExecutionDetailVO> voList = new ArrayList<>(); + List<OrderTaskExecutionDetail> list = orderTaskExecutionDetailService.listCanExcuteTaskDetail(uid, (page - 1) * pageSize, pageSize); + if (!list.isEmpty()) { + List<Long> taskIds = new ArrayList<>(); for (OrderTaskExecutionDetail detail : list) { - if(taskIds.contains(detail.getTaskId())){ + if (taskIds.contains(detail.getTaskId())) { continue; } taskIds.add(detail.getTaskId()); } // 鑾峰彇鎵嬫満鍙蜂笌鏀粯瀹濊处鍙蜂俊鎭� ClientAdditionalInfo clientAdditionalInfo = clientAdditionalInfoService.getClientAdditionalInfoByClientId(uid); - List<OrderTask> orderTaskList = orderTaskService.getOrderTaskByIds(taskIds); - Map<Long, OrderTask> orderTaskMap=new HashMap<>(); - for(OrderTask task:orderTaskList){ - orderTaskMap.put(task.getId(),task); + List<OrderTask> orderTaskList = orderTaskService.getOrderTaskByIds(taskIds); + Map<Long, OrderTask> orderTaskMap = new HashMap<>(); + for (OrderTask task : orderTaskList) { + orderTaskMap.put(task.getId(), task); } - for(OrderTaskExecutionDetail detail:list){ - OrderTaskExecutionDetailVO vo = OrderTaskExecutionDetailFactory.createOrderTaskExecutionDetailVO(orderTaskMap.get(detail.getTaskId()),detail,clientAdditionalInfo); + for (OrderTaskExecutionDetail detail : list) { + OrderTaskExecutionDetailVO vo = OrderTaskExecutionDetailFactory.createOrderTaskExecutionDetailVO(orderTaskMap.get(detail.getTaskId()), detail, clientAdditionalInfo); voList.add(vo); } } + voList.sort((o1, o2) -> (int) (o1.getCreateTime().getTime() - o2.getCreateTime().getTime())); long count = orderTaskExecutionDetailService.countCanExcuteTaskDetail(uid); JSONObject data = new JSONObject(); data.put("list", gson.toJson(voList)); data.put("count", count); return JsonUtil.loadTrueResult(data); } catch (Exception e) { + e.printStackTrace(); loggerTask.error("鑾峰彇浠诲姟鍒楄〃澶辫触: {}", e.getMessage(), e); return JsonUtil.loadFalseResult("绯荤粺寮傚父锛�" + e.getMessage()); } } + + @ResponseBody + @RequestMapping("canOrder") + public String canOrder(Long uid, String id) { + if (uid == null) { + return JsonUtil.loadFalseResult("瀹㈡埛绔疘D涓嶈兘涓虹┖"); + } + + if (StringUtil.isNullOrEmpty(id)) { + return JsonUtil.loadFalseResult("浠诲姟ID涓嶈兘涓虹┖"); + } + + OrderTaskExecutionDetail detail = orderTaskExecutionDetailService.getOrderTaskExecutionDetailByIdForUpdate(id); + if (detail == null || detail.getExecutionStatus() != OrderTaskExecutionDetail.STATUS_NOT_ORDERED) { + return JsonUtil.loadFalseResult("浠诲姟涓嶅瓨鍦ㄦ垨宸叉墽琛�"); + } + return JsonUtil.loadTrueResult(""); + } + /** * 涓嬪崟鎴愬姛 * - * @param uid 瀹㈡埛绔疘D - * @param id 浠诲姟鎵ц璇︽儏ID - * @param orderNo 璁㈠崟鍙� + * @param uid 瀹㈡埛绔疘D + * @param id + * 浠诲姟鎵ц璇︽儏ID + * @param orderNo 璁㈠崟鍙� * @param productTitle 鍟嗗搧鏍囬 - * @param shopName 搴楅摵鍚嶇О + * @param shopName 搴楅摵鍚嶇О * @param orderTimeStr 涓嬪崟鏃堕棿瀛楃涓� * @return 鎿嶄綔缁撴灉 */ @ResponseBody @RequestMapping("orderSuccess") public String orderSuccess(Long uid, String id, String orderNo, String productTitle, String shopName, String orderTimeStr) { - loggerTask.info("orderSuccess[{}]: {}-{}-{}-{}-{}", uid, id, orderNo, productTitle, shopName, orderTimeStr); + loggerDoOrder.info("涓嬪崟鎴愬姛[{}]: {}-{}-{}-{}-{}", uid, id, orderNo, productTitle, shopName, orderTimeStr); try { if (uid == null) { return JsonUtil.loadFalseResult("瀹㈡埛绔疘D涓嶈兘涓虹┖"); @@ -141,6 +170,9 @@ if (StringUtil.isNullOrEmpty(orderNo)) { return JsonUtil.loadFalseResult("璁㈠崟鍙蜂笉鑳戒负绌�"); } + + + orderNo = orderNo.split("璁㈠崟缂栧彿")[1]; Date orderTime = null; if (!StringUtil.isNullOrEmpty(orderTimeStr)) { @@ -164,15 +196,15 @@ /** * 涓嬪崟澶辫触锛屼笂浼犲け璐ュ師鍥� * - * @param uid 瀹㈡埛绔疘D - * @param id 浠诲姟鎵ц璇︽儏ID + * @param uid 瀹㈡埛绔疘D + * @param id 浠诲姟鎵ц璇︽儏ID * @param failureReason 澶辫触鍘熷洜 * @return 鎿嶄綔缁撴灉 */ @ResponseBody @RequestMapping("orderFailure") public String orderFailure(Long uid, String id, String failureReason) { - loggerTask.info("orderFailure[{}]: {}-{}", uid, id, failureReason); + loggerDoOrder.info("涓嬪崟澶辫触[{}]: {}-{}", uid, id, failureReason); try { if (uid == null) { return JsonUtil.loadFalseResult("瀹㈡埛绔疘D涓嶈兘涓虹┖"); @@ -197,15 +229,15 @@ /** * 纭鏀惰揣鎴愬姛锛屼笂浼犲埜鐮� * - * @param uid 瀹㈡埛绔疘D - * @param id 浠诲姟鎵ц璇︽儏ID + * @param uid 瀹㈡埛绔疘D + * @param id 浠诲姟鎵ц璇︽儏ID * @param couponCode 鍒哥爜 * @return 鎿嶄綔缁撴灉 */ @ResponseBody @RequestMapping("confirmReceiptSuccess") public String confirmReceiptSuccess(Long uid, String id, String couponCode) { - loggerTask.info("confirmReceiptSuccess[{}]: {}-{}", uid, id, couponCode); + loggerDoOrder.info("纭鏀惰揣鎴愬姛[{}]: {}-{}", uid, id, couponCode); try { if (uid == null) { return JsonUtil.loadFalseResult("瀹㈡埛绔疘D涓嶈兘涓虹┖"); @@ -230,15 +262,15 @@ /** * 纭鏀惰揣澶辫触锛屼笂浼犲け璐ュ師鍥� * - * @param uid 瀹㈡埛绔疘D - * @param id 浠诲姟鎵ц璇︽儏ID + * @param uid 瀹㈡埛绔疘D + * @param id 浠诲姟鎵ц璇︽儏ID * @param reason 澶辫触鍘熷洜 * @return 鎿嶄綔缁撴灉 */ @ResponseBody @RequestMapping("confirmReceiptFailure") public String confirmReceiptFailure(Long uid, String id, String reason) { - loggerTask.info("confirmReceiptFailure[{}]: {}-{}", uid, id, reason); + loggerDoOrder.info("纭鏀惰揣澶辫触[{}]: {}-{}", uid, id, reason); try { if (uid == null) { return JsonUtil.loadFalseResult("瀹㈡埛绔疘D涓嶈兘涓虹┖"); @@ -264,13 +296,13 @@ * 璇勪环鎴愬姛 * * @param uid 瀹㈡埛绔疘D - * @param id 浠诲姟鎵ц璇︽儏ID + * @param id 浠诲姟鎵ц璇︽儏ID * @return 鎿嶄綔缁撴灉 */ @ResponseBody @RequestMapping("reviewSuccess") public String reviewSuccess(Long uid, String id) { - loggerTask.info("reviewSuccess[{}]: {}", uid, id); + loggerDoOrder.info("璇勪环鎴愬姛[{}]: {}", uid, id); try { if (uid == null) { return JsonUtil.loadFalseResult("瀹㈡埛绔疘D涓嶈兘涓虹┖"); @@ -291,15 +323,15 @@ /** * 璇勪环澶辫触锛屼笂浼犲け璐ュ師鍥� * - * @param uid 瀹㈡埛绔疘D - * @param id 浠诲姟鎵ц璇︽儏ID + * @param uid 瀹㈡埛绔疘D + * @param id 浠诲姟鎵ц璇︽儏ID * @param reason 澶辫触鍘熷洜 * @return 鎿嶄綔缁撴灉 */ @ResponseBody @RequestMapping("reviewFailure") public String reviewFailure(Long uid, String id, String reason) { - loggerTask.info("reviewFailure[{}]: {}-{}", uid, id, reason); + loggerDoOrder.info("璇勪环澶辫触[{}]: {}-{}", uid, id, reason); try { if (uid == null) { return JsonUtil.loadFalseResult("瀹㈡埛绔疘D涓嶈兘涓虹┖"); diff --git a/src/main/java/com/taoke/autopay/dao/OrderTaskExecutionDetailMapper.java b/src/main/java/com/taoke/autopay/dao/OrderTaskExecutionDetailMapper.java index 4c97c83..27a2b51 100644 --- a/src/main/java/com/taoke/autopay/dao/OrderTaskExecutionDetailMapper.java +++ b/src/main/java/com/taoke/autopay/dao/OrderTaskExecutionDetailMapper.java @@ -52,6 +52,7 @@ public Date orderTime; public Date receiveTime; public Date reviewTime; + public Date expectedReviewTime; public Date minCreateTime; public Date maxCreateTime; public Date minUpdateTime; diff --git a/src/main/java/com/taoke/autopay/dao/OrderTaskMapper.java b/src/main/java/com/taoke/autopay/dao/OrderTaskMapper.java index e1e57bc..3f38c9d 100644 --- a/src/main/java/com/taoke/autopay/dao/OrderTaskMapper.java +++ b/src/main/java/com/taoke/autopay/dao/OrderTaskMapper.java @@ -33,6 +33,7 @@ public Integer receivedOrderCount; public Integer reviewedOrderCount; public Integer receiveCycleHours; + public Integer receiveCycleMinutes; public Date orderStartTime; public Date orderEndTime; public Date minCreateTime; diff --git a/src/main/java/com/taoke/autopay/entity/js2/OrderTask.java b/src/main/java/com/taoke/autopay/entity/js2/OrderTask.java index c72d4ff..f7634ca 100644 --- a/src/main/java/com/taoke/autopay/entity/js2/OrderTask.java +++ b/src/main/java/com/taoke/autopay/entity/js2/OrderTask.java @@ -102,6 +102,12 @@ private Integer receiveCycleHours; /** + * 纭鏀惰揣鍛ㄦ湡锛堝垎閽燂級 + */ + @Column(name = "receive_cycle_minutes") + private Integer receiveCycleMinutes; + + /** * 涓嬪崟寮�濮嬫椂闂� */ @Column(name = "order_start_time") diff --git a/src/main/java/com/taoke/autopay/entity/js2/OrderTaskExecutionDetail.java b/src/main/java/com/taoke/autopay/entity/js2/OrderTaskExecutionDetail.java index b076533..6c65402 100644 --- a/src/main/java/com/taoke/autopay/entity/js2/OrderTaskExecutionDetail.java +++ b/src/main/java/com/taoke/autopay/entity/js2/OrderTaskExecutionDetail.java @@ -110,6 +110,12 @@ */ @Column(name = "review_time") private Date reviewTime; + + /** + * 棰勮璇勪环鏃堕棿 + */ + @Column(name = "expected_review_time") + private Date expectedReviewTime; /** * 鍒涘缓鏃堕棿 diff --git a/src/main/java/com/taoke/autopay/factory/js2/OrderTaskExecutionDetailFactory.java b/src/main/java/com/taoke/autopay/factory/js2/OrderTaskExecutionDetailFactory.java index 303827e..fa18f76 100644 --- a/src/main/java/com/taoke/autopay/factory/js2/OrderTaskExecutionDetailFactory.java +++ b/src/main/java/com/taoke/autopay/factory/js2/OrderTaskExecutionDetailFactory.java @@ -40,7 +40,9 @@ .clientId(orderTaskExecutionDetail.getClientId()) .orderNo(orderTaskExecutionDetail.getOrderNo()) .productName(orderTaskExecutionDetail.getProductName()) - .shopName(orderTaskExecutionDetail.getShopName()); + .shopName(orderTaskExecutionDetail.getShopName()) + .expectedReviewTime(orderTaskExecutionDetail.getExpectedReviewTime()==null?"":TimeUtil.getGernalTime(orderTaskExecutionDetail.getExpectedReviewTime().getTime(),"yyyy-MM-dd HH:mm:ss")) + ; // 璁剧疆瀹㈡埛绔檮鍔犱俊鎭� if (clientAdditionalInfo != null) { @@ -54,10 +56,13 @@ if (executionStatus != null) { if (executionStatus == OrderTaskExecutionDetail.STATUS_NOT_ORDERED) { builder.executionType(OrderTaskExecutionDetailVO.EXECUTION_TYPE_ORDER); + builder.createTime(orderTaskExecutionDetail.getCreateTime()); } else if (executionStatus == OrderTaskExecutionDetail.STATUS_ORDERED) { builder.executionType(OrderTaskExecutionDetailVO.EXECUTION_TYPE_RECEIVE); + builder.createTime(orderTaskExecutionDetail.getOrderTime()); } else if (executionStatus == OrderTaskExecutionDetail.STATUS_RECEIVE_SUCCESS) { builder.executionType(OrderTaskExecutionDetailVO.EXECUTION_TYPE_REVIEW); + builder.createTime(orderTaskExecutionDetail.getExpectedReviewTime()); } } @@ -65,13 +70,6 @@ if (!StringUtil.isNullOrEmpty(orderTask.getKeywordContent())) { builder.key(orderTask.getKeywordContent()); } - - // 澶勭悊鏃堕棿瀛楁 - if (orderTaskExecutionDetail.getCreateTime() != null) { - builder.createTime(TimeUtil.getGernalTime(orderTaskExecutionDetail.getCreateTime().getTime(), "yyyy-MM-dd HH:mm:ss")); - } - - return builder.build(); } } \ No newline at end of file diff --git a/src/main/java/com/taoke/autopay/factory/js2/OrderTaskFactory.java b/src/main/java/com/taoke/autopay/factory/js2/OrderTaskFactory.java index 7a4f3cc..05700b9 100644 --- a/src/main/java/com/taoke/autopay/factory/js2/OrderTaskFactory.java +++ b/src/main/java/com/taoke/autopay/factory/js2/OrderTaskFactory.java @@ -39,7 +39,7 @@ .completedOrderCount(orderTask.getCompletedOrderCount()) .receivedOrderCount(orderTask.getReceivedOrderCount()) .reviewedOrderCount(orderTask.getReviewedOrderCount()) - .receiveCycleHours(orderTask.getReceiveCycleHours()) + .receiveCycleMinutes(orderTask.getReceiveCycleMinutes()) .status(orderTask.getStatus()) .statusDescription(orderTask.getStatusDescription()); @@ -89,7 +89,7 @@ .completedOrderCount(orderTaskVO.getCompletedOrderCount()) .receivedOrderCount(orderTaskVO.getReceivedOrderCount()) .reviewedOrderCount(orderTaskVO.getReviewedOrderCount()) - .receiveCycleHours(orderTaskVO.getReceiveCycleHours()) + .receiveCycleMinutes(orderTaskVO.getReceiveCycleMinutes()) .status(orderTaskVO.getStatus()) .statusDescription(orderTaskVO.getStatusDescription()); diff --git a/src/main/java/com/taoke/autopay/service/impl/ClientInfoServiceImpl.java b/src/main/java/com/taoke/autopay/service/impl/ClientInfoServiceImpl.java index 3c841fc..a6511d9 100644 --- a/src/main/java/com/taoke/autopay/service/impl/ClientInfoServiceImpl.java +++ b/src/main/java/com/taoke/autopay/service/impl/ClientInfoServiceImpl.java @@ -165,7 +165,7 @@ i--; continue; } - if(StringUtil.isNullOrEmpty(info.getMobile())||StringUtil.isNullOrEmpty(info.getAlipayAccount())||StringUtil.isNullOrEmpty(info.getAlipayPassword())){ + if(StringUtil.isNullOrEmpty(info.getMobile())){ clientInfoList.remove(i); i--; continue; diff --git a/src/main/java/com/taoke/autopay/service/impl/js2/OrderTaskExecutionDetailServiceImpl.java b/src/main/java/com/taoke/autopay/service/impl/js2/OrderTaskExecutionDetailServiceImpl.java index 9f619b2..f243f93 100644 --- a/src/main/java/com/taoke/autopay/service/impl/js2/OrderTaskExecutionDetailServiceImpl.java +++ b/src/main/java/com/taoke/autopay/service/impl/js2/OrderTaskExecutionDetailServiceImpl.java @@ -352,7 +352,7 @@ @Override public List<OrderTaskExecutionDetail> listCanExcuteTaskDetail(Long clientId, int page, int pageSize) { // 鑾峰彇30鍒嗛挓浠ュ唴鐨勮鍗曚换鍔℃墽琛岃鎯� - return orderTaskExecutionDetailMapper.listCanExcuteTaskDetail(clientId, new Date(System.currentTimeMillis() - 1000*60*30L)); + return orderTaskExecutionDetailMapper.listCanExcuteTaskDetail(clientId, new Date(System.currentTimeMillis() - 1000*60*30L), (long) (page) *pageSize, pageSize); } @Override diff --git a/src/main/java/com/taoke/autopay/service/impl/js2/OrderTaskServiceImpl.java b/src/main/java/com/taoke/autopay/service/impl/js2/OrderTaskServiceImpl.java index 05f0d41..05f057e 100644 --- a/src/main/java/com/taoke/autopay/service/impl/js2/OrderTaskServiceImpl.java +++ b/src/main/java/com/taoke/autopay/service/impl/js2/OrderTaskServiceImpl.java @@ -58,7 +58,7 @@ throw new OrderTaskException(OrderTaskException.CODE_COMMON, "涓嬪崟浠诲姟闇�姹備笅鍗曟暟閲忎笉鑳戒负绌�"); } - if(orderTask.getReceiveCycleHours()==null){ + if(orderTask.getReceiveCycleMinutes()==null){ throw new OrderTaskException(OrderTaskException.CODE_COMMON, "涓嬪崟浠诲姟鏀惰揣鍛ㄦ湡涓嶈兘涓虹┖"); } diff --git a/src/main/java/com/taoke/autopay/vo/OrderTaskExecutionDetailVO.java b/src/main/java/com/taoke/autopay/vo/OrderTaskExecutionDetailVO.java index 70dc41d..1bbe1c7 100644 --- a/src/main/java/com/taoke/autopay/vo/OrderTaskExecutionDetailVO.java +++ b/src/main/java/com/taoke/autopay/vo/OrderTaskExecutionDetailVO.java @@ -4,6 +4,8 @@ import lombok.Data; import lombok.experimental.Tolerate; +import java.util.Date; + @Data @Builder public class OrderTaskExecutionDetailVO { @@ -32,5 +34,6 @@ private String mobile; private String alipayAccount; private String alipayPassword; - private String createTime; + private Date createTime; + private String expectedReviewTime; } diff --git a/src/main/java/com/taoke/autopay/vo/admin/js2/OrderTaskVO.java b/src/main/java/com/taoke/autopay/vo/admin/js2/OrderTaskVO.java index 5fd1f4e..2428f66 100644 --- a/src/main/java/com/taoke/autopay/vo/admin/js2/OrderTaskVO.java +++ b/src/main/java/com/taoke/autopay/vo/admin/js2/OrderTaskVO.java @@ -68,9 +68,9 @@ private Integer reviewedOrderCount; /** - * 纭鏀惰揣鍛ㄦ湡锛堝皬鏃讹級 + * 纭鏀惰揣鍛ㄦ湡锛堝垎閽燂級 */ - private Integer receiveCycleHours; + private Integer receiveCycleMinutes; /** * 涓嬪崟寮�濮嬫椂闂� diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index 1bc605e..32dcfd1 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -151,6 +151,21 @@ </appender> + <appender name="doOrderAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.filePath}/do_order.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${log.filePath}/do_order/do_order.log.gz.%d{yyyy-MM-dd}</fileNamePattern> + <maxHistory>${log.maxHistory}</maxHistory> + </rollingPolicy> + <encoder> + <pattern>${log.pattern}</pattern> + </encoder> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + </filter> + </appender> + + <logger name="dyorderApiLogger" level="INFO" additivity="false"> <appender-ref ref="dyApiAppender"></appender-ref> </logger> @@ -176,6 +191,10 @@ <appender-ref ref="alipayAppender"></appender-ref> </logger> + <logger name="doOrderLogger" level="INFO" additivity="false"> + <appender-ref ref="doOrderAppender"></appender-ref> + </logger> + diff --git a/src/main/resources/mapper/KeyOrderMapper.xml b/src/main/resources/mapper/KeyOrderMapper.xml index f2d3231..984da59 100644 --- a/src/main/resources/mapper/KeyOrderMapper.xml +++ b/src/main/resources/mapper/KeyOrderMapper.xml @@ -198,7 +198,7 @@ <if test="subState !=null">sub_state =#{subState,jdbcType=INTEGER},</if> </set> where id = #{id,jdbcType=VARCHAR} </update> - <select id="listDistributeUids" resultMap="DistributeResultMap">SELECT u.`id` as uid, IF( a.count IS NULL,0,a.count) AS `count` FROM `table_user` u LEFT JOIN (SELECT o.`distribute_client_uid` AS uid,COUNT(*) AS `count` FROM `table_order` o WHERE o.`state` = 0 and create_time > #{minKeyOrderCreateTime} GROUP BY o.`distribute_client_uid`) a ON a.uid = u.`id` WHERE rule=0 + <select id="listDistributeUids" resultMap="DistributeResultMap">SELECT u.`id` as uid, IF( a.count IS NULL,0,a.count) AS `count` FROM `table_user` u LEFT JOIN (SELECT o.`distribute_client_uid` AS uid,COUNT(*) AS `count` FROM `table_order` o WHERE o.`state` = 0 and create_time > #{minKeyOrderCreateTime} GROUP BY o.`distribute_client_uid`) a ON a.uid = u.`id` WHERE rule=0 and client_type=0 <if test="minActiveTime!=null">and active_time >=#{minActiveTime}</if> </select> <select id="listNotDistributed" resultMap="BaseResultMap">select diff --git a/src/main/resources/mapper/OrderTaskExecutionDetailMapper.xml b/src/main/resources/mapper/OrderTaskExecutionDetailMapper.xml index 0e92c48..0a28c28 100644 --- a/src/main/resources/mapper/OrderTaskExecutionDetailMapper.xml +++ b/src/main/resources/mapper/OrderTaskExecutionDetailMapper.xml @@ -15,6 +15,7 @@ <result column="order_time" property="orderTime" jdbcType="TIMESTAMP"/> <result column="receive_time" property="receiveTime" jdbcType="TIMESTAMP"/> <result column="review_time" property="reviewTime" jdbcType="TIMESTAMP"/> + <result column="expected_review_time" property="expectedReviewTime" jdbcType="TIMESTAMP"/> <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/> <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/> </resultMap> @@ -26,7 +27,7 @@ </resultMap> - <sql id="Base_Column_List">id,task_id,client_id,execution_status,status_description,order_no,product_name,shop_name,coupon_code,order_time,receive_time,review_time,create_time,update_time</sql> + <sql id="Base_Column_List">id,task_id,client_id,execution_status,status_description,order_no,product_name,shop_name,coupon_code,order_time,receive_time,review_time,expected_review_time,create_time,update_time</sql> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">select <include refid="Base_Column_List"/> from table_order_task_execution_detail where id = #{id,jdbcType=VARCHAR} @@ -48,6 +49,7 @@ <if test="query.orderTime!=null">AND order_time = #{query.orderTime}</if> <if test="query.receiveTime!=null">AND receive_time = #{query.receiveTime}</if> <if test="query.reviewTime!=null">AND review_time = #{query.reviewTime}</if> + <if test="query.expectedReviewTime!=null">AND expected_review_time = #{query.expectedReviewTime}</if> <if test="query.minCreateTime!=null">AND create_time >= #{query.minCreateTime}</if> <if test="query.maxCreateTime!=null">AND #{query.maxCreateTime} > create_time</if> <if test="query.minUpdateTime!=null">AND update_time >= #{query.minUpdateTime}</if> @@ -81,15 +83,15 @@ <select id="listCanExcuteTaskDetail" resultMap="BaseResultMap" > select - <include refid="Base_Column_List"/> + d.* from `table_order_task_execution_detail` d LEFT JOIN `table_order_task` t ON t.`id`=d.`task_id` WHERE client_id = #{clientId} AND ( (d.`execution_status`=0 AND d.`create_time` > #{minCreateTime}) - OR (d.`execution_status`=1 AND UNIX_TIMESTAMP(d.`order_time`) + t.receive_cycle_hours*60*60 < UNIX_TIMESTAMP(NOW())) - OR (d.`execution_status`=2) + OR (d.`execution_status`=1 AND UNIX_TIMESTAMP(NOW()) > UNIX_TIMESTAMP(d.`order_time`) + t.receive_cycle_minutes*60) + OR (d.`execution_status`=2 AND d.expected_review_time is not null) ) order by d.create_time limit #{start},#{count} </select> @@ -100,8 +102,8 @@ AND ( (d.`execution_status`=0 AND d.`create_time` > #{minCreateTime}) - OR (d.`execution_status`=1 AND UNIX_TIMESTAMP(d.`order_time`) + t.receive_cycle_hours*60*60 < UNIX_TIMESTAMP(NOW())) - OR (d.`execution_status`=2) + OR (d.`execution_status`=1 AND UNIX_TIMESTAMP(NOW()) > UNIX_TIMESTAMP(d.`order_time`) + t.receive_cycle_minutes*60) + OR (d.`execution_status`=2 AND d.expected_review_time is not null) ) </select> @@ -110,17 +112,16 @@ <select id="statisticClientIdsCountByStatus" resultMap="ClientCountResultMap"> SELECT client_id as clientId,count(*) as count FROM table_order_task_execution_detail where - <foreach collection="statusList" open="" separator=" or " item="status" > - execution_status=#{status} - </foreach> - + <foreach collection="statusList" open="" separator=" or " item="status" > + execution_status=#{status} + </foreach> GROUP BY client_id </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">delete from table_order_task_execution_detail where id = #{id,jdbcType=VARCHAR}</delete> <insert id="insert" parameterType="com.taoke.autopay.entity.js2.OrderTaskExecutionDetail" useGeneratedKeys="true" - keyProperty="id">insert into table_order_task_execution_detail (id,task_id,client_id,execution_status,status_description,order_no,product_name,shop_name,coupon_code,order_time,receive_time,review_time,create_time,update_time) values (#{id,jdbcType=VARCHAR},#{taskId,jdbcType=BIGINT},#{clientId,jdbcType=BIGINT},#{executionStatus,jdbcType=INTEGER},#{statusDescription,jdbcType=VARCHAR},#{orderNo,jdbcType=VARCHAR},#{productName,jdbcType=VARCHAR},#{shopName,jdbcType=VARCHAR},#{couponCode,jdbcType=VARCHAR},#{orderTime,jdbcType=TIMESTAMP},#{receiveTime,jdbcType=TIMESTAMP},#{reviewTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> + keyProperty="id">insert into table_order_task_execution_detail (id,task_id,client_id,execution_status,status_description,order_no,product_name,shop_name,coupon_code,order_time,receive_time,review_time,expected_review_time,create_time,update_time) values (#{id,jdbcType=VARCHAR},#{taskId,jdbcType=BIGINT},#{clientId,jdbcType=BIGINT},#{executionStatus,jdbcType=INTEGER},#{statusDescription,jdbcType=VARCHAR},#{orderNo,jdbcType=VARCHAR},#{productName,jdbcType=VARCHAR},#{shopName,jdbcType=VARCHAR},#{couponCode,jdbcType=VARCHAR},#{orderTime,jdbcType=TIMESTAMP},#{receiveTime,jdbcType=TIMESTAMP},#{reviewTime,jdbcType=TIMESTAMP},#{expectedReviewTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> <insert id="insertSelective" parameterType="com.taoke.autopay.entity.js2.OrderTaskExecutionDetail" useGeneratedKeys="true" keyProperty="id">insert into table_order_task_execution_detail <trim prefix="(" suffix=")" suffixOverrides=","> @@ -129,13 +130,14 @@ <if test="clientId != null">client_id,</if> <if test="executionStatus != null">execution_status,</if> <if test="statusDescription != null">status_description,</if> - <if test="orderNo != null">order_no,</if> + <if test="orderNo != null">order_no,</if> <if test="productName != null">product_name,</if> <if test="shopName != null">shop_name,</if> <if test="couponCode != null">coupon_code,</if> <if test="orderTime != null">order_time,</if> <if test="receiveTime != null">receive_time,</if> <if test="reviewTime != null">review_time,</if> + <if test="expectedReviewTime != null">expected_review_time,</if> <if test="createTime != null">create_time,</if> <if test="updateTime != null">update_time,</if> </trim> @@ -153,12 +155,13 @@ <if test="orderTime != null">#{orderTime,jdbcType=TIMESTAMP},</if> <if test="receiveTime != null">#{receiveTime,jdbcType=TIMESTAMP},</if> <if test="reviewTime != null">#{reviewTime,jdbcType=TIMESTAMP},</if> + <if test="expectedReviewTime != null">#{expectedReviewTime,jdbcType=TIMESTAMP},</if> <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> </trim> </insert> <update id="updateByPrimaryKey" - parameterType="com.taoke.autopay.entity.js2.OrderTaskExecutionDetail">update table_order_task_execution_detail set task_id = #{taskId,jdbcType=BIGINT},client_id = #{clientId,jdbcType=BIGINT},execution_status = #{executionStatus,jdbcType=INTEGER},status_description = #{statusDescription,jdbcType=VARCHAR},order_no = #{orderNo,jdbcType=VARCHAR},product_name = #{productName,jdbcType=VARCHAR},shop_name = #{shopName,jdbcType=VARCHAR},coupon_code = #{couponCode,jdbcType=VARCHAR},order_time = #{orderTime,jdbcType=TIMESTAMP},receive_time = #{receiveTime,jdbcType=TIMESTAMP},review_time = #{reviewTime,jdbcType=TIMESTAMP},create_time = #{createTime,jdbcType=TIMESTAMP},update_time = #{updateTime,jdbcType=TIMESTAMP} where id = #{id,jdbcType=VARCHAR}</update> + parameterType="com.taoke.autopay.entity.js2.OrderTaskExecutionDetail">update table_order_task_execution_detail set task_id = #{taskId,jdbcType=BIGINT},client_id = #{clientId,jdbcType=BIGINT},execution_status = #{executionStatus,jdbcType=INTEGER},status_description = #{statusDescription,jdbcType=VARCHAR},order_no = #{orderNo,jdbcType=VARCHAR},product_name = #{productName,jdbcType=VARCHAR},shop_name = #{shopName,jdbcType=VARCHAR},coupon_code = #{couponCode,jdbcType=VARCHAR},order_time = #{orderTime,jdbcType=TIMESTAMP},receive_time = #{receiveTime,jdbcType=TIMESTAMP},review_time = #{reviewTime,jdbcType=TIMESTAMP},expected_review_time = #{expectedReviewTime,jdbcType=TIMESTAMP},create_time = #{createTime,jdbcType=TIMESTAMP},update_time = #{updateTime,jdbcType=TIMESTAMP} where id = #{id,jdbcType=VARCHAR}</update> <update id="updateByPrimaryKeySelective" parameterType="com.taoke.autopay.entity.js2.OrderTaskExecutionDetail">update table_order_task_execution_detail <set> <if test="taskId != null">task_id=#{taskId,jdbcType=BIGINT},</if> @@ -172,6 +175,7 @@ <if test="orderTime != null">order_time=#{orderTime,jdbcType=TIMESTAMP},</if> <if test="receiveTime != null">receive_time=#{receiveTime,jdbcType=TIMESTAMP},</if> <if test="reviewTime != null">review_time=#{reviewTime,jdbcType=TIMESTAMP},</if> + <if test="expectedReviewTime != null">expected_review_time=#{expectedReviewTime,jdbcType=TIMESTAMP},</if> <if test="createTime != null">create_time=#{createTime,jdbcType=TIMESTAMP},</if> <if test="updateTime != null">update_time=#{updateTime,jdbcType=TIMESTAMP},</if> </set> diff --git a/src/main/resources/mapper/OrderTaskMapper.xml b/src/main/resources/mapper/OrderTaskMapper.xml index 35f7051..3aae6f4 100644 --- a/src/main/resources/mapper/OrderTaskMapper.xml +++ b/src/main/resources/mapper/OrderTaskMapper.xml @@ -14,6 +14,7 @@ <result column="received_order_count" property="receivedOrderCount" jdbcType="INTEGER"/> <result column="reviewed_order_count" property="reviewedOrderCount" jdbcType="INTEGER"/> <result column="receive_cycle_hours" property="receiveCycleHours" jdbcType="INTEGER"/> + <result column="receive_cycle_minutes" property="receiveCycleMinutes" jdbcType="INTEGER"/> <result column="order_start_time" property="orderStartTime" jdbcType="TIMESTAMP"/> <result column="order_end_time" property="orderEndTime" jdbcType="TIMESTAMP"/> <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/> @@ -22,7 +23,7 @@ <result column="status" property="status" jdbcType="INTEGER"/> <result column="status_description" property="statusDescription" jdbcType="VARCHAR"/> </resultMap> - <sql id="Base_Column_List">id,keyword_content,keyword_md5,product_source,product_name,shop_name,required_order_count,completed_order_count,received_order_count,reviewed_order_count,receive_cycle_hours,order_start_time,order_end_time,create_time,update_time,estimated_receive_time,status,status_description</sql> + <sql id="Base_Column_List">id,keyword_content,keyword_md5,product_source,product_name,shop_name,required_order_count,completed_order_count,received_order_count,reviewed_order_count,receive_cycle_hours,receive_cycle_minutes,order_start_time,order_end_time,create_time,update_time,estimated_receive_time,status,status_description</sql> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select <include refid="Base_Column_List"/> from table_order_task where id = #{id,jdbcType=BIGINT} @@ -43,6 +44,7 @@ <if test="query.receivedOrderCount!=null">AND received_order_count = #{query.receivedOrderCount}</if> <if test="query.reviewedOrderCount!=null">AND reviewed_order_count = #{query.reviewedOrderCount}</if> <if test="query.receiveCycleHours!=null">AND receive_cycle_hours = #{query.receiveCycleHours}</if> + <if test="query.receiveCycleMinutes!=null">AND receive_cycle_minutes = #{query.receiveCycleMinutes}</if> <if test="query.orderStartTime!=null">AND order_start_time = #{query.orderStartTime}</if> <if test="query.orderEndTime!=null">AND order_end_time = #{query.orderEndTime}</if> <if test="query.minCreateTime!=null">AND create_time >= #{query.minCreateTime}</if> @@ -80,7 +82,7 @@ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from table_order_task where id = #{id,jdbcType=BIGINT}</delete> <insert id="insert" parameterType="com.taoke.autopay.entity.js2.OrderTask" useGeneratedKeys="true" - keyProperty="id">insert into table_order_task (id,keyword_content,keyword_md5,product_source,product_name,shop_name,required_order_count,completed_order_count,received_order_count,reviewed_order_count,receive_cycle_hours,order_start_time,order_end_time,create_time,update_time,estimated_receive_time,status,status_description) values (#{id,jdbcType=BIGINT},#{keywordContent,jdbcType=VARCHAR},#{keywordMd5,jdbcType=VARCHAR},#{productSource,jdbcType=INTEGER},#{productName,jdbcType=VARCHAR},#{shopName,jdbcType=VARCHAR},#{requiredOrderCount,jdbcType=INTEGER},#{completedOrderCount,jdbcType=INTEGER},#{receivedOrderCount,jdbcType=INTEGER},#{reviewedOrderCount,jdbcType=INTEGER},#{receiveCycleHours,jdbcType=INTEGER},#{orderStartTime,jdbcType=TIMESTAMP},#{orderEndTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{estimatedReceiveTime,jdbcType=TIMESTAMP},#{status,jdbcType=INTEGER},#{statusDescription,jdbcType=VARCHAR})</insert> + keyProperty="id">insert into table_order_task (id,keyword_content,keyword_md5,product_source,product_name,shop_name,required_order_count,completed_order_count,received_order_count,reviewed_order_count,receive_cycle_hours,receive_cycle_minutes,order_start_time,order_end_time,create_time,update_time,estimated_receive_time,status,status_description) values (#{id,jdbcType=BIGINT},#{keywordContent,jdbcType=VARCHAR},#{keywordMd5,jdbcType=VARCHAR},#{productSource,jdbcType=INTEGER},#{productName,jdbcType=VARCHAR},#{shopName,jdbcType=VARCHAR},#{requiredOrderCount,jdbcType=INTEGER},#{completedOrderCount,jdbcType=INTEGER},#{receivedOrderCount,jdbcType=INTEGER},#{reviewedOrderCount,jdbcType=INTEGER},#{receiveCycleHours,jdbcType=INTEGER},#{receiveCycleMinutes,jdbcType=INTEGER},#{orderStartTime,jdbcType=TIMESTAMP},#{orderEndTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{estimatedReceiveTime,jdbcType=TIMESTAMP},#{status,jdbcType=INTEGER},#{statusDescription,jdbcType=VARCHAR})</insert> <insert id="insertSelective" parameterType="com.taoke.autopay.entity.js2.OrderTask" useGeneratedKeys="true" keyProperty="id">insert into table_order_task <trim prefix="(" suffix=")" suffixOverrides=","> @@ -95,6 +97,7 @@ <if test="receivedOrderCount != null">received_order_count,</if> <if test="reviewedOrderCount != null">reviewed_order_count,</if> <if test="receiveCycleHours != null">receive_cycle_hours,</if> + <if test="receiveCycleMinutes != null">receive_cycle_minutes,</if> <if test="orderStartTime != null">order_start_time,</if> <if test="orderEndTime != null">order_end_time,</if> <if test="createTime != null">create_time,</if> @@ -116,6 +119,7 @@ <if test="receivedOrderCount != null">#{receivedOrderCount,jdbcType=INTEGER},</if> <if test="reviewedOrderCount != null">#{reviewedOrderCount,jdbcType=INTEGER},</if> <if test="receiveCycleHours != null">#{receiveCycleHours,jdbcType=INTEGER},</if> + <if test="receiveCycleMinutes != null">#{receiveCycleMinutes,jdbcType=INTEGER},</if> <if test="orderStartTime != null">#{orderStartTime,jdbcType=TIMESTAMP},</if> <if test="orderEndTime != null">#{orderEndTime,jdbcType=TIMESTAMP},</if> <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> @@ -126,7 +130,7 @@ </trim> </insert> <update id="updateByPrimaryKey" - parameterType="com.taoke.autopay.entity.js2.OrderTask">update table_order_task set keyword_content = #{keywordContent,jdbcType=VARCHAR},keyword_md5 = #{keywordMd5,jdbcType=VARCHAR},product_source = #{productSource,jdbcType=INTEGER},product_name = #{productName,jdbcType=VARCHAR},shop_name = #{shopName,jdbcType=VARCHAR},required_order_count = #{requiredOrderCount,jdbcType=INTEGER},completed_order_count = #{completedOrderCount,jdbcType=INTEGER},received_order_count = #{receivedOrderCount,jdbcType=INTEGER},reviewed_order_count = #{reviewedOrderCount,jdbcType=INTEGER},receive_cycle_hours = #{receiveCycleHours,jdbcType=INTEGER},order_start_time = #{orderStartTime,jdbcType=TIMESTAMP},order_end_time = #{orderEndTime,jdbcType=TIMESTAMP},create_time = #{createTime,jdbcType=TIMESTAMP},update_time = #{updateTime,jdbcType=TIMESTAMP},estimated_receive_time = #{estimatedReceiveTime,jdbcType=TIMESTAMP},status = #{status,jdbcType=INTEGER},status_description = #{statusDescription,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT}</update> + parameterType="com.taoke.autopay.entity.js2.OrderTask">update table_order_task set keyword_content = #{keywordContent,jdbcType=VARCHAR},keyword_md5 = #{keywordMd5,jdbcType=VARCHAR},product_source = #{productSource,jdbcType=INTEGER},product_name = #{productName,jdbcType=VARCHAR},shop_name = #{shopName,jdbcType=VARCHAR},required_order_count = #{requiredOrderCount,jdbcType=INTEGER},completed_order_count = #{completedOrderCount,jdbcType=INTEGER},received_order_count = #{receivedOrderCount,jdbcType=INTEGER},reviewed_order_count = #{reviewedOrderCount,jdbcType=INTEGER},receive_cycle_hours = #{receiveCycleHours,jdbcType=INTEGER},receive_cycle_minutes = #{receiveCycleMinutes,jdbcType=INTEGER},order_start_time = #{orderStartTime,jdbcType=TIMESTAMP},order_end_time = #{orderEndTime,jdbcType=TIMESTAMP},create_time = #{createTime,jdbcType=TIMESTAMP},update_time = #{updateTime,jdbcType=TIMESTAMP},estimated_receive_time = #{estimatedReceiveTime,jdbcType=TIMESTAMP},status = #{status,jdbcType=INTEGER},status_description = #{statusDescription,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT}</update> <update id="updateByPrimaryKeySelective" parameterType="com.taoke.autopay.entity.js2.OrderTask">update table_order_task <set> <if test="keywordContent != null">keyword_content=#{keywordContent,jdbcType=VARCHAR},</if> @@ -139,6 +143,7 @@ <if test="receivedOrderCount != null">received_order_count=#{receivedOrderCount,jdbcType=INTEGER},</if> <if test="reviewedOrderCount != null">reviewed_order_count=#{reviewedOrderCount,jdbcType=INTEGER},</if> <if test="receiveCycleHours != null">receive_cycle_hours=#{receiveCycleHours,jdbcType=INTEGER},</if> + <if test="receiveCycleMinutes != null">receive_cycle_minutes=#{receiveCycleMinutes,jdbcType=INTEGER},</if> <if test="orderStartTime != null">order_start_time=#{orderStartTime,jdbcType=TIMESTAMP},</if> <if test="orderEndTime != null">order_end_time=#{orderEndTime,jdbcType=TIMESTAMP},</if> <if test="createTime != null">create_time=#{createTime,jdbcType=TIMESTAMP},</if> diff --git a/src/main/resources/static/admin/order-client-list.html b/src/main/resources/static/admin/order-client-list.html index 3ebf2be..7c8f9fa 100644 --- a/src/main/resources/static/admin/order-client-list.html +++ b/src/main/resources/static/admin/order-client-list.html @@ -231,11 +231,6 @@ width: 120 }, { - field: 'additionalInfo.alipayAccount', - title: '鏀粯瀹濊处鍙�', - width: 180 - }, - { field: 'client.createTime', title: '鍒涘缓鏃堕棿', width: 180 diff --git a/src/main/resources/static/admin/order-client-update.html b/src/main/resources/static/admin/order-client-update.html index 966b13c..fa54703 100644 --- a/src/main/resources/static/admin/order-client-update.html +++ b/src/main/resources/static/admin/order-client-update.html @@ -62,20 +62,6 @@ </div> </div> - <div class="layui-form-item"> - <label class="layui-form-label">鏀粯瀹濊处鍙凤細</label> - <div class="layui-input-inline"> - <input type="text" name="alipayAccount" required lay-verify="required" placeholder="鏀粯瀹濊处鍙�" autocomplete="off" class="layui-input"> - </div> - </div> - - <div class="layui-form-item"> - <label class="layui-form-label">鏀粯瀹濆瘑鐮侊細</label> - <div class="layui-input-inline"> - <input type="password" name="alipayPassword" required lay-verify="" placeholder="鏃犳洿鏀规棤闇�濉啓" autocomplete="off" class="layui-input"> - </div> - </div> - <div class="layui-input-block"> <button class="layui-btn layui-btn-normal" lay-submit lay-filter="sure" id="sure">纭畾</button> </div> diff --git a/src/main/resources/static/admin/order-task-assigned-clients.html b/src/main/resources/static/admin/order-task-assigned-clients.html index 05a157f..a6d3c49 100644 --- a/src/main/resources/static/admin/order-task-assigned-clients.html +++ b/src/main/resources/static/admin/order-task-assigned-clients.html @@ -33,12 +33,32 @@ </div> </div> +<!-- 淇敼棰勮璇勪环鏃堕棿寮圭獥 --> +<div id="updateExpectedReviewTime" style="display: none; padding: 20px;"> + <form class="layui-form" action=""> + <input type="hidden" name="id" id="detailId"> + <div class="layui-form-item"> + <label class="layui-form-label">棰勮璇勪环鏃堕棿</label> + <div class="layui-input-block"> + <input type="text" name="expectedReviewTime" id="expectedReviewTime" placeholder="璇烽�夋嫨棰勮璇勪环鏃堕棿" autocomplete="off" class="layui-input"> + </div> + </div> + <div class="layui-form-item"> + <div class="layui-input-block"> + <button class="layui-btn" lay-submit lay-filter="updateExpectedReviewTime">纭畾</button> + <button type="reset" class="layui-btn layui-btn-primary">閲嶇疆</button> + </div> + </div> + </form> +</div> + <script src="/admin/layui/layui.js" type="text/javascript" charset="utf-8"></script> <script src="/admin/js/jquery.min.js" type="text/javascript" charset="utf-8"></script> <script> - layui.use(['table', 'layer'], function () { + layui.use(['table', 'layer', 'laydate'], function () { var table = layui.table; var layer = layui.layer; + var laydate = layui.laydate; var urlParams = new URLSearchParams(window.location.search); var taskId = urlParams.get('taskId'); @@ -81,11 +101,62 @@ {field: 'statusDescription', title: '鐘舵�佽鏄�', width: 150}, {field: 'orderTime', title: '涓嬪崟鏃堕棿', width: 160}, {field: 'receiveTime', title: '鏀惰揣鏃堕棿', width: 160}, + {field: 'expectedReviewTime', title: '棰勪及璇勪环鏃堕棿', width: 160}, {field: 'reviewTime', title: '璇勪环鏃堕棿', width: 160}, + {field: 'createTime', title: '鍒涘缓鏃堕棿', width: 160}, - {field: 'updateTime', title: '鏇存柊鏃堕棿', width: 160} + {field: 'updateTime', title: '鏇存柊鏃堕棿', width: 160}, + { + title: '鎿嶄綔', width: 120, align: 'center', fixed: "right", templet: function (d) { + return "<a href='javascript:void(0)' class='layui-table-link' onclick=\"updateExpectedReviewTime('" + d.id + "')\">璁剧疆棰勪及鏃堕棿</a>"; + } + }, ]] }); + + // 淇敼棰勮璇勪环鏃堕棿 + window.updateExpectedReviewTime = function(id, expectedReviewTime) { + // 璁剧疆琛ㄥ崟鍊� + $("#detailId").val(id); + $("#expectedReviewTime").val(expectedReviewTime); + + // 寮瑰嚭淇敼绐楀彛 + layer.open({ + type: 1, + title: "淇敼棰勮璇勪环鏃堕棿", + content: $("#updateExpectedReviewTime"), + area: ['500px', '300px'], + end: function() { + $("#updateExpectedReviewTime").css("display", "none"); + } + }); + + // 鍒濆鍖栨棩鏈熸帶浠� + laydate.render({ + elem: '#expectedReviewTime', + type: 'datetime', + theme: '#448aff', + value: expectedReviewTime + }); + }; + + // 鐩戝惉琛ㄥ崟鎻愪氦 + layui.form.on('submit(updateExpectedReviewTime)', function(data) { + $.post("/admin/api/ordertask/js2/updateExpectedReviewTime", data.field, function(response) { + if (response.code == 0) { + layer.msg("淇敼鎴愬姛"); + layer.closeAll('page'); + // 閲嶆柊鍔犺浇琛ㄦ牸 + tableIns.reload(); + } else { + layer.msg(response.msg); + } + }, 'json').fail(function(jqXHR, textStatus, errorThrown) { + layer.msg("缃戠粶璇锋眰澶辫触"); + }); + + return false; + }); }); </script> </body> diff --git a/src/main/resources/static/admin/order-task-list.html b/src/main/resources/static/admin/order-task-list.html index 47ebcc6..b1c19f1 100644 --- a/src/main/resources/static/admin/order-task-list.html +++ b/src/main/resources/static/admin/order-task-list.html @@ -104,10 +104,10 @@ </div> </div> <div class="layui-form-item"> - <label class="layui-form-label">鏀惰揣鍛ㄦ湡(灏忔椂)</label> + <label class="layui-form-label">鏀惰揣鍛ㄦ湡(鍒嗛挓)</label> <div class="layui-input-block"> - <input type="number" name="receiveCycleHours" required lay-verify="required|number" min="1" - placeholder="璇疯緭鍏ユ敹璐у懆鏈�(灏忔椂)" autocomplete="off" class="layui-input"> + <input type="number" name="receiveCycleMinutes" required lay-verify="required|number" min="1" + placeholder="璇疯緭鍏ユ敹璐у懆鏈�(鍒嗛挓)" autocomplete="off" class="layui-input"> </div> </div> <div class="layui-form-item"> @@ -356,7 +356,7 @@ {field: 'completedOrderCount', title: '宸蹭笅鍗曟暟', width: 90}, {field: 'receivedOrderCount', title: '宸叉敹璐ф暟', width: 90}, {field: 'reviewedOrderCount', title: '宸茶瘎浠锋暟', width: 90}, - {field: 'receiveCycleHours', title: '鏀惰揣鍛ㄦ湡(灏忔椂)', width: 120}, + {field: 'receiveCycleMinutes', title: '鏀惰揣鍛ㄦ湡(鍒嗛挓)', width: 120}, {field: 'orderStartTime', title: '涓嬪崟寮�濮嬫椂闂�', width: 160}, {field: 'orderEndTime', title: '涓嬪崟缁撴潫鏃堕棿', width: 160}, {field: 'createTime', title: '鍒涘缓鏃堕棿', width: 160}, @@ -377,10 +377,12 @@ let html = '<div>'; html += '<a href="javascript:void(0)" onclick="updateTask(' + d.id + ')" class="layui-table-link">淇敼</a> '; html += '<a href="javascript:void(0)" onclick="deleteTask(' + d.id + ')" class="layui-table-link">鍒犻櫎</a> '; - if (d.status == 0) { - html += '<a href="javascript:void(0)" onclick="assignTask(' + d.id + ')" class="layui-table-link">鍒嗛厤</a>'; - }else{ - html += '<a href="javascript:void(0)" onclick="viewAssignedClients(' + d.id + ')" class="layui-table-link">宸插垎閰嶈澶�</a>'; + + html += '<a href="javascript:void(0)" onclick="assignTask(' + d.id + ')" class="layui-table-link">鍒嗛厤</a> '; + + if (d.status != 0) + { + html += '<a href="javascript:void(0)" onclick="viewAssignedClients(' + d.id + ')" class="layui-table-link">宸插垎閰嶈澶�</a> '; } html += '</div>'; return html; diff --git a/src/main/resources/static/admin/order-task-update.html b/src/main/resources/static/admin/order-task-update.html index 5cb700a..87afd6f 100644 --- a/src/main/resources/static/admin/order-task-update.html +++ b/src/main/resources/static/admin/order-task-update.html @@ -74,10 +74,10 @@ </div> <div class="layui-form-item"> - <label class="layui-form-label">鏀惰揣鍛ㄦ湡(灏忔椂)锛�</label> + <label class="layui-form-label">鏀惰揣鍛ㄦ湡(鍒嗛挓)锛�</label> <div class="layui-input-block"> - <input type="number" name="receiveCycleHours" required lay-verify="required|number" min="1" - placeholder="鏀惰揣鍛ㄦ湡(灏忔椂)" autocomplete="off" class="layui-input"> + <input type="number" name="receiveCycleMinutes" required lay-verify="required|number" min="1" + placeholder="鏀惰揣鍛ㄦ湡(鍒嗛挓)" autocomplete="off" class="layui-input"> </div> </div> -- Gitblit v1.8.0