Browse Source

Merge remote-tracking branch 'origin/dev' into dev

zhoudw 7 years ago
parent
commit
55f640d727

+ 2 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/SaleMapper.java

@@ -40,4 +40,6 @@ public interface SaleMapper extends CommonBaseMapper<Sale> {
     void updateNetTotal(Long id);
 
     Integer checkSendStatus(Long id);
+
+    void updateCreator(@Param("userId") Long userId, @Param("userName") String userName, @Param("id") Long id);
 }

+ 2 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -100,6 +100,7 @@ public class SaleServiceImpl implements SaleService{
         Long companyId = BaseContextHolder.getCompanyId();
         //人员Id
         Long userId = BaseContextHolder.getUserId();
+        String name = BaseContextHolder.getUserName();
         //获取主表信息
         SaleDTO main = formdata.getMain();
         List<SaleDetailDTO> items = formdata.getItems();
@@ -125,6 +126,7 @@ public class SaleServiceImpl implements SaleService{
             //插入操作
             saleMapper.insertSelective(sale);
             sa_id = sale.getId();
+            saleMapper.updateCreator(userId, name, sa_id);
             //添加从表传输对象
             for (SaleDetailDTO item : items) {
                 SaleDetail detail = BeanMapper.map(item, SaleDetail.class);

+ 5 - 0
applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml

@@ -33,6 +33,8 @@
     <result column="sa_seller" property="sa_seller" jdbcType="VARCHAR" />
     <result column="sa_sellercode" property="sa_sellercode" jdbcType="VARCHAR" />
     <result column="sa_date" property="sa_date" jdbcType="TIMESTAMP"/>
+    <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
+    <result column="updaterName" property="updaterName" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     sa_id, sa_code, sa_custid, sa_custcode, sa_custname, sa_toplace, sa_total, sa_totalupper, 
@@ -419,4 +421,7 @@
     select count(1) from saledetail where sd_said = #{id}
     and ifnull(sd_yqty, 0) > 0;
   </select>
+  <update id="updateCreator">
+    update sale set creatorId = #{userId} , creatorName=#{userName} where sa_id=#{id}
+  </update>
 </mapper>

+ 2 - 2
base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/config/AuthFilter.java

@@ -104,8 +104,8 @@ public class AuthFilter implements GlobalFilter, Ordered {
      * @return
      */
     private boolean isIgnore(ServerHttpRequest request) {
-        String path = request.getPath().value();
-        return authConfig.getIgnores().stream().anyMatch(ignore -> ignore.equals(path));
+        return authConfig.getIgnores().stream().anyMatch(ignore ->
+                new AntPathRequestMatcher(ignore).matches(request));
     }
 
     private String getAuthHeaderToken(ServerHttpRequest request) {

+ 5 - 0
base-servers/gateway-server/src/main/resources/application.yml

@@ -104,6 +104,10 @@ spring:
         - Path=/api/commons/**
         filters:
         - RewritePath=/api/commons/(?<segment>.*), /$\{segment}
+      - id: SOCKET-SERVER
+        uri: lb:ws://SOCKET-SERVER
+        predicates:
+        - Path=/ws/**
   redis:
     host: 192.168.253.12
     port: 6379
@@ -178,3 +182,4 @@ auth:
     - /api/auth/sso/callback
     - /api/account/account/register
     - /api/auth/info
+    - /ws/**

+ 1 - 1
base-servers/socket/socket-server/src/main/resources/application.yml

@@ -40,7 +40,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
 server:
   port: 8680
   tomcat:

+ 18 - 0
framework/core/src/main/java/com/usoftchina/saas/base/entity/CommonBaseEntity.java

@@ -16,6 +16,24 @@ public abstract class CommonBaseEntity extends BaseEntity<Long> {
     protected Long creatorId;
     protected Date updateTime;
     protected Long updaterId;
+    protected String creatorName;
+    protected String updaterName;
+
+    public String getCreatorName() {
+        return creatorName;
+    }
+
+    public void setCreatorName(String creatorName) {
+        this.creatorName = creatorName;
+    }
+
+    public String getUpdaterName() {
+        return updaterName;
+    }
+
+    public void setUpdaterName(String updaterName) {
+        this.updaterName = updaterName;
+    }
 
     @Override
     public Long getId() {