admin
2025-02-25 30d8e227e8d823b6c38c3b9c90ac2df03b63befe
fanli/src/main/java/com/yeshi/fanli/controller/ConfigController.java
@@ -1,39 +1,21 @@
package com.yeshi.fanli.controller;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
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.service.inter.config.ConfigService;
import com.yeshi.fanli.util.Constant;
import org.yeshi.utils.JsonUtil;
@Controller
@RequestMapping("client/html/api/v1/config")
public class ConfigController {
   @Resource
   private ConfigService configService;
   @RequestMapping(value = "getConfigList", method = RequestMethod.POST)
   public void getConfigList(String[] keys, PrintWriter out) {
      List<String> configList = new ArrayList<String>();
      for (String key : keys) {
         String value = configService.get(key);
         configList.add(value);
      }
      out.print(JsonUtil.loadTrueResult(configList));
   }
   @RequestMapping(value = "getSystemName")
   public void getSystemName(String[] keys, PrintWriter out) {
      out.print(JsonUtil.loadTrueResult(Constant.systemCommonConfig.getProjectChineseName() + "后台管理系统"));
   }
}
package com.yeshi.fanli.controller;
import java.io.PrintWriter;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.yeshi.utils.JsonUtil;
import com.yeshi.fanli.util.Constant;
@Controller
@RequestMapping("client/html/api/v1/config")
public class ConfigController {
   @RequestMapping(value = "getSystemName")
   public void getSystemName(String[] keys, PrintWriter out) {
      out.print(JsonUtil.loadTrueResult(Constant.systemCommonConfig.getProjectChineseName() + "后台管理系统"));
   }
}