package com.hzya.frame.sys.thirdparty.product.controller;

import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.web.entity.BaseResult;
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 org.springframework.web.bind.annotation.ResponseBody;
import com.hzya.frame.web.entity.JsonResultEntity;
import com.hzya.frame.sys.thirdparty.product.entity.SysThirdpartyProduct;
import com.hzya.frame.sys.thirdparty.product.service.ISysThirdpartyProductService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

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

/**
 * @description: 第三方应用分类表  controller
 * @tableName: sys_thirdparty_product 
 * @entityName: SysThirdpartyProduct
 * 包含：
 * 1、分页查询(queryPaged)
 * 2、index页面(goIndexPage)
 * 3、新增页面(goAddPage)
 * 4、新增信息保存(save)
 * 5、修改页面(goEditPage)
 * 6、修改信息保存(update)
 * 7、信息查看(goShowPage)
 * 8、删除信息(delete)
 * @author: gjh
 * @history: 1.0
 */

@Controller("sys_thirdparty_product")
@RequestMapping("/sys/thirdparty/product/SysThirdpartyProductController")
public class SysThirdpartyProductController {
	private final Logger logger = LoggerFactory.getLogger(this.getClass());

	@Autowired
    protected ISysThirdpartyProductService  systhirdpartyproductService;

	/**
	 * @Author lvleigang
	 * @Description  查询第三方应用分类树
	 * @Date 11:15 上午 2023/3/6
	 * @param servletRequest
	 * @param servletResponse
	 * @return com.hzya.frame.web.entity.JsonResultEntity
	 **/
	@RequestMapping(value = "/queryThirdpartyProductTree")
	@ResponseBody
	public JsonResultEntity queryThirdpartyProductTree(ServletRequest servletRequest, ServletResponse servletResponse) throws Exception  {
		return  systhirdpartyproductService.queryThirdpartyProductTree(new JSONObject());
	}


	/**
	 * @Author lvleigang
	 * @Description  新增树节点
	 * @Date 11:15 上午 2023/3/6
	 * @param servletRequest
	 * @param servletResponse
	 * @return com.hzya.frame.web.entity.JsonResultEntity
	 **/
	@RequestMapping(value = "/addThirdpartyProduct")
	@ResponseBody
	public JsonResultEntity addThirdpartyProduct(ServletRequest servletRequest, ServletResponse servletResponse) throws Exception  {
		return  systhirdpartyproductService.addThirdpartyProduct(new JSONObject());
	}

	/**
	 * @Author lvleigang
	 * @Description  修改树节点
	 * @Date 11:15 上午 2023/3/6
	 * @param servletRequest
	 * @param servletResponse
	 * @return com.hzya.frame.web.entity.JsonResultEntity
	 **/
	@RequestMapping(value = "/updateThirdpartyProduct")
	@ResponseBody
	public JsonResultEntity updateThirdpartyProduct(ServletRequest servletRequest, ServletResponse servletResponse) throws Exception  {
		return  systhirdpartyproductService.updateThirdpartyProduct(new JSONObject());
	}

	/**
	 * @Author lvleigang
	 * @Description  删除树节点
	 * @Date 11:15 上午 2023/3/6
	 * @param servletRequest
	 * @param servletResponse
	 * @return com.hzya.frame.web.entity.JsonResultEntity
	 **/
	@RequestMapping(value = "/delectThirdpartyProduct")
	@ResponseBody
	public JsonResultEntity delectThirdpartyProduct(ServletRequest servletRequest, ServletResponse servletResponse) throws Exception  {
		return  systhirdpartyproductService.delectThirdpartyProduct(new JSONObject());
	}

	/**
	 * @Author lvleigang
	 * @Description  获取树节点
	 * @Date 11:15 上午 2023/3/6
	 * @param servletRequest
	 * @param servletResponse
	 * @return com.hzya.frame.web.entity.JsonResultEntity
	 **/
	@RequestMapping(value = "/getThirdpartyProduct")
	@ResponseBody
	public JsonResultEntity getThirdpartyProduct(ServletRequest servletRequest, ServletResponse servletResponse) throws Exception  {
		return  systhirdpartyproductService.getThirdpartyProduct(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 = "/getThirdpartyapiByThirdpartyProductId")
	@ResponseBody
	public JsonResultEntity getThirdpartyapiByThirdpartyProductId(ServletRequest servletRequest, ServletResponse servletResponse) throws Exception  {
		return  systhirdpartyproductService.getThirdpartyapiByThirdpartyProductId(new JSONObject());
	}
}

