Pārlūkot izejas kodu

增加添加站点对外接口

Jack 11 mēneši atpakaļ
vecāks
revīzija
111085d77d

+ 3 - 4
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/api/okki/site/controller/ShopApiController.java

@@ -1,13 +1,12 @@
 package org.jeecg.modules.api.okki.site.controller;
 
 import lombok.extern.slf4j.Slf4j;
+import org.apache.http.HttpHeaders;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.api.okki.site.entity.OkkiSite;
 import org.jeecg.modules.api.okki.site.service.IOkkiSiteService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-
-import java.util.Map;
 /**
  * @Description: 站点
  * @Author: jeecg-boot
@@ -23,9 +22,9 @@ public class ShopApiController {
     private IOkkiSiteService okkiSiteService;
 
     @PostMapping(value = "/add")
-    public Result<String> add(@RequestBody OkkiSite okkiSite, @RequestHeader Map<String, String> headers) {
+    public Result<String> add(@RequestBody OkkiSite okkiSite, @RequestHeader(HttpHeaders.AUTHORIZATION) String authorization) {
         String Authorization = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImRlYW4iLCJleHAiOjE3MTQ0NjU5Njl9.QdCBYR8mioXcKGi1n5RdMQ5RbJHCSGbE8dkdwYuOXh4";
-        if (!headers.get("Authorization").equals(Authorization)) {
+        if (!authorization.equals(Authorization)) {
             return Result.error("sign 验证不通过");
         }
         okkiSiteService.save(okkiSite);

+ 7 - 7
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/api/okki/site/entity/OkkiSite.java

@@ -73,30 +73,30 @@ public class OkkiSite implements Serializable {
 	/**邮箱*/
 	@Excel(name = "邮箱", width = 15)
     @ApiModelProperty(value = "邮箱")
-    private String email;
+    private String email = "";
 	/**公司名英⽂简称*/
 	@Excel(name = "公司名英⽂简称", width = 15)
     @ApiModelProperty(value = "公司名英⽂简称")
-    private String enname;
+    private String enname = "";
 	/**套餐名*/
 	@Excel(name = "套餐名", width = 15)
     @ApiModelProperty(value = "套餐名")
-    private String tc_name;
+    private String tc_name = "OKKI Shops Smart(2023)";
 	/**套餐周期,单位⽉*/
 	@Excel(name = "套餐周期,单位⽉", width = 15)
     @ApiModelProperty(value = "套餐周期,单位⽉")
-    private Integer tc_period;
+    private Integer tc_period = 12;
 	/**站点选择的⼩语种语⾔*/
 	@Excel(name = "站点选择的⼩语种语⾔", width = 15)
     @ApiModelProperty(value = "站点选择的⼩语种语⾔")
-    private String tc_language;
+    private String tc_language = "";
 	/**备注*/
 	@Excel(name = "备注", width = 15)
     @ApiModelProperty(value = "备注")
-    private String remark;
+    private String remark = "";
     /**状态*/
     @Excel(name = "状态", width = 15, dicCode = "site_status")
     @Dict(dicCode = "site_status")
     @ApiModelProperty(value = "状态")
-    private java.lang.Integer status;
+    private java.lang.Integer status = 0;
 }

+ 1 - 1
jeecgboot-vue3/src/views/system/loginmini/MiniLogin.vue

@@ -160,7 +160,7 @@
   import MiniRegister from './MiniRegister.vue';
   import MiniCodelogin from './MiniCodelogin.vue';
   import logoImg from '/@/assets/loginmini/icon/jeecg_logo.png';
-  import adTextImg from '/@/assets/loginmini/icon/jeecg_ad_text.png';
+  import adTextImg from '/@/assets/loginmini/icon/jeecg_logo.png';
   import { AppLocalePicker, AppDarkModeToggle } from '/@/components/Application';
   import { useLocaleStore } from '/@/store/modules/locale';
   import { useDesign } from "/@/hooks/web/useDesign";