Merge branch 'develop'

# Conflicts:
#	pom.xml
master
luoyang 5 years ago
commit a81e45678d

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.3.28</version>
<version>1.3.29</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.4.0</jib-maven-plugin.version>

@ -78,6 +78,11 @@ public interface ClientMapper {
@AdvanceSelect(addonWhereClause = "is_valid=1")
List<JSONObject> listChildClients(@Param("parent_client_id") int parentClientId);
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid=1")
PageList<JSONObject> listChildClientsByPage(@Param("parent_client_id") int parentClientId, PageBounds pageBounds);
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid=1")
List<JSONObject> listChildClients(@Param("parent_client_id") int parentClientId, PageBounds pagination);

@ -173,6 +173,8 @@ public interface ClientManager {
List<JSONObject> listSubClients(JSONObject manager, String clientMoniker);
JSONObject listSubClientsByPage(JSONObject manager, String clientMoniker,int page);
List<JSONObject> listSubClients(int clientId);
// void newSubClient(String clientMoniker, SubClientRegistry registry, JSONObject manager);

@ -2088,6 +2088,23 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return listChildClients;
}
@Override
public JSONObject listSubClientsByPage(JSONObject manager, String clientMoniker,int page) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
PageBounds pageBounds;
pageBounds= new PageBounds(page, 5, Order.formString("create_time.desc"));
PageList<JSONObject> childClients = clientMapper.listChildClientsByPage(client.getIntValue("client_id"), pageBounds);
return PageListUtils.buildPageListResult(childClients);
}
@Override
@Cacheable(value = ":sub_clients:", key = "''+#clientId")
public List<JSONObject> listSubClients(int clientId) {

@ -500,6 +500,11 @@ public class PartnerManageController {
return clientManager.listSubClients(manager, clientMoniker);
}
@ManagerMapping(value = "/{clientMoniker}/sub_clients/{page}", method = RequestMethod.GET)
public JSONObject listSubClientsByPage(@PathVariable String clientMoniker,@PathVariable int page, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.listSubClientsByPage(manager, clientMoniker,page);
}
//创建子商户
@ManagerMapping(value = "/{clientMoniker}/sub_clients", method = RequestMethod.POST, role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR})
public void newSubClient(@PathVariable String clientMoniker, @RequestBody @Valid ClientRegisterInfo registery, Errors errors,

@ -2421,16 +2421,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
}
}).result.then(function () {
$scope.loadSubClients();
$scope.loadSubClients(1);
});
};
$scope.loadSubClients = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients').then(function (resp) {
$scope.subPartners = resp.data;
$scope.loadSubClients = function (page) {
$scope.page = page || $scope.pagination.page || 1;
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/'+$scope.page).then(function (resp) {
$scope.subPartners = resp.data.data;
$scope.pagination = resp.data.pagination;
});
};
$scope.loadSubClients();
$scope.loadSubClients(1);
$scope.loadPartnerPaymentInfo = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) {

@ -134,5 +134,23 @@
</tr>
</tbody>
</table>
<div class="box-footer" ng-if="subPartners.length">
<uib-pagination class="pagination"
total-items="pagination.totalCount"
boundary-links="true"
ng-model="pagination.page"
items-per-page="pagination.limit"
max-size="10"
ng-change="loadSubClients()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">
Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}
</div>
</div>
</div>
</div>
</div>
</div>

Loading…
Cancel
Save