Commit a8a472c7 by yuwei

项目初始化

parent 8d61ebb2
......@@ -20,7 +20,7 @@ import java.util.List;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_role")
@TableName(value = "sys_role", autoResultMap = true)
public class RoleEntity extends BaseEntity {
private static final long serialVersionUID=1L;
......
......@@ -21,7 +21,7 @@ import java.util.List;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value = "sys_user", resultMap = "BaseResultMap")
@TableName(value = "sys_user", autoResultMap = true)
public class UserEntity extends BaseEntity {
private static final long serialVersionUID=1L;
......
......@@ -2,7 +2,11 @@ package cn.datax.service.system.dao;
import cn.datax.common.base.BaseDao;
import cn.datax.service.system.api.entity.RoleEntity;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.io.Serializable;
......@@ -19,4 +23,7 @@ public interface RoleDao extends BaseDao<RoleEntity> {
@Override
RoleEntity selectById(Serializable id);
@Override
<E extends IPage<RoleEntity>> E selectPage(E page, @Param(Constants.WRAPPER) Wrapper<RoleEntity> queryWrapper);
}
......@@ -2,9 +2,14 @@ package cn.datax.service.system.dao;
import cn.datax.common.base.BaseDao;
import cn.datax.service.system.api.entity.UserEntity;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.io.Serializable;
/**
* <p>
* Mapper 接口
......@@ -17,4 +22,13 @@ import org.apache.ibatis.annotations.Param;
public interface UserDao extends BaseDao<UserEntity> {
void updateUserPassword(@Param("password") String passwordEncode, @Param("id")String id);
@Override
UserEntity selectById(Serializable id);
@Override
UserEntity selectOne(@Param(Constants.WRAPPER) Wrapper<UserEntity> queryWrapper);
@Override
<E extends IPage<UserEntity>> E selectPage(E page, @Param(Constants.WRAPPER) Wrapper<UserEntity> queryWrapper);
}
......@@ -14,6 +14,9 @@
<result column="data_scope" property="dataScope" />
<result column="status" property="status" />
<result column="remark" property="remark" />
</resultMap>
<resultMap id="ExtendResultMap" type="cn.datax.service.system.api.entity.RoleEntity" extends="BaseResultMap">
<collection property="depts" column="{roleId=id}" select="getDeptList"></collection>
<collection property="menus" column="{roleId=id}" select="getMenuList"></collection>
</resultMap>
......@@ -63,11 +66,18 @@
</if>
</select>
<select id="selectById" resultMap="BaseResultMap">
<select id="selectById" resultMap="ExtendResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM sys_role
WHERE 1 = 1 AND id = #{id}
</select>
<select id="selectPage" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"></include>
FROM sys_role
${ew.customSqlSegment}
</select>
</mapper>
......@@ -18,6 +18,9 @@
<result column="status" property="status" />
<result column="dept_id" property="deptId" />
<result column="remark" property="remark" />
</resultMap>
<resultMap id="ExtendResultMap" type="cn.datax.service.system.api.entity.UserEntity" extends="BaseResultMap">
<collection property="dept" column="{userId=id}" select="getDept"></collection>
<collection property="roles" column="{userId=id}" select="getRoleList"></collection>
<collection property="posts" column="{userId=id}" select="getPostList"></collection>
......@@ -75,4 +78,25 @@
AND up.user_id = #{userId}
</if>
</select>
<select id="selectById" resultMap="ExtendResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM sys_user
WHERE 1 = 1 AND id = #{id}
</select>
<select id="selectOne" resultMap="ExtendResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM sys_user
${ew.customSqlSegment}
</select>
<select id="selectPage" resultMap="ExtendResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM sys_user
${ew.customSqlSegment}
</select>
</mapper>
......@@ -64,7 +64,7 @@ export default {
this.$refs['form'].validate(valid => {
if (valid) {
const data = {
action: 'complete',
action: this.task.isDelegation ? 'resolve' : 'complete',
processInstanceId: this.task.processInstanceId,
taskId: this.task.id,
userId: '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment