浏览代码

供应商修改

zhs 3 年之前
父节点
当前提交
236c467f29

+ 2 - 0
src/main/java/com/travel/baidu/Test.java

@@ -2,6 +2,7 @@ package com.travel.baidu;
 
 import com.alibaba.fastjson.JSONObject;
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import java.io.BufferedReader;
@@ -17,6 +18,7 @@ import java.util.Map;
  */
 @Controller
 @RequestMapping("translationInterface")
+@CrossOrigin(origins = "*")
 public class Test {
     /**
      * 翻译接口

+ 15 - 10
src/main/java/com/travel/config/InterceptConfig.java

@@ -25,18 +25,23 @@ public class InterceptConfig implements WebMvcConfigurer {
     @Override
     public void addCorsMappings(CorsRegistry registry) {
         // 添加映射路径
+//        registry.addMapping("/**")
+//                // 放行哪些原始域
+//                .allowedOriginPatterns("*")
+//                .maxAge(3600)
+//                // 是否发送Cookie信息
+//                .allowCredentials(true)
+//                // 放行哪些原始域(请求方式)
+//                .allowedMethods("*")
+//                // 放行哪些原始域(头部信息)
+//                .allowedHeaders("*")
+//                // 暴露哪些头部信息(因为跨域访问默认不能获取全部头部信息)
+//                .exposedHeaders("Server", "Content-Length", "Authorization", "Access-Token", "Access-Control-Allow-Origin", "Access-Control-Allow-Credentials");
         registry.addMapping("/**")
-                // 放行哪些原始域
-                .allowedOriginPatterns("*")
-                .maxAge(3600)
-                // 是否发送Cookie信息
-                .allowCredentials(true)
-                // 放行哪些原始域(请求方式)
-                .allowedMethods("GET", "POST", "DELETE", "PUT", "OPTIONS", "HEAD")
-                // 放行哪些原始域(头部信息)
                 .allowedHeaders("*")
-                // 暴露哪些头部信息(因为跨域访问默认不能获取全部头部信息)
-                .exposedHeaders("Server", "Content-Length", "Authorization", "Access-Token", "Access-Control-Allow-Origin", "Access-Control-Allow-Credentials");
+                .allowedMethods("*")
+                .allowCredentials(true)
+                .allowedOriginPatterns("*");
     }
 
     @Override

+ 1 - 1
src/main/java/com/travel/config/SaticScheduleTask.java

@@ -22,7 +22,7 @@ public class SaticScheduleTask {
     /**
      * 定时删除无效用户  每天中午十二点触发方法
      */
-    @Scheduled(cron = "0 0 12 * * ?")
+    @Scheduled(cron = "0 59 23 L * ?")
     public void deleteUser(){
         try{
             List<User> list = loginService.getInvalidUser();

+ 4 - 0
src/main/java/com/travel/model/PrivateOrder.java

@@ -123,4 +123,8 @@ public class PrivateOrder implements Serializable {
      * 旅游名称
      */
     private String offerName;
+    /**
+     * 其他
+     */
+    private String other;
 }

+ 3 - 3
src/main/resources/config/mapping/SupplierMapper.xml

@@ -7,9 +7,6 @@
         update sys_supplier
         <set>
             <trim suffixOverrides=",">
-                <if test="code != null and code != ''">
-                    code = #{code},
-                </if>
                 <if test="natureSupplier != null and natureSupplier != ''">
                     nature_supplier = #{natureSupplier},
                 </if>
@@ -37,6 +34,9 @@
                 <if test="certificate != null and certificate != ''">
                     certificate = #{certificate},
                 </if>
+                <if test="pass != null and pass != ''">
+                    pass = #{pass},
+                </if>
             </trim>
         </set>
         where phone=#{phone}