package com.whyc.controller;
|
|
import com.whyc.dto.Response;
|
import com.whyc.pojo.PageParam;
|
import com.whyc.pojo.PageParam2;
|
import com.whyc.service.PageParam2Service;
|
import com.whyc.service.PageParamService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
import java.util.Map;
|
|
@RestController
|
@RequestMapping("pageParam2")
|
@Api(tags = "系统设置-系统配置-页面参数2")
|
public class PageParam2Controller extends BaseController{
|
|
@Autowired
|
private PageParam2Service service;
|
|
@GetMapping("list")
|
@ApiOperation(value = "查询可用参数列表")
|
public Response<List<PageParam2>> getList(@RequestParam int categoryId){
|
List<PageParam2> paramList = service.getList(categoryId);
|
return new Response<List<PageParam2>>().set(1,paramList);
|
}
|
|
@GetMapping("getById")
|
@ApiOperation(value = "查询参数-根据id")
|
public Response<PageParam2> getById(@RequestParam int id){
|
PageParam2 param = service.getById(id);
|
return new Response<PageParam2>().set(1,param);
|
}
|
|
@PostMapping("updateById")
|
@ApiOperation(value = "修改参数-根据id")
|
public Response updateById(@RequestBody PageParam2 param){
|
service.updateById(param);
|
return new Response().setII(1,"更新成功");
|
}
|
|
|
|
|
|
}
|