Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
259dfbb71c
@ -0,0 +1,105 @@
|
||||
package com.inspur.web.controller.community;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.inspur.common.annotation.Log;
|
||||
import com.inspur.common.core.controller.BaseController;
|
||||
import com.inspur.common.core.domain.AjaxResult;
|
||||
import com.inspur.common.enums.BusinessType;
|
||||
import com.inspur.community.domain.CommunityPostHeat;
|
||||
import com.inspur.community.service.ICommunityPostHeatService;
|
||||
import com.inspur.common.utils.poi.ExcelUtil;
|
||||
import com.inspur.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 社区帖子热度Controller
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/community/heat")
|
||||
public class CommunityPostHeatController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICommunityPostHeatService communityPostHeatService;
|
||||
|
||||
/**
|
||||
* 查询社区帖子热度列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:heat:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CommunityPostHeat communityPostHeat)
|
||||
{
|
||||
startPage();
|
||||
List<CommunityPostHeat> list = communityPostHeatService.selectCommunityPostHeatList(communityPostHeat);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出社区帖子热度列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:heat:export')")
|
||||
@Log(title = "社区帖子热度", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CommunityPostHeat communityPostHeat)
|
||||
{
|
||||
List<CommunityPostHeat> list = communityPostHeatService.selectCommunityPostHeatList(communityPostHeat);
|
||||
ExcelUtil<CommunityPostHeat> util = new ExcelUtil<CommunityPostHeat>(CommunityPostHeat.class);
|
||||
util.exportExcel(response, list, "社区帖子热度数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取社区帖子热度详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:heat:query')")
|
||||
@GetMapping(value = "/{postId}")
|
||||
public AjaxResult getInfo(@PathVariable("postId") String postId)
|
||||
{
|
||||
return success(communityPostHeatService.selectCommunityPostHeatByPostId(postId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增社区帖子热度
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:heat:add')")
|
||||
@Log(title = "社区帖子热度", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CommunityPostHeat communityPostHeat)
|
||||
{
|
||||
return toAjax(communityPostHeatService.insertCommunityPostHeat(communityPostHeat));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改社区帖子热度
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:heat:edit')")
|
||||
@Log(title = "社区帖子热度", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CommunityPostHeat communityPostHeat)
|
||||
{
|
||||
return toAjax(communityPostHeatService.updateCommunityPostHeat(communityPostHeat));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除社区帖子热度
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:heat:remove')")
|
||||
@Log(title = "社区帖子热度", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{postIds}")
|
||||
public AjaxResult remove(@PathVariable String[] postIds)
|
||||
{
|
||||
return toAjax(communityPostHeatService.deleteCommunityPostHeatByPostIds(postIds));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,115 @@
|
||||
package com.inspur.web.controller.community;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.inspur.common.utils.SecurityUtils;
|
||||
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.inspur.common.annotation.Log;
|
||||
import com.inspur.common.core.controller.BaseController;
|
||||
import com.inspur.common.core.domain.AjaxResult;
|
||||
import com.inspur.common.enums.BusinessType;
|
||||
import com.inspur.community.domain.CommunityPostLike;
|
||||
import com.inspur.community.service.ICommunityPostLikeService;
|
||||
import com.inspur.common.utils.poi.ExcelUtil;
|
||||
import com.inspur.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 社区点赞信息Controller
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/community/like")
|
||||
public class CommunityPostLikeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICommunityPostLikeService communityPostLikeService;
|
||||
|
||||
/**
|
||||
* 查询社区点赞信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:like:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CommunityPostLike communityPostLike)
|
||||
{
|
||||
startPage();
|
||||
List<CommunityPostLike> list = communityPostLikeService.selectCommunityPostLikeList(communityPostLike);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出社区点赞信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:like:export')")
|
||||
@Log(title = "社区点赞信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CommunityPostLike communityPostLike)
|
||||
{
|
||||
List<CommunityPostLike> list = communityPostLikeService.selectCommunityPostLikeList(communityPostLike);
|
||||
ExcelUtil<CommunityPostLike> util = new ExcelUtil<CommunityPostLike>(CommunityPostLike.class);
|
||||
util.exportExcel(response, list, "社区点赞信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取社区点赞信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:like:query')")
|
||||
@GetMapping(value = "/{userId}")
|
||||
public AjaxResult getInfo(@PathVariable("userId") Long userId)
|
||||
{
|
||||
return success(communityPostLikeService.selectCommunityPostLikeByUserId(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增社区点赞信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:like:add')")
|
||||
@Log(title = "社区点赞信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CommunityPostLike communityPostLike)
|
||||
{
|
||||
return toAjax(communityPostLikeService.insertCommunityPostLike(communityPostLike));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改社区点赞信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:like:edit')")
|
||||
@Log(title = "社区点赞信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CommunityPostLike communityPostLike)
|
||||
{
|
||||
return toAjax(communityPostLikeService.updateCommunityPostLike(communityPostLike));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除点赞信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('community:like:remove')")
|
||||
// @Log(title = "社区点赞信息", businessType = BusinessType.DELETE)
|
||||
// @DeleteMapping("/{userIds}")
|
||||
// public AjaxResult remove(@PathVariable Long[] userIds)
|
||||
// {
|
||||
// return toAjax(communityPostLikeService.deleteCommunityPostLikeByUserIds(userIds));
|
||||
// }
|
||||
@PreAuthorize("@ss.hasPermi('community:like:remove')")
|
||||
@Log(title = "社区点赞信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{likePostId}")
|
||||
public AjaxResult remove(@PathVariable String likePostId)
|
||||
{
|
||||
return toAjax(communityPostLikeService.deleteCommunityPostLikeByUserIdandPostId(SecurityUtils.getLoginUser().getUserId(), likePostId));
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
package com.inspur.web.controller.community;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.inspur.community.domain.CommunityComment;
|
||||
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.inspur.common.annotation.Log;
|
||||
import com.inspur.common.core.controller.BaseController;
|
||||
import com.inspur.common.core.domain.AjaxResult;
|
||||
import com.inspur.common.enums.BusinessType;
|
||||
import com.inspur.community.domain.CommunityPostReply;
|
||||
import com.inspur.community.service.ICommunityPostReplyService;
|
||||
import com.inspur.common.utils.poi.ExcelUtil;
|
||||
import com.inspur.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 社区帖子回复Controller
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/community/reply")
|
||||
public class CommunityPostReplyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICommunityPostReplyService communityPostReplyService;
|
||||
|
||||
/**
|
||||
* 查询社区帖子回复列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:reply:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CommunityPostReply communityPostReply)
|
||||
{
|
||||
startPage();
|
||||
List<CommunityComment> list = communityPostReplyService.selectCommunityPostReplyList(communityPostReply);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 导出社区帖子回复列表
|
||||
// */
|
||||
// @PreAuthorize("@ss.hasPermi('community:reply:export')")
|
||||
// @Log(title = "社区帖子回复", businessType = BusinessType.EXPORT)
|
||||
// @PostMapping("/export")
|
||||
// public void export(HttpServletResponse response, CommunityPostReply communityPostReply)
|
||||
// {
|
||||
// List<CommunityPostReply> list = communityPostReplyService.selectCommunityPostReplyList(communityPostReply);
|
||||
// ExcelUtil<CommunityPostReply> util = new ExcelUtil<CommunityPostReply>(CommunityPostReply.class);
|
||||
// util.exportExcel(response, list, "社区帖子回复数据");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取社区帖子回复详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:reply:query')")
|
||||
@GetMapping(value = "/{replyId}")
|
||||
public AjaxResult getInfo(@PathVariable("replyId") String replyId)
|
||||
{
|
||||
return success(communityPostReplyService.selectCommunityPostReplyByReplyId(replyId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增社区帖子回复
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:reply:add')")
|
||||
@Log(title = "社区帖子回复", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CommunityPostReply communityPostReply)
|
||||
{
|
||||
if(communityPostReply.getParentReplyId() == null){
|
||||
communityPostReply.setParentReplyId("0");
|
||||
}else{
|
||||
CommunityPostReply reply = communityPostReplyService.selectCommunityPostReplyByReplyId(communityPostReply.getParentReplyId());
|
||||
if(reply.getRootReplyId() != null) {
|
||||
communityPostReply.setRootReplyId(reply.getRootReplyId());
|
||||
}else{
|
||||
communityPostReply.setRootReplyId(reply.getReplyId());
|
||||
}
|
||||
}
|
||||
return toAjax(communityPostReplyService.insertCommunityPostReply(communityPostReply));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改社区帖子回复
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:reply:edit')")
|
||||
@Log(title = "社区帖子回复", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CommunityPostReply communityPostReply)
|
||||
{
|
||||
return toAjax(communityPostReplyService.updateCommunityPostReply(communityPostReply));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除社区帖子回复
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:reply:remove')")
|
||||
@Log(title = "社区帖子回复", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{replyIds}")
|
||||
public AjaxResult remove(@PathVariable String[] replyIds)
|
||||
{
|
||||
return toAjax(communityPostReplyService.deleteCommunityPostReplyByReplyIds(replyIds));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,105 @@
|
||||
package com.inspur.web.controller.community;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.inspur.common.annotation.Log;
|
||||
import com.inspur.common.core.controller.BaseController;
|
||||
import com.inspur.common.core.domain.AjaxResult;
|
||||
import com.inspur.common.enums.BusinessType;
|
||||
import com.inspur.community.domain.CommunityPostReport;
|
||||
import com.inspur.community.service.ICommunityPostReportService;
|
||||
import com.inspur.common.utils.poi.ExcelUtil;
|
||||
import com.inspur.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 社区帖子举报Controller
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/community/report")
|
||||
public class CommunityPostReportController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICommunityPostReportService communityPostReportService;
|
||||
|
||||
/**
|
||||
* 查询社区帖子举报列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:report:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CommunityPostReport communityPostReport)
|
||||
{
|
||||
startPage();
|
||||
List<CommunityPostReport> list = communityPostReportService.selectCommunityPostReportList(communityPostReport);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出社区帖子举报列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:report:export')")
|
||||
@Log(title = "社区帖子举报", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CommunityPostReport communityPostReport)
|
||||
{
|
||||
List<CommunityPostReport> list = communityPostReportService.selectCommunityPostReportList(communityPostReport);
|
||||
ExcelUtil<CommunityPostReport> util = new ExcelUtil<CommunityPostReport>(CommunityPostReport.class);
|
||||
util.exportExcel(response, list, "社区帖子举报数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取社区帖子举报详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:report:query')")
|
||||
@GetMapping(value = "/{reportId}")
|
||||
public AjaxResult getInfo(@PathVariable("reportId") String reportId)
|
||||
{
|
||||
return success(communityPostReportService.selectCommunityPostReportByReportId(reportId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增社区帖子举报
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:report:add')")
|
||||
@Log(title = "社区帖子举报", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CommunityPostReport communityPostReport)
|
||||
{
|
||||
return toAjax(communityPostReportService.insertCommunityPostReport(communityPostReport));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改社区帖子举报
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:report:edit')")
|
||||
@Log(title = "社区帖子举报", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CommunityPostReport communityPostReport)
|
||||
{
|
||||
return toAjax(communityPostReportService.updateCommunityPostReport(communityPostReport));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除社区帖子举报
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('community:report:remove')")
|
||||
@Log(title = "社区帖子举报", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{reportIds}")
|
||||
public AjaxResult remove(@PathVariable String[] reportIds)
|
||||
{
|
||||
return toAjax(communityPostReportService.deleteCommunityPostReportByReportIds(reportIds));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,118 @@
|
||||
package com.inspur.web.controller.examine;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.xml.rpc.ServiceException;
|
||||
|
||||
import com.inspur.examine.domain.ExamAttestationPeople;
|
||||
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.inspur.common.annotation.Log;
|
||||
import com.inspur.common.core.controller.BaseController;
|
||||
import com.inspur.common.core.domain.AjaxResult;
|
||||
import com.inspur.common.enums.BusinessType;
|
||||
import com.inspur.examine.domain.ExamAttestation;
|
||||
import com.inspur.examine.service.IExamAttestationService;
|
||||
import com.inspur.common.utils.poi.ExcelUtil;
|
||||
import com.inspur.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 认证管理Controller
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/examine/attestation")
|
||||
public class ExamAttestationController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamAttestationService examAttestationService;
|
||||
|
||||
/**
|
||||
* 查询认证管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamAttestation examAttestation)
|
||||
{
|
||||
startPage();
|
||||
List<ExamAttestation> list = examAttestationService.selectExamAttestationList(examAttestation);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出认证管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:export')")
|
||||
@Log(title = "认证管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ExamAttestation examAttestation)
|
||||
{
|
||||
List<ExamAttestation> list = examAttestationService.selectExamAttestationList(examAttestation);
|
||||
ExcelUtil<ExamAttestation> util = new ExcelUtil<ExamAttestation>(ExamAttestation.class);
|
||||
util.exportExcel(response, list, "认证管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取认证管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(examAttestationService.selectExamAttestationById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增认证管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:add')")
|
||||
@Log(title = "认证管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamAttestation examAttestation)
|
||||
{
|
||||
return toAjax(examAttestationService.insertExamAttestation(examAttestation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改认证管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:edit')")
|
||||
@Log(title = "认证管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamAttestation examAttestation)
|
||||
{
|
||||
return toAjax(examAttestationService.updateExamAttestation(examAttestation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除认证管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:remove')")
|
||||
@Log(title = "认证管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(examAttestationService.deleteExamAttestationByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询证书认证名单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:peopleList')")
|
||||
@GetMapping("/peopleList")
|
||||
public TableDataInfo peopleList(ExamAttestationPeople examAttestationPeople) throws ServiceException {
|
||||
startPage();
|
||||
List<ExamAttestationPeople> list = examAttestationService.selectPeopleList(examAttestationPeople);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
@ -102,4 +102,17 @@ public class ExamInfoController extends BaseController
|
||||
{
|
||||
return toAjax(examInfoService.deleteExamInfoByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 考试信息下拉
|
||||
*
|
||||
* @Author xusd
|
||||
* @Date 11:21 2024/5/7
|
||||
* @return java.util.List<com.inspur.examine.domain.ExamInfo>
|
||||
*/
|
||||
@GetMapping("/selection")
|
||||
@PreAuthorize("@ss.hasPermi('examine:examInfo:list')")
|
||||
public List<ExamInfo> selection() {
|
||||
return examInfoService.selection();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,104 @@
|
||||
package com.inspur.web.controller.examine;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.inspur.common.annotation.Log;
|
||||
import com.inspur.common.core.controller.BaseController;
|
||||
import com.inspur.common.core.domain.AjaxResult;
|
||||
import com.inspur.common.enums.BusinessType;
|
||||
import com.inspur.examine.domain.ExamPaperInfo;
|
||||
import com.inspur.examine.service.IExamPaperInfoService;
|
||||
import com.inspur.common.utils.poi.ExcelUtil;
|
||||
import com.inspur.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 试卷信息Controller
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/examine/paperInfo")
|
||||
public class ExamPaperInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamPaperInfoService examPaperInfoService;
|
||||
|
||||
/**
|
||||
* 查询试卷信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:paperInfo:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamPaperInfo examPaperInfo)
|
||||
{
|
||||
startPage();
|
||||
List<ExamPaperInfo> list = examPaperInfoService.selectExamPaperInfoList(examPaperInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出试卷信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:paperInfo:export')")
|
||||
@Log(title = "试卷信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ExamPaperInfo examPaperInfo)
|
||||
{
|
||||
List<ExamPaperInfo> list = examPaperInfoService.selectExamPaperInfoList(examPaperInfo);
|
||||
ExcelUtil<ExamPaperInfo> util = new ExcelUtil<ExamPaperInfo>(ExamPaperInfo.class);
|
||||
util.exportExcel(response, list, "试卷信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取试卷信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:paperInfo:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(examPaperInfoService.selectExamPaperInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增试卷信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:paperInfo:add')")
|
||||
@Log(title = "试卷信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamPaperInfo examPaperInfo)
|
||||
{
|
||||
return toAjax(examPaperInfoService.insertExamPaperInfo(examPaperInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试卷信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:paperInfo:edit')")
|
||||
@Log(title = "试卷信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamPaperInfo examPaperInfo)
|
||||
{
|
||||
return toAjax(examPaperInfoService.updateExamPaperInfo(examPaperInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除试卷信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:paperInfo:remove')")
|
||||
@Log(title = "试卷信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(examPaperInfoService.deleteExamPaperInfoByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,174 @@
|
||||
package com.inspur.community.domain;
|
||||
|
||||
import com.inspur.common.annotation.Excel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author zhangjunwen
|
||||
* @create 2024/5/6
|
||||
*/
|
||||
public class CommunityComment {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String replyId;
|
||||
|
||||
/** 帖子id */
|
||||
@Excel(name = "帖子id")
|
||||
private String postId;
|
||||
|
||||
private Long userId;
|
||||
|
||||
/** 回复用户名称 */
|
||||
@Excel(name = "回复用户名称")
|
||||
private String userName;
|
||||
|
||||
/** 回复内容 */
|
||||
@Excel(name = "回复内容")
|
||||
private String replyContent;
|
||||
|
||||
/** 回复时间 */
|
||||
@Excel(name = "回复时间")
|
||||
private String replyTime;
|
||||
|
||||
/** 父级回复id */
|
||||
@Excel(name = "父级回复id")
|
||||
private String parentReplyId;
|
||||
|
||||
/** 根回复id */
|
||||
@Excel(name = "根回复id")
|
||||
private String rootReplyId;
|
||||
|
||||
/** 状态:0 正常;1 封禁;2 删除 */
|
||||
@Excel(name = "状态:0 正常;1 封禁;2 删除")
|
||||
private String status;
|
||||
|
||||
/** 点赞数量 */
|
||||
@Excel(name = "点赞数量")
|
||||
private Long likeNum;
|
||||
|
||||
/** 头像 */
|
||||
private String avatar;
|
||||
|
||||
/** 回复 */
|
||||
private List<CommunityComment> children;
|
||||
|
||||
/** 点赞 */
|
||||
private boolean isLike;
|
||||
|
||||
private String parentReplyUserName;
|
||||
|
||||
public String getReplyId() {
|
||||
return replyId;
|
||||
}
|
||||
|
||||
public void setReplyId(String replyId) {
|
||||
this.replyId = replyId;
|
||||
}
|
||||
|
||||
public String getPostId() {
|
||||
return postId;
|
||||
}
|
||||
|
||||
public void setPostId(String postId) {
|
||||
this.postId = postId;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getReplyContent() {
|
||||
return replyContent;
|
||||
}
|
||||
|
||||
public void setReplyContent(String replyContent) {
|
||||
this.replyContent = replyContent;
|
||||
}
|
||||
|
||||
public String getReplyTime() {
|
||||
return replyTime;
|
||||
}
|
||||
|
||||
public void setReplyTime(String replyTime) {
|
||||
this.replyTime = replyTime;
|
||||
}
|
||||
|
||||
public String getParentReplyId() {
|
||||
return parentReplyId;
|
||||
}
|
||||
|
||||
public void setParentReplyId(String parentReplyId) {
|
||||
this.parentReplyId = parentReplyId;
|
||||
}
|
||||
|
||||
public String getRootReplyId() {
|
||||
return rootReplyId;
|
||||
}
|
||||
|
||||
public void setRootReplyId(String rootReplyId) {
|
||||
this.rootReplyId = rootReplyId;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getLikeNum() {
|
||||
return likeNum;
|
||||
}
|
||||
|
||||
public void setLikeNum(Long likeNum) {
|
||||
this.likeNum = likeNum;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public List<CommunityComment> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<CommunityComment> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public boolean getIsLike() {
|
||||
return isLike;
|
||||
}
|
||||
|
||||
public void setLike(boolean like) {
|
||||
this.isLike = like;
|
||||
}
|
||||
|
||||
public String getParentReplyUserName() {
|
||||
return parentReplyUserName;
|
||||
}
|
||||
|
||||
public void setParentReplyUserName(String parentReplyUserName) {
|
||||
this.parentReplyUserName = parentReplyUserName;
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package com.inspur.community.domain;
|
||||
|
||||
import com.inspur.common.annotation.Excel;
|
||||
import com.inspur.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 社区帖子热度对象 community_post_heat
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public class CommunityPostHeat extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 帖子id */
|
||||
@Excel(name = "帖子id")
|
||||
private String postId;
|
||||
|
||||
/** 点赞数 */
|
||||
@Excel(name = "点赞数")
|
||||
private Integer likes;
|
||||
|
||||
/** 浏览数 */
|
||||
@Excel(name = "浏览数")
|
||||
private Integer views;
|
||||
|
||||
/** 回复数 */
|
||||
@Excel(name = "回复数")
|
||||
private Integer replies;
|
||||
|
||||
public void setPostId(String postId)
|
||||
{
|
||||
this.postId = postId;
|
||||
}
|
||||
|
||||
public String getPostId()
|
||||
{
|
||||
return postId;
|
||||
}
|
||||
public void setLikes(Integer likes)
|
||||
{
|
||||
this.likes = likes;
|
||||
}
|
||||
|
||||
public Integer getLikes()
|
||||
{
|
||||
return likes;
|
||||
}
|
||||
public void setViews(Integer views)
|
||||
{
|
||||
this.views = views;
|
||||
}
|
||||
|
||||
public Integer getViews()
|
||||
{
|
||||
return views;
|
||||
}
|
||||
public void setReplies(Integer replies)
|
||||
{
|
||||
this.replies = replies;
|
||||
}
|
||||
|
||||
public Integer getReplies()
|
||||
{
|
||||
return replies;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("postId", getPostId())
|
||||
.append("likes", getLikes())
|
||||
.append("views", getViews())
|
||||
.append("replies", getReplies())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.inspur.community.domain;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.inspur.common.annotation.Excel;
|
||||
import com.inspur.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 社区点赞信息对象 community_post_like
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public class CommunityPostLike extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 用户id */
|
||||
private Long userId;
|
||||
|
||||
/** 点赞帖子id */
|
||||
private String likePostId;
|
||||
|
||||
/** 点赞时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "点赞时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date likeTime;
|
||||
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setLikePostId(String likePostId)
|
||||
{
|
||||
this.likePostId = likePostId;
|
||||
}
|
||||
|
||||
public String getLikePostId()
|
||||
{
|
||||
return likePostId;
|
||||
}
|
||||
public void setLikeTime(Date likeTime)
|
||||
{
|
||||
this.likeTime = likeTime;
|
||||
}
|
||||
|
||||
public Date getLikeTime()
|
||||
{
|
||||
return likeTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("userId", getUserId())
|
||||
.append("likePostId", getLikePostId())
|
||||
.append("likeTime", getLikeTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,136 @@
|
||||
package com.inspur.community.domain;
|
||||
|
||||
import com.inspur.common.annotation.Excel;
|
||||
import com.inspur.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 社区帖子回复对象 community_post_reply
|
||||
*
|
||||
* @author zhangjunwen
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public class CommunityPostReply extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String replyId;
|
||||
|
||||
/** 帖子id */
|
||||
@Excel(name = "帖子id")
|
||||
private String postId;
|
||||
|
||||
/** 回复用户id */
|
||||
@Excel(name = "回复用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 回复内容 */
|
||||
@Excel(name = "回复内容")
|
||||
private String replyContent;
|
||||
|
||||
/** 回复时间 */
|
||||
@Excel(name = "回复时间")
|
||||
private String replyTime;
|
||||
|
||||
/** 父级回复id */
|
||||
@Excel(name = "父级回复id")
|
||||
private String parentReplyId;
|
||||
|
||||
/** 根回复id */
|
||||
@Excel(name = "根回复id")
|
||||
private String rootReplyId;
|
||||
|
||||
/** 状态:0 正常;1 封禁;2 删除 */
|
||||
@Excel(name = "状态:0 正常;1 封禁;2 删除")
|
||||
private String status;
|
||||
|
||||
public void setReplyId(String replyId)
|
||||
{
|
||||
this.replyId = replyId;
|
||||
}
|
||||
|
||||
public String getReplyId()
|
||||
{
|
||||
return replyId;
|
||||
}
|
||||
public void setPostId(String postId)
|
||||
{
|
||||
this.postId = postId;
|
||||
}
|
||||
|
||||
public String getPostId()
|
||||
{
|
||||
return postId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setReplyContent(String replyContent)
|
||||
{
|
||||
this.replyContent = replyContent;
|
||||
}
|
||||
|
||||
public String getReplyContent()
|
||||
{
|
||||
return replyContent;
|
||||
}
|
||||
public void setReplyTime(String replyTime)
|
||||
{
|
||||
this.replyTime = replyTime;
|
||||
}
|
||||
|
||||
public String getReplyTime()
|
||||
{
|
||||
return replyTime;
|
||||
}
|
||||
public void setParentReplyId(String parentReplyId)
|
||||
{
|
||||
this.parentReplyId = parentReplyId;
|
||||
}
|
||||
|
||||
public String getParentReplyId()
|
||||
{
|
||||
return parentReplyId;
|
||||
}
|
||||
public void setRootReplyId(String rootReplyId)
|
||||
{
|
||||
this.rootReplyId = rootReplyId;
|
||||
}
|
||||
|
||||
public String getRootReplyId()
|
||||
{
|
||||
return rootReplyId;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("replyId", getReplyId())
|
||||
.append("postId", getPostId())
|
||||
.append("userId", getUserId())
|
||||
.append("replyContent", getReplyContent())
|
||||
.append("replyTime", getReplyTime())
|
||||
.append("parentReplyId", getParentReplyId())
|
||||
.append("rootReplyId", getRootReplyId())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,136 @@
|
||||
package com.inspur.community.domain;
|
||||
|
||||
import com.inspur.common.annotation.Excel;
|
||||
import com.inspur.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 社区帖子举报对象 community_post_report
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public class CommunityPostReport extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 举报id */
|
||||
private String reportId;
|
||||
|
||||
/** 举报用户id */
|
||||
@Excel(name = "举报用户id")
|
||||
private Long reportUserId;
|
||||
|
||||
/** 被举报内容id */
|
||||
@Excel(name = "被举报内容id")
|
||||
private String reportContentId;
|
||||
|
||||
/** 举报时间 */
|
||||
@Excel(name = "举报时间")
|
||||
private String reportTime;
|
||||
|
||||
/** 举报原因 */
|
||||
@Excel(name = "举报原因")
|
||||
private String reportReason;
|
||||
|
||||
/** 状态:0 未处理,1 已处理 */
|
||||
@Excel(name = "状态:0 未处理,1 已处理")
|
||||
private String status;
|
||||
|
||||
/** 举报类型:0 帖子,1 回复 */
|
||||
@Excel(name = "举报类型:0 帖子,1 回复")
|
||||
private String reportType;
|
||||
|
||||
/** 处理结果 */
|
||||
@Excel(name = "处理结果")
|
||||
private String result;
|
||||
|
||||
public void setReportId(String reportId)
|
||||
{
|
||||
this.reportId = reportId;
|
||||
}
|
||||
|
||||
public String getReportId()
|
||||
{
|
||||
return reportId;
|
||||
}
|
||||
public void setReportUserId(Long reportUserId)
|
||||
{
|
||||
this.reportUserId = reportUserId;
|
||||
}
|
||||
|
||||
public Long getReportUserId()
|
||||
{
|
||||
return reportUserId;
|
||||
}
|
||||
public void setReportContentId(String reportContentId)
|
||||
{
|
||||
this.reportContentId = reportContentId;
|
||||
}
|
||||
|
||||
public String getReportContentId()
|
||||
{
|
||||
return reportContentId;
|
||||
}
|
||||
public void setReportTime(String reportTime)
|
||||
{
|
||||
this.reportTime = reportTime;
|
||||
}
|
||||
|
||||
public String getReportTime()
|
||||
{
|
||||
return reportTime;
|
||||
}
|
||||
public void setReportReason(String reportReason)
|
||||
{
|
||||
this.reportReason = reportReason;
|
||||
}
|
||||
|
||||
public String getReportReason()
|
||||
{
|
||||
return reportReason;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setReportType(String reportType)
|
||||
{
|
||||
this.reportType = reportType;
|
||||
}
|
||||
|
||||
public String getReportType()
|
||||
{
|
||||
return reportType;
|
||||
}
|
||||
public void setResult(String result)
|
||||
{
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getResult()
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("reportId", getReportId())
|
||||
.append("reportUserId", getReportUserId())
|
||||
.append("reportContentId", getReportContentId())
|
||||
.append("reportTime", getReportTime())
|
||||
.append("reportReason", getReportReason())
|
||||
.append("status", getStatus())
|
||||
.append("reportType", getReportType())
|
||||
.append("result", getResult())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,71 @@
|
||||
package com.inspur.community.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.community.domain.CommunityPostHeat;
|
||||
|
||||
/**
|
||||
* 社区帖子热度Mapper接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public interface CommunityPostHeatMapper
|
||||
{
|
||||
/**
|
||||
* 查询社区帖子热度
|
||||
*
|
||||
* @param postId 社区帖子热度主键
|
||||
* @return 社区帖子热度
|
||||
*/
|
||||
public CommunityPostHeat selectCommunityPostHeatByPostId(String postId);
|
||||
|
||||
/**
|
||||
* 查询社区帖子热度列表
|
||||
*
|
||||
* @param communityPostHeat 社区帖子热度
|
||||
* @return 社区帖子热度集合
|
||||
*/
|
||||
public List<CommunityPostHeat> selectCommunityPostHeatList(CommunityPostHeat communityPostHeat);
|
||||
|
||||
/**
|
||||
* 新增社区帖子热度
|
||||
*
|
||||
* @param communityPostHeat 社区帖子热度
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommunityPostHeat(CommunityPostHeat communityPostHeat);
|
||||
|
||||
/**
|
||||
* 修改社区帖子热度
|
||||
*
|
||||
* @param communityPostHeat 社区帖子热度
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommunityPostHeat(CommunityPostHeat communityPostHeat);
|
||||
|
||||
/**
|
||||
* 浏览量加一
|
||||
*/
|
||||
public int addViews(String postId);
|
||||
|
||||
/**
|
||||
* 回复量加一
|
||||
*/
|
||||
public int addReplies(String postId);
|
||||
|
||||
/**
|
||||
* 删除社区帖子热度
|
||||
*
|
||||
* @param postId 社区帖子热度主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostHeatByPostId(String postId);
|
||||
|
||||
/**
|
||||
* 批量删除社区帖子热度
|
||||
*
|
||||
* @param postIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostHeatByPostIds(String[] postIds);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.inspur.community.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.community.domain.CommunityPostLike;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 社区点赞信息Mapper接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public interface CommunityPostLikeMapper
|
||||
{
|
||||
/**
|
||||
* 查询社区点赞信息
|
||||
*
|
||||
* @param userId 社区点赞信息主键
|
||||
* @return 社区点赞信息
|
||||
*/
|
||||
public CommunityPostLike selectCommunityPostLikeByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询社区点赞信息列表
|
||||
*
|
||||
* @param communityPostLike 社区点赞信息
|
||||
* @return 社区点赞信息集合
|
||||
*/
|
||||
public List<CommunityPostLike> selectCommunityPostLikeList(CommunityPostLike communityPostLike);
|
||||
|
||||
/**
|
||||
* 根据postid统计点赞数
|
||||
*/
|
||||
public long countCommunityPostLikeByLikePostId(String likePostId);
|
||||
|
||||
/**
|
||||
* 新增社区点赞信息
|
||||
*
|
||||
* @param communityPostLike 社区点赞信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommunityPostLike(CommunityPostLike communityPostLike);
|
||||
|
||||
/**
|
||||
* 修改社区点赞信息
|
||||
*
|
||||
* @param communityPostLike 社区点赞信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommunityPostLike(CommunityPostLike communityPostLike);
|
||||
|
||||
/**
|
||||
* 删除社区点赞信息
|
||||
*
|
||||
* @param userId 社区点赞信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostLikeByUserIdandPostId(@Param("userId")Long userId,
|
||||
@Param("likePostId")String likePostId);
|
||||
|
||||
/**
|
||||
* 批量删除社区点赞信息
|
||||
*
|
||||
* @param userIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostLikeByUserIds(Long[] userIds);
|
||||
}
|
||||
|
@ -0,0 +1,62 @@
|
||||
package com.inspur.community.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.community.domain.CommunityPostReply;
|
||||
|
||||
/**
|
||||
* 社区帖子回复Mapper接口
|
||||
*
|
||||
* @author zhangjunwen
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public interface CommunityPostReplyMapper
|
||||
{
|
||||
/**
|
||||
* 查询社区帖子回复
|
||||
*
|
||||
* @param replyId 社区帖子回复主键
|
||||
* @return 社区帖子回复
|
||||
*/
|
||||
public CommunityPostReply selectCommunityPostReplyByReplyId(String replyId);
|
||||
|
||||
/**
|
||||
* 查询社区帖子回复列表
|
||||
*
|
||||
* @param communityPostReply 社区帖子回复
|
||||
* @return 社区帖子回复集合
|
||||
*/
|
||||
public List<CommunityPostReply> selectCommunityPostReplyList(CommunityPostReply communityPostReply);
|
||||
|
||||
/**
|
||||
* 新增社区帖子回复
|
||||
*
|
||||
* @param communityPostReply 社区帖子回复
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommunityPostReply(CommunityPostReply communityPostReply);
|
||||
|
||||
/**
|
||||
* 修改社区帖子回复
|
||||
*
|
||||
* @param communityPostReply 社区帖子回复
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommunityPostReply(CommunityPostReply communityPostReply);
|
||||
|
||||
/**
|
||||
* 删除社区帖子回复
|
||||
*
|
||||
* @param replyId 社区帖子回复主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostReplyByReplyId(String replyId);
|
||||
|
||||
/**
|
||||
* 批量删除社区帖子回复
|
||||
*
|
||||
* @param replyIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostReplyByReplyIds(String[] replyIds);
|
||||
}
|
||||
|
@ -0,0 +1,62 @@
|
||||
package com.inspur.community.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.community.domain.CommunityPostReport;
|
||||
|
||||
/**
|
||||
* 社区帖子举报Mapper接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public interface CommunityPostReportMapper
|
||||
{
|
||||
/**
|
||||
* 查询社区帖子举报
|
||||
*
|
||||
* @param reportId 社区帖子举报主键
|
||||
* @return 社区帖子举报
|
||||
*/
|
||||
public CommunityPostReport selectCommunityPostReportByReportId(String reportId);
|
||||
|
||||
/**
|
||||
* 查询社区帖子举报列表
|
||||
*
|
||||
* @param communityPostReport 社区帖子举报
|
||||
* @return 社区帖子举报集合
|
||||
*/
|
||||
public List<CommunityPostReport> selectCommunityPostReportList(CommunityPostReport communityPostReport);
|
||||
|
||||
/**
|
||||
* 新增社区帖子举报
|
||||
*
|
||||
* @param communityPostReport 社区帖子举报
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommunityPostReport(CommunityPostReport communityPostReport);
|
||||
|
||||
/**
|
||||
* 修改社区帖子举报
|
||||
*
|
||||
* @param communityPostReport 社区帖子举报
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommunityPostReport(CommunityPostReport communityPostReport);
|
||||
|
||||
/**
|
||||
* 删除社区帖子举报
|
||||
*
|
||||
* @param reportId 社区帖子举报主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostReportByReportId(String reportId);
|
||||
|
||||
/**
|
||||
* 批量删除社区帖子举报
|
||||
*
|
||||
* @param reportIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostReportByReportIds(String[] reportIds);
|
||||
}
|
||||
|
@ -0,0 +1,62 @@
|
||||
package com.inspur.community.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.community.domain.CommunityPostHeat;
|
||||
|
||||
/**
|
||||
* 社区帖子热度Service接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public interface ICommunityPostHeatService
|
||||
{
|
||||
/**
|
||||
* 查询社区帖子热度
|
||||
*
|
||||
* @param postId 社区帖子热度主键
|
||||
* @return 社区帖子热度
|
||||
*/
|
||||
public CommunityPostHeat selectCommunityPostHeatByPostId(String postId);
|
||||
|
||||
/**
|
||||
* 查询社区帖子热度列表
|
||||
*
|
||||
* @param communityPostHeat 社区帖子热度
|
||||
* @return 社区帖子热度集合
|
||||
*/
|
||||
public List<CommunityPostHeat> selectCommunityPostHeatList(CommunityPostHeat communityPostHeat);
|
||||
|
||||
/**
|
||||
* 新增社区帖子热度
|
||||
*
|
||||
* @param communityPostHeat 社区帖子热度
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommunityPostHeat(CommunityPostHeat communityPostHeat);
|
||||
|
||||
/**
|
||||
* 修改社区帖子热度
|
||||
*
|
||||
* @param communityPostHeat 社区帖子热度
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommunityPostHeat(CommunityPostHeat communityPostHeat);
|
||||
|
||||
/**
|
||||
* 批量删除社区帖子热度
|
||||
*
|
||||
* @param postIds 需要删除的社区帖子热度主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostHeatByPostIds(String[] postIds);
|
||||
|
||||
/**
|
||||
* 删除社区帖子热度信息
|
||||
*
|
||||
* @param postId 社区帖子热度主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostHeatByPostId(String postId);
|
||||
}
|
||||
|
@ -0,0 +1,62 @@
|
||||
package com.inspur.community.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.community.domain.CommunityPostLike;
|
||||
|
||||
/**
|
||||
* 社区点赞信息Service接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public interface ICommunityPostLikeService
|
||||
{
|
||||
/**
|
||||
* 查询社区点赞信息
|
||||
*
|
||||
* @param userId 社区点赞信息主键
|
||||
* @return 社区点赞信息
|
||||
*/
|
||||
public CommunityPostLike selectCommunityPostLikeByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询社区点赞信息列表
|
||||
*
|
||||
* @param communityPostLike 社区点赞信息
|
||||
* @return 社区点赞信息集合
|
||||
*/
|
||||
public List<CommunityPostLike> selectCommunityPostLikeList(CommunityPostLike communityPostLike);
|
||||
|
||||
/**
|
||||
* 新增社区点赞信息
|
||||
*
|
||||
* @param communityPostLike 社区点赞信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommunityPostLike(CommunityPostLike communityPostLike);
|
||||
|
||||
/**
|
||||
* 修改社区点赞信息
|
||||
*
|
||||
* @param communityPostLike 社区点赞信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommunityPostLike(CommunityPostLike communityPostLike);
|
||||
|
||||
/**
|
||||
* 批量删除社区点赞信息
|
||||
*
|
||||
* @param userIds 需要删除的社区点赞信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostLikeByUserIds(Long[] userIds);
|
||||
|
||||
/**
|
||||
* 删除社区点赞信息信息
|
||||
*
|
||||
* @param userId 社区点赞信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostLikeByUserIdandPostId(Long userId,String likePostId);
|
||||
}
|
||||
|
@ -0,0 +1,63 @@
|
||||
package com.inspur.community.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.inspur.community.domain.CommunityComment;
|
||||
import com.inspur.community.domain.CommunityPostReply;
|
||||
|
||||
/**
|
||||
* 社区帖子回复Service接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public interface ICommunityPostReplyService
|
||||
{
|
||||
/**
|
||||
* 查询社区帖子回复
|
||||
*
|
||||
* @param replyId 社区帖子回复主键
|
||||
* @return 社区帖子回复
|
||||
*/
|
||||
public CommunityPostReply selectCommunityPostReplyByReplyId(String replyId);
|
||||
|
||||
/**
|
||||
* 查询社区帖子回复列表
|
||||
*
|
||||
* @param communityPostReply 社区帖子回复
|
||||
* @return 社区帖子回复集合
|
||||
*/
|
||||
public List<CommunityComment> selectCommunityPostReplyList(CommunityPostReply communityPostReply);
|
||||
|
||||
/**
|
||||
* 新增社区帖子回复
|
||||
*
|
||||
* @param communityPostReply 社区帖子回复
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommunityPostReply(CommunityPostReply communityPostReply);
|
||||
|
||||
/**
|
||||
* 修改社区帖子回复
|
||||
*
|
||||
* @param communityPostReply 社区帖子回复
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommunityPostReply(CommunityPostReply communityPostReply);
|
||||
|
||||
/**
|
||||
* 批量删除社区帖子回复
|
||||
*
|
||||
* @param replyIds 需要删除的社区帖子回复主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostReplyByReplyIds(String[] replyIds);
|
||||
|
||||
/**
|
||||
* 删除社区帖子回复信息
|
||||
*
|
||||
* @param replyId 社区帖子回复主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostReplyByReplyId(String replyId);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.inspur.community.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.community.domain.CommunityPostReport;
|
||||
|
||||
/**
|
||||
* 社区帖子举报Service接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public interface ICommunityPostReportService
|
||||
{
|
||||
/**
|
||||
* 查询社区帖子举报
|
||||
*
|
||||
* @param reportId 社区帖子举报主键
|
||||
* @return 社区帖子举报
|
||||
*/
|
||||
public CommunityPostReport selectCommunityPostReportByReportId(String reportId);
|
||||
|
||||
/**
|
||||
* 查询社区帖子举报列表
|
||||
*
|
||||
* @param communityPostReport 社区帖子举报
|
||||
* @return 社区帖子举报集合
|
||||
*/
|
||||
public List<CommunityPostReport> selectCommunityPostReportList(CommunityPostReport communityPostReport);
|
||||
|
||||
/**
|
||||
* 新增社区帖子举报
|
||||
*
|
||||
* @param communityPostReport 社区帖子举报
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommunityPostReport(CommunityPostReport communityPostReport);
|
||||
|
||||
/**
|
||||
* 修改社区帖子举报
|
||||
*
|
||||
* @param communityPostReport 社区帖子举报
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommunityPostReport(CommunityPostReport communityPostReport);
|
||||
|
||||
/**
|
||||
* 批量删除社区帖子举报
|
||||
*
|
||||
* @param reportIds 需要删除的社区帖子举报主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostReportByReportIds(String[] reportIds);
|
||||
|
||||
/**
|
||||
* 删除社区帖子举报信息
|
||||
*
|
||||
* @param reportId 社区帖子举报主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommunityPostReportByReportId(String reportId);
|
||||
}
|
||||
|
@ -0,0 +1,94 @@
|
||||
package com.inspur.community.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.inspur.community.mapper.CommunityPostHeatMapper;
|
||||
import com.inspur.community.domain.CommunityPostHeat;
|
||||
import com.inspur.community.service.ICommunityPostHeatService;
|
||||
|
||||
/**
|
||||
* 社区帖子热度Service业务层处理
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
@Service
|
||||
public class CommunityPostHeatServiceImpl implements ICommunityPostHeatService
|
||||
{
|
||||
@Autowired
|
||||
private CommunityPostHeatMapper communityPostHeatMapper;
|
||||
|
||||
/**
|
||||
* 查询社区帖子热度
|
||||
*
|
||||
* @param postId 社区帖子热度主键
|
||||
* @return 社区帖子热度
|
||||
*/
|
||||
@Override
|
||||
public CommunityPostHeat selectCommunityPostHeatByPostId(String postId)
|
||||
{
|
||||
return communityPostHeatMapper.selectCommunityPostHeatByPostId(postId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询社区帖子热度列表
|
||||
*
|
||||
* @param communityPostHeat 社区帖子热度
|
||||
* @return 社区帖子热度
|
||||
*/
|
||||
@Override
|
||||
public List<CommunityPostHeat> selectCommunityPostHeatList(CommunityPostHeat communityPostHeat)
|
||||
{
|
||||
return communityPostHeatMapper.selectCommunityPostHeatList(communityPostHeat);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增社区帖子热度
|
||||
*
|
||||
* @param communityPostHeat 社区帖子热度
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCommunityPostHeat(CommunityPostHeat communityPostHeat)
|
||||
{
|
||||
return communityPostHeatMapper.insertCommunityPostHeat(communityPostHeat);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改社区帖子热度
|
||||
*
|
||||
* @param communityPostHeat 社区帖子热度
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCommunityPostHeat(CommunityPostHeat communityPostHeat)
|
||||
{
|
||||
return communityPostHeatMapper.updateCommunityPostHeat(communityPostHeat);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除社区帖子热度
|
||||
*
|
||||
* @param postIds 需要删除的社区帖子热度主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCommunityPostHeatByPostIds(String[] postIds)
|
||||
{
|
||||
return communityPostHeatMapper.deleteCommunityPostHeatByPostIds(postIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除社区帖子热度信息
|
||||
*
|
||||
* @param postId 社区帖子热度主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCommunityPostHeatByPostId(String postId)
|
||||
{
|
||||
return communityPostHeatMapper.deleteCommunityPostHeatByPostId(postId);
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,15 @@ import java.util.List;
|
||||
|
||||
import com.inspur.common.utils.SecurityUtils;
|
||||
import com.inspur.common.utils.uuid.IdUtils;
|
||||
import com.inspur.community.domain.CommunityPostHeat;
|
||||
import com.inspur.community.domain.vo.CommunityPostInfoVO;
|
||||
import com.inspur.community.mapper.CommunityPostHeatMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.inspur.community.mapper.CommunityPostInfoMapper;
|
||||
import com.inspur.community.domain.CommunityPostInfo;
|
||||
import com.inspur.community.service.ICommunityPostInfoService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 社区帖子信息Service业务层处理
|
||||
@ -23,6 +26,8 @@ public class CommunityPostInfoServiceImpl implements ICommunityPostInfoService
|
||||
{
|
||||
@Autowired
|
||||
private CommunityPostInfoMapper communityPostInfoMapper;
|
||||
@Autowired
|
||||
private CommunityPostHeatMapper communityPostHeatMapper;
|
||||
|
||||
/**
|
||||
* 查询社区帖子信息
|
||||
@ -54,13 +59,19 @@ public class CommunityPostInfoServiceImpl implements ICommunityPostInfoService
|
||||
* @param communityPostInfo 社区帖子信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public int insertCommunityPostInfo(CommunityPostInfo communityPostInfo)
|
||||
{
|
||||
communityPostInfo.setPostId(IdUtils.simpleUUID());
|
||||
communityPostInfo.setPostTime(new Date());
|
||||
communityPostInfo.setUserId(SecurityUtils.getUserId());
|
||||
return communityPostInfoMapper.insertCommunityPostInfo(communityPostInfo);
|
||||
//热度榜单新增记录
|
||||
CommunityPostHeat postHeat = new CommunityPostHeat();
|
||||
postHeat.setPostId(communityPostInfo.getPostId());
|
||||
postHeat.setLikes(0);
|
||||
postHeat.setViews(0);
|
||||
return communityPostInfoMapper.insertCommunityPostInfo(communityPostInfo) & communityPostHeatMapper.insertCommunityPostHeat(postHeat);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -81,9 +92,11 @@ public class CommunityPostInfoServiceImpl implements ICommunityPostInfoService
|
||||
* @param postId
|
||||
* @return
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public int addViews(String postId){
|
||||
return communityPostInfoMapper.addViews(postId);
|
||||
//热度榜单浏览记录加一
|
||||
return communityPostInfoMapper.addViews(postId) & communityPostHeatMapper.addViews(postId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,106 @@
|
||||
package com.inspur.community.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.inspur.common.utils.DateUtils;
|
||||
import com.inspur.common.utils.SecurityUtils;
|
||||
import com.inspur.community.mapper.CommunityPostHeatMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.inspur.community.mapper.CommunityPostLikeMapper;
|
||||
import com.inspur.community.domain.CommunityPostLike;
|
||||
import com.inspur.community.service.ICommunityPostLikeService;
|
||||
|
||||
/**
|
||||
* 社区点赞信息Service业务层处理
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
@Service
|
||||
public class CommunityPostLikeServiceImpl implements ICommunityPostLikeService
|
||||
{
|
||||
@Autowired
|
||||
private CommunityPostLikeMapper communityPostLikeMapper;
|
||||
|
||||
@Autowired
|
||||
private CommunityPostHeatMapper communityPostHeatMapper;
|
||||
|
||||
/**
|
||||
* 查询社区点赞信息
|
||||
*
|
||||
* @param userId 社区点赞信息主键
|
||||
* @return 社区点赞信息
|
||||
*/
|
||||
@Override
|
||||
public CommunityPostLike selectCommunityPostLikeByUserId(Long userId)
|
||||
{
|
||||
return communityPostLikeMapper.selectCommunityPostLikeByUserId(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询社区点赞信息列表
|
||||
*
|
||||
* @param communityPostLike 社区点赞信息
|
||||
* @return 社区点赞信息
|
||||
*/
|
||||
@Override
|
||||
public List<CommunityPostLike> selectCommunityPostLikeList(CommunityPostLike communityPostLike)
|
||||
{
|
||||
return communityPostLikeMapper.selectCommunityPostLikeList(communityPostLike);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增社区点赞信息
|
||||
*
|
||||
* @param communityPostLike 社区点赞信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCommunityPostLike(CommunityPostLike communityPostLike)
|
||||
{
|
||||
communityPostLike.setUserId(SecurityUtils.getLoginUser().getUserId());
|
||||
communityPostLike.setLikeTime(new Date());
|
||||
//增加热度榜点赞记录加一
|
||||
|
||||
return communityPostLikeMapper.insertCommunityPostLike(communityPostLike);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改社区点赞信息
|
||||
*
|
||||
* @param communityPostLike 社区点赞信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCommunityPostLike(CommunityPostLike communityPostLike)
|
||||
{
|
||||
return communityPostLikeMapper.updateCommunityPostLike(communityPostLike);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除社区点赞信息
|
||||
*
|
||||
* @param userIds 需要删除的社区点赞信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCommunityPostLikeByUserIds(Long[] userIds)
|
||||
{
|
||||
return communityPostLikeMapper.deleteCommunityPostLikeByUserIds(userIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除社区点赞信息信息
|
||||
*
|
||||
* @param userId 社区点赞信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCommunityPostLikeByUserIdandPostId(Long userId,String likePostId)
|
||||
{
|
||||
return communityPostLikeMapper.deleteCommunityPostLikeByUserIdandPostId(userId,likePostId);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,254 @@
|
||||
package com.inspur.community.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.inspur.common.core.domain.entity.SysUser;
|
||||
import com.inspur.common.utils.DateUtils;
|
||||
import com.inspur.common.utils.SecurityUtils;
|
||||
import com.inspur.common.utils.uuid.IdUtils;
|
||||
import com.inspur.community.domain.CommunityComment;
|
||||
import com.inspur.community.domain.CommunityPostLike;
|
||||
import com.inspur.community.mapper.CommunityPostHeatMapper;
|
||||
import com.inspur.community.mapper.CommunityPostLikeMapper;
|
||||
import com.inspur.system.mapper.SysUserMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.inspur.community.mapper.CommunityPostReplyMapper;
|
||||
import com.inspur.community.domain.CommunityPostReply;
|
||||
import com.inspur.community.service.ICommunityPostReplyService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.faces.application.Application;
|
||||
|
||||
/**
|
||||
* 社区帖子回复Service业务层处理
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
@Service
|
||||
public class CommunityPostReplyServiceImpl implements ICommunityPostReplyService
|
||||
{
|
||||
@Autowired
|
||||
private CommunityPostReplyMapper communityPostReplyMapper;
|
||||
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
|
||||
@Autowired
|
||||
private CommunityPostLikeMapper communityPostLikeMapper;
|
||||
|
||||
@Autowired
|
||||
private CommunityPostHeatMapper communityPostHeatMapper;
|
||||
|
||||
/**
|
||||
* 查询社区帖子回复
|
||||
*
|
||||
* @param replyId 社区帖子回复主键
|
||||
* @return 社区帖子回复
|
||||
*/
|
||||
@Override
|
||||
public CommunityPostReply selectCommunityPostReplyByReplyId(String replyId)
|
||||
{
|
||||
return communityPostReplyMapper.selectCommunityPostReplyByReplyId(replyId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询社区帖子回复列表
|
||||
*
|
||||
* @param communityPostReply 社区帖子回复
|
||||
* @return 社区帖子回复
|
||||
*/
|
||||
@Override
|
||||
public List<CommunityComment> selectCommunityPostReplyList(CommunityPostReply communityPostReply)
|
||||
{
|
||||
communityPostReply.setStatus("0");
|
||||
communityPostReply.setParentReplyId("0");
|
||||
List<CommunityPostReply> communityPostReplyList = communityPostReplyMapper.selectCommunityPostReplyList(communityPostReply);
|
||||
List<CommunityComment> communityComments = new ArrayList<>();
|
||||
for (CommunityPostReply reply : communityPostReplyList) {
|
||||
List<CommunityComment> childCommentList = new ArrayList<>();
|
||||
CommunityComment comment = new CommunityComment();
|
||||
comment.setUserId(reply.getUserId());
|
||||
comment.setReplyId(reply.getReplyId());
|
||||
comment.setReplyContent(reply.getReplyContent());
|
||||
comment.setParentReplyId(reply.getParentReplyId());
|
||||
comment.setUserId(reply.getUserId());
|
||||
comment.setReplyTime(reply.getReplyTime());
|
||||
Long userId = reply.getUserId();
|
||||
if(userId != null) {
|
||||
SysUser user = sysUserMapper.selectUserById(userId);
|
||||
comment.setUserName(user.getNickName());
|
||||
comment.setAvatar(user.getAvatar());
|
||||
}
|
||||
//是否被点赞
|
||||
CommunityPostLike queryPostLike = new CommunityPostLike();
|
||||
queryPostLike.setUserId(SecurityUtils.getLoginUser().getUserId());
|
||||
queryPostLike.setLikePostId(reply.getReplyId());
|
||||
List<CommunityPostLike> likeList = communityPostLikeMapper.selectCommunityPostLikeList(queryPostLike);
|
||||
if(likeList.size() > 0) {
|
||||
comment.setLike(true);
|
||||
} else {
|
||||
comment.setLike(false);
|
||||
}
|
||||
comment.setLikeNum(communityPostLikeMapper.countCommunityPostLikeByLikePostId(reply.getReplyId()));
|
||||
//添加子评论
|
||||
CommunityPostReply queryReply = new CommunityPostReply();
|
||||
queryReply.setStatus("0");
|
||||
queryReply.setRootReplyId(reply.getReplyId());
|
||||
List<CommunityPostReply> childrenReplyList = communityPostReplyMapper.selectCommunityPostReplyList(queryReply);
|
||||
if(childrenReplyList.size() > 0){
|
||||
for (CommunityPostReply postReply : childrenReplyList) {
|
||||
CommunityComment childComment = new CommunityComment();
|
||||
//添加用户信息
|
||||
Long childUserId = postReply.getUserId();
|
||||
if(childUserId != null){
|
||||
SysUser childUser = sysUserMapper.selectUserById(childUserId);
|
||||
childComment.setUserId(childUser.getUserId());
|
||||
childComment.setUserName(childUser.getNickName());
|
||||
childComment.setAvatar(childUser.getAvatar());
|
||||
}
|
||||
//添加是否被点赞
|
||||
CommunityPostLike queryChildPostLike = new CommunityPostLike();
|
||||
queryChildPostLike.setUserId(SecurityUtils.getLoginUser().getUserId());
|
||||
queryChildPostLike.setLikePostId(postReply.getReplyId());
|
||||
List<CommunityPostLike> childLikeList = communityPostLikeMapper.selectCommunityPostLikeList(queryChildPostLike);
|
||||
if(childLikeList.size() > 0) {
|
||||
childComment.setLike(true);
|
||||
} else {
|
||||
childComment.setLike(false);
|
||||
}
|
||||
childComment.setLikeNum(communityPostLikeMapper.countCommunityPostLikeByLikePostId(postReply.getReplyId()));
|
||||
|
||||
if(!postReply.getParentReplyId().equals(postReply.getRootReplyId())){
|
||||
CommunityPostReply parentReply = communityPostReplyMapper.selectCommunityPostReplyByReplyId(postReply.getParentReplyId());
|
||||
SysUser parentUser = sysUserMapper.selectUserById(parentReply.getUserId());
|
||||
childComment.setParentReplyUserName(parentUser.getNickName());
|
||||
}
|
||||
|
||||
childComment.setPostId(postReply.getPostId());
|
||||
childComment.setReplyId(postReply.getReplyId());
|
||||
childComment.setReplyContent(postReply.getReplyContent());
|
||||
childComment.setReplyTime(postReply.getReplyTime());
|
||||
childComment.setParentReplyId(postReply.getParentReplyId());
|
||||
childComment.setRootReplyId(postReply.getRootReplyId());
|
||||
childCommentList.add(childComment);
|
||||
}
|
||||
}
|
||||
comment.setChildren(childCommentList);
|
||||
communityComments.add(comment);
|
||||
}
|
||||
|
||||
return communityComments;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增社区帖子回复
|
||||
*
|
||||
* @param communityPostReply 社区帖子回复
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public int insertCommunityPostReply(CommunityPostReply communityPostReply)
|
||||
{
|
||||
communityPostReply.setReplyId(IdUtils.simpleUUID());
|
||||
communityPostReply.setUserId(SecurityUtils.getLoginUser().getUserId());
|
||||
communityPostReply.setReplyTime(DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
//帖子热度回复量加一
|
||||
return communityPostReplyMapper.insertCommunityPostReply(communityPostReply) & communityPostHeatMapper.addReplies(communityPostReply.getPostId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改社区帖子回复
|
||||
*
|
||||
* @param communityPostReply 社区帖子回复
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCommunityPostReply(CommunityPostReply communityPostReply)
|
||||
{
|
||||
return communityPostReplyMapper.updateCommunityPostReply(communityPostReply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除社区帖子回复
|
||||
*
|
||||
* @param replyIds 需要删除的社区帖子回复主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCommunityPostReplyByReplyIds(String[] replyIds)
|
||||
{
|
||||
return communityPostReplyMapper.deleteCommunityPostReplyByReplyIds(replyIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除社区帖子回复信息
|
||||
*
|
||||
* @param replyId 社区帖子回复主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCommunityPostReplyByReplyId(String replyId)
|
||||
{
|
||||
return communityPostReplyMapper.deleteCommunityPostReplyByReplyId(replyId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归将评论连接
|
||||
*/
|
||||
private List<CommunityComment> getCommentList(List<CommunityPostReply> communityPostReplyList, String parentReplyId){
|
||||
|
||||
if(communityPostReplyList.size() == 0){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<CommunityComment> commentList = new ArrayList<>();
|
||||
List<CommunityPostReply> list = new ArrayList<>();
|
||||
// list = communityPostReplyList.stream().filter(reply -> reply.getParentRepayId().equals(parentReplyId)).collect(Collectors.toList());
|
||||
//
|
||||
// if(list.size() == 0){
|
||||
// return new ArrayList<>();
|
||||
// }
|
||||
//
|
||||
// for (CommunityPostReply communityPostReply : list) {
|
||||
// CommunityComment comment = new CommunityComment();
|
||||
// comment.setReplyId(communityPostReply.getReplyId());
|
||||
// comment.setReplyContent(communityPostReply.getReplyContent());
|
||||
// comment.setReplyTime(communityPostReply.getReplyTime());
|
||||
// comment.setRootReplyId(communityPostReply.getRootReplyId());
|
||||
// comment.setParentRepayId(communityPostReply.getParentRepayId());
|
||||
// comment.setPostId(communityPostReply.getPostId());
|
||||
// comment.setUserId(communityPostReply.getUserId());
|
||||
// if(communityPostReply.getUserId() != null){
|
||||
// SysUser user = sysUserMapper.selectUserById(communityPostReply.getUserId());
|
||||
// if(user != null){
|
||||
// comment.setUserName(user.getNickName());
|
||||
// comment.setAvatar(user.getAvatar());
|
||||
// }
|
||||
// }else{
|
||||
// comment.setUserName("匿名用户");
|
||||
// }
|
||||
//
|
||||
// if(communityPostReply.getUserId() != null){
|
||||
// CommunityPostLike query = new CommunityPostLike();
|
||||
// query.setLikePostId(communityPostReply.getReplyId());
|
||||
// query.setUserId(communityPostReply.getUserId());
|
||||
// List<CommunityPostLike> likeList = communityPostLikeMapper.selectCommunityPostLikeList(query);
|
||||
// comment.setLikeNum((long) likeList.size());
|
||||
// if(likeList.size() > 0){
|
||||
// comment.setLike(true);
|
||||
// }else {
|
||||
// comment.setLike(false);
|
||||
// }
|
||||
// }
|
||||
// comment.setChildren(getCommentList(communityPostReplyList, communityPostReply.getReplyId()));
|
||||
// commentList.add(comment);
|
||||
// }
|
||||
return commentList;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,94 @@
|
||||
package com.inspur.community.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.inspur.community.mapper.CommunityPostReportMapper;
|
||||
import com.inspur.community.domain.CommunityPostReport;
|
||||
import com.inspur.community.service.ICommunityPostReportService;
|
||||
|
||||
/**
|
||||
* 社区帖子举报Service业务层处理
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
@Service
|
||||
public class CommunityPostReportServiceImpl implements ICommunityPostReportService
|
||||
{
|
||||
@Autowired
|
||||
private CommunityPostReportMapper communityPostReportMapper;
|
||||
|
||||
/**
|
||||
* 查询社区帖子举报
|
||||
*
|
||||
* @param reportId 社区帖子举报主键
|
||||
* @return 社区帖子举报
|
||||
*/
|
||||
@Override
|
||||
public CommunityPostReport selectCommunityPostReportByReportId(String reportId)
|
||||
{
|
||||
return communityPostReportMapper.selectCommunityPostReportByReportId(reportId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询社区帖子举报列表
|
||||
*
|
||||
* @param communityPostReport 社区帖子举报
|
||||
* @return 社区帖子举报
|
||||
*/
|
||||
@Override
|
||||
public List<CommunityPostReport> selectCommunityPostReportList(CommunityPostReport communityPostReport)
|
||||
{
|
||||
return communityPostReportMapper.selectCommunityPostReportList(communityPostReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增社区帖子举报
|
||||
*
|
||||
* @param communityPostReport 社区帖子举报
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCommunityPostReport(CommunityPostReport communityPostReport)
|
||||
{
|
||||
return communityPostReportMapper.insertCommunityPostReport(communityPostReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改社区帖子举报
|
||||
*
|
||||
* @param communityPostReport 社区帖子举报
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCommunityPostReport(CommunityPostReport communityPostReport)
|
||||
{
|
||||
return communityPostReportMapper.updateCommunityPostReport(communityPostReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除社区帖子举报
|
||||
*
|
||||
* @param reportIds 需要删除的社区帖子举报主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCommunityPostReportByReportIds(String[] reportIds)
|
||||
{
|
||||
return communityPostReportMapper.deleteCommunityPostReportByReportIds(reportIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除社区帖子举报信息
|
||||
*
|
||||
* @param reportId 社区帖子举报主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCommunityPostReportByReportId(String reportId)
|
||||
{
|
||||
return communityPostReportMapper.deleteCommunityPostReportByReportId(reportId);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,79 @@
|
||||
<?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.inspur.community.mapper.CommunityPostHeatMapper">
|
||||
|
||||
<resultMap type="CommunityPostHeat" id="CommunityPostHeatResult">
|
||||
<result property="postId" column="post_id" />
|
||||
<result property="likes" column="likes" />
|
||||
<result property="views" column="views" />
|
||||
<result property="replies" column="replies" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCommunityPostHeatVo">
|
||||
select post_id, likes, views, replies from community_post_heat
|
||||
</sql>
|
||||
|
||||
<select id="selectCommunityPostHeatList" parameterType="CommunityPostHeat" resultMap="CommunityPostHeatResult">
|
||||
<include refid="selectCommunityPostHeatVo"/>
|
||||
<where>
|
||||
<if test="postId != null and postId != ''"> and post_id = #{postId}</if>
|
||||
<if test="likes != null "> and likes = #{likes}</if>
|
||||
<if test="views != null "> and views = #{views}</if>
|
||||
<if test="replies != null "> and replies = #{replies}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCommunityPostHeatByPostId" parameterType="String" resultMap="CommunityPostHeatResult">
|
||||
<include refid="selectCommunityPostHeatVo"/>
|
||||
where post_id = #{postId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCommunityPostHeat" parameterType="CommunityPostHeat">
|
||||
insert into community_post_heat
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="postId != null">post_id,</if>
|
||||
<if test="likes != null">likes,</if>
|
||||
<if test="views != null">views,</if>
|
||||
<if test="replies != null">replies,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="postId != null">#{postId},</if>
|
||||
<if test="likes != null">#{likes},</if>
|
||||
<if test="views != null">#{views},</if>
|
||||
<if test="replies != null">#{replies},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCommunityPostHeat" parameterType="CommunityPostHeat">
|
||||
update community_post_heat
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="likes != null">likes = #{likes},</if>
|
||||
<if test="views != null">views = #{views},</if>
|
||||
<if test="replies != null">replies = #{replies},</if>
|
||||
</trim>
|
||||
where post_id = #{postId}
|
||||
</update>
|
||||
|
||||
<!-- 浏览量加一 -->
|
||||
<update id="addViews" parameterType="String">
|
||||
update community_post_heat set views = views + 1 where post_id = #{postId}
|
||||
</update>
|
||||
|
||||
<!-- 回复量加一 -->
|
||||
<update id="addReplies" parameterType="String">
|
||||
update community_post_heat set replies = replies + 1 where post_id = #{postId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCommunityPostHeatByPostId" parameterType="String">
|
||||
delete from community_post_heat where post_id = #{postId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCommunityPostHeatByPostIds" parameterType="String">
|
||||
delete from community_post_heat where post_id in
|
||||
<foreach item="postId" collection="array" open="(" separator="," close=")">
|
||||
#{postId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,70 @@
|
||||
<?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.inspur.community.mapper.CommunityPostLikeMapper">
|
||||
|
||||
<resultMap type="CommunityPostLike" id="CommunityPostLikeResult">
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="likePostId" column="like_post_id" />
|
||||
<result property="likeTime" column="like_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCommunityPostLikeVo">
|
||||
select user_id, like_post_id, like_time from community_post_like
|
||||
</sql>
|
||||
|
||||
<select id="selectCommunityPostLikeList" parameterType="CommunityPostLike" resultMap="CommunityPostLikeResult">
|
||||
<include refid="selectCommunityPostLikeVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="likePostId != null "> and like_post_id = #{likePostId}</if>
|
||||
<if test="likeTime != null "> and like_time = #{likeTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCommunityPostLikeByUserId" parameterType="Long" resultMap="CommunityPostLikeResult">
|
||||
<include refid="selectCommunityPostLikeVo"/>
|
||||
where user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<!--根据postid统计点赞数
|
||||
public int countCommunityPostLikeByLikePostId-->
|
||||
<select id="countCommunityPostLikeByLikePostId" parameterType="String" resultType="long">
|
||||
select count(1) from community_post_like where like_post_id = #{likePostId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCommunityPostLike" parameterType="CommunityPostLike">
|
||||
insert into community_post_like
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="likePostId != null">like_post_id,</if>
|
||||
<if test="likeTime != null">like_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="likePostId != null">#{likePostId},</if>
|
||||
<if test="likeTime != null">#{likeTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCommunityPostLike" parameterType="CommunityPostLike">
|
||||
update community_post_like
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="likePostId != null">like_post_id = #{likePostId},</if>
|
||||
<if test="likeTime != null">like_time = #{likeTime},</if>
|
||||
</trim>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCommunityPostLikeByUserIdandPostId">
|
||||
delete from community_post_like where user_id = #{userId} and like_post_id = #{likePostId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCommunityPostLikeByUserIds" parameterType="String">
|
||||
delete from community_post_like where user_id in
|
||||
<foreach item="userId" collection="array" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,89 @@
|
||||
<?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.inspur.community.mapper.CommunityPostReplyMapper">
|
||||
|
||||
<resultMap type="CommunityPostReply" id="CommunityPostReplyResult">
|
||||
<result property="replyId" column="reply_id" />
|
||||
<result property="postId" column="post_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="replyContent" column="reply_content" />
|
||||
<result property="replyTime" column="reply_time" />
|
||||
<result property="parentReplyId" column="parent_reply_id" />
|
||||
<result property="rootReplyId" column="root_reply_id" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCommunityPostReplyVo">
|
||||
select reply_id, post_id, user_id, reply_content, reply_time, parent_reply_id, root_reply_id, status from community_post_reply
|
||||
</sql>
|
||||
|
||||
<select id="selectCommunityPostReplyList" parameterType="CommunityPostReply" resultMap="CommunityPostReplyResult">
|
||||
<include refid="selectCommunityPostReplyVo"/>
|
||||
<where>
|
||||
<if test="postId != null and postId != ''"> and post_id = #{postId}</if>
|
||||
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
|
||||
<if test="replyContent != null and replyContent != ''"> and reply_content = #{replyContent}</if>
|
||||
<if test="replyTime != null and replyTime != ''"> and reply_time = #{replyTime}</if>
|
||||
<if test="parentReplyId != null and parentReplyId != ''"> and parent_reply_id = #{parentReplyId}</if>
|
||||
<if test="rootReplyId != null and rootReplyId != ''"> and root_reply_id = #{rootReplyId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
order by reply_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCommunityPostReplyByReplyId" parameterType="String" resultMap="CommunityPostReplyResult">
|
||||
<include refid="selectCommunityPostReplyVo"/>
|
||||
where reply_id = #{replyId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCommunityPostReply" parameterType="CommunityPostReply">
|
||||
insert into community_post_reply
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="replyId != null">reply_id,</if>
|
||||
<if test="postId != null">post_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="replyContent != null">reply_content,</if>
|
||||
<if test="replyTime != null">reply_time,</if>
|
||||
<if test="parentReplyId != null">parent_reply_id,</if>
|
||||
<if test="rootReplyId != null">root_reply_id,</if>
|
||||
<if test="status != null">status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="replyId != null">#{replyId},</if>
|
||||
<if test="postId != null">#{postId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="replyContent != null">#{replyContent},</if>
|
||||
<if test="replyTime != null">#{replyTime},</if>
|
||||
<if test="parentReplyId != null">#{parentReplyId},</if>
|
||||
<if test="rootReplyId != null">#{rootReplyId},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCommunityPostReply" parameterType="CommunityPostReply">
|
||||
update community_post_reply
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="postId != null">post_id = #{postId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="replyContent != null">reply_content = #{replyContent},</if>
|
||||
<if test="replyTime != null">reply_time = #{replyTime},</if>
|
||||
<if test="parentReplyId != null">parent_repay_id = #{parentReplyId},</if>
|
||||
<if test="rootReplyId != null">root_reply_id = #{rootReplyId},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
</trim>
|
||||
where reply_id = #{replyId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCommunityPostReplyByReplyId" parameterType="String">
|
||||
delete from community_post_reply where reply_id = #{replyId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCommunityPostReplyByReplyIds" parameterType="String">
|
||||
delete from community_post_reply where reply_id in
|
||||
<foreach item="replyId" collection="array" open="(" separator="," close=")">
|
||||
#{replyId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,88 @@
|
||||
<?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.inspur.community.mapper.CommunityPostReportMapper">
|
||||
|
||||
<resultMap type="CommunityPostReport" id="CommunityPostReportResult">
|
||||
<result property="reportId" column="report_id" />
|
||||
<result property="reportUserId" column="report_user_id" />
|
||||
<result property="reportContentId" column="report_content_id" />
|
||||
<result property="reportTime" column="report_time" />
|
||||
<result property="reportReason" column="report_reason" />
|
||||
<result property="status" column="status" />
|
||||
<result property="reportType" column="report_type" />
|
||||
<result property="result" column="result" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCommunityPostReportVo">
|
||||
select report_id, report_user_id, report_content_id, report_time, report_reason, status, report_type, result from community_post_report
|
||||
</sql>
|
||||
|
||||
<select id="selectCommunityPostReportList" parameterType="CommunityPostReport" resultMap="CommunityPostReportResult">
|
||||
<include refid="selectCommunityPostReportVo"/>
|
||||
<where>
|
||||
<if test="reportUserId != null "> and report_user_id = #{reportUserId}</if>
|
||||
<if test="reportContentId != null and reportContentId != ''"> and report_content_id = #{reportContentId}</if>
|
||||
<if test="reportTime != null and reportTime != ''"> and report_time = #{reportTime}</if>
|
||||
<if test="reportReason != null and reportReason != ''"> and report_reason = #{reportReason}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="reportType != null and reportType != ''"> and report_type = #{reportType}</if>
|
||||
<if test="result != null and result != ''"> and result = #{result}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCommunityPostReportByReportId" parameterType="String" resultMap="CommunityPostReportResult">
|
||||
<include refid="selectCommunityPostReportVo"/>
|
||||
where report_id = #{reportId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCommunityPostReport" parameterType="CommunityPostReport">
|
||||
insert into community_post_report
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="reportId != null">report_id,</if>
|
||||
<if test="reportUserId != null">report_user_id,</if>
|
||||
<if test="reportContentId != null">report_content_id,</if>
|
||||
<if test="reportTime != null">report_time,</if>
|
||||
<if test="reportReason != null">report_reason,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="reportType != null">report_type,</if>
|
||||
<if test="result != null">result,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="reportId != null">#{reportId},</if>
|
||||
<if test="reportUserId != null">#{reportUserId},</if>
|
||||
<if test="reportContentId != null">#{reportContentId},</if>
|
||||
<if test="reportTime != null">#{reportTime},</if>
|
||||
<if test="reportReason != null">#{reportReason},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="reportType != null">#{reportType},</if>
|
||||
<if test="result != null">#{result},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCommunityPostReport" parameterType="CommunityPostReport">
|
||||
update community_post_report
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="reportUserId != null">report_user_id = #{reportUserId},</if>
|
||||
<if test="reportContentId != null">report_content_id = #{reportContentId},</if>
|
||||
<if test="reportTime != null">report_time = #{reportTime},</if>
|
||||
<if test="reportReason != null">report_reason = #{reportReason},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="reportType != null">report_type = #{reportType},</if>
|
||||
<if test="result != null">result = #{result},</if>
|
||||
</trim>
|
||||
where report_id = #{reportId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCommunityPostReportByReportId" parameterType="String">
|
||||
delete from community_post_report where report_id = #{reportId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCommunityPostReportByReportIds" parameterType="String">
|
||||
delete from community_post_report where report_id in
|
||||
<foreach item="reportId" collection="array" open="(" separator="," close=")">
|
||||
#{reportId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,59 @@
|
||||
package com.inspur.examine.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.inspur.common.annotation.Excel;
|
||||
import com.inspur.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 认证管理对象 exam_attestation
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Data
|
||||
public class ExamAttestation {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 证书名称
|
||||
*/
|
||||
@Excel(name = "认证名称")
|
||||
private String attestationName;
|
||||
|
||||
/**
|
||||
* 发布单位
|
||||
*/
|
||||
@Excel(name = "发布单位")
|
||||
private String attestationUnit;
|
||||
|
||||
/**
|
||||
* 证书说明
|
||||
*/
|
||||
@Excel(name = "认证说明")
|
||||
private String attestationInfo;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 证书认证人数
|
||||
*/
|
||||
@Excel(name = "认证人数")
|
||||
private Integer peopleCount;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
private String tenantId;
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.inspur.examine.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.inspur.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 认证人员关联对象 exam_attestation_people
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Data
|
||||
public class ExamAttestationPeople {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 认证id
|
||||
*/
|
||||
private String attestationId;
|
||||
|
||||
/**
|
||||
* 证书名称
|
||||
*/
|
||||
private String attestationName;
|
||||
|
||||
/**
|
||||
* 认证人员id
|
||||
*/
|
||||
private Long peopleId;
|
||||
|
||||
/**
|
||||
* 认证人员名称
|
||||
*/
|
||||
private String peopleName;
|
||||
|
||||
/**
|
||||
* 认证时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "认证时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date attestationTime;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@Excel(name = "租户id")
|
||||
private String tenantId;
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
package com.inspur.examine.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.inspur.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 试卷信息对象 exam_paper_info
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Data
|
||||
public class ExamPaperInfo {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 考试id
|
||||
*/
|
||||
private String examId;
|
||||
|
||||
/**
|
||||
* 考试名称
|
||||
*/
|
||||
@Excel(name = "考试名称")
|
||||
private String examName;
|
||||
|
||||
/**
|
||||
* 考生id
|
||||
*/
|
||||
@Excel(name = "考生id")
|
||||
private Long examineId;
|
||||
|
||||
/**
|
||||
* 考生名称
|
||||
*/
|
||||
@Excel(name = "考生名称")
|
||||
private String examineName;
|
||||
|
||||
/**
|
||||
* 考试开始时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "考试开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date examStartTime;
|
||||
|
||||
/**
|
||||
* 考试结束时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "考试结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date examEndTime;
|
||||
|
||||
/**
|
||||
* 分数
|
||||
*/
|
||||
@Excel(name = "分数")
|
||||
private BigDecimal score;
|
||||
|
||||
/**
|
||||
* 状态 0 未通过,1 通过
|
||||
*/
|
||||
@Excel(name = "状态",dictType = "examine_result")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
private String tenantId;
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.inspur.examine.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.examine.domain.ExamAttestation;
|
||||
|
||||
/**
|
||||
* 认证管理Mapper接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
public interface ExamAttestationMapper
|
||||
{
|
||||
/**
|
||||
* 查询认证管理
|
||||
*
|
||||
* @param id 认证管理主键
|
||||
* @return 认证管理
|
||||
*/
|
||||
public ExamAttestation selectExamAttestationById(String id);
|
||||
|
||||
/**
|
||||
* 查询认证管理列表
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 认证管理集合
|
||||
*/
|
||||
public List<ExamAttestation> selectExamAttestationList(ExamAttestation examAttestation);
|
||||
|
||||
/**
|
||||
* 新增认证管理
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamAttestation(ExamAttestation examAttestation);
|
||||
|
||||
/**
|
||||
* 修改认证管理
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamAttestation(ExamAttestation examAttestation);
|
||||
|
||||
/**
|
||||
* 删除认证管理
|
||||
*
|
||||
* @param id 认证管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除认证管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.inspur.examine.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.examine.domain.ExamAttestationPeople;
|
||||
|
||||
/**
|
||||
* 认证人员关联Mapper接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
public interface ExamAttestationPeopleMapper
|
||||
{
|
||||
/**
|
||||
* 查询认证人员关联
|
||||
*
|
||||
* @param id 认证人员关联主键
|
||||
* @return 认证人员关联
|
||||
*/
|
||||
public ExamAttestationPeople selectExamAttestationPeopleById(String id);
|
||||
|
||||
/**
|
||||
* 查询认证人员关联列表
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 认证人员关联集合
|
||||
*/
|
||||
public List<ExamAttestationPeople> selectExamAttestationPeopleList(ExamAttestationPeople examAttestationPeople);
|
||||
|
||||
/**
|
||||
* 新增认证人员关联
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamAttestationPeople(ExamAttestationPeople examAttestationPeople);
|
||||
|
||||
/**
|
||||
* 修改认证人员关联
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamAttestationPeople(ExamAttestationPeople examAttestationPeople);
|
||||
|
||||
/**
|
||||
* 删除认证人员关联
|
||||
*
|
||||
* @param id 认证人员关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationPeopleById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除认证人员关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationPeopleByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 根据认证ids删除关联信息
|
||||
*
|
||||
* @Author xusd
|
||||
* @Date 16:43 2024/5/7
|
||||
* @param ids 认证ids
|
||||
* @return int
|
||||
*/
|
||||
int deleteExamAttestationPeopleByAttestationIds(String[] ids);
|
||||
}
|
@ -58,4 +58,13 @@ public interface ExamInfoMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 考试信息下拉
|
||||
*
|
||||
* @Author xusd
|
||||
* @Date 11:21 2024/5/7
|
||||
* @return java.util.List<com.inspur.examine.domain.ExamInfo>
|
||||
*/
|
||||
List<ExamInfo> selection();
|
||||
}
|
||||
|
@ -0,0 +1,61 @@
|
||||
package com.inspur.examine.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.examine.domain.ExamPaperInfo;
|
||||
|
||||
/**
|
||||
* 试卷信息Mapper接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
public interface ExamPaperInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询试卷信息
|
||||
*
|
||||
* @param id 试卷信息主键
|
||||
* @return 试卷信息
|
||||
*/
|
||||
public ExamPaperInfo selectExamPaperInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询试卷信息列表
|
||||
*
|
||||
* @param examPaperInfo 试卷信息
|
||||
* @return 试卷信息集合
|
||||
*/
|
||||
public List<ExamPaperInfo> selectExamPaperInfoList(ExamPaperInfo examPaperInfo);
|
||||
|
||||
/**
|
||||
* 新增试卷信息
|
||||
*
|
||||
* @param examPaperInfo 试卷信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamPaperInfo(ExamPaperInfo examPaperInfo);
|
||||
|
||||
/**
|
||||
* 修改试卷信息
|
||||
*
|
||||
* @param examPaperInfo 试卷信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamPaperInfo(ExamPaperInfo examPaperInfo);
|
||||
|
||||
/**
|
||||
* 删除试卷信息
|
||||
*
|
||||
* @param id 试卷信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperInfoById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除试卷信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperInfoByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.inspur.examine.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.examine.domain.ExamAttestationPeople;
|
||||
|
||||
/**
|
||||
* 认证人员关联Service接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
public interface IExamAttestationPeopleService
|
||||
{
|
||||
/**
|
||||
* 查询认证人员关联
|
||||
*
|
||||
* @param id 认证人员关联主键
|
||||
* @return 认证人员关联
|
||||
*/
|
||||
public ExamAttestationPeople selectExamAttestationPeopleById(String id);
|
||||
|
||||
/**
|
||||
* 查询认证人员关联列表
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 认证人员关联集合
|
||||
*/
|
||||
public List<ExamAttestationPeople> selectExamAttestationPeopleList(ExamAttestationPeople examAttestationPeople);
|
||||
|
||||
/**
|
||||
* 新增认证人员关联
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamAttestationPeople(ExamAttestationPeople examAttestationPeople);
|
||||
|
||||
/**
|
||||
* 修改认证人员关联
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamAttestationPeople(ExamAttestationPeople examAttestationPeople);
|
||||
|
||||
/**
|
||||
* 批量删除认证人员关联
|
||||
*
|
||||
* @param ids 需要删除的认证人员关联主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationPeopleByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除认证人员关联信息
|
||||
*
|
||||
* @param id 认证人员关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationPeopleById(String id);
|
||||
|
||||
/**
|
||||
* 根据认证ids删除关联信息
|
||||
*
|
||||
* @Author xusd
|
||||
* @Date 16:43 2024/5/7
|
||||
* @param ids 认证ids
|
||||
* @return int
|
||||
*/
|
||||
int deleteExamAttestationPeopleByAttestationIds(String[] ids);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.inspur.examine.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.examine.domain.ExamAttestation;
|
||||
import com.inspur.examine.domain.ExamAttestationPeople;
|
||||
|
||||
import javax.xml.rpc.ServiceException;
|
||||
|
||||
/**
|
||||
* 认证管理Service接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
public interface IExamAttestationService
|
||||
{
|
||||
/**
|
||||
* 查询认证管理
|
||||
*
|
||||
* @param id 认证管理主键
|
||||
* @return 认证管理
|
||||
*/
|
||||
public ExamAttestation selectExamAttestationById(String id);
|
||||
|
||||
/**
|
||||
* 查询认证管理列表
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 认证管理集合
|
||||
*/
|
||||
public List<ExamAttestation> selectExamAttestationList(ExamAttestation examAttestation);
|
||||
|
||||
/**
|
||||
* 新增认证管理
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamAttestation(ExamAttestation examAttestation);
|
||||
|
||||
/**
|
||||
* 修改认证管理
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamAttestation(ExamAttestation examAttestation);
|
||||
|
||||
/**
|
||||
* 批量删除认证管理
|
||||
*
|
||||
* @param ids 需要删除的认证管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除认证管理信息
|
||||
*
|
||||
* @param id 认证管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationById(String id);
|
||||
|
||||
/**
|
||||
* 查询证书认证名单
|
||||
*/
|
||||
List<ExamAttestationPeople> selectPeopleList(ExamAttestationPeople examAttestationPeople) throws ServiceException;
|
||||
}
|
@ -58,4 +58,13 @@ public interface IExamInfoService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamInfoById(String id);
|
||||
|
||||
/**
|
||||
* 考试信息下拉
|
||||
*
|
||||
* @Author xusd
|
||||
* @Date 11:21 2024/5/7
|
||||
* @return java.util.List<com.inspur.examine.domain.ExamInfo>
|
||||
*/
|
||||
List<ExamInfo> selection();
|
||||
}
|
||||
|
@ -0,0 +1,61 @@
|
||||
package com.inspur.examine.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.examine.domain.ExamPaperInfo;
|
||||
|
||||
/**
|
||||
* 试卷信息Service接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
public interface IExamPaperInfoService
|
||||
{
|
||||
/**
|
||||
* 查询试卷信息
|
||||
*
|
||||
* @param id 试卷信息主键
|
||||
* @return 试卷信息
|
||||
*/
|
||||
public ExamPaperInfo selectExamPaperInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询试卷信息列表
|
||||
*
|
||||
* @param examPaperInfo 试卷信息
|
||||
* @return 试卷信息集合
|
||||
*/
|
||||
public List<ExamPaperInfo> selectExamPaperInfoList(ExamPaperInfo examPaperInfo);
|
||||
|
||||
/**
|
||||
* 新增试卷信息
|
||||
*
|
||||
* @param examPaperInfo 试卷信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamPaperInfo(ExamPaperInfo examPaperInfo);
|
||||
|
||||
/**
|
||||
* 修改试卷信息
|
||||
*
|
||||
* @param examPaperInfo 试卷信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamPaperInfo(ExamPaperInfo examPaperInfo);
|
||||
|
||||
/**
|
||||
* 批量删除试卷信息
|
||||
*
|
||||
* @param ids 需要删除的试卷信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除试卷信息信息
|
||||
*
|
||||
* @param id 试卷信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperInfoById(String id);
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package com.inspur.examine.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.inspur.examine.mapper.ExamAttestationPeopleMapper;
|
||||
import com.inspur.examine.domain.ExamAttestationPeople;
|
||||
import com.inspur.examine.service.IExamAttestationPeopleService;
|
||||
|
||||
/**
|
||||
* 认证人员关联Service业务层处理
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Service
|
||||
public class ExamAttestationPeopleServiceImpl implements IExamAttestationPeopleService
|
||||
{
|
||||
@Autowired
|
||||
private ExamAttestationPeopleMapper examAttestationPeopleMapper;
|
||||
|
||||
/**
|
||||
* 查询认证人员关联
|
||||
*
|
||||
* @param id 认证人员关联主键
|
||||
* @return 认证人员关联
|
||||
*/
|
||||
@Override
|
||||
public ExamAttestationPeople selectExamAttestationPeopleById(String id)
|
||||
{
|
||||
return examAttestationPeopleMapper.selectExamAttestationPeopleById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询认证人员关联列表
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 认证人员关联
|
||||
*/
|
||||
@Override
|
||||
public List<ExamAttestationPeople> selectExamAttestationPeopleList(ExamAttestationPeople examAttestationPeople)
|
||||
{
|
||||
return examAttestationPeopleMapper.selectExamAttestationPeopleList(examAttestationPeople);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增认证人员关联
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamAttestationPeople(ExamAttestationPeople examAttestationPeople)
|
||||
{
|
||||
return examAttestationPeopleMapper.insertExamAttestationPeople(examAttestationPeople);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改认证人员关联
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamAttestationPeople(ExamAttestationPeople examAttestationPeople)
|
||||
{
|
||||
return examAttestationPeopleMapper.updateExamAttestationPeople(examAttestationPeople);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除认证人员关联
|
||||
*
|
||||
* @param ids 需要删除的认证人员关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamAttestationPeopleByIds(String[] ids)
|
||||
{
|
||||
return examAttestationPeopleMapper.deleteExamAttestationPeopleByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除认证人员关联信息
|
||||
*
|
||||
* @param id 认证人员关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamAttestationPeopleById(String id)
|
||||
{
|
||||
return examAttestationPeopleMapper.deleteExamAttestationPeopleById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据认证ids删除关联信息
|
||||
*
|
||||
* @Author xusd
|
||||
* @Date 16:43 2024/5/7
|
||||
* @param ids 认证ids
|
||||
* @return int
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamAttestationPeopleByAttestationIds(String[] ids) {
|
||||
return examAttestationPeopleMapper.deleteExamAttestationPeopleByAttestationIds(ids);
|
||||
}
|
||||
}
|
@ -0,0 +1,130 @@
|
||||
package com.inspur.examine.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.inspur.common.utils.DateUtils;
|
||||
import com.inspur.common.utils.SecurityUtils;
|
||||
import com.inspur.common.utils.StringUtils;
|
||||
import com.inspur.common.utils.uuid.IdUtils;
|
||||
import com.inspur.examine.domain.ExamAttestationPeople;
|
||||
import com.inspur.examine.service.IExamAttestationPeopleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.inspur.examine.mapper.ExamAttestationMapper;
|
||||
import com.inspur.examine.domain.ExamAttestation;
|
||||
import com.inspur.examine.service.IExamAttestationService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.xml.rpc.ServiceException;
|
||||
|
||||
/**
|
||||
* 认证管理Service业务层处理
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Service
|
||||
public class ExamAttestationServiceImpl implements IExamAttestationService
|
||||
{
|
||||
@Autowired
|
||||
private ExamAttestationMapper examAttestationMapper;
|
||||
|
||||
@Autowired
|
||||
private IExamAttestationPeopleService examAttestationPeopleService;
|
||||
|
||||
/**
|
||||
* 查询认证管理
|
||||
*
|
||||
* @param id 认证管理主键
|
||||
* @return 认证管理
|
||||
*/
|
||||
@Override
|
||||
public ExamAttestation selectExamAttestationById(String id)
|
||||
{
|
||||
return examAttestationMapper.selectExamAttestationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询认证管理列表
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 认证管理
|
||||
*/
|
||||
@Override
|
||||
public List<ExamAttestation> selectExamAttestationList(ExamAttestation examAttestation)
|
||||
{
|
||||
examAttestation.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||
return examAttestationMapper.selectExamAttestationList(examAttestation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增认证管理
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamAttestation(ExamAttestation examAttestation)
|
||||
{
|
||||
examAttestation.setId(IdUtils.fastSimpleUUID());
|
||||
examAttestation.setCreateTime(DateUtils.getNowDate());
|
||||
return examAttestationMapper.insertExamAttestation(examAttestation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改认证管理
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamAttestation(ExamAttestation examAttestation)
|
||||
{
|
||||
return examAttestationMapper.updateExamAttestation(examAttestation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除认证管理
|
||||
*
|
||||
* @param ids 需要删除的认证管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int deleteExamAttestationByIds(String[] ids) {
|
||||
int i = examAttestationMapper.deleteExamAttestationByIds(ids);
|
||||
if (i > 0) {
|
||||
//根据认证id删除关联信息
|
||||
examAttestationPeopleService.deleteExamAttestationPeopleByAttestationIds(ids);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除认证管理信息
|
||||
*
|
||||
* @param id 认证管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamAttestationById(String id)
|
||||
{
|
||||
return examAttestationMapper.deleteExamAttestationById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamAttestationPeople> selectPeopleList(ExamAttestationPeople examAttestationPeople) throws ServiceException {
|
||||
examAttestationPeople.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||
List<ExamAttestationPeople> list = examAttestationPeopleService.selectExamAttestationPeopleList(examAttestationPeople);
|
||||
if (StringUtils.isNotEmpty(list)) {
|
||||
ExamAttestation examAttestation = this.selectExamAttestationById(examAttestationPeople.getAttestationId());
|
||||
if (Objects.isNull(examAttestation)) {
|
||||
throw new ServiceException("未查询到此证书");
|
||||
}
|
||||
list.forEach(item -> item.setAttestationName(examAttestation.getAttestationName()));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.inspur.examine.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@ -103,4 +104,15 @@ public class ExamInfoServiceImpl implements IExamInfoService {
|
||||
return examInfoMapper.deleteExamInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 考试信息下拉
|
||||
*
|
||||
* @Author xusd
|
||||
* @Date 11:21 2024/5/7
|
||||
* @return java.util.List<com.inspur.examine.domain.ExamInfo>
|
||||
*/
|
||||
@Override
|
||||
public List<ExamInfo> selection() {
|
||||
return examInfoMapper.selection();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,93 @@
|
||||
package com.inspur.examine.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.inspur.examine.mapper.ExamPaperInfoMapper;
|
||||
import com.inspur.examine.domain.ExamPaperInfo;
|
||||
import com.inspur.examine.service.IExamPaperInfoService;
|
||||
|
||||
/**
|
||||
* 试卷信息Service业务层处理
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Service
|
||||
public class ExamPaperInfoServiceImpl implements IExamPaperInfoService
|
||||
{
|
||||
@Autowired
|
||||
private ExamPaperInfoMapper examPaperInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询试卷信息
|
||||
*
|
||||
* @param id 试卷信息主键
|
||||
* @return 试卷信息
|
||||
*/
|
||||
@Override
|
||||
public ExamPaperInfo selectExamPaperInfoById(String id)
|
||||
{
|
||||
return examPaperInfoMapper.selectExamPaperInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询试卷信息列表
|
||||
*
|
||||
* @param examPaperInfo 试卷信息
|
||||
* @return 试卷信息
|
||||
*/
|
||||
@Override
|
||||
public List<ExamPaperInfo> selectExamPaperInfoList(ExamPaperInfo examPaperInfo)
|
||||
{
|
||||
return examPaperInfoMapper.selectExamPaperInfoList(examPaperInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增试卷信息
|
||||
*
|
||||
* @param examPaperInfo 试卷信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamPaperInfo(ExamPaperInfo examPaperInfo)
|
||||
{
|
||||
return examPaperInfoMapper.insertExamPaperInfo(examPaperInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试卷信息
|
||||
*
|
||||
* @param examPaperInfo 试卷信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamPaperInfo(ExamPaperInfo examPaperInfo)
|
||||
{
|
||||
return examPaperInfoMapper.updateExamPaperInfo(examPaperInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除试卷信息
|
||||
*
|
||||
* @param ids 需要删除的试卷信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamPaperInfoByIds(String[] ids)
|
||||
{
|
||||
return examPaperInfoMapper.deleteExamPaperInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除试卷信息信息
|
||||
*
|
||||
* @param id 试卷信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamPaperInfoById(String id)
|
||||
{
|
||||
return examPaperInfoMapper.deleteExamPaperInfoById(id);
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.inspur.examine.service;
|
||||
package com.inspur.examine.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.common.utils.DateUtils;
|
@ -0,0 +1,85 @@
|
||||
<?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.inspur.examine.mapper.ExamAttestationMapper">
|
||||
|
||||
<resultMap type="com.inspur.examine.domain.ExamAttestation" id="ExamAttestationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="attestationName" column="attestation_name" />
|
||||
<result property="attestationUnit" column="attestation_unit" />
|
||||
<result property="attestationInfo" column="attestation_info" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="peopleCount" column="people_count" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamAttestationVo">
|
||||
select id, attestation_name, attestation_unit, attestation_info, create_time from exam_attestation
|
||||
</sql>
|
||||
|
||||
<select id="selectExamAttestationList" parameterType="com.inspur.examine.domain.ExamAttestation" resultMap="ExamAttestationResult">
|
||||
SELECT
|
||||
ea.id,
|
||||
ea.attestation_name,
|
||||
ea.attestation_unit,
|
||||
ea.attestation_info,
|
||||
ea.create_time,
|
||||
COUNT( eap.id ) as people_count
|
||||
FROM
|
||||
exam_attestation AS ea
|
||||
LEFT JOIN exam_attestation_people AS eap ON ea.id = eap.attestation_id
|
||||
<if test="tenantId != null and tenantId != ''">AND eap.tenant_id = #{tenantId}</if>
|
||||
<where>
|
||||
<if test="attestationName != null and attestationName != ''"> and attestation_name like concat('%', #{attestationName}, '%')</if>
|
||||
<if test="attestationUnit != null and attestationUnit != ''"> and attestation_unit like concat('%', #{attestationUnit}, '%')</if>
|
||||
<if test="attestationInfo != null and attestationInfo != ''"> and attestation_info like concat('%', #{attestationInfo}, '%')</if>
|
||||
</where>
|
||||
GROUP BY ea.id
|
||||
order by ea.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectExamAttestationById" parameterType="String" resultMap="ExamAttestationResult">
|
||||
<include refid="selectExamAttestationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamAttestation" parameterType="com.inspur.examine.domain.ExamAttestation">
|
||||
insert into exam_attestation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="attestationName != null">attestation_name,</if>
|
||||
<if test="attestationUnit != null">attestation_unit,</if>
|
||||
<if test="attestationInfo != null">attestation_info,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="attestationName != null">#{attestationName},</if>
|
||||
<if test="attestationUnit != null">#{attestationUnit},</if>
|
||||
<if test="attestationInfo != null">#{attestationInfo},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamAttestation" parameterType="com.inspur.examine.domain.ExamAttestation">
|
||||
update exam_attestation
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="attestationName != null">attestation_name = #{attestationName},</if>
|
||||
<if test="attestationUnit != null">attestation_unit = #{attestationUnit},</if>
|
||||
<if test="attestationInfo != null">attestation_info = #{attestationInfo},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamAttestationById" parameterType="String">
|
||||
delete from exam_attestation where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamAttestationByIds" parameterType="String">
|
||||
delete from exam_attestation where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,89 @@
|
||||
<?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.inspur.examine.mapper.ExamAttestationPeopleMapper">
|
||||
|
||||
<resultMap type="com.inspur.examine.domain.ExamAttestationPeople" id="ExamAttestationPeopleResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="attestationId" column="attestation_id" />
|
||||
<result property="peopleId" column="people_id" />
|
||||
<result property="attestationTime" column="attestation_time" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="peopleName" column="nick_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamAttestationPeopleVo">
|
||||
SELECT
|
||||
eap.id,
|
||||
eap.attestation_id,
|
||||
eap.people_id,
|
||||
eap.attestation_time,
|
||||
eap.tenant_id,
|
||||
su.nick_name
|
||||
FROM
|
||||
exam_attestation_people AS eap
|
||||
LEFT JOIN sys_user AS su ON eap.people_id = su.user_id
|
||||
</sql>
|
||||
|
||||
<select id="selectExamAttestationPeopleList" parameterType="com.inspur.examine.domain.ExamAttestationPeople" resultMap="ExamAttestationPeopleResult">
|
||||
<include refid="selectExamAttestationPeopleVo"/>
|
||||
<where>
|
||||
<if test="attestationId != null and attestationId != ''"> and eap.attestation_id = #{attestationId}</if>
|
||||
<if test="tenantId != null and tenantId != ''"> and eap.tenant_id = #{tenantId}</if>
|
||||
</where>
|
||||
order by eap.attestation_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectExamAttestationPeopleById" parameterType="String" resultMap="ExamAttestationPeopleResult">
|
||||
<include refid="selectExamAttestationPeopleVo"/>
|
||||
where eap.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamAttestationPeople" parameterType="com.inspur.examine.domain.ExamAttestationPeople">
|
||||
insert into exam_attestation_people
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="attestationId != null">attestation_id,</if>
|
||||
<if test="peopleId != null">people_id,</if>
|
||||
<if test="attestationTime != null">attestation_time,</if>
|
||||
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="attestationId != null">#{attestationId},</if>
|
||||
<if test="peopleId != null">#{peopleId},</if>
|
||||
<if test="attestationTime != null">#{attestationTime},</if>
|
||||
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamAttestationPeople" parameterType="com.inspur.examine.domain.ExamAttestationPeople">
|
||||
update exam_attestation_people
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="attestationId != null">attestation_id = #{attestationId},</if>
|
||||
<if test="peopleId != null">people_id = #{peopleId},</if>
|
||||
<if test="attestationTime != null">attestation_time = #{attestationTime},</if>
|
||||
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamAttestationPeopleById" parameterType="String">
|
||||
delete from exam_attestation_people where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamAttestationPeopleByIds" parameterType="String">
|
||||
delete from exam_attestation_people where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamAttestationPeopleByAttestationIds">
|
||||
delete from exam_attestation_people where attestation_id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -36,13 +36,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="examLevel != null and examLevel != ''"> and exam_level = #{examLevel}</if>
|
||||
<if test="examType != null and examType != ''"> and exam_type = #{examType}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectExamInfoById" parameterType="String" resultMap="ExamInfoResult">
|
||||
<include refid="selectExamInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selection" resultMap="ExamInfoResult">
|
||||
<include refid="selectExamInfoVo"/>
|
||||
</select>
|
||||
|
||||
<insert id="insertExamInfo" parameterType="com.inspur.examine.domain.ExamInfo">
|
||||
insert into exam_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
@ -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.inspur.examine.mapper.ExamPaperInfoMapper">
|
||||
|
||||
<resultMap type="com.inspur.examine.domain.ExamPaperInfo" id="ExamPaperInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="examId" column="exam_id" />
|
||||
<result property="examineId" column="examine_id" />
|
||||
<result property="score" column="score" />
|
||||
<result property="status" column="status" />
|
||||
<result property="examStartTime" column="exam_start_time" />
|
||||
<result property="examEndTime" column="exam_end_time" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="examName" column="exam_name" />
|
||||
<result property="examineName" column="nick_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamPaperInfoVo">
|
||||
SELECT
|
||||
epi.id,
|
||||
epi.exam_id,
|
||||
epi.examine_id,
|
||||
epi.score,
|
||||
epi.`status`,
|
||||
epi.exam_start_time,
|
||||
epi.exam_end_time,
|
||||
epi.tenant_id,
|
||||
su.nick_name,
|
||||
ei.exam_name
|
||||
FROM
|
||||
exam_paper_info AS epi
|
||||
LEFT JOIN sys_user AS su ON su.user_id = epi.examine_id
|
||||
LEFT JOIN exam_info AS ei ON ei.id = epi.exam_id
|
||||
</sql>
|
||||
|
||||
<select id="selectExamPaperInfoList" parameterType="com.inspur.examine.domain.ExamPaperInfo" resultMap="ExamPaperInfoResult">
|
||||
<include refid="selectExamPaperInfoVo"/>
|
||||
<where>
|
||||
<if test="examId != null and examId != ''"> and epi.exam_id = #{examId}</if>
|
||||
<if test="examineId != null "> and epi.examine_id = #{examineId}</if>
|
||||
<if test="score != null "> and epi.score = #{score}</if>
|
||||
<if test="status != null and status != ''"> and epi.status = #{status}</if>
|
||||
<if test="tenantId != null and tenantId != ''"> and epi.tenant_id = #{tenantId}</if>
|
||||
</where>
|
||||
order by epi.exam_start_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectExamPaperInfoById" parameterType="String" resultMap="ExamPaperInfoResult">
|
||||
<include refid="selectExamPaperInfoVo"/>
|
||||
where epi.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamPaperInfo" parameterType="com.inspur.examine.domain.ExamPaperInfo">
|
||||
insert into exam_paper_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="examId != null">exam_id,</if>
|
||||
<if test="examineId != null">examine_id,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="examStartTime != null">exam_start_time,</if>
|
||||
<if test="examEndTime != null">exam_end_time,</if>
|
||||
<if test="tenantId != null">tenant_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="examId != null">#{examId},</if>
|
||||
<if test="examineId != null">#{examineId},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="examStartTime != null">#{examStartTime},</if>
|
||||
<if test="examEndTime != null">#{examEndTime},</if>
|
||||
<if test="tenantId != null">#{tenantId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamPaperInfo" parameterType="com.inspur.examine.domain.ExamPaperInfo">
|
||||
update exam_paper_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="examId != null">exam_id = #{examId},</if>
|
||||
<if test="examineId != null">examine_id = #{examineId},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="examStartTime != null">exam_start_time = #{examStartTime},</if>
|
||||
<if test="examEndTime != null">exam_end_time = #{examEndTime},</if>
|
||||
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamPaperInfoById" parameterType="String">
|
||||
delete from exam_paper_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamPaperInfoByIds" parameterType="String">
|
||||
delete from exam_paper_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="questionTitle != null and questionTitle != ''"> and question_title like concat('%', #{questionTitle}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectExamQuestionBankById" parameterType="String" resultMap="ExamQuestionBankResult">
|
||||
|
44
inspur-ui/src/api/community/heat.js
Normal file
44
inspur-ui/src/api/community/heat.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询社区帖子热度列表
|
||||
export function listHeat(query) {
|
||||
return request({
|
||||
url: "/community/heat/list",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询社区帖子热度详细
|
||||
export function getHeat(postId) {
|
||||
return request({
|
||||
url: "/community/heat/" + postId,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 新增社区帖子热度
|
||||
export function addHeat(data) {
|
||||
return request({
|
||||
url: "/community/heat",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改社区帖子热度
|
||||
export function updateHeat(data) {
|
||||
return request({
|
||||
url: "/community/heat",
|
||||
method: "put",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除社区帖子热度
|
||||
export function delHeat(postId) {
|
||||
return request({
|
||||
url: "/community/heat/" + postId,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
44
inspur-ui/src/api/community/like.js
Normal file
44
inspur-ui/src/api/community/like.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询社区点赞信息列表
|
||||
export function listLike(query) {
|
||||
return request({
|
||||
url: "/community/like/list",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询社区点赞信息详细
|
||||
export function getLike(userId) {
|
||||
return request({
|
||||
url: "/community/like/" + userId,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 新增社区点赞信息
|
||||
export function addLike(data) {
|
||||
return request({
|
||||
url: "/community/like",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改社区点赞信息
|
||||
export function updateLike(data) {
|
||||
return request({
|
||||
url: "/community/like",
|
||||
method: "put",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除社区点赞信息
|
||||
export function delLike(likePostId) {
|
||||
return request({
|
||||
url: "/community/like/" + likePostId,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
44
inspur-ui/src/api/community/reply.js
Normal file
44
inspur-ui/src/api/community/reply.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询社区帖子回复列表
|
||||
export function listReply(query) {
|
||||
return request({
|
||||
url: "/community/reply/list",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询社区帖子回复详细
|
||||
export function getReply(replyId) {
|
||||
return request({
|
||||
url: "/community/reply/" + replyId,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 新增社区帖子回复
|
||||
export function addReply(data) {
|
||||
return request({
|
||||
url: "/community/reply",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改社区帖子回复
|
||||
export function updateReply(data) {
|
||||
return request({
|
||||
url: "/community/reply",
|
||||
method: "put",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除社区帖子回复
|
||||
export function delReply(replyId) {
|
||||
return request({
|
||||
url: "/community/reply/" + replyId,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
44
inspur-ui/src/api/community/report.js
Normal file
44
inspur-ui/src/api/community/report.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询社区帖子举报列表
|
||||
export function listReport(query) {
|
||||
return request({
|
||||
url: "/community/report/list",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询社区帖子举报详细
|
||||
export function getReport(reportId) {
|
||||
return request({
|
||||
url: "/community/report/" + reportId,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 新增社区帖子举报
|
||||
export function addReport(data) {
|
||||
return request({
|
||||
url: "/community/report",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改社区帖子举报
|
||||
export function updateReport(data) {
|
||||
return request({
|
||||
url: "/community/report",
|
||||
method: "put",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除社区帖子举报
|
||||
export function delReport(reportId) {
|
||||
return request({
|
||||
url: "/community/report/" + reportId,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
53
inspur-ui/src/api/examine/attestation.js
Normal file
53
inspur-ui/src/api/examine/attestation.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询认证管理列表
|
||||
export function listAttestation(query) {
|
||||
return request({
|
||||
url: '/examine/attestation/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询认证管理详细
|
||||
export function getAttestation(id) {
|
||||
return request({
|
||||
url: '/examine/attestation/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增认证管理
|
||||
export function addAttestation(data) {
|
||||
return request({
|
||||
url: '/examine/attestation',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改认证管理
|
||||
export function updateAttestation(data) {
|
||||
return request({
|
||||
url: '/examine/attestation',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除认证管理
|
||||
export function delAttestation(id) {
|
||||
return request({
|
||||
url: '/examine/attestation/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询证书认证名单
|
||||
export function listAttestationPeople(query) {
|
||||
return request({
|
||||
url: '/examine/attestation/peopleList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -42,3 +42,11 @@ export function delExamInfo(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 考试信息下拉
|
||||
export function examInfoSelection() {
|
||||
return request({
|
||||
url: '/examine/examInfo/selection',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
44
inspur-ui/src/api/examine/paperInfo.js
Normal file
44
inspur-ui/src/api/examine/paperInfo.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询试卷信息列表
|
||||
export function listPaperInfo(query) {
|
||||
return request({
|
||||
url: '/examine/paperInfo/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询试卷信息详细
|
||||
export function getPaperInfo(id) {
|
||||
return request({
|
||||
url: '/examine/paperInfo/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增试卷信息
|
||||
export function addPaperInfo(data) {
|
||||
return request({
|
||||
url: '/examine/paperInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改试卷信息
|
||||
export function updatePaperInfo(data) {
|
||||
return request({
|
||||
url: '/examine/paperInfo',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除试卷信息
|
||||
export function delPaperInfo(id) {
|
||||
return request({
|
||||
url: '/examine/paperInfo/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
1
inspur-ui/src/assets/icons/svg/comment.svg
Normal file
1
inspur-ui/src/assets/icons/svg/comment.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1642500780486" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2923" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><defs><style type="text/css"></style></defs><path d="M322.09 904.448c-3.705 0-7.436-0.792-10.935-2.402a26.158 26.158 0 0 1-15.228-23.76V766.76c0-13.847-11.268-25.115-25.14-25.115h-128.03c-42.72 0-77.467-34.747-77.467-77.44V197.005c0-42.707 34.747-77.454 77.466-77.454h738.512c42.694 0 77.441 34.747 77.441 77.454v467.2c0 42.694-34.747 77.441-77.44 77.441H530.982a25.15 25.15 0 0 0-16.402 6.08L339.105 898.138a26.007 26.007 0 0 1-17.015 6.311zM142.756 171.877c-13.873 0-25.14 11.267-25.14 25.128v467.2c0 13.848 11.267 25.116 25.14 25.116h128.03c42.718 0 77.466 34.747 77.466 77.44v54.625l132.321-113.415c14.078-12.034 31.963-18.65 50.41-18.65h350.284c13.848 0 25.115-11.268 25.115-25.115V197.005c0-13.86-11.267-25.128-25.115-25.128h-738.51z" p-id="2924"></path></svg>
|
After Width: | Height: | Size: 1.1 KiB |
1
inspur-ui/src/assets/icons/svg/like.svg
Normal file
1
inspur-ui/src/assets/icons/svg/like.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1642500468204" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2137" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><defs><style type="text/css"></style></defs><path d="M933.248 335.104c-40-10.496-134.048-10.368-271.616-14.016 6.496-30.016 8-57.088 8-105.152 0-114.816-83.648-215.936-157.632-215.936-52.256 0-95.328 42.72-96 95.264-0.704 64.448-20.64 175.744-128 232.192-7.872 4.16-30.4 15.264-33.696 16.704l1.696 1.44c-16.8-14.496-40.096-25.6-64-25.6l-96 0c-52.928 0-96 43.072-96 96l0 512c0 52.928 43.072 96 96 96l96 0c38.08 0 69.952-23.008 85.376-55.264 0.384 0.128 1.056 0.32 1.504 0.384 2.112 0.576 4.608 1.184 7.648 1.984 0.576 0.16 0.864 0.224 1.472 0.384 18.432 4.576 53.92 13.056 129.76 30.496 16.256 3.712 102.144 22.016 191.104 22.016l174.944 0c53.312 0 91.744-20.512 114.624-61.696 0.32-0.64 7.68-15.008 13.696-34.432 4.512-14.624 6.176-35.328 0.736-56.32 34.368-23.616 45.44-59.328 52.64-82.56 12.064-38.112 8.448-66.752 0.064-87.264 19.328-18.24 35.808-46.048 42.752-88.512 4.32-26.304-0.32-53.376-12.448-75.904 18.112-20.352 26.368-45.952 27.328-69.632l0.384-6.688c0.224-4.192 0.416-6.784 0.416-16 0-40.416-28-91.968-90.752-109.888zM224 928c0 17.696-14.304 32-32 32l-96 0c-17.696 0-32-14.304-32-32l0-512c0-17.696 14.304-32 32-32l96 0c17.696 0 32 14.304 32 32l0 512zM959.264 465.12c-0.64 15.808-7.264 46.88-63.264 46.88-48 0-64 0-64 0-8.864 0-16 7.168-16 16s7.136 16 16 16c0 0 14.016 0 62.016 0s54.304 39.808 51.2 59.008c-3.968 23.872-15.168 68.992-69.216 68.992-53.984 0-76 0-76 0-8.864 0-16 7.136-16 16 0 8.8 7.136 16 16 16 0 0 38.016 0 63.008 0 54.016 0 49.248 41.184 41.504 65.76-10.208 32.288-16.448 62.24-84.512 62.24-23.008 0-52.192 0-52.192 0-8.864 0-16 7.136-16 16 0 8.8 7.136 16 16 16 0 0 22.176 0 50.176 0 35.008 0 36.64 33.12 32.992 44.992-4 12.992-8.736 22.624-8.928 23.072-9.664 17.44-25.248 27.936-58.24 27.936l-174.944 0c-87.872 0-175.04-19.936-177.28-20.448-132.928-30.624-139.936-32.992-148.288-35.36 0 0-27.072-4.576-27.072-28.192l-0.224-441.984c0-15.008 9.568-28.576 25.408-33.344 1.984-0.768 4.672-1.6 6.592-2.4 146.176-60.544 190.688-193.28 192-302.272 0.192-15.328 12-32 32-32 33.824 0 93.632 67.904 93.632 151.936 0 75.872-3.072 88.992-29.632 168.064 320 0 317.76 4.608 345.984 12 35.008 10.016 38.016 39.008 38.016 48.992 0 10.976-0.32 9.376-0.736 20.128zM144 832c-26.496 0-48 21.504-48 48s21.504 48 48 48 48-21.504 48-48-21.504-48-48-48zM144 896c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16z" p-id="2138"></path></svg>
|
After Width: | Height: | Size: 2.6 KiB |
@ -70,7 +70,7 @@ export default {
|
||||
},
|
||||
//传入input框的默认值
|
||||
toId: {
|
||||
type: Number,
|
||||
type: String,
|
||||
},
|
||||
//类型,end(文章末尾处), comment(评论里),
|
||||
type: {
|
||||
|
@ -27,15 +27,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<el-form
|
||||
:model="messageForm"
|
||||
:rules="messageFormRules"
|
||||
ref="messageFormRef"
|
||||
:model="replyForm"
|
||||
:rules="replyFormRules"
|
||||
ref="replyFormRef"
|
||||
>
|
||||
<el-form-item prop="content">
|
||||
<el-input
|
||||
@blur="blur"
|
||||
:rows="5"
|
||||
v-model="messageForm.content"
|
||||
v-model="replyForm.replyContent"
|
||||
type="textarea"
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
@ -80,10 +80,7 @@
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
import { getToken } from "@/utils/auth";
|
||||
// import {
|
||||
// cmsListComment,
|
||||
// cmsAddComment,
|
||||
// } from "@/api/cms/comment"
|
||||
import { listReply, getReply, addReply, delReply } from "@/api/community/reply";
|
||||
import comment from "./comments.vue";
|
||||
import Emoji from "@/components/Emoji";
|
||||
export default {
|
||||
@ -98,7 +95,7 @@ export default {
|
||||
userId: -1,
|
||||
content: "",
|
||||
},
|
||||
messageForm: {},
|
||||
replyForm: {},
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 查询参数
|
||||
@ -110,13 +107,13 @@ export default {
|
||||
likeNum: null,
|
||||
content: null,
|
||||
type: null,
|
||||
blogId: this.$route.query.id,
|
||||
postId: this.$route.query.id,
|
||||
userId: null,
|
||||
delFlag: null,
|
||||
createBy: null,
|
||||
},
|
||||
messageFormRules: {
|
||||
content: [
|
||||
replyFormRules: {
|
||||
replyContent: [
|
||||
{
|
||||
min: 0,
|
||||
max: 100,
|
||||
@ -148,46 +145,40 @@ export default {
|
||||
methods: {
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.messageForm = {
|
||||
id: null,
|
||||
parentId: null,
|
||||
mainId: null,
|
||||
likeNum: null,
|
||||
content: null,
|
||||
type: null,
|
||||
blogId: this.$route.query.id,
|
||||
this.replyForm = {
|
||||
replyContent: null,
|
||||
status: null,
|
||||
postId: this.$route.query.id,
|
||||
parentReplyId: null,
|
||||
rootReplyId: null,
|
||||
userId: null,
|
||||
delFlag: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
};
|
||||
this.resetForm("messageForm");
|
||||
this.resetForm("replyForm");
|
||||
},
|
||||
// 评论发表
|
||||
publish() {
|
||||
let token = getToken();
|
||||
this.$refs.messageFormRef.validate(async (valid) => {
|
||||
this.$refs.replyFormRef.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
if (
|
||||
this.messageForm.content == null ||
|
||||
this.messageForm.content == ""
|
||||
this.replyForm.replyContent == null ||
|
||||
this.replyForm.replyContent == ""
|
||||
) {
|
||||
this.$modal.msgError("评论内容不能为空!");
|
||||
return;
|
||||
}
|
||||
if (token == null || token == "") {
|
||||
this.messageForm.createBy = "匿名用户";
|
||||
this.messageForm.type = "0";
|
||||
// this.replyForm.createBy = "匿名用户";
|
||||
this.replyForm.status = "0";
|
||||
} else {
|
||||
this.messageForm.createBy = this.$store.getters.name;
|
||||
this.messageForm.type = "0";
|
||||
// this.replyForm.createBy = this.$store.getters.name;
|
||||
this.replyForm.status = "0";
|
||||
}
|
||||
cmsAddComment(this.messageForm).then((response) => {
|
||||
console.log("aaa:", this.replyForm);
|
||||
addReply(this.replyForm).then((response) => {
|
||||
this.$modal.msgSuccess("评论发表成功");
|
||||
this.reset();
|
||||
this.getMessageList();
|
||||
this.listReply();
|
||||
});
|
||||
});
|
||||
},
|
||||
@ -196,26 +187,27 @@ export default {
|
||||
*/
|
||||
commitComment(value) {
|
||||
this.reset();
|
||||
this.messageForm.content = value.inputComment;
|
||||
this.messageForm.parentId = value.id;
|
||||
console.log("接收的数据:", value);
|
||||
this.replyForm.replyContent = value.inputComment;
|
||||
this.replyForm.parentReplyId = value.id;
|
||||
let token = getToken();
|
||||
this.$refs.messageFormRef.validate(async (valid) => {
|
||||
this.$refs.replyFormRef.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
if (
|
||||
this.messageForm.content == null ||
|
||||
this.messageForm.content == ""
|
||||
this.replyForm.replyContent == null ||
|
||||
this.replyForm.replyContent == ""
|
||||
) {
|
||||
this.$modal.msgError("评论内容不能为空!");
|
||||
return;
|
||||
}
|
||||
if (token == null || token == "") {
|
||||
this.messageForm.createBy = "匿名用户";
|
||||
this.messageForm.type = "1";
|
||||
// this.replyForm.createBy = "匿名用户";
|
||||
this.replyForm.status = "1";
|
||||
} else {
|
||||
this.messageForm.createBy = this.$store.getters.name;
|
||||
this.messageForm.type = "1";
|
||||
// this.replyForm.createBy = this.$store.getters.name;
|
||||
this.replyForm.status = "0";
|
||||
}
|
||||
cmsAddComment(this.messageForm).then((response) => {
|
||||
addReply(this.replyForm).then((response) => {
|
||||
this.$modal.msgSuccess("评论发表成功");
|
||||
this.reset();
|
||||
this.getMessageList();
|
||||
@ -225,9 +217,41 @@ export default {
|
||||
// 获取评论列表
|
||||
async getMessageList() {
|
||||
let token = getToken();
|
||||
if (token != null && token != "") {
|
||||
this.queryParams.createBy = this.$store.getters.name;
|
||||
}
|
||||
// if (token != null && token != "") {
|
||||
// this.queryParams.createBy = this.$store.getters.name;
|
||||
// }
|
||||
listReply(this.queryParams).then((response) => {
|
||||
for (let i = 0; i < response.rows.length; i++) {
|
||||
let mesInfo = response.rows[i];
|
||||
if (mesInfo.avatar != null && mesInfo.avatar != "") {
|
||||
response.rows[i].avatar =
|
||||
process.env.VUE_APP_BASE_API + mesInfo.avatar;
|
||||
}
|
||||
if (mesInfo.children != null && mesInfo.children != "") {
|
||||
for (let j = 0; j < response.rows[i].children.length; j++) {
|
||||
let children = response.rows[i].children;
|
||||
if (children.avatar != null && children.avatar != "") {
|
||||
response.rows[i].children[j].avatar =
|
||||
process.env.VUE_APP_BASE_API + children.avatar;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mesInfo.children.length > 0) {
|
||||
let chl = mesInfo.children;
|
||||
for (let i = 0; i < chl.length; i++) {
|
||||
console.log("mes:", chl[i]);
|
||||
console.log("parent:", chl[i].parentReplyId);
|
||||
console.log("root:", chl[i].rootReplyId);
|
||||
console.log(
|
||||
"69696:",
|
||||
chl[i].parentReplyId != chl[i].rootReplyId
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.messageList = response.rows;
|
||||
this.total = response.total;
|
||||
});
|
||||
// cmsListComment(this.queryParams).then((response) => {
|
||||
// for (let i = 0; i < response.rows.length; i++) {
|
||||
// let mesInfo = response.rows[i];
|
||||
@ -254,23 +278,23 @@ export default {
|
||||
this.cursorIndexEnd = e.srcElement.selectionEnd; // 获取input输入框失去焦点时光标选中结束的位置
|
||||
},
|
||||
output(val) {
|
||||
if (this.cursorIndexStart !== null && this.messageForm.content) {
|
||||
if (this.cursorIndexStart !== null && this.replyForm.replyContent) {
|
||||
//如果 文本域获取了焦点, 则在光标位置处插入对应字段内容
|
||||
this.messageForm.content =
|
||||
this.messageForm.content.substring(0, this.cursorIndexStart) +
|
||||
this.replyForm.replyContent =
|
||||
this.replyForm.replyContent.substring(0, this.cursorIndexStart) +
|
||||
val +
|
||||
this.messageForm.content.substring(this.cursorIndexEnd);
|
||||
this.replyForm.replyContent.substring(this.cursorIndexEnd);
|
||||
} else {
|
||||
// 如果 文本域未获取焦点, 则在字符串末尾处插入对应字段内容
|
||||
this.messageForm.content = this.messageForm.content
|
||||
? this.messageForm.content
|
||||
this.replyForm.replyContent = this.replyForm.replyContent
|
||||
? this.replyForm.replyContent
|
||||
: "" + val;
|
||||
}
|
||||
},
|
||||
//跳转到相应位置
|
||||
to() {
|
||||
if (this.$route.query.commentId != null) {
|
||||
var toEl = document.getElementById(this.$route.query.commentId);
|
||||
if (this.$route.query.id != null) {
|
||||
var toEl = document.getElementById(this.$route.query.id);
|
||||
if (toEl != null) {
|
||||
if (toEl != null && toEl != "") {
|
||||
// toEl 为指定跳转到该位置的DOM节点
|
||||
|
@ -1,52 +1,93 @@
|
||||
<!--评论模块-->
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="comment" v-for="item in comments">
|
||||
<div class="info" :id="item.id">
|
||||
<el-avatar v-if="item.avatar!==''&&item.avatar!=null" :src="item.avatar"></el-avatar>
|
||||
<el-avatar v-else icon="el-icon-user-solid"></el-avatar>
|
||||
<div
|
||||
class="comment"
|
||||
v-for="item in comments"
|
||||
>
|
||||
<div
|
||||
class="info"
|
||||
:id="item.id"
|
||||
>
|
||||
<el-avatar
|
||||
v-if="item.avatar!==''&&item.avatar!=null"
|
||||
:src="item.avatar"
|
||||
></el-avatar>
|
||||
<el-avatar
|
||||
v-else
|
||||
icon="el-icon-user-solid"
|
||||
></el-avatar>
|
||||
<div class="right">
|
||||
<div class="name">{{item.createBy}}</div>
|
||||
<div class="date">{{item.createTime}}</div>
|
||||
<div class="name">{{item.userName}}</div>
|
||||
<div class="date">{{item.replyTime}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">{{item.content}}</div>
|
||||
<div class="content">{{item.replyContent}}</div>
|
||||
<div class="control">
|
||||
<span class="like" :class="{active: item.isLike}" @click="likeClick(item)">
|
||||
<span
|
||||
class="like"
|
||||
:class="{active: item.isLike}"
|
||||
@click="likeClick(item)"
|
||||
>
|
||||
<svg-icon icon-class="like" />
|
||||
<span class="like-num" style="margin-left: 5px;">{{item.likeNum > 0 ? item.likeNum + '人赞' : '赞'}}</span>
|
||||
<span
|
||||
class="like-num"
|
||||
style="margin-left: 5px;"
|
||||
>{{item.likeNum > 0 ? item.likeNum + '人赞' : '赞'}}</span>
|
||||
</span>
|
||||
<span class="comment-reply" @click="showCommentInput(item)">
|
||||
<span
|
||||
class="comment-reply"
|
||||
@click="showCommentInput(item)"
|
||||
>
|
||||
<svg-icon icon-class="comment" />
|
||||
<span style="margin-left: 5px;">回复</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="reply">
|
||||
<div class="item" v-for="reply in item.children" :id="reply.id">
|
||||
<div
|
||||
class="item"
|
||||
v-for="reply in item.children"
|
||||
:id="reply.replyId"
|
||||
>
|
||||
<div class="reply-content">
|
||||
<span class="from-name">{{reply.createBy}}</span><span>: </span>
|
||||
<span class="to-name" v-show="reply.parentId!=reply.mainId">@{{reply.pcreateBy}}</span>
|
||||
<span v-show="reply.delFlag=='0'">{{reply.content}}</span>
|
||||
<span v-show="reply.delFlag=='1'" style="color: #909399;">该评论已被删除!</span>
|
||||
<span class="from-name">{{reply.userName}}</span><span>: </span>
|
||||
<span
|
||||
class="to-name"
|
||||
v-show="reply.parentReplyId!=reply.rootReplyId"
|
||||
>@{{reply.parentReplyUserName}}</span>
|
||||
<span>{{reply.replyContent}}</span>
|
||||
<!-- <span
|
||||
v-show="reply.delFlag=='2'"
|
||||
style="color: #909399;"
|
||||
>该评论已被删除!</span> -->
|
||||
</div>
|
||||
<div class="reply-bottom">
|
||||
<span>{{reply.createTime}}</span>
|
||||
<span class="reply-text" @click="showCommentInput(item, reply)">
|
||||
<span>{{reply.replyTime}}</span>
|
||||
<span
|
||||
class="reply-text"
|
||||
@click="showCommentInput(item, reply)"
|
||||
>
|
||||
<svg-icon icon-class="comment" />
|
||||
<span style="margin-left: 5px;">回复</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="write-reply" v-if="item.children!=null" @click="showCommentInput(item)">
|
||||
<div
|
||||
class="write-reply"
|
||||
v-if="item.children!=null"
|
||||
@click="showCommentInput(item)"
|
||||
>
|
||||
<i class="el-icon-edit"></i>
|
||||
<span class="add-comment">添加新评论</span>
|
||||
</div>
|
||||
<input-component :show="showItemId === item.id"
|
||||
:value="inputComment"
|
||||
:toComment="name"
|
||||
:toId="id"
|
||||
@cancel="cancelInput"
|
||||
@confirm="commitComment">
|
||||
<input-component
|
||||
:show="showItemId === item.replyId"
|
||||
:value="inputComment"
|
||||
:toComment="name"
|
||||
:toId="id"
|
||||
@cancel="cancelInput"
|
||||
@confirm="commitComment"
|
||||
>
|
||||
</input-component>
|
||||
<!--<transition name="fade">-->
|
||||
<!--<div class="input-wrapper" v-if="showItemId === item.id">-->
|
||||
@ -69,301 +110,299 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import Vue from 'vue'
|
||||
import InputComponent from './InputComponent'
|
||||
import {
|
||||
getToken
|
||||
} from '@/utils/auth'
|
||||
// import {
|
||||
// addCmsCommentLike,
|
||||
// delCmsCommentLike,
|
||||
// } from "@/api/cms/comment"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
comments: {
|
||||
type: Array,
|
||||
required: true
|
||||
import Vue from "vue";
|
||||
import InputComponent from "./InputComponent";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { listReply, getReply, addReply, delReply } from "@/api/community/reply";
|
||||
import { listLike, getLike, addLike, delLike } from "@/api/community/like";
|
||||
export default {
|
||||
props: {
|
||||
comments: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
components: {
|
||||
"input-component": InputComponent,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
inputComment: "",
|
||||
name: "",
|
||||
id: null,
|
||||
showItemId: "",
|
||||
commentLikeForm: {},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.commentLikeForm = {
|
||||
commentId: null,
|
||||
userId: null,
|
||||
likeNum: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
};
|
||||
this.resetForm("commentLikeForm");
|
||||
},
|
||||
/**
|
||||
* 新增点赞
|
||||
*/
|
||||
addCommentLike(item) {
|
||||
let token = getToken();
|
||||
this.reset();
|
||||
if (token == null || token == "") {
|
||||
// this.commentLikeForm.createBy = "匿名用户";
|
||||
this.commentLikeForm.likePostId = item.replyId;
|
||||
this.commentLikeForm.likeNum = item.likeNum;
|
||||
} else {
|
||||
// this.commentLikeForm.createBy = this.$store.getters.name;
|
||||
this.commentLikeForm.likePostId = item.replyId;
|
||||
this.commentLikeForm.likeNum = item.likeNum;
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"input-component": InputComponent
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
inputComment: '',
|
||||
name: '',
|
||||
id: null,
|
||||
showItemId: '',
|
||||
commentLikeForm: {},
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.commentLikeForm = {
|
||||
commentId: null,
|
||||
userId: null,
|
||||
likeNum: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("commentLikeForm");
|
||||
},
|
||||
/**
|
||||
* 新增点赞
|
||||
*/
|
||||
addCommentLike(item){
|
||||
let token = getToken();
|
||||
addLike(this.commentLikeForm).then((response) => {
|
||||
this.reset();
|
||||
if (token==null || token == '') {
|
||||
this.commentLikeForm.createBy = "匿名用户"
|
||||
this.commentLikeForm.commentId = item.id
|
||||
this.commentLikeForm.likeNum = item.likeNum
|
||||
} else {
|
||||
this.commentLikeForm.createBy = this.$store.getters.name
|
||||
this.commentLikeForm.commentId = item.id
|
||||
this.commentLikeForm.likeNum = item.likeNum
|
||||
}
|
||||
addCmsCommentLike(this.commentLikeForm).then(response => {
|
||||
this.reset();
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 删除点赞
|
||||
*/
|
||||
delCommentLike(item){
|
||||
let token = getToken();
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 删除点赞
|
||||
*/
|
||||
delCommentLike(item) {
|
||||
let token = getToken();
|
||||
this.reset();
|
||||
if (token == null || token == "") {
|
||||
// this.commentLikeForm.createBy = "匿名用户";
|
||||
this.commentLikeForm.likePostId = item.replyId;
|
||||
this.commentLikeForm.likeNum = item.likeNum;
|
||||
} else {
|
||||
// this.commentLikeForm.createBy = this.$store.getters.name;
|
||||
this.commentLikeForm.likePostId = item.replayId;
|
||||
this.commentLikeForm.likeNum = item.likeNum;
|
||||
}
|
||||
delLike(item.replyId).then((response) => {
|
||||
this.reset();
|
||||
if (token==null || token == '') {
|
||||
this.commentLikeForm.createBy = "匿名用户"
|
||||
this.commentLikeForm.commentId = item.id
|
||||
this.commentLikeForm.likeNum = item.likeNum
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点赞
|
||||
*/
|
||||
likeClick(item) {
|
||||
if (item.isLike === null) {
|
||||
Vue.$set(item, "isLike", true);
|
||||
item.likeNum++;
|
||||
this.addCommentLike(item);
|
||||
} else {
|
||||
if (item.isLike) {
|
||||
item.likeNum--;
|
||||
this.delCommentLike(item);
|
||||
} else {
|
||||
this.commentLikeForm.createBy = this.$store.getters.name
|
||||
this.commentLikeForm.commentId = item.id
|
||||
this.commentLikeForm.likeNum = item.likeNum
|
||||
item.likeNum++;
|
||||
this.addCommentLike(item);
|
||||
}
|
||||
delCmsCommentLike(this.commentLikeForm).then(response => {
|
||||
this.reset();
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点赞
|
||||
*/
|
||||
likeClick(item) {
|
||||
if (item.isLike === null) {
|
||||
Vue.$set(item, "isLike", true);
|
||||
item.likeNum++
|
||||
this.addCommentLike(item)
|
||||
} else {
|
||||
if (item.isLike) {
|
||||
item.likeNum--
|
||||
this.delCommentLike(item)
|
||||
} else {
|
||||
item.likeNum++
|
||||
this.addCommentLike(item)
|
||||
}
|
||||
item.isLike = !item.isLike;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 点击取消按钮
|
||||
*/
|
||||
cancelInput() {
|
||||
this.showItemId = ''
|
||||
},
|
||||
|
||||
/**
|
||||
* 提交评论
|
||||
*/
|
||||
commitComment(value) {
|
||||
this.$emit("replyConfirm", value)
|
||||
// console.log(value);
|
||||
},
|
||||
|
||||
/**
|
||||
* 点击评论按钮显示输入框
|
||||
* item: 当前大评论
|
||||
* reply: 当前回复的评论
|
||||
*/
|
||||
showCommentInput(item, reply) {
|
||||
if (reply) {
|
||||
this.inputComment = ""
|
||||
this.name = "回复@" + reply.createBy + ":"
|
||||
this.id = reply.id
|
||||
} else {
|
||||
this.inputComment = ''
|
||||
this.name = '写下你的评论'
|
||||
this.id = item.id
|
||||
}
|
||||
this.showItemId = item.id
|
||||
item.isLike = !item.isLike;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// console.log(this.comments)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击取消按钮
|
||||
*/
|
||||
cancelInput() {
|
||||
this.showItemId = "";
|
||||
},
|
||||
|
||||
/**
|
||||
* 提交评论
|
||||
*/
|
||||
commitComment(value) {
|
||||
this.$emit("replyConfirm", value);
|
||||
// console.log(value);
|
||||
},
|
||||
|
||||
/**
|
||||
* 点击评论按钮显示输入框
|
||||
* item: 当前大评论
|
||||
* reply: 当前回复的评论
|
||||
*/
|
||||
showCommentInput(item, reply) {
|
||||
console.log("111:", item);
|
||||
console.log("222:", reply);
|
||||
if (reply != null) {
|
||||
this.inputComment = "";
|
||||
this.name = "回复@" + reply.userName + ":";
|
||||
this.id = reply.replyId;
|
||||
} else {
|
||||
this.inputComment = "";
|
||||
this.name = "写下你的评论";
|
||||
this.id = item.replyId;
|
||||
}
|
||||
this.showItemId = item.replyId;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
// console.log(this.comments)
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
|
||||
.container {
|
||||
padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
.comment {
|
||||
.container {
|
||||
padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
.comment {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #f2f6fc;
|
||||
.info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #F2F6FC;
|
||||
.info {
|
||||
align-items: center;
|
||||
.right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-left: 10px;
|
||||
.name {
|
||||
font-size: 16px;
|
||||
color: #303133;
|
||||
margin-bottom: 5px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.date {
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
font-size: 16px;
|
||||
color: #303133;
|
||||
line-height: 20px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
.control {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
color: #909399;
|
||||
.like {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.right {
|
||||
margin-right: 20px;
|
||||
cursor: pointer;
|
||||
&.active,
|
||||
&:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
.iconfont {
|
||||
font-size: 14px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.comment-reply {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
color: #333;
|
||||
}
|
||||
.iconfont {
|
||||
font-size: 16px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.reply {
|
||||
margin: 10px 0;
|
||||
border-left: 2px solid #dcdfe6;
|
||||
.item {
|
||||
margin: 0 10px;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px dashed #ebeef5;
|
||||
.reply-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-left: 10px;
|
||||
.name {
|
||||
font-size: 16px;
|
||||
color: #303133;
|
||||
margin-bottom: 5px;
|
||||
font-weight: 500;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
color: #303133;
|
||||
.from-name {
|
||||
color: #409eff;
|
||||
}
|
||||
.date {
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
.to-name {
|
||||
color: #409eff;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.reply-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 6px;
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
.reply-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
color: #333;
|
||||
}
|
||||
.icon-comment {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
font-size: 16px;
|
||||
color: #303133;
|
||||
line-height: 20px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
.control {
|
||||
.write-reply {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
color: #909399;
|
||||
.like {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 20px;
|
||||
cursor: pointer;
|
||||
&.active, &:hover {
|
||||
color: #409EFF;
|
||||
}
|
||||
.iconfont {
|
||||
font-size: 14px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
color: #303133;
|
||||
}
|
||||
.comment-reply {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
color: #333;
|
||||
}
|
||||
.iconfont {
|
||||
font-size: 16px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.el-icon-edit {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
}
|
||||
.reply {
|
||||
margin: 10px 0;
|
||||
border-left: 2px solid #DCDFE6;
|
||||
.item {
|
||||
margin: 0 10px;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px dashed #EBEEF5;
|
||||
.reply-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
color: #303133;
|
||||
.from-name {
|
||||
color: #409EFF;
|
||||
}
|
||||
.to-name {
|
||||
color: #409EFF;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.reply-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 6px;
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
.reply-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
color: #333;
|
||||
}
|
||||
.icon-comment {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.fade-enter-active,
|
||||
fade-leave-active {
|
||||
transition: opacity 0.5s;
|
||||
}
|
||||
.fade-enter,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
.input-wrapper {
|
||||
padding: 10px;
|
||||
.gray-bg-input,
|
||||
.el-input__inner {
|
||||
/*background-color: #67C23A;*/
|
||||
}
|
||||
.write-reply {
|
||||
.btn-control {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
color: #909399;
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
color: #303133;
|
||||
}
|
||||
.el-icon-edit {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.fade-enter-active, fade-leave-active {
|
||||
transition: opacity 0.5s;
|
||||
}
|
||||
.fade-enter, .fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
.input-wrapper {
|
||||
padding: 10px;
|
||||
.gray-bg-input, .el-input__inner {
|
||||
/*background-color: #67C23A;*/
|
||||
}
|
||||
.btn-control {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
padding-top: 10px;
|
||||
.cancel {
|
||||
font-size: 16px;
|
||||
color: #606266;
|
||||
margin-right: 20px;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
.confirm {
|
||||
font-size: 16px;
|
||||
padding-top: 10px;
|
||||
.cancel {
|
||||
font-size: 16px;
|
||||
color: #606266;
|
||||
margin-right: 20px;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
.confirm {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,35 +1,36 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<div style="text-align:center;margin-bottom:5px">
|
||||
<i
|
||||
class="el-icon-chat-line-round"
|
||||
style="color:blue"
|
||||
></i>
|
||||
<span style="font-weight:bold">发表新贴</span>
|
||||
</div>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
>
|
||||
|
||||
<el-form-item
|
||||
label="标题"
|
||||
prop="postTitle"
|
||||
<div>
|
||||
<div class="app-container ">
|
||||
<div>
|
||||
<div style="text-align:center;margin-bottom:5px">
|
||||
<i
|
||||
class="el-icon-chat-line-round"
|
||||
style="color:blue"
|
||||
></i>
|
||||
<span style="font-weight:bold">发表新贴</span>
|
||||
</div>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-input
|
||||
v-model="form.postTitle"
|
||||
placeholder="请输入标题"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-row>
|
||||
<el-form-item
|
||||
label="标题"
|
||||
prop="postTitle"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-input
|
||||
v-model="form.postTitle"
|
||||
placeholder="请输入标题"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="首图">
|
||||
<el-radio-group v-model="form.blogPicType">
|
||||
@ -87,94 +88,92 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
prop="postContent"
|
||||
label="内容"
|
||||
>
|
||||
|
||||
<Editor
|
||||
v-model="form.postContent"
|
||||
type="base64"
|
||||
:min-height="192"
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
prop="postType"
|
||||
label="帖子类型"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.postType"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
clearable
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
prop="postContent"
|
||||
label="内容"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.type.post_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
prop="omField"
|
||||
label="运维领域"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.omField"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
<Editor
|
||||
v-model="form.postContent"
|
||||
type="base64"
|
||||
:min-height="192"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
prop="postType"
|
||||
label="帖子类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.type.community_field"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
<el-select
|
||||
v-model="form.postType"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
clearable
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
prop="omIndustry"
|
||||
label="运维行业"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.omIndustry"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
<el-option
|
||||
v-for="item in dict.type.post_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
prop="omField"
|
||||
label="运维领域"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.type.community_industry"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
<el-select
|
||||
v-model="form.omField"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-option
|
||||
v-for="item in dict.type.community_field"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
prop="omIndustry"
|
||||
label="运维行业"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.omIndustry"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.type.community_industry"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div style="text-align:right">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="releaseForm"
|
||||
>发 表</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align:right">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="releaseForm"
|
||||
>发 表</el-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
329
inspur-ui/src/views/examine/attestation/index.vue
Normal file
329
inspur-ui/src/views/examine/attestation/index.vue
Normal file
@ -0,0 +1,329 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="认证名称" prop="attestationName">
|
||||
<el-input
|
||||
v-model="queryParams.attestationName"
|
||||
placeholder="请输入认证名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布单位" prop="attestationUnit">
|
||||
<el-input
|
||||
v-model="queryParams.attestationUnit"
|
||||
placeholder="请输入发布单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="认证说明" prop="attestationInfo">
|
||||
<el-input
|
||||
v-model="queryParams.attestationInfo"
|
||||
placeholder="请输入认证说明"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['examine:attestation:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['examine:attestation:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['examine:attestation:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['examine:attestation:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="attestationList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="认证名称" align="center" prop="attestationName" />
|
||||
<el-table-column label="认证人数" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleOpenPeopleList(scope.row)"
|
||||
v-hasPermi="['examine:attestation:peopleList']"
|
||||
>{{scope.row.peopleCount}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发布单位" align="center" prop="attestationUnit" />
|
||||
<el-table-column label="认证说明" align="center" prop="attestationInfo" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['examine:attestation:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['examine:attestation:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改认证管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="认证名称" prop="attestationName">
|
||||
<el-input v-model="form.attestationName" placeholder="请输入认证名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发布单位" prop="attestationUnit">
|
||||
<el-input v-model="form.attestationUnit" placeholder="请输入发布单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="认证说明" prop="attestationInfo">
|
||||
<el-input v-model="form.attestationInfo" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="认证名单" :visible.sync="peopleTableOpen" width="700px" append-to-body>
|
||||
<el-table v-loading="peopleTableLoading" :data="attestationPeopleList">
|
||||
<el-table-column label="认证名称" align="center" prop="attestationName" />
|
||||
<el-table-column label="持有人" align="center" prop="peopleName" />
|
||||
<el-table-column label="认证时间" align="center" prop="attestationTime" />
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="peopleQueryParams.pageNum"
|
||||
:limit.sync="peopleQueryParams.pageSize"
|
||||
@pagination="getPeopleTableList"
|
||||
/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancelPeopleTable">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listAttestation, getAttestation, delAttestation, addAttestation, updateAttestation, listAttestationPeople } from "@/api/examine/attestation";
|
||||
|
||||
export default {
|
||||
name: "Attestation",
|
||||
data() {
|
||||
return {
|
||||
peopleTableLoading: false,
|
||||
attestationPeopleTotal: 0,
|
||||
attestationPeopleList: [],
|
||||
peopleQueryParams:{
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
attestationId: null
|
||||
},
|
||||
peopleTableOpen: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 认证管理表格数据
|
||||
attestationList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
attestationName: null,
|
||||
attestationUnit: null,
|
||||
attestationInfo: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
attestationName: [
|
||||
{ required: true, message: "认证名称不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
cancelPeopleTable(){
|
||||
this.attestationPeopleList = [];
|
||||
this.peopleTableOpen = false;
|
||||
},
|
||||
handleOpenPeopleList(row){
|
||||
this.peopleQueryParams.attestationId = row.id;
|
||||
this.getPeopleTableList();
|
||||
this.peopleTableOpen = true;
|
||||
this.peopleTableLoading = true;
|
||||
},
|
||||
getPeopleTableList(){
|
||||
listAttestationPeople(this.peopleQueryParams).then(response =>{
|
||||
this.attestationPeopleList = response.rows;
|
||||
this.attestationPeopleTotal = response.total;
|
||||
this.peopleTableLoading = false;
|
||||
})
|
||||
},
|
||||
/** 查询认证管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listAttestation(this.queryParams).then(response => {
|
||||
this.attestationList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
attestationName: null,
|
||||
attestationUnit: null,
|
||||
attestationInfo: null,
|
||||
createTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加认证管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getAttestation(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改认证管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateAttestation(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addAttestation(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除认证管理编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delAttestation(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('examine/attestation/export', {
|
||||
...this.queryParams
|
||||
}, `attestation_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
334
inspur-ui/src/views/examine/paperInfo/index.vue
Normal file
334
inspur-ui/src/views/examine/paperInfo/index.vue
Normal file
@ -0,0 +1,334 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="考试名称" prop="status">
|
||||
<el-select v-model="queryParams.examId" placeholder="请选择考试名称" clearable>
|
||||
<el-option
|
||||
v-for="item in examInfoSelection"
|
||||
:key="item.id"
|
||||
:label="item.examName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="考生名称" prop="status">
|
||||
<el-select v-model="queryParams.examineId" placeholder="请选择考生名称" clearable>
|
||||
<el-option
|
||||
v-for="item in userSelection"
|
||||
:key="item.userId"
|
||||
:label="item.nickName"
|
||||
:value="item.userId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.examine_result"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
<!-- v-hasPermi="['examine:paperInfo:add']"-->
|
||||
<!-- >新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="single"-->
|
||||
<!-- @click="handleUpdate"-->
|
||||
<!-- v-hasPermi="['examine:paperInfo:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="danger"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="multiple"-->
|
||||
<!-- @click="handleDelete"-->
|
||||
<!-- v-hasPermi="['examine:paperInfo:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['examine:paperInfo:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="paperInfoList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||
<el-table-column label="考试名称" align="center" prop="examName" />
|
||||
<el-table-column label="考生名称" align="center" prop="examineName" />
|
||||
<el-table-column label="考试开始时间" align="center" prop="examStartTime"/>
|
||||
<el-table-column label="考试结束时间" align="center" prop="examEndTime"/>
|
||||
<el-table-column label="分数" align="center" prop="score" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.examine_result" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- @click="handleUpdate(scope.row)"-->
|
||||
<!-- v-hasPermi="['examine:paperInfo:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- v-hasPermi="['examine:paperInfo:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改试卷信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="分数" prop="score">
|
||||
<el-input v-model="form.score" placeholder="请输入分数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态 0 未通过,1 通过" prop="status">
|
||||
<el-select v-model="form.status" placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.examine_result"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="考试开始时间" prop="examStartTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.examStartTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择考试开始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="考试结束时间" prop="examEndTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.examEndTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择考试结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="租户id" prop="tenantId">
|
||||
<el-input v-model="form.tenantId" placeholder="请输入租户id" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPaperInfo, getPaperInfo, delPaperInfo, addPaperInfo, updatePaperInfo } from "@/api/examine/paperInfo";
|
||||
import { examInfoSelection } from "@/api/examine/examInfo";
|
||||
import { userSelection } from "@/api/system/user";
|
||||
|
||||
export default {
|
||||
name: "PaperInfo",
|
||||
dicts: ['examine_result'],
|
||||
data() {
|
||||
return {
|
||||
userSelection:[],
|
||||
examInfoSelection: [],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 试卷信息表格数据
|
||||
paperInfoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
examId: null,
|
||||
examineId: null,
|
||||
score: null,
|
||||
status: null,
|
||||
tenantId: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getExamInfoSelection();
|
||||
this.getUserSelection();
|
||||
},
|
||||
methods: {
|
||||
//考试人员下拉
|
||||
getUserSelection(){
|
||||
userSelection().then((res)=>{
|
||||
this.userSelection = res.data;
|
||||
})
|
||||
},
|
||||
//考试信息下拉
|
||||
getExamInfoSelection(){
|
||||
examInfoSelection().then((res)=>{
|
||||
this.examInfoSelection = res;
|
||||
})
|
||||
},
|
||||
/** 查询试卷信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listPaperInfo(this.queryParams).then(response => {
|
||||
this.paperInfoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
examId: null,
|
||||
examineId: null,
|
||||
score: null,
|
||||
status: null,
|
||||
examStartTime: null,
|
||||
examEndTime: null,
|
||||
tenantId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams = {}
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加试卷信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getPaperInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改试卷信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePaperInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPaperInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除试卷信息编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delPaperInfo(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('examine/paperInfo/export', {
|
||||
...this.queryParams
|
||||
}, `paperInfo_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user