| | |
| | | import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
|
| | | import com.yeshi.fanli.exception.config.HelpCenterException;
|
| | | import com.yeshi.fanli.exception.config.HelpClassException;
|
| | | import com.yeshi.fanli.exception.homemodule.FloatADException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.AppVersionService;
|
| | | import com.yeshi.fanli.service.inter.help.HelpCenterService;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改状态
|
| | | * @param callback
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "switchState")
|
| | | public void switchState(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | helpCenterService.switchState(id);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | | } catch (HelpCenterException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | @RequestMapping(value = "getInfo")
|
| | | public void getInfo(String callback, Long id, PrintWriter out) {
|
| | |
|
| | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("id", crrent.getId());
|
| | | data.put("title", crrent.getTitle());
|
| | | data.put("state", crrent.getState());
|
| | | data.put("weight", crrent.getWeight());
|
| | |
|
| | |
|
| | | if (crrent.getStartTime() != null) {
|
| | | data.put("startTime", TimeUtil.getWholeTime(crrent.getStartTime().getTime()));
|
| | |
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Long cid, Integer orderMode,
|
| | | String version, String platform, PrintWriter out) {
|
| | | String version, String platform, Integer state,PrintWriter out) {
|
| | | try {
|
| | | if (orderMode == null)
|
| | | orderMode = 1;
|
| | |
| | | if (pageSize == null)
|
| | | pageSize = Constant.PAGE_SIZE;
|
| | |
|
| | | List<HelpCenter> list = helpCenterService.query(0, Integer.MAX_VALUE, key, cid, orderMode);
|
| | | List<HelpCenter> list = helpCenterService.query(0, Integer.MAX_VALUE, key, cid, orderMode, state);
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | |
| | | helpClassService.save(helpClass, null);
|
| | | }
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | | } catch (FloatADException e) {
|
| | | } catch (HelpClassException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("保存失败"));
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改状态
|
| | | * @param callback
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "switchStateClass")
|
| | | public void switchStateClass(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | helpClassService.switchState(id);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | | } catch (HelpClassException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 修改排序
|