瀏覽代碼

feat: 新增接口

xdd 2 天之前
父節點
當前提交
16a7f10b7d
共有 1 個文件被更改,包括 16 次插入1 次删除
  1. 16 1
      fs-user-app/src/main/java/com/fs/app/controller/H5Controller.java

+ 16 - 1
fs-user-app/src/main/java/com/fs/app/controller/H5Controller.java

@@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
 @Controller
@@ -30,6 +31,13 @@ public class H5Controller
         mv.setViewName("userAgreement");
         return mv;
     }
+    @GetMapping("/userAgreementNew")
+    @ResponseBody
+    public String userAgreementNew(){
+        String json=configService.selectConfigByKey("store.agreement");
+        AgreementConfig config= JSONUtil.toBean(json, AgreementConfig.class);
+        return config.getUserAgreement();
+    }
     @GetMapping("/privacyPolicy")
     public ModelAndView privacyPolicy( )
     {
@@ -40,6 +48,13 @@ public class H5Controller
         mv.setViewName("privacyPolicy");
         return mv;
     }
-
+    @GetMapping("/privacyPolicyNew")
+    @ResponseBody
+    public String privacyPolicyNew( )
+    {
+        String json=configService.selectConfigByKey("store.agreement");
+        AgreementConfig config= JSONUtil.toBean(json, AgreementConfig.class);
+        return config.getPrivacyPolicy();
+    }
 
 }