From 84ee37e1f485a1d3136535f9ef1c43058d9308ab Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期三, 29 十一月 2023 11:39:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeButtonController.java | 79 +++++++++++++++++++++++++++++++++++++++
1 files changed, 79 insertions(+), 0 deletions(-)
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeButtonController.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeButtonController.java
index ddf9b95..ee1f49f 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeButtonController.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeButtonController.java
@@ -58,6 +58,85 @@
private final ICodeButtonService codeButtonService;
+ CodeButtonMapper codeButtonMapper;
+
+ /**
+ * 妯℃澘鎵╁睍姹� 璇︽儏
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "璇︽儏", notes = "浼犲叆codebutton")
+ public R<CodeButtonVO> detail(CodeButton codebutton) {
+ CodeButton detail = codeButtonMapper.selectOne(Condition.getQueryWrapper(codebutton));
+ return R.data(CodeButtonWrapper.build().entityVO(detail));
+ }
+
+ /**
+ * 妯℃澘鎵╁睍姹� 鍒嗛〉
+ */
+ @GetMapping("/list")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "鍒嗛〉", notes = "浼犲叆codebutton")
+ public R<IPage<CodeButtonVO>> list(CodeButton codebutton, Query query) {
+ IPage<CodeButton> pages = codeButtonMapper.selectPage(Condition.getPage(query), Condition.getQueryWrapper(codebutton));
+ return R.data(CodeButtonWrapper.build().pageVO(pages));
+ }
+
+ /**
+ * 妯℃澘鎵╁睍姹� 鑷畾涔夊垎椤�
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "鍒嗛〉", notes = "浼犲叆codebutton")
+ public R<IPage<CodeButtonVO>> page(CodeButtonVO codebutton, Query query) {
+ IPage<CodeButtonVO> pages = codeButtonService.selectcodebuttonPage(Condition.getPage(query), codebutton);
+ return R.data(pages);
+ }
+
+ /**
+ * 妯℃澘鎵╁睍姹� 鏂板
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "鏂板", notes = "浼犲叆codebutton")
+ public R save(@Valid @RequestBody CodeButton codebutton) {
+ return R.status(SqlHelper.retBool(codeButtonMapper.insert(codebutton)));
+ }
+
+ /**
+ * 妯℃澘鎵╁睍姹� 淇敼
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "淇敼", notes = "浼犲叆codebutton")
+ public R update(@Valid @RequestBody CodeButton codebutton) {
+ return R.status(SqlHelper.retBool(codeButtonMapper.updateById(codebutton)));
+ }
+
+ /**
+ * 妯℃澘鎵╁睍姹� 鏂板鎴栦慨鏀�
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "鏂板鎴栦慨鏀�", notes = "浼犲叆codebutton")
+ public R submit(@Valid @RequestBody CodeButton codebutton) {
+ if(codebutton.getOid() != null){
+ return R.status(SqlHelper.retBool(codeButtonMapper.updateById(codebutton)));
+ }
+ return R.status(SqlHelper.retBool(codeButtonMapper.insert(codebutton)));
+ }
+
+ /**
+ * 妯℃澘鎵╁睍姹� 鍒犻櫎
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "閫昏緫鍒犻櫎", notes = "浼犲叆ids")
+ public R remove(@ApiParam(value = "涓婚敭闆嗗悎", required = true) @RequestParam String ids) {
+// return codebuttonService.deleteCodeButton(ids);
+ return R.status(SqlHelper.retBool(codeButtonMapper.deleteBatchIds(Func.toStrList(ids))));
+ }
+
/**
* 涓绘暟鎹腑鐨勬寜閽墿灞曞垪琛�
* @param baseQueryObject 鍩虹鏌ヨ瀵硅薄锛屽寘鍚煡璇㈡潯浠讹紝鍒嗛〉锛屾帓搴忕瓑
--
Gitblit v1.9.3