1.公告相关接口

2.建表sql
3.我的待办-能力申请增加资源类型及提供部门字段
4.减少无用日志输出
This commit is contained in:
dinggang 2022-12-01 18:16:43 +08:00
parent 82faf95eff
commit fee19d8f17
17 changed files with 454 additions and 10 deletions

View File

@ -0,0 +1,34 @@
/*
Navicat Premium Data Transfer
Source Server : 192.168.124.46
Source Server Type : MySQL
Source Server Version : 80030
Source Host : 192.168.124.46:3306
Source Schema : share_platform
Target Server Type : MySQL
Target Server Version : 80030
File Encoding : 65001
Date: 01/12/2022 18:12:20
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for sys_notice_management
-- ----------------------------
DROP TABLE IF EXISTS `sys_notice_management`;
CREATE TABLE `sys_notice_management` (
`id` bigint(0) NOT NULL,
`content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
`publish_time` datetime(0) NULL DEFAULT NULL,
`del_flag` int(0) NULL DEFAULT NULL,
`create_date` datetime(0) NULL DEFAULT NULL,
`creator` bigint(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -111,6 +111,8 @@ public class ActTaskController {
List<Map<String, Object>> meetingroom_bookTask = jdbcTemplate.queryForList("SELECT " + List<Map<String, Object>> meetingroom_bookTask = jdbcTemplate.queryForList("SELECT " +
" t_meetingroom_book.id AS `taskId`, " + " t_meetingroom_book.id AS `taskId`, " +
" t_meetingroom_book.dept AS `userDeptName`, " + " t_meetingroom_book.dept AS `userDeptName`, " +
" '会客厅' AS `resourceType`, " +
" '青岛市大数据发展管理局' AS `provideDept`, " +
" t_meetingroom.`name` AS `userName`, " + " t_meetingroom.`name` AS `userName`, " +
" '会客厅审核' AS `taskName `, " + " '会客厅审核' AS `taskName `, " +
" t_meetingroom.create_date AS `createTime` " + " t_meetingroom.create_date AS `createTime` " +

View File

@ -19,6 +19,8 @@ import io.renren.modules.notice.service.SysNoticeService;
import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
import io.renren.modules.processForm.service.TAbilityApplicationService; import io.renren.modules.processForm.service.TAbilityApplicationService;
import io.renren.modules.resource.dao.ResourceDao; import io.renren.modules.resource.dao.ResourceDao;
import io.renren.modules.resource.dataResource.domain.TsingtaoDataResourceService;
import io.renren.modules.resource.dto.GetDataResourceListDto;
import io.renren.modules.resource.dto.ResourceDTO; import io.renren.modules.resource.dto.ResourceDTO;
import io.renren.modules.resource.entity.ResourceEntity; import io.renren.modules.resource.entity.ResourceEntity;
import io.renren.modules.resource.service.ResourceService; import io.renren.modules.resource.service.ResourceService;
@ -228,14 +230,40 @@ public class ActTaskService extends BaseServiceImpl {
this.convertTaskInfo(task, dto); this.convertTaskInfo(task, dto);
Map<String, Object> processVariable = new LinkedHashMap<>(); Map<String, Object> processVariable = new LinkedHashMap<>();
if (task.getProcessVariables().containsKey("tAbilityApplicationDTOList")) { if (task.getProcessVariables().containsKey("tAbilityApplicationDTOList")) {
processVariable.putAll(task.getProcessVariables()); processVariable.putAll(task.getProcessVariables());
dto.setParams(processVariable); dto.setParams(processVariable);
List<TAbilityApplicationDTO> dtoList = (List<TAbilityApplicationDTO>) task.getProcessVariables().get("tAbilityApplicationDTOList"); List<TAbilityApplicationDTO> dtoList = (List<TAbilityApplicationDTO>) task.getProcessVariables().get("tAbilityApplicationDTOList");
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(dtoList.get(0))); JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(dtoList.get(0)));
List<String> resourceIds = new ArrayList<>();
dtoList.forEach(index -> resourceIds.add(index.getResourceId()));
if (jsonObject != null) { if (jsonObject != null) {
//资源类型
CompletableFuture sjzy = CompletableFuture.runAsync(() -> {
StringBuilder stringBuilder = new StringBuilder();
List<String> resourcesName = resourceDao.selectResourcesTypeByIds(resourceIds);
resourcesName.forEach(x -> stringBuilder.append(x).append(","));
String string = stringBuilder.substring(0, stringBuilder.length() - 2);
dto.setResourceType(string);
}, executor);
//提供部门
CompletableFuture jcss = CompletableFuture.runAsync(() -> {
StringBuilder stringBuilder = new StringBuilder();
List<String> proviDeptsName = resourceDao.selectProvideDeptNameByIds(resourceIds);
proviDeptsName.forEach(x -> stringBuilder.append(x).append(","));
String string = stringBuilder.substring(0, stringBuilder.length() - 2);
dto.setProvideDept(string);
}, executor);
CompletableFuture all = CompletableFuture.allOf(sjzy, jcss);
all.join();
dto.setUserName(jsonObject.containsKey("user") ? jsonObject.getString("user") : ""); dto.setUserName(jsonObject.containsKey("user") ? jsonObject.getString("user") : "");
dto.setUserDeptName(sysUserDao.getDeptNameByUserId(jsonObject.containsKey("userId") ? jsonObject.getString("userId") : null)); dto.setUserDeptName(sysUserDao.getDeptNameByUserId(jsonObject.containsKey("userId") ? jsonObject.getString("userId") : null));
dto.setApplyTitle(jsonObject.containsKey("title") ? jsonObject.getString("title") : ""); dto.setApplyTitle(jsonObject.containsKey("title") ? jsonObject.getString("title") : "");
@ -264,11 +292,16 @@ public class ActTaskService extends BaseServiceImpl {
dto.setParams(processVariable); dto.setParams(processVariable);
dto.setUserName(abilityApplicationDTO.getUser()); dto.setUserName(abilityApplicationDTO.getUser());
ResourceEntity resourceEntity = resourceDao.selectById(abilityApplicationDTO.getResourceId()); ResourceEntity resourceEntity = resourceDao.selectById(abilityApplicationDTO.getResourceId());
dto.setResourceType(resourceEntity.getType());
SysDeptEntity dept = sysDeptDao.getById(resourceEntity.getDeptId());
String provideDeptName = dept == null ? "" : dept.getName();
dto.setProvideDept(provideDeptName);
dto.setApplyTitle(resourceEntity == null ? "" : resourceEntity.getName()); dto.setApplyTitle(resourceEntity == null ? "" : resourceEntity.getName());
dto.setUserDeptName(abilityApplicationDTO.getUnit()); dto.setUserDeptName(abilityApplicationDTO.getUnit());
listDto.add(dto); listDto.add(dto);
continue; continue;
} }
TResourceMountApplyDTO resourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(dto.getBusinessKey())); TResourceMountApplyDTO resourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(dto.getBusinessKey()));
if (resourceMountApplyDTO != null) { if (resourceMountApplyDTO != null) {
Map<String, Object> variables = oMapper.convertValue(resourceMountApplyDTO, Map.class); Map<String, Object> variables = oMapper.convertValue(resourceMountApplyDTO, Map.class);
@ -282,6 +315,7 @@ public class ActTaskService extends BaseServiceImpl {
listDto.add(dto); listDto.add(dto);
continue; continue;
} }
TDemandDataDTO tDemandDataDTO = tDemandDataService.get(Long.valueOf(dto.getBusinessKey())); TDemandDataDTO tDemandDataDTO = tDemandDataService.get(Long.valueOf(dto.getBusinessKey()));
if (tDemandDataDTO != null) { if (tDemandDataDTO != null) {
Map<String, Object> variables = oMapper.convertValue(tDemandDataDTO, Map.class); Map<String, Object> variables = oMapper.convertValue(tDemandDataDTO, Map.class);
@ -294,6 +328,7 @@ public class ActTaskService extends BaseServiceImpl {
listDto.add(dto); listDto.add(dto);
continue; continue;
} }
ResourceDTO resourceDTO = resourceService.get(Long.valueOf(dto.getBusinessKey())); ResourceDTO resourceDTO = resourceService.get(Long.valueOf(dto.getBusinessKey()));
if (resourceDTO != null) { if (resourceDTO != null) {
Map<String, Object> variables = oMapper.convertValue(resourceDTO, Map.class); Map<String, Object> variables = oMapper.convertValue(resourceDTO, Map.class);

View File

@ -225,4 +225,8 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
Integer updateByDelProcinst(@Param("resourceId") Long resourceId); Integer updateByDelProcinst(@Param("resourceId") Long resourceId);
Integer selectYzyCount(); Integer selectYzyCount();
List<String> selectResourcesTypeByIds(@Param("resourceIds") List<String> resourceIds);
List<String> selectProvideDeptNameByIds(@Param("resourceIds") List<String> resourceIds);
} }

View File

@ -25,17 +25,15 @@ public class SecurityUser {
*/ */
public static UserDetail getUser() { public static UserDetail getUser() {
logger.error("————————————————————————————当前调用的方法为————————————————————————————{}", getMyGrandpaStackTrace()); logger.error("————————————————————————————当前调用的方法为{}", getMyGrandpaStackTrace());
Subject subject = getSubject(); Subject subject = getSubject();
if (subject == null) { if (subject == null) {
logger.error("————————————————————————————subject为null,返回空对象————————————————————————————");
return new UserDetail(); return new UserDetail();
} }
UserDetail user = (UserDetail) subject.getPrincipal(); UserDetail user = (UserDetail) subject.getPrincipal();
if (user == null) { if (user == null) {
logger.error("————————————————————————————user为null,返回空对象————————————————————————————");
return new UserDetail(); return new UserDetail();
} }

View File

@ -26,13 +26,12 @@ public class SysRoleUserServiceImpl extends BaseServiceImpl<SysRoleUserDao, SysR
@Override @Override
@Transactional @Transactional
public void saveOrUpdate(Long userId, List<Long> roleIdList) { public void saveOrUpdate(Long userId, List<Long> roleIdList) {
logger.error("------------------准备更新用户角色信息-------------------"); logger.error("------------------准备更新用户角色信息,准备更新的用户为{} 修改后的角色列表为{}-------------------", userId, roleIdList);
//先删除角色用户关系 //先删除角色用户关系
deleteByUserIds(new Long[]{userId}); deleteByUserIds(new Long[]{userId});
//用户没有一个角色权限的情况 //用户没有一个角色权限的情况
if (roleIdList.isEmpty()) { if (roleIdList.isEmpty()) {
logger.error("------------------用户未配置角色-------------------");
return; return;
} }
@ -61,6 +60,7 @@ public class SysRoleUserServiceImpl extends BaseServiceImpl<SysRoleUserDao, SysR
public void deleteByUserIds(Long[] userIds) { public void deleteByUserIds(Long[] userIds) {
Long updater = SecurityUser.getUserId(); Long updater = SecurityUser.getUserId();
logger.error("————————————————————————————当前调用删除用户角色的方法为{}", SecurityUser.getMyGrandpaStackTrace());
logger.error("------------------二次确认请求修改用户角色的人是:{}-------------------", SecurityUser.getUser()); logger.error("------------------二次确认请求修改用户角色的人是:{}-------------------", SecurityUser.getUser());
baseDao.deleteByUserIds(userIds, updater); baseDao.deleteByUserIds(userIds, updater);

View File

@ -0,0 +1,120 @@
package io.renren.modules.sysnoticemanagement.controller;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.sysnoticemanagement.dto.SysNoticeManagementDTO;
import io.renren.modules.sysnoticemanagement.excel.SysNoticeManagementExcel;
import io.renren.modules.sysnoticemanagement.service.SysNoticeManagementService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 公告管理
*
* @author dg 2498628697@qq.com
* @since 1.0 2022-12-01
*/
@RestController
@RequestMapping("/sysnoticemanagement")
@Api(tags="公告管理")
public class SysNoticeManagementController {
@Autowired
private SysNoticeManagementService sysNoticeManagementService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = "days", value = "公告显示周期", paramType = "query", dataType="int") ,
@ApiImplicitParam(name = "content", value = "公告内容", paramType = "query", dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:page")
public Result<PageData<SysNoticeManagementDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<SysNoticeManagementDTO> page = sysNoticeManagementService.page(params);
return new Result<PageData<SysNoticeManagementDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:info")
public Result<SysNoticeManagementDTO> get(@PathVariable("id") Long id){
SysNoticeManagementDTO data = sysNoticeManagementService.get(id);
return new Result<SysNoticeManagementDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:save")
public Result save(@RequestBody SysNoticeManagementDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
dto.setDelFlag(0);
dto.setPublishTime(new Date());
sysNoticeManagementService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:update")
public Result update(@RequestBody SysNoticeManagementDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
sysNoticeManagementService.update(dto);
return new Result();
}
@PostMapping("/delete")
@ApiOperation("删除")
@LogOperation("删除")
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
sysNoticeManagementService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<SysNoticeManagementDTO> list = sysNoticeManagementService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "公告管理", list, SysNoticeManagementExcel.class);
}
}

View File

@ -0,0 +1,16 @@
package io.renren.modules.sysnoticemanagement.dao;
import io.renren.common.dao.BaseDao;
import io.renren.modules.sysnoticemanagement.entity.SysNoticeManagementEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 公告管理
*
* @author dg 2498628697@qq.com
* @since 1.0 2022-12-01
*/
@Mapper
public interface SysNoticeManagementDao extends BaseDao<SysNoticeManagementEntity> {
}

View File

@ -0,0 +1,28 @@
package io.renren.modules.sysnoticemanagement.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 公告管理
*
* @author dg 2498628697@qq.com
* @since 1.0 2022-12-01
*/
@Data
@ApiModel(value = "公告管理")
public class SysNoticeManagementDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
private String content;
private Date publishTime;
private Integer delFlag;
private Date createDate;
private Long creator;
}

View File

@ -0,0 +1,30 @@
package io.renren.modules.sysnoticemanagement.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
import java.util.Date;
/**
* 公告管理
*
* @author dg 2498628697@qq.com
* @since 1.0 2022-12-01
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("sys_notice_management")
public class SysNoticeManagementEntity {
private static final long serialVersionUID = 1L;
@TableId
private Long id;
private String content;
private Date publishTime;
private Integer delFlag;
@TableField(fill = FieldFill.INSERT)
private Date createDate;
@TableField(fill = FieldFill.INSERT)
private Long creator;
}

View File

@ -0,0 +1,32 @@
package io.renren.modules.sysnoticemanagement.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
/**
* 公告管理
*
* @author dg 2498628697@qq.com
* @since 1.0 2022-12-01
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class SysNoticeManagementExcel {
@ExcelProperty(value = "Object", index = 0)
private Object id;
@ExcelProperty(value = "Object", index = 1)
private Object content;
@ExcelProperty(value = "Object", index = 2)
private Object publishTime;
@ExcelProperty(value = "Object", index = 3)
private Object delFlag;
@ExcelProperty(value = "Object", index = 4)
private Object createDate;
@ExcelProperty(value = "Object", index = 5)
private Object creator;
}

View File

@ -0,0 +1,15 @@
package io.renren.modules.sysnoticemanagement.service;
import io.renren.common.service.CrudService;
import io.renren.modules.sysnoticemanagement.dto.SysNoticeManagementDTO;
import io.renren.modules.sysnoticemanagement.entity.SysNoticeManagementEntity;
/**
* 公告管理
*
* @author dg 2498628697@qq.com
* @since 1.0 2022-12-01
*/
public interface SysNoticeManagementService extends CrudService<SysNoticeManagementEntity, SysNoticeManagementDTO> {
}

View File

@ -0,0 +1,41 @@
package io.renren.modules.sysnoticemanagement.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.utils.DateUtils;
import io.renren.modules.sysnoticemanagement.dao.SysNoticeManagementDao;
import io.renren.modules.sysnoticemanagement.dto.SysNoticeManagementDTO;
import io.renren.modules.sysnoticemanagement.entity.SysNoticeManagementEntity;
import io.renren.modules.sysnoticemanagement.service.SysNoticeManagementService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.Map;
/**
* 公告管理
*
* @author dg 2498628697@qq.com
* @since 1.0 2022-12-01
*/
@Service
public class SysNoticeManagementServiceImpl extends CrudServiceImpl<SysNoticeManagementDao, SysNoticeManagementEntity, SysNoticeManagementDTO> implements SysNoticeManagementService {
@Override
public QueryWrapper<SysNoticeManagementEntity> getWrapper(Map<String, Object> params){
QueryWrapper<SysNoticeManagementEntity> wrapper = new QueryWrapper<>();
if (params.get("days") != null) {
int days = Integer.parseInt(params.get("days").toString());
Date date = DateUtils.addDateDays(new Date(), -days);
wrapper.ge("publish_time", date);
}
wrapper.eq("del_flag", 0)
.like(StringUtils.isNotEmpty(params.get("content").toString()), "content", params.get("content").toString());
return wrapper;
}
}

View File

@ -0,0 +1,34 @@
/*
Navicat Premium Data Transfer
Source Server : 192.168.124.46
Source Server Type : MySQL
Source Server Version : 80030
Source Host : 192.168.124.46:3306
Source Schema : share_platform
Target Server Type : MySQL
Target Server Version : 80030
File Encoding : 65001
Date: 01/12/2022 18:12:20
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for sys_notice_management
-- ----------------------------
DROP TABLE IF EXISTS `sys_notice_management`;
CREATE TABLE `sys_notice_management` (
`id` bigint(0) NOT NULL,
`content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
`publish_time` datetime(0) NULL DEFAULT NULL,
`del_flag` int(0) NULL DEFAULT NULL,
`create_date` datetime(0) NULL DEFAULT NULL,
`creator` bigint(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -438,7 +438,6 @@
<if test = "params.resourceType != null and params.resourceType != ''" > <if test = "params.resourceType != null and params.resourceType != ''" >
AND '会客厅' = #{params.resourceType} AND '会客厅' = #{params.resourceType}
</if> </if>
ORDER BY applyDate DESC ORDER BY applyDate DESC
LIMIT ${params.pageNum}, ${params.pageSize} LIMIT ${params.pageNum}, ${params.pageSize}
</select> </select>
@ -530,7 +529,7 @@
( CASE tdr.type WHEN '应用资源' THEN tdr.type WHEN '组件服务' THEN attr.attr_value ELSE tdr.type END ) AS "resourceType", ( CASE tdr.type WHEN '应用资源' THEN tdr.type WHEN '组件服务' THEN attr.attr_value ELSE tdr.type END ) AS "resourceType",
sd.NAME AS "provideDept", sd.NAME AS "provideDept",
taa.unit AS "applyDept", taa.unit AS "applyDept",
taa.create_date AS "applyDate", date_format(taa.create_date, "%Y-%m-%d %h:%i:%s") AS "applyDate",
taa.apply_price AS "applyPrice", taa.apply_price AS "applyPrice",
taa.approve_status AS "applyResult" taa.approve_status AS "applyResult"
FROM FROM
@ -576,7 +575,8 @@
'会客厅' AS "resourceType", '会客厅' AS "resourceType",
'青岛市大数据发展管理局' AS "provideDept", '青岛市大数据发展管理局' AS "provideDept",
tmb.dept AS "applyDept", tmb.dept AS "applyDept",
tmb.create_date AS "applyDate", date_format(tmb.create_date, "%Y-%m-%d %h:%i:%s") AS "applyDate",
tmb.apply_price AS "applyPrice", tmb.apply_price AS "applyPrice",
( CASE tmb.state WHEN 0 THEN '审核中' WHEN 2 THEN '通过' ELSE '审核中' END ) AS "applyResult" ( CASE tmb.state WHEN 0 THEN '审核中' WHEN 2 THEN '通过' ELSE '审核中' END ) AS "applyResult"
FROM FROM

View File

@ -2341,4 +2341,44 @@
SELECT COUNT(1) FROM policy_cloud_service SELECT COUNT(1) FROM policy_cloud_service
</select> </select>
<select id="selectResourcesTypeByIds" resultType="java.lang.String">
SELECT
DISTINCT '应用资源' AS "resourceType"
FROM
tb_data_resource tdr
WHERE
tdr.del_flag = 0
AND tdr.id IN
<foreach collection="resourceIds" item="id" open="(" separator="," close=")">
#{id}
</foreach> UNION ALL
SELECT DISTINCT
tda.attr_value
FROM
tb_data_resource tdr,
tb_data_attr tda
WHERE
tdr.id = tda.data_resource_id
AND tdr.del_flag = 0
AND tda.del_flag = 0
AND tda.attr_type = '组件类型'
AND tdr.id IN
<foreach collection="resourceIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="selectProvideDeptNameByIds" resultType="java.lang.String">
SELECT
DISTINCT sd.name AS "provideDept"
FROM
tb_data_resource tdr, sys_dept sd
WHERE
tdr.del_flag = 0
AND tdr.dept_id = sd.id
AND tdr.id IN
<foreach collection="resourceIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
</mapper> </mapper>

View File

@ -0,0 +1,15 @@
<?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="io.renren.modules.sysnoticemanagement.dao.SysNoticeManagementDao">
<resultMap type="io.renren.modules.sysnoticemanagement.entity.SysNoticeManagementEntity" id="sysNoticeManagementMap">
<result property="id" column="id"/>
<result property="content" column="content"/>
<result property="publishTime" column="publish_time"/>
<result property="delFlag" column="del_flag"/>
<result property="createDate" column="create_date"/>
<result property="creator" column="creator"/>
</resultMap>
</mapper>