package {{ package.Controller }};
import {{ package.Entity }}.{{ table.entity }};
import {{ package.Service }}.{{ table.entity }}Service;
import {{ package.Common }}.vo.Result;
//--- import 固定引入 ---//
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
//--- import 固定引入 ---//
/**
*
* {{ table.comment }} 前端控制器
*
* @Author: {{author}}
* @Date: {{date}}
* @Wechat: {{ wechat }}
*/
@Api(tags = "{{ table.comment }}")
{% if restControllerStyle %}
@RestController
{% else %}
@Controller
{% endif %}
@RequestMapping("{{ table.name }}")
public class {{ table.entity }}Controller {
@Resource
private {{ table.entity }}Service {{table.lowerEntity}}Service;
@ApiOperation(value = "{{ table.comment }}分页列表查询", response = {{ table.entity }}.class)
@PostMapping(value = "/page")
public Result> page(@Valid @RequestBody {{ table.entity }} param,@RequestHeader("token") String token,
@RequestHeader(value = "version", defaultValue = "1.0") String version) {
Page<{{ table.entity }}> page = {{table.lowerEntity}}Service.page(param);
return Result.OK(page);
}
@ApiOperation(value = "{{ table.comment }}根据条件查询")
@PostMapping(value = "/info")
public Result