Browse Source

小二账号功能完善联调测试通过

Jack 10 months ago
parent
commit
3efb8860f3

+ 10 - 3
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/account/controller/OkkiAccountApiController.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.okki.account.controller;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.http.HttpHeaders;
 import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.okki.account.param.OkkiAccountParam;
 import org.jeecg.modules.okki.account.service.IOkkiAccountService;
 import org.jeecg.modules.okki.account.entity.OkkiAccount;
 import org.springframework.web.bind.annotation.*;
@@ -17,13 +18,19 @@ public class OkkiAccountApiController {
     @Resource
     private IOkkiAccountService okkiAccountService;
 
-    @PostMapping(value = "/account/store")
-    public Result<String> add(@RequestBody OkkiAccount okkiAccount, @RequestHeader(HttpHeaders.AUTHORIZATION) String authorization) {
-        log.info("请求参数 param" + okkiAccount.toString() + "authorization" + authorization);
+    @PostMapping(value = "/xiaoerAccount/store")
+    public Result<String> add(@RequestBody OkkiAccountParam okkiAccountParam, @RequestHeader(HttpHeaders.AUTHORIZATION) String authorization) {
+        log.info("请求参数 param" + okkiAccountParam.toString() + "authorization" + authorization);
         String Authorization = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImRlYW4iLCJleHAiOjE3MTQ0NjU5Njl9.QdCBYR8mioXcKGi1n5RdMQ5RbJHCSGbE8dkdwYuOXh4";
         if (!authorization.equals(Authorization)) {
             return Result.error("sign 验证不通过");
         }
+        OkkiAccount okkiAccount = new OkkiAccount();
+        okkiAccount.setAccount(okkiAccountParam.getAccount());
+        okkiAccount.setPassword(okkiAccountParam.getPassword());
+        okkiAccount.setSiteId(okkiAccountParam.getSite_id());
+        okkiAccount.setCompanyName(okkiAccountParam.getCompany_name());
+        okkiAccount.setTcName(okkiAccountParam.getTc_name());
         boolean result = okkiAccountService.insertAccount(okkiAccount);
         log.info("请求成功,返回结果" + result);
         if (result) {

+ 27 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/account/param/OkkiAccountParam.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.okki.account.param;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 小二账号
+ * @Author: jeecg-boot
+ * @Date:   2024-05-10
+ * @Version: V1.0
+ */
+@Data
+public class OkkiAccountParam implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**站点ID*/
+    private Integer site_id;
+	/**账号*/
+    private String account;
+	/**密码*/
+    private String password;
+	/**公司名称*/
+    private String company_name;
+	/**套餐名称*/
+    private String tc_name;
+}