完成基本京粉功能推送,订单统计,订单拉取的稳定版初版

This commit is contained in:
Leo
2024-11-11 00:02:27 +08:00
parent 19f1095a7c
commit 9c1c18b71d
38 changed files with 4628 additions and 185 deletions

View File

@@ -0,0 +1,86 @@
package cn.van.business.model.jd;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
* @author Leo
* @version 1.0
* @create 2024/11/6 下午10:19
* @description
*/
public class CategoryInfoVO implements Serializable {
private Long cid1;
private Long cid2;
private Long cid3;
private String cid1Name;
private String cid2Name;
private String cid3Name;
public CategoryInfoVO() {
}
@JsonProperty("cid1")
public void setCid1(Long cid1) {
this.cid1 = cid1;
}
@JsonProperty("cid1")
public Long getCid1() {
return this.cid1;
}
@JsonProperty("cid2")
public void setCid2(Long cid2) {
this.cid2 = cid2;
}
@JsonProperty("cid2")
public Long getCid2() {
return this.cid2;
}
@JsonProperty("cid3")
public void setCid3(Long cid3) {
this.cid3 = cid3;
}
@JsonProperty("cid3")
public Long getCid3() {
return this.cid3;
}
@JsonProperty("cid1Name")
public void setCid1Name(String cid1Name) {
this.cid1Name = cid1Name;
}
@JsonProperty("cid1Name")
public String getCid1Name() {
return this.cid1Name;
}
@JsonProperty("cid2Name")
public void setCid2Name(String cid2Name) {
this.cid2Name = cid2Name;
}
@JsonProperty("cid2Name")
public String getCid2Name() {
return this.cid2Name;
}
@JsonProperty("cid3Name")
public void setCid3Name(String cid3Name) {
this.cid3Name = cid3Name;
}
@JsonProperty("cid3Name")
public String getCid3Name() {
return this.cid3Name;
}
}

View File

@@ -1,4 +1,4 @@
package cn.van.business.model;
package cn.van.business.model.jd;
import javax.persistence.*;

View File

@@ -1,4 +1,4 @@
package cn.van.business.model;
package cn.van.business.model.jd;
/**
* @author Leo

View File

@@ -1,74 +0,0 @@
CREATE TABLE goods_info
(
id BIGINT AUTO_INCREMENT NOT NULL,
owner VARCHAR(255) NULL,
main_sku_id VARCHAR(255) NULL,
product_id VARCHAR(255) NULL,
image_url VARCHAR(255) NULL,
shop_name VARCHAR(255) NULL,
shop_id VARCHAR(255) NULL,
CONSTRAINT pk_goods_info PRIMARY KEY (id)
);
CREATE TABLE order_rows
(
id VARCHAR(255) NOT NULL,
order_id BIGINT NULL,
parent_id BIGINT NULL,
order_time datetime NULL,
finish_time datetime NULL,
modify_time datetime NULL,
order_emt INT NULL,
plus INT NULL,
union_id BIGINT NULL,
sku_id BIGINT NULL,
sku_name VARCHAR(255) NULL,
sku_num INT NULL,
sku_return_num INT NULL,
sku_frozen_num INT NULL,
price DOUBLE NULL,
commission_rate DOUBLE NULL,
sub_side_rate DOUBLE NULL,
subsidy_rate DOUBLE NULL,
final_rate DOUBLE NULL,
estimate_cos_price DOUBLE NULL,
estimate_fee DOUBLE NULL,
actual_cos_price DOUBLE NULL,
actual_fee DOUBLE NULL,
valid_code INT NULL,
trace_type INT NULL,
position_id BIGINT NULL,
site_id BIGINT NULL,
union_alias VARCHAR(255) NULL,
pid VARCHAR(255) NULL,
cid1 BIGINT NULL,
cid2 BIGINT NULL,
cid3 BIGINT NULL,
sub_union_id VARCHAR(255) NULL,
union_tag VARCHAR(255) NULL,
pop_id BIGINT NULL,
ext1 VARCHAR(255) NULL,
pay_month VARCHAR(255) NULL,
cp_act_id BIGINT NULL,
union_role INT NULL,
gift_coupon_ocs_amount DOUBLE NULL,
gift_coupon_key VARCHAR(255) NULL,
balance_ext VARCHAR(255) NULL,
sign VARCHAR(255) NULL,
pro_price_amount DOUBLE NULL,
rid BIGINT NULL,
goods_info_id BIGINT NULL,
express_status INT NULL,
channel_id BIGINT NULL,
sku_tag VARCHAR(255) NULL,
item_id VARCHAR(255) NULL,
caller_item_id VARCHAR(255) NULL,
order_tag VARCHAR(255) NULL,
CONSTRAINT pk_order_rows PRIMARY KEY (id)
);
ALTER TABLE order_rows
ADD CONSTRAINT uc_order_rows_goods_info UNIQUE (goods_info_id);
ALTER TABLE order_rows
ADD CONSTRAINT FK_ORDER_ROWS_ON_GOODS_INFO FOREIGN KEY (goods_info_id) REFERENCES goods_info (id);

View File

@@ -0,0 +1,24 @@
package cn.van.business.model.wx;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
@Getter
@Setter
@Entity
@Table(name = "setting")
public class Setting {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Integer id;
@Column(name = "setting_key", nullable = false)
private String settingKey;
@Column(name = "setting_value")
private String settingValue;
}

View File

@@ -0,0 +1,59 @@
package cn.van.business.model.wx;
/**
* @author Leo
* @version 1.0
* @create 2024/11/8 下午10:58
* @description
*/
import lombok.Data;
import java.util.List;
/**
* Main class representing the structure of the received WX message.
*/
@Data
public class WxEventMessage {
private Integer event;
private String wxid;
private MessageData data;
/**
* Inner class to encapsulate the data section of the message.
*/
@Data
public static class MessageData {
private String type;
private String des;
private EventData data;
private Long timestamp;
private String wxid;
private Integer port;
private Integer pid;
private String flag;
/**
* Inner class to encapsulate the nested data section within the data.
*/
@Data
public static class EventData {
private Long timeStamp;
private Integer fromType;
private Integer msgType;
private Integer msgSource;
private String fromWxid;
private String finalFromWxid;
private List<String> atWxidList; // List to store the WX IDs in the atWxidList array.
private Integer silence;
private Integer membercount;
private String signature;
private String msg;
private String msgId;
private String msgBase64;
}
}
}

