admin
10 天以前 f318c9c7c127b00f353bf45f273096d1dc4b424f
功能完善
22个文件已修改
350 ■■■■ 已修改文件
src/main/java/com/taoke/autopay/controller/admin/js2/AdminOrderTaskController.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/taoke/autopay/controller/client/js2/OrderTaskController.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/taoke/autopay/dao/OrderTaskExecutionDetailMapper.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/taoke/autopay/dao/OrderTaskMapper.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/taoke/autopay/entity/js2/OrderTask.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/taoke/autopay/entity/js2/OrderTaskExecutionDetail.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/taoke/autopay/factory/js2/OrderTaskExecutionDetailFactory.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/taoke/autopay/factory/js2/OrderTaskFactory.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/taoke/autopay/service/impl/ClientInfoServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/taoke/autopay/service/impl/js2/OrderTaskExecutionDetailServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/taoke/autopay/service/impl/js2/OrderTaskServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/taoke/autopay/vo/OrderTaskExecutionDetailVO.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/taoke/autopay/vo/admin/js2/OrderTaskVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/logback.xml 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/KeyOrderMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/OrderTaskExecutionDetailMapper.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/OrderTaskMapper.xml 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/static/admin/order-client-list.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/static/admin/order-client-update.html 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/static/admin/order-task-assigned-clients.html 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/static/admin/order-task-list.html 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/static/admin/order-task-update.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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());
        }
    }
}
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 客户端ID
     * @param page 页码
     * @param uid      客户端ID
     * @param page     页码
     * @param pageSize 每页数量
     * @return 任务列表
     */
@@ -81,54 +87,77 @@
            if (uid == null) {
                return JsonUtil.loadFalseResult("客户端ID不能为空");
            }
            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("客户端ID不能为空");
        }
        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 客户端ID
     * @param id 任务执行详情ID
     * @param orderNo 订单号
     * @param uid          客户端ID
     * @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("客户端ID不能为空");
@@ -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 客户端ID
     * @param id 任务执行详情ID
     * @param uid           客户端ID
     * @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("客户端ID不能为空");
@@ -197,15 +229,15 @@
    /**
     * 确认收货成功,上传券码
     *
     * @param uid 客户端ID
     * @param id 任务执行详情ID
     * @param uid        客户端ID
     * @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("客户端ID不能为空");
@@ -230,15 +262,15 @@
    /**
     * 确认收货失败,上传失败原因
     *
     * @param uid 客户端ID
     * @param id 任务执行详情ID
     * @param uid    客户端ID
     * @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("客户端ID不能为空");
@@ -264,13 +296,13 @@
     * 评价成功
     *
     * @param uid 客户端ID
     * @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("客户端ID不能为空");
@@ -291,15 +323,15 @@
    /**
     * 评价失败,上传失败原因
     *
     * @param uid 客户端ID
     * @param id 任务执行详情ID
     * @param uid    客户端ID
     * @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("客户端ID不能为空");
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;
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;
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")
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;
    /**
     * 创建时间
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();
    }
}
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());
        
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;
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
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, "下单任务收货周期不能为空");
        }
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;
}
src/main/java/com/taoke/autopay/vo/admin/js2/OrderTaskVO.java
@@ -68,9 +68,9 @@
    private Integer reviewedOrderCount;
    /**
     * 确认收货周期(小时)
     * 确认收货周期(分钟)
     */
    private Integer receiveCycleHours;
    private Integer receiveCycleMinutes;
    /**
     * 下单开始时间
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>
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 &gt; #{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 &gt; #{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 &gt;=#{minActiveTime}</if> 
  </select>  
  <select id="listNotDistributed" resultMap="BaseResultMap">select 
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>
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>
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
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>
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>
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> &nbsp;&nbsp;';
                        html += '<a href="javascript:void(0)" onclick="deleteTask(' + d.id + ')" class="layui-table-link">删除</a> &nbsp;&nbsp;';
                        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>&nbsp;&nbsp;';
                        if (d.status != 0)
                        {
                            html += '<a href="javascript:void(0)" onclick="viewAssignedClients(' + d.id + ')" class="layui-table-link">已分配设备</a>&nbsp;&nbsp;';
                        }
                        html += '</div>';
                        return html;
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>