Ver código fonte

测试同步命令

lyhzzz 3 anos atrás
pai
commit
dd12107fed

+ 7 - 0
src/main/java/com/cdf/controller/back/TestController.java

@@ -18,6 +18,7 @@ import com.cdf.response.ShopVo;
 import com.cdf.schedule.ScheduleTask;
 import com.cdf.schedule.ScheduleTask;
 import com.cdf.service.IShopService;
 import com.cdf.service.IShopService;
 import com.cdf.util.ExcelUtil;
 import com.cdf.util.ExcelUtil;
+import com.cdf.util.ReadCmdLine;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
@@ -67,6 +68,12 @@ public class TestController {
         scheduleTask.statisticsH5Data();
         scheduleTask.statisticsH5Data();
         return ResultData.ok();
         return ResultData.ok();
     }
     }
+    @RequestMapping("/test/shell")
+    public ResultData shell(@RequestParam(required = false) String day) throws Exception {
+        String sell = "aws s3 sync s3://4dkankan/cdf s3://4dage-moderate2/cdf --profile user1";
+        ReadCmdLine.callShellByExec(sell);
+        return ResultData.ok();
+    }
 
 
     @RequestMapping("/test/one")
     @RequestMapping("/test/one")
     public ResultData test1(@RequestHeader String token) throws Exception{
     public ResultData test1(@RequestHeader String token) throws Exception{