From ac0311b33875b4a15570f63043b7b0d762aa67aa Mon Sep 17 00:00:00 2001 From: huangqizhen Date: Thu, 27 Mar 2025 11:07:12 +0800 Subject: [PATCH] =?UTF-8?q?3.27=20=E5=A2=9E=E5=8A=A0=E6=A5=BC=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=85=A5=E7=9A=84table=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/demo/domain/entity/DetailY.java | 3 +++ src/main/java/com/example/demo/domain/vo/ERP.java | 5 ++++ .../java/com/example/demo/domain/vo/Table.java | 31 ++++++++++++++++++++++ .../com/example/demo/mapper/DetailYMapper.java | 4 +-- .../example/demo/serviceImpl/OtherServiceImpl.java | 27 +++++++++++++------ 5 files changed, 60 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/example/demo/domain/vo/Table.java diff --git a/src/main/java/com/example/demo/domain/entity/DetailY.java b/src/main/java/com/example/demo/domain/entity/DetailY.java index c28e4fe..85379b4 100644 --- a/src/main/java/com/example/demo/domain/entity/DetailY.java +++ b/src/main/java/com/example/demo/domain/entity/DetailY.java @@ -83,4 +83,7 @@ public class DetailY implements Serializable { private List areas; + private String uid; + private BigDecimal gold_last; + } diff --git a/src/main/java/com/example/demo/domain/vo/ERP.java b/src/main/java/com/example/demo/domain/vo/ERP.java index efcd7e8..c52b15b 100644 --- a/src/main/java/com/example/demo/domain/vo/ERP.java +++ b/src/main/java/com/example/demo/domain/vo/ERP.java @@ -1,6 +1,7 @@ package com.example.demo.domain.vo; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import lombok.Data; import lombok.NoArgsConstructor; @@ -9,6 +10,7 @@ import java.util.Date; @Data @NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) public class ERP { private String jwcode; private BigDecimal taskJb; @@ -28,4 +30,7 @@ public class ERP { private Integer updateType; private String area; private String token; + + private Table table; + } diff --git a/src/main/java/com/example/demo/domain/vo/Table.java b/src/main/java/com/example/demo/domain/vo/Table.java new file mode 100644 index 0000000..819d211 --- /dev/null +++ b/src/main/java/com/example/demo/domain/vo/Table.java @@ -0,0 +1,31 @@ +package com.example.demo.domain.vo; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +@Data +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class Table { + private Long id; + private String uid; + private BigDecimal gold_last; + private Integer gtype; + private String jwcode; + private BigDecimal free; + private BigDecimal core_jb; + private BigDecimal buy_jb; + private String cz_time; + private String cz_user; + private String cz_bz; + private Integer flag; + private Integer operation_type; + private Integer operation_platform; + private Integer operation_type_id; + private String goods_name; + + // Getters and setters +} diff --git a/src/main/java/com/example/demo/mapper/DetailYMapper.java b/src/main/java/com/example/demo/mapper/DetailYMapper.java index 94058cb..e06e0cc 100644 --- a/src/main/java/com/example/demo/mapper/DetailYMapper.java +++ b/src/main/java/com/example/demo/mapper/DetailYMapper.java @@ -29,9 +29,9 @@ public interface DetailYMapper { // ",#{refundGoods},#{name},#{username},#{area},#{contactId},#{remark},#{rechargeCoin}" + // ",#{freeCoin},#{taskCoin},#{adminId},#{updateType},1,now(),#{firstRecharge})" "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,gtype)\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,gtype,uid,gold_last)\n" + "values \n" + - "(#{jwcode}, #{orderCode}, #{activityId}, #{rechargeWay}, #{productId}, #{consumePlatform}, #{consumeType}, #{refundType}, #{refundGoods},'小洪', #{username}, #{area}, #{contactId}, #{remark}, #{rechargeCoin}, #{freeCoin}, #{taskCoin}, #{adminId}, #{updateType}, 1, #{createTime}, #{firstRecharge},#{productName},#{gtype})" + "(#{jwcode}, #{orderCode}, #{activityId}, #{rechargeWay}, #{productId}, #{consumePlatform}, #{consumeType}, #{refundType}, #{refundGoods},#{name}, #{username}, #{area}, #{contactId}, #{remark}, #{rechargeCoin}, #{freeCoin}, #{taskCoin}, #{adminId}, #{updateType}, 1, #{createTime}, #{firstRecharge},#{productName},#{gtype},#{uid},#{gold_last})" }) @Options(useGeneratedKeys = true,keyColumn = "detaily_id",keyProperty = "detailyId") int add(DetailY detaily); diff --git a/src/main/java/com/example/demo/serviceImpl/OtherServiceImpl.java b/src/main/java/com/example/demo/serviceImpl/OtherServiceImpl.java index 01fa8f6..c14b1f6 100644 --- a/src/main/java/com/example/demo/serviceImpl/OtherServiceImpl.java +++ b/src/main/java/com/example/demo/serviceImpl/OtherServiceImpl.java @@ -133,7 +133,13 @@ public class OtherServiceImpl implements OtherService { BigDecimal taskJb = erp.getTaskJb(); BigDecimal freeJb = erp.getFreeJb(); BigDecimal rechargeJb = erp.getRechargeJb(); - String adminName = erp.getAdminName(); + String uid = erp.getTable().getUid(); + BigDecimal goldLast = erp.getTable().getGold_last(); + String adminName = erp.getTable().getCz_user(); + if(adminName==null||adminName.equals("")){ + adminName = erp.getTable().getCz_bz(); + } + Integer platform = erp.getTable().getOperation_platform(); String productName = erp.getProductName(); String remark = erp.getReamrk(); String Way = otherMapper.selectWay(type); @@ -227,10 +233,12 @@ public class OtherServiceImpl implements OtherService { // detailY.setUsername(username); // detailY.setArea(area); detailY.setProductName(productName); - detailY.setConsumePlatform("ERP系统"); + detailY.setConsumePlatform(String.valueOf(platform)); detailY.setRechargeWay(Way); detailY.setArea(country); detailY.setCreateTime(erp.getCreateTime()); + detailY.setGold_last(goldLast); + detailY.setUid(uid); detailY.setUsername(name); @@ -285,9 +293,10 @@ public class OtherServiceImpl implements OtherService { detailY.setUsername(name); detailY.setArea(country); detailY.setProductName(productName); - detailY.setConsumePlatform("ERP系统"); + detailY.setConsumePlatform(String.valueOf(platform)); detailY.setConsumeType(Way); - + detailY.setGold_last(goldLast); + detailY.setUid(uid); detailY.setCreateTime(erp.getCreateTime()); @@ -330,11 +339,12 @@ public class OtherServiceImpl implements OtherService { detailY.setUsername(name); detailY.setArea(country); detailY.setProductName(productName); - detailY.setConsumePlatform("ERP系统"); + detailY.setConsumePlatform(String.valueOf(platform)); detailY.setRefundType(Way); detailY.setCreateTime(erp.getCreateTime()); - + detailY.setGold_last(goldLast); + detailY.setUid(uid); BigDecimal buyJb =userGold.getBuyJb(); BigDecimal coreJb=userGold.getCoreJb(); @@ -375,11 +385,12 @@ public class OtherServiceImpl implements OtherService { detailY.setUsername(name); detailY.setArea(country); detailY.setProductName(productName); - detailY.setConsumePlatform("ERP系统"); + detailY.setConsumePlatform(String.valueOf(platform)); detailY.setReson(Way); detailY.setCreateTime(erp.getCreateTime()); - + detailY.setGold_last(goldLast); + detailY.setUid(uid); BigDecimal buyJb =userGold.getBuyJb(); BigDecimal coreJb=userGold.getCoreJb();