1、新增评论、回复功能
2、工具发布权限完善一部分
This commit is contained in:
parent
f0a14bcd3c
commit
d732771032
@ -107,7 +107,6 @@ public class DocumentCategoryController extends BaseController
|
||||
/**
|
||||
* 获取文档分类树列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:category:tree:list')")
|
||||
@GetMapping("/documentTree")
|
||||
public AjaxResult deptTree(DocumentCategory documentCategory)
|
||||
{
|
||||
|
@ -10,6 +10,7 @@ import com.rzdata.common.utils.poi.ExcelUtil;
|
||||
import com.rzdata.web.domain.Document;
|
||||
import com.rzdata.web.service.IDocumentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@ -31,6 +32,7 @@ public class DocumentController extends BaseController
|
||||
/**
|
||||
* 查询【文档资源信息】列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('document:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Document Document)
|
||||
{
|
||||
@ -43,12 +45,13 @@ public class DocumentController extends BaseController
|
||||
* 导出【文档资源信息】列表
|
||||
*/
|
||||
@Log(title = "【文档资源信息】", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('document:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Document Document)
|
||||
public void export(HttpServletResponse response, Document document)
|
||||
{
|
||||
List<Document> list = documentService.selectDocumentList(Document);
|
||||
List<Document> list = documentService.selectDocumentList(document);
|
||||
ExcelUtil<Document> util = new ExcelUtil<Document>(Document.class);
|
||||
util.exportExcel(response, list, "【文档资源信息】数据");
|
||||
util.exportExcel(response, list, "【文档资源信息】数据", document.getExcludeFields());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -64,6 +67,7 @@ public class DocumentController extends BaseController
|
||||
* 新增【文档资源信息】
|
||||
*/
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@PreAuthorize("@ss.hasPermi('document:add')")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Document Document)
|
||||
{
|
||||
@ -78,6 +82,7 @@ public class DocumentController extends BaseController
|
||||
* 修改【文档资源信息】
|
||||
*/
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@PreAuthorize("@ss.hasPermi('document:edit')")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Document Document)
|
||||
{
|
||||
@ -88,6 +93,7 @@ public class DocumentController extends BaseController
|
||||
* 删除【文档资源信息】
|
||||
*/
|
||||
@Log(title = "【逻辑删除-文档资源信息】", businessType = BusinessType.DELETE)
|
||||
@PreAuthorize("@ss.hasPermi('document:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
@ -98,6 +104,7 @@ public class DocumentController extends BaseController
|
||||
* 发布文档
|
||||
*/
|
||||
@Log(title = "【发布逻辑】", businessType = BusinessType.UPDATE)
|
||||
@PreAuthorize("@ss.hasPermi('document:push')")
|
||||
@PutMapping("/pushDoc/{ids}")
|
||||
public AjaxResult pushDoc(@PathVariable String[] ids)
|
||||
{
|
||||
|
@ -55,7 +55,6 @@ public class SysUserController extends BaseController
|
||||
/**
|
||||
* 获取用户列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysUser user)
|
||||
{
|
||||
@ -246,7 +245,7 @@ public class SysUserController extends BaseController
|
||||
/**
|
||||
* 获取部门树列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||
@GetMapping("/deptTree")
|
||||
public AjaxResult deptTree(SysDept dept)
|
||||
{
|
||||
|
@ -0,0 +1,102 @@
|
||||
package com.rzdata.web.controller.tool;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.rzdata.web.domain.Discussions;
|
||||
import com.rzdata.web.service.IDiscussionsService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.rzdata.common.annotation.Log;
|
||||
import com.rzdata.common.core.controller.BaseController;
|
||||
import com.rzdata.common.core.domain.AjaxResult;
|
||||
import com.rzdata.common.enums.BusinessType;
|
||||
import com.rzdata.common.utils.poi.ExcelUtil;
|
||||
import com.rzdata.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 讨论Controller
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/discussions")
|
||||
public class DiscussionsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDiscussionsService discussionsService;
|
||||
|
||||
/**
|
||||
* 查询讨论列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Discussions discussions)
|
||||
{
|
||||
List<Discussions> list = discussionsService.selectDiscussionsList(discussions);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出讨论列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:discussions:export')")
|
||||
@Log(title = "讨论", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Discussions discussions)
|
||||
{
|
||||
List<Discussions> list = discussionsService.selectDiscussionsList(discussions);
|
||||
ExcelUtil<Discussions> util = new ExcelUtil<Discussions>(Discussions.class);
|
||||
util.exportExcel(response, list, "讨论数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取讨论详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:discussions:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(discussionsService.selectDiscussionsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增讨论
|
||||
*/
|
||||
@Log(title = "讨论", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Discussions discussions)
|
||||
{
|
||||
return toAjax(discussionsService.insertDiscussions(discussions));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改讨论
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:discussions:edit')")
|
||||
@Log(title = "讨论", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Discussions discussions)
|
||||
{
|
||||
return toAjax(discussionsService.updateDiscussions(discussions));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除讨论
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:discussions:remove')")
|
||||
@Log(title = "讨论", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(discussionsService.deleteDiscussionsByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.rzdata.web.controller.tool;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.rzdata.web.domain.Replies;
|
||||
import com.rzdata.web.service.IRepliesService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.rzdata.common.annotation.Log;
|
||||
import com.rzdata.common.core.controller.BaseController;
|
||||
import com.rzdata.common.core.domain.AjaxResult;
|
||||
import com.rzdata.common.enums.BusinessType;
|
||||
import com.rzdata.common.utils.poi.ExcelUtil;
|
||||
import com.rzdata.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 回复Controller
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/replies")
|
||||
public class RepliesController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRepliesService repliesService;
|
||||
|
||||
/**
|
||||
* 查询回复列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:replies:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Replies replies)
|
||||
{
|
||||
startPage();
|
||||
List<Replies> list = repliesService.selectRepliesList(replies);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出回复列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:replies:export')")
|
||||
@Log(title = "回复", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Replies replies)
|
||||
{
|
||||
List<Replies> list = repliesService.selectRepliesList(replies);
|
||||
ExcelUtil<Replies> util = new ExcelUtil<Replies>(Replies.class);
|
||||
util.exportExcel(response, list, "回复数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取回复详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:replies:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(repliesService.selectRepliesById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增回复
|
||||
*/
|
||||
@Log(title = "回复", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Replies replies)
|
||||
{
|
||||
return toAjax(repliesService.insertReplies(replies));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改回复
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:replies:edit')")
|
||||
@Log(title = "回复", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Replies replies)
|
||||
{
|
||||
return toAjax(repliesService.updateReplies(replies));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除回复
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:replies:remove')")
|
||||
@Log(title = "回复", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(repliesService.deleteRepliesByIds(ids));
|
||||
}
|
||||
}
|
@ -23,6 +23,7 @@ import com.rzdata.web.service.IUseApplyService;
|
||||
import com.rzdata.web.service.WorkflowService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@ -59,6 +60,7 @@ public class ToolController extends BaseController
|
||||
/**
|
||||
* 查询工具信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('tool:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Tool tool)
|
||||
{
|
||||
|
@ -0,0 +1,51 @@
|
||||
package com.rzdata.web.domain;
|
||||
|
||||
import com.rzdata.common.annotation.Excel;
|
||||
import com.rzdata.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 讨论对象 t_discussions
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
@Data
|
||||
public class Discussions extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** 业务id */
|
||||
@Excel(name = "业务id")
|
||||
private String businessId;
|
||||
|
||||
/** 业务类型;(doc:文档,tool:工具) */
|
||||
@Excel(name = "业务类型;", readConverterExp = "d=oc:文档,tool:工具")
|
||||
private String type;
|
||||
|
||||
/** 内容 */
|
||||
@Excel(name = "内容")
|
||||
private String content;
|
||||
|
||||
/** 逻辑删除;(1:删除,0:未删除) */
|
||||
@Excel(name = "逻辑删除;", readConverterExp = "1=:删除,0:未删除")
|
||||
private String isDelete;
|
||||
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private String createById;
|
||||
|
||||
/** 更新人id */
|
||||
@Excel(name = "更新人id")
|
||||
private String updateById;
|
||||
|
||||
private String nickName;
|
||||
|
||||
|
||||
private List<Replies> repliesList;
|
||||
}
|
@ -1,11 +1,13 @@
|
||||
package com.rzdata.web.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.rzdata.common.annotation.Excel;
|
||||
import com.rzdata.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -16,6 +18,7 @@ import java.util.List;
|
||||
*/
|
||||
@Data
|
||||
public class Document extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@ -30,35 +33,41 @@ public class Document extends BaseEntity {
|
||||
private String docName;
|
||||
|
||||
/** 文档类别 */
|
||||
@Excel(name = "文档类别")
|
||||
@Excel(name = "类别", dictType="doc_class")
|
||||
private String docType;
|
||||
|
||||
/** 文档负责人 */
|
||||
@Excel(name = "文档负责人")
|
||||
@Excel(name = "负责人")
|
||||
private String docPrincipals;
|
||||
|
||||
/** 归属单位 **/
|
||||
@Excel(name = "归属单位")
|
||||
private String docRespDeptName;
|
||||
|
||||
/** 文档归属部门 */
|
||||
@Excel(name = "文档归属部门")
|
||||
private String docRespDept;
|
||||
|
||||
/** 文档来源 */
|
||||
@Excel(name = "文档来源")
|
||||
@Excel(name = "来源", dictType="doc_source")
|
||||
private String docSource;
|
||||
|
||||
/**
|
||||
* 工具名称
|
||||
*/
|
||||
@Excel(name = "工具名称")
|
||||
private String toolName;
|
||||
|
||||
/** 文档状态 */
|
||||
@Excel(name = "文档状态")
|
||||
@Excel(name = "上传状态", dictType="doc_upload_status")
|
||||
private String docStatus;
|
||||
|
||||
/** 文档地址 */
|
||||
@Excel(name = "文档地址")
|
||||
private String docUrl;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
/** 文档分类id */
|
||||
@Excel(name = "文档分类id")
|
||||
private String docCategoryId;
|
||||
|
||||
/** 创建人id */
|
||||
@ -76,13 +85,15 @@ public class Document extends BaseEntity {
|
||||
|
||||
/** 关联工具id对象 */
|
||||
private String toolId;
|
||||
/**
|
||||
* 工具名称
|
||||
*/
|
||||
private String toolName;
|
||||
|
||||
/** 工具信息 **/
|
||||
private Tool tool;
|
||||
|
||||
/** 文档部门名称 **/
|
||||
private String docRespDeptName;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "创建时间", dateFormat="yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
private List<String> excludeFields;
|
||||
}
|
||||
|
@ -0,0 +1,46 @@
|
||||
package com.rzdata.web.domain;
|
||||
|
||||
import com.rzdata.common.annotation.Excel;
|
||||
import com.rzdata.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 回复对象 t_replies
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
@Data
|
||||
public class Replies extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** 讨论表id */
|
||||
@Excel(name = "讨论表id")
|
||||
private String discussionId;
|
||||
|
||||
/** 内容 */
|
||||
@Excel(name = "内容")
|
||||
private String content;
|
||||
|
||||
/** 逻辑删除;(1:删除,0:未删除) */
|
||||
@Excel(name = "逻辑删除;", readConverterExp = "1=:删除,0:未删除")
|
||||
private String isDelete;
|
||||
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private String createById;
|
||||
|
||||
/** 更新人id */
|
||||
@Excel(name = "更新人id")
|
||||
private String updateById;
|
||||
|
||||
private String nickName;
|
||||
|
||||
private List<String> discussionIdList;
|
||||
}
|
@ -1,13 +1,9 @@
|
||||
package com.rzdata.web.domain;
|
||||
|
||||
import com.rzdata.common.annotation.Excel;
|
||||
import com.rzdata.common.annotation.Excels;
|
||||
import com.rzdata.common.core.domain.BaseEntity;
|
||||
import com.rzdata.common.core.domain.entity.SysDept;
|
||||
import com.rzdata.web.domain.bo.BpmClientInputModelBo;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -0,0 +1,62 @@
|
||||
package com.rzdata.web.mapper;
|
||||
|
||||
import com.rzdata.web.domain.Discussions;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 讨论Mapper接口
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
public interface DiscussionsMapper
|
||||
{
|
||||
/**
|
||||
* 查询讨论
|
||||
*
|
||||
* @param id 讨论主键
|
||||
* @return 讨论
|
||||
*/
|
||||
public Discussions selectDiscussionsById(String id);
|
||||
|
||||
/**
|
||||
* 查询讨论列表
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 讨论集合
|
||||
*/
|
||||
public List<Discussions> selectDiscussionsList(Discussions discussions);
|
||||
|
||||
/**
|
||||
* 新增讨论
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDiscussions(Discussions discussions);
|
||||
|
||||
/**
|
||||
* 修改讨论
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDiscussions(Discussions discussions);
|
||||
|
||||
/**
|
||||
* 删除讨论
|
||||
*
|
||||
* @param id 讨论主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDiscussionsById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除讨论
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDiscussionsByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.rzdata.web.mapper;
|
||||
|
||||
import com.rzdata.web.domain.Replies;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 回复Mapper接口
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
public interface RepliesMapper
|
||||
{
|
||||
/**
|
||||
* 查询回复
|
||||
*
|
||||
* @param id 回复主键
|
||||
* @return 回复
|
||||
*/
|
||||
public Replies selectRepliesById(String id);
|
||||
|
||||
/**
|
||||
* 查询回复列表
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 回复集合
|
||||
*/
|
||||
public List<Replies> selectRepliesList(Replies replies);
|
||||
|
||||
/**
|
||||
* 新增回复
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertReplies(Replies replies);
|
||||
|
||||
/**
|
||||
* 修改回复
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateReplies(Replies replies);
|
||||
|
||||
/**
|
||||
* 删除回复
|
||||
*
|
||||
* @param id 回复主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRepliesById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除回复
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRepliesByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.rzdata.web.service;
|
||||
|
||||
import com.rzdata.web.domain.Discussions;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 讨论Service接口
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
public interface IDiscussionsService
|
||||
{
|
||||
/**
|
||||
* 查询讨论
|
||||
*
|
||||
* @param id 讨论主键
|
||||
* @return 讨论
|
||||
*/
|
||||
public Discussions selectDiscussionsById(String id);
|
||||
|
||||
/**
|
||||
* 查询讨论列表
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 讨论集合
|
||||
*/
|
||||
public List<Discussions> selectDiscussionsList(Discussions discussions);
|
||||
|
||||
/**
|
||||
* 新增讨论
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDiscussions(Discussions discussions);
|
||||
|
||||
/**
|
||||
* 修改讨论
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDiscussions(Discussions discussions);
|
||||
|
||||
/**
|
||||
* 批量删除讨论
|
||||
*
|
||||
* @param ids 需要删除的讨论主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDiscussionsByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除讨论信息
|
||||
*
|
||||
* @param id 讨论主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDiscussionsById(String id);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.rzdata.web.service;
|
||||
|
||||
import com.rzdata.web.domain.Replies;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 回复Service接口
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
public interface IRepliesService
|
||||
{
|
||||
/**
|
||||
* 查询回复
|
||||
*
|
||||
* @param id 回复主键
|
||||
* @return 回复
|
||||
*/
|
||||
public Replies selectRepliesById(String id);
|
||||
|
||||
/**
|
||||
* 查询回复列表
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 回复集合
|
||||
*/
|
||||
public List<Replies> selectRepliesList(Replies replies);
|
||||
|
||||
/**
|
||||
* 新增回复
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertReplies(Replies replies);
|
||||
|
||||
/**
|
||||
* 修改回复
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateReplies(Replies replies);
|
||||
|
||||
/**
|
||||
* 批量删除回复
|
||||
*
|
||||
* @param ids 需要删除的回复主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRepliesByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除回复信息
|
||||
*
|
||||
* @param id 回复主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRepliesById(String id);
|
||||
}
|
@ -0,0 +1,142 @@
|
||||
package com.rzdata.web.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import com.rzdata.common.constant.Constants;
|
||||
import com.rzdata.common.utils.DateUtils;
|
||||
import com.rzdata.common.utils.SecurityUtils;
|
||||
import com.rzdata.web.domain.Discussions;
|
||||
import com.rzdata.web.domain.Replies;
|
||||
import com.rzdata.web.mapper.DiscussionsMapper;
|
||||
import com.rzdata.web.service.IDiscussionsService;
|
||||
import com.rzdata.web.service.IRepliesService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 讨论Service业务层处理
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
@Service
|
||||
public class DiscussionsServiceImpl implements IDiscussionsService
|
||||
{
|
||||
@Autowired
|
||||
private DiscussionsMapper discussionsMapper;
|
||||
|
||||
@Autowired
|
||||
private Snowflake snowflake;
|
||||
|
||||
@Autowired
|
||||
private IRepliesService iRepliesService;
|
||||
|
||||
/**
|
||||
* 查询讨论
|
||||
*
|
||||
* @param id 讨论主键
|
||||
* @return 讨论
|
||||
*/
|
||||
@Override
|
||||
public Discussions selectDiscussionsById(String id)
|
||||
{
|
||||
return discussionsMapper.selectDiscussionsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询讨论列表
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 讨论
|
||||
*/
|
||||
@Override
|
||||
public List<Discussions> selectDiscussionsList(Discussions discussions)
|
||||
{
|
||||
List<Discussions> discussionsList = discussionsMapper.selectDiscussionsList(discussions);
|
||||
//组装回复对象数据
|
||||
assembleReplies(discussionsList);
|
||||
return discussionsList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 组装回复对象数据
|
||||
* @param discussionsList
|
||||
*/
|
||||
private void assembleReplies(List<Discussions> discussionsList) {
|
||||
List<String> idList = discussionsList.stream().map(Discussions::getId).collect(Collectors.toList());
|
||||
Replies replies = new Replies();
|
||||
replies.setDiscussionIdList(idList);
|
||||
List<Replies> repliesList = iRepliesService.selectRepliesList(replies);
|
||||
if(CollUtil.isNotEmpty(repliesList)){
|
||||
for (Discussions disItem : discussionsList) {
|
||||
List<Replies> addList = new ArrayList<>();
|
||||
for (Replies repItem : repliesList) {
|
||||
if(repItem.getDiscussionId().equals(disItem.getId())){
|
||||
addList.add(repItem);
|
||||
}
|
||||
}
|
||||
if(CollUtil.isNotEmpty(addList)){
|
||||
disItem.setRepliesList(addList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增讨论
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDiscussions(Discussions discussions)
|
||||
{
|
||||
discussions.setId(String.valueOf(snowflake.nextId()));
|
||||
discussions.setCreateTime(DateUtils.getNowDate());
|
||||
discussions.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||
discussions.setCreateById(String.valueOf(SecurityUtils.getLoginUser().getUserId()));
|
||||
discussions.setIsDelete(Constants.STR_ZERO);
|
||||
return discussionsMapper.insertDiscussions(discussions);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改讨论
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDiscussions(Discussions discussions)
|
||||
{
|
||||
discussions.setUpdateTime(DateUtils.getNowDate());
|
||||
return discussionsMapper.updateDiscussions(discussions);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除讨论
|
||||
*
|
||||
* @param ids 需要删除的讨论主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDiscussionsByIds(String[] ids)
|
||||
{
|
||||
return discussionsMapper.deleteDiscussionsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除讨论信息
|
||||
*
|
||||
* @param id 讨论主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDiscussionsById(String id)
|
||||
{
|
||||
return discussionsMapper.deleteDiscussionsById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
package com.rzdata.web.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import com.rzdata.common.constant.Constants;
|
||||
import com.rzdata.common.utils.DateUtils;
|
||||
import com.rzdata.common.utils.SecurityUtils;
|
||||
import com.rzdata.web.domain.Replies;
|
||||
import com.rzdata.web.mapper.RepliesMapper;
|
||||
import com.rzdata.web.service.IRepliesService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 回复Service业务层处理
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
@Service
|
||||
public class RepliesServiceImpl implements IRepliesService
|
||||
{
|
||||
@Autowired
|
||||
private RepliesMapper repliesMapper;
|
||||
|
||||
@Autowired
|
||||
private Snowflake snowflake;
|
||||
|
||||
/**
|
||||
* 查询回复
|
||||
*
|
||||
* @param id 回复主键
|
||||
* @return 回复
|
||||
*/
|
||||
@Override
|
||||
public Replies selectRepliesById(String id)
|
||||
{
|
||||
return repliesMapper.selectRepliesById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询回复列表
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 回复
|
||||
*/
|
||||
@Override
|
||||
public List<Replies> selectRepliesList(Replies replies)
|
||||
{
|
||||
return repliesMapper.selectRepliesList(replies);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增回复
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertReplies(Replies replies)
|
||||
{
|
||||
replies.setId(String.valueOf(snowflake.nextId()));
|
||||
replies.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||
replies.setCreateById(String.valueOf(SecurityUtils.getLoginUser().getUserId()));
|
||||
replies.setCreateTime(new Date());
|
||||
replies.setIsDelete(Constants.STR_ZERO);
|
||||
return repliesMapper.insertReplies(replies);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改回复
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateReplies(Replies replies)
|
||||
{
|
||||
replies.setUpdateTime(DateUtils.getNowDate());
|
||||
return repliesMapper.updateReplies(replies);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除回复
|
||||
*
|
||||
* @param ids 需要删除的回复主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRepliesByIds(String[] ids)
|
||||
{
|
||||
return repliesMapper.deleteRepliesByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除回复信息
|
||||
*
|
||||
* @param id 回复主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRepliesById(String id)
|
||||
{
|
||||
return repliesMapper.deleteRepliesById(id);
|
||||
}
|
||||
}
|
@ -3,6 +3,7 @@ package com.rzdata.web.service.impl;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.BooleanUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.rzdata.common.annotation.DataScope;
|
||||
import com.rzdata.common.constant.Constants;
|
||||
import com.rzdata.common.utils.DateUtils;
|
||||
import com.rzdata.common.utils.SecurityUtils;
|
||||
@ -61,6 +62,7 @@ public class ToolServiceImpl implements IToolService
|
||||
* @return 工具信息
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d")
|
||||
public List<Tool> selectToolList(Tool tool)
|
||||
{
|
||||
if (BooleanUtil.isTrue(tool.getPermissionCheck())) {
|
||||
|
@ -15,6 +15,7 @@ ja:
|
||||
|
||||
# 开发环境配置
|
||||
server:
|
||||
address: 0.0.0.0
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 8080
|
||||
servlet:
|
||||
@ -128,7 +129,12 @@ xss:
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
# 用于雪花算法生成id
|
||||
application:
|
||||
datacenterId: 2
|
||||
workerId: 1
|
||||
|
||||
bpmc:
|
||||
tenantId: TLTC_SYS
|
||||
serviceUrl: http://192.168.2.18:8081/ebpm-process-rest/
|
||||
serviceUrl: http://192.168.2.6:8081/ebpm-process-rest/
|
||||
uniteWorkUrl: http://localhost/tool-tech/workflowRouter
|
||||
|
103
tool-tech-admin/src/main/resources/mapper/DiscussionsMapper.xml
Normal file
103
tool-tech-admin/src/main/resources/mapper/DiscussionsMapper.xml
Normal file
@ -0,0 +1,103 @@
|
||||
<?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.rzdata.web.mapper.DiscussionsMapper">
|
||||
|
||||
<resultMap type="Discussions" id="DiscussionsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="businessId" column="business_id" />
|
||||
<result property="type" column="type" />
|
||||
<result property="content" column="content" />
|
||||
<result property="isDelete" column="is_delete" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createById" column="create_by_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateById" column="update_by_id" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDiscussionsVo">
|
||||
select id, business_id, type, content, is_delete, create_by, create_by_id, create_time, update_by, update_by_id, update_time from t_discussions
|
||||
</sql>
|
||||
|
||||
<select id="selectDiscussionsList" parameterType="Discussions" resultMap="DiscussionsResult">
|
||||
select td.*,su.nick_name
|
||||
from t_discussions td
|
||||
left join sys_user su on su.user_id = td.create_by_id
|
||||
<where>
|
||||
<if test="businessId != null and businessId != ''"> and td.business_id = #{businessId}</if>
|
||||
<if test="type != null and type != ''"> and td.type = #{type}</if>
|
||||
<if test="content != null and content != ''"> and td.content = #{content}</if>
|
||||
<if test="isDelete != null and isDelete != ''"> and td.is_delete = #{isDelete}</if>
|
||||
<if test="createById != null and createById != ''"> and td.create_by_id = #{createById}</if>
|
||||
<if test="updateById != null and updateById != ''"> and td.update_by_id = #{updateById}</if>
|
||||
and td.is_delete = '0'
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDiscussionsById" parameterType="String" resultMap="DiscussionsResult">
|
||||
<include refid="selectDiscussionsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDiscussions" parameterType="Discussions">
|
||||
insert into t_discussions
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="businessId != null">business_id,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="isDelete != null">is_delete,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createById != null">create_by_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateById != null">update_by_id,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="businessId != null">#{businessId},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createById != null">#{createById},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateById != null">#{updateById},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDiscussions" parameterType="Discussions">
|
||||
update t_discussions
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="businessId != null">business_id = #{businessId},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createById != null">create_by_id = #{createById},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateById != null">update_by_id = #{updateById},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDiscussionsById" parameterType="String">
|
||||
delete from t_discussions where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDiscussionsByIds" parameterType="String">
|
||||
delete from t_discussions where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -38,15 +38,21 @@
|
||||
left join t_tool on t_tool.tool_id = td.tool_id
|
||||
left join sys_dept on sys_dept.dept_id = td.doc_resp_dept
|
||||
<where>
|
||||
<if test="docCode != null and docCode != ''"> and td.doc_code = #{docCode}</if>
|
||||
<if test="docCode != null and docCode != ''"> and td.doc_code like concat('%', #{docCode}, '%')</if>
|
||||
<if test="docName != null and docName != ''"> and td.doc_name like concat('%', #{docName}, '%')</if>
|
||||
<if test="docType != null and docType != ''"> and td.doc_type = #{docType}</if>
|
||||
<if test="docPrincipals != null and docPrincipals != ''"> and td.doc_principals = #{docPrincipals}</if>
|
||||
<if test="docPrincipals != null and docPrincipals != ''"> and td.doc_principals like concat('%', #{docPrincipals}, '%')</if>
|
||||
<if test="docRespDept != null and docRespDept != ''"> and td.doc_resp_dept = #{docRespDept}</if>
|
||||
<if test="docSource != null and docSource != ''"> and td.doc_source = #{docSource}</if>
|
||||
<if test="docStatus != null and docStatus != ''"> and td.doc_status = #{docStatus}</if>
|
||||
<if test="toolId != null and toolId != ''"> and td.tool_id = #{toolId}</if>
|
||||
<if test="docCategoryId != null and docCategoryId != ''"> and td.doc_category_id = #{docCategoryId}</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND date_format(td.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(td.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
and td.is_deleted = '0'
|
||||
</where>
|
||||
order by td.create_time desc
|
||||
|
103
tool-tech-admin/src/main/resources/mapper/RepliesMapper.xml
Normal file
103
tool-tech-admin/src/main/resources/mapper/RepliesMapper.xml
Normal file
@ -0,0 +1,103 @@
|
||||
<?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.rzdata.web.mapper.RepliesMapper">
|
||||
|
||||
<resultMap type="Replies" id="RepliesResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="discussionId" column="discussion_id" />
|
||||
<result property="content" column="content" />
|
||||
<result property="isDelete" column="is_delete" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createById" column="create_by_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateById" column="update_by_id" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRepliesVo">
|
||||
select id, discussion_id, content, is_delete, create_by, create_by_id, create_time, update_by, update_by_id, update_time from t_replies
|
||||
</sql>
|
||||
|
||||
<select id="selectRepliesList" parameterType="Replies" resultMap="RepliesResult">
|
||||
select tr.*,su.nick_name
|
||||
from t_replies tr
|
||||
left join sys_user su on su.user_id = tr.create_by_id
|
||||
<where>
|
||||
<if test="discussionId != null and discussionId != ''"> and tr.discussion_id = #{discussionId}</if>
|
||||
<if test="content != null and content != ''"> and tr.content = #{content}</if>
|
||||
<if test="createById != null and createById != ''"> and tr.create_by_id = #{createById}</if>
|
||||
<if test="updateById != null and updateById != ''"> and tr.update_by_id = #{updateById}</if>
|
||||
<if test="discussionIdList != null and discussionIdList.size() > 0">
|
||||
and tr.discussion_id in
|
||||
<foreach item="id" index="index" collection="discussionIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
and tr.is_delete = '0'
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRepliesById" parameterType="String" resultMap="RepliesResult">
|
||||
<include refid="selectRepliesVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertReplies" parameterType="Replies">
|
||||
insert into t_replies
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="discussionId != null">discussion_id,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="isDelete != null">is_delete,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createById != null">create_by_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateById != null">update_by_id,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="discussionId != null">#{discussionId},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createById != null">#{createById},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateById != null">#{updateById},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateReplies" parameterType="Replies">
|
||||
update t_replies
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="discussionId != null">discussion_id = #{discussionId},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createById != null">create_by_id = #{createById},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateById != null">update_by_id = #{updateById},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRepliesById" parameterType="String">
|
||||
delete from t_replies where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRepliesByIds" parameterType="String">
|
||||
delete from t_replies where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -145,8 +145,11 @@
|
||||
|
||||
<select id="selectToolList" parameterType="Tool" resultMap="ToolResult">
|
||||
select u.tool_id, u.tool_code, u.tool_name, u.tool_type, u.tool_source, u.tool_use, u.test_situation, u.function_desc, u.apply_condition, u.operate_explain,u.record_status,u.proc_inst_id,
|
||||
u.tool_principals, u.tool_principals_name, u.tool_resp_dept, u.status, u.create_by, u.create_time, u.remark, d.dept_name as tool_resp_dept_name,u.association from t_tool u
|
||||
left join sys_dept d on u.tool_resp_dept = d.dept_id
|
||||
u.tool_principals, u.tool_principals_name, u.tool_resp_dept, u.status, u.create_by, u.create_time, u.remark, sd.dept_name as tool_resp_dept_name,u.association
|
||||
from t_tool u
|
||||
left join sys_user su on u.create_by = su.user_id
|
||||
left join sys_dept d on d.dept_id = su.dept_Id
|
||||
left join sys_dept sd on u.tool_resp_dept = sd.dept_id
|
||||
where 1=1
|
||||
and u.record_status != 'cancel'
|
||||
<if test="toolId != null and toolId != ''">
|
||||
@ -176,6 +179,7 @@
|
||||
<if test="recordStatus != null and recordStatus != ''">
|
||||
AND u.record_status = #{recordStatus}
|
||||
</if>
|
||||
${params.dataScope}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
@ -42,7 +42,6 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||
* @return 部门信息集合
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d")
|
||||
public List<SysDept> selectDeptList(SysDept dept)
|
||||
{
|
||||
return deptMapper.selectDeptList(dept);
|
||||
@ -57,7 +56,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||
@Override
|
||||
public List<TreeSelect> selectDeptTreeList(SysDept dept)
|
||||
{
|
||||
List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept);
|
||||
List<SysDept> depts = this.selectDeptList(dept);
|
||||
return buildDeptTreeSelect(depts);
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,6 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d", userAlias = "u")
|
||||
public List<SysUser> selectUserList(SysUser user)
|
||||
{
|
||||
return userMapper.selectUserList(user);
|
||||
|
Loading…
x
Reference in New Issue
Block a user