parent
f4834125cc
commit
efc63cc373
@ -0,0 +1,36 @@
|
||||
package au.com.royalpay.payment.manage.mappers.system;
|
||||
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.AdvanceSelect;
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.executor.keygen.Jdbc3KeyGenerator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author DuLingLing
|
||||
* @create 2019/11/13 0013 14:49
|
||||
*/
|
||||
@AutoMapper(tablename = "sys_client_incremental", pkName = "incremental_id", keyGenerator = Jdbc3KeyGenerator.class)
|
||||
public interface ClientIncrementalMapper {
|
||||
|
||||
/**
|
||||
* 获取商户所有增值渠道信息
|
||||
* @param clientId
|
||||
* @return
|
||||
*/
|
||||
@AutoSql(type = SqlType.SELECT)
|
||||
List<JSONObject> findAllByclientMoniker(@Param("client_id") int clientId);
|
||||
|
||||
@AutoSql(type = SqlType.SELECT)
|
||||
JSONObject findByClinetIdAndChannel(@Param("client_id")int clinet_id, @Param("channel")String channel);
|
||||
|
||||
@AutoSql(type = SqlType.INSERT)
|
||||
void save(JSONObject saveIncrementalService);
|
||||
|
||||
@AutoSql(type = SqlType.UPDATE)
|
||||
void update(JSONObject saveIncrementalService);
|
||||
}
|
After Width: | Height: | Size: 19 KiB |
@ -0,0 +1,46 @@
|
||||
define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
|
||||
'use strict';
|
||||
var app = angular.module('partnerIncrementalService', ['ui.bootstrap', 'ui.router']);
|
||||
app.config(['$stateProvider', function ($stateProvider) {
|
||||
$stateProvider.state('partnerIncrementalService', {
|
||||
url: '/partner_incremental_service',
|
||||
templateUrl: '/static/incrementalService/templates/partner_incremental_service.html',
|
||||
controller: 'partnerIncrementalServiceCtrl',
|
||||
resolve:{
|
||||
partner:['$http',function($http){
|
||||
return $http.get('/client/partner_info');
|
||||
}]
|
||||
}
|
||||
}).state('partnerIncrementalServiceInfo', {
|
||||
url: '/partner_incremental_service_info',
|
||||
templateUrl: '/static/incrementalService/templates/partner_incremental_service_info.html',
|
||||
controller: 'partnerIncrementalServiceInfoCtrl',
|
||||
params:{
|
||||
service:null,
|
||||
partner:null
|
||||
}
|
||||
});
|
||||
}]);
|
||||
app.controller('partnerIncrementalServiceCtrl', ['$scope', '$http', '$state', 'partner', function ($scope, $http, $state, partner) {
|
||||
$scope.serviceAll = [];
|
||||
$scope.channelOptions = [];
|
||||
$scope.clientInfo = angular.copy(partner.data);
|
||||
$scope.initDate = function(){
|
||||
$http.get("/client/partner_info/"+$scope.clientInfo.client_moniker+"/incremental_service").then(function (res) {
|
||||
$scope.serviceAll = res.data.all_service;
|
||||
$scope.serviceAll.forEach(function(service){
|
||||
service.logo_url = '/static/images/'+service.channel+'.jpg'
|
||||
})
|
||||
$scope.channelOptions = res.data.incremental_channel;
|
||||
})
|
||||
}
|
||||
$scope.initDate();
|
||||
$scope.queryServiceInfo = function(service){
|
||||
$state.go('partnerIncrementalServiceInfo', {service: service,partner:$scope.clientInfo});
|
||||
}
|
||||
}]);
|
||||
app.controller('partnerIncrementalServiceInfoCtrl',['$scope', '$http', '$state','$stateParams',function($scope,$http,$state,$stateParams){
|
||||
debugger
|
||||
}]);
|
||||
return app;
|
||||
});
|
@ -0,0 +1,20 @@
|
||||
<div>
|
||||
<h3 style="padding: 0px 0px 0px 20px">{{serviceAll.length>0?'已开通增值服务':'您尚未开通任何增值服务'}}</h3>
|
||||
</div>
|
||||
<div class="row" style="height: 100%">
|
||||
<div class="col-sm-12">
|
||||
<div class="table-responsive col-sm-12" ng-if="serviceAll.length>0">
|
||||
<div class="col-sm-3" ng-repeat=" service in serviceAll">
|
||||
<div style="height: 200px;width: 200px; line-height:150px;margin: 10px">
|
||||
<div class="row">
|
||||
<div class="col-sm-2" style="padding-left: 50px">
|
||||
<img width="200px" height="100%" ng-src="{{service.logo_url}}" style="cursor:pointer" ng-click="queryServiceInfo(service)" >
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,38 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="table-responsive col-sm-12">
|
||||
<button class="btn btn-success" role="button" ng-if="channelOptions.length>0" ng-click="newServiceChannelDialog()" style="margin: 5px">新增增值服务</button>
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Logo</th>
|
||||
<th>Channel</th>
|
||||
<th>Mode</th>
|
||||
<th>Rate Value</th>
|
||||
<th>Total Amount</th>
|
||||
<th>Operator</th>
|
||||
<th>Create Time</th>
|
||||
<th>Update Time</th>
|
||||
<th>Operation</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="service in serviceAll">
|
||||
<td><img height="80px" width="80px" ng-src="{{service.logo_url}}"/></td>
|
||||
<td style="line-height: 80px">{{service.channel}}</td>
|
||||
<td style="line-height: 80px">{{service.incremental_mode==1?'固定手续费':'固定金额扣款' }}</td>
|
||||
<td style="line-height: 80px">{{service.incremental_rate_value!=null?service.incremental_rate_value+'%':'-'}}</td>
|
||||
<td style="line-height: 80px">{{service.total_incremental_amount}}</td>
|
||||
<td style="line-height: 80px">{{service.operator}}</td>
|
||||
<td style="line-height: 80px">{{service.create_time}}</td>
|
||||
<td style="line-height: 80px">{{service.update_time}}</td>
|
||||
<td style="line-height: 80px">
|
||||
<a role="button" ng-click="editServiceChannelDialog(service)" ng-if="'011'|withRole"><i class="fa fa-edit"></i></a> |
|
||||
<a role="button" ng-click="updateStatus(service)">{{service.is_valid?'Disabled':'Enable'}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,68 @@
|
||||
<div class="modal-header">
|
||||
<h4>{{isCreate?"New":"Edit"}} Service</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form novalidate name="service_form" class="form-horizontal">
|
||||
|
||||
<div class="form-group has-feedback" ng-if="isCreate"
|
||||
ng-class="{'has-error':service_form.channel.$invalid && service_form.channel.$dirty}">
|
||||
<label class="control-label col-sm-5">Service Channel:</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" name="channel" id="channel-input" required
|
||||
ng-model="model.channel"
|
||||
ng-options="channel for channel in model.channelOptions">
|
||||
</select>
|
||||
<span ng-messages="service_form.channel.$error" ng-if="service_form.channel.$dirty" ng-message="required">Required Field</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group has-feedback"
|
||||
ng-class="{'has-error':service_form.incremental_mode.$invalid && service_form.incremental_mode.$dirty}">
|
||||
<label class="control-label col-sm-5">Mode:</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" name="incrementalMode" id="incrementalMode-input" required
|
||||
ng-model="model.incremental_mode">
|
||||
<option value="1">固定手续费</option>
|
||||
<option value="2">固定金额扣款</option>
|
||||
</select>
|
||||
<span ng-messages="service_form.incremental_mode.$error" ng-if="service_form.incremental_mode.$dirty" ng-message="required">Required Field</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group has-feedback" ng-if="model.incremental_mode==1" ng-class="{'has-error':service_form.incremental_rate_value.$invalid && service_form.incremental_rate_value.$dirty}">>
|
||||
<label class="control-label col-sm-5" style="text-align: right">Rate Value:</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
<input type="number" name="incremental_rate_value" stringToNumber2 class="form-control" ng-model="model.incremental_rate_value"
|
||||
min="0.0" step="0.1" id="incremental_rate_value" required>
|
||||
<div class="input-group-addon">%</div>
|
||||
</div>
|
||||
<div ng-messages="service_form.incremental_rate_value.$error" ng-if="service_form.incremental_rate_value.$dirty" ng-message="required">
|
||||
<div class="small text-danger" ng-message="min">
|
||||
<i class="glyphicon glyphicon-alert"></i> No less than 0.0%
|
||||
</div>
|
||||
<div class="small text-danger" ng-message="required">
|
||||
<i class="glyphicon glyphicon-alert"></i> Required Field
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group has-feedback" ng-if="model.incremental_mode==2" ng-class="{'has-error':service_form.total_incremental_amount.$invalid && service_form.total_incremental_amount.$dirty}">>
|
||||
<label class="control-label col-sm-5" style="text-align: right">Amount:</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" name="total_incremental_amount" stringToNumber2 class="form-control" ng-model="model.total_incremental_amount"
|
||||
min="0" id="total_incremental_amount" required>
|
||||
<div ng-messages="service_form.total_incremental_amount.$error" ng-if="service_form.total_incremental_amount.$dirty" ng-message="required"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-success" type="button" ng-click="save(service_form)" ng-disabled="ctrl.sending">Submit</button>
|
||||
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Cancel</button>
|
||||
</div>
|
Loading…
Reference in new issue