diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 1eab03a..651e7cd 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -6,11 +6,12 @@
+
+
-
-
+
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 0c769d3..24a2f97 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,9 +2,14 @@
-
+
+
+
+
+
+
-
+
@@ -13,6 +18,7 @@
+
@@ -26,37 +32,58 @@
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
@@ -68,6 +95,7 @@
+
@@ -85,7 +113,6 @@
-
@@ -94,10 +121,16 @@
-
-
+
+
+
+
+
+
+
+
@@ -131,68 +164,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -284,7 +256,7 @@
1709705326078
-
+
1709706040716
@@ -335,11 +307,25 @@
1709710814354
-
+
+ 1709711834726
+
+
+
+ 1709711834726
+
+
+ 1709774983582
+
+
+
+ 1709774983582
+
+
-
+
@@ -353,7 +339,7 @@
-
+
@@ -391,7 +377,9 @@
-
+
+
+
@@ -421,13 +409,6 @@
-
-
-
-
-
-
-
@@ -473,20 +454,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -511,24 +478,286 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
+
+
+
@@ -583,11 +812,12 @@
- bctask
+ bccore
diff --git a/bccore/pom.xml b/bccore/pom.xml
new file mode 100644
index 0000000..a7621da
--- /dev/null
+++ b/bccore/pom.xml
@@ -0,0 +1,17 @@
+
+
+
+ mis
+ bc.mm
+ 1.0.01
+
+ 4.0.0
+
+ bccore
+
+ bc core comment
+
+
+
\ No newline at end of file
diff --git a/bccore/src/main/java/bc/mm/core/bean/Country.java b/bccore/src/main/java/bc/mm/core/bean/Country.java
new file mode 100644
index 0000000..536125b
--- /dev/null
+++ b/bccore/src/main/java/bc/mm/core/bean/Country.java
@@ -0,0 +1,66 @@
+package bc.mm.core.bean;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+@Entity
+public class Country {
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Integer id;
+ private String code;
+ private String name;
+ private String country_code;
+ private Integer order;
+ private String en_name;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getCountry_code() {
+ return country_code;
+ }
+
+ public void setCountry_code(String country_code) {
+ this.country_code = country_code;
+ }
+
+ public Integer getOrder() {
+ return order;
+ }
+
+ public void setOrder(Integer order) {
+ this.order = order;
+ }
+
+ public String getEn_name() {
+ return en_name;
+ }
+
+ public void setEn_name(String en_name) {
+ this.en_name = en_name;
+ }
+}
diff --git a/bccore/src/main/java/bc/mm/core/bean/Users.java b/bccore/src/main/java/bc/mm/core/bean/Users.java
new file mode 100644
index 0000000..ffb0ae5
--- /dev/null
+++ b/bccore/src/main/java/bc/mm/core/bean/Users.java
@@ -0,0 +1,378 @@
+package bc.mm.core.bean;
+
+import java.util.Date;
+
+/**
+ * user bean
+ */
+public class Users {
+ private Long user_id;
+ private Long id; //for agent
+ private String name; // angent name
+ private String account; // major account
+ private Integer accoutn_type; // 1:phone 2:email
+ private String username; // user name
+ private Integer referrer; // agent refer userid
+ private Long pid; //parent id
+ private Integer deep; // agent deep length
+ private String path;
+ private Integer country_id; //
+ private String country_code; //
+ private String phone;
+ private Integer phone_status; // verfied or no
+ private String email; //
+ private Integer email_status;
+ private String avatar; //
+ private String google_token; // google authontion
+ private Integer google_status; //
+ private Integer second_verify;
+ private String password; //
+ private String payword;
+ private String invite_code;
+ private String purchase_code;
+ private Integer user_grade; // default value 1
+ private Integer user_identity; // user type defalt 1
+ private Integer is_agency;
+ private Integer is_palce;
+ private Integer user_auth_level; //
+ private Integer is_system;
+ private Integer contract_deal;
+ private String login_code;
+ private Integer status;
+ private Integer trade_status;
+ private Integer trade_verify;
+ private Integer contract_anomaly;
+ private String reg_ip;
+ private Date last_login_time;
+ private String last_login_ip;
+ private Date created_At;
+ private Date updated_at;
+
+ public Long getUser_id() {
+ return user_id;
+ }
+
+ public void setUser_id(Long user_id) {
+ this.user_id = user_id;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getAccount() {
+ return account;
+ }
+
+ public void setAccount(String account) {
+ this.account = account;
+ }
+
+ public Integer getAccoutn_type() {
+ return accoutn_type;
+ }
+
+ public void setAccoutn_type(Integer accoutn_type) {
+ this.accoutn_type = accoutn_type;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public Integer getReferrer() {
+ return referrer;
+ }
+
+ public void setReferrer(Integer referrer) {
+ this.referrer = referrer;
+ }
+
+ public Long getPid() {
+ return pid;
+ }
+
+ public void setPid(Long pid) {
+ this.pid = pid;
+ }
+
+ public Integer getDeep() {
+ return deep;
+ }
+
+ public void setDeep(Integer deep) {
+ this.deep = deep;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public Integer getCountry_id() {
+ return country_id;
+ }
+
+ public void setCountry_id(Integer country_id) {
+ this.country_id = country_id;
+ }
+
+ public String getCountry_code() {
+ return country_code;
+ }
+
+ public void setCountry_code(String country_code) {
+ this.country_code = country_code;
+ }
+
+ public String getPhone() {
+ return phone;
+ }
+
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+
+ public Integer getPhone_status() {
+ return phone_status;
+ }
+
+ public void setPhone_status(Integer phone_status) {
+ this.phone_status = phone_status;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public Integer getEmail_status() {
+ return email_status;
+ }
+
+ public void setEmail_status(Integer email_status) {
+ this.email_status = email_status;
+ }
+
+ public String getAvatar() {
+ return avatar;
+ }
+
+ public void setAvatar(String avatar) {
+ this.avatar = avatar;
+ }
+
+ public String getGoogle_token() {
+ return google_token;
+ }
+
+ public void setGoogle_token(String google_token) {
+ this.google_token = google_token;
+ }
+
+ public Integer getGoogle_status() {
+ return google_status;
+ }
+
+ public void setGoogle_status(Integer google_status) {
+ this.google_status = google_status;
+ }
+
+ public Integer getSecond_verify() {
+ return second_verify;
+ }
+
+ public void setSecond_verify(Integer second_verify) {
+ this.second_verify = second_verify;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getPayword() {
+ return payword;
+ }
+
+ public void setPayword(String payword) {
+ this.payword = payword;
+ }
+
+ public String getInvite_code() {
+ return invite_code;
+ }
+
+ public void setInvite_code(String invite_code) {
+ this.invite_code = invite_code;
+ }
+
+ public String getPurchase_code() {
+ return purchase_code;
+ }
+
+ public void setPurchase_code(String purchase_code) {
+ this.purchase_code = purchase_code;
+ }
+
+ public Integer getUser_grade() {
+ return user_grade;
+ }
+
+ public void setUser_grade(Integer user_grade) {
+ this.user_grade = user_grade;
+ }
+
+ public Integer getUser_identity() {
+ return user_identity;
+ }
+
+ public void setUser_identity(Integer user_identity) {
+ this.user_identity = user_identity;
+ }
+
+ public Integer getIs_agency() {
+ return is_agency;
+ }
+
+ public void setIs_agency(Integer is_agency) {
+ this.is_agency = is_agency;
+ }
+
+ public Integer getUser_auth_level() {
+ return user_auth_level;
+ }
+
+ public void setUser_auth_level(Integer user_auth_level) {
+ this.user_auth_level = user_auth_level;
+ }
+
+ public Integer getIs_palce() {
+ return is_palce;
+ }
+
+ public void setIs_palce(Integer is_palce) {
+ this.is_palce = is_palce;
+ }
+
+ public Integer getIs_system() {
+ return is_system;
+ }
+
+ public void setIs_system(Integer is_system) {
+ this.is_system = is_system;
+ }
+
+ public Integer getContract_deal() {
+ return contract_deal;
+ }
+
+ public void setContract_deal(Integer contract_deal) {
+ this.contract_deal = contract_deal;
+ }
+
+ public String getLogin_code() {
+ return login_code;
+ }
+
+ public void setLogin_code(String login_code) {
+ this.login_code = login_code;
+ }
+
+ public Integer getStatus() {
+ return status;
+ }
+
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ public Integer getTrade_status() {
+ return trade_status;
+ }
+
+ public void setTrade_status(Integer trade_status) {
+ this.trade_status = trade_status;
+ }
+
+ public Integer getTrade_verify() {
+ return trade_verify;
+ }
+
+ public void setTrade_verify(Integer trade_verify) {
+ this.trade_verify = trade_verify;
+ }
+
+ public Integer getContract_anomaly() {
+ return contract_anomaly;
+ }
+
+ public void setContract_anomaly(Integer contract_anomaly) {
+ this.contract_anomaly = contract_anomaly;
+ }
+
+ public String getReg_ip() {
+ return reg_ip;
+ }
+
+ public void setReg_ip(String reg_ip) {
+ this.reg_ip = reg_ip;
+ }
+
+ public Date getLast_login_time() {
+ return last_login_time;
+ }
+
+ public void setLast_login_time(Date last_login_time) {
+ this.last_login_time = last_login_time;
+ }
+
+ public String getLast_login_ip() {
+ return last_login_ip;
+ }
+
+ public void setLast_login_ip(String last_login_ip) {
+ this.last_login_ip = last_login_ip;
+ }
+
+ public Date getCreated_At() {
+ return created_At;
+ }
+
+ public void setCreated_At(Date created_At) {
+ this.created_At = created_At;
+ }
+
+ public Date getUpdated_at() {
+ return updated_at;
+ }
+
+ public void setUpdated_at(Date updated_at) {
+ this.updated_at = updated_at;
+ }
+}
diff --git a/bccore/src/main/java/bc/mm/core/dao/CrudDao.java b/bccore/src/main/java/bc/mm/core/dao/CrudDao.java
new file mode 100644
index 0000000..4f30a69
--- /dev/null
+++ b/bccore/src/main/java/bc/mm/core/dao/CrudDao.java
@@ -0,0 +1,21 @@
+package bc.mm.core.dao;
+
+import org.aspectj.apache.bcel.util.Repository;
+
+import java.io.Serializable;
+import java.util.Optional;
+
+public interface CrudDao extends Repository {
+ // save
+ S save(S entity);
+ // find id
+ Optional findById(ID id);
+ //
+ Iterable findAll();
+ //
+ Long count();
+ //
+ void deleteById(ID id);
+ //
+ void delete(T entity);
+}
diff --git a/bccore/src/main/resources/application.properties b/bccore/src/main/resources/application.properties
new file mode 100644
index 0000000..4204c6f
--- /dev/null
+++ b/bccore/src/main/resources/application.properties
@@ -0,0 +1,7 @@
+#
+spring.datasource.url=jdbc:mysql://127.0.0.1:3306/bcdb?useUnicode=true&characterEncoding=UTF-8
+spring.datasource.username=root
+spring.datasource.password=root
+spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
+# print SQL
+spring.jpa.show-sql=true
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 55b84a5..f2172b0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,6 +14,7 @@
bcagent
bccommon
bctask
+ bccore
bc platform
@@ -30,6 +31,21 @@
spring-boot-starter
${springboot.version}
+
+ mysql
+ mysql-connector-java
+ 8.0.28
+
+
+ com.zaxxer
+ HikariCP
+ 2.7.9
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+ 2.0.9.RELEASE
+
\ No newline at end of file