|
@@ -0,0 +1,42 @@
|
|
|
+package com.zhongshu.reward.server.core.controller.wallet;
|
|
|
+
|
|
|
+import com.github.microservice.auth.security.annotations.ResourceAuth;
|
|
|
+import com.github.microservice.auth.security.type.AuthType;
|
|
|
+import com.github.microservice.productcenter.client.ret.ResultContent;
|
|
|
+import com.zhongshu.reward.client.model.MiniAppSettingModel;
|
|
|
+import com.zhongshu.reward.client.model.param.MiniAppSettingParam;
|
|
|
+import com.zhongshu.reward.server.core.service.MiniAppSettingService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 小程序配置控制器
|
|
|
+ */
|
|
|
+@Slf4j
|
|
|
+@RestController
|
|
|
+@RequestMapping("/miniAppSetting")
|
|
|
+@Api(tags = "小程序功能设置")
|
|
|
+public class MiniAppSettingController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ MiniAppSettingService miniAppSettingService;
|
|
|
+
|
|
|
+ @Operation(summary = "新增/修改小程序配置", description = "新增/修改小程序配置")
|
|
|
+ @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
+ @PostMapping("saveOrUpdate")
|
|
|
+ public ResultContent<MiniAppSettingModel> saveOrUpdate( @RequestBody MiniAppSettingParam param){
|
|
|
+ MiniAppSettingModel model = miniAppSettingService.saveOrUpdate(param);
|
|
|
+ return ResultContent.buildContent(model);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Operation(summary = "查询小程序配置", description = "获取提现规则")
|
|
|
+ @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
+ @GetMapping("getSetting")
|
|
|
+ public ResultContent<MiniAppSettingModel> getSetting(){
|
|
|
+ MiniAppSettingModel model = miniAppSettingService.querySetting();
|
|
|
+ return ResultContent.buildContent(model);
|
|
|
+ }
|
|
|
+}
|