Bläddra i källkod

管理员查看界面增加type

fangqing 1 månad sedan
förälder
incheckning
8a5ff6b10d

+ 3 - 3
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/CommunityReportController.java

@@ -124,14 +124,14 @@ public class CommunityReportController {
     @ApiOperation("管理员查看界面")
     @GetMapping("/adminReport")
     //@Anonymous
-    public AjaxResult adminReport(Long id) {
+    public AjaxResult adminReport(Long id,Long type) {
         List<CommunityReportUserVo> communityReportUsers = null;
         try {
             int pageNum = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
             int pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
             int offset = (pageNum - 1) * pageSize;
             int searchType = Convert.toInt(ServletUtils.getParameter("searchType"), 0);
-            communityReportUsers = communityReportUserMapper.selectCommunityReportUser(offset, pageSize, searchType,id);
+            communityReportUsers = communityReportUserMapper.selectCommunityReportUser(offset, pageSize, searchType,id,type);
         } catch (Exception e) {
             System.out.println(e.getMessage());
             throw new ProjectException();
@@ -154,7 +154,7 @@ public class CommunityReportController {
         List<CommunityReportUserVo> communityReportUsers = null;
         try {
             //判断已经处罚过的数据 不进行处理
-            communityReportUsers = communityReportUserMapper.selectCommunityReportUser(0, 100, 0,communityReportPunishVo.getId());
+            communityReportUsers = communityReportUserMapper.selectCommunityReportUser(0, 100, 0,communityReportPunishVo.getId(),null);
             if (!communityReportUsers.isEmpty()) {
                 CommunityReportUserVo firstUser = communityReportUsers.get(0);
                 Long updateBy = firstUser.getUpdateBy();

+ 2 - 1
ruoyi-generator/src/main/java/com/ruoyi/generator/mapper/community/CommunityReportUserMapper.java

@@ -21,5 +21,6 @@ public interface CommunityReportUserMapper extends BaseMapper<CommunityReportUse
     List<CommunityReportUserVo> selectCommunityReportUser          (@Param("offset") int offset,
                                                                       @Param("limit") int limit,
                                                                       @Param("searchType") int searchType,
-                                                                      @Param("id") Long  id);
+                                                                      @Param("id") Long  id,
+                                                                      @Param("type") Long  type);
 }

+ 3 - 0
ruoyi-generator/src/main/resources/mapper/community/CommunityReportUserMapper.xml

@@ -72,6 +72,9 @@
             <if test="id != null and id != ''">
                 AND id = #{id}
             </if>
+           <if test="type != null and type != ''">
+               AND type = #{type}
+           </if>
        </where>
         <if test="searchType == 1">
             order by a.create_time desc