whycxzp
2024-07-23 c33de1c323ecf239706fe79c25044236ebc827a8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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,"更新成功");
    }
 
 
 
 
 
}