sys_user添加app_user_id,好区分用户对照
This commit is contained in:
@@ -543,6 +543,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
// 构建系统用户
|
||||
SysUser sysUser = buildSysUser(appUser);
|
||||
// 插入系统用户
|
||||
sysUser.setAppUserId(appUser.getUserId());
|
||||
appUserMapper.insertSysUser(sysUser);
|
||||
// 关联用户角色
|
||||
roleMap.put("userId", sysUser.getUserId());
|
||||
|
||||
@@ -645,10 +645,13 @@ public class ESJobSearchImpl implements IESJobSearchService
|
||||
wrapper.and(x->x.like(ESJobDocument::getJobLocation,jobQuery.getJobLocation()));
|
||||
}
|
||||
if(!StringUtil.isEmptyOrNull(jobQuery.getRegionCode())){
|
||||
wrapper.and(x->x.like(ESJobDocument::getRegionCode,jobQuery.getRegionCode()));
|
||||
wrapper.and(x->x.eq(ESJobDocument::getRegionCode,jobQuery.getRegionCode()));
|
||||
}
|
||||
if(!StringUtil.isEmptyOrNull(jobQuery.getStaffType())){
|
||||
wrapper.and(x->x.like(ESJobDocument::getStaffType,jobQuery.getStaffType()));
|
||||
wrapper.and(x->x.eq(ESJobDocument::getStaffType,jobQuery.getStaffType()));
|
||||
}
|
||||
if(!StringUtil.isEmptyOrNull(jobQuery.getJobStatus())){
|
||||
wrapper.and(x->x.eq(ESJobDocument::getJobStatus,jobQuery.getJobStatus()));
|
||||
}
|
||||
if(Objects.nonNull(jobQuery.getOrder())){
|
||||
if (jobQuery.getOrder()==2){
|
||||
|
||||
@@ -90,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="idCard != null and idCard != ''">id_card,</if>
|
||||
<if test="appUserId != null">app_user_id,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
@@ -105,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="idCard != null and idCard != ''">#{idCard},</if>
|
||||
<if test="appUserId != null">#{appUserId},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.ruoyi.common.core.domain.entity;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
@@ -73,6 +75,9 @@ public class SysUser extends BaseEntity
|
||||
@Excel(name = "身份证/信用代码")
|
||||
private String idCard;
|
||||
|
||||
@ApiModelProperty("移动端用户id")
|
||||
private Long appUserId;
|
||||
|
||||
/** 部门对象 */
|
||||
@Excels({
|
||||
@Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
|
||||
@@ -308,6 +313,14 @@ public class SysUser extends BaseEntity
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public Long getAppUserId() {
|
||||
return appUserId;
|
||||
}
|
||||
|
||||
public void setAppUserId(Long appUserId) {
|
||||
this.appUserId = appUserId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@@ -331,6 +344,7 @@ public class SysUser extends BaseEntity
|
||||
.append("remark", getRemark())
|
||||
.append("dept", getDept())
|
||||
.append("idCard", getIdCard())
|
||||
.append("appUserId", getAppUserId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,18 +178,23 @@ public class OauthLoginHlwService {
|
||||
appUserParm.setIdCard(wwTyInfo.getEnterprisecode());
|
||||
appUserParm.setName(wwTyInfo.getEnterprisename());
|
||||
}
|
||||
newUser.setPassword(SecurityUtils.encryptPassword("123456"));
|
||||
newUser.setDelFlag("0");
|
||||
newUser.setUserName(localUsername);
|
||||
sysUserService.insertUser(newUser);
|
||||
//插入app_user
|
||||
Long appUserId=null;
|
||||
AppUser appUser=appUserService.selectAppuserByIdcard(wwTyInfo.getIdno());
|
||||
if(appUser!=null){
|
||||
appUserParm.setUserId(appUser.getUserId());
|
||||
appUserService.updateAppUser(appUserParm);
|
||||
appUserId=appUser.getUserId();
|
||||
}else{
|
||||
appUserService.insertAppUser(appUserParm);
|
||||
int i=appUserService.insertAppUser(appUserParm);
|
||||
appUserId=appUserParm.getUserId();
|
||||
}
|
||||
//查询系统用户
|
||||
newUser.setPassword(SecurityUtils.encryptPassword("123456"));
|
||||
newUser.setDelFlag("0");
|
||||
newUser.setUserName(localUsername);
|
||||
newUser.setAppUserId(appUserId);
|
||||
sysUserService.insertUser(newUser);
|
||||
return newUser;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="idCard" column="id_card" />
|
||||
<result property="appUserId" column="app_user_id" />
|
||||
<association property="dept" javaType="SysDept" resultMap="deptResult" />
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||
</resultMap>
|
||||
@@ -170,6 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="idCard != null and idCard != ''">id_card,</if>
|
||||
<if test="appUserId != null">app_user_id,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
@@ -185,6 +187,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="idCard != null and idCard != ''">#{idCard},</if>
|
||||
<if test="appUserId != null">#{appUserId},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
Reference in New Issue
Block a user