jz.kai пре 1 година
родитељ
комит
5daefe1fef

+ 1 - 0
common/src/main/resources/mapper/base/ImageWall.xml

@@ -74,6 +74,7 @@
 			select * from base_image_wall
 		]]>
 		<where>
+			del_flag = 0
 			<if test="searchParams.id != null">
 				and ID_ like #{searchParams.id}
 			</if>

+ 2 - 0
web/src/main/java/com/jpsoft/employment/config/WebMvcConfig.java

@@ -84,6 +84,8 @@ public class WebMvcConfig implements WebMvcConfigurer {
 				//项目互动
 				.excludePathPatterns("/base/api/love/list")
 				.excludePathPatterns("/base/api/love/edit")
+				//爱心墙
+				.excludePathPatterns("/base/api/wall/list")
 		;
 	}
 }

+ 5 - 13
web/src/main/java/com/jpsoft/employment/modules/base/api/ChartApi.java

@@ -37,12 +37,6 @@ public class ChartApi {
     private LoveProjectService loveProjectService;
     @Autowired
     private WishInfoUserRecordService wishInfoUserRecordService;
-    @Autowired
-    private StudentAspirationsService studentAspirationsService;
-    @Autowired
-    private DataDictionaryService dataDictionaryService;
-    @Autowired
-    private FeedbackMethodService feedbackMethodService;
 
     @ApiOperation(value="数据统计")
     @RequestMapping(value = "dataTotal",method = RequestMethod.POST)
@@ -50,13 +44,11 @@ public class ChartApi {
         MessageResult msgResult = new MessageResult<>();
         Map<String,Object> map = new HashMap<>();
 
-        Integer countWishRecord = wishInfoUserRecordService.countByUser(null);
-        Integer countLoveProject = loveProjectService.countByType("1");
-        Integer countAssist = 0;
-
-        map.put("countWishRecord",countWishRecord);
-        map.put("countLoveProject",countLoveProject);
-        map.put("countAssist",countAssist);
+        map.put("countXYHH", wishInfoUserRecordService.countByUser(null));
+        map.put("countXMHD", loveProjectService.countByType("1"));
+        map.put("countAXHZ", loveProjectService.countByType("2"));
+        map.put("countZYHX", loveProjectService.countByType("4"));
+        map.put("countBFHJ", loveProjectService.countByType("5"));
 
         msgResult.setResult(true);
         msgResult.setData(map);

+ 58 - 0
web/src/main/java/com/jpsoft/employment/modules/base/api/WallApi.java

@@ -0,0 +1,58 @@
+package com.jpsoft.employment.modules.base.api;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.employment.modules.base.entity.FeedbackMethod;
+import com.jpsoft.employment.modules.base.entity.ImageWall;
+import com.jpsoft.employment.modules.base.entity.LoveProject;
+import com.jpsoft.employment.modules.base.service.*;
+import com.jpsoft.employment.modules.common.dto.MessageResult;
+import com.jpsoft.employment.modules.common.dto.Sort;
+import com.jpsoft.employment.modules.common.utils.PojoUtils;
+import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/base/api/wall")
+@Api(description = "爱心墙")
+public class WallApi {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private ImageWallService imageWallService;
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "list",method = RequestMethod.POST)
+    public MessageResult list(
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize){
+        MessageResult msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time","desc"));
+
+        Page<ImageWall> page = imageWallService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}