| | |
| | | package com.lf.server.controller.data; |
| | | |
| | | import com.lf.server.entity.data.DictEntity; |
| | | import com.lf.server.entity.data.StyleEntity; |
| | | import com.lf.server.service.data.StyleService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public class StyleController { |
| | | @Autowired |
| | | StyleService styleService; |
| | | |
| | | @GetMapping({"/selectCount"}) |
| | | public Integer selectCount(String name) { |
| | | return styleService.selectCount(name); |
| | | } |
| | | |
| | | @GetMapping(value = "/selectByPage") |
| | | public List<StyleEntity> selectByPage(String name, Integer pageSize, Integer pageIndex) { |
| | | if (pageSize < 1 || pageIndex < 0) { |
| | | return null; |
| | | } |
| | | |
| | | return styleService.selectByPage(name, pageSize, pageSize * pageIndex); |
| | | } |
| | | |
| | | @RequestMapping(value = "/insertStyle", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public Integer insertStyle(StyleEntity styleEntity) { |
| | |
| | | public List<StyleEntity> selectStyleAll() { |
| | | return styleService.selectStyleAll(); |
| | | } |
| | | } |
| | | } |