Browse Source

后台管理 - 知识库管理(审批没好), 横幅管理 这两个弄好了 .

master
蟑螂恶霸 3 years ago
parent
commit
fa6b6b3e22
  1. 6
      lib/EmergencyService/zdxtEmergencyBootStart/pom.xml
  2. 14
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/smallProgram/library/add.html
  3. 34
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/smallProgram/library/detail.html
  4. 14
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/smallProgram/library/edit.html
  5. 146
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/smallProgram/library/view.html
  6. 6
      lib/EmergencyService/zdxtEmergencyKnowledgeService/pom.xml
  7. 38
      lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/controller/KnowledgeLibraryController.java
  8. 36
      lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/domain/KnowledgeLibrary.java
  9. 8
      lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/mapper/KnowledgeLibraryMapper.java
  10. 8
      lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/service/IKnowledgeLibraryService.java
  11. 19
      lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/service/impl/KnowledgeLibraryServiceImpl.java
  12. 34
      lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/resources/mapper/KnowledgeLibraryMapper.xml
  13. 85
      lib/EmergencyServiceApi/pom.xml

6
lib/EmergencyService/zdxtEmergencyBootStart/pom.xml

@ -72,6 +72,12 @@
<artifactId>zdxtEmergencyJt808Service</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>EmergencyServiceApi</groupId>
<artifactId>emergencyKnowledgeServiceApi</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<!--<dependency>-->
<!--<groupId>ZdxtComponent</groupId>-->
<!--<artifactId>zdxtDynamicFormComponent</artifactId>-->

14
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/smallProgram/library/add.html

@ -29,6 +29,20 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label is-required">类型:</label>
<div class="col-sm-4">
<select name="type" class="form-control m-b" th:with="type=${@dict.getType('knowledge_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
<label class="col-sm-2 control-label is-required">置顶:</label>
<div class="col-sm-4">
<select name="pinned" class="form-control m-b" th:with="type=${@dict.getType('is_pinned')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">内容:</label>
<div class="col-sm-10">

34
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/smallProgram/library/detail.html

@ -1,10 +1,16 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="zdxtInclude :: header('修改知识点')" />
<th:block th:include="zdxtInclude :: header('知识点详情')" />
<th:block th:include="zdxtInclude :: select2-css" />
<th:block th:include="zdxtInclude :: summernote-css"/>
<th:block th:include="zdxtInclude :: bootstrap-fileinput-css"/>
<style>
.file-caption-main {
display: none;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -13,13 +19,13 @@
<div class="form-group">
<label class="col-sm-2 control-label is-required">标题:</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="title" id="title" th:field="*{title}" required>
<input class="form-control" type="text" name="title" id="title" th:field="*{title}" disabled required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label is-required">副标题:</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="subTitle" id="subTitle" th:field="*{subTitle}" required>
<input class="form-control" type="text" name="subTitle" id="subTitle" th:field="*{subTitle}" disabled required>
</div>
</div>
<div class="form-group">
@ -31,6 +37,20 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label is-required">类型:</label>
<div class="col-sm-4">
<select name="type" class="form-control m-b" th:with="type=${@dict.getType('knowledge_type')}" disabled>
<option th:field="*{type}" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
<label class="col-sm-2 control-label is-required">置顶:</label>
<div class="col-sm-4">
<select id="pinned" name="pinned" class="form-control m-b" th:with="type=${@dict.getType('is_pinned')}" disabled>
<option th:field="*{pinned}" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">内容:</label>
<div class="col-sm-10">
@ -67,11 +87,7 @@
$(function() {
$('#itemContentSummernote').summernote('code', $('#content').val());
$('#post').select2({
placeholder: "请选择职务",
allowClear: true
});
$('#userType').val('3').trigger('change');
$('#itemContentSummernote').summernote('disable');
// 渲染要素信息
renderVersionAtt();
})
@ -251,7 +267,7 @@
}
},
layoutTemplates: {
// actionDelete: ''//去掉删除按钮
actionDelete: '',//去掉删除按钮
actionUpload: '' // 去掉上传按钮
},
initialPreview: filePreview.fileList == null ? [] : filePreview.fileList,

14
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/smallProgram/library/edit.html

