Merge branch 'dev'
This commit is contained in:
commit
f7fe8fb7a5
|
@ -29,6 +29,7 @@ import org.apache.shiro.session.UnknownSessionException;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
|
@ -65,6 +66,9 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
|||
@Autowired
|
||||
private NoticeUntil noticeUntil;
|
||||
|
||||
@Value("#{new Boolean(${notice.yawei})")
|
||||
private Boolean noticeYaWei; // 是否发送消息到亚微中心
|
||||
|
||||
@Override
|
||||
public QueryWrapper<SysNoticeEntity> getWrapper(Map<String, Object> params) {
|
||||
QueryWrapper<SysNoticeEntity> wrapper = new QueryWrapper<>();
|
||||
|
@ -212,10 +216,14 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
|||
MessageData<String> message = new MessageData<String>().msg(notice.getTitle());
|
||||
webSocketServer.sendMessage(finalUserIdList, message);
|
||||
}, executor).thenRunAsync(() -> {
|
||||
try {
|
||||
sendToYaweiUser(notice, finalUserIdList);
|
||||
} catch (Exception exception) {
|
||||
logger.error("", exception);
|
||||
if (noticeYaWei) {
|
||||
try {
|
||||
sendToYaweiUser(notice, finalUserIdList);
|
||||
} catch (Exception exception) {
|
||||
logger.error("", exception);
|
||||
}
|
||||
} else {
|
||||
logger.info("无需发送到第三方 亚微消息");
|
||||
}
|
||||
}, executor);
|
||||
}
|
||||
|
|
|
@ -678,4 +678,12 @@ public class ResourceController {
|
|||
return new Result().ok(resourceService.getSquareList(jsonObject));
|
||||
}
|
||||
|
||||
@GetMapping("/getAppListByDept")
|
||||
@ApiOperation("/根据部门查询部门上架应用列表")
|
||||
@LogOperation("/根据部门查询部门上架应用列表")
|
||||
public Result getAppListByDept(String key) {
|
||||
return new Result().ok(resourceService.getAppListByDept(key));
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -215,4 +215,6 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
|
|||
@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);
|
||||
|
||||
Integer getSquareListCount(@Param("type") String type, @Param("deptType") Integer deptType, @Param("area") String area);
|
||||
|
||||
List<Map> getAppListByDept(@Param("deptId") Long deptId, @Param("key") String key);
|
||||
}
|
|
@ -159,4 +159,7 @@ public interface ResourceService extends CrudService<ResourceEntity, ResourceDTO
|
|||
Object getPotentialList();
|
||||
|
||||
Object getSquareList(JSONObject jsonObject);
|
||||
|
||||
Object getAppListByDept(String key);
|
||||
|
||||
}
|
|
@ -2542,4 +2542,11 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
}};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getAppListByDept(String key) {
|
||||
Long deptId = SecurityUser.getUser().getDeptId();
|
||||
|
||||
return resourceDao.getAppListByDept(deptId, key);
|
||||
}
|
||||
|
||||
}
|
|
@ -152,4 +152,6 @@ front:
|
|||
# 基础设施,部门最大申请数量
|
||||
infrastructure:
|
||||
dept-can-apply-max: 10
|
||||
|
||||
# 是否发亚微消息
|
||||
notice:
|
||||
yawei: true
|
||||
|
|
|
@ -1938,7 +1938,7 @@
|
|||
tdr.NAME AS resourceName,
|
||||
dept.`name` AS resourceDeptName,
|
||||
tdr.type,
|
||||
DATE_FORMAT(tdr.create_date,'%Y-%m-%d %T') AS createDate,
|
||||
DATE_FORMAT(taa.create_date,'%Y-%m-%d %T') AS createDate,
|
||||
taa.approve_status AS approveStatus,
|
||||
taa.apply_flag AS applyNumber
|
||||
FROM
|
||||
|
@ -2270,4 +2270,21 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getAppListByDept" resultType="java.util.Map">
|
||||
SELECT
|
||||
tdr.id,
|
||||
tdr.NAME,
|
||||
tdr.create_date
|
||||
FROM
|
||||
tb_data_resource tdr
|
||||
WHERE
|
||||
1 = 1
|
||||
AND tdr.del_flag = 0
|
||||
AND tdr.dept_id = #{deptId}
|
||||
<if test="key != null and key != ''">
|
||||
AND tdr.name like CONCAT('%', #{key}, '%')
|
||||
</if>
|
||||
ORDER BY create_date DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -7,12 +7,11 @@
|
|||
select t1.*,(select t2.name from sys_dept t2 where t2.id=t1.pid)parentName from sys_dept t1
|
||||
where 1 = 1 AND name != '访客部门'
|
||||
<if test="deptIdList != null">
|
||||
t1.id in
|
||||
AND t1.id in
|
||||
<foreach item="id" collection="deptIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
order by t1.sort asc
|
||||
</select>
|
||||
|
||||
|
|
Loading…
Reference in New Issue