| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.Category; |
| | | import com.doumee.service.business.CategoryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | |
| | | /** |
| | | * @author 江蹄蹄 |
| | | * @date 2023/11/23 18:16 |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "分类信息表") |
| | | @RestController |
| | |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(categoryService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation("根据ID查询") |
| | | @GetMapping("/findListByStatus") |
| | | @RequiresPermissions("business:category:query") |
| | | public ApiResponse<List<Category>> findListByStatus(@RequestParam("type") Integer type){ |
| | | Category category = new Category(); |
| | | category.setIsdeleted(Constants.ZERO); |
| | | category.setStatus(Constants.ZERO); |
| | | category.setType(type); |
| | | return ApiResponse.success(categoryService.findList(category)); |
| | | } |
| | | } |