Browse Source

居民端-我的建议列表

dev_shibei_match
liushaowen 5 years ago
parent
commit
86ac79a366
  1. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserAdviceController.java
  2. 2
      epmet-user/epmet-user-server/src/main/resources/mapper/UserAdviceDao.xml

6
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserAdviceController.java

@ -140,6 +140,12 @@ public class UserAdviceController {
public Result<List<MyAdviceListResultDTO>> myAdviceList(@RequestBody Map<String,Integer> map) {
int pageSize = map.get("pageSize");
int pageNo = map.get("pageNo");
if (pageSize == 0){
pageSize = 10;
}
if (pageNo == 0){
pageNo = 1;
}
return new Result<List<MyAdviceListResultDTO>>().ok(userAdviceService.myAdviceList(pageSize,pageNo,loginUserUtil.getLoginUserId()));
}
}

2
epmet-user/epmet-user-server/src/main/resources/mapper/UserAdviceDao.xml

@ -59,7 +59,7 @@
order by created_time desc
limit ${(pageNo-1)*pageSize},${pageSize};
</select>
<select id="getResiImgByAdviceId">
<select id="getResiImgByAdviceId" resultType="String">
select img_url
from user_advice_img
where del_flag = 0 and advice_Id = #{id} and type = 'resi'

Loading…
Cancel
Save