2.0版接口完成

This commit is contained in:
2024-05-09 10:48:50 +08:00
parent f25178d3bc
commit ee0fbee3e0
7 changed files with 99 additions and 19 deletions

View File

@@ -19,6 +19,11 @@ public interface CTService {
String county, String serialNumber, String number, String logiRemark, String pageUrl,
String remark, String installAddress, String ynumber2, String images) throws Exception;
CTResponse<String> saveOrder(String name, String idCard, String contactMobile, String installedAddress,
String saleId, String storeId, String personnelId, String province, String city,
String county, String serialNumber, String number, String logiRemark, String pageUrl,
String remark, String installAddress, String ynumber2, String images, String deliveryMethod) throws Exception;
CTResponse<String> uploadFile(String serialNumber, String name, String idCard, String type, String msgId, String img) throws Exception;
CTResponse<String> updateOrder(String name, String orderNum) throws Exception;

View File

@@ -112,6 +112,7 @@ public class AgentOrderServiceImpl implements IAgentOrderService {
lqw.eq(StringUtils.isNotBlank(bo.getStatusCd()), AgentOrder::getStatusCd, bo.getStatusCd());
lqw.eq(StringUtils.isNotBlank(bo.getRouteArr()), AgentOrder::getRouteArr, bo.getRouteArr());
lqw.eq(ObjectUtils.isNotNull(bo.getIsRecharge()), AgentOrder::getIsRecharge, bo.getIsRecharge());
lqw.eq(ObjectUtils.isNotNull(bo.getIsExpress()), AgentOrder::getIsExpress, bo.getIsExpress());
lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
AgentOrder::getCreateTime ,params.get("beginCreateTime"), params.get("endCreateTime"));
lqw.orderByDesc(AgentOrder::getCreateTime);

View File

@@ -204,11 +204,55 @@ public class CTServiceImpl implements CTService {
body.put("province", province);
body.put("city", city);
body.put("county", county);
if (ObjectUtil.isNull(installedAddress) || ObjectUtil.isNull(province) || ObjectUtil.isNull(city) || ObjectUtil.isNull(county)) {
body.put("deliveryMethod", "2");
} else {
body.put("deliveryMethod", "1");
body.put("serialNumber", serialNumber);
body.put("number", number);
body.put("logiRemark", logiRemark);
body.put("pageUrl", pageUrl);
body.put("remark", remark);
body.put("installAddress", installAddress);
// body.put("ynumber2", ynumber2);
// body.put("images", images);
log.info("body:" + body);
requestBody.setEncryption(JSONUtil.toJsonStr(body), publicKey);
HttpResponse httpResponse = HttpRequest.post(url)
.header("token", token)
.form(requestBody.toMap())
.execute();
log.error("body:"+httpResponse.body());
if (httpResponse.isOk()) {
CTResponse<String> response = JSONUtil.toBean(httpResponse.body(), CTResponse.class);
return response;
}
log.error("response status:"+httpResponse.getStatus());
log.error("request error");
return null;
}
log.error("token error");
return null;
}
@Override
public CTResponse<String> saveOrder(String name, String idCard, String contactMobile,
String installedAddress, String saleId, String storeId,
String personnelId, String province, String city,
String county, String serialNumber, String number,
String logiRemark, String pageUrl, String remark,
String installAddress, String ynumber2, String images, String deliveryMethod) throws Exception {
if (checkToken()) {
requestBody.setInterfaceName("SaveOrder");
Map<String, Object> body = new HashMap<>();
body.put("name", name);
body.put("idCard", idCard);
body.put("contactMobile", contactMobile);
body.put("installedAddress", installedAddress);
body.put("saleId", saleId);
body.put("storeId", storeId);
body.put("personnelId", personnelId);
body.put("province", province);
body.put("city", city);
body.put("county", county);
body.put("deliveryMethod", deliveryMethod);
body.put("serialNumber", serialNumber);
body.put("number", number);
body.put("logiRemark", logiRemark);