新增wx_user属性

master
yz 1 year ago
parent 2fcc7fc623
commit 7146b60e08

@ -25,7 +25,7 @@ public class AuthenticationService implements UserDetailsService {
JwtUser jwtUser = new JwtUser(); JwtUser jwtUser = new JwtUser();
jwtUser.setUsername(user.getUsername()); jwtUser.setUsername(user.getUsername());
jwtUser.setPassword(user.getPassword()); jwtUser.setPassword(user.getPassword());
jwtUser.setUserId(user.getId()); jwtUser.setUserId(user.getUserid());
jwtUser.setName(user.getName()); jwtUser.setName(user.getName());
jwtUser.setRoleId(user.getRoleId()); jwtUser.setRoleId(user.getRoleId());
return jwtUser; return jwtUser;

@ -45,7 +45,7 @@ public class UserController {
try{ try{
password = RsaUtil.decryptByPrivateKey(passwordEncode); password = RsaUtil.decryptByPrivateKey(passwordEncode);
}catch (Exception e){ }catch (Exception e){
return new ResultEntity(HttpStatus.BAD_REQUEST, "密码错误"); return new ResultEntity(HttpStatus.BAD_REQUEST, "密码错误");
} }
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, password); UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, password);
Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken); Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken);

@ -2,24 +2,34 @@ package com.sztzjy.fund_investment.entity;
import java.util.Date; import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
/** /**
* *
* @author * @author xcj
* wx_user * wx_user
*/ */
@ApiModel("用户")
public class User { public class User {
@ApiModelProperty("用户id") @ApiModelProperty("用户id")
private String id; private String userid;
@ApiModelProperty("用户名称") @ApiModelProperty("用户名称")
private String name; private String name;
@ApiModelProperty("学号")
private String studentId;
@ApiModelProperty("班级名称")
private String className;
@ApiModelProperty("班级ID")
private String classId;
@ApiModelProperty("登录名") @ApiModelProperty("登录名")
private String username; private String username;
@ApiModelProperty("登录密码")
private String password;
@ApiModelProperty("电话号码") @ApiModelProperty("电话号码")
private String phone; private String phone;
@ -29,15 +39,18 @@ public class User {
@ApiModelProperty("创建日期") @ApiModelProperty("创建日期")
private Date createTime; private Date createTime;
@ApiModelProperty("登录密码") @ApiModelProperty("学校ID")
private String password; private String schoolId;
public String getId() { @ApiModelProperty("学校名称")
return id; private String schoolName;
public String getUserid() {
return userid;
} }
public void setId(String id) { public void setUserid(String userid) {
this.id = id == null ? null : id.trim(); this.userid = userid == null ? null : userid.trim();
} }
public String getName() { public String getName() {
@ -48,6 +61,30 @@ public class User {
this.name = name == null ? null : name.trim(); this.name = name == null ? null : name.trim();
} }
public String getStudentId() {
return studentId;
}
public void setStudentId(String studentId) {
this.studentId = studentId == null ? null : studentId.trim();
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className == null ? null : className.trim();
}
public String getClassId() {
return classId;
}
public void setClassId(String classId) {
this.classId = classId == null ? null : classId.trim();
}
public String getUsername() { public String getUsername() {
return username; return username;
} }
@ -56,6 +93,14 @@ public class User {
this.username = username == null ? null : username.trim(); this.username = username == null ? null : username.trim();
} }
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password == null ? null : password.trim();
}
public String getPhone() { public String getPhone() {
return phone; return phone;
} }
@ -80,11 +125,19 @@ public class User {
this.createTime = createTime; this.createTime = createTime;
} }
public String getPassword() { public String getSchoolId() {
return password; return schoolId;
} }
public void setPassword(String password) { public void setSchoolId(String schoolId) {
this.password = password == null ? null : password.trim(); this.schoolId = schoolId == null ? null : schoolId.trim();
}
public String getSchoolName() {
return schoolName;
}
public void setSchoolName(String schoolName) {
this.schoolName = schoolName == null ? null : schoolName.trim();
} }
} }

