|
@@ -51,6 +51,7 @@ public class WhiteUserController {
|
|
return APIResult.error(UserServiceAPICode.NOT_EXISTS);
|
|
return APIResult.error(UserServiceAPICode.NOT_EXISTS);
|
|
}
|
|
}
|
|
whiteUserDTO.setMerchantId(terminalUser.getMerchantId());
|
|
whiteUserDTO.setMerchantId(terminalUser.getMerchantId());
|
|
|
|
+ whiteUserDTO.setCode(terminalUser.getCode());
|
|
|
|
|
|
WhiteUser whiteUser = whiteUserService.addUser(whiteUserDTO);
|
|
WhiteUser whiteUser = whiteUserService.addUser(whiteUserDTO);
|
|
if (whiteUser != null) {
|
|
if (whiteUser != null) {
|
|
@@ -106,11 +107,11 @@ public class WhiteUserController {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
String userId = whiteUser.getUserId();
|
|
String userId = whiteUser.getUserId();
|
|
- TerminalUser terminalUser = terminalUserService.find(userId);
|
|
|
|
|
|
+// TerminalUser terminalUser = terminalUserService.find(userId);
|
|
|
|
+// if (terminalUser != null) {
|
|
|
|
+// whiteUser.setCode(terminalUser.getCode());
|
|
|
|
+// }
|
|
Merchant merchant = merchantService.findOne(whiteUser.getMerchantId());
|
|
Merchant merchant = merchantService.findOne(whiteUser.getMerchantId());
|
|
- if (terminalUser != null) {
|
|
|
|
- whiteUser.setCode(terminalUser.getCode());
|
|
|
|
- }
|
|
|
|
if (merchant != null) {
|
|
if (merchant != null) {
|
|
whiteUser.setMerchantName(merchant.getName());
|
|
whiteUser.setMerchantName(merchant.getName());
|
|
}
|
|
}
|
|
@@ -131,16 +132,16 @@ public class WhiteUserController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- List<TerminalUser> terminalUserList = terminalUserService.findByIds(userIdList);
|
|
|
|
- Map<String, TerminalUser> terminalUserMap = ListUtil.convert(terminalUserList, "id", TerminalUser.class);
|
|
|
|
|
|
+// List<TerminalUser> terminalUserList = terminalUserService.findByIds(userIdList);
|
|
|
|
+// Map<String, TerminalUser> terminalUserMap = ListUtil.convert(terminalUserList, "id", TerminalUser.class);
|
|
Map<String, Merchant> merchantMap = merchantService.getMerchantMap(merchantIdList);
|
|
Map<String, Merchant> merchantMap = merchantService.getMerchantMap(merchantIdList);
|
|
|
|
|
|
for (WhiteUser whiteUser : whiteUserList) {
|
|
for (WhiteUser whiteUser : whiteUserList) {
|
|
- String userId = whiteUser.getUserId();
|
|
|
|
- TerminalUser terminalUser = terminalUserMap.get(userId);
|
|
|
|
- if (terminalUser != null) {
|
|
|
|
- whiteUser.setCode(terminalUser.getCode());
|
|
|
|
- }
|
|
|
|
|
|
+// String userId = whiteUser.getUserId();
|
|
|
|
+// TerminalUser terminalUser = terminalUserMap.get(userId);
|
|
|
|
+// if (terminalUser != null) {
|
|
|
|
+// whiteUser.setCode(terminalUser.getCode());
|
|
|
|
+// }
|
|
String merchantId = whiteUser.getMerchantId();
|
|
String merchantId = whiteUser.getMerchantId();
|
|
Merchant merchant = merchantMap.get(merchantId);
|
|
Merchant merchant = merchantMap.get(merchantId);
|
|
if (merchant != null) {
|
|
if (merchant != null) {
|