Browse Source

BUG修复

yingp 6 năm trước cách đây
mục cha
commit
a12445b7e7

+ 2 - 2
runtime/mobile-grpc-server/src/test/java/com/usoftchina/uu/mobile/grpc/test/MobileAccountServiceTest.java

@@ -96,9 +96,9 @@ public class MobileAccountServiceTest extends AbstractGRpcServerTest {
 
     @Test
     public void testC_switchCompany() {
-        Authentication.set("tCENvFUmQaJ4bRnFnQlAR5es53RxkNXZ");
+        Authentication.set("uxal6xOGqcMSvvni35npT7I61eqim6yi");
         SwitchCompanyRequest request = SwitchCompanyRequest.newBuilder()
-                .setCompanyId(10050506).build();
+                .setCompanyId(10050540).build();
         try {
             SwitchCompanyResponse response = accountServiceBlockingStub.switchCompany(request);
             ResponseHeader header = response.getResponseHeader();

+ 3 - 0
services/account-service/src/main/java/com/usoftchina/uu/account/service/impl/DeviceInfoServiceImpl.java

@@ -10,6 +10,8 @@ import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
+
 /**
  * @author yingp
  * @date 2019/4/17
@@ -27,6 +29,7 @@ public class DeviceInfoServiceImpl implements DeviceInfoApi {
     public DeviceInfoDTO save(DeviceInfoDTO deviceInfoDTO) {
         removeByAccountId(deviceInfoDTO.getAccountId());
         DeviceInfo deviceInfo = BeanMapper.map(deviceInfoDTO, DeviceInfo.class);
+        deviceInfo.setLoginTime(new Date());
         deviceInfoMapper.insertSelective(deviceInfo);
         return deviceInfoDTO;
     }