Browse Source

修改生产环境配置信息

Jack 11 months ago
parent
commit
eff6c22d8e

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

@@ -0,0 +1,33 @@
+package org.jeecg.modules.api.okki.site.controller;
+
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.api.okki.site.dto.CreateSiteDto;
+import org.jeecg.modules.api.okki.site.entity.OkkiSite;
+import org.jeecg.modules.api.okki.site.service.IOkkiSiteService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import java.util.Map;
+
+@RequestMapping("sites")
+public class ShopApiController {
+
+    @Autowired
+    private IOkkiSiteService okkiSiteService;
+
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody CreateSiteDto createSiteDto, @RequestHeader Map<String, String> headers) {
+        String Authorization = "8FF9B4CE9E24C58994C55609A11DC5FE06FD98980467652F92461A7EBDD1B2397840749ECCD5439D0E607FE90C350FED0D2F51994C5ADD5B88172A47E918D51E171D0F2E2CBED68B2D21229434951991E073311A11B7F5A09302A85343875D91AE682BA8FE2ED567E7B47CA560FF09B5FF3AD4260F282362577E549C2ECC80231D691227A01A8F49645393ECBAE047B15870E08938DEB47CB83D8578B13DDC0786322201B50D4E048A9749EC28FD2E05247E3B89AD7C430C60C8D51CC45B96FFBE6F45C9F0E436492E1CF4816C5FFF4372E4BF9C75F857B172C93A7CF3311604";
+        if (!headers.get("Authorization").equals(Authorization)) {
+            return Result.error("sign 验证不通过");
+        }
+        OkkiSite okkiSite = new OkkiSite();
+        BeanUtils.copyProperties(createSiteDto, okkiSite);
+        okkiSiteService.save(okkiSite);
+        return Result.OK("添加成功!");
+    }
+}

+ 1 - 1
jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml

@@ -7,7 +7,7 @@ server:
     include-stacktrace: ALWAYS
     include-message: ALWAYS
   servlet:
-    context-path: /jeecg-boot
+    context-path: /shop-api
   compression:
     enabled: true
     min-response-size: 1024

+ 1 - 1
jeecgboot-vue3/.env.production

@@ -16,7 +16,7 @@ VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
 VITE_GLOB_API_URL=/jeecgboot
 
 #后台接口全路径地址(必填)
-VITE_GLOB_DOMAIN_URL=http://jeecg-boot-system:8080/jeecg-boot
+VITE_GLOB_DOMAIN_URL=http://oms.adwebcloud.com/shop-api
 
 # 接口父路径前缀
 VITE_GLOB_API_URL_PREFIX=