Pārlūkot izejas kodu

用户小程序获取微信公众号二维码接口开发

zhaishaofeng 2 gadi atpakaļ
vecāks
revīzija
17cc38eaca

+ 18 - 0
imcs-bt-be/imcs-authority-server/src/main/java/com/github/zuihou/api/MiniApp.java

@@ -3,6 +3,8 @@ package com.github.zuihou.api;
 
 import com.github.wxpay.sdk.WXPayUtil;
 import com.github.zuihou.base.R;
+import com.github.zuihou.business.baseconfig.entity.BaseConfig;
+import com.github.zuihou.business.baseconfig.service.BaseConfigService;
 import com.github.zuihou.business.coupon.entity.Coupon;
 import com.github.zuihou.business.coupon.service.CouponService;
 import com.github.zuihou.business.member.entity.Member;
@@ -68,6 +70,9 @@ public class MiniApp {
     @Autowired
     private CouponService couponService;
 
+    @Autowired
+    private BaseConfigService baseConfigService;
+
 
     /**
      * 关联本地订单号和openId并且调用微信统一下单接口接口
@@ -462,4 +467,17 @@ public class MiniApp {
         Coupon coupon = couponService.getOne(Wraps.<Coupon>q(new Coupon(couponId)));
         return R.success(coupon);
     }
+
+    /**
+     * 用户小程序获取系统设置-基础配置
+     *
+     * @param id 配置主键
+     * @return 配置数据
+     */
+    @ApiOperation("获取系统设置-基础配置")
+    @GetMapping({"/baseConfig/{id}"})
+    public R<BaseConfig> getBaseConfig(@PathVariable Long id) {
+        BaseContextHandler.setTenant("0000");
+        return R.success(baseConfigService.getById(id));
+    }
 }