All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.centit.framework.system.controller.SystemSettingController Maven / Gradle / Ivy

Go to download

定义了一组和core兼容的表结构,并用mybatis实现了表的增删改查

There is a newer version: 5.0.2101
Show newest version
package com.centit.framework.system.controller;

import com.centit.framework.common.ResponseData;
import com.centit.framework.core.controller.BaseController;
import com.centit.framework.core.controller.WrapUpResponseBody;
import com.centit.framework.system.service.UserSettingManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;

/*
 * 系统设置
 *
 * @author [email protected]
 */
@Controller
@RequestMapping("/systemsetting")
public class SystemSettingController extends BaseController {
    @Autowired
    private UserSettingManager userSettingManager;

    /*
     * 系统日志中记录
     *
     * @return 业务标识ID
     */
    public String getOptId() {
        return "SystemSetting";
    }

    @RequestMapping(value = "update", method = RequestMethod.POST)
    public void updateSystemName(String systemName) {

    }

    @RequestMapping(value = "/uploadico", method = RequestMethod.POST)
    @WrapUpResponseBody
    public ResponseData replaceIcon(HttpServletRequest request) {
        String webPath = request.getSession().getServletContext().getRealPath("");
        request.getServletContext().getRealPath("");
        String filePath = webPath + "/ui/favicon.ico";

        try (OutputStream fileOutputStream = new FileOutputStream(new File(filePath));
             InputStream inputStream = request.getInputStream()) {

            int ch = 0;
            while ((ch = inputStream.read()) != -1) {
                fileOutputStream.write(ch);
            }

        } catch (IOException e) {

        }
        return ResponseData.successResponse;
    }

    @RequestMapping(method = RequestMethod.POST)
    public void setSystemParameter(String systemName, HttpServletResponse response) {

    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy