Procházet zdrojové kódy

小鹏管家url改为配置文件中保持。

zq před 2 týdny
rodič
revize
28cefa4181

+ 5 - 1
web/src/main/java/com/jpsoft/assessment/modules/HomeController.java

@@ -17,6 +17,7 @@ import org.joda.time.Days;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
 
 import javax.validation.constraints.NotBlank;
@@ -37,6 +38,9 @@ public class HomeController {
     @Autowired
     private ConfigService configService;
 
+    @Value("{xpgj.url}")
+    private String xpgjUrl;
+
     @ApiOperation(value="工作日志的日历")
     @RequestMapping(value = "logCalendar",method = RequestMethod.POST)
     public List<List> logCalendar(Date date, @RequestAttribute String subject){
@@ -286,7 +290,7 @@ public class HomeController {
                 userName = user.getUserName();
             }
 
-            String url = "https://xpgjapi.xiaoxinda.com/mobile/workAttendance/queryPersonMonthLateLackDays";
+            String url = xpgjUrl + "/mobile/workAttendance/queryPersonMonthLateLackDays";
             Map<String, String> params = new HashMap<>();
             params.put("year", year);
             params.put("month", month);

+ 4 - 1
web/src/main/resources/application.yml

@@ -111,4 +111,7 @@ oss:
   endpoint: "http://oss-cn-hangzhou.aliyuncs.com"
   bucketName: "admission-46879"
   urlPrefix: "http://${oss.bucketName}.oss-cn-hangzhou.aliyuncs.com"
-  objectPre: "upload"
+  objectPre: "upload"
+
+xpgj:
+  url: "https://xpgj.hbjp.com.cn/api"