代码说明

This commit is contained in:
lijiazhuo
2026-01-07 10:58:52 +08:00
parent 181ab26654
commit 27b7d2b553
3 changed files with 252 additions and 5 deletions

View File

@ -15,7 +15,7 @@ import javax.validation.Valid;
@RestController
@Slf4j
public class ControllerTuiSong {
@PostMapping("/info")
@PostMapping("")
public JSONObject createUser(@RequestBody /*@Valid*/ CarInfo carInfo) {
String parkingId = carInfo.getParkingId();
String parkingNume = carInfo.getParkingNume();

View File

@ -1,6 +1,8 @@
package com.example.sso.zyccontroller;
import com.alibaba.fastjson.JSONObject;
import com.example.sso.util.TimeUtils;
import com.example.sso.util.V5utils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -10,9 +12,144 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j
public class CheLiangChuChang {
@PostMapping("/cyz")
public void yuezu(@RequestBody JSONObject data) {
public JSONObject yuezu(@RequestBody JSONObject data) {
log.info("章鱼村7" + data.toJSONString());
log.info("章鱼村粗口" + data.toJSONString());
String appid = data.getString("appid");
String method = data.getString("method");
String rand = data.getString("rand");
String version = data.getString("version");
String sign = data.getString("sign");
JSONObject object = data.getJSONObject("data");
String key = object.getString("key");
String carNo = object.getString("carNo");
String orderNo = object.getString("orderNo");
String outTime = object.getString("outTime");
String carType = object.getString("carType");
String gateName = object.getString("gateName");
String operatorName = object.getString("operatorName");
String totalAmount = object.getString("totalAmount");
String couponKey = object.getString("couponKey");
String imgUrl = object.getString("imgUrl");
String couponMoney = object.getString("couponMoney");
String walletPayMoney = object.getString("walletPayMoney");
String freeReason = object.getString("freeReason");
String plateColor = object.getString("plateColor");
String generalField = object.getString("generalField");
String tim = TimeUtils.tim(outTime);
JSONObject jsonObject = new JSONObject();
jsonObject.put("app_id", "67ab0e4982b769eeef25219b");
jsonObject.put("entry_id", "681ac433baccd58c663af639");
jsonObject.put("is_start_trigger", true);
jsonObject.put("is_start_workflow", true);
JSONObject datas = new JSONObject();
JSONObject data_sources = new JSONObject();
data_sources.put("value", appid);
datas.put("apid", data_sources );
JSONObject reportNo1 = new JSONObject();
reportNo1.put("value", key);
datas.put("datakey", reportNo1);
JSONObject lossSeqNo1 = new JSONObject();
lossSeqNo1.put("value", carNo);
datas.put("datacarno", lossSeqNo1);
JSONObject taskId1 = new JSONObject();
taskId1.put("value", orderNo);
datas.put("dataorderno", taskId1);
JSONObject dataentertimes = new JSONObject();
dataentertimes.put("value", tim);
datas.put("dataentertime", dataentertimes);
JSONObject datacartypes = new JSONObject();
datacartypes.put("value", carType);
datas.put("datacartype", datacartypes);
JSONObject datagatenames = new JSONObject();
datagatenames.put("value", gateName);
datas.put("datagatename", datagatenames);
JSONObject dataoperatornamess = new JSONObject();
dataoperatornamess.put("value", operatorName);
datas.put("dataoperatorname", dataoperatornamess);
JSONObject dataimgurls = new JSONObject();
dataimgurls.put("value", imgUrl);
datas.put("datareserveorderno", dataimgurls);
JSONObject dataplatecolors = new JSONObject();
dataplatecolors.put("value", plateColor);
datas.put("dataplatecolor", dataplatecolors);
JSONObject datageneralfields = new JSONObject();
datageneralfields.put("value", generalField);
datas.put("datageneralfield", datageneralfields);
JSONObject methods = new JSONObject();
methods.put("value", method);
datas.put("method", methods);
JSONObject rands = new JSONObject();
rands.put("value", rand);
datas.put("rand", rands);
JSONObject versions = new JSONObject();
versions.put("value", version);
datas.put("version", versions);
JSONObject signs = new JSONObject();
signs.put("value", sign);
datas.put("sign", signs);
JSONObject datatotalamounts = new JSONObject();
datatotalamounts.put("value", totalAmount);
datas.put("datatotalamount", datatotalamounts);
JSONObject datacouponkeys = new JSONObject();
datacouponkeys.put("value", couponKey);
datas.put("datacouponkey", datacouponkeys);
JSONObject datacouponmoneys = new JSONObject();
datacouponmoneys.put("value", couponMoney);
datas.put("datacouponmoney", datacouponmoneys);
JSONObject datawalletpaymoneys = new JSONObject();
datawalletpaymoneys.put("value", walletPayMoney);
datas.put("datawalletpaymoney", datawalletpaymoneys);
JSONObject datafreerreasons = new JSONObject();
datafreerreasons.put("value", freeReason);
datas.put("datafreerreason", datafreerreasons);
jsonObject.put("data", datas);
String jsonString = jsonObject.toJSONString();
log.info("参数 " + jsonString);
V5utils.add(jsonString);
JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("code","1");
jsonObject1.put("msg","ok");
jsonObject1.put("rand",rand);
jsonObject1.put("sign",sign);
return jsonObject1;

View File

@ -1,6 +1,8 @@
package com.example.sso.zyccontroller;
import com.alibaba.fastjson.JSONObject;
import com.example.sso.util.TimeUtils;
import com.example.sso.util.V5utils;
import com.example.sso.util.ZycUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
@ -14,9 +16,117 @@ import java.util.Map;
@Slf4j
public class CheLiangRuChang {
@PostMapping("/zyc")
public void yuezu(@RequestBody JSONObject data) {
public JSONObject yuezu(@RequestBody JSONObject data) {
log.info("章鱼村6" + data.toJSONString());
log.info("章鱼村入口" + data.toJSONString());
String appid = data.getString("appid");
String method = data.getString("method");
String rand = data.getString("rand");
String version = data.getString("version");
String sign = data.getString("sign");
JSONObject object = data.getJSONObject("data");
String key = object.getString("key");
String carNo = object.getString("carNo");
String orderNo = object.getString("orderNo");
String enterTime = object.getString("enterTime");
String carType = object.getString("carType");
String gateName = object.getString("gateName");
String operatorName = object.getString("operatorName");
String reserveOrderNo = object.getString("reserveOrderNo");
String imgUrl = object.getString("imgUrl");
String plateColor = object.getString("plateColor");
String generalField = object.getString("generalField");
String tim = TimeUtils.tim(enterTime);
JSONObject jsonObject = new JSONObject();
jsonObject.put("app_id", "67ab0e4982b769eeef25219b");
jsonObject.put("entry_id", "681abad3de8bbe9eedf26a89");
jsonObject.put("is_start_trigger", true);
jsonObject.put("is_start_workflow", true);
JSONObject datas = new JSONObject();
JSONObject data_sources = new JSONObject();
data_sources.put("value", appid);
datas.put("apid", data_sources );
JSONObject reportNo1 = new JSONObject();
reportNo1.put("value", key);
datas.put("datakey", reportNo1);
JSONObject lossSeqNo1 = new JSONObject();
lossSeqNo1.put("value", carNo);
datas.put("datacarno", lossSeqNo1);
JSONObject taskId1 = new JSONObject();
taskId1.put("value", orderNo);
datas.put("dataorderno", taskId1);
JSONObject dataentertimes = new JSONObject();
dataentertimes.put("value", tim);
datas.put("dataentertime", dataentertimes);
JSONObject datacartypes = new JSONObject();
datacartypes.put("value", carType);
datas.put("datacartype", datacartypes);
JSONObject datagatenames = new JSONObject();
datagatenames.put("value", gateName);
datas.put("datagatename", datagatenames);
JSONObject dataoperatornamess = new JSONObject();
dataoperatornamess.put("value", operatorName);
datas.put("dataoperatorname", dataoperatornamess);
JSONObject datareserveordernos = new JSONObject();
datareserveordernos.put("value", reserveOrderNo);
datas.put("datareserveorderno", datareserveordernos);
JSONObject dataimgurls = new JSONObject();
dataimgurls.put("value", imgUrl);
datas.put("datareserveorderno", dataimgurls);
JSONObject dataplatecolors = new JSONObject();
dataplatecolors.put("value", plateColor);
datas.put("dataplatecolor", dataplatecolors);
JSONObject datageneralfields = new JSONObject();
datageneralfields.put("value", generalField);
datas.put("datageneralfield", datageneralfields);
JSONObject methods = new JSONObject();
methods.put("value", method);
datas.put("method", methods);
JSONObject rands = new JSONObject();
rands.put("value", rand);
datas.put("rand", rands);
JSONObject versions = new JSONObject();
versions.put("value", version);
datas.put("version", versions);
JSONObject signs = new JSONObject();
signs.put("value", sign);
datas.put("sign", signs);
jsonObject.put("data", datas);
String jsonString = jsonObject.toJSONString();
V5utils.add(jsonString);
JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("code","1");
jsonObject1.put("msg","ok");
jsonObject1.put("rand",rand);
jsonObject1.put("sign",sign);
return jsonObject1;