feat(消息模块与部门模块): 修改了消息模块的bug并从新建消息接口中独立出添加附件接口,部门模块新添加了部门树返回接口
This commit is contained in:
parent
8706f58ebb
commit
13372326c0
@ -1,4 +1,4 @@
|
|||||||
package com.zsc.edu.gateway.framework;
|
package com.zsc.edu.gateway.common.util;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.*;
|
import java.util.function.*;
|
@ -1,21 +0,0 @@
|
|||||||
package com.zsc.edu.gateway.framework;
|
|
||||||
|
|
||||||
import org.springframework.http.HttpStatus;
|
|
||||||
|
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author harry yao
|
|
||||||
*/
|
|
||||||
public class JsonExceptionUtil {
|
|
||||||
public static Map<String, Object> jsonExceptionResult(HttpStatus code, String message, String path) {
|
|
||||||
Map<String, Object> exceptionMap = new LinkedHashMap<>();
|
|
||||||
exceptionMap.put("timestamp", Calendar.getInstance().getTime());
|
|
||||||
exceptionMap.put("message", message);
|
|
||||||
exceptionMap.put("path", path);
|
|
||||||
exceptionMap.put("code", code.value());
|
|
||||||
return exceptionMap;
|
|
||||||
}
|
|
||||||
}
|
|
@ -2,6 +2,7 @@ package com.zsc.edu.gateway.modules.system.entity;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.zsc.edu.gateway.modules.system.vo.UserVo;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@ -47,6 +48,9 @@ public class Dept extends BaseEntity {
|
|||||||
private Boolean enabled = true;
|
private Boolean enabled = true;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
public List<Dept> children = new ArrayList<>(0);
|
public List<Dept> children = null;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
public List<UserVo> members = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package com.zsc.edu.gateway.modules.system.service.impl;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.zsc.edu.gateway.exception.ConstraintException;
|
import com.zsc.edu.gateway.exception.ConstraintException;
|
||||||
import com.zsc.edu.gateway.framework.TreeUtil;
|
import com.zsc.edu.gateway.common.util.TreeUtil;
|
||||||
import com.zsc.edu.gateway.modules.system.dto.DeptDto;
|
import com.zsc.edu.gateway.modules.system.dto.DeptDto;
|
||||||
import com.zsc.edu.gateway.modules.system.entity.Dept;
|
import com.zsc.edu.gateway.modules.system.entity.Dept;
|
||||||
import com.zsc.edu.gateway.modules.system.mapper.DeptMapper;
|
import com.zsc.edu.gateway.modules.system.mapper.DeptMapper;
|
||||||
|
@ -8,30 +8,20 @@
|
|||||||
<result column="pid" property="pid"/>
|
<result column="pid" property="pid"/>
|
||||||
<result column="name" property="name"/>
|
<result column="name" property="name"/>
|
||||||
<result column="dept_sort" property="deptSort"/>
|
<result column="dept_sort" property="deptSort"/>
|
||||||
<result column="enabled" property="enabled"/>
|
<collection property="members" ofType="com.zsc.edu.gateway.modules.system.vo.UserVo">
|
||||||
<result column="create_by" property="createBy"/>
|
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||||
<result column="update_by" property="updateBy"/>
|
<result column="username" jdbcType="VARCHAR" property="username"/>
|
||||||
<result column="create_time" property="createTime"/>
|
<result column="email" jdbcType="VARCHAR" property="email"/>
|
||||||
<result column="update_time" property="updateTime"/>
|
<result column="phone" jdbcType="VARCHAR" property="phone"/>
|
||||||
<result column="remark" property="remark"/>
|
<result column="name" jdbcType="INTEGER" property="name"/>
|
||||||
<collection property="children" ofType="com.zsc.edu.gateway.modules.system.entity.Dept">
|
<result column="avatar" jdbcType="VARCHAR" property="avatar"/>
|
||||||
<id column="id" property="id"/>
|
|
||||||
<result column="sub_count" property="subCount"/>
|
|
||||||
<result column="pid" property="pid"/>
|
|
||||||
<result column="name" property="name"/>
|
|
||||||
<result column="dept_sort" property="deptSort"/>
|
|
||||||
<result column="enabled" property="enabled"/>
|
|
||||||
<result column="create_by" property="createBy"/>
|
|
||||||
<result column="update_by" property="updateBy"/>
|
|
||||||
<result column="create_time" property="createTime"/>
|
|
||||||
<result column="update_time" property="updateTime"/>
|
|
||||||
<result column="remark" property="remark"/>
|
|
||||||
</collection>
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectDeptTree" resultMap="deptMap">
|
<select id="selectDeptTree" resultMap="deptMap">
|
||||||
SELECT sd.*
|
SELECT sd.*, su.*
|
||||||
FROM sys_dept sd
|
FROM sys_dept sd
|
||||||
left join sys_dept d on sd.id = d.pid
|
left join sys_dept d on sd.id = d.pid
|
||||||
|
left join sys_user su on sd.id = su.dept_id
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user