| New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.stylefeng.guns.modular.vo.WxPayAppVO; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 支付服务 |
| | | * |
| | | * @author Lux |
| | | * @version 1.0.0 |
| | | * @since 2026/6/3 15:24 |
| | | */ |
| | | public interface IPayService { |
| | | |
| | | /** |
| | | * 微信充值 |
| | | * |
| | | * @param userId 充值用户 |
| | | * @param money 充值金额 |
| | | */ |
| | | WxPayAppVO wechatRecharge(Integer userId, BigDecimal money) throws Exception; |
| | | |
| | | /** |
| | | * 微信支付成功回调 |
| | | */ |
| | | Map<String,Object> wechatNotify(HttpServletRequest request) throws IOException; |
| | | } |
| New file |
| | |
| | | package com.stylefeng.guns.config.properties; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 上报数据配置 |
| | | * |
| | | * @author Lux |
| | | * @version 1.0.0 |
| | | * @since 2026/6/5 11:18 |
| | | */ |
| | | @Data |
| | | @Component |
| | | @ConfigurationProperties(prefix = "push.evaluation") |
| | | public class PushEvaluationProperties { |
| | | |
| | | private String url; |
| | | |
| | | private String accessKey; |
| | | |
| | | private String accessSecret; |
| | | } |
| New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.taxi; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.modular.system.service.IPushEvaluationService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * 推送数据到考评系统 |
| | | * |
| | | * @author Lux |
| | | * @version 1.0.0 |
| | | * @since 2026/6/5 16:14 |
| | | */ |
| | | @Controller |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/push/evaluation") |
| | | public class PushEvaluationController extends BaseController { |
| | | |
| | | private final IPushEvaluationService pushEvaluationService; |
| | | |
| | | /** |
| | | * 手动推送指定时间的订单到考评系统 |
| | | */ |
| | | @GetMapping("/order") |
| | | public void pushOrder(@RequestParam String startTime, @RequestParam String endTime) { |
| | | pushEvaluationService.pushEvaluation(startTime, endTime); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.stylefeng.guns.modular.system.model.PushEvaluationLog; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 数据上报日志 Mapper 接口 |
| | | * </p> |
| | | */ |
| | | public interface PushEvaluationLogMapper extends BaseMapper<PushEvaluationLog> { |
| | | |
| | | List<Map<String, Object>> getTaxiOrderList(@Param("startTime") String startTime, @Param("endTime") String endTime); |
| | | |
| | | List<Map<String, Object>> getPrivateCarOrderList(@Param("startTime") String startTime, @Param("endTime") String endTime); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.PushEvaluationLogMapper"> |
| | | |
| | | <select id="getTaxiOrderList" resultType="java.util.Map" > |
| | | SELECT ot.id, ot.orderNum as orderNo, ot.passengers as userName, ot.passengersPhone as userPhone, |
| | | ot.placementLon, ot.placementLat, ot.placementAddress, ot.startLon, ot.startLat, ot.startAddress, |
| | | ot.endLon, ot.endLat, ot.endAddress, ot.orderMoney, ot.payMoney, ot.travelTime as traveTime, |
| | | ot.startServiceTime, ot.endServiceTime, ot.insertTime as createTime, |
| | | td.id as driverId, td.name as driverName, td.phone as driverPhone, td.idCard as driverIdCard, td.insertTime as driverCreateTime, |
| | | ci.carLicensePlate as vehicleNo, oe.fraction as score, oe.content as evaluation |
| | | FROM t_order_taxi as ot |
| | | LEFT JOIN t_driver as td on td.id = ot.driverId |
| | | LEFT JOIN t_car as ci on ci.id= ot.carId |
| | | LEFT JOIN t_order_evaluate as oe on oe.orderId= ot.id |
| | | WHERE ot.state in(8, 9) |
| | | <if test="startTime != null and startTime !='' and endTime != null and endTime != ''"> |
| | | and (ot.insertTime between #{startTime} and #{endTime}) |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getPrivateCarOrderList" resultType="java.util.Map" > |
| | | SELECT ot.id, ot.orderNum as orderNo, ot.passengers as userName, ot.passengersPhone as userPhone, |
| | | ot.placementLon, ot.placementLat, ot.placementAddress, ot.startLon, ot.startLat, ot.startAddress, |
| | | ot.endLon, ot.endLat, ot.endAddress, ot.orderMoney, ot.payMoney, ot.travelTime as traveTime, |
| | | ot.startServiceTime, ot.endServiceTime, ot.insertTime as createTime, |
| | | td.id as driverId, td.name as driverName, td.phone as driverPhone, td.idCard as driverIdCard, td.insertTime as driverCreateTime, |
| | | ci.carLicensePlate as vehicleNo, oe.fraction as score, oe.content as evaluation |
| | | FROM t_order_private_car as ot |
| | | LEFT JOIN t_driver as td on td.id = ot.driverId |
| | | LEFT JOIN t_car as ci on ci.id= ot.carId |
| | | LEFT JOIN t_order_evaluate as oe on oe.orderId= ot.id |
| | | WHERE ot.state in(8, 9) |
| | | <if test="startTime != null and startTime !='' and endTime != null and endTime != ''"> |
| | | and (ot.insertTime between #{startTime} and #{endTime}) |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package com.stylefeng.guns.modular.system.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 上报考评系统驾驶员数据 |
| | | * |
| | | * @author Lux |
| | | * @version 1.0.0 |
| | | * @since 2026/6/5 11:32 |
| | | */ |
| | | @Data |
| | | public class PushEvaluationDriverDTO { |
| | | |
| | | private Long driverId; |
| | | private String driverName; |
| | | private String driverPhone; |
| | | private String driverIdCard; |
| | | private LocalDateTime driverCreateTime; |
| | | |
| | | public PushEvaluationDriverRequestDTO convert() { |
| | | PushEvaluationDriverRequestDTO driverRequestDTO = new PushEvaluationDriverRequestDTO(); |
| | | driverRequestDTO.setId(this.getDriverId()); |
| | | driverRequestDTO.setName(this.getDriverName()); |
| | | driverRequestDTO.setPhone(this.getDriverPhone()); |
| | | driverRequestDTO.setIdCard(this.getDriverIdCard()); |
| | | driverRequestDTO.setCreateTime(this.getDriverCreateTime()); |
| | | return driverRequestDTO; |
| | | } |
| | | } |
| | | |
| New file |
| | |
| | | package com.stylefeng.guns.modular.system.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 上报考评系统驾驶员数据 |
| | | * |
| | | * @author Lux |
| | | * @version 1.0.0 |
| | | * @since 2026/6/5 11:32 |
| | | */ |
| | | @Data |
| | | public class PushEvaluationDriverRequestDTO { |
| | | |
| | | private Long id; |
| | | |
| | | private String name; |
| | | |
| | | private String phone; |
| | | |
| | | private String idCard; |
| | | |
| | | private LocalDateTime createTime; |
| | | } |
| | | |
| New file |
| | |
| | | package com.stylefeng.guns.modular.system.dto; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 上报考评系统请求数据 |
| | | * |
| | | * @author Lux |
| | | * @version 1.0.0 |
| | | * @since 2026/6/5 11:32 |
| | | */ |
| | | @Data |
| | | public class PushEvaluationRequestDTO { |
| | | |
| | | private Long id; |
| | | |
| | | private String orderNo; |
| | | |
| | | private String userName; |
| | | |
| | | private String userPhone; |
| | | |
| | | private PushEvaluationDriverRequestDTO driverInfo; |
| | | |
| | | private String vehicleNo; |
| | | |
| | | private Double placementLon; |
| | | |
| | | private Double placementLat; |
| | | |
| | | private String placementAddress; |
| | | |
| | | private Double startLon; |
| | | |
| | | private Double startLat; |
| | | |
| | | private String startAddress; |
| | | |
| | | private Double endLon; |
| | | |
| | | private Double endLat; |
| | | |
| | | private String endAddress; |
| | | |
| | | private BigDecimal orderMoney; |
| | | |
| | | private BigDecimal payMoney; |
| | | |
| | | private LocalDateTime traveTime; |
| | | |
| | | private LocalDateTime startServiceTime; |
| | | |
| | | private LocalDateTime endServiceTime; |
| | | |
| | | private LocalDateTime createTime; |
| | | |
| | | private Integer score; |
| | | |
| | | private String evaluation; |
| | | |
| | | public static List<PushEvaluationRequestDTO> convert(List<Map<String, Object>> mapList) { |
| | | List<PushEvaluationRequestDTO> requstList = new ArrayList<>(); |
| | | if(Objects.nonNull(mapList) && !mapList.isEmpty()) { |
| | | mapList.forEach(mapObj -> { |
| | | String jsonData = JSON.toJSONString(mapObj); |
| | | PushEvaluationRequestDTO requestDTO = JSON.parseObject(jsonData, PushEvaluationRequestDTO.class); |
| | | if(Objects.nonNull(requestDTO)) { |
| | | PushEvaluationDriverDTO driverDTO = JSON.parseObject(jsonData, PushEvaluationDriverDTO.class); |
| | | Optional.ofNullable(driverDTO).ifPresent(d -> requestDTO.setDriverInfo(d.convert())); |
| | | requstList.add(requestDTO); |
| | | } |
| | | }); |
| | | } |
| | | return requstList; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.stylefeng.guns.modular.system.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 上报考评系统返回数据 |
| | | * |
| | | * @author Lux |
| | | * @version 1.0.0 |
| | | * @since 2026/6/5 11:32 |
| | | */ |
| | | @Data |
| | | public class PushEvaluationResponseDTO { |
| | | |
| | | private Integer code; |
| | | |
| | | private String type; |
| | | |
| | | private String message; |
| | | |
| | | private String result; |
| | | |
| | | private String extras; |
| | | |
| | | private String time; |
| | | } |
| New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 上报考评系统日志 |
| | | */ |
| | | @Data |
| | | @TableName("sys_push_evaluation_log") |
| | | public class PushEvaluationLog { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 流水号 |
| | | */ |
| | | @TableField("serial_number") |
| | | private String serialNumber; |
| | | |
| | | /** |
| | | * 请求地址 |
| | | */ |
| | | @TableField("request_url") |
| | | private String requestUrl; |
| | | |
| | | /** |
| | | * 请求头 |
| | | */ |
| | | @TableField("request_header") |
| | | private String requestHeader; |
| | | |
| | | /** |
| | | * 请求内容 |
| | | */ |
| | | @TableField("request_body") |
| | | private String requestBody; |
| | | |
| | | /** |
| | | * 返回内容 |
| | | */ |
| | | @TableField("response_body") |
| | | private String responseBody; |
| | | |
| | | /** |
| | | * 状态(0请求失败,1请求成功) |
| | | */ |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 重试次数 |
| | | */ |
| | | @TableField("retry_count") |
| | | private Integer retryCount; |
| | | |
| | | /** |
| | | * 消息 |
| | | */ |
| | | @TableField("message") |
| | | private String message; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 跟新时间 |
| | | */ |
| | | @TableField("update_time") |
| | | private Date updateTime; |
| | | |
| | | } |
| New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | /** |
| | | * 上报数据到考评系统 |
| | | * |
| | | * @author sky |
| | | * @version 1.0.0 |
| | | * @since 2026/6/5 11:29 |
| | | */ |
| | | public interface IPushEvaluationService { |
| | | |
| | | |
| | | void pushEvaluation(String startTime, String endTime); |
| | | } |
| New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.config.properties.PushEvaluationProperties; |
| | | import com.stylefeng.guns.modular.system.dao.PushEvaluationLogMapper; |
| | | import com.stylefeng.guns.modular.system.dto.PushEvaluationRequestDTO; |
| | | import com.stylefeng.guns.modular.system.dto.PushEvaluationResponseDTO; |
| | | import com.stylefeng.guns.modular.system.model.PushEvaluationLog; |
| | | import com.stylefeng.guns.modular.system.service.IPushEvaluationService; |
| | | import com.stylefeng.guns.modular.system.util.SignUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.commons.lang3.RandomStringUtils; |
| | | import org.springframework.http.*; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 上报数据到考评系统 |
| | | * |
| | | * @author Lux |
| | | * @version 1.0.0 |
| | | * @since 2026/6/5 11:29 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class PushEvaluationImpl extends ServiceImpl<PushEvaluationLogMapper, PushEvaluationLog> implements IPushEvaluationService { |
| | | |
| | | private final PushEvaluationProperties properties; |
| | | private final RestTemplate restTemplate; |
| | | private final static String API_PATH = "/api/taxiOrder/evaluation"; |
| | | |
| | | /** |
| | | * 推送数据到考评系统 |
| | | */ |
| | | @Transactional |
| | | public void pushEvaluation(String startTime, String endTime) { |
| | | // 获取出租车需要推送的数据 |
| | | List<Map<String, Object>> mapList = this.baseMapper.getTaxiOrderList(startTime, endTime); |
| | | List<PushEvaluationRequestDTO> taxiRequestList = PushEvaluationRequestDTO.convert(mapList); |
| | | // 获取专车需要推送的数据 |
| | | List<Map<String, Object>> mapPrivateList = this.baseMapper.getPrivateCarOrderList(startTime, endTime); |
| | | List<PushEvaluationRequestDTO> privateRequestList = PushEvaluationRequestDTO.convert(mapPrivateList); |
| | | // 数据推送 |
| | | List<PushEvaluationLog> logList = new ArrayList<>(); |
| | | taxiRequestList.forEach( taxi -> logList.add(requestEvaluation(taxi))); |
| | | privateRequestList.forEach( privateCar -> logList.add(requestEvaluation(privateCar))); |
| | | // 记录日志 |
| | | if(CollectionUtils.isNotEmpty(logList)) { |
| | | this.insertBatch(logList); |
| | | } |
| | | } |
| | | |
| | | public PushEvaluationLog requestEvaluation(PushEvaluationRequestDTO request) { |
| | | // 构建请求头 |
| | | HttpHeaders headers = buildHeaders(); |
| | | String url = properties.getUrl() + API_PATH; |
| | | PushEvaluationResponseDTO response = null; |
| | | int status = 1; |
| | | String errorMessage = ""; |
| | | try { |
| | | // 发送请求 |
| | | HttpEntity<PushEvaluationRequestDTO> entity = new HttpEntity<>(request, headers); |
| | | log.info("上报数据到考评系统-请求地址为:{},请求参数为 : {}", url, JSON.toJSONString(entity)); |
| | | ResponseEntity<PushEvaluationResponseDTO> responseEntity = restTemplate.exchange(url, HttpMethod.POST, entity, PushEvaluationResponseDTO.class); |
| | | // 返回数据 |
| | | response = responseEntity.getBody(); |
| | | if (Objects.isNull(response)) { |
| | | status = 0; |
| | | log.error("上报数据到考评系统-调用接口失败,返回为空"); |
| | | } else if(response.getCode() != 200 ) { |
| | | status = 0; |
| | | log.error("上报数据到考评系统-调用接口失败,返回失败数据为:{}", JSON.toJSONString(response)); |
| | | } |
| | | log.info("上报数据到考评系统-推送完成-请求URL:{},返回数据为:{}", url, JSON.toJSONString(response)); |
| | | } catch (Exception e) { |
| | | status = 0; |
| | | errorMessage = e.getLocalizedMessage(); |
| | | log.error("上报数据到考评系统-报错:", e); |
| | | } |
| | | |
| | | PushEvaluationLog evaluationLog = new PushEvaluationLog(); |
| | | evaluationLog.setSerialNumber(request.getOrderNo()); // 订单号 |
| | | evaluationLog.setRequestUrl(url); |
| | | evaluationLog.setRequestHeader(JSON.toJSONString(headers)); |
| | | evaluationLog.setRequestBody(JSON.toJSONString(request)); |
| | | Optional.ofNullable(response).map(JSON::toJSONString).ifPresent( evaluationLog::setResponseBody); |
| | | evaluationLog.setStatus(status); |
| | | evaluationLog.setRetryCount(0); |
| | | evaluationLog.setMessage(errorMessage); |
| | | evaluationLog.setCreateTime(new Date()); |
| | | evaluationLog.setUpdateTime(new Date()); |
| | | return evaluationLog; |
| | | } |
| | | |
| | | /** |
| | | * 构建请求头 |
| | | */ |
| | | public HttpHeaders buildHeaders() { |
| | | String timestamp = String.valueOf(System.currentTimeMillis() / 1000); // 时间戳 |
| | | String nonce = RandomStringUtils.randomAlphanumeric(6); // 6位随机数 |
| | | String sign = SignUtil.generateSign("POST", API_PATH, properties.getAccessKey(), properties.getAccessSecret(), timestamp, nonce); |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | headers.setContentType(MediaType.APPLICATION_JSON); |
| | | headers.set("accessKey", properties.getAccessKey()); |
| | | headers.set("timestamp", timestamp); |
| | | headers.set("nonce", nonce); |
| | | headers.set("sign", sign); |
| | | return headers; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.stylefeng.guns.modular.system.util; |
| | | |
| | | import javax.crypto.Mac; |
| | | import javax.crypto.spec.SecretKeySpec; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.Base64; |
| | | |
| | | /** |
| | | * 签名工具 |
| | | * |
| | | * @author Lux |
| | | * @version 1.0.0 |
| | | * @since 2026/6/5 11:20 |
| | | */ |
| | | public class SignUtil { |
| | | |
| | | private static final String HMAC_SHA256 = "HmacSHA256"; |
| | | |
| | | /** |
| | | * 数据上报生成签名 |
| | | * |
| | | * @param method 请求方式 |
| | | * @param url 请求路基,api的路径 |
| | | * @param accessKey 身份标识 |
| | | * @param accessSecret 密钥 |
| | | * @param timestamp 时间戳,精确到秒 |
| | | * @param nonce 唯一随机数,6位随机数 |
| | | * @return 签名后的数据 |
| | | */ |
| | | public static String generateSign(String method, String url, String accessKey, String accessSecret, String timestamp, String nonce) { |
| | | try { |
| | | String data = String.format("%s&%s&%s&%s&%s", method.toUpperCase(), url, accessKey, timestamp, nonce); |
| | | |
| | | Mac mac = Mac.getInstance(HMAC_SHA256); |
| | | SecretKeySpec secretKeySpec = new SecretKeySpec(accessSecret.getBytes(StandardCharsets.UTF_8), HMAC_SHA256); |
| | | mac.init(secretKeySpec); |
| | | byte[] signBytes = mac.doFinal(data.getBytes(StandardCharsets.UTF_8)); |
| | | return Base64.getEncoder().encodeToString(signBytes); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException("生成签名失败", e); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.stylefeng.guns.modular.system.service.IPushEvaluationService; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverService; |
| | | import com.stylefeng.guns.modular.system.service.ITLocationService; |
| | | import com.stylefeng.guns.modular.system.service.IUserCouponRecordService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private ITDriverService driverService; |
| | | |
| | | @Autowired |
| | | private IPushEvaluationService pushEvaluationService; |
| | | |
| | | |
| | | |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 每周一零晨3点执行任务 |
| | | * 推送上周订单评价数据 |
| | | */ |
| | | @Scheduled(cron = "0 0 3 ? * MON") |
| | | public void taskPushEvaluation() { |
| | | try { |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | LocalDateTime endTimeObj = LocalDateTime.now(); |
| | | String startTime = endTimeObj.minusWeeks(1).format(formatter); |
| | | String endTime = endTimeObj.format(formatter); |
| | | pushEvaluationService.pushEvaluation(startTime, endTime); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | #交通部推送数据功能开关 |
| | | pushMinistryOfTransport: false |
| | | pushMinistryOfTransport: false |
| | | |
| | | # 上报考评系统订单数据 |
| | | push: |
| | | evaluation: |
| | | url: https://gdnmg.hstgps.com:2238 # api地址 |
| | | access-key: orderReview # 身份标识 |
| | | access-secret: wwxCJhdFtk6qvVabO7W+7w # 密钥 |