| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/iot/authorize") |
| | | public class ProductAuthorizeController extends BaseController |
| | | { |
| | | public class ProductAuthorizeController extends BaseController { |
| | | @Autowired |
| | | private IProductAuthorizeService productAuthorizeService; |
| | | |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('iot:product:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ProductAuthorize productAuthorize) |
| | | { |
| | | public TableDataInfo list(ProductAuthorize productAuthorize) { |
| | | startPage(); |
| | | List<ProductAuthorize> list = productAuthorizeService.selectProductAuthorizeList(productAuthorize); |
| | | return getDataTable(list); |
| | |
| | | @PreAuthorize("@ss.hasPermi('iot:authorize:export')") |
| | | @Log(title = "产品授权码", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ProductAuthorize productAuthorize) |
| | | { |
| | | public void export(HttpServletResponse response, ProductAuthorize productAuthorize) { |
| | | List<ProductAuthorize> list = productAuthorizeService.selectProductAuthorizeList(productAuthorize); |
| | | ExcelUtil<ProductAuthorize> util = new ExcelUtil<ProductAuthorize>(ProductAuthorize.class); |
| | | util.exportExcel(response, list, "产品授权码数据"); |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('iot:authorize:query')") |
| | | @GetMapping(value = "/{authorizeId}") |
| | | public AjaxResult getInfo(@PathVariable("authorizeId") Long authorizeId) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("authorizeId") Long authorizeId) { |
| | | return AjaxResult.success(productAuthorizeService.selectProductAuthorizeByAuthorizeId(authorizeId)); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('iot:authorize:add')") |
| | | @Log(title = "产品授权码", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ProductAuthorize productAuthorize) |
| | | { |
| | | public AjaxResult add(@RequestBody ProductAuthorize productAuthorize) { |
| | | return toAjax(productAuthorizeService.insertProductAuthorize(productAuthorize)); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('iot:authorize:add')") |
| | | @Log(title = "根据数量批量新增产品授权码", businessType = BusinessType.INSERT) |
| | | @PostMapping("addProductAuthorizeByNum") |
| | | public AjaxResult addProductAuthorizeByNum(@RequestBody ProductAuthorizeVO productAuthorizeVO) |
| | | { |
| | | public AjaxResult addProductAuthorizeByNum(@RequestBody ProductAuthorizeVO productAuthorizeVO) { |
| | | return toAjax(productAuthorizeService.addProductAuthorizeByNum(productAuthorizeVO)); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('iot:authorize:edit')") |
| | | @Log(title = "产品授权码", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ProductAuthorize productAuthorize) |
| | | { |
| | | public AjaxResult edit(@RequestBody ProductAuthorize productAuthorize) { |
| | | return toAjax(productAuthorizeService.updateProductAuthorize(productAuthorize)); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('iot:authorize:remove')") |
| | | @Log(title = "产品授权码", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{authorizeIds}") |
| | | public AjaxResult remove(@PathVariable Long[] authorizeIds) |
| | | { |
| | | public AjaxResult remove(@PathVariable Long[] authorizeIds) { |
| | | return toAjax(productAuthorizeService.deleteProductAuthorizeByAuthorizeIds(authorizeIds)); |
| | | } |
| | | } |