View File

@@ -0,0 +1,58 @@
package cn.van.business.model.wx;
/**
* @author Leo
* @version 1.0
* @create 2024/11/9 上午12:06
* @description
*/
import lombok.Data;
import java.util.List;
/**
* Entity class representing the structure of the WX message event.
*/
@Data
public class WxMessage {
private Integer event;
private String wxid;
private DataSection data;
/**
* Nested class to hold the data section of the WX message.
*/
@Data
public static class DataSection {
private String type;
private String des;
private InnerData data;
private Long timestamp;
private String wxid;
private Integer port;
private Integer pid;
private String flag;
/**
* Nested class for the innermost data structure.
*/
@Data
public static class InnerData {
private Long timeStamp;
private Integer fromType;
private Integer msgType;
private Integer msgSource;
private String fromWxid;
private String finalFromWxid;
private List<String> atWxidList;
private Integer silence;
private Integer membercount;
private String signature;
private String msg;
private String msgId;
private String msgBase64;
}
}
}

View File

@@ -0,0 +1,60 @@
package cn.van.business.model.wx;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
@Getter
@Setter
@Entity
@Table(name = "wx_message_data_for_chat")
public class WxMessageDataForChat {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Integer id;
@Column(name = "timeStamp")
private Long timeStamp;
@Column(name = "fromType")
private Integer fromType;
@Column(name = "msgType")
private Integer msgType;
@Column(name = "msgSource")
private Integer msgSource;
@Column(name = "fromWxid")
private String fromWxid;
@Column(name = "finalFromWxid")
private String finalFromWxid;
@Column(name = "atWxidList")
private String atWxidList;
@Column(name = "silence")
private Integer silence;
@Column(name = "membercount")
private Integer membercount;
@Column(name = "signature")
private String signature;
@Column(name = "msg", length = 1000)
private String msg;
@Column(name = "msgBase64", length = 1000)
private String msgBase64;
@Column(name = "msgId")
private String msgId;
@Column(name = "msgTypeStr")
private String msgTypeStr;
}

View File

@@ -0,0 +1,40 @@
package cn.van.business.model.wx;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.math.BigDecimal;
@Getter
@Setter
@Entity
@Table(name = "wx_message_data_for_transfer")
public class WxMessageDataForTransfer {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Integer id;
@Column(name = "fromWxid", nullable = false)
private String fromWxid;
@Column(name = "msgSource")
private Integer msgSource;
@Column(name = "transType")
private Integer transType;
@Column(name = "money", precision = 10, scale = 2)
private BigDecimal money;
@Column(name = "memo")
private String memo;
@Column(name = "transferid", nullable = false)
private String transferid;
@Column(name = "invalidtime")
private Integer invalidtime;
}

View File

@@ -0,0 +1,40 @@
package cn.van.business.model.wx;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.math.BigDecimal;
@Getter
@Setter
@Entity
@Table(name = "wx_user")
public class WxUser {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Integer id;
@Column(name = "wxid", nullable = false)
private String wxid;
@Column(name = "money_leiji", precision = 10, scale = 2)
private BigDecimal moneyLeiji;
@Column(name = "money_shengyu", precision = 10, scale = 2)
private BigDecimal moneyShengyu;
@Column(name = "count_chongzhi", precision = 10, scale = 2)
private BigDecimal countChongzhi;
@Column(name = "count_xiaofei", precision = 10, scale = 2)
private BigDecimal countXiaofei;
@Column(name = "name")
private String name;
@Column(name = "status")
private Integer status;
}