Browse Source

用户注册登陆

wanghui 7 years ago
parent
commit
8ad6339295

+ 6 - 7
GeneratorConfig.xml

@@ -1,15 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
 <generatorConfiguration>
-
-  <classPathEntry location="C:/Users/Administrator/.dbeaver-drivers/maven/maven-central/mysql/mysql-connector-java-5.1.44.jar" />
-   <!-- <classPathEntry location="E:/mysql-connector-java-5.1.40.jar" /> -->
+  <!-- <classPathEntry location="C:/Users/Administrator/.dbeaver-drivers/maven/maven-central/mysql/mysql-connector-java-5.1.44.jar" /> -->
+  <classPathEntry location="E:/mysql-connector-java-5.1.40.jar" />
   <context id="context1">	
     <jdbcConnection connectionURL="jdbc:mysql://192.168.1.213:3306/aft" 
     	driverClass="com.mysql.jdbc.Driver" password="123456" userId="dev" />
-    <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="AFT" />
-    <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="AFT" />
-    <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="AFT" type="XMLMAPPER" />
-    <table schema="aft" tableName="contract_task_log"/> 
+    <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="jitao-server" />
+    <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="jitao-server" />
+    <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="jitao-server" type="XMLMAPPER" />
+    <table schema="aft" tableName="user"/> 
   </context>
 </generatorConfiguration>

+ 1 - 18
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -423,33 +423,16 @@ public class AdminApiController extends CertifyApiController {
 			return res;
 		}
 
-		if (null == inputUser.getType()) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "type", "type"));
-			return res;
-		}
 
-		User user = userService.selectByMobieAndType(inputUser.getMobile().trim(), inputUser.getType());
+		User user = userService.selectByMobieAndType(inputUser.getMobile().trim(), null);
 		if (null != user) {
 			res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "当前用户已注册!"));
 			return res;
 		}
-
-		if (UserType.ORGANIZATION.getCode().equals(inputUser.getType())
-				&& StringUtils.isBlank(inputUser.getUnitName())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "公司名称", "公司名称"));
-			return res;
-		}
-
-		if (UserType.PERSONAL.getCode().equals(inputUser.getType()) && StringUtils.isBlank(inputUser.getUsername())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "用户名称", "用户名称"));
-			return res;
-		}
-
 		User u = new User();
 		u.setId(UUID.randomUUID().toString());
 		u.setMobile(inputUser.getMobile().trim());
 		u.setPassword(inputUser.getMobile().trim());
-		u.setType(inputUser.getType());
 		Calendar now = Calendar.getInstance();
 		now.set(Calendar.MILLISECOND, 0);
 		u.setCreateTime(now.getTime());

+ 2 - 4
src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java

@@ -34,7 +34,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 	public List<Admin> selectAllAdmin() {
 		return adminMapper.selectAllAdmin();
 	}
-
+	
 	@Override
 	public Admin selectByMobile(String mobile) {
 		return adminMapper.selectByMobile(mobile);
@@ -228,8 +228,6 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 	public List<AdminListBo> selectDepartmentStaff(String departmentId, String name) {
 		
 		return adminMapper.selectDepartmentStaff( departmentId,  name);
-	}
-
-	
+	}	
 
 }

