Browse Source

3.27 增加楼上传入的table数据

Huang
huangqizhen 3 months ago
parent
commit
ac0311b338
  1. 3
      src/main/java/com/example/demo/domain/entity/DetailY.java
  2. 5
      src/main/java/com/example/demo/domain/vo/ERP.java
  3. 31
      src/main/java/com/example/demo/domain/vo/Table.java
  4. 4
      src/main/java/com/example/demo/mapper/DetailYMapper.java
  5. 27
      src/main/java/com/example/demo/serviceImpl/OtherServiceImpl.java

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

@ -83,4 +83,7 @@ public class DetailY implements Serializable {
private List<String> areas; private List<String> areas;
private String uid;
private BigDecimal gold_last;
} }

5
src/main/java/com/example/demo/domain/vo/ERP.java

@ -1,6 +1,7 @@
package com.example.demo.domain.vo; package com.example.demo.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
@ -9,6 +10,7 @@ import java.util.Date;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class ERP { public class ERP {
private String jwcode; private String jwcode;
private BigDecimal taskJb; private BigDecimal taskJb;
@ -28,4 +30,7 @@ public class ERP {
private Integer updateType; private Integer updateType;
private String area; private String area;
private String token; private String token;
private Table table;
} }

31
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
}

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

@ -29,9 +29,9 @@ public interface DetailYMapper {
// ",#{refundGoods},#{name},#{username},#{area},#{contactId},#{remark},#{rechargeCoin}" + // ",#{refundGoods},#{name},#{username},#{area},#{contactId},#{remark},#{rechargeCoin}" +
// ",#{freeCoin},#{taskCoin},#{adminId},#{updateType},1,now(),#{firstRecharge})" // ",#{freeCoin},#{taskCoin},#{adminId},#{updateType},1,now(),#{firstRecharge})"
"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,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" + "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") @Options(useGeneratedKeys = true,keyColumn = "detaily_id",keyProperty = "detailyId")
int add(DetailY detaily); int add(DetailY detaily);

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

@ -133,7 +133,13 @@ public class OtherServiceImpl implements OtherService {
BigDecimal taskJb = erp.getTaskJb(); BigDecimal taskJb = erp.getTaskJb();
BigDecimal freeJb = erp.getFreeJb(); BigDecimal freeJb = erp.getFreeJb();
BigDecimal rechargeJb = erp.getRechargeJb(); 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 productName = erp.getProductName();
String remark = erp.getReamrk(); String remark = erp.getReamrk();
String Way = otherMapper.selectWay(type); String Way = otherMapper.selectWay(type);
@ -227,10 +233,12 @@ public class OtherServiceImpl implements OtherService {
// detailY.setUsername(username); // detailY.setUsername(username);
// detailY.setArea(area); // detailY.setArea(area);
detailY.setProductName(productName); detailY.setProductName(productName);
detailY.setConsumePlatform("ERP系统");
detailY.setConsumePlatform(String.valueOf(platform));
detailY.setRechargeWay(Way); detailY.setRechargeWay(Way);
detailY.setArea(country); detailY.setArea(country);
detailY.setCreateTime(erp.getCreateTime()); detailY.setCreateTime(erp.getCreateTime());
detailY.setGold_last(goldLast);
detailY.setUid(uid);
detailY.setUsername(name); detailY.setUsername(name);
@ -285,9 +293,10 @@ public class OtherServiceImpl implements OtherService {
detailY.setUsername(name); detailY.setUsername(name);
detailY.setArea(country); detailY.setArea(country);
detailY.setProductName(productName); detailY.setProductName(productName);
detailY.setConsumePlatform("ERP系统");
detailY.setConsumePlatform(String.valueOf(platform));
detailY.setConsumeType(Way); detailY.setConsumeType(Way);
detailY.setGold_last(goldLast);
detailY.setUid(uid);
detailY.setCreateTime(erp.getCreateTime()); detailY.setCreateTime(erp.getCreateTime());
@ -330,11 +339,12 @@ public class OtherServiceImpl implements OtherService {
detailY.setUsername(name); detailY.setUsername(name);
detailY.setArea(country); detailY.setArea(country);
detailY.setProductName(productName); detailY.setProductName(productName);
detailY.setConsumePlatform("ERP系统");
detailY.setConsumePlatform(String.valueOf(platform));
detailY.setRefundType(Way); detailY.setRefundType(Way);
detailY.setCreateTime(erp.getCreateTime()); detailY.setCreateTime(erp.getCreateTime());
detailY.setGold_last(goldLast);
detailY.setUid(uid);
BigDecimal buyJb =userGold.getBuyJb(); BigDecimal buyJb =userGold.getBuyJb();
BigDecimal coreJb=userGold.getCoreJb(); BigDecimal coreJb=userGold.getCoreJb();
@ -375,11 +385,12 @@ public class OtherServiceImpl implements OtherService {
detailY.setUsername(name); detailY.setUsername(name);
detailY.setArea(country); detailY.setArea(country);
detailY.setProductName(productName); detailY.setProductName(productName);
detailY.setConsumePlatform("ERP系统");
detailY.setConsumePlatform(String.valueOf(platform));
detailY.setReson(Way); detailY.setReson(Way);
detailY.setCreateTime(erp.getCreateTime()); detailY.setCreateTime(erp.getCreateTime());
detailY.setGold_last(goldLast);
detailY.setUid(uid);
BigDecimal buyJb =userGold.getBuyJb(); BigDecimal buyJb =userGold.getBuyJb();
BigDecimal coreJb=userGold.getCoreJb(); BigDecimal coreJb=userGold.getCoreJb();

Loading…
Cancel
Save