Merge remote-tracking branch 'origin/master'
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
package com.jero.modules.FeignClient;
|
||||
|
||||
import com.jero.modules.system.vo.OcrVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @date 2021/12/8 14:53
|
||||
* @auth zhn
|
||||
*/
|
||||
@FeignClient(value = "local-tool")
|
||||
public interface LocalToolFeignClient {
|
||||
|
||||
@RequestMapping(value = "/local-tool/ocr/handleFile",method = RequestMethod.POST,headers = {"content-type=application/json"})
|
||||
ResponseEntity<String> getFile(@RequestBody OcrVO ocrVO);
|
||||
}
|
||||
+57
-24
@@ -1,11 +1,11 @@
|
||||
package com.jero.modules.system.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
@@ -13,6 +13,9 @@ import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.modules.system.entity.SysAnnouncementSend;
|
||||
import com.jero.modules.system.model.AnnouncementSendModel;
|
||||
import com.jero.modules.system.service.ISysAnnouncementSendService;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -23,14 +26,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
@@ -39,13 +39,15 @@ import lombok.extern.slf4j.Slf4j;
|
||||
* @Date: 2019-02-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
|
||||
@Api(tags="消息")
|
||||
@RestController
|
||||
@RequestMapping("/sys/sysAnnouncementSend")
|
||||
@Slf4j
|
||||
public class SysAnnouncementSendController {
|
||||
@Autowired
|
||||
private ISysAnnouncementSendService sysAnnouncementSendService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* @param sysAnnouncementSend
|
||||
@@ -81,7 +83,7 @@ public class SysAnnouncementSendController {
|
||||
result.setResult(pageList);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param sysAnnouncementSend
|
||||
@@ -99,7 +101,7 @@ public class SysAnnouncementSendController {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param sysAnnouncementSend
|
||||
@@ -118,10 +120,10 @@ public class SysAnnouncementSendController {
|
||||
result.success("修改成功!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
* @param id
|
||||
@@ -139,10 +141,10 @@ public class SysAnnouncementSendController {
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
@@ -159,7 +161,7 @@ public class SysAnnouncementSendController {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
* @param id
|
||||
@@ -177,7 +179,7 @@ public class SysAnnouncementSendController {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @功能:更新用户系统消息阅读状态
|
||||
* @param json
|
||||
@@ -198,7 +200,7 @@ public class SysAnnouncementSendController {
|
||||
result.setSuccess(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @功能:获取我的消息
|
||||
* @return
|
||||
@@ -239,4 +241,35 @@ public class SysAnnouncementSendController {
|
||||
result.setMessage("全部已读");
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @功能:标记已读
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/read")
|
||||
public Result<SysAnnouncementSend> read(String ids) {
|
||||
Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>();
|
||||
List<SysAnnouncementSend> list = new ArrayList<>();
|
||||
for (String id : ids.split(",")) {
|
||||
SysAnnouncementSend sysAnnouncementSend = new SysAnnouncementSend();
|
||||
sysAnnouncementSend.setId(id);
|
||||
sysAnnouncementSend.setReadFlag("1");
|
||||
list.add(sysAnnouncementSend);
|
||||
}
|
||||
sysAnnouncementSendService.updateBatchById(list);
|
||||
result.setSuccess(true);
|
||||
result.setMessage("标记已读");
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* @功能:查询所有的未读消息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getMessageUnreadList")
|
||||
public Result<?> getMessageUnreadList() {
|
||||
Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>();
|
||||
List<AnnouncementSendModel> messageUnreadList = sysAnnouncementSendService.getMessageUnreadList();
|
||||
result.OK(messageUnreadList);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -38,6 +38,11 @@ public class SysAnnouncement implements Serializable {
|
||||
*/
|
||||
@Excel(name = "内容", width = 30)
|
||||
private java.lang.String msgContent;
|
||||
|
||||
/**
|
||||
* 详细内容
|
||||
*/
|
||||
private java.lang.String msgContentInfo;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@@ -63,7 +68,7 @@ public class SysAnnouncement implements Serializable {
|
||||
@Excel(name = "优先级", width = 15, dicCode = "priority")
|
||||
@Dict(dicCode = "priority")
|
||||
private java.lang.String priority;
|
||||
|
||||
|
||||
/**
|
||||
* 消息类型1:通知公告2:系统消息
|
||||
*/
|
||||
@@ -144,4 +149,8 @@ public class SysAnnouncement implements Serializable {
|
||||
* 摘要
|
||||
*/
|
||||
private java.lang.String msgAbstract;
|
||||
/**
|
||||
* 文档id
|
||||
*/
|
||||
private java.lang.String documentId;
|
||||
}
|
||||
|
||||
+1
-2
@@ -76,8 +76,7 @@ public class SysCategory implements Serializable,Comparable<SysCategory>{
|
||||
private java.lang.String description;
|
||||
|
||||
/**是否为标签内容-数据字典(1是 0否)*/
|
||||
@Excel(name = "是否为标签内容-数据字典(1是 0否)", width = 15, dicText = "is_tag_dict", dicCode = "is_tag_dict")
|
||||
@Dict(dictTable = "onl_cgform_field", dicText = "is_tag_dict", dicCode = "is_tag_dict")
|
||||
@Excel(name = "是否为标签内容-数据字典(1是 0否)", width = 15)
|
||||
@ApiModelProperty(value = "是否为标签内容-数据字典(1是 0否)")
|
||||
private java.lang.Integer isTagDict;
|
||||
|
||||
|
||||
+1
-2
@@ -91,8 +91,7 @@ public class SysDict implements Serializable {
|
||||
/**
|
||||
* 是否为标签内容-数据字典(1是 0否)
|
||||
*/
|
||||
@Excel(name = "是否为标签内容-数据字典(1是 0否)", width = 15)/*, dicText = "is_tag_dict", dicCode = "is_tag_dict")
|
||||
@Dict(dictTable = "onl_cgform_field", dicText = "is_tag_dict", dicCode = "is_tag_dict")*/
|
||||
@Excel(name = "是否为标签内容-数据字典(1是 0否)", width = 15)
|
||||
@ApiModelProperty(value = "是否为标签内容-数据字典(1是 0否)")
|
||||
private java.lang.Integer isTagDict;
|
||||
|
||||
|
||||
+4
-2
@@ -22,10 +22,12 @@ public interface SysAnnouncementSendMapper extends BaseMapper<SysAnnouncementSen
|
||||
/**
|
||||
* @功能:获取我的消息
|
||||
* @param announcementSendModel
|
||||
* @param pageSize
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param pageNo
|
||||
* @return
|
||||
*/
|
||||
public List<AnnouncementSendModel> getMyAnnouncementSendList(Page<AnnouncementSendModel> page,@Param("announcementSendModel") AnnouncementSendModel announcementSendModel);
|
||||
|
||||
public List<AnnouncementSendModel> getMessageUnreadList(@Param("userId") String userId);
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -50,4 +50,11 @@ public interface SysDepartMapper extends BaseMapper<SysDepart> {
|
||||
*/
|
||||
List<String> getSubDepIdsByOrgCodes(@org.apache.ibatis.annotations.Param("orgCodes") String[] orgCodes);
|
||||
|
||||
/**
|
||||
* 更新所有组织的父节点id
|
||||
* @return
|
||||
*/
|
||||
@Select("UPDATE sys_depart t1 JOIN sys_depart t2 ON t1.parent_code = t2.org_code SET t1.parent_id = t2.id")
|
||||
int updateAllParentId();
|
||||
|
||||
}
|
||||
|
||||
+8
-8
@@ -1,21 +1,19 @@
|
||||
package com.jero.modules.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.ResultType;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.common.system.vo.DictQuery;
|
||||
import com.jero.modules.system.entity.SysDict;
|
||||
import com.jero.modules.system.model.DuplicateCheckVo;
|
||||
import com.jero.modules.system.model.TreeSelectModel;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -49,6 +47,8 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
|
||||
|
||||
public String queryDictTextByKey(@Param("code") String code,@Param("key") String key);
|
||||
|
||||
public String queryDictKeyByText(@Param("code") String code,@Param("text") String key);
|
||||
|
||||
@Deprecated
|
||||
public String queryTableDictTextByKey(@Param("table") String table,@Param("text") String text,@Param("code") String code,@Param("key") String key);
|
||||
|
||||
|
||||
+11
-5
@@ -27,6 +27,12 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
||||
* @return
|
||||
*/
|
||||
public SysUser getUserByName(@Param("username") String username);
|
||||
/**
|
||||
* 通过用户账号查询用户信息(批量)
|
||||
* @param usernames
|
||||
* @return
|
||||
*/
|
||||
public List<SysUser> getUserListByNames(@Param("usernames") String usernames);
|
||||
|
||||
/**
|
||||
* 根据部门Id查询用户信息
|
||||
@@ -58,22 +64,22 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
||||
* @return
|
||||
*/
|
||||
IPage<SysUser> getUserByRoleId(Page page, @Param("roleId") String roleId, @Param("username") String username);
|
||||
|
||||
|
||||
/**
|
||||
* 根据用户名设置部门ID
|
||||
* @param username
|
||||
* @param departId
|
||||
*/
|
||||
void updateUserDepart(@Param("username") String username,@Param("orgCode") String orgCode);
|
||||
|
||||
|
||||
/**
|
||||
* 根据手机号查询用户信息
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
public SysUser getUserByPhone(@Param("phone") String phone);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据邮箱查询用户信息
|
||||
* @param email
|
||||
@@ -132,7 +138,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
||||
|
||||
/** 更新空字符串为null【此写法有sql注入风险,禁止随便用】 */
|
||||
int updateNullByEmptyString(@Param("fieldName") String fieldName);
|
||||
|
||||
|
||||
/**
|
||||
* 根据部门Ids,查询部门下用户信息
|
||||
* @param departIds
|
||||
|
||||
+9
-7
@@ -6,6 +6,7 @@
|
||||
<result column="id" property="id" jdbcType="VARCHAR"/>
|
||||
<result column="titile" property="titile" jdbcType="VARCHAR"/>
|
||||
<result column="msg_content" property="msgContent" jdbcType="VARCHAR"/>
|
||||
<result column="msg_content_info" property="msgContentInfo" jdbcType="VARCHAR"/>
|
||||
<result column="start_time" property="startTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="end_time" property="endTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="sender" property="sender" jdbcType="VARCHAR"/>
|
||||
@@ -25,16 +26,17 @@
|
||||
<result column="bus_id" property="busId" jdbcType="VARCHAR"/>
|
||||
<result column="open_type" property="openType" jdbcType="VARCHAR"/>
|
||||
<result column="open_page" property="openPage" jdbcType="VARCHAR"/>
|
||||
<result column="document_id" property="documentId" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="querySysCementListByUserId" parameterType="String" resultMap="SysAnnouncement">
|
||||
select * from sys_announcement
|
||||
where send_status = '1'
|
||||
and del_flag = '0'
|
||||
and msg_category = #{msgCategory}
|
||||
select * from sys_announcement
|
||||
where send_status = '1'
|
||||
and del_flag = '0'
|
||||
and msg_category = #{msgCategory}
|
||||
and id IN ( select annt_id from sys_announcement_send where user_id = #{userId} and read_flag = '0')
|
||||
order by create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
+36
-8
@@ -1,13 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.system.mapper.SysAnnouncementSendMapper">
|
||||
|
||||
|
||||
<resultMap id="AnnouncementSendModel" type="com.jero.modules.system.model.AnnouncementSendModel" >
|
||||
<result column="id" property="id" jdbcType="VARCHAR"/>
|
||||
<result column="annt_id" property="anntId" jdbcType="VARCHAR"/>
|
||||
<result column="user_id" property="userId" jdbcType="VARCHAR"/>
|
||||
<result column="titile" property="titile" jdbcType="VARCHAR"/>
|
||||
<result column="msg_content" property="msgContent" jdbcType="VARCHAR"/>
|
||||
<result column="msg_content_info" property="msgContentInfo" jdbcType="VARCHAR"/>
|
||||
<result column="sender" property="sender" jdbcType="VARCHAR"/>
|
||||
<result column="priority" property="priority" jdbcType="VARCHAR"/>
|
||||
<result column="msg_category" property="msgCategory" jdbcType="VARCHAR"/>
|
||||
@@ -15,13 +16,14 @@
|
||||
<result column="bus_id" property="busId" jdbcType="VARCHAR"/>
|
||||
<result column="open_type" property="openType" jdbcType="VARCHAR"/>
|
||||
<result column="open_page" property="openPage" jdbcType="VARCHAR"/>
|
||||
<result column="document_id" property="documentId" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="queryByUserId" parameterType="String" resultType="String">
|
||||
select sas.annt_id from sys_announcement_send sas
|
||||
select sas.annt_id from sys_announcement_send sas
|
||||
where sas.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getMyAnnouncementSendList" parameterType="Object" resultMap="AnnouncementSendModel">
|
||||
select
|
||||
sas.id,
|
||||
@@ -30,6 +32,7 @@
|
||||
sas.read_flag,
|
||||
sa.titile as titile,
|
||||
sa.msg_content as msg_content,
|
||||
sa.msg_content_info as msg_content_info,
|
||||
sa.sender as sender,
|
||||
sa.priority as priority,
|
||||
sa.msg_category,
|
||||
@@ -37,11 +40,11 @@
|
||||
sa.bus_id as bus_id,
|
||||
sa.open_type as open_type,
|
||||
sa.open_page as open_page,
|
||||
sa.msg_abstract
|
||||
sa.msg_abstract,
|
||||
sa.document_id as document_id
|
||||
from sys_announcement_send sas
|
||||
left join sys_announcement sa ON sas.annt_id = sa.id
|
||||
where sa.send_status = '1'
|
||||
and sa.del_flag = '0'
|
||||
where sa.del_flag = '0'
|
||||
and sas.user_id = #{announcementSendModel.userId}
|
||||
<if test="announcementSendModel.titile !=null and announcementSendModel.titile != ''">
|
||||
and sa.titile LIKE concat(concat('%',#{announcementSendModel.titile}),'%')
|
||||
@@ -63,5 +66,30 @@
|
||||
</if>
|
||||
order by sas.read_flag,sa.send_time desc
|
||||
</select>
|
||||
<select id="getMessageUnreadList" parameterType="Object" resultMap="AnnouncementSendModel">
|
||||
select
|
||||
sas.id,
|
||||
sas.annt_id,
|
||||
sas.user_id,
|
||||
sas.read_flag,
|
||||
sa.titile as titile,
|
||||
sa.msg_content as msg_content,
|
||||
sa.msg_content_info as msg_content_info,
|
||||
sa.sender as sender,
|
||||
sa.priority as priority,
|
||||
sa.msg_category,
|
||||
sa.send_time as send_time,
|
||||
sa.bus_id as bus_id,
|
||||
sa.open_type as open_type,
|
||||
sa.open_page as open_page,
|
||||
sa.msg_abstract,
|
||||
sa.document_id as document_id
|
||||
from sys_announcement_send sas
|
||||
left join sys_announcement sa ON sas.annt_id = sa.id
|
||||
where sa.del_flag = '0'
|
||||
and sas.read_flag = '0'
|
||||
and sas.user_id = #{userId}
|
||||
order by sas.read_flag,sa.send_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
+6
@@ -16,6 +16,12 @@
|
||||
and s.item_value = #{key}
|
||||
</select>
|
||||
|
||||
<!-- 通过字典code获取字典数据 -->
|
||||
<select id="queryDictKeyByText" parameterType="String" resultType="String">
|
||||
select s.item_value from sys_dict_item s
|
||||
where s.dict_id = (select id from sys_dict where dict_code = #{code})
|
||||
and s.item_text = #{text}
|
||||
</select>
|
||||
|
||||
<!--通过查询指定table的 text code 获取字典-->
|
||||
<select id="queryTableDictItemsByCode" parameterType="String" resultType="com.jero.common.system.vo.DictModel">
|
||||
|
||||
+23
-4
@@ -6,6 +6,15 @@
|
||||
<select id="getUserByName" resultType="com.jero.modules.system.entity.SysUser">
|
||||
select * from sys_user where username = #{username} and del_flag = 0
|
||||
</select>
|
||||
<!-- 根据用户名查询(批量) -->
|
||||
<select id="getUserListByNames" resultType="com.jero.modules.system.entity.SysUser">
|
||||
select * from sys_user
|
||||
where username in
|
||||
<foreach collection="usernames.split(',')" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
and del_flag = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据部门Id查询 -->
|
||||
<select id="getUserByDepId" resultType="com.jero.modules.system.entity.SysUser">
|
||||
@@ -17,7 +26,17 @@
|
||||
|
||||
<!-- 查询用户的所属部门名称信息 -->
|
||||
<select id="getDepNamesByUserIds" resultType="com.jero.modules.system.vo.SysUserDepVo">
|
||||
select d.depart_name,ud.user_id from sys_user_depart ud,sys_depart d where d.id = ud.dep_id and ud.user_id in
|
||||
SELECT
|
||||
d.depart_name,
|
||||
dru.user_id
|
||||
FROM
|
||||
sys_depart_role_user dru,
|
||||
sys_depart_role dr,
|
||||
sys_depart d
|
||||
WHERE
|
||||
d.id = dr.depart_id
|
||||
and dr.id = dru.drole_id
|
||||
and dru.user_id in
|
||||
<foreach collection="userIds" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
@@ -45,7 +64,7 @@
|
||||
and username = #{username}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 修改用户部门code -->
|
||||
<update id="updateUserDepart">
|
||||
UPDATE sys_user SET org_code = #{orgCode} where username = #{username}
|
||||
@@ -55,7 +74,7 @@
|
||||
<select id="getUserByPhone" resultType="com.jero.modules.system.entity.SysUser">
|
||||
select * from sys_user where phone = #{phone} and del_flag = 0
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 根据邮箱查询用户信息 -->
|
||||
<select id="getUserByEmail" resultType="com.jero.modules.system.entity.SysUser">
|
||||
select * from sys_user where email = #{email} and del_flag = 0
|
||||
@@ -161,4 +180,4 @@
|
||||
and username != #{username}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
+7
-1
@@ -20,7 +20,7 @@ import lombok.Data;
|
||||
@Data
|
||||
public class AnnouncementSendModel implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private java.lang.String id;
|
||||
@@ -32,6 +32,8 @@ public class AnnouncementSendModel implements Serializable {
|
||||
private java.lang.String titile;
|
||||
/**内容*/
|
||||
private java.lang.String msgContent;
|
||||
/**详细内容*/
|
||||
private java.lang.String msgContentInfo;
|
||||
/**发布人*/
|
||||
private java.lang.String sender;
|
||||
/**优先级(L低,M中,H高)*/
|
||||
@@ -76,5 +78,9 @@ public class AnnouncementSendModel implements Serializable {
|
||||
* 摘要
|
||||
*/
|
||||
private java.lang.String msgAbstract;
|
||||
/**
|
||||
* 文档id
|
||||
*/
|
||||
private java.lang.String documentId;
|
||||
|
||||
}
|
||||
|
||||
+3
-1
@@ -17,7 +17,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
public interface ISysAnnouncementSendService extends IService<SysAnnouncementSend> {
|
||||
|
||||
public List<String> queryByUserId(String userId);
|
||||
|
||||
|
||||
/**
|
||||
* @功能:获取我的消息
|
||||
* @param announcementSendModel
|
||||
@@ -25,4 +25,6 @@ public interface ISysAnnouncementSendService extends IService<SysAnnouncementSen
|
||||
*/
|
||||
public Page<AnnouncementSendModel> getMyAnnouncementSendPage(Page<AnnouncementSendModel> page,AnnouncementSendModel announcementSendModel);
|
||||
|
||||
List<AnnouncementSendModel> getMessageUnreadList();
|
||||
|
||||
}
|
||||
|
||||
+6
@@ -130,4 +130,10 @@ public interface ISysDepartService extends IService<SysDepart>{
|
||||
* @return
|
||||
*/
|
||||
List<SysDepart> queryByDepartCode(String departCode);
|
||||
|
||||
/**
|
||||
* 更新所有组织的父节点id
|
||||
* @return
|
||||
*/
|
||||
int updateAllParentId();
|
||||
}
|
||||
|
||||
+3
-1
@@ -99,6 +99,8 @@ public class SyncDataServiceImpl implements ISyncDataService{
|
||||
// int insertRowNum = insertDepartFromTree(ppo, 1);
|
||||
// log.info(ppo.getName() + "添加成功条数:" + insertRowNum);
|
||||
}
|
||||
//添加组织的父节点id
|
||||
sysDepartService.updateAllParentId();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -243,7 +245,7 @@ public class SyncDataServiceImpl implements ISyncDataService{
|
||||
sysUser.setThirdId(employee.getWorker_user_id());
|
||||
sysUser.setActivitiSync(CommonConstant.ACT_SYNC_1);
|
||||
sysUser.setWorkNo(employee.getEmployee_id());
|
||||
sysUser.setUpdateTime(employee.getUpdate_time());
|
||||
// sysUser.setUpdateTime(employee.getUpdate_time());
|
||||
|
||||
sysUser.setCreateTime(new Date());
|
||||
sysUser.setCreateBy("admin");
|
||||
|
||||
+9
-1
@@ -4,10 +4,12 @@ import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.system.entity.SysAnnouncementSend;
|
||||
import com.jero.modules.system.mapper.SysAnnouncementSendMapper;
|
||||
import com.jero.modules.system.model.AnnouncementSendModel;
|
||||
import com.jero.modules.system.service.ISysAnnouncementSendService;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -24,7 +26,7 @@ public class SysAnnouncementSendServiceImpl extends ServiceImpl<SysAnnouncementS
|
||||
|
||||
@Resource
|
||||
private SysAnnouncementSendMapper sysAnnouncementSendMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> queryByUserId(String userId) {
|
||||
return sysAnnouncementSendMapper.queryByUserId(userId);
|
||||
@@ -36,4 +38,10 @@ public class SysAnnouncementSendServiceImpl extends ServiceImpl<SysAnnouncementS
|
||||
return page.setRecords(sysAnnouncementSendMapper.getMyAnnouncementSendList(page, announcementSendModel));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AnnouncementSendModel> getMessageUnreadList() {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
return sysAnnouncementSendMapper.getMessageUnreadList(sysUser.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-4
@@ -32,10 +32,10 @@ public class SysAnnouncementServiceImpl extends ServiceImpl<SysAnnouncementMappe
|
||||
|
||||
@Resource
|
||||
private SysAnnouncementMapper sysAnnouncementMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private SysAnnouncementSendMapper sysAnnouncementSendMapper;
|
||||
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public void saveAnnouncement(SysAnnouncement sysAnnouncement) {
|
||||
@@ -46,7 +46,7 @@ public class SysAnnouncementServiceImpl extends ServiceImpl<SysAnnouncementMappe
|
||||
sysAnnouncementMapper.insert(sysAnnouncement);
|
||||
// 2.插入用户通告阅读标记表记录
|
||||
String userId = sysAnnouncement.getUserIds();
|
||||
String[] userIds = userId.substring(0, (userId.length()-1)).split(",");
|
||||
String[] userIds = userId.split(",");
|
||||
String anntId = sysAnnouncement.getId();
|
||||
Date refDate = new Date();
|
||||
for(int i=0;i<userIds.length;i++) {
|
||||
@@ -59,7 +59,7 @@ public class SysAnnouncementServiceImpl extends ServiceImpl<SysAnnouncementMappe
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @功能:编辑消息信息
|
||||
*/
|
||||
|
||||
+5
@@ -534,4 +534,9 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
|
||||
queryWrapper.eq(SysDepart::getOrgCode, departCode);
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateAllParentId() {
|
||||
return this.updateAllParentId();
|
||||
}
|
||||
}
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.jero.modules.system.util;
|
||||
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: liyawei
|
||||
* @Description:
|
||||
* @Date: Created in 17:23 2022/3/2
|
||||
*/
|
||||
public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||
public StringUtils() {
|
||||
}
|
||||
|
||||
public static String listToString(List<String> stringList) {
|
||||
if (CollectionUtils.isEmpty(stringList)) {
|
||||
return null;
|
||||
} else {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
for(int i = 0; i < stringList.size(); ++i) {
|
||||
builder.append((String)stringList.get(i));
|
||||
if (i < stringList.size() - 1) {
|
||||
builder.append(",");
|
||||
}
|
||||
}
|
||||
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
||||
|
||||
public static List<String> stringToList(String string) {
|
||||
return isEmpty(string) ? null : Arrays.asList(string.split(","));
|
||||
}
|
||||
|
||||
public static List<Integer> stringToIntList(String string) {
|
||||
if (isEmpty(string)) {
|
||||
return null;
|
||||
} else {
|
||||
List<Integer> integerList = new ArrayList();
|
||||
String[] stringArray = string.split(",");
|
||||
|
||||
for(int i = 0; i < stringArray.length; ++i) {
|
||||
String str = stringArray[i];
|
||||
if (isNotEmpty(str)) {
|
||||
integerList.add(Integer.valueOf(str));
|
||||
}
|
||||
}
|
||||
|
||||
return integerList;
|
||||
}
|
||||
}
|
||||
|
||||
public static String FilterNull(Object o) {
|
||||
return o != null && !"null".equals(o.toString()) ? o.toString().trim() : "";
|
||||
}
|
||||
|
||||
public static boolean isEmptyWithFilterNull(Object o) {
|
||||
if (o == null) {
|
||||
return true;
|
||||
} else {
|
||||
return "".equals(FilterNull(o.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.jero.modules.system.util;
|
||||
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.UnavailableSecurityManagerException;
|
||||
import org.apache.shiro.session.InvalidSessionException;
|
||||
|
||||
public class UserUtils {
|
||||
|
||||
/**
|
||||
* 获取当前登录用户ID
|
||||
*
|
||||
*/
|
||||
public static String getUserId() {
|
||||
String userId = null;
|
||||
try {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if(sysUser!=null){
|
||||
userId = sysUser.getId();
|
||||
}
|
||||
} catch (UnavailableSecurityManagerException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvalidSessionException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return userId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.jero.modules.system.vo;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <b>功能:</b>OCR_RECORD OcrRecordEOEntity<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2019-03-25 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public class OcrVO implements Serializable{
|
||||
private String restHandleFileUrl;
|
||||
private String OcrUserId;
|
||||
private String authCode;
|
||||
private String convertType;
|
||||
private String fileName;
|
||||
private String fileContent;
|
||||
private String taskId;
|
||||
private String RestCallBackUrl;
|
||||
|
||||
public String getRestHandleFileUrl() {
|
||||
return restHandleFileUrl;
|
||||
}
|
||||
|
||||
public void setRestHandleFileUrl(String restHandleFileUrl) {
|
||||
this.restHandleFileUrl = restHandleFileUrl;
|
||||
}
|
||||
|
||||
public String getOcrUserId() {
|
||||
return OcrUserId;
|
||||
}
|
||||
|
||||
public void setOcrUserId(String ocrUserId) {
|
||||
OcrUserId = ocrUserId;
|
||||
}
|
||||
|
||||
public String getAuthCode() {
|
||||
return authCode;
|
||||
}
|
||||
|
||||
public void setAuthCode(String authCode) {
|
||||
this.authCode = authCode;
|
||||
}
|
||||
|
||||
public String getConvertType() {
|
||||
return convertType;
|
||||
}
|
||||
|
||||
public void setConvertType(String convertType) {
|
||||
this.convertType = convertType;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public String getFileContent() {
|
||||
return fileContent;
|
||||
}
|
||||
|
||||
public void setFileContent(String fileContent) {
|
||||
this.fileContent = fileContent;
|
||||
}
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getRestCallBackUrl() {
|
||||
return RestCallBackUrl;
|
||||
}
|
||||
|
||||
public void setRestCallBackUrl(String restCallBackUrl) {
|
||||
RestCallBackUrl = restCallBackUrl;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user