diff --git a/mis-start/src/main/java/bc/mm/mis/bean/Country.java b/mis-start/src/main/java/bc/mm/mis/bean/Country.java new file mode 100644 index 0000000..648e26c --- /dev/null +++ b/mis-start/src/main/java/bc/mm/mis/bean/Country.java @@ -0,0 +1,72 @@ +package bc.mm.mis.bean; + +import javax.persistence.*; + +@Entity +@Table(name = "country") +public class Country { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + private String code; + private String name; + + @Column(name = "country_code") + private String countryCode; + + private Integer order; + + @Column(name = "en_name") + private String enName; + + 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 getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + public Integer getOrder() { + return order; + } + + public void setOrder(Integer order) { + this.order = order; + } + + public String getEnName() { + return enName; + } + + public void setEnName(String enName) { + this.enName = enName; + } + + public Country() { + } +} diff --git a/mis-start/src/main/java/bc/mm/mis/bean/Users.java b/mis-start/src/main/java/bc/mm/mis/bean/Users.java new file mode 100644 index 0000000..95f5e19 --- /dev/null +++ b/mis-start/src/main/java/bc/mm/mis/bean/Users.java @@ -0,0 +1,412 @@ +package bc.mm.mis.bean; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import java.util.Date; + +/** + * user bean + */ +@Entity +@Table(name = "users") +public class Users { + @Id + @Column(name = "user_id") + private Long userId; + private Long id; //for agent + private String name; // angent name + private String account; // major account + @Column(name = "account_type") + private Integer accountTpe; // 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; + @Column(name = "country_id") + private Integer countryIdd; // + @Column(name = "country_code") + private String countryCode; // + private String phone; + @Column(name = "phone_status") + private Integer phoneStatus; // verfied or no + private String email; // + @Column(name = "email_status") + private Integer emailStatus; + private String avatar; // + @Column(name = "google_token") + private String googleToken; // google authontion + @Column(name = "google_status") + private Integer googleStatus; // + @Column(name = "second_verify") + private Integer secondVerify; + private String password; // + private String payword; + @Column(name = "invite_code") + private String inviteCode; + @Column(name = "purchase_code") + private String purchaseCode; + @Column(name = "user_grade") + private Integer userGrade; // default value 1 + @Column(name = "user_identity") + private Integer userIdentity; // user type defalt 1 + @Column(name = "is_agency") + private Integer isAgency; + @Column(name = "is_palce") + private Integer isPalce; + @Column(name = "user_auth_level") + private Integer userAuthLevel; // + @Column(name = "is_system") + private Integer isSystem; + @Column(name = "contract_deal") + private Integer contractDeal; + @Column(name = "login_code") + private String loginCode; + private Integer status; + @Column(name = "trade_status") + private Integer tradeStatus; + @Column(name = "trade_verify") + private Integer tradeVerify; + @Column(name = "contract_anomaly") + private Integer contractAnomaly; + @Column(name = "reg_ip") + private String regIp; + @Column(name = "last_login_time") + private Date lastLoginTime; + @Column(name = "last_login_ip") + private String lastLoginIp; + @Column(name = "created_at") + private Date createdAt; + @Column(name = "update_at") + private Date updatedAt; + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + 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 getAccountTpe() { + return accountTpe; + } + + public void setAccountTpe(Integer accountTpe) { + this.accountTpe = accountTpe; + } + + 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 getCountryIdd() { + return countryIdd; + } + + public void setCountryIdd(Integer countryIdd) { + this.countryIdd = countryIdd; + } + + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public Integer getPhoneStatus() { + return phoneStatus; + } + + public void setPhoneStatus(Integer phoneStatus) { + this.phoneStatus = phoneStatus; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public Integer getEmailStatus() { + return emailStatus; + } + + public void setEmailStatus(Integer emailStatus) { + this.emailStatus = emailStatus; + } + + public String getAvatar() { + return avatar; + } + + public void setAvatar(String avatar) { + this.avatar = avatar; + } + + public String getGoogleToken() { + return googleToken; + } + + public void setGoogleToken(String googleToken) { + this.googleToken = googleToken; + } + + public Integer getGoogleStatus() { + return googleStatus; + } + + public void setGoogleStatus(Integer googleStatus) { + this.googleStatus = googleStatus; + } + + public Integer getSecondVerify() { + return secondVerify; + } + + public void setSecondVerify(Integer secondVerify) { + this.secondVerify = secondVerify; + } + + 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 getInviteCode() { + return inviteCode; + } + + public void setInviteCode(String inviteCode) { + this.inviteCode = inviteCode; + } + + public String getPurchaseCode() { + return purchaseCode; + } + + public void setPurchaseCode(String purchaseCode) { + this.purchaseCode = purchaseCode; + } + + public Integer getUserGrade() { + return userGrade; + } + + public void setUserGrade(Integer userGrade) { + this.userGrade = userGrade; + } + + public Integer getUserIdentity() { + return userIdentity; + } + + public void setUserIdentity(Integer userIdentity) { + this.userIdentity = userIdentity; + } + + public Integer getIsAgency() { + return isAgency; + } + + public void setIsAgency(Integer isAgency) { + this.isAgency = isAgency; + } + + public Integer getIsPalce() { + return isPalce; + } + + public void setIsPalce(Integer isPalce) { + this.isPalce = isPalce; + } + + public Integer getUserAuthLevel() { + return userAuthLevel; + } + + public void setUserAuthLevel(Integer userAuthLevel) { + this.userAuthLevel = userAuthLevel; + } + + public Integer getIsSystem() { + return isSystem; + } + + public void setIsSystem(Integer isSystem) { + this.isSystem = isSystem; + } + + public Integer getContractDeal() { + return contractDeal; + } + + public void setContractDeal(Integer contractDeal) { + this.contractDeal = contractDeal; + } + + public String getLoginCode() { + return loginCode; + } + + public void setLoginCode(String loginCode) { + this.loginCode = loginCode; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getTradeStatus() { + return tradeStatus; + } + + public void setTradeStatus(Integer tradeStatus) { + this.tradeStatus = tradeStatus; + } + + public Integer getTradeVerify() { + return tradeVerify; + } + + public void setTradeVerify(Integer tradeVerify) { + this.tradeVerify = tradeVerify; + } + + public Integer getContractAnomaly() { + return contractAnomaly; + } + + public void setContractAnomaly(Integer contractAnomaly) { + this.contractAnomaly = contractAnomaly; + } + + public String getRegIp() { + return regIp; + } + + public void setRegIp(String regIp) { + this.regIp = regIp; + } + + public Date getLastLoginTime() { + return lastLoginTime; + } + + public void setLastLoginTime(Date lastLoginTime) { + this.lastLoginTime = lastLoginTime; + } + + public String getLastLoginIp() { + return lastLoginIp; + } + + public void setLastLoginIp(String lastLoginIp) { + this.lastLoginIp = lastLoginIp; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } +} diff --git a/mis-web/src/main/resources/application.properties b/mis-web/src/main/resources/application.properties index e52b498..697a48f 100644 --- a/mis-web/src/main/resources/application.properties +++ b/mis-web/src/main/resources/application.properties @@ -1,3 +1,15 @@ # 应用服务 WEB 访问端口 -server.port=8080 +server.port=9091 +# logback日志操作 +logging.config=classpath:logback-spring.xml +logging.path=./logs/ + +# +spring.datasource.url=jdbc:mysql://localhost:3306/bcdb?useUnicode=true&characterEncoding=utf8 +spring.datasource.username=root +spring.datasource.password=root +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +# jpa +spring.jpa.show-sql=true +spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect \ No newline at end of file diff --git a/mis-web/src/main/resources/banner.txt b/mis-web/src/main/resources/banner.txt new file mode 100644 index 0000000..d5cd039 --- /dev/null +++ b/mis-web/src/main/resources/banner.txt @@ -0,0 +1,5 @@ +===== Welcome to BCMIS ===== +SPB. version:${spring-boot.version} +BCMIS version 1.0.1 +BCMIS API'S SERVICE IS RUNNING +============================ \ No newline at end of file diff --git a/mis-web/src/main/resources/logback-spring.xml b/mis-web/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..7827e4f --- /dev/null +++ b/mis-web/src/main/resources/logback-spring.xml @@ -0,0 +1,198 @@ + + + + + + + + + + logback + + + + + + + + + + + + + + + + + + + info + + + ${CONSOLE_LOG_PATTERN} + + UTF-8 + + + + + + + + + + ${LOG_PATH}/log_debug.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${LOG_PATH}/debug/log-debug-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + debug + ACCEPT + DENY + + + + + + + ${LOG_PATH}/bcapi_log_info.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${LOG_PATH}/info/log-info-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + info + ACCEPT + DENY + + + + + + + ${LOG_PATH}/bcapi_log_warn.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${LOG_PATH}/warn/log-warn-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + warn + ACCEPT + DENY + + + + + + + + ${LOG_PATH}/bcapi_log_error.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${LOG_PATH}/error/log-error-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file