| | |
| | | and bu.dispatch = #{user.dispatch} |
| | | </if> |
| | | </if> |
| | | <if test="user.isAvatar==1"> |
| | | and bu.avatar is not null and bu.avatar!="" |
| | | </if> |
| | | <if test="user.isAvatar==2"> |
| | | and (bu.avatar is null or bu.avatar="") |
| | | </if> |
| | | <if test="user.isFingerprint==1"> |
| | | and bu.fingerprint is not null and bu.fingerprint!="" |
| | | </if> |
| | | <if test="user.isFingerprint==2"> |
| | | and (bu.fingerprint is null or bu.fingerprint="") |
| | | </if> |
| | | <if test="user.userType!=null and user.userType != ''"> |
| | | and bu.user_type = #{user.userType} |
| | | </if> |
| | |
| | | <if test="user.cardid!=null and user.cardid != ''"> |
| | | and bu.cardid like concat('%', #{user.cardid},'%') |
| | | </if> |
| | | ORDER BY bu.id desc |
| | | <if test="user.sortName!=null and user.sortName!=''"> |
| | | ORDER BY bu.${user.sortName} ${user.sort},bu.id desc |
| | | </if> |
| | | <if test="user.sortName==null or user.sortName==''"> |
| | | ORDER BY bu.id desc |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectUserPage" resultMap="userResultMap"> |
| | |
| | | |
| | | <!--计算保安人员年龄--> |
| | | <select id="getUserAgeById" resultType="org.springblade.modules.system.vo.UserVO"> |
| | | select id,ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING(cardid,7,4),0) age,securitynumber,cardid |
| | | select id,real_name realName,ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING(cardid,7,4),0) age,securitynumber,cardid |
| | | from |
| | | blade_user |
| | | where |
| | |
| | | and bu.examination_type = #{user.examinationType} |
| | | </if> |
| | | </if> |
| | | <if test="user.isAvatar==1"> |
| | | and bu.avatar is not null and bu.avatar!="" |
| | | </if> |
| | | <if test="user.isAvatar==2"> |
| | | and (bu.avatar is null or bu.avatar="") |
| | | </if> |
| | | <if test="user.isFingerprint==1"> |
| | | and bu.fingerprint is not null and bu.fingerprint!="" |
| | | </if> |
| | | <if test="user.isFingerprint==2"> |
| | | and (bu.fingerprint is null or bu.fingerprint="") |
| | | </if> |
| | | <if test="user.account!=null and user.account != ''"> |
| | | and bu.account like concat('%', #{user.account},'%') |
| | | </if> |
| | |
| | | and bu.dispatch = 0 |
| | | and bu.id = #{id} |
| | | </select> |
| | | |
| | | <!-- 批量插入时将主键值设置到参数user的userId字段上 --> |
| | | <insert id="batchUserList" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into blade_user |
| | | (id, |
| | | tenant_id,account,password,name,real_name,avatar,email,phone,sex, |
| | | role_id,dept_id,cardid,nativePlace,nation,fingerprint,education, |
| | | politicaloutlook,healstats,height,address,registered,securitynumber, |
| | | hold,jurisdiction,examination_type,status,is_deleted,dispatch,create_time |
| | | ) |
| | | values |
| | | <foreach collection="list" item="user" separator=","> |
| | | (#{user.id}, |
| | | #{user.tenantId},#{user.account},#{user.password},#{user.name},#{user.realName},#{user.avatar},#{user.email},#{user.phone},#{user.sex}, |
| | | #{user.roleId},#{user.deptId},#{user.cardid},#{user.nativeplace},#{user.nation},#{user.fingerprint},#{user.education}, |
| | | #{user.politicaloutlook},#{user.healstats},#{user.height},#{user.address},#{user.registered},#{user.securitynumber}, |
| | | #{user.hold},#{user.jurisdiction},#{user.examinationType},#{user.status},#{user.isDeleted},#{user.dispatch},#{user.createTime} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <!-- 批量插入时将主键值设置到参数user的userId字段上 --> |
| | | <insert id="batchExperienceList" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into sys_experience |
| | | ( |
| | | name,post,entryTime,cardId,companyname,securityId |
| | | ) |
| | | values |
| | | <foreach collection="list" item="item" separator=","> |
| | | ( |
| | | #{item.name},#{item.post},#{item.entrytime},#{item.cardid},#{item.companyname},#{item.securityid} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | </mapper> |