@ -31,6 +31,20 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label is-required">类型:</label>
<div class="col-sm-4">
<select name="type" class="form-control m-b" th:with="type=${@dict.getType('knowledge_type')}">
<option th:field="*{type}" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
<label class="col-sm-2 control-label is-required">置顶:</label>
<div class="col-sm-4">
<select id="pinned" name="pinned" class="form-control m-b" th:with="type=${@dict.getType('is_pinned')}">
<option th:field="*{pinned}" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">内容:</label>
<div class="col-sm-10">

146
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/smallProgram/library/view.html

@ -44,13 +44,18 @@
shiro:hasPermission="system:post:edit">
<i class="fa fa-edit"></i> 修改
</a>-->
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
shiro:hasPermission="small:library:remove">
<a class="btn btn-danger multiple disabled" onclick="removeAll()" shiro:hasPermission="small:library:remove">
<i class="fa fa-remove"></i> 全部删除
</a>
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:post:export">
<i class="fa fa-upload"></i> 导出
</a>-->
<a class="btn btn-success" onclick="publishState(1)" shiro:hasPermission="small:library:add">
<i class="fa fa-plus"></i> 发布
</a>
<a class="btn btn-success" onclick="publishState(3)" shiro:hasPermission="small:library:add">
<i class="fa fa-plus"></i> 下线
</a>
<a class="btn btn-warning single disabled" onclick="sendButton()" shiro:hasPermission="small:library:edit">
<i class="fa fa-upload"></i> 审核
</a>
</div>
<div class="col-sm-12 select-table table-bordered">
@ -59,18 +64,24 @@
</div>
</div>
<th:block th:include="zdxtInclude :: footer"/>
<script th:src="@{/flow/processing/js/SystemUtil.js}"></script>
<script th:src="@{/flow/processing/js/ProcessUtil.js}"></script>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('small:library:edit')}]];
var removeFlag = [[${@permission.hasPermi('small:library:remove')}]];
var types = [[${@dict.getType('knowledge_type')}]];
var pinneds = [[${@dict.getType('is_pinned')}]];
var statuss = [[${@dict.getType('sys_data_status')}]];
var knowledgeFlags = [[${@dict.getType('knowledge_flag')}]];
var publishStates = [[${@dict.getType('publish_state')}]];
var examineStates = [[${@dict.getType('examine_state')}]];
var prefix = ctx + "small/library";
$(function () {
var exportb = [[${@permission.hasPermi('system:post:export')}]];
var exportboolen = (exportb==""?true:false)
initTable();
});
function initTable() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
@ -80,10 +91,6 @@
sortName: "srot",
modalName: "知识点",
uniqueId:"guid",
showCustomExport:exportboolen,
customExportFunction:function(){
$.table.exportExcel();
},
columns: [{
checkbox: true
},
@ -118,14 +125,28 @@
// return $.table.selectDictLabel(knowledgeFlags, value);
}
},
// {
// field: 'state',
// title: '状态',
// align: 'center',
// formatter: function (value, row, index) {
// return $.table.selectDictLabel(datas, value);
// }
// },
{
field : 'status',
title : '状态',
visible: false,
formatter : function (value, row, index) {
return $.table.selectDictLabel(statuss, value);
}
},
{
field : 'type',
title : '类型',
formatter : function (value, row, index) {
return $.table.selectDictLabel(types, value);
}
},
{
field : 'pinned',
title : '置顶',
formatter : function (value, row, index) {
return $.table.selectDictLabel(pinneds, value);
}
},
{
field: 'publishdate',
title: '发布时间',
@ -153,16 +174,97 @@
align: 'center',
formatter: function (value, row, index) {
var actions = [];
// actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.postId + '\',813,420)"><i class="fa fa-eye"></i> 查看</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.guid + '\')"><i class="fa fa-edit"></i> 详情</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.guid + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.guid + '\')"><i class="fa fa-remove"></i> 删除</a>');
// if (row.publishstate == 0) {
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="publishState(1)"><i class="fa fa-edit"></i> 发布</a> ');
// } else if (row.publishstate == 1 || row.publishstate == 3) {
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="publishState(3)"><i class="fa fa-edit"></i> 下线</a> ');
// }
return actions.join('');
}
}]
};
$.table.init(options);
});
}
/** 发布 */
function toPublishState(key, state) {
$.ajax({
type: "POST",
url: prefix + "/toPublishState",
data: {guid:key,publishstate:state},
dataType: 'json',
success: function (result) {
console.log(result);
$.table.refresh();
},
error: function (error) {
$.modal.alertWarning("操作失败");
}
});
}
/** 批量发布/下线 */
function publishState(state) {
var ids = "";
var isRemove = true;
var row = $("#" + table.options.id).bootstrapTable('getSelections');
for (var i=0; i<row.length; i++) {
if (row[i].publishstate == 0 && state == 3) {
$.modal.msgWarning("所选存在未发布数据, 无法执行下线操作!");
isRemove = false;
return;
}
if (state == 1 && row[i].publishstate == 1) {
} else {
ids += row[i].guid +",";
}
}
if (isRemove && ids.length>0) {
$.modal.confirm("确定执行【所选数据】吗?", function() {
$.operate.submit(prefix+"/toPublishState", "post", "json", {ids: ids, state: state}, function(result) {
$.table.search();
})
});
} else {
$.modal.msgWarning("没有需要执行的数据!");
return;
}
}
/** 删除 */
function removeAll() {
var ids = "";
var isRemove = true;
var row = $("#" + table.options.id).bootstrapTable('getSelections');
for (var i=0; i<row.length; i++) {
if (row[i].publishstate == 1) {
$.modal.msgWarning("所选存在已发布数据, 无法执行删除操作!");
isRemove = false;
return;
}
ids += row[i].guid +",";
}
if (isRemove) {
$.modal.confirm("确定删除【所选数据】吗?", function() {
$.operate.submit(prefix+"/remove", "post", "json", {ids: ids}, function(result) {
$.table.search();
})
});
}
}
function sendButton(){
var row = $("#" + table.options.id).bootstrapTable('getSelections')[0];
if(row.examinestate!=0){
$.modal.msgError("该数据在审核中或者已经审核完成!");
return false;
}
FlowButton.SendButton("c392bb50-2001-462b-bc88-cdcdfcbcbbc3",row.guid,function(){
$.table.search();
});
}
</script>
</body>

