Browse Source

dhl

pull/1/head
donghaolin 4 months ago
parent
commit
7ad6e5c924
  1. 1
      src/main/java/com/example/demo/domain/entity/DetailY.java
  2. 2
      src/main/java/com/example/demo/mapper/DetailYMapper.java
  3. 2
      src/main/java/com/example/demo/security/SecurityConfig.java
  4. 1
      src/main/java/com/example/demo/security/TokenFilter.java
  5. 8
      src/main/java/com/example/demo/serviceImpl/OtherServiceImpl.java

1
src/main/java/com/example/demo/domain/entity/DetailY.java

@ -36,7 +36,6 @@ public class DetailY implements Serializable {
private Integer updateType; private Integer updateType;
private Integer detailFlag; private Integer detailFlag;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date createTime; private Date createTime;
private Date endDate; private Date endDate;

2
src/main/java/com/example/demo/mapper/DetailYMapper.java

@ -21,7 +21,7 @@ public interface DetailYMapper {
"insert into detail_y \n" + "insert into detail_y \n" +
"(jwcode, order_code, activity_id, recharge_way, product_id, consume_platform, consume_type, refund_type, refund_goods, name, username, area, contact_id, remark, recharge_coin, free_coin, task_coin, admin_id, update_type, detail_flag, create_time, first_recharge,product_name)\n" + "(jwcode, order_code, activity_id, recharge_way, product_id, consume_platform, consume_type, refund_type, refund_goods, name, username, area, contact_id, remark, recharge_coin, free_coin, task_coin, admin_id, update_type, detail_flag, create_time, first_recharge,product_name)\n" +
"values \n" + "values \n" +
"(#{jwcode}, #{orderCode}, #{activityId}, #{rechargeWay}, #{productId}, #{consumePlatform}, #{consumeType}, #{refundType}, #{refundGoods}, #{name}, #{username}, #{area}, #{contactId}, #{remark}, #{rechargeCoin}, #{freeCoin}, #{taskCoin}, #{adminId}, #{updateType}, 1, now(), #{firstRecharge},#{productName})"
"(#{jwcode}, #{orderCode}, #{activityId}, #{rechargeWay}, #{productId}, #{consumePlatform}, #{consumeType}, #{refundType}, #{refundGoods},'小洪', #{username}, #{area}, #{contactId}, #{remark}, #{rechargeCoin}, #{freeCoin}, #{taskCoin}, #{adminId}, #{updateType}, 1, #{createTime}, #{firstRecharge},#{productName})"
}) })
@Options(useGeneratedKeys = true,keyColumn = "detaily_id",keyProperty = "detailyId") @Options(useGeneratedKeys = true,keyColumn = "detaily_id",keyProperty = "detailyId")
int add(DetailY detaily); int add(DetailY detaily);

2
src/main/java/com/example/demo/security/SecurityConfig.java

@ -60,7 +60,7 @@ public class SecurityConfig {
request request
.requestMatchers( HttpMethod.POST, .requestMatchers( HttpMethod.POST,
// 用户不登录就可以访问的路径 // 用户不登录就可以访问的路径
"/admin/login","/upload/**").permitAll()
"/admin/login","/upload/**","/detailY/ERP").permitAll()
.requestMatchers( .requestMatchers(
"/error","alipay/**","/upload/**" "/error","alipay/**","/upload/**"
).permitAll() ).permitAll()

1
src/main/java/com/example/demo/security/TokenFilter.java

@ -229,6 +229,7 @@ public class TokenFilter extends OncePerRequestFilter {
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException { throws ServletException, IOException {
// 检查是否是上传请求 // 检查是否是上传请求
boolean isErpRequest = request.getRequestURI().startsWith("/ERP") || request.getRequestURI().contains("ERP");
boolean isUploadRequest = request.getRequestURI().startsWith("/upload"); boolean isUploadRequest = request.getRequestURI().startsWith("/upload");
System.out.println(request.getRequestURI()); System.out.println(request.getRequestURI());
System.out.println(isUploadRequest); System.out.println(isUploadRequest);

8
src/main/java/com/example/demo/serviceImpl/OtherServiceImpl.java

@ -123,7 +123,6 @@ public class OtherServiceImpl implements OtherService {
String desjwcode= des.encrypt(JwCode); String desjwcode= des.encrypt(JwCode);
System.out.println("desjwcode:"+desjwcode); System.out.println("desjwcode:"+desjwcode);
// 创建 JSON 请求体 // 创建 JSON 请求体
Map<String, String> requestBody = new HashMap<>(); Map<String, String> requestBody = new HashMap<>();
requestBody.put("jwcode", desjwcode); requestBody.put("jwcode", desjwcode);
@ -184,6 +183,7 @@ public class OtherServiceImpl implements OtherService {
detailY.setConsumePlatform("ERP系统"); detailY.setConsumePlatform("ERP系统");
detailY.setRechargeWay(Way); detailY.setRechargeWay(Way);
detailY.setArea(country); detailY.setArea(country);
detailY.setCreateTime(erp.getCreateTime());
detailY.setUsername(name); detailY.setUsername(name);
@ -203,6 +203,8 @@ public class OtherServiceImpl implements OtherService {
detailY.setProductName(productName); detailY.setProductName(productName);
detailY.setConsumePlatform("ERP系统"); detailY.setConsumePlatform("ERP系统");
detailY.setConsumeType(Way); detailY.setConsumeType(Way);
detailY.setCreateTime(erp.getCreateTime());
} else if (typesToUpdateTwo.contains(type)) { } else if (typesToUpdateTwo.contains(type)) {
System.out.println("退款------------------------------------------------------"); System.out.println("退款------------------------------------------------------");
detailY.setUpdateType(2); // 设置 updateType 2 detailY.setUpdateType(2); // 设置 updateType 2
@ -217,6 +219,8 @@ public class OtherServiceImpl implements OtherService {
detailY.setProductName(productName); detailY.setProductName(productName);
detailY.setConsumePlatform("ERP系统"); detailY.setConsumePlatform("ERP系统");
detailY.setRefundType(Way); detailY.setRefundType(Way);
detailY.setCreateTime(erp.getCreateTime());
}else if (typesToUpdateThree.contains(type)) { }else if (typesToUpdateThree.contains(type)) {
System.out.println("其他------------------------------------------------------"); System.out.println("其他------------------------------------------------------");
detailY.setUpdateType(3); // 设置 updateType 3 detailY.setUpdateType(3); // 设置 updateType 3
@ -231,6 +235,8 @@ public class OtherServiceImpl implements OtherService {
detailY.setProductName(productName); detailY.setProductName(productName);
detailY.setConsumePlatform("ERP系统"); detailY.setConsumePlatform("ERP系统");
detailY.setReson(Way); detailY.setReson(Way);
detailY.setCreateTime(erp.getCreateTime());
} }
// 添加其他业务逻辑 // 添加其他业务逻辑
System.out.println(detailY+"-----测试能否传输------"); System.out.println(detailY+"-----测试能否传输------");

Loading…
Cancel
Save