订单信息
This commit is contained in:
parent
217c669407
commit
33cfff8e8b
@ -84,23 +84,22 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
Map<String, String> resMap = Utils.xmlStr2Map(rspXml);
|
||||
|
||||
String str = resMap.get("sign");
|
||||
System.out.println(Utils.verifySign(resMap, str));
|
||||
if (Utils.verifySign(resMap, str)){
|
||||
ThreadUtil.execAsync(() -> {
|
||||
Timer timer = new Timer();
|
||||
timer.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Map<String, String> orderQueryRes = queryOrder(map1);
|
||||
if(!orderQueryRes.get("msg").equals("unpaid")){
|
||||
timer.cancel();
|
||||
try {
|
||||
Map<String, String> orderQueryRes = queryOrder(map1);
|
||||
if(!orderQueryRes.get("msg").equals("unpaid")){
|
||||
timer.cancel();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
//定时器 立即开始 0.5s一次
|
||||
//定时器 不延时 立即开始 0.5s一次
|
||||
}, 0, 500);
|
||||
Thread.currentThread().interrupt();
|
||||
});
|
||||
@ -166,7 +165,8 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
// 修改油罐容量
|
||||
List<JSONObject> jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class);
|
||||
if (jsonObjects.size()<=1) {
|
||||
Integer tankId = Integer.valueOf(jsonObjects.get(1).get("tankId").toString());
|
||||
|
||||
Integer tankId = Integer.valueOf(jsonObjects.get(0).get("tankId").toString());
|
||||
oilOrder.setTankId(tankId);
|
||||
oilOrderService.addOilTracks(oilOrder, oilOrder.getStoreId());
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public class ReturnRecordServiceImpl extends ServiceImpl<ReturnRecordMapper, Ret
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String timestamp = dateFormat.format(new Date());
|
||||
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
|
||||
String orderNo = "H"+timestamp+randomString;
|
||||
String orderNo = "2345"+"H"+timestamp+randomString;
|
||||
returnRecord.setOrderNo(orderNo);
|
||||
}
|
||||
baseMapper.insert(returnRecord);
|
||||
|
Loading…
Reference in New Issue
Block a user