6
lib/EmergencyService/zdxtEmergencyKnowledgeService/pom.xml

@ -30,6 +30,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>EmergencyServiceApi</groupId>
<artifactId>emergencyKnowledgeServiceApi</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

38
lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/controller/KnowledgeLibraryController.java

@ -1,5 +1,6 @@
package com.zdxt.knowledge.controller;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@ -8,7 +9,7 @@ import com.zdxt.auth.feign.DictDataApi;
import com.zdxt.common.ZDResponse;
import com.zdxt.common.controller.BaseController;
import com.zdxt.common.util.TableDataInfo;
import com.zdxt.domain.auth.Post;
import com.zdxt.flow.util.DateUtil;
import com.zdxt.knowledge.domain.KnowledgeLibrary;
import com.zdxt.knowledge.service.IKnowledgeLibraryService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -116,7 +117,6 @@ public class KnowledgeLibraryController extends BaseController
/**
* 知识库详情
*/
@RequiresPermissions("small:library:view")
@GetMapping("/detail/{guid}")
public String detail(@PathVariable("guid") String guid, ModelMap mmap)
{
@ -149,6 +149,18 @@ public class KnowledgeLibraryController extends BaseController
return resNum>0?ZDResponse.success("操作成功", resNum):ZDResponse.error("操作失败", resNum);
}
/**
* 修改发布状态
*/
@RequiresPermissions("small:library:edit")
@PostMapping("/toPublishState")
@ResponseBody
public ZDResponse toPublishState(String ids, String state)
{
int resNum = knowledgeLibraryService.updatePublishState(ids, state);
return resNum>0?ZDResponse.success("操作成功", resNum):ZDResponse.error("操作失败", resNum);
}
/**
* 查询附件信息
* @param key
@ -189,4 +201,26 @@ public class KnowledgeLibraryController extends BaseController
return ZDResponse.error("操作失败");
}
}
@GetMapping("/launch")
public String launch(ModelMap mmap) {
mmap.put("date", new Date());
return prefix + "/launch";
}
/**
* 管理科审核
*/
@GetMapping("/glksh")
public String glksh(ModelMap mmap) {
mmap.put("date", new Date());
return prefix + "/glksh";
}
@GetMapping("/getFlowEP")
@ResponseBody
public ZDResponse getFlowEV(String id){
KnowledgeLibrary library = knowledgeLibraryService.selectKnowledgeLibraryById(id);
return ZDResponse.success("",library);
}
}

