mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
修改为15天内可开发票
This commit is contained in:
@@ -2,7 +2,6 @@ package com.jsowell.service;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.alibaba.fastjson2.TypeReference;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
@@ -1136,10 +1135,10 @@ public class OrderService {
|
||||
* @param dto
|
||||
*/
|
||||
public void applyOrderInvoice(ApplyOrderInvoiceDTO dto) {
|
||||
int i = 60;
|
||||
// 查询最近60天完成的订单
|
||||
int i = 15;
|
||||
// 查询最近15天完成的订单
|
||||
LocalDateTime dateTime = LocalDateTime.now().plusDays(-i);
|
||||
// 查询最近60天申请开票记录
|
||||
// 查询最近15天申请开票记录
|
||||
QueryInvoiceRecordDTO build = QueryInvoiceRecordDTO.builder()
|
||||
.memberId(dto.getMemberId())
|
||||
.startTime(dateTime)
|
||||
@@ -1224,42 +1223,16 @@ public class OrderService {
|
||||
boolean checkSign = AdapaySign.verifySign(data, sign, publicKey);
|
||||
if (!checkSign) {
|
||||
log.info("汇付支付回调验签失败:{}", data);
|
||||
return;
|
||||
}
|
||||
//验签成功 保存到回调记录表中
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
|
||||
AdapayCallbackRecord adapayCallbackRecord = mapper.readValue(data, AdapayCallbackRecord.class);
|
||||
adapayCallbackRecordService.saveAdapayCallbackRecord(adapayCallbackRecord);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws JsonProcessingException {
|
||||
String data = "{\n" +
|
||||
" \"app_id\": \"app_d0c80cb1-ffc8-48cb-a030-fe9bec823aaa\",\n" +
|
||||
" \"created_time\": \"20230519155322\",\n" +
|
||||
" \"description\": \"充电费用3\",\n" +
|
||||
" \"end_time\": \"20230519155332\",\n" +
|
||||
" \"expend\": {\n" +
|
||||
" \"bank_type\": \"OTHERS\",\n" +
|
||||
" \"open_id\": \"o8jhot6PJF93EPhNISsXi28dKdS8\",\n" +
|
||||
" \"sub_open_id\": \"o4REX5MprZfTaLnVNxfdOY-wnwGI\"\n" +
|
||||
" },\n" +
|
||||
" \"fee_amt\": \"0.00\",\n" +
|
||||
" \"id\": \"002212023051915532110505541666512474112\",\n" +
|
||||
" \"order_no\": \"819b093f874b4a2e8004e9edd4f5893c\",\n" +
|
||||
" \"out_trans_id\": \"4200001872202305191271802241\",\n" +
|
||||
" \"party_order_id\": \"02212305195720191805612\",\n" +
|
||||
" \"pay_amt\": \"0.01\",\n" +
|
||||
" \"pay_channel\": \"wx_lite\",\n" +
|
||||
" \"real_amt\": \"0.01\",\n" +
|
||||
" \"share_eq\": \"Y\",\n" +
|
||||
" \"status\": \"succeeded\",\n" +
|
||||
" \"wx_user_id\": \"\"\n" +
|
||||
"}";
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
|
||||
AdapayCallbackRecord adapayCallbackRecord = mapper.readValue(data, AdapayCallbackRecord.class);
|
||||
System.out.println(adapayCallbackRecord);
|
||||
}
|
||||
// 修改订单为已支付
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user