Browse Source

fix white user search

huodongdong 6 years ago
parent
commit
33dfe9086d

+ 2 - 0
rankin-data-api/src/main/java/cn/rankin/data/api/user/dto/WhiteUserDTO.java

@@ -15,6 +15,8 @@ public class WhiteUserDTO implements Serializable{
 
     private String userId;
 
+    private String code;
+
     private String merchantId;
 
     private Date startTime;

+ 1 - 1
rankin-data-api/src/main/java/cn/rankin/data/api/user/entity/WhiteUser.java

@@ -45,7 +45,7 @@ public class WhiteUser implements Serializable {
     @Temporal(TemporalType.TIMESTAMP)
     private Date gmtModified;
 
-    @Transient
+    @Column(nullable = false, unique = true)
     private String code;
 
     @Transient

+ 1 - 0
rankin-user-service/src/main/java/cn/rankin/userservice/controller/WhiteUserController.java

@@ -51,6 +51,7 @@ public class WhiteUserController {
             return APIResult.error(UserServiceAPICode.NOT_EXISTS);
         }
         whiteUserDTO.setMerchantId(terminalUser.getMerchantId());
+        whiteUserDTO.setCode(terminalUser.getCode());
 
         WhiteUser whiteUser = whiteUserService.addUser(whiteUserDTO);
         if (whiteUser != null) {