Browse Source

回音墙管理

jz.kai 4 năm trước cách đây
mục cha
commit
23a5096353

+ 2 - 2
common/src/main/resources/mapper/base/WhisperingWall.xml

@@ -106,8 +106,8 @@ id_,question_,question_by,question_time,answer_,answer_by,answer_time,type_,del_
 		]]>
 		<where>
 			del_flag=0
-			<if test="searchParams.id != null">
-				and ID_ like #{searchParams.id}
+			<if test="searchParams.question != null">
+				and question_ like #{searchParams.question}
 			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">

+ 3 - 3
web/src/main/java/com/jpsoft/enterprise/modules/base/controller/WhisperingWallController.java

@@ -204,7 +204,7 @@ public class WhisperingWallController {
     @ApiOperation(value="列表")
     @RequestMapping(value = "pageList",method = RequestMethod.POST)
     public MessageResult<Map> pageList(
-            String id,
+            String question,
             @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
             @RequestParam(value="pageSize",defaultValue="20") int pageSize,
             @RequestAttribute String subject){
@@ -219,8 +219,8 @@ public class WhisperingWallController {
         List<Sort> sortList = new ArrayList<>();
         sortList.add(new Sort("id_","asc"));
 
-        if (StringUtils.isNotEmpty(id)) {
-            searchParams.put("id","%" + id + "%");
+        if (StringUtils.isNotEmpty(question)) {
+            searchParams.put("question","%" + question + "%");
         }
 
         Page<WhisperingWall> page = whisperingWallService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);