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