小程序页面
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
package com.czg.admin;
|
||||
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.system.dto.MiniAppPagesDTO;
|
||||
import com.czg.system.service.MiniAppPageService;
|
||||
import com.czg.validator.group.InsertGroup;
|
||||
import com.czg.validator.group.UpdateGroup;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 小程序页面
|
||||
*
|
||||
* @author GYJoker
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/admin/miniAppPages")
|
||||
public class MiniAppPagesController {
|
||||
|
||||
@Resource
|
||||
private MiniAppPageService miniAppPageService;
|
||||
|
||||
/**
|
||||
* 新增小程序页面
|
||||
* @param pagesDTO 小程序页面
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping
|
||||
public CzgResult<Long> insertMiniAppPage(@RequestBody @Validated({InsertGroup.class}) MiniAppPagesDTO pagesDTO) {
|
||||
return miniAppPageService.insertMiniAppPage(pagesDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改小程序页面
|
||||
* @param pagesDTO 小程序页面
|
||||
* @return 结果
|
||||
*/
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> updateMiniAppPage(@RequestBody @Validated({UpdateGroup.class}) MiniAppPagesDTO pagesDTO) {
|
||||
return miniAppPageService.updateMiniAppPage(pagesDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除小程序页面
|
||||
* @param id 小程序页面主键
|
||||
* @return 结果
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
public CzgResult<Boolean> deleteMiniAppPage(@PathVariable Long id) {
|
||||
return miniAppPageService.deleteMiniAppPageById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询小程序页面 分页
|
||||
* @param name 小程序页面名称
|
||||
* @param path 小程序页面路径
|
||||
* @param status 小程序页面状态 -1 查全部 1 启用 0 禁用
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("page")
|
||||
public CzgResult<Page<MiniAppPagesDTO>> getMiniAppPage(String name, String path, Integer status) {
|
||||
return miniAppPageService.getMiniAppPage(name, path, status);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user