+ 4 - 5
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -116,17 +116,16 @@ public class PublicController extends BaseController {
 	 */
 	@RequestMapping(value = "/getMCode", method = RequestMethod.GET)
 	@ResponseBody
-	public Result getMcode(String mobile, boolean sign, Integer type, String verificationCode) {
+	public Result getMcode(String mobile, boolean sign, String verificationCode) {
 		Result res = new Result();
 		// 用于找回密码
 		if (sign) {
-			if (null == userService.selectByMobieAndType(mobile.trim(), type)) {
+			if (null == userService.selectByMobieAndType(mobile.trim(),null)) {
 				res.getError().add(buildError(ErrorConstants.NON_REGISTER, "", "该用户未注册!"));
 				return res;
 			}
 		}
-
-		if (!sign) {
+		/*if (!sign) {
 			if (StringUtils.isBlank(verificationCode)) {
 				res.getError().add(buildError(ErrorConstants.VCODE_EMPTY_ERROR, "", "图像验证码不能为空!"));
 				return res;
@@ -136,7 +135,7 @@ public class PublicController extends BaseController {
 				return res;
 			}
 		}
-
+		 */
 		if (TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE_TIME) == null
 				|| TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE_TIME) == "") {
 			sendMessage(mobile, res,VerifyCodeUtils.M_CODE);

+ 2 - 0
src/main/java/com/goafanti/common/dao/AdminMapper.java

@@ -115,5 +115,7 @@ public interface AdminMapper {
 	List<AdminListBo> selectDepartmentStaff(String departmentId, String name);
 	
 	Admin selectAdminName(@Param("name")String name);
+	
+	Admin selectByUserName(String username);
 
 }

+ 18 - 17
src/main/java/com/goafanti/common/dao/UserMapper.java

@@ -1,6 +1,5 @@
 package com.goafanti.common.dao;
 
-import java.util.Date;
 import java.util.List;
 
 import org.apache.ibatis.annotations.Param;
@@ -27,67 +26,67 @@ import com.goafanti.report.bo.marketingESBo;
 public interface UserMapper {
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	long countByExample(UserExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	int deleteByExample(UserExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	int deleteByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	int insert(User record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	int insertSelective(User record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	List<User> selectByExample(UserExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	User selectByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	int updateByExample(@Param("record") User record, @Param("example") UserExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	int updateByPrimaryKeySelective(User record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	int updateByPrimaryKey(User record);
 
@@ -148,7 +147,7 @@ public interface UserMapper {
 	User findUserAccountDetail(@Param("uid")String uid);
 
 	/**
-	 * 查看客户联系人列�??
+	 * 查看客户联系人列��????
 	 * @param uid
 	 * @return
 	 */
@@ -169,7 +168,7 @@ public interface UserMapper {
 	List<BusinessListBo> findBusinessByFollowId(String followId);
 
 	/**
-	 * 查询客户�??有联系人
+	 * 查询客户��????有联系人
 	 * @param uid
 	 * @return
 	 */
@@ -213,12 +212,12 @@ public interface UserMapper {
 	int updateRefusedCustomer(@Param("id")String id,  @Param("nickname")String nickname, @Param("mobile")String mobile, @Param("societyTag")String societyTag);
 
 	/**
-	 * 查看客户锁定的业
+	 * 查看客户锁定的业��??
 	 * @param uid 摰X�ID
 	 * @param aid 管理员ID
 	 * @param businessProjectId 业务项目的ID
-	 * @param type 锁定类型  0-客户 1-业务
-	 * @param status 锁定状态 0-锁定,1-待释放,2-已释放
+	 * @param type 锁定类型  0-客户 ��??1-业务
+	 * @param status 锁定状�?? 0-锁定��??1-待释放,2-已释��??
 	 * @return
 	 */
 	List<LockingReleaseBo> selectLockedProject(@Param("uid")String uid,@Param("aid")String aid,@Param("businessProjectId")String businessProjectId, @Param("type")Integer type,@Param("status")Integer status);
@@ -236,4 +235,6 @@ public interface UserMapper {
 	marketingESBo marketingDepStatistics(@Param("depId")String depId, @Param("dailyStart")String dailyStart, @Param("dailyEnd")String dailyEnd);
 
 	CountMarketingStatisticsBo countmarketingDepStatistics(@Param("depId")String depId, @Param("dailyStart")String dailyStart, @Param("dailyEnd")String dailyEnd);
+
+	User selectByNameAndType(@Param("username")String username,@Param("type") Integer type);
 }

File diff suppressed because it is too large
+ 1514 - 1476
src/main/java/com/goafanti/common/mapper/UserMapper.xml


+ 130 - 83
src/main/java/com/goafanti/common/model/User.java

@@ -2,147 +2,153 @@ package com.goafanti.common.model;
 
 import java.util.Date;
 
-public class  User  extends BaseModel implements AftUser{
+public class  User  extends BaseModel implements AftUser {
 
 	/**
-	 * 
-	 */
-	private static final long serialVersionUID = -3301500555091503770L;
-	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.id
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.mobile
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String mobile;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.password
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String password;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.nickname
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String nickname;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.email
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String email;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.create_time
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.number
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private Long number;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.lvl
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private Integer lvl;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.type
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private Integer type;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.mid
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String mid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.status
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private Integer status;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.source
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private Integer source;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.update_time
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private Date updateTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.company_logo_url
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String companyLogoUrl;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.head_portrait_url
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String headPortraitUrl;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.society_tag
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String societyTag;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.introduction
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String introduction;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.value_added_tag
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String valueAddedTag;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.organization_id
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String organizationId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.identify_name
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String identifyName;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.background_url
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String backgroundUrl;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.audit_opinion
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String auditOpinion;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.audit_status
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private Integer auditStatus;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.share_type
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private Integer shareType;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.aid
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private String aid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.transfer_time
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	private Date transferTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.username
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
+	 */
+	private String username;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.authentication
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
+	 */
+	private Integer authentication;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.id
 	 * @return  the value of user.id
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getId() {
 		return id;
@@ -151,7 +157,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.id
 	 * @param id  the value for user.id
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setId(String id) {
 		this.id = id;
@@ -160,7 +166,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.mobile
 	 * @return  the value of user.mobile
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getMobile() {
 		return mobile;
@@ -169,7 +175,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.mobile
 	 * @param mobile  the value for user.mobile
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setMobile(String mobile) {
 		this.mobile = mobile;
@@ -178,7 +184,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.password
 	 * @return  the value of user.password
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getPassword() {
 		return password;
@@ -187,7 +193,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.password
 	 * @param password  the value for user.password
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setPassword(String password) {
 		this.password = password;
@@ -196,7 +202,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.nickname
 	 * @return  the value of user.nickname
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getNickname() {
 		return nickname;
@@ -205,7 +211,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.nickname
 	 * @param nickname  the value for user.nickname
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setNickname(String nickname) {
 		this.nickname = nickname;
@@ -214,7 +220,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.email
 	 * @return  the value of user.email
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getEmail() {
 		return email;
@@ -223,7 +229,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.email
 	 * @param email  the value for user.email
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setEmail(String email) {
 		this.email = email;
@@ -232,7 +238,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.create_time
 	 * @return  the value of user.create_time
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -241,7 +247,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.create_time
 	 * @param createTime  the value for user.create_time
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -250,7 +256,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.number
 	 * @return  the value of user.number
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public Long getNumber() {
 		return number;
@@ -259,7 +265,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.number
 	 * @param number  the value for user.number
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setNumber(Long number) {
 		this.number = number;
@@ -268,7 +274,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.lvl
 	 * @return  the value of user.lvl
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public Integer getLvl() {
 		return lvl;
@@ -277,7 +283,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.lvl
 	 * @param lvl  the value for user.lvl
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setLvl(Integer lvl) {
 		this.lvl = lvl;
@@ -286,7 +292,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.type
 	 * @return  the value of user.type
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public Integer getType() {
 		return type;
@@ -295,7 +301,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.type
 	 * @param type  the value for user.type
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setType(Integer type) {
 		this.type = type;
@@ -304,7 +310,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.mid
 	 * @return  the value of user.mid
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getMid() {
 		return mid;
@@ -313,7 +319,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.mid
 	 * @param mid  the value for user.mid
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setMid(String mid) {
 		this.mid = mid;
@@ -322,7 +328,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.status
 	 * @return  the value of user.status
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public Integer getStatus() {
 		return status;
@@ -331,7 +337,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.status
 	 * @param status  the value for user.status
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setStatus(Integer status) {
 		this.status = status;
@@ -340,7 +346,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.source
 	 * @return  the value of user.source
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public Integer getSource() {
 		return source;
@@ -349,7 +355,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.source
 	 * @param source  the value for user.source
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setSource(Integer source) {
 		this.source = source;
@@ -358,7 +364,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.update_time
 	 * @return  the value of user.update_time
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public Date getUpdateTime() {
 		return updateTime;
@@ -367,7 +373,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.update_time
 	 * @param updateTime  the value for user.update_time
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setUpdateTime(Date updateTime) {
 		this.updateTime = updateTime;
@@ -376,7 +382,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.company_logo_url
 	 * @return  the value of user.company_logo_url
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getCompanyLogoUrl() {
 		return companyLogoUrl;
@@ -385,7 +391,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.company_logo_url
 	 * @param companyLogoUrl  the value for user.company_logo_url
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setCompanyLogoUrl(String companyLogoUrl) {
 		this.companyLogoUrl = companyLogoUrl;
@@ -394,7 +400,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.head_portrait_url
 	 * @return  the value of user.head_portrait_url
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getHeadPortraitUrl() {
 		return headPortraitUrl;
@@ -403,7 +409,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.head_portrait_url
 	 * @param headPortraitUrl  the value for user.head_portrait_url
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setHeadPortraitUrl(String headPortraitUrl) {
 		this.headPortraitUrl = headPortraitUrl;
@@ -412,7 +418,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.society_tag
 	 * @return  the value of user.society_tag
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getSocietyTag() {
 		return societyTag;
@@ -421,7 +427,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.society_tag
 	 * @param societyTag  the value for user.society_tag
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setSocietyTag(String societyTag) {
 		this.societyTag = societyTag;
@@ -430,7 +436,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.introduction
 	 * @return  the value of user.introduction
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getIntroduction() {
 		return introduction;
@@ -439,7 +445,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.introduction
 	 * @param introduction  the value for user.introduction
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setIntroduction(String introduction) {
 		this.introduction = introduction;
@@ -448,7 +454,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.value_added_tag
 	 * @return  the value of user.value_added_tag
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getValueAddedTag() {
 		return valueAddedTag;
@@ -457,7 +463,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.value_added_tag
 	 * @param valueAddedTag  the value for user.value_added_tag
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setValueAddedTag(String valueAddedTag) {
 		this.valueAddedTag = valueAddedTag;
@@ -466,7 +472,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.organization_id
 	 * @return  the value of user.organization_id
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getOrganizationId() {
 		return organizationId;
@@ -475,7 +481,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.organization_id
 	 * @param organizationId  the value for user.organization_id
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setOrganizationId(String organizationId) {
 		this.organizationId = organizationId;
@@ -484,7 +490,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.identify_name
 	 * @return  the value of user.identify_name
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getIdentifyName() {
 		return identifyName;
@@ -493,7 +499,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.identify_name
 	 * @param identifyName  the value for user.identify_name
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setIdentifyName(String identifyName) {
 		this.identifyName = identifyName;
@@ -502,7 +508,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.background_url
 	 * @return  the value of user.background_url
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getBackgroundUrl() {
 		return backgroundUrl;
@@ -511,7 +517,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.background_url
 	 * @param backgroundUrl  the value for user.background_url
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setBackgroundUrl(String backgroundUrl) {
 		this.backgroundUrl = backgroundUrl;
@@ -520,7 +526,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.audit_opinion
 	 * @return  the value of user.audit_opinion
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getAuditOpinion() {
 		return auditOpinion;
@@ -529,7 +535,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.audit_opinion
 	 * @param auditOpinion  the value for user.audit_opinion
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setAuditOpinion(String auditOpinion) {
 		this.auditOpinion = auditOpinion;
@@ -538,7 +544,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.audit_status
 	 * @return  the value of user.audit_status
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public Integer getAuditStatus() {
 		return auditStatus;
@@ -547,7 +553,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.audit_status
 	 * @param auditStatus  the value for user.audit_status
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setAuditStatus(Integer auditStatus) {
 		this.auditStatus = auditStatus;
@@ -556,7 +562,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.share_type
 	 * @return  the value of user.share_type
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public Integer getShareType() {
 		return shareType;
@@ -565,7 +571,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.share_type
 	 * @param shareType  the value for user.share_type
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setShareType(Integer shareType) {
 		this.shareType = shareType;
@@ -574,7 +580,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.aid
 	 * @return  the value of user.aid
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getAid() {
 		return aid;
@@ -583,7 +589,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.aid
 	 * @param aid  the value for user.aid
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setAid(String aid) {
 		this.aid = aid;
@@ -592,7 +598,7 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.transfer_time
 	 * @return  the value of user.transfer_time
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public Date getTransferTime() {
 		return transferTime;
@@ -601,9 +607,50 @@ public class  User  extends BaseModel implements AftUser{
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.transfer_time
 	 * @param transferTime  the value for user.transfer_time
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setTransferTime(Date transferTime) {
 		this.transferTime = transferTime;
 	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.username
+	 * @return  the value of user.username
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
+	 */
+	public String getUsername() {
+		return username;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.username
+	 * @param username  the value for user.username
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
+	 */
+	public void setUsername(String username) {
+		this.username = username;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user.authentication
+	 * @return  the value of user.authentication
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
+	 */
+	public Integer getAuthentication() {
+		return authentication;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user.authentication
+	 * @param authentication  the value for user.authentication
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
+	 */
+	public void setAuthentication(Integer authentication) {
+		this.authentication = authentication;
+	}
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -3301500555091503770L;
 }

+ 146 - 16
src/main/java/com/goafanti/common/model/UserExample.java

@@ -7,23 +7,23 @@ import java.util.List;
 public class UserExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public UserExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -31,7 +31,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -39,7 +39,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -47,7 +47,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -55,7 +55,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -63,7 +63,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -71,7 +71,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -79,7 +79,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -89,7 +89,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -101,7 +101,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -110,7 +110,7 @@ public class UserExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -120,7 +120,7 @@ public class UserExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -1882,11 +1882,141 @@ public class UserExample {
 			addCriterion("transfer_time not between", value1, value2, "transferTime");
 			return (Criteria) this;
 		}
+
+		public Criteria andUsernameIsNull() {
+			addCriterion("username is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsernameIsNotNull() {
+			addCriterion("username is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsernameEqualTo(String value) {
+			addCriterion("username =", value, "username");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsernameNotEqualTo(String value) {
+			addCriterion("username <>", value, "username");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsernameGreaterThan(String value) {
+			addCriterion("username >", value, "username");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsernameGreaterThanOrEqualTo(String value) {
+			addCriterion("username >=", value, "username");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsernameLessThan(String value) {
+			addCriterion("username <", value, "username");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsernameLessThanOrEqualTo(String value) {
+			addCriterion("username <=", value, "username");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsernameLike(String value) {
+			addCriterion("username like", value, "username");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsernameNotLike(String value) {
+			addCriterion("username not like", value, "username");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsernameIn(List<String> values) {
+			addCriterion("username in", values, "username");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsernameNotIn(List<String> values) {
+			addCriterion("username not in", values, "username");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsernameBetween(String value1, String value2) {
+			addCriterion("username between", value1, value2, "username");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsernameNotBetween(String value1, String value2) {
+			addCriterion("username not between", value1, value2, "username");
+			return (Criteria) this;
+		}
+
+		public Criteria andAuthenticationIsNull() {
+			addCriterion("authentication is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAuthenticationIsNotNull() {
+			addCriterion("authentication is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAuthenticationEqualTo(Integer value) {
+			addCriterion("authentication =", value, "authentication");
+			return (Criteria) this;
+		}
+
+		public Criteria andAuthenticationNotEqualTo(Integer value) {
+			addCriterion("authentication <>", value, "authentication");
+			return (Criteria) this;
+		}
+
+		public Criteria andAuthenticationGreaterThan(Integer value) {
+			addCriterion("authentication >", value, "authentication");
+			return (Criteria) this;
+		}
+
+		public Criteria andAuthenticationGreaterThanOrEqualTo(Integer value) {
+			addCriterion("authentication >=", value, "authentication");
+			return (Criteria) this;
+		}
+
+		public Criteria andAuthenticationLessThan(Integer value) {
+			addCriterion("authentication <", value, "authentication");
+			return (Criteria) this;
+		}
+
+		public Criteria andAuthenticationLessThanOrEqualTo(Integer value) {
+			addCriterion("authentication <=", value, "authentication");
+			return (Criteria) this;
+		}
+
+		public Criteria andAuthenticationIn(List<Integer> values) {
+			addCriterion("authentication in", values, "authentication");
+			return (Criteria) this;
+		}
+
+		public Criteria andAuthenticationNotIn(List<Integer> values) {
+			addCriterion("authentication not in", values, "authentication");
+			return (Criteria) this;
+		}
+
+		public Criteria andAuthenticationBetween(Integer value1, Integer value2) {
+			addCriterion("authentication between", value1, value2, "authentication");
+			return (Criteria) this;
+		}
+
+		public Criteria andAuthenticationNotBetween(Integer value1, Integer value2) {
+			addCriterion("authentication not between", value1, value2, "authentication");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table user
-	 * @mbg.generated  Thu May 03 16:11:41 CST 2018
+	 * @mbg.generated  Thu May 31 15:33:56 CST 2018
 	 */
 	public static class Criterion {
 		private String condition;

+ 1 - 1
src/main/java/com/goafanti/core/shiro/token/TokenManager.java

@@ -166,7 +166,7 @@ public class TokenManager {
 	 * @return
 	 */
 	public static User login(User user, Boolean rememberMe) {
-		ShiroToken token = new ShiroToken(user.getMobile(), user.getPassword(), user.getType(),AFTConstants.USER_SOURCE_REGISTER);
+		ShiroToken token = new ShiroToken(user.getUsername(), user.getPassword(), user.getType(),AFTConstants.USER_SOURCE_REGISTER);
 		token.setRememberMe(null == rememberMe ? false : rememberMe);
 		SecurityUtils.getSubject().login(token);
 		setVal2Session(CSRF_TOKEN, UUID.randomUUID().toString().replace("-", ""));

+ 1 - 1
src/main/java/com/goafanti/core/shiro/token/UserRealm.java

@@ -60,7 +60,7 @@ public class UserRealm extends AuthorizingRealm {
 			return new SimpleAuthenticationInfo(aftUser, aftUser.getPassword(), passwordUtil.getAftSalt(aftUser),
 					getName());
 		} else {
-			User user = userService.selectByMobieAndType(token.getUsername(), token.getType());
+			User user = userService.selectByNameAndType(token.getUsername(), null);
 			if (null == user) {
 				throw new UnknownAccountException();
 			}

+ 2 - 17
src/main/java/com/goafanti/user/bo/InputUser.java

@@ -1,7 +1,5 @@
 package com.goafanti.user.bo;
 
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
 import javax.validation.constraints.Size;
 
 import com.goafanti.common.constant.ErrorConstants;
@@ -11,19 +9,15 @@ public class InputUser {
 	@Size(min = 0, max = 11, message = "{" + ErrorConstants.MOBILE_SIZE_ERROR + "}")
 	private String	mobile;
 
-	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	private Integer	type;
-
 	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	unitName;
 
 	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	password;
 
-	@Size(min = 0, max = 16, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 32, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	username;
-
+	
 	public String getMobile() {
 		return mobile;
 	}
@@ -32,14 +26,6 @@ public class InputUser {
 		this.mobile = mobile;
 	}
 
-	public Integer getType() {
-		return type;
-	}
-
-	public void setType(Integer type) {
-		this.type = type;
-	}
-
 	public String getUnitName() {
 		return unitName;
 	}
@@ -63,5 +49,4 @@ public class InputUser {
 	public void setUsername(String username) {
 		this.username = username;
 	}
-
 }

+ 1 - 1
src/main/java/com/goafanti/user/controller/UserLoginController.java

@@ -41,7 +41,7 @@ public class UserLoginController extends BaseController {
 	@Resource
 	private UserService userService;
 	@Resource
-	private AdminMapper			adminMapper;
+	private AdminMapper	adminMapper;
 	@Resource
 	private MessageService messageService;
 	

+ 12 - 41
src/main/java/com/goafanti/user/controller/UserRegisterController.java

@@ -22,6 +22,7 @@ import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseController;
+import com.goafanti.common.enums.UserAuthentication;
 import com.goafanti.common.enums.UserFields;
 import com.goafanti.common.enums.UserLevel;
 import com.goafanti.common.model.User;
@@ -64,6 +65,10 @@ public class UserRegisterController extends BaseController {
 					UserFields.getFieldDesc(bindingResult.getFieldError().getField())));
 			return res;
 		}
+		User u = userService.selectByNameAndType(user.getUsername().trim(), null);
+		if (null != u) {
+			res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "用户已存在"));
+		}
 		// 验证码15分钟有效
 		if (TimeUtils.checkOverTime("register")) {
 			res.getError().add(buildError(ErrorConstants.MCODE_OVERTIME_ERROR, "手机验证码超时失效"));
@@ -73,30 +78,11 @@ public class UserRegisterController extends BaseController {
 			res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "手机验证码错误"));
 			return res;
 		}
-		if (bindingResult.hasErrors()) {
-			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
-					bindingResult.getFieldError().getField()));
-			return res;
-		}
-		if(StringUtils.isBlank(user.getUsername())){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定", "用户名"));
-		}else if(null == user.getType()){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定", "用户类型"));
-		}else if (StringUtils.isBlank(user.getMobile())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定", "手机号码"));
-		} else if (StringUtils.isBlank(user.getPassword())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定", "密码"));
-		} else {
-			User u = userService.selectByMobieAndType(user.getMobile().trim(), user.getType());
-			if (null != u) {
-					res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "用户已存在"));
-			}
-		}
 		if (res.getError().isEmpty()) {
 			User us = new User();
 			us.setId(UUID.randomUUID().toString());
+			us.setUsername(user.getUsername().trim());
 			us.setMobile(user.getMobile().trim());
-			us.setType(user.getType());
 			us.setPassword(user.getPassword());
 			Calendar now = Calendar.getInstance();
 			now.set(Calendar.MILLISECOND, 0);
@@ -110,7 +96,8 @@ public class UserRegisterController extends BaseController {
 			us.setShareType(AFTConstants.USER_SHARE_PUBLIC);
 			us.setIdentifyName(StringUtils.isBlank(user.getUnitName())?"":user.getUnitName());
 			us.setLvl(UserLevel.GENERAL.getCode());
-			//us.setAid("0");
+			us.setAuthentication(UserAuthentication.UN_AUTHENTICATION.getCode());
+			us.setTransferTime(now.getTime());
 			userService.insertRegister(us,user.getUnitName(),user.getUsername());
 		}
 		return res;
@@ -132,6 +119,10 @@ public class UserRegisterController extends BaseController {
 					UserFields.getFieldDesc(bindingResult.getFieldError().getField())));
 			return res;
 		}
+		User u = userService.selectByNameAndType(user.getUsername().trim(), null);
+		if (null != u) {
+				res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "用户已存在"));
+		}
 		// 验证码15分钟有效
 		if (TimeUtils.checkOverTime("register")) {
 			res.getError().add(buildError(ErrorConstants.MCODE_OVERTIME_ERROR, "手机验证码超时失效"));
@@ -141,30 +132,10 @@ public class UserRegisterController extends BaseController {
 			res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "手机验证码错误"));
 			return res;
 		}
-		if (bindingResult.hasErrors()) {
-			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
-					bindingResult.getFieldError().getField()));
-			return res;
-		}
-		if(StringUtils.isBlank(user.getUsername())){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定", "用户名"));
-		}else if(null == user.getType()){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定", "用户类型"));
-		}else if (StringUtils.isBlank(user.getMobile())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定", "手机号码"));
-		} else if (StringUtils.isBlank(user.getPassword())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定", "密码"));
-		} else {
-			User u = userService.selectByMobieAndType(user.getMobile().trim(), user.getType());
-			if (null != u) {
-					res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "用户已存在"));
-			}
-		}
 		if (res.getError().isEmpty()) {
 			User us = new User();
 			us.setId(UUID.randomUUID().toString());
 			us.setMobile(user.getMobile().trim());
-			us.setType(user.getType());
 			us.setPassword(user.getPassword());
 			Calendar now = Calendar.getInstance();
 			now.set(Calendar.MILLISECOND, 0);

+ 2 - 0
src/main/java/com/goafanti/user/service/UserService.java

@@ -27,6 +27,8 @@ public interface UserService {
 	User insert(User user);
 
 	User selectByMobieAndType(String mobile, Integer type);
+	
+	User selectByNameAndType(String username, Integer type);
 
 	User insertRegister(User user, String unitName, String contacts);
 

+ 9 - 8
src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java

@@ -4,7 +4,6 @@ import java.text.ParseException;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.UUID;
 
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -22,9 +21,7 @@ import com.goafanti.common.dao.TechProjectMapper;
 import com.goafanti.common.dao.UserIdentityMapper;
 import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.enums.UserType;
-import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.User;
-import com.goafanti.common.model.UserIdentity;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -62,7 +59,7 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 	@Transactional
 	public User insertRegister(User user, String unitName, String userName) {
 		userMapper.insert(user);
-		if (null != user.getType() && UserType.ORGANIZATION.getCode().equals(user.getType())) {
+		/*if (null != user.getType() && UserType.ORGANIZATION.getCode().equals(user.getType())) {
 			OrganizationIdentity organizationIdentity = new OrganizationIdentity();
 			organizationIdentity.setUid(user.getId());
 			organizationIdentity.setUnitName(StringUtils.isBlank(unitName) ? "" : unitName);
@@ -84,8 +81,7 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 			ui.setWrongCount(0);
 			ui.setUsername(StringUtils.isBlank(userName) ? "" : userName);
 			userIdentityMapper.insert(ui);
-		}
-
+		}*/
 		return user;
 	}
 
@@ -95,6 +91,11 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 	}
 
 	@Override
+	public User selectByNameAndType(String username, Integer type){
+		return userMapper.selectByNameAndType(username,type);
+	}
+	
+	@Override
 	public User selectByPrimaryKey(String id) {
 		return userMapper.selectByPrimaryKey(id);
 	}
@@ -113,10 +114,10 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 	@Override
 	public UserPageHomeBo selectUserPageHomeBoByUserId(String uid) {
 		UserPageHomeBo bo = userMapper.selectUserPageHomeBoByUserId(uid);
-		bo.setPatentNum(patentInfoMapper.findPatentInfoNumByUid(uid));
+		/*bo.setPatentNum(patentInfoMapper.findPatentInfoNumByUid(uid));
 		bo.setCopyrightNum(copyrightInfoMapper.findCopyrightInfoNumByUid(uid));
 		bo.setTechProjectNum(techProjectMapper.findTechProjectNumByUid(uid));
-		bo.setIntellectualPropertyNum(orgIntellectualPropertyMapper.findIntellectualPropertyNum(uid));
+		bo.setIntellectualPropertyNum(orgIntellectualPropertyMapper.findIntellectualPropertyNum(uid));*/
 		return bo;
 	}
 

+ 2 - 6
src/main/webapp/WEB-INF/views/common.html

@@ -239,7 +239,7 @@
 						<div class="login_uesr">
 							<label for="uesname"><img
 								th:src="${portalHost+'/img/login_use.png'}" /></label> <input
-								type="text" name="mobile" id="Lo_user" placeholder="请输入手机号码" />
+								type="text" name="username" id="Lo_user" placeholder="请输入用户名" />
 							<img th:src="${portalHost+'/img/login_del.png'}" class="log_del" />
 						</div>
 						<div class="login_pass">
@@ -248,11 +248,7 @@
 								type="password" name="password" id="Lo_pass" placeholder="请输入密码" />
 						</div>
 						<div class="login_check">
-							<label for="checks" class="lab_check"> <input
-								type="checkbox" name="type" id="checks" value="0" />专家登录
-							</label> <label for="checkst" class="lab_checkno"> <input
-								type="checkbox" name="type" id="checkst" value="1" />企业登录
-							</label> <a href="">忘记密码?</a>
+							 <a href="">忘记密码?</a>
 						</div>
 						<input type="submit" value="登 陆" class="login_submit" />
 					</form>

File diff suppressed because it is too large
+ 17 - 32
src/main/webapp/WEB-INF/views/user/signIn.html