contract add query param

master
wangning 7 years ago
parent 414c4a783d
commit 9e788f0581

@ -28,7 +28,7 @@ public interface ClientsContractMapper {
@AutoSql(type = SqlType.SELECT)
List<JSONObject> list();
PageList<JSONObject> listWithClientInfo(PageBounds pagination);
PageList<JSONObject> listWithClientInfo(JSONObject param,PageBounds pagination);
List<JSONObject> analysisSingstatus();
}

@ -17,7 +17,7 @@ public interface ClientContractService {
void saveContract(int client_id, Date expire_date, String channel);
JSONObject list(PageBounds pagination);
JSONObject list(JSONObject param,PageBounds pagination);
JSONObject analysis();
}

@ -152,8 +152,8 @@ public class ClientContractServiceImpl implements ClientContractService {
}
@Override
public JSONObject list(PageBounds pagination) {
return PageListUtils.buildPageListResult(clientsContractMapper.listWithClientInfo(pagination));
public JSONObject list(JSONObject param,PageBounds pagination) {
return PageListUtils.buildPageListResult(clientsContractMapper.listWithClientInfo(param,pagination));
}
@Override

@ -25,8 +25,10 @@ public class contractController {
private ManualSettleSupport manualSettleSupport;
@ManagerMapping(value = "/contract/list", method = RequestMethod.GET)
public JSONObject contractList(@RequestParam(value = "page", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "10") int limit) {
return clientContractService.list(new PageBounds(page,limit));
public JSONObject contractList(@RequestParam(value = "page", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "10") int limit,@RequestParam(required = false) String client_moniker) {
JSONObject params = new JSONObject();
params.put("client_moniker",client_moniker);
return clientContractService.list(params,new PageBounds(page,limit));
}
@ManagerMapping(value = "/contract", method = RequestMethod.GET)

@ -11,7 +11,11 @@
select c.client_moniker client_moniker,cc.create_time create_time,cc.confirm_time confirm_time,a.display_name display_name from
sys_clients_contract cc left join sys_clients c on c.client_id = cc.client_id
left join sys_accounts a on a.account_id = cc.sign_account_id
<where>
<if test="client_moniker!=null">
c.client_moniker = #{client_moniker}
</if>
</where>
</select>
<select id="analysisSingstatus" resultType="com.alibaba.fastjson.JSONObject">

@ -19,10 +19,12 @@ define(['angular'], function (angular) {
controller: 'manualSettleCtrl'
})
}]);
app.controller('contractAnalysisCtrl', ['$scope', '$http', '$state', '$filter', 'commonDialog', function ($scope, $http, $state, $filter, commonDialog) {
app.controller('contractAnalysisCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.pagination = {};
$scope.params = {};
$scope.getContractAnalysis = function (page) {
var params = {};
var params = angular.copy($scope.params);
alert(params.client_moniker);
params.page = page || $scope.pagination.page || 1;
$http.get('/manage/common/analysis/contract/list', {params: params}).then(function (resp) {
$scope.contract = resp.data.data;

@ -11,8 +11,24 @@
<a ui-sref="manual_settle">Manual Settle</a>
</li>
</ul>
<div class="modal-body">
<div class="box box-danger">
<br>
<div class="box box-danger">
<div class="modal-body">
<div class="form-inline">
<div class="form-group">
<label class="control-label" for="title-search">Partner Code</label>
<input class="form-control" id="title-search" ng-model="params.client_moniker">
</div>
<div class="form-group">
<button class="btn btn-primary" type="button" ng-click="getContractAnalysis(1)"><i
class="fa fa-search"></i></button>
</div>
</div>
</div>
</div>
<div class="box box-danger">
<div class="modal-body">
<div class="box-header">商户合同情况
<small>(查看合同数:{{analysis.has_sign + analysis.not_sign}},已同意:{{analysis.has_sign}})</small>
</div>

Loading…
Cancel
Save