package com.yeshi.fanli.controller.client; import java.io.PrintWriter; import javax.annotation.Resource; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.yeshi.fanli.entity.accept.AcceptData; import com.yeshi.fanli.entity.config.AppHomeFloatImg; import com.yeshi.fanli.service.inter.config.ConfigService; import org.yeshi.utils.JsonUtil; import net.sf.json.JSONObject; /** * 动态 * * @author Administrator * */ @Controller("ConfigController1") @RequestMapping("api/v1/config") public class ConfigController { @Resource private ConfigService configService; /** * 首页配置信息 * * @param acceptData * @param out */ @RequestMapping(value = "getHomeConfig", method = RequestMethod.POST) public void getHomeConfig(AcceptData acceptData, PrintWriter out) { AppHomeFloatImg appHomeFloatImg = configService.getAppHomeFloatImg(); JSONObject data = new JSONObject(); if (appHomeFloatImg != null) data.put("floatImg", appHomeFloatImg); out.print(JsonUtil.loadTrueResult(data)); } }