Merge branch 'test-training2' of https://git.code.tencent.com/lian-cbtc/rtss-server into test-training2-xzb1

This commit is contained in:
xzb 2022-10-19 17:07:34 +08:00
commit 4b43640085
5 changed files with 426 additions and 516 deletions

View File

@ -395,66 +395,6 @@ public class SysAccountExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andOrgIdIsNull() {
addCriterion("org_id is null");
return (Criteria) this;
}
public Criteria andOrgIdIsNotNull() {
addCriterion("org_id is not null");
return (Criteria) this;
}
public Criteria andOrgIdEqualTo(Long value) {
addCriterion("org_id =", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdNotEqualTo(Long value) {
addCriterion("org_id <>", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdGreaterThan(Long value) {
addCriterion("org_id >", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdGreaterThanOrEqualTo(Long value) {
addCriterion("org_id >=", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdLessThan(Long value) {
addCriterion("org_id <", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdLessThanOrEqualTo(Long value) {
addCriterion("org_id <=", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdIn(List<Long> values) {
addCriterion("org_id in", values, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdNotIn(List<Long> values) {
addCriterion("org_id not in", values, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdBetween(Long value1, Long value2) {
addCriterion("org_id between", value1, value2, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdNotBetween(Long value1, Long value2) {
addCriterion("org_id not between", value1, value2, "orgId");
return (Criteria) this;
}
public Criteria andNameIsNull() { public Criteria andNameIsNull() {
addCriterion("`name` is null"); addCriterion("`name` is null");
return (Criteria) this; return (Criteria) this;
@ -1547,6 +1487,7 @@ public class SysAccountExample {
} }
/** /**
*
*/ */
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {

View File

@ -85,6 +85,9 @@ public class SysUserService implements ISysUserService {
@Autowired @Autowired
private QRCodeManager qrCodeManager; private QRCodeManager qrCodeManager;
/**
* @update 20221019 删除账号查询逻辑去除绑定组织操作
*/
@Override @Override
public AccountVO findUserByAccountAndPassword(String account, String password, String project) { public AccountVO findUserByAccountAndPassword(String account, String password, String project) {
/* 先按手机号和邮箱查询 */ /* 先按手机号和邮箱查询 */
@ -92,8 +95,6 @@ public class SysUserService implements ISysUserService {
example.createCriteria().andMobileEqualTo(account).andPasswordEqualTo(password); // 手机号 example.createCriteria().andMobileEqualTo(account).andPasswordEqualTo(password); // 手机号
example.or().andEmailEqualTo(account).andPasswordEqualTo(password); // 邮箱 example.or().andEmailEqualTo(account).andPasswordEqualTo(password); // 邮箱
List<SysAccount> users = this.sysAccountDAO.selectByExample(example); List<SysAccount> users = this.sysAccountDAO.selectByExample(example);
Collection<Org> projectOrgs = iOrgService.findEntities(project, BusinessConsts.Org.Status.VALID);
Map<Long, Org> orgMap = projectOrgs.stream().collect(Collectors.toMap(Org::getId, Function.identity()));
AccountVO accountVO = null; AccountVO accountVO = null;
if (!CollectionUtils.isEmpty(users)) { if (!CollectionUtils.isEmpty(users)) {
accountVO = new AccountVO(users.get(0)); accountVO = new AccountVO(users.get(0));
@ -103,34 +104,10 @@ public class SysUserService implements ISysUserService {
example.clear(); example.clear();
example.createCriteria().andAccountEqualTo(account).andPasswordEqualTo(password); example.createCriteria().andAccountEqualTo(account).andPasswordEqualTo(password);
users = this.sysAccountDAO.selectByExample(example); users = this.sysAccountDAO.selectByExample(example);
for (SysAccount user : users) { //只能有一个账号符合条件 if (CollectionUtils.isEmpty(users)) {
if (user.getOrgId() == null) { throw BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.exception("账号信息异常");
if (accountVO != null) {
log.error("账号[{}]信息异常", account);
throw BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.exception("账号信息异常");
}
accountVO = new AccountVO(user);
} else {
Org org = orgMap.get(user.getOrgId());
if (org != null) { //该账号的组织包含在项目组织中
if (accountVO != null) {
log.error("账号[{}]信息异常", account);
throw BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.exception("账号信息异常");
}
accountVO = new AccountVO(user);
}
}
} }
} accountVO = new AccountVO(users.get(0));
if (accountVO != null) {
Org topOrg;
if (accountVO.getOrgId() != null) {
topOrg = iOrgService.getEntity(accountVO.getOrgId());
} else {
topOrg = iOrgService.findTopOrgOfUser(accountVO.getId());
}
/* 如果用户属于该顶级组织,设置相关属性 */
setOrgInfoOfThisOrg(topOrg, accountVO);
} }
return accountVO; return accountVO;
} }
@ -179,7 +156,7 @@ public class SysUserService implements ISysUserService {
@Override @Override
public SysAccount findEntity(@NonNull String account, long orgId) { public SysAccount findEntity(@NonNull String account, long orgId) {
SysAccountExample example = new SysAccountExample(); SysAccountExample example = new SysAccountExample();
example.createCriteria().andAccountEqualTo(account).andOrgIdEqualTo(orgId); example.createCriteria().andAccountEqualTo(account);
List<SysAccount> users = sysAccountDAO.selectByExample(example); List<SysAccount> users = sysAccountDAO.selectByExample(example);
if (CollectionUtils.isEmpty(users)) { if (CollectionUtils.isEmpty(users)) {
return null; return null;
@ -191,7 +168,7 @@ public class SysUserService implements ISysUserService {
@Override @Override
public boolean isExist(@NonNull String account, long orgId) { public boolean isExist(@NonNull String account, long orgId) {
SysAccountExample example = new SysAccountExample(); SysAccountExample example = new SysAccountExample();
example.createCriteria().andAccountEqualTo(account).andOrgIdEqualTo(orgId); example.createCriteria().andAccountEqualTo(account);
return sysAccountDAO.countByExample(example) > 0; return sysAccountDAO.countByExample(example) > 0;
} }

View File

@ -233,6 +233,9 @@ public class AuthenticateService implements IAuthenticateService {
} }
} }
/**
* @update 20221019 去除设置组织信息
*/
@Override @Override
public void wmConfirmClientLogin(String code, String state) { public void wmConfirmClientLogin(String code, String state) {
LoginScanParam param = LoginScanParam.parse(state); LoginScanParam param = LoginScanParam.parse(state);
@ -249,7 +252,7 @@ public class AuthenticateService implements IAuthenticateService {
LoginUserInfoVO loginUserInfo = new LoginUserInfoVO(user, loginStatusVo.getClient(), LoginUserInfoVO loginUserInfo = new LoginUserInfoVO(user, loginStatusVo.getClient(),
loginStatusVo.getProjectVO().name(), loginStatusVo.getDeviceVO()); loginStatusVo.getProjectVO().name(), loginStatusVo.getDeviceVO());
// 设置组织信息 // 设置组织信息
iSysUserService.setOrgInfoOfOrgRelWithTheProject(loginUserInfo.getProjectInfo().name(), user); // iSysUserService.setOrgInfoOfOrgRelWithTheProject(loginUserInfo.getProjectInfo().name(), user);
// 登陆 // 登陆
login(loginUserInfo, true); login(loginUserInfo, true);
// 更新登陆状态 // 更新登陆状态

View File

@ -463,12 +463,12 @@ public class OrgUserService implements IOrgUserService {
* @param topOrg 导入的组织所属的顶级组织 * @param topOrg 导入的组织所属的顶级组织
* @param orgId 要导入的组织 * @param orgId 要导入的组织
* @param orgUserIdSet 导入的组织当前已有的成员 * @param orgUserIdSet 导入的组织当前已有的成员
* @update 20221019 创建用户时去除组织ID account.setOrgId(topOrg.getId());
*/ */
private void importOrgUser(Org topOrg, Long orgId, Set<Long> orgUserIdSet, ImportOrgUserVO importOrgUser) { private void importOrgUser(Org topOrg, Long orgId, Set<Long> orgUserIdSet, ImportOrgUserVO importOrgUser) {
SysAccount user = iSysUserService.findEntity(importOrgUser.getAccount(), topOrg.getId()); SysAccount user = iSysUserService.findEntity(importOrgUser.getAccount(), topOrg.getId());
if (user == null) { if (user == null) {
SysAccount account = importOrgUser.convert2DB(); SysAccount account = importOrgUser.convert2DB();
account.setOrgId(topOrg.getId());
iSysUserService.createUser(account); iSysUserService.createUser(account);
create(orgId, account.getId(), BusinessConsts.OrgRole.Student); create(orgId, account.getId(), BusinessConsts.OrgRole.Student);
} else { } else {

View File

@ -1,465 +1,454 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!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="club.joylink.rtss.dao.SysAccountDAO"> <mapper namespace="club.joylink.rtss.dao.SysAccountDAO">
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.SysAccount"> <resultMap id="BaseResultMap" type="club.joylink.rtss.entity.SysAccount">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id"/>
<result column="account" jdbcType="VARCHAR" property="account" /> <result column="account" jdbcType="VARCHAR" property="account"/>
<result column="parent_account" jdbcType="VARCHAR" property="parentAccount" /> <result column="parent_account" jdbcType="VARCHAR" property="parentAccount"/>
<result column="type" jdbcType="VARCHAR" property="type" /> <result column="type" jdbcType="VARCHAR" property="type"/>
<result column="org_id" jdbcType="BIGINT" property="orgId" /> <result column="name" jdbcType="VARCHAR" property="name"/>
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="nickname" jdbcType="VARCHAR" property="nickname"/>
<result column="nickname" jdbcType="VARCHAR" property="nickname" /> <result column="avatar_path" jdbcType="VARCHAR" property="avatarPath"/>
<result column="avatar_path" jdbcType="VARCHAR" property="avatarPath" /> <result column="password" jdbcType="VARCHAR" property="password"/>
<result column="password" jdbcType="VARCHAR" property="password" /> <result column="mobile" jdbcType="VARCHAR" property="mobile"/>
<result column="mobile" jdbcType="VARCHAR" property="mobile" /> <result column="nationcode" jdbcType="VARCHAR" property="nationcode"/>
<result column="nationcode" jdbcType="VARCHAR" property="nationcode" /> <result column="email" jdbcType="VARCHAR" property="email"/>
<result column="email" jdbcType="VARCHAR" property="email" /> <result column="wx_id" jdbcType="VARCHAR" property="wxId"/>
<result column="wx_id" jdbcType="VARCHAR" property="wxId" /> <result column="wx_union_id" jdbcType="VARCHAR" property="wxUnionId"/>
<result column="wx_union_id" jdbcType="VARCHAR" property="wxUnionId" /> <result column="wm_open_id" jdbcType="VARCHAR" property="wmOpenId"/>
<result column="wm_open_id" jdbcType="VARCHAR" property="wmOpenId" /> <result column="status" jdbcType="VARCHAR" property="status"/>
<result column="status" jdbcType="VARCHAR" property="status" /> <result column="roles" jdbcType="VARCHAR" property="roles"/>
<result column="roles" jdbcType="VARCHAR" property="roles" /> <result column="source" jdbcType="VARCHAR" property="source"/>
<result column="source" jdbcType="VARCHAR" property="source" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="update_user_id" jdbcType="BIGINT" property="updateUserId"/>
<result column="update_user_id" jdbcType="BIGINT" property="updateUserId" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> </resultMap>
</resultMap> <sql id="Example_Where_Clause">
<sql id="Example_Where_Clause"> <where>
<where> <foreach collection="oredCriteria" item="criteria" separator="or">
<foreach collection="oredCriteria" item="criteria" separator="or"> <if test="criteria.valid">
<if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")">
<trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion">
<foreach collection="criteria.criteria" item="criterion"> <choose>
<choose> <when test="criterion.noValue">
<when test="criterion.noValue"> and ${criterion.condition}
and ${criterion.condition} </when>
</when> <when test="criterion.singleValue">
<when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value}
and ${criterion.condition} #{criterion.value} </when>
</when> <when test="criterion.betweenValue">
<when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when>
</when> <when test="criterion.listValue">
<when test="criterion.listValue"> and ${criterion.condition}
and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="("
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> separator=",">
#{listItem} #{listItem}
</foreach> </foreach>
</when> </when>
</choose> </choose>
</foreach>
</trim>
</if>
</foreach> </foreach>
</trim> </where>
</if> </sql>
</foreach> <sql id="Update_By_Example_Where_Clause">
</where> <where>
</sql> <foreach collection="example.oredCriteria" item="criteria" separator="or">
<sql id="Update_By_Example_Where_Clause"> <if test="criteria.valid">
<where> <trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="example.oredCriteria" item="criteria" separator="or"> <foreach collection="criteria.criteria" item="criterion">
<if test="criteria.valid"> <choose>
<trim prefix="(" prefixOverrides="and" suffix=")"> <when test="criterion.noValue">
<foreach collection="criteria.criteria" item="criterion"> and ${criterion.condition}
<choose> </when>
<when test="criterion.noValue"> <when test="criterion.singleValue">
and ${criterion.condition} and ${criterion.condition} #{criterion.value}
</when> </when>
<when test="criterion.singleValue"> <when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when> </when>
<when test="criterion.betweenValue"> <when test="criterion.listValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition}
</when> <foreach close=")" collection="criterion.value" item="listItem" open="("
<when test="criterion.listValue"> separator=",">
and ${criterion.condition} #{listItem}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> </foreach>
#{listItem} </when>
</foreach> </choose>
</when> </foreach>
</choose> </trim>
</if>
</foreach> </foreach>
</trim> </where>
</sql>
<sql id="Base_Column_List">
id, account, parent_account, `type`, `name`, nickname, avatar_path, `password`,
mobile, nationcode, email, wx_id, wx_union_id, wm_open_id, `status`, roles, `source`,
create_time, update_user_id, update_time
</sql>
<select id="selectByExample" parameterType="club.joylink.rtss.entity.SysAccountExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if> </if>
</foreach> <include refid="Base_Column_List"/>
</where> from sys_account
</sql> <if test="_parameter != null">
<sql id="Base_Column_List"> <include refid="Example_Where_Clause"/>
id, account, parent_account, `type`, org_id, `name`, nickname, avatar_path, `password`, </if>
mobile, nationcode, email, wx_id, wx_union_id, wm_open_id, `status`, roles, `source`, <if test="orderByClause != null">
create_time, update_user_id, update_time order by ${orderByClause}
</sql> </if>
<select id="selectByExample" parameterType="club.joylink.rtss.entity.SysAccountExample" resultMap="BaseResultMap"> <if test="limit != null">
select <if test="offset != null">
<if test="distinct"> limit ${offset}, ${limit}
distinct </if>
</if> <if test="offset == null">
<include refid="Base_Column_List" /> limit ${limit}
from sys_account </if>
<if test="_parameter != null"> </if>
<include refid="Example_Where_Clause" /> </select>
</if> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<if test="orderByClause != null"> select
order by ${orderByClause} <include refid="Base_Column_List"/>
</if> from sys_account
<if test="limit != null"> where id = #{id,jdbcType=BIGINT}
<if test="offset != null"> </select>
limit ${offset}, ${limit} <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
</if> delete from sys_account
<if test="offset == null"> where id = #{id,jdbcType=BIGINT}
limit ${limit} </delete>
</if> <delete id="deleteByExample" parameterType="club.joylink.rtss.entity.SysAccountExample">
</if> delete from sys_account
</select> <if test="_parameter != null">
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <include refid="Example_Where_Clause"/>
select </if>
<include refid="Base_Column_List" /> </delete>
from sys_account <insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.SysAccount"
where id = #{id,jdbcType=BIGINT} useGeneratedKeys="true">
</select> insert into sys_account (account, parent_account, `type`,
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> `name`, nickname,
delete from sys_account avatar_path, `password`, mobile,
where id = #{id,jdbcType=BIGINT} nationcode, email, wx_id,
</delete> wx_union_id, wm_open_id, `status`,
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.SysAccountExample"> roles, `source`, create_time,
delete from sys_account update_user_id, update_time)
<if test="_parameter != null"> values (#{account,jdbcType=VARCHAR}, #{parentAccount,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
<include refid="Example_Where_Clause" /> #{name,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR},
</if> #{avatarPath,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR},
</delete> #{nationcode,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{wxId,jdbcType=VARCHAR},
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.SysAccount" useGeneratedKeys="true"> #{wxUnionId,jdbcType=VARCHAR}, #{wmOpenId,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
insert into sys_account (account, parent_account, `type`, #{roles,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
org_id, `name`, nickname, #{updateUserId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP})
avatar_path, `password`, mobile, </insert>
nationcode, email, wx_id, <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.SysAccount"
wx_union_id, wm_open_id, `status`, useGeneratedKeys="true">
roles, `source`, create_time, insert into sys_account
update_user_id, update_time) <trim prefix="(" suffix=")" suffixOverrides=",">
values (#{account,jdbcType=VARCHAR}, #{parentAccount,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, <if test="account != null">
#{orgId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, account,
#{avatarPath,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, </if>
#{nationcode,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{wxId,jdbcType=VARCHAR}, <if test="parentAccount != null">
#{wxUnionId,jdbcType=VARCHAR}, #{wmOpenId,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, parent_account,
#{roles,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, </if>
#{updateUserId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}) <if test="type != null">
</insert> `type`,
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.SysAccount" useGeneratedKeys="true"> </if>
insert into sys_account <if test="name != null">
<trim prefix="(" suffix=")" suffixOverrides=","> `name`,
<if test="account != null"> </if>
account, <if test="nickname != null">
</if> nickname,
<if test="parentAccount != null"> </if>
parent_account, <if test="avatarPath != null">
</if> avatar_path,
<if test="type != null"> </if>
`type`, <if test="password != null">
</if> `password`,
<if test="orgId != null"> </if>
org_id, <if test="mobile != null">
</if> mobile,
<if test="name != null"> </if>
`name`, <if test="nationcode != null">
</if> nationcode,
<if test="nickname != null"> </if>
nickname, <if test="email != null">
</if> email,
<if test="avatarPath != null"> </if>
avatar_path, <if test="wxId != null">
</if> wx_id,
<if test="password != null"> </if>
`password`, <if test="wxUnionId != null">
</if> wx_union_id,
<if test="mobile != null"> </if>
mobile, <if test="wmOpenId != null">
</if> wm_open_id,
<if test="nationcode != null"> </if>
nationcode, <if test="status != null">
</if> `status`,
<if test="email != null"> </if>
email, <if test="roles != null">
</if> roles,
<if test="wxId != null"> </if>
wx_id, <if test="source != null">
</if> `source`,
<if test="wxUnionId != null"> </if>
wx_union_id, <if test="createTime != null">
</if> create_time,
<if test="wmOpenId != null"> </if>
wm_open_id, <if test="updateUserId != null">
</if> update_user_id,
<if test="status != null"> </if>
`status`, <if test="updateTime != null">
</if> update_time,
<if test="roles != null"> </if>
roles, </trim>
</if> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="source != null"> <if test="account != null">
`source`, #{account,jdbcType=VARCHAR},
</if> </if>
<if test="createTime != null"> <if test="parentAccount != null">
create_time, #{parentAccount,jdbcType=VARCHAR},
</if> </if>
<if test="updateUserId != null"> <if test="type != null">
update_user_id, #{type,jdbcType=VARCHAR},
</if> </if>
<if test="updateTime != null"> <if test="name != null">
update_time, #{name,jdbcType=VARCHAR},
</if> </if>
</trim> <if test="nickname != null">
<trim prefix="values (" suffix=")" suffixOverrides=","> #{nickname,jdbcType=VARCHAR},
<if test="account != null"> </if>
#{account,jdbcType=VARCHAR}, <if test="avatarPath != null">
</if> #{avatarPath,jdbcType=VARCHAR},
<if test="parentAccount != null"> </if>
#{parentAccount,jdbcType=VARCHAR}, <if test="password != null">
</if> #{password,jdbcType=VARCHAR},
<if test="type != null"> </if>
#{type,jdbcType=VARCHAR}, <if test="mobile != null">
</if> #{mobile,jdbcType=VARCHAR},
<if test="orgId != null"> </if>
#{orgId,jdbcType=BIGINT}, <if test="nationcode != null">
</if> #{nationcode,jdbcType=VARCHAR},
<if test="name != null"> </if>
#{name,jdbcType=VARCHAR}, <if test="email != null">
</if> #{email,jdbcType=VARCHAR},
<if test="nickname != null"> </if>
#{nickname,jdbcType=VARCHAR}, <if test="wxId != null">
</if> #{wxId,jdbcType=VARCHAR},
<if test="avatarPath != null"> </if>
#{avatarPath,jdbcType=VARCHAR}, <if test="wxUnionId != null">
</if> #{wxUnionId,jdbcType=VARCHAR},
<if test="password != null"> </if>
#{password,jdbcType=VARCHAR}, <if test="wmOpenId != null">
</if> #{wmOpenId,jdbcType=VARCHAR},
<if test="mobile != null"> </if>
#{mobile,jdbcType=VARCHAR}, <if test="status != null">
</if> #{status,jdbcType=VARCHAR},
<if test="nationcode != null"> </if>
#{nationcode,jdbcType=VARCHAR}, <if test="roles != null">
</if> #{roles,jdbcType=VARCHAR},
<if test="email != null"> </if>
#{email,jdbcType=VARCHAR}, <if test="source != null">
</if> #{source,jdbcType=VARCHAR},
<if test="wxId != null"> </if>
#{wxId,jdbcType=VARCHAR}, <if test="createTime != null">
</if> #{createTime,jdbcType=TIMESTAMP},
<if test="wxUnionId != null"> </if>
#{wxUnionId,jdbcType=VARCHAR}, <if test="updateUserId != null">
</if> #{updateUserId,jdbcType=BIGINT},
<if test="wmOpenId != null"> </if>
#{wmOpenId,jdbcType=VARCHAR}, <if test="updateTime != null">
</if> #{updateTime,jdbcType=TIMESTAMP},
<if test="status != null"> </if>
#{status,jdbcType=VARCHAR}, </trim>
</if> </insert>
<if test="roles != null"> <select id="countByExample" parameterType="club.joylink.rtss.entity.SysAccountExample" resultType="java.lang.Long">
#{roles,jdbcType=VARCHAR}, select count(*) from sys_account
</if> <if test="_parameter != null">
<if test="source != null"> <include refid="Example_Where_Clause"/>
#{source,jdbcType=VARCHAR}, </if>
</if> </select>
<if test="createTime != null"> <update id="updateByExampleSelective" parameterType="map">
#{createTime,jdbcType=TIMESTAMP}, update sys_account
</if> <set>
<if test="updateUserId != null"> <if test="record.id != null">
#{updateUserId,jdbcType=BIGINT}, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="updateTime != null"> <if test="record.account != null">
#{updateTime,jdbcType=TIMESTAMP}, account = #{record.account,jdbcType=VARCHAR},
</if> </if>
</trim> <if test="record.parentAccount != null">
</insert> parent_account = #{record.parentAccount,jdbcType=VARCHAR},
<select id="countByExample" parameterType="club.joylink.rtss.entity.SysAccountExample" resultType="java.lang.Long"> </if>
select count(*) from sys_account <if test="record.type != null">
<if test="_parameter != null"> `type` = #{record.type,jdbcType=VARCHAR},
<include refid="Example_Where_Clause" /> </if>
</if> <if test="record.name != null">
</select> `name` = #{record.name,jdbcType=VARCHAR},
<update id="updateByExampleSelective" parameterType="map"> </if>
update sys_account <if test="record.nickname != null">
<set> nickname = #{record.nickname,jdbcType=VARCHAR},
<if test="record.id != null"> </if>
id = #{record.id,jdbcType=BIGINT}, <if test="record.avatarPath != null">
</if> avatar_path = #{record.avatarPath,jdbcType=VARCHAR},
<if test="record.account != null"> </if>
<if test="record.password != null">
`password` = #{record.password,jdbcType=VARCHAR},
</if>
<if test="record.mobile != null">
mobile = #{record.mobile,jdbcType=VARCHAR},
</if>
<if test="record.nationcode != null">
nationcode = #{record.nationcode,jdbcType=VARCHAR},
</if>
<if test="record.email != null">
email = #{record.email,jdbcType=VARCHAR},
</if>
<if test="record.wxId != null">
wx_id = #{record.wxId,jdbcType=VARCHAR},
</if>
<if test="record.wxUnionId != null">
wx_union_id = #{record.wxUnionId,jdbcType=VARCHAR},
</if>
<if test="record.wmOpenId != null">
wm_open_id = #{record.wmOpenId,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
`status` = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.roles != null">
roles = #{record.roles,jdbcType=VARCHAR},
</if>
<if test="record.source != null">
`source` = #{record.source,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateUserId != null">
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByExample" parameterType="map">
update sys_account
set id = #{record.id,jdbcType=BIGINT},
account = #{record.account,jdbcType=VARCHAR}, account = #{record.account,jdbcType=VARCHAR},
</if>
<if test="record.parentAccount != null">
parent_account = #{record.parentAccount,jdbcType=VARCHAR}, parent_account = #{record.parentAccount,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
`type` = #{record.type,jdbcType=VARCHAR}, `type` = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.orgId != null">
org_id = #{record.orgId,jdbcType=BIGINT},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.nickname != null">
nickname = #{record.nickname,jdbcType=VARCHAR}, nickname = #{record.nickname,jdbcType=VARCHAR},
</if>
<if test="record.avatarPath != null">
avatar_path = #{record.avatarPath,jdbcType=VARCHAR}, avatar_path = #{record.avatarPath,jdbcType=VARCHAR},
</if>
<if test="record.password != null">
`password` = #{record.password,jdbcType=VARCHAR}, `password` = #{record.password,jdbcType=VARCHAR},
</if>
<if test="record.mobile != null">
mobile = #{record.mobile,jdbcType=VARCHAR}, mobile = #{record.mobile,jdbcType=VARCHAR},
</if>
<if test="record.nationcode != null">
nationcode = #{record.nationcode,jdbcType=VARCHAR}, nationcode = #{record.nationcode,jdbcType=VARCHAR},
</if>
<if test="record.email != null">
email = #{record.email,jdbcType=VARCHAR}, email = #{record.email,jdbcType=VARCHAR},
</if>
<if test="record.wxId != null">
wx_id = #{record.wxId,jdbcType=VARCHAR}, wx_id = #{record.wxId,jdbcType=VARCHAR},
</if>
<if test="record.wxUnionId != null">
wx_union_id = #{record.wxUnionId,jdbcType=VARCHAR}, wx_union_id = #{record.wxUnionId,jdbcType=VARCHAR},
</if>
<if test="record.wmOpenId != null">
wm_open_id = #{record.wmOpenId,jdbcType=VARCHAR}, wm_open_id = #{record.wmOpenId,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
`status` = #{record.status,jdbcType=VARCHAR}, `status` = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.roles != null">
roles = #{record.roles,jdbcType=VARCHAR}, roles = #{record.roles,jdbcType=VARCHAR},
</if>
<if test="record.source != null">
`source` = #{record.source,jdbcType=VARCHAR}, `source` = #{record.source,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateUserId != null">
update_user_id = #{record.updateUserId,jdbcType=BIGINT}, update_user_id = #{record.updateUserId,jdbcType=BIGINT},
</if> update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="record.updateTime != null"> <if test="_parameter != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, <include refid="Update_By_Example_Where_Clause"/>
</if> </if>
</set> </update>
<if test="_parameter != null"> <update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.SysAccount">
<include refid="Update_By_Example_Where_Clause" /> update sys_account
</if> <set>
</update> <if test="account != null">
<update id="updateByExample" parameterType="map"> account = #{account,jdbcType=VARCHAR},
update sys_account </if>
set id = #{record.id,jdbcType=BIGINT}, <if test="parentAccount != null">
account = #{record.account,jdbcType=VARCHAR}, parent_account = #{parentAccount,jdbcType=VARCHAR},
parent_account = #{record.parentAccount,jdbcType=VARCHAR}, </if>
`type` = #{record.type,jdbcType=VARCHAR}, <if test="type != null">
org_id = #{record.orgId,jdbcType=BIGINT}, `type` = #{type,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR}, </if>
nickname = #{record.nickname,jdbcType=VARCHAR}, <if test="name != null">
avatar_path = #{record.avatarPath,jdbcType=VARCHAR}, `name` = #{name,jdbcType=VARCHAR},
`password` = #{record.password,jdbcType=VARCHAR}, </if>
mobile = #{record.mobile,jdbcType=VARCHAR}, <if test="nickname != null">
nationcode = #{record.nationcode,jdbcType=VARCHAR}, nickname = #{nickname,jdbcType=VARCHAR},
email = #{record.email,jdbcType=VARCHAR}, </if>
wx_id = #{record.wxId,jdbcType=VARCHAR}, <if test="avatarPath != null">
wx_union_id = #{record.wxUnionId,jdbcType=VARCHAR}, avatar_path = #{avatarPath,jdbcType=VARCHAR},
wm_open_id = #{record.wmOpenId,jdbcType=VARCHAR}, </if>
`status` = #{record.status,jdbcType=VARCHAR}, <if test="password != null">
roles = #{record.roles,jdbcType=VARCHAR}, `password` = #{password,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=VARCHAR}, </if>
create_time = #{record.createTime,jdbcType=TIMESTAMP}, <if test="mobile != null">
update_user_id = #{record.updateUserId,jdbcType=BIGINT}, mobile = #{mobile,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP} </if>
<if test="_parameter != null"> <if test="nationcode != null">
<include refid="Update_By_Example_Where_Clause" /> nationcode = #{nationcode,jdbcType=VARCHAR},
</if> </if>
</update> <if test="email != null">
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.SysAccount"> email = #{email,jdbcType=VARCHAR},
update sys_account </if>
<set> <if test="wxId != null">
<if test="account != null"> wx_id = #{wxId,jdbcType=VARCHAR},
account = #{account,jdbcType=VARCHAR}, </if>
</if> <if test="wxUnionId != null">
<if test="parentAccount != null"> wx_union_id = #{wxUnionId,jdbcType=VARCHAR},
</if>
<if test="wmOpenId != null">
wm_open_id = #{wmOpenId,jdbcType=VARCHAR},
</if>
<if test="status != null">
`status` = #{status,jdbcType=VARCHAR},
</if>
<if test="roles != null">
roles = #{roles,jdbcType=VARCHAR},
</if>
<if test="source != null">
`source` = #{source,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateUserId != null">
update_user_id = #{updateUserId,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.SysAccount">
update sys_account
set account = #{account,jdbcType=VARCHAR},
parent_account = #{parentAccount,jdbcType=VARCHAR}, parent_account = #{parentAccount,jdbcType=VARCHAR},
</if>
<if test="type != null">
`type` = #{type,jdbcType=VARCHAR}, `type` = #{type,jdbcType=VARCHAR},
</if>
<if test="orgId != null">
org_id = #{orgId,jdbcType=BIGINT},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR}, `name` = #{name,jdbcType=VARCHAR},
</if>
<if test="nickname != null">
nickname = #{nickname,jdbcType=VARCHAR}, nickname = #{nickname,jdbcType=VARCHAR},
</if>
<if test="avatarPath != null">
avatar_path = #{avatarPath,jdbcType=VARCHAR}, avatar_path = #{avatarPath,jdbcType=VARCHAR},
</if>
<if test="password != null">
`password` = #{password,jdbcType=VARCHAR}, `password` = #{password,jdbcType=VARCHAR},
</if>
<if test="mobile != null">
mobile = #{mobile,jdbcType=VARCHAR}, mobile = #{mobile,jdbcType=VARCHAR},
</if>
<if test="nationcode != null">
nationcode = #{nationcode,jdbcType=VARCHAR}, nationcode = #{nationcode,jdbcType=VARCHAR},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR}, email = #{email,jdbcType=VARCHAR},
</if>
<if test="wxId != null">
wx_id = #{wxId,jdbcType=VARCHAR}, wx_id = #{wxId,jdbcType=VARCHAR},
</if>
<if test="wxUnionId != null">
wx_union_id = #{wxUnionId,jdbcType=VARCHAR}, wx_union_id = #{wxUnionId,jdbcType=VARCHAR},
</if>
<if test="wmOpenId != null">
wm_open_id = #{wmOpenId,jdbcType=VARCHAR}, wm_open_id = #{wmOpenId,jdbcType=VARCHAR},
</if>
<if test="status != null">
`status` = #{status,jdbcType=VARCHAR}, `status` = #{status,jdbcType=VARCHAR},
</if>
<if test="roles != null">
roles = #{roles,jdbcType=VARCHAR}, roles = #{roles,jdbcType=VARCHAR},
</if>
<if test="source != null">
`source` = #{source,jdbcType=VARCHAR}, `source` = #{source,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateUserId != null">
update_user_id = #{updateUserId,jdbcType=BIGINT}, update_user_id = #{updateUserId,jdbcType=BIGINT},
</if> update_time = #{updateTime,jdbcType=TIMESTAMP}
<if test="updateTime != null"> where id = #{id,jdbcType=BIGINT}
update_time = #{updateTime,jdbcType=TIMESTAMP}, </update>
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.SysAccount">
update sys_account
set account = #{account,jdbcType=VARCHAR},
parent_account = #{parentAccount,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
org_id = #{orgId,jdbcType=BIGINT},
`name` = #{name,jdbcType=VARCHAR},
nickname = #{nickname,jdbcType=VARCHAR},
avatar_path = #{avatarPath,jdbcType=VARCHAR},
`password` = #{password,jdbcType=VARCHAR},
mobile = #{mobile,jdbcType=VARCHAR},
nationcode = #{nationcode,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
wx_id = #{wxId,jdbcType=VARCHAR},
wx_union_id = #{wxUnionId,jdbcType=VARCHAR},
wm_open_id = #{wmOpenId,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
roles = #{roles,jdbcType=VARCHAR},
`source` = #{source,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_user_id = #{updateUserId,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper> </mapper>