|
|
|
@ -3,6 +3,7 @@ package au.com.royalpay.payment.manage.apsKYC.domain.service.Impl;
|
|
|
|
|
import au.com.royalpay.payment.manage.apsKYC.domain.repository.ApsNoticeClientRepository;
|
|
|
|
|
import au.com.royalpay.payment.manage.apsKYC.domain.service.ApsNoticeClientsService;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
@ -11,6 +12,9 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
|
public class ApsNoticeClientsServiceImpl implements ApsNoticeClientsService {
|
|
|
|
|
|
|
|
|
@ -20,12 +24,15 @@ public class ApsNoticeClientsServiceImpl implements ApsNoticeClientsService {
|
|
|
|
|
@Autowired
|
|
|
|
|
private ManagerMapper managerMapper;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ClientMapper clientMapper;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ClientAccountMapper clientAccountMapper;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds) {
|
|
|
|
|
PageList<JSONObject> apsNoticeClients = apsNoticeClientRepository.getApsNoticeClients(id, pageBounds);
|
|
|
|
|
public PageList<JSONObject> getApsNoticeClients(String id, String clientStatus, PageBounds pageBounds) {
|
|
|
|
|
PageList<JSONObject> apsNoticeClients = apsNoticeClientRepository.getApsNoticeClients(id, clientStatus, pageBounds);
|
|
|
|
|
for (JSONObject apsNoticeClient : apsNoticeClients) {
|
|
|
|
|
if (apsNoticeClient.containsKey("modifier") && StringUtils.isNotBlank(apsNoticeClient.getString("modifier"))) {
|
|
|
|
|
JSONObject modifier = managerMapper.findDetail(apsNoticeClient.getString("modifier"));
|
|
|
|
@ -43,6 +50,18 @@ public class ApsNoticeClientsServiceImpl implements ApsNoticeClientsService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
JSONObject clinet = clientMapper.findClientByMoniker(apsNoticeClient.getString("partner_code"));
|
|
|
|
|
if (clinet != null && clinet.containsKey("bd_user") && StringUtils.isNotBlank(clinet.getString("bd_user"))) {
|
|
|
|
|
String[] bd_users = clinet.getString("bd_user").split(",");
|
|
|
|
|
List<String> bdUserName = new ArrayList<>();
|
|
|
|
|
for (String bd_user : bd_users) {
|
|
|
|
|
JSONObject bdUser = managerMapper.findDetail(bd_user);
|
|
|
|
|
if (bdUser != null && bdUser.containsKey("username") && StringUtils.isNotBlank(bdUser.getString("username"))) {
|
|
|
|
|
bdUserName.add(bdUser.getString("username"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
apsNoticeClient.put("bd_name", bdUserName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return apsNoticeClients;
|
|
|
|
|
}
|
|
|
|
|