提交修改
This commit is contained in:
parent
c7efd6a049
commit
56ce29ff30
@ -113,9 +113,11 @@ public class StaffEntity implements Serializable {
|
||||
*/
|
||||
private String jobNumber;
|
||||
|
||||
//审批的父亲节点 id
|
||||
private Long parentId;
|
||||
//0不是主管,1 是主管
|
||||
private Integer isMaster;
|
||||
|
||||
//密码
|
||||
private String password;
|
||||
//盐
|
||||
private String salt;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -188,8 +188,10 @@ public class SysLoginController extends AbstractController {
|
||||
}
|
||||
codeRecordEntity.setIsCheck(1);
|
||||
codeRecordService.updateById(codeRecordEntity);
|
||||
|
||||
//生成token,并保存到数据库
|
||||
R r = sysUserTokenService.createToken(user.getUserId());
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@ -102,4 +102,5 @@ public class SysUserEntity implements Serializable {
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
private int type ;// 0 表示系统用户,1 表示普通员工
|
||||
}
|
||||
|
||||
@ -26,7 +26,6 @@ import java.util.Date;
|
||||
@TableName("sys_user_token")
|
||||
public class SysUserTokenEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
//用户ID
|
||||
@TableId(type = IdType.INPUT)
|
||||
private Long userId;
|
||||
@ -36,5 +35,7 @@ public class SysUserTokenEntity implements Serializable {
|
||||
private Date expireTime;
|
||||
//更新时间
|
||||
private Date updateTime;
|
||||
// 0 表示系统用户,1 表示普通员工
|
||||
private int type ;
|
||||
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import java.util.Date;
|
||||
* 菜单权限表
|
||||
* </p>*业绩记录表
|
||||
* @author quyixiao
|
||||
* @since 2020-08-12
|
||||
* @since 2020-08-18
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -38,6 +38,12 @@ public class ResultRecord implements java.io.Serializable {
|
||||
private String remark;
|
||||
//员工id
|
||||
private Long staffId;
|
||||
//类型 ,1 表示提交目标,2 表示提交结果
|
||||
private Integer type;
|
||||
//在新建时的角色 id
|
||||
private Long initRoleId;
|
||||
//当前审批流转所在员工 id
|
||||
private Long currentFlowStaffId;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -188,6 +194,51 @@ public class ResultRecord implements java.io.Serializable {
|
||||
this.staffId = staffId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 类型 ,1 表示提交目标,2 表示提交结果
|
||||
* @return
|
||||
*/
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
/**
|
||||
* 类型 ,1 表示提交目标,2 表示提交结果
|
||||
* @param type
|
||||
*/
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* 在新建时的角色 id
|
||||
* @return
|
||||
*/
|
||||
public Long getInitRoleId() {
|
||||
return initRoleId;
|
||||
}
|
||||
/**
|
||||
* 在新建时的角色 id
|
||||
* @param initRoleId
|
||||
*/
|
||||
public void setInitRoleId(Long initRoleId) {
|
||||
this.initRoleId = initRoleId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前审批流转所在员工 id
|
||||
* @return
|
||||
*/
|
||||
public Long getCurrentFlowStaffId() {
|
||||
return currentFlowStaffId;
|
||||
}
|
||||
/**
|
||||
* 当前审批流转所在员工 id
|
||||
* @param currentFlowStaffId
|
||||
*/
|
||||
public void setCurrentFlowStaffId(Long currentFlowStaffId) {
|
||||
this.currentFlowStaffId = currentFlowStaffId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ResultRecord{" +
|
||||
@ -201,6 +252,9 @@ public class ResultRecord implements java.io.Serializable {
|
||||
",allScore=" + allScore +
|
||||
",remark=" + remark +
|
||||
",staffId=" + staffId +
|
||||
",type=" + type +
|
||||
",initRoleId=" + initRoleId +
|
||||
",currentFlowStaffId=" + currentFlowStaffId +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -54,26 +54,26 @@ public class OAuth2Realm extends AuthorizingRealm {
|
||||
|
||||
/**
|
||||
* 认证(登录时调用)
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
|
||||
String accessToken = (String) token.getPrincipal();
|
||||
|
||||
//根据accessToken,查询用户信息
|
||||
SysUserTokenEntity tokenEntity = shiroService.queryByToken(accessToken);
|
||||
//token失效
|
||||
if(tokenEntity == null || tokenEntity.getExpireTime().getTime() < System.currentTimeMillis()){
|
||||
throw new IncorrectCredentialsException("token失效,请重新登录");
|
||||
}
|
||||
|
||||
//查询用户信息
|
||||
SysUserEntity user = shiroService.queryUser(tokenEntity.getUserId());
|
||||
//账号锁定
|
||||
if(user.getStatus() == 0){
|
||||
throw new LockedAccountException("账号已被锁定,请联系管理员");
|
||||
}
|
||||
|
||||
SimpleAuthenticationInfo info = new SimpleAuthenticationInfo(user, accessToken, getName());
|
||||
return info;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -14,17 +14,17 @@
|
||||
<result column="all_score" property="allScore"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="staff_id" property="staffId"/>
|
||||
<result column="type" property="type"/>
|
||||
<result column="init_role_id" property="initRoleId"/>
|
||||
<result column="current_flow_staff_id" property="currentFlowStaffId"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, month_time AS monthTime, status AS status, last_score AS lastScore, all_score AS allScore, remark AS remark, staff_id AS staffId
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, month_time AS monthTime, status AS status, last_score AS lastScore, all_score AS allScore, remark AS remark, staff_id AS staffId, type AS type, init_role_id AS initRoleId, current_flow_staff_id AS currentFlowStaffId
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="selectResultRecordById" resultType="ResultRecord" >
|
||||
select * from lz_result_record where id=#{id} and is_delete = 0 limit 1
|
||||
</select>
|
||||
@ -38,6 +38,9 @@
|
||||
<if test="allScore != null">all_score, </if>
|
||||
<if test="remark != null">remark, </if>
|
||||
<if test="staffId != null">staff_id, </if>
|
||||
<if test="type != null">type, </if>
|
||||
<if test="initRoleId != null">init_role_id, </if>
|
||||
<if test="currentFlowStaffId != null">current_flow_staff_id, </if>
|
||||
is_delete,
|
||||
gmt_create,
|
||||
gmt_modified
|
||||
@ -48,6 +51,9 @@
|
||||
<if test="allScore != null">#{ allScore}, </if>
|
||||
<if test="remark != null">#{ remark}, </if>
|
||||
<if test="staffId != null">#{ staffId}, </if>
|
||||
<if test="type != null">#{ type}, </if>
|
||||
<if test="initRoleId != null">#{ initRoleId}, </if>
|
||||
<if test="currentFlowStaffId != null">#{ currentFlowStaffId}, </if>
|
||||
0,
|
||||
now(),
|
||||
now()
|
||||
@ -66,7 +72,10 @@
|
||||
<if test="lastScore != null">last_score = #{lastScore},</if>
|
||||
<if test="allScore != null">all_score = #{allScore},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="staffId != null">staff_id = #{staffId}</if>
|
||||
<if test="staffId != null">staff_id = #{staffId},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="initRoleId != null">init_role_id = #{initRoleId},</if>
|
||||
<if test="currentFlowStaffId != null">current_flow_staff_id = #{currentFlowStaffId}</if>
|
||||
</trim>
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
@ -84,7 +93,10 @@
|
||||
last_score = #{lastScore},
|
||||
all_score = #{allScore},
|
||||
remark = #{remark},
|
||||
staff_id = #{staffId}
|
||||
staff_id = #{staffId},
|
||||
type = #{type},
|
||||
init_role_id = #{initRoleId},
|
||||
current_flow_staff_id = #{currentFlowStaffId}
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
@ -25,11 +25,10 @@
|
||||
<result column="open_id" property="openId"/>
|
||||
<result column="employee_id" property="employeeId"/>
|
||||
<result column="union_id" property="unionId"/>
|
||||
<result column="parent_id" property="parentId"/>
|
||||
<result column="is_master" property="isMaster"/>
|
||||
<result property="avatar" column="avatar"/>
|
||||
<result property="jobNumber" column="job_number"/>
|
||||
|
||||
<result column="avatar" property="avatar"/>
|
||||
<result column="job_number" property="jobNumber"/>
|
||||
<result column="password" property="password"/>
|
||||
<result column="salt" property="salt"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
@ -65,8 +64,10 @@
|
||||
<if test="openId != null">open_id, </if>
|
||||
<if test="employeeId != null">employee_id, </if>
|
||||
<if test="unionId != null">union_id, </if>
|
||||
<if test="parentId != null">parent_id, </if>
|
||||
<if test="isMaster != null">is_master, </if>
|
||||
<if test="avatar != null">avatar, </if>
|
||||
<if test="jobNumber != null">job_number, </if>
|
||||
<if test="password != null">password, </if>
|
||||
<if test="salt != null">salt, </if>
|
||||
is_delete,
|
||||
create_time,
|
||||
update_time
|
||||
@ -87,8 +88,10 @@
|
||||
<if test="openId != null">#{ openId}, </if>
|
||||
<if test="employeeId != null">#{ employeeId}, </if>
|
||||
<if test="unionId != null">#{ unionId}, </if>
|
||||
<if test="parentId != null">#{ parentId}, </if>
|
||||
<if test="isMaster != null">#{ isMaster}, </if>
|
||||
<if test="avatar != null">#{ avatar}, </if>
|
||||
<if test="jobNumber != null">#{ jobNumber}, </if>
|
||||
<if test="password != null">#{ password}, </if>
|
||||
<if test="salt != null">#{ salt}, </if>
|
||||
0,
|
||||
now(),
|
||||
now()
|
||||
@ -118,8 +121,10 @@
|
||||
<if test="openId != null">open_id = #{openId},</if>
|
||||
<if test="employeeId != null">employee_id = #{employeeId},</if>
|
||||
<if test="unionId != null">union_id = #{unionId},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="isMaster != null">is_master = #{isMaster}</if>
|
||||
<if test="avatar != null">avatar = #{avatar},</if>
|
||||
<if test="jobNumber != null">job_number = #{jobNumber},</if>
|
||||
<if test="password != null">password = #{password},</if>
|
||||
<if test="salt != null">salt = #{salt}</if>
|
||||
</trim>
|
||||
,update_time = now()
|
||||
where id = #{id}
|
||||
@ -148,8 +153,10 @@
|
||||
open_id = #{openId},
|
||||
employee_id = #{employeeId},
|
||||
union_id = #{unionId},
|
||||
parent_id = #{parentId},
|
||||
is_master = #{isMaster}
|
||||
avatar = #{avatar},
|
||||
job_number = #{jobNumber},
|
||||
password = #{password},
|
||||
salt = #{salt}
|
||||
,update_time = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
@ -60,21 +60,12 @@ public class MysqlMain {
|
||||
file.mkdirs();
|
||||
}
|
||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||
list.add(new TablesBean("lz_flow"));
|
||||
list.add(new TablesBean("lz_flow_department"));
|
||||
list.add(new TablesBean("lz_flow_record"));
|
||||
list.add(new TablesBean("lz_flow_relation"));
|
||||
list.add(new TablesBean("lz_record_auth"));
|
||||
list.add(new TablesBean("lz_record_role"));
|
||||
list.add(new TablesBean("lz_record_role_auth"));
|
||||
list.add(new TablesBean("lz_staff_role"));
|
||||
list.add(new TablesBean("lz_staff_role_department"));
|
||||
|
||||
list.add(new TablesBean("third_app_config"));
|
||||
list.add(new TablesBean("lz_staff"));
|
||||
list.add(new TablesBean("lz_result_record"));
|
||||
|
||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
TablesBean obj = list.get(i);
|
||||
String tableName = list.get(i).getTableName();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user