| | |
| | | import java.util.Map;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | |
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.common.Config;
|
| | | import com.yeshi.fanli.service.AdminUserService;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | |
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private ConfigService configService;
|
| | | |
| | | @Resource
|
| | | private AdminUserService adminUserService;
|
| | | |
| | |
|
| | | @RequestMapping(value = "getConfigList", method = RequestMethod.POST)
|
| | | public void getConfigList(PrintWriter out){
|
| | |
| | | * @param config
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "saveModify")
|
| | | public void saveModify(String callback, Config config, PrintWriter out) {
|
| | | public void saveModify(String callback, Config config, Long uid, HttpServletResponse response, PrintWriter out) {
|
| | | |
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | |
|
| | | AdminUser admin = adminUserService.selectByPrimaryKey(uid);
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadFalseResult("当前账户验证失败"));
|
| | | return;
|
| | | }
|
| | | |
| | | Long id = config.getId();
|
| | | if (id == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
|