yujian
2019-12-10 c8041ec0544bf122e6819e6bf698997ccbf30aaf
fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5HelpCenterController.java
@@ -12,7 +12,7 @@
import com.yeshi.fanli.entity.bus.help.HelpCenter;
import com.yeshi.fanli.entity.bus.help.HelpClass;
import com.yeshi.fanli.entity.bus.help.HelpInfo;
import com.yeshi.fanli.exception.HelpCenterException;
import com.yeshi.fanli.exception.config.HelpCenterException;
import com.yeshi.fanli.service.inter.help.HelpCenterService;
import com.yeshi.fanli.service.inter.help.HelpClassService;
import com.yeshi.fanli.tag.PageEntity;
@@ -39,7 +39,8 @@
    * @param out
    */
   @RequestMapping(value = "query")
   public void query(String callback, Integer pageIndex, Integer pageSize,   String key, PrintWriter out) {
   public void query(String callback, Integer pageIndex, Integer pageSize,   String key, Long cid,
         PrintWriter out) {
      
      try {
         
@@ -49,15 +50,19 @@
         if (pageSize == null) 
            pageSize = Constant.PAGE_SIZE;
         
         if (cid != null && cid == 0) {
            cid = null; // 查询全部
         }
         List<HelpCenter> helpCenterList = 
               helpCenterService.queryIdAndTitle((pageIndex - 1) * pageSize, pageSize, key, null);
               helpCenterService.queryIdAndTitle((pageIndex - 1) * pageSize, pageSize, key, cid);
         
         if (helpCenterList == null || helpCenterList.size() == 0) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
            return;
         } 
         
         long count = helpCenterService.countQuery(key, null);
         long count = helpCenterService.countQuery(key, cid);
            
         int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count   / pageSize + 1);
         PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);