diff --git a/mis-web/src/main/java/bc/mm/mis/bean/Country.java b/mis-web/src/main/java/bc/mm/mis/bean/Country.java deleted file mode 100644 index 648e26c..0000000 --- a/mis-web/src/main/java/bc/mm/mis/bean/Country.java +++ /dev/null @@ -1,72 +0,0 @@ -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-web/src/main/java/bc/mm/mis/bean/Users.java b/mis-web/src/main/java/bc/mm/mis/bean/Users.java deleted file mode 100644 index 95f5e19..0000000 --- a/mis-web/src/main/java/bc/mm/mis/bean/Users.java +++ /dev/null @@ -1,412 +0,0 @@ -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/java/bc/mm/mis/dao/CountryDao.java b/mis-web/src/main/java/bc/mm/mis/dao/CountryDao.java deleted file mode 100644 index eb99829..0000000 --- a/mis-web/src/main/java/bc/mm/mis/dao/CountryDao.java +++ /dev/null @@ -1,19 +0,0 @@ -package bc.mm.mis.dao; - -import bc.mm.mis.bean.Country; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; - -import java.util.List; - -@Repository -public interface CountryDao extends JpaRepository { - // find all - List findAll(); - - // -// Page pagers(Pageable pageable); - Page dopage(Pageable pageable); -} diff --git a/mis-web/src/main/java/bc/mm/mis/demos/web/BasicController.java b/mis-web/src/main/java/bc/mm/mis/demos/web/BasicController.java deleted file mode 100644 index 18eef5d..0000000 --- a/mis-web/src/main/java/bc/mm/mis/demos/web/BasicController.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2013-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package bc.mm.mis.demos.web; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; - -/** - * @author theonefx - */ -@Controller -public class BasicController { - - // http://127.0.0.1:8080/hello?name=lisi - @RequestMapping("/hello") - @ResponseBody - public String hello(@RequestParam(name = "name", defaultValue = "unknown user") String name) { - return "Hello " + name; - } - - // http://127.0.0.1:8080/user - @RequestMapping("/user") - @ResponseBody - public User user() { - User user = new User(); - user.setName("theonefx"); - user.setAge(666); - return user; - } - - // http://127.0.0.1:8080/save_user?name=newName&age=11 - @RequestMapping("/save_user") - @ResponseBody - public String saveUser(User u) { - return "user will save: name=" + u.getName() + ", age=" + u.getAge(); - } - - // http://127.0.0.1:8080/html - @RequestMapping("/html") - public String html(){ - return "index.html"; - } - - @ModelAttribute - public void parseUser(@RequestParam(name = "name", defaultValue = "unknown user") String name - , @RequestParam(name = "age", defaultValue = "12") Integer age, User user) { - user.setName("zhangsan"); - user.setAge(18); - } -} diff --git a/mis-web/src/main/java/bc/mm/mis/demos/web/PathVariableController.java b/mis-web/src/main/java/bc/mm/mis/demos/web/PathVariableController.java deleted file mode 100644 index fb9ba5b..0000000 --- a/mis-web/src/main/java/bc/mm/mis/demos/web/PathVariableController.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2013-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package bc.mm.mis.demos.web; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; - -/** - * @author theonefx - */ -@Controller -public class PathVariableController { - - // http://127.0.0.1:8080/user/123/roles/222 - @RequestMapping(value = "/user/{userId}/roles/{roleId}", method = RequestMethod.GET) - @ResponseBody - public String getLogin(@PathVariable("userId") String userId, @PathVariable("roleId") String roleId) { - return "User Id : " + userId + " Role Id : " + roleId; - } - - // http://127.0.0.1:8080/javabeat/somewords - @RequestMapping(value = "/javabeat/{regexp1:[a-z-]+}", method = RequestMethod.GET) - @ResponseBody - public String getRegExp(@PathVariable("regexp1") String regexp1) { - return "URI Part : " + regexp1; - } -} diff --git a/mis-web/src/main/java/bc/mm/mis/demos/web/User.java b/mis-web/src/main/java/bc/mm/mis/demos/web/User.java deleted file mode 100644 index 0b3dadd..0000000 --- a/mis-web/src/main/java/bc/mm/mis/demos/web/User.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2013-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package bc.mm.mis.demos.web; - -/** - * @author theonefx - */ -public class User { - - private String name; - - private Integer age; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Integer getAge() { - return age; - } - - public void setAge(Integer age) { - this.age = age; - } -}