Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

hy 7 years ago
parent
commit
db8172862a

+ 13 - 0
base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java

@@ -33,6 +33,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
@@ -252,6 +253,18 @@ public class AuthController {
             authorizeLogService.save(AuthorizeLog.from(request)
                     .setAccountId(accountDTO.getId())
                     .setAppId(appId).build());
+            //将cookies
+            Cookie[] cookies = request.getCookies();
+            Cookie ssoCookies = null;
+            for (Cookie cookie : cookies) {
+                if (cookieConfig.getName().equals(cookie.getName())) {
+                    ssoCookies = cookie;
+                    break;
+                }
+            }
+            if (null != ssoCookies) {
+                response.addCookie(ssoCookies);
+            }
             // 将登录信息推送到客户端
             if (!StringUtils.isEmpty(clientId)) {
                 Long companyId = null;

+ 1 - 1
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -14,7 +14,7 @@ Ext.define('saas.view.document.product.BasePanel', {
         width:300, 
         emptyText:'输入物料编号、名称、型号、规格或品牌',
         getCondition: function (v) {
-            return "(upper(CONCAT(pr_code,'#',pr_detail,'#',ifnull(pr_spec,''),'#',ifnull(pr_orispeccode,'')'#',ifnull(pr_brand,''))) like '%" + v.toUpperCase() + "%' )";
+            return "(upper(CONCAT(pr_code,'#',pr_detail,'#',ifnull(pr_spec,''),'#',ifnull(pr_orispeccode,''),'#',ifnull(pr_brand,''))) like '%" + v.toUpperCase() + "%' )";
         },
     },{
         editable:true,