|
@@ -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) {
|
|
@@ -106,11 +107,11 @@ public class WhiteUserController {
|
|
|
return;
|
|
|
}
|
|
|
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());
|
|
|
- if (terminalUser != null) {
|
|
|
- whiteUser.setCode(terminalUser.getCode());
|
|
|
- }
|
|
|
if (merchant != null) {
|
|
|
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);
|
|
|
|
|
|
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();
|
|
|
Merchant merchant = merchantMap.get(merchantId);
|
|
|
if (merchant != null) {
|