package com.hzya.frame.sys.app.controller;

import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.sys.app.service.ISysAppService;
import com.hzya.frame.sys.app.service.impl.SysAppServiceImpl;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

/**
 * @description: 应用表  controller
 * @tableName: sys_app 
 * @entityName: sysApp
 * @author: llg
 * @history: 1.0
 */

@Controller()
@RequestMapping("sysApp")
public class SysAppController {
    @Autowired
    protected ISysAppService sysAppService;
    /**
     * @Author lvleigang
     * @Description  分页查询应用
     * @Date 9:44 上午 2023/3/1
     * @param servletRequest
     * @param servletResponse
     * @return com.hzya.frame.web.entity.JsonResultEntity
     **/
    @RequestMapping(value = "/queryPageApp")
    @ResponseBody
    public JsonResultEntity queryPageApp(ServletRequest servletRequest, ServletResponse servletResponse) throws Exception  {
        return  sysAppService.queryPageApp(new JSONObject());
    }
    /**
     * @Author lvleigang
     * @Description  根据应用id查询
     * @Date 11:15 上午 2023/3/6
     * @param servletRequest
     * @param servletResponse
     * @return com.hzya.frame.web.entity.JsonResultEntity
     **/
    @RequestMapping(value = "/queryApp")
    @ResponseBody
    public JsonResultEntity queryApp(ServletRequest servletRequest, ServletResponse servletResponse) throws Exception  {
        return  sysAppService.queryApp(new JSONObject());
    }

    /**
     * @Author lvleigang
     * @Description  新增应用
     * @Date 9:44 上午 2023/3/1
     * @param servletRequest
     * @param servletResponse
     * @return com.hzya.frame.web.entity.JsonResultEntity
     **/
    @RequestMapping(value = "/addApp")
    @ResponseBody
    public JsonResultEntity addApp(ServletRequest servletRequest, ServletResponse servletResponse) throws Exception  {
        return  sysAppService.addApp(new JSONObject());
    }

    /**
     * @Author lvleigang
     * @Description  修改应用
     * @Date 9:44 上午 2023/3/1
     * @param servletRequest
     * @param servletResponse
     * @return com.hzya.frame.web.entity.JsonResultEntity
     **/
    @RequestMapping(value = "/updateApp")
    @ResponseBody
    public JsonResultEntity updateApp(ServletRequest servletRequest, ServletResponse servletResponse) throws Exception  {
        return  sysAppService.updateApp(new JSONObject());
    }

    /**
     * @Author lvleigang
     * @Description  删除应用
     * @Date 9:44 上午 2023/3/1
     * @param servletRequest
     * @param servletResponse
     * @return com.hzya.frame.web.entity.JsonResultEntity
     **/
    @RequestMapping(value = "/delectProduct")
    @ResponseBody
    public JsonResultEntity delectApp(ServletRequest servletRequest, ServletResponse servletResponse) throws Exception  {
        return  sysAppService.delectApp(new JSONObject());
    }





}