36
lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/domain/KnowledgeLibrary.java

@ -33,8 +33,14 @@ public class KnowledgeLibrary extends BaseDomain
/** 排序 */
private Long srot;
/** 状态 */
private String state;
/** 类型(1:消防,2:地震灾害,3:地质灾害) */
private Integer type;
/** 是否置顶(0:否,1:是) */
private Integer pinned;
/** 状态(0:正常,1:停用) */
private Integer status;
/** 发布时间 */
private String publishdate;
@ -42,7 +48,7 @@ public class KnowledgeLibrary extends BaseDomain
/** 发布状态(0:待发布,1:已发布,2:已上线,3:已下线) */
private Integer publishstate;
/** 审核状态(0:未审核,1:已审核) */
/** 审核状态(0:未审核,1:警员审核,2:管理科审核) */
private Integer examinestate;
public String getGuid() {
@ -93,12 +99,28 @@ public class KnowledgeLibrary extends BaseDomain
this.srot = srot;
}
public String getState() {
return state;
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getPinned() {
return pinned;
}
public void setPinned(Integer pinned) {
this.pinned = pinned;
}
public Integer getStatus() {
return status;
}
public void setState(String state) {
this.state = state;
public void setStatus(Integer status) {
this.status = status;
}
public String getPublishdate() {

8
lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/mapper/KnowledgeLibraryMapper.java

@ -1,6 +1,7 @@
package com.zdxt.knowledge.mapper;
import com.zdxt.knowledge.domain.KnowledgeLibrary;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -59,4 +60,11 @@ public interface KnowledgeLibraryMapper
* @return 结果
*/
public int deleteKnowledgeLibraryByIds(String[] guids);
/**
* 批量修改发布状态
* @param guids
* @return
*/
public int updatePublishState(@Param("guids") String[] guids, @Param("state") String state, @Param("publishdate") String publishdate);
}

8
lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/service/IKnowledgeLibraryService.java

@ -44,6 +44,7 @@ public interface IKnowledgeLibraryService
* @param knowledgeLibrary 知识库
* @return 结果
*/
public int updateKnowledgeLibrary(KnowledgeLibrary knowledgeLibrary);
public int updateKnowledgeLibrary(KnowledgeLibrary knowledgeLibrary, MultipartFile[] files);
/**
@ -62,6 +63,13 @@ public interface IKnowledgeLibraryService
*/
public int deleteKnowledgeLibraryById(String guid);
/**
* 批量修改发布状态
* @param ids
* @return
*/
public int updatePublishState(String ids, String state);
/**
* 查询附件
* @param key

19
lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/service/impl/KnowledgeLibraryServiceImpl.java

@ -9,6 +9,7 @@ import com.zdxt.auth.dto.ZdxtFileBean;
import com.zdxt.auth.feign.FileUploadApi;
import com.zdxt.auth.feign.ZdxtFileCommonApi;
import com.zdxt.common.util.Convert;
import com.zdxt.common.util.DateUtils;
import com.zdxt.common.util.StringUtils;
import com.zdxt.common.zdxtFile.AttFileRespDTO;
import com.zdxt.common.zdxtFile.FilePreviewUtilBean;
@ -80,6 +81,18 @@ public class KnowledgeLibraryServiceImpl implements IKnowledgeLibraryService
return resNum;
}
/**
* 修改知识库
*
* @param knowledgeLibrary 知识库
* @return 结果
*/
@Override
public int updateKnowledgeLibrary(KnowledgeLibrary knowledgeLibrary)
{
return knowledgeLibraryMapper.updateKnowledgeLibrary(knowledgeLibrary);
}
/**
* 修改知识库
*
@ -125,6 +138,12 @@ public class KnowledgeLibraryServiceImpl implements IKnowledgeLibraryService
return knowledgeLibraryMapper.deleteKnowledgeLibraryById(guid);
}
@Override
public int updatePublishState(String ids, String state) {
String publishdate = DateUtils.getTime();
return knowledgeLibraryMapper.updatePublishState(Convert.toStrArray(ids), state, publishdate);
}
@Override
public AttFileRespDTO queryFiles(String key) {
ZdxtFileBean zdxtFileBeanCondition = new ZdxtFileBean();

34
lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/resources/mapper/KnowledgeLibraryMapper.xml

@ -11,7 +11,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="content" column="content" />
<result property="flag" column="flag" />
<result property="srot" column="srot" />
<result property="state" column="state" />
<result property="type" column="type" />
<result property="pinned" column="pinned" />
<result property="status" column="status" />
<result property="publishdate" column="publishDate" />
<result property="publishstate" column="publishState" />
<result property="examinestate" column="examineState" />
@ -22,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectKnowledgeLibraryVo">
select guid, title, sub_title, content, flag, srot, state, publishDate, publishState, examineState, creator, create_time, updator, update_time from knowledge_library
select guid, title, sub_title, content, flag, srot, type, pinned, status, publishDate, publishState, examineState, creator, create_time, updator, update_time from knowledge_library
</sql>
<select id="selectKnowledgeLibraryList" parameterType="KnowledgeLibrary" resultMap="KnowledgeLibraryResult">
@ -33,7 +35,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="flag != null and flag != ''"> and flag = #{flag}</if>
<if test="srot != null "> and srot = #{srot}</if>
<if test="state != null and state != ''"> and state = #{state}</if>
<if test="type != null "> and type = #{type}</if>
<if test="pinned != null "> and pinned = #{pinned}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="publishdate != null and publishdate != ''"> and publishDate = #{publishdate}</if>
<if test="publishstate != null "> and publishState = #{publishstate}</if>
<if test="examinestate != null "> and examineState = #{examinestate}</if>
@ -56,7 +60,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content != null and content != ''">content,</if>
<if test="flag != null and flag != ''">flag,</if>
<if test="srot != null ">srot,</if>
<if test="state != null and state != ''">state,</if>
<if test="type != null ">type,</if>
<if test="pinned != null ">pinned,</if>
<if test="status != null and status != ''">status,</if>
<if test="publishdate != null and publishdate != ''">publishDate,</if>
<if test="publishstate != null ">publishState,</if>
<if test="examinestate != null ">examineState,</if>
@ -72,7 +78,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content != null and content != ''">#{content},</if>
<if test="flag != null and flag != ''">#{flag},</if>
<if test="srot != null ">#{srot},</if>
<if test="state != null and state != ''">#{state},</if>
<if test="type != null ">#{type},</if>
<if test="pinned != null ">#{pinned},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="publishdate != null and publishdate != ''">#{publishdate},</if>
<if test="publishstate != null ">#{publishstate},</if>
<if test="examinestate != null ">#{examinestate},</if>
@ -91,7 +99,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content != null and content != ''">content = #{content},</if>
<if test="flag != null and flag != ''">flag = #{flag},</if>
<if test="srot != null ">srot = #{srot},</if>
<if test="state != null and state != ''">state = #{state},</if>
<if test="type != null ">type = #{type},</if>
<if test="pinned != null ">pinned = #{pinned},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="publishdate != null and publishdate != ''">publishDate = #{publishdate},</if>
<if test="publishstate != null ">publishState = #{publishstate},</if>
<if test="examinestate != null ">examineState = #{examinestate},</if>
@ -113,5 +123,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{guid}
</foreach>
</delete>
<update id="updatePublishState" parameterType="String">
update knowledge_library
<trim prefix="SET" suffixOverrides=",">
<if test="state == 1">publishDate = #{publishdate},</if>
<if test="state != null">publishState = #{state},</if>
</trim>
where guid in
<foreach item="guid" collection="guids" open="(" separator="," close=")">
#{guid}
</foreach>
</update>
</mapper>

85
lib/EmergencyServiceApi/pom.xml

@ -1,43 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>EmergencyServiceApi</groupId>
<artifactId>EmergencyServiceApi</artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<modules>
<module>EmergencyAuthServiceApi</module>
<module>emergencyCommonServiceApi</module>
<module>emergencyExcelServiceApi</module>
</modules>
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.21</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>5.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>EmergencyBaseLib</groupId>
<artifactId>EmergencyCommon</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>EmergencyServiceApi</groupId>
<artifactId>EmergencyServiceApi</artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<modules>
<module>EmergencyAuthServiceApi</module>
<module>emergencyCommonServiceApi</module>
<module>emergencyExcelServiceApi</module>
<module>emergencyKnowledgeServiceApi</module>
</modules>
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.21</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>5.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>EmergencyBaseLib</groupId>
<artifactId>EmergencyCommon</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</project>
Loading…
Cancel
Save