..
This commit is contained in:
0
ct/src/main/java/com/ruoyi/ct/controller/AgentAccountController.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/controller/AgentAccountController.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/controller/AgentAccountGoodController.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/controller/AgentAccountGoodController.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/controller/AgentAccountGoodUserController.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/controller/AgentAccountGoodUserController.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/controller/AgentController.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/controller/AgentController.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/controller/AgentOrderController.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/controller/AgentOrderController.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/controller/ApiLogController.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/controller/ApiLogController.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/controller/GoodController.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/controller/GoodController.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/Agent.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/Agent.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/AgentAccount.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/AgentAccount.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/AgentAccountGood.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/AgentAccountGood.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/AgentAccountGoodUser.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/AgentAccountGoodUser.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/AgentOrder.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/AgentOrder.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/ApiLog.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/ApiLog.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/Good.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/Good.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/bo/AgentAccountBo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/bo/AgentAccountBo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/bo/AgentAccountGoodBo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/bo/AgentAccountGoodBo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/bo/AgentAccountGoodUserBo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/bo/AgentAccountGoodUserBo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/bo/AgentBo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/bo/AgentBo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/bo/AgentOrderBo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/bo/AgentOrderBo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/bo/ApiLogBo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/bo/ApiLogBo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/bo/GoodBo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/bo/GoodBo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/vo/AgentAccountGoodUserVo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/vo/AgentAccountGoodUserVo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/vo/AgentAccountGoodVo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/vo/AgentAccountGoodVo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/vo/AgentAccountVo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/vo/AgentAccountVo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/vo/AgentOrderVo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/vo/AgentOrderVo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/vo/AgentVo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/vo/AgentVo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/vo/ApiLogVo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/vo/ApiLogVo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/vo/GoodVo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/domain/vo/GoodVo.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/mapper/AgentAccountGoodMapper.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/mapper/AgentAccountGoodMapper.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/mapper/AgentAccountGoodUserMapper.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/mapper/AgentAccountGoodUserMapper.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/mapper/AgentAccountMapper.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/mapper/AgentAccountMapper.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/mapper/AgentMapper.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/mapper/AgentMapper.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/mapper/AgentOrderMapper.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/mapper/AgentOrderMapper.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/mapper/ApiLogMapper.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/mapper/ApiLogMapper.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/mapper/GoodMapper.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/mapper/GoodMapper.java
Executable file → Normal file
@@ -25,6 +25,11 @@ public interface CTService {
|
|||||||
String county, String serialNumber, String number, String logiRemark, String pageUrl,
|
String county, String serialNumber, String number, String logiRemark, String pageUrl,
|
||||||
String remark, String installAddress, String ynumber2, String images, String deliveryMethod, String sn) throws Exception;
|
String remark, String installAddress, String ynumber2, String images, String deliveryMethod, String sn) 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 sn, String ip, boolean isIPV4) throws Exception;
|
||||||
|
|
||||||
CTResponse<String> uploadFile(String serialNumber, String name, String idCard, String type, String msgId, String img) 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;
|
CTResponse<String> updateOrder(String name, String orderNum) throws Exception;
|
||||||
|
|||||||
0
ct/src/main/java/com/ruoyi/ct/service/IAgentAccountGoodService.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/IAgentAccountGoodService.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/IAgentAccountGoodUserService.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/IAgentAccountGoodUserService.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/IAgentAccountService.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/IAgentAccountService.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/IAgentOrderService.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/IAgentOrderService.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/IAgentService.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/IAgentService.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/IApiLogService.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/IApiLogService.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/IGoodService.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/IGoodService.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/impl/AgentAccountGoodServiceImpl.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/impl/AgentAccountGoodServiceImpl.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/impl/AgentAccountGoodUserServiceImpl.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/impl/AgentAccountGoodUserServiceImpl.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/impl/AgentAccountServiceImpl.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/impl/AgentAccountServiceImpl.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/impl/AgentOrderServiceImpl.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/impl/AgentOrderServiceImpl.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/impl/AgentServiceImpl.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/impl/AgentServiceImpl.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/impl/ApiLogServiceImpl.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/impl/ApiLogServiceImpl.java
Executable file → Normal file
@@ -170,6 +170,8 @@ public class CTServiceImpl implements CTService {
|
|||||||
body.put("saleId", saleId);
|
body.put("saleId", saleId);
|
||||||
body.put("page", page);
|
body.put("page", page);
|
||||||
body.put("pageSize", pageSize);
|
body.put("pageSize", pageSize);
|
||||||
|
System.out.println("body = " + body);
|
||||||
|
log.error("body:"+JSONUtil.toJsonStr(body));
|
||||||
requestBody.setEncryption(JSONUtil.toJsonStr(body), publicKey);
|
requestBody.setEncryption(JSONUtil.toJsonStr(body), publicKey);
|
||||||
HttpResponse httpResponse = HttpRequest.post(url)
|
HttpResponse httpResponse = HttpRequest.post(url)
|
||||||
.header("token", token)
|
.header("token", token)
|
||||||
@@ -264,6 +266,80 @@ public class CTServiceImpl implements CTService {
|
|||||||
return null;
|
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 sn, String ip, boolean isIPV4) throws Exception {
|
||||||
|
CTRequestBody requestBody = checkToken();
|
||||||
|
if (ObjectUtil.isNotNull(requestBody)) {
|
||||||
|
log.error(sn+" ------------------检查接口登录状态完成-------------------");
|
||||||
|
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("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);
|
||||||
|
requestBody.setEncryption(JSONUtil.toJsonStr(body), publicKey);
|
||||||
|
log.error(sn+" 加密前数据:"+body);
|
||||||
|
log.error(sn+" 加密后数据:"+requestBody.toMap());
|
||||||
|
HttpResponse httpResponse = HttpRequest.post(url)
|
||||||
|
.header("token", token)
|
||||||
|
.form(requestBody.toMap())
|
||||||
|
.execute();
|
||||||
|
// log.error("body:"+httpResponse.body());
|
||||||
|
if (httpResponse.isOk()) {
|
||||||
|
if (ObjectUtil.isNotNull(httpResponse.body()) && ObjectUtil.isNull(JSONUtil.toBean(httpResponse.body(), JSONObject.class).getStr("status"))) {
|
||||||
|
// 其他异常状态,如504等
|
||||||
|
log.error(sn+" ------------------下单异常------------------- ");
|
||||||
|
log.error(sn+" 请求电信异常,状态码:"+httpResponse.getStatus());
|
||||||
|
log.error(sn+" 返回:"+httpResponse.body());
|
||||||
|
LambdaQueryWrapper<AgentOrder> lqw = new LambdaQueryWrapper<>();
|
||||||
|
lqw.eq(AgentOrder::getSerialNumber, serialNumber);
|
||||||
|
lqw.last("limit 1");
|
||||||
|
AgentOrderVo agentOrderVo = agentOrderMapper.selectVoOne(lqw);
|
||||||
|
AgentOrder agentOrder = new AgentOrder();
|
||||||
|
agentOrder.setId(agentOrderVo.getId());
|
||||||
|
agentOrder.setStatus("-2");
|
||||||
|
agentOrder.setHasError(1);
|
||||||
|
agentOrderMapper.updateById(agentOrder);
|
||||||
|
log.error(sn+" --------------------------------------------");
|
||||||
|
throw new CTNetException();
|
||||||
|
}
|
||||||
|
CTResponse<String> response = JSONUtil.toBean(httpResponse.body(), CTResponse.class);
|
||||||
|
return response;
|
||||||
|
} else {
|
||||||
|
// 返回的不是200,或者没有返回
|
||||||
|
log.error(sn+" ------------------下单异常-------------------");
|
||||||
|
log.error(sn+" 请求电信异常,状态码:"+httpResponse.getStatus());
|
||||||
|
log.error(sn+" 返回:"+httpResponse.body());
|
||||||
|
log.error(sn+" --------------------------------------------");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
log.error("token error");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 线下下单
|
* 线下下单
|
||||||
*/
|
*/
|
||||||
|
|||||||
0
ct/src/main/java/com/ruoyi/ct/service/impl/GoodServiceImpl.java
Executable file → Normal file
0
ct/src/main/java/com/ruoyi/ct/service/impl/GoodServiceImpl.java
Executable file → Normal file
@@ -49,9 +49,9 @@ spring:
|
|||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||||
url: jdbc:mysql://43.140.198.163:3380/ct?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
url: jdbc:mysql://localhost:3306/ct?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||||
username: root
|
username: root
|
||||||
password: qaHljgd123.
|
password: rPt5kirMS25S4N55
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
lazy: true
|
lazy: true
|
||||||
@@ -102,13 +102,13 @@ spring:
|
|||||||
spring:
|
spring:
|
||||||
redis:
|
redis:
|
||||||
# 地址
|
# 地址
|
||||||
host: 43.140.198.163
|
host: 127.0.0.1
|
||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
port: 3612
|
port: 6379
|
||||||
# 数据库索引
|
# 数据库索引
|
||||||
database: 4
|
database: 4
|
||||||
# 密码(如没有密码请注释掉)
|
# 密码(如没有密码请注释掉)
|
||||||
password: qaRedisPass123.
|
password: 123456
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
# 是否开启ssl
|
# 是否开启ssl
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.ruoyi.common.core.domain;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class CTResponse2<T> {
|
||||||
|
|
||||||
|
public static final String SUCCESS_STATUS = "success";
|
||||||
|
|
||||||
|
private String status;
|
||||||
|
private String message;
|
||||||
|
private String errorCode;
|
||||||
|
private T data;
|
||||||
|
private JSONObject decryptData;
|
||||||
|
|
||||||
|
public boolean isSuccess() {
|
||||||
|
return status.equals(SUCCESS_STATUS);
|
||||||
|
}
|
||||||
|
}
|
||||||
0
ruoyi-ui/src/api/ct/agent.js
Executable file → Normal file
0
ruoyi-ui/src/api/ct/agent.js
Executable file → Normal file
0
ruoyi-ui/src/api/ct/agentAccount.js
Executable file → Normal file
0
ruoyi-ui/src/api/ct/agentAccount.js
Executable file → Normal file
0
ruoyi-ui/src/api/ct/agentAccountGood.js
Executable file → Normal file
0
ruoyi-ui/src/api/ct/agentAccountGood.js
Executable file → Normal file
0
ruoyi-ui/src/api/ct/agentAccountGoodUser.js
Executable file → Normal file
0
ruoyi-ui/src/api/ct/agentAccountGoodUser.js
Executable file → Normal file
0
ruoyi-ui/src/api/ct/agentOrder.js
Executable file → Normal file
0
ruoyi-ui/src/api/ct/agentOrder.js
Executable file → Normal file
0
ruoyi-ui/src/api/ct/apiLog.js
Executable file → Normal file
0
ruoyi-ui/src/api/ct/apiLog.js
Executable file → Normal file
0
ruoyi-ui/src/api/ct/good.js
Executable file → Normal file
0
ruoyi-ui/src/api/ct/good.js
Executable file → Normal file
0
ruoyi-ui/src/views/ct/agent/index.vue
Executable file → Normal file
0
ruoyi-ui/src/views/ct/agent/index.vue
Executable file → Normal file
0
ruoyi-ui/src/views/ct/agentAccount/index.vue
Executable file → Normal file
0
ruoyi-ui/src/views/ct/agentAccount/index.vue
Executable file → Normal file
0
ruoyi-ui/src/views/ct/agentAccountGood/index.vue
Executable file → Normal file
0
ruoyi-ui/src/views/ct/agentAccountGood/index.vue
Executable file → Normal file
0
ruoyi-ui/src/views/ct/agentAccountGoodUser/index.vue
Executable file → Normal file
0
ruoyi-ui/src/views/ct/agentAccountGoodUser/index.vue
Executable file → Normal file
0
ruoyi-ui/src/views/ct/agentOrder/index.vue
Executable file → Normal file
0
ruoyi-ui/src/views/ct/agentOrder/index.vue
Executable file → Normal file
0
ruoyi-ui/src/views/ct/apiLog/index.vue
Executable file → Normal file
0
ruoyi-ui/src/views/ct/apiLog/index.vue
Executable file → Normal file
0
ruoyi-ui/src/views/ct/good/index.vue
Executable file → Normal file
0
ruoyi-ui/src/views/ct/good/index.vue
Executable file → Normal file
Reference in New Issue
Block a user