@ -105,73 +105,73 @@ public class UserExample {
criteria.add(new Criterion(condition, value1, value2)); criteria.add(new Criterion(condition, value1, value2));
} }
public Criteria andIdIsNull() { public Criteria andUseridIsNull() {
addCriterion("id is null"); addCriterion("userid is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdIsNotNull() { public Criteria andUseridIsNotNull() {
addCriterion("id is not null"); addCriterion("userid is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdEqualTo(String value) { public Criteria andUseridEqualTo(String value) {
addCriterion("id =", value, "id"); addCriterion("userid =", value, "userid");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotEqualTo(String value) { public Criteria andUseridNotEqualTo(String value) {
addCriterion("id <>", value, "id"); addCriterion("userid <>", value, "userid");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdGreaterThan(String value) { public Criteria andUseridGreaterThan(String value) {
addCriterion("id >", value, "id"); addCriterion("userid >", value, "userid");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdGreaterThanOrEqualTo(String value) { public Criteria andUseridGreaterThanOrEqualTo(String value) {
addCriterion("id >=", value, "id"); addCriterion("userid >=", value, "userid");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdLessThan(String value) { public Criteria andUseridLessThan(String value) {
addCriterion("id <", value, "id"); addCriterion("userid <", value, "userid");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdLessThanOrEqualTo(String value) { public Criteria andUseridLessThanOrEqualTo(String value) {
addCriterion("id <=", value, "id"); addCriterion("userid <=", value, "userid");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdLike(String value) { public Criteria andUseridLike(String value) {
addCriterion("id like", value, "id"); addCriterion("userid like", value, "userid");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotLike(String value) { public Criteria andUseridNotLike(String value) {
addCriterion("id not like", value, "id"); addCriterion("userid not like", value, "userid");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdIn(List<String> values) { public Criteria andUseridIn(List<String> values) {
addCriterion("id in", values, "id"); addCriterion("userid in", values, "userid");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotIn(List<String> values) { public Criteria andUseridNotIn(List<String> values) {
addCriterion("id not in", values, "id"); addCriterion("userid not in", values, "userid");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdBetween(String value1, String value2) { public Criteria andUseridBetween(String value1, String value2) {
addCriterion("id between", value1, value2, "id"); addCriterion("userid between", value1, value2, "userid");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotBetween(String value1, String value2) { public Criteria andUseridNotBetween(String value1, String value2) {
addCriterion("id not between", value1, value2, "id"); addCriterion("userid not between", value1, value2, "userid");
return (Criteria) this; return (Criteria) this;
} }
@ -245,6 +245,216 @@ public class UserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStudentIdIsNull() {
addCriterion("student_id is null");
return (Criteria) this;
}
public Criteria andStudentIdIsNotNull() {
addCriterion("student_id is not null");
return (Criteria) this;
}
public Criteria andStudentIdEqualTo(String value) {
addCriterion("student_id =", value, "studentId");
return (Criteria) this;
}
public Criteria andStudentIdNotEqualTo(String value) {
addCriterion("student_id <>", value, "studentId");
return (Criteria) this;
}
public Criteria andStudentIdGreaterThan(String value) {
addCriterion("student_id >", value, "studentId");
return (Criteria) this;
}
public Criteria andStudentIdGreaterThanOrEqualTo(String value) {
addCriterion("student_id >=", value, "studentId");
return (Criteria) this;
}
public Criteria andStudentIdLessThan(String value) {
addCriterion("student_id <", value, "studentId");
return (Criteria) this;
}
public Criteria andStudentIdLessThanOrEqualTo(String value) {
addCriterion("student_id <=", value, "studentId");
return (Criteria) this;
}
public Criteria andStudentIdLike(String value) {
addCriterion("student_id like", value, "studentId");
return (Criteria) this;
}
public Criteria andStudentIdNotLike(String value) {
addCriterion("student_id not like", value, "studentId");
return (Criteria) this;
}
public Criteria andStudentIdIn(List<String> values) {
addCriterion("student_id in", values, "studentId");
return (Criteria) this;
}
public Criteria andStudentIdNotIn(List<String> values) {
addCriterion("student_id not in", values, "studentId");
return (Criteria) this;
}
public Criteria andStudentIdBetween(String value1, String value2) {
addCriterion("student_id between", value1, value2, "studentId");
return (Criteria) this;
}
public Criteria andStudentIdNotBetween(String value1, String value2) {
addCriterion("student_id not between", value1, value2, "studentId");
return (Criteria) this;
}
public Criteria andClassNameIsNull() {
addCriterion("class_name is null");
return (Criteria) this;
}
public Criteria andClassNameIsNotNull() {
addCriterion("class_name is not null");
return (Criteria) this;
}
public Criteria andClassNameEqualTo(String value) {
addCriterion("class_name =", value, "className");
return (Criteria) this;
}
public Criteria andClassNameNotEqualTo(String value) {
addCriterion("class_name <>", value, "className");
return (Criteria) this;
}
public Criteria andClassNameGreaterThan(String value) {
addCriterion("class_name >", value, "className");
return (Criteria) this;
}
public Criteria andClassNameGreaterThanOrEqualTo(String value) {
addCriterion("class_name >=", value, "className");
return (Criteria) this;
}
public Criteria andClassNameLessThan(String value) {
addCriterion("class_name <", value, "className");
return (Criteria) this;
}
public Criteria andClassNameLessThanOrEqualTo(String value) {
addCriterion("class_name <=", value, "className");
return (Criteria) this;
}
public Criteria andClassNameLike(String value) {
addCriterion("class_name like", value, "className");
return (Criteria) this;
}
public Criteria andClassNameNotLike(String value) {
addCriterion("class_name not like", value, "className");
return (Criteria) this;
}
public Criteria andClassNameIn(List<String> values) {
addCriterion("class_name in", values, "className");
return (Criteria) this;
}
public Criteria andClassNameNotIn(List<String> values) {
addCriterion("class_name not in", values, "className");
return (Criteria) this;
}
public Criteria andClassNameBetween(String value1, String value2) {
addCriterion("class_name between", value1, value2, "className");
return (Criteria) this;
}
public Criteria andClassNameNotBetween(String value1, String value2) {
addCriterion("class_name not between", value1, value2, "className");
return (Criteria) this;
}
public Criteria andClassIdIsNull() {
addCriterion("class_id is null");
return (Criteria) this;
}
public Criteria andClassIdIsNotNull() {
addCriterion("class_id is not null");
return (Criteria) this;
}
public Criteria andClassIdEqualTo(String value) {
addCriterion("class_id =", value, "classId");
return (Criteria) this;
}
public Criteria andClassIdNotEqualTo(String value) {
addCriterion("class_id <>", value, "classId");
return (Criteria) this;
}
public Criteria andClassIdGreaterThan(String value) {
addCriterion("class_id >", value, "classId");
return (Criteria) this;
}
public Criteria andClassIdGreaterThanOrEqualTo(String value) {
addCriterion("class_id >=", value, "classId");
return (Criteria) this;
}
public Criteria andClassIdLessThan(String value) {
addCriterion("class_id <", value, "classId");
return (Criteria) this;
}
public Criteria andClassIdLessThanOrEqualTo(String value) {
addCriterion("class_id <=", value, "classId");
return (Criteria) this;
}
public Criteria andClassIdLike(String value) {
addCriterion("class_id like", value, "classId");
return (Criteria) this;
}
public Criteria andClassIdNotLike(String value) {
addCriterion("class_id not like", value, "classId");
return (Criteria) this;
}
public Criteria andClassIdIn(List<String> values) {
addCriterion("class_id in", values, "classId");
return (Criteria) this;
}
public Criteria andClassIdNotIn(List<String> values) {
addCriterion("class_id not in", values, "classId");
return (Criteria) this;
}
public Criteria andClassIdBetween(String value1, String value2) {
addCriterion("class_id between", value1, value2, "classId");
return (Criteria) this;
}
public Criteria andClassIdNotBetween(String value1, String value2) {
addCriterion("class_id not between", value1, value2, "classId");
return (Criteria) this;
}
public Criteria andUsernameIsNull() { public Criteria andUsernameIsNull() {
addCriterion("username is null"); addCriterion("username is null");
return (Criteria) this; return (Criteria) this;
@ -315,6 +525,76 @@ public class UserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordIsNull() {
addCriterion("password is null");
return (Criteria) this;
}
public Criteria andPasswordIsNotNull() {
addCriterion("password is not null");
return (Criteria) this;
}
public Criteria andPasswordEqualTo(String value) {
addCriterion("password =", value, "password");
return (Criteria) this;
}
public Criteria andPasswordNotEqualTo(String value) {
addCriterion("password <>", value, "password");
return (Criteria) this;
}
public Criteria andPasswordGreaterThan(String value) {
addCriterion("password >", value, "password");
return (Criteria) this;
}
public Criteria andPasswordGreaterThanOrEqualTo(String value) {
addCriterion("password >=", value, "password");
return (Criteria) this;
}
public Criteria andPasswordLessThan(String value) {
addCriterion("password <", value, "password");
return (Criteria) this;
}
public Criteria andPasswordLessThanOrEqualTo(String value) {
addCriterion("password <=", value, "password");
return (Criteria) this;
}
public Criteria andPasswordLike(String value) {
addCriterion("password like", value, "password");
return (Criteria) this;
}
public Criteria andPasswordNotLike(String value) {
addCriterion("password not like", value, "password");
return (Criteria) this;
}
public Criteria andPasswordIn(List<String> values) {
addCriterion("password in", values, "password");
return (Criteria) this;
}
public Criteria andPasswordNotIn(List<String> values) {
addCriterion("password not in", values, "password");
return (Criteria) this;
}
public Criteria andPasswordBetween(String value1, String value2) {
addCriterion("password between", value1, value2, "password");
return (Criteria) this;
}
public Criteria andPasswordNotBetween(String value1, String value2) {
addCriterion("password not between", value1, value2, "password");
return (Criteria) this;
}
public Criteria andPhoneIsNull() { public Criteria andPhoneIsNull() {
addCriterion("phone is null"); addCriterion("phone is null");
return (Criteria) this; return (Criteria) this;
@ -505,73 +785,143 @@ public class UserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordIsNull() { public Criteria andSchoolIdIsNull() {
addCriterion("password is null"); addCriterion("school_id is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordIsNotNull() { public Criteria andSchoolIdIsNotNull() {
addCriterion("password is not null"); addCriterion("school_id is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordEqualTo(String value) { public Criteria andSchoolIdEqualTo(String value) {
addCriterion("password =", value, "password"); addCriterion("school_id =", value, "schoolId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordNotEqualTo(String value) { public Criteria andSchoolIdNotEqualTo(String value) {
addCriterion("password <>", value, "password"); addCriterion("school_id <>", value, "schoolId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordGreaterThan(String value) { public Criteria andSchoolIdGreaterThan(String value) {
addCriterion("password >", value, "password"); addCriterion("school_id >", value, "schoolId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordGreaterThanOrEqualTo(String value) { public Criteria andSchoolIdGreaterThanOrEqualTo(String value) {
addCriterion("password >=", value, "password"); addCriterion("school_id >=", value, "schoolId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordLessThan(String value) { public Criteria andSchoolIdLessThan(String value) {
addCriterion("password <", value, "password"); addCriterion("school_id <", value, "schoolId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordLessThanOrEqualTo(String value) { public Criteria andSchoolIdLessThanOrEqualTo(String value) {
addCriterion("password <=", value, "password"); addCriterion("school_id <=", value, "schoolId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordLike(String value) { public Criteria andSchoolIdLike(String value) {
addCriterion("password like", value, "password"); addCriterion("school_id like", value, "schoolId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordNotLike(String value) { public Criteria andSchoolIdNotLike(String value) {
addCriterion("password not like", value, "password"); addCriterion("school_id not like", value, "schoolId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordIn(List<String> values) { public Criteria andSchoolIdIn(List<String> values) {
addCriterion("password in", values, "password"); addCriterion("school_id in", values, "schoolId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordNotIn(List<String> values) { public Criteria andSchoolIdNotIn(List<String> values) {
addCriterion("password not in", values, "password"); addCriterion("school_id not in", values, "schoolId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordBetween(String value1, String value2) { public Criteria andSchoolIdBetween(String value1, String value2) {
addCriterion("password between", value1, value2, "password"); addCriterion("school_id between", value1, value2, "schoolId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPasswordNotBetween(String value1, String value2) { public Criteria andSchoolIdNotBetween(String value1, String value2) {
addCriterion("password not between", value1, value2, "password"); addCriterion("school_id not between", value1, value2, "schoolId");
return (Criteria) this;
}
public Criteria andSchoolNameIsNull() {
addCriterion("school_name is null");
return (Criteria) this;
}
public Criteria andSchoolNameIsNotNull() {
addCriterion("school_name is not null");
return (Criteria) this;
}
public Criteria andSchoolNameEqualTo(String value) {
addCriterion("school_name =", value, "schoolName");
return (Criteria) this;
}
public Criteria andSchoolNameNotEqualTo(String value) {
addCriterion("school_name <>", value, "schoolName");
return (Criteria) this;
}
public Criteria andSchoolNameGreaterThan(String value) {
addCriterion("school_name >", value, "schoolName");
return (Criteria) this;
}
public Criteria andSchoolNameGreaterThanOrEqualTo(String value) {
addCriterion("school_name >=", value, "schoolName");
return (Criteria) this;
}
public Criteria andSchoolNameLessThan(String value) {
addCriterion("school_name <", value, "schoolName");
return (Criteria) this;
}
public Criteria andSchoolNameLessThanOrEqualTo(String value) {
addCriterion("school_name <=", value, "schoolName");
return (Criteria) this;
}
public Criteria andSchoolNameLike(String value) {
addCriterion("school_name like", value, "schoolName");
return (Criteria) this;
}
public Criteria andSchoolNameNotLike(String value) {
addCriterion("school_name not like", value, "schoolName");
return (Criteria) this;
}
public Criteria andSchoolNameIn(List<String> values) {
addCriterion("school_name in", values, "schoolName");
return (Criteria) this;
}
public Criteria andSchoolNameNotIn(List<String> values) {
addCriterion("school_name not in", values, "schoolName");
return (Criteria) this;
}
public Criteria andSchoolNameBetween(String value1, String value2) {
addCriterion("school_name between", value1, value2, "schoolName");
return (Criteria) this;
}
public Criteria andSchoolNameNotBetween(String value1, String value2) {
addCriterion("school_name not between", value1, value2, "schoolName");
return (Criteria) this; return (Criteria) this;
} }
} }

@ -6,15 +6,13 @@ import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper @Mapper
public interface UserMapper { public interface UserMapper {
long countByExample(UserExample example); long countByExample(UserExample example);
int deleteByExample(UserExample example); int deleteByExample(UserExample example);
int deleteByPrimaryKey(String id); int deleteByPrimaryKey(String userid);
int insert(User record); int insert(User record);
@ -22,7 +20,7 @@ public interface UserMapper {
List<User> selectByExample(UserExample example); List<User> selectByExample(UserExample example);
User selectByPrimaryKey(String id); User selectByPrimaryKey(String userid);
int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example); int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

@ -134,8 +134,8 @@ public class TzApi {
if (dataNode.isArray()) { if (dataNode.isArray()) {
for (JsonNode node : dataNode) { for (JsonNode node : dataNode) {
Map<String, Object> dataMap = new HashMap<>(); Map<String, Object> dataMap = new HashMap<>();
dataMap.put("id", node.get("id").asText()); dataMap.put("id", node.get("classid").asText());
dataMap.put("name", node.get("name").asText()); dataMap.put("name", node.get("classname").asText());
dataList.add(dataMap); dataList.add(dataMap);
} }
} }

@ -2,13 +2,18 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.fund_investment.mapper.UserMapper"> <mapper namespace="com.sztzjy.fund_investment.mapper.UserMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.fund_investment.entity.User"> <resultMap id="BaseResultMap" type="com.sztzjy.fund_investment.entity.User">
<id column="id" jdbcType="VARCHAR" property="id" /> <id column="userid" jdbcType="VARCHAR" property="userid" />
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="name" jdbcType="VARCHAR" property="name" />
<result column="student_id" jdbcType="VARCHAR" property="studentId" />
<result column="class_name" jdbcType="VARCHAR" property="className" />
<result column="class_id" jdbcType="VARCHAR" property="classId" />
<result column="username" jdbcType="VARCHAR" property="username" /> <result column="username" jdbcType="VARCHAR" property="username" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="phone" jdbcType="VARCHAR" property="phone" /> <result column="phone" jdbcType="VARCHAR" property="phone" />
<result column="role_id" jdbcType="INTEGER" property="roleId" /> <result column="role_id" jdbcType="INTEGER" property="roleId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="password" jdbcType="VARCHAR" property="password" /> <result column="school_id" jdbcType="VARCHAR" property="schoolId" />
<result column="school_name" jdbcType="VARCHAR" property="schoolName" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -69,7 +74,8 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, name, username, phone, role_id, create_time, password userid, name, student_id, class_name, class_id, username, password, phone, role_id,
create_time, school_id, school_name
</sql> </sql>
<select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.UserExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.UserExample" resultMap="BaseResultMap">
select select
@ -86,14 +92,14 @@
</if> </if>
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from wx_user from wx_user
where id = #{id,jdbcType=VARCHAR} where userid = #{userid,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from wx_user delete from wx_user
where id = #{id,jdbcType=VARCHAR} where userid = #{userid,jdbcType=VARCHAR}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.sztzjy.fund_investment.entity.UserExample"> <delete id="deleteByExample" parameterType="com.sztzjy.fund_investment.entity.UserExample">
delete from wx_user delete from wx_user
@ -102,25 +108,41 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.sztzjy.fund_investment.entity.User"> <insert id="insert" parameterType="com.sztzjy.fund_investment.entity.User">
insert into wx_user (id, name, username, insert into wx_user (userid, name, student_id,
phone, role_id, create_time, class_name, class_id, username,
password) password, phone, role_id,
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, create_time, school_id, school_name
#{phone,jdbcType=VARCHAR}, #{roleId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, )
#{password,jdbcType=VARCHAR}) values (#{userid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{studentId,jdbcType=VARCHAR},
#{className,jdbcType=VARCHAR}, #{classId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{roleId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{schoolId,jdbcType=VARCHAR}, #{schoolName,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.sztzjy.fund_investment.entity.User"> <insert id="insertSelective" parameterType="com.sztzjy.fund_investment.entity.User">
insert into wx_user insert into wx_user
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="userid != null">
id, userid,
</if> </if>
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
<if test="studentId != null">
student_id,
</if>
<if test="className != null">
class_name,
</if>
<if test="classId != null">
class_id,
</if>
<if test="username != null"> <if test="username != null">
username, username,
</if> </if>
<if test="password != null">
password,
</if>
<if test="phone != null"> <if test="phone != null">
phone, phone,
</if> </if>
@ -130,20 +152,35 @@
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="password != null"> <if test="schoolId != null">
password, school_id,
</if>
<if test="schoolName != null">
school_name,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="userid != null">
#{id,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR},
</if> </if>
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
<if test="studentId != null">
#{studentId,jdbcType=VARCHAR},
</if>
<if test="className != null">
#{className,jdbcType=VARCHAR},
</if>
<if test="classId != null">
#{classId,jdbcType=VARCHAR},
</if>
<if test="username != null"> <if test="username != null">
#{username,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
</if> </if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="phone != null"> <if test="phone != null">
#{phone,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
</if> </if>
@ -153,8 +190,11 @@
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="password != null"> <if test="schoolId != null">
#{password,jdbcType=VARCHAR}, #{schoolId,jdbcType=VARCHAR},
</if>
<if test="schoolName != null">
#{schoolName,jdbcType=VARCHAR},
</if> </if>
</trim> </trim>
</insert> </insert>
@ -167,15 +207,27 @@
<update id="updateByExampleSelective" parameterType="map"> <update id="updateByExampleSelective" parameterType="map">
update wx_user update wx_user
<set> <set>
<if test="record.id != null"> <if test="record.userid != null">
id = #{record.id,jdbcType=VARCHAR}, userid = #{record.userid,jdbcType=VARCHAR},
</if> </if>
<if test="record.name != null"> <if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR},
</if> </if>
<if test="record.studentId != null">
student_id = #{record.studentId,jdbcType=VARCHAR},
</if>
<if test="record.className != null">
class_name = #{record.className,jdbcType=VARCHAR},
</if>
<if test="record.classId != null">
class_id = #{record.classId,jdbcType=VARCHAR},
</if>
<if test="record.username != null"> <if test="record.username != null">
username = #{record.username,jdbcType=VARCHAR}, username = #{record.username,jdbcType=VARCHAR},
</if> </if>
<if test="record.password != null">
password = #{record.password,jdbcType=VARCHAR},
</if>
<if test="record.phone != null"> <if test="record.phone != null">
phone = #{record.phone,jdbcType=VARCHAR}, phone = #{record.phone,jdbcType=VARCHAR},
</if> </if>
@ -185,8 +237,11 @@
<if test="record.createTime != null"> <if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.password != null"> <if test="record.schoolId != null">
password = #{record.password,jdbcType=VARCHAR}, school_id = #{record.schoolId,jdbcType=VARCHAR},
</if>
<if test="record.schoolName != null">
school_name = #{record.schoolName,jdbcType=VARCHAR},
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
@ -195,13 +250,18 @@
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update wx_user update wx_user
set id = #{record.id,jdbcType=VARCHAR}, set userid = #{record.userid,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR},
username = #{record.username,jdbcType=VARCHAR}, student_id = #{record.studentId,jdbcType=VARCHAR},
phone = #{record.phone,jdbcType=VARCHAR}, class_name = #{record.className,jdbcType=VARCHAR},
role_id = #{record.roleId,jdbcType=INTEGER}, class_id = #{record.classId,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}, username = #{record.username,jdbcType=VARCHAR},
password = #{record.password,jdbcType=VARCHAR} password = #{record.password,jdbcType=VARCHAR},
phone = #{record.phone,jdbcType=VARCHAR},
role_id = #{record.roleId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
school_id = #{record.schoolId,jdbcType=VARCHAR},
school_name = #{record.schoolName,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -212,9 +272,21 @@
<if test="name != null"> <if test="name != null">
name = #{name,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR},
</if> </if>
<if test="studentId != null">
student_id = #{studentId,jdbcType=VARCHAR},
</if>
<if test="className != null">
class_name = #{className,jdbcType=VARCHAR},
</if>
<if test="classId != null">
class_id = #{classId,jdbcType=VARCHAR},
</if>
<if test="username != null"> <if test="username != null">
username = #{username,jdbcType=VARCHAR}, username = #{username,jdbcType=VARCHAR},
</if> </if>
<if test="password != null">
password = #{password,jdbcType=VARCHAR},
</if>
<if test="phone != null"> <if test="phone != null">
phone = #{phone,jdbcType=VARCHAR}, phone = #{phone,jdbcType=VARCHAR},
</if> </if>
@ -224,20 +296,28 @@
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="password != null"> <if test="schoolId != null">
password = #{password,jdbcType=VARCHAR}, school_id = #{schoolId,jdbcType=VARCHAR},
</if>
<if test="schoolName != null">
school_name = #{schoolName,jdbcType=VARCHAR},
</if> </if>
</set> </set>
where id = #{id,jdbcType=VARCHAR} where userid = #{userid,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.fund_investment.entity.User"> <update id="updateByPrimaryKey" parameterType="com.sztzjy.fund_investment.entity.User">
update wx_user update wx_user
set name = #{name,jdbcType=VARCHAR}, set name = #{name,jdbcType=VARCHAR},
username = #{username,jdbcType=VARCHAR}, student_id = #{studentId,jdbcType=VARCHAR},
phone = #{phone,jdbcType=VARCHAR}, class_name = #{className,jdbcType=VARCHAR},
role_id = #{roleId,jdbcType=INTEGER}, class_id = #{classId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}, username = #{username,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR} password = #{password,jdbcType=VARCHAR},
where id = #{id,jdbcType=VARCHAR} phone = #{phone,jdbcType=VARCHAR},
role_id = #{roleId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
school_id = #{schoolId,jdbcType=VARCHAR},
school_name = #{schoolName,jdbcType=VARCHAR}
where userid = #{userid,jdbcType=VARCHAR}
</update> </update>
</mapper> </mapper>
Loading…
Cancel
Save