fix a+kyc通知增加bd显示以及条件筛选

master
Todking 3 years ago
parent c3f0407a6a
commit e8069ecbe0

@ -12,7 +12,7 @@ public interface ApsNoticeClientRepository {
void updateApsNoticeClient(ApsNoticeClient apsNoticeClient);
PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds);
PageList<JSONObject> getApsNoticeClients(String id, String clientStatus, PageBounds pageBounds);
void updateApsNoticeClientByPartnerCode(Date modifyTime, String modifier, String partnerCode);

@ -5,5 +5,5 @@ import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
public interface ApsNoticeClientsService {
PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds);
PageList<JSONObject> getApsNoticeClients(String id, String clientStatus, PageBounds pageBounds);
}

@ -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;
}

@ -28,8 +28,8 @@ public class ApsNoticeClientRepositoryImpl implements ApsNoticeClientRepository
}
@Override
public PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds) {
return mapper.getApsNoticeClients(id, pageBounds);
public PageList<JSONObject> getApsNoticeClients(String id, String clientStatus, PageBounds pageBounds) {
return mapper.getApsNoticeClients(id, clientStatus, pageBounds);
}
@Override

@ -74,9 +74,9 @@ public class RestApsKYCController {
@ManagerMapping(value = "/notice/clients", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.SALES_MANAGER})
public JSONObject getApsNoticeClients(@RequestParam(value = "page", defaultValue = "1") int page,
@RequestParam(value = "pageSize", defaultValue = "20") int pageSize,
@RequestParam String id) {
@RequestParam String id, @RequestParam(required = false) String clientStatus) {
PageBounds pageBounds = new PageBounds(page, pageSize);
PageList<JSONObject> apply = apsNoticeClientsService.getApsNoticeClients(id, pageBounds);
PageList<JSONObject> apply = apsNoticeClientsService.getApsNoticeClients(id, clientStatus, pageBounds);
return PageListUtils.buildPageListResult(apply);
}

@ -20,7 +20,7 @@ public interface ApsNoticeClientMapper {
@AutoSql(SqlType.UPDATE)
void updateApsNoticeClient(ApsNoticeClient apsNoticeClient);
PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds);
PageList<JSONObject> getApsNoticeClients(String id,String clientStatus, PageBounds pageBounds);
void updateApsNoticeClientByPartnerCode(@Param("modify_time") Date modifyTime, @Param("modifier") String modifier, @Param("partner_code") String partnerCode);

@ -14,6 +14,10 @@
SELECT *
FROM sys_aps_notice_clients
where notice_id = #{id}
<if test="clientStatus != null">
and `status` = #{clientStatus}
</if>
ORDER BY status_time DESC
</select>
<select id="getApsKycClient" resultType="com.alibaba.fastjson.JSONObject">
SELECT c.*,

@ -14,10 +14,18 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
app.controller('ApsKYCCtrl', ['$scope', '$http', '$uibModal', 'commonDialog', function ($scope, $http, $uibModal, commonDialog) {
var that = $scope
that.status = [
{id: -1, label: '所有'},
{id: 0, label: '未读'},
{id: 1, label: '已读'},
{id: 2, label: '同意'},
{id: 3, label: '拒绝'}
]
that.params = {};
that.noticeClients = {};
that.showClients = false
that.selectIndex = -1;
that.clientStatus = -1;
that.loadApsNotice = function (page) {
var params = angular.copy(that.params);
params.page = page || that.pagination.page || 1;
@ -40,6 +48,12 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
});
})
};
that.changeClientStatus = function (clientStatus, page) {
that.clientStatus = clientStatus
if (that.showClients) {
that.loadApsNoticeClients(page);
}
};
that.getNoticeClients = function (title, id, page, index) {
that.selectIndex = index
that.showClients = true
@ -53,6 +67,9 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
var params = angular.copy(that.params);
params.page = page || that.clientPagination.page || 1;
params.id = that.clientId;
if (that.clientStatus != -1) {
params.clientStatus = that.clientStatus;
}
$http.get('/aps/kyc/notice/clients', {params: params}).then(function (resp) {
that.noticeClients = resp.data.data;
that.clientPagination = resp.data.pagination;

@ -96,7 +96,16 @@
<thead>
<tr>
<th>商户名称</th>
<th style="text-align: center">商户操作状态</th>
<th>所属BD</th>
<th style="text-align: center">
商户操作状态
<span>
<select style="width: 100px;height: 30px" ng-model="clientStatus"
ng-change="changeClientStatus(clientStatus,1)"
ng-options="status.id as status.label for status in status">
</select>
</span>
</th>
<th style="text-align: center">运营操作状态</th>
<th style="text-align: center">操作</th>
</tr>
@ -104,14 +113,15 @@
<tbody>
<tr ng-repeat="item in noticeClients">
<td>{{item.partner_code}}</td>
<td>{{item.bd_name ? item.bd_name : "未绑定BD"}}</td>
<td style="text-align: center">
<span ng-if="item.status == 0" style="color: black">未读</span>
<span ng-if="item.status == 1" style="color: #c09d03">已读({{item.user_name}} {{ item.read_time
}})</span>
<span ng-if="item.status == 2" style="color: #00a65a">同意({{item.user_name}} {{ item.status_time
}})</span>
<span ng-if="item.status == 3" style="color: red">拒绝({{item.user_name}} {{ item.status_time
}})</span>
<span ng-if="item.status == 1"
style="color: #c09d03">已读({{item.user_name}} {{ item.read_time}})</span>
<span ng-if="item.status == 2"
style="color: #00a65a">同意({{item.user_name}} {{ item.status_time}})</span>
<span ng-if="item.status == 3"
style="color: red">拒绝({{item.user_name}} {{ item.status_time}})</span>
</td>
<td style="text-align: center">
<a href="" type="button"><span ng-if="item.handle == 0">未处理</span></a>

Loading…
Cancel
Save