phone top up Test demo

master
wangning 7 years ago
parent 89c10f9cc6
commit 69e4220698

@ -111,5 +111,8 @@ ALTER TABLE `sys_clients_audit_process`
ALTER TABLE `pmt_refunds`
MODIFY COLUMN `operator_id` varchar(50) DEFAULT NULL COMMENT '退款操作者账号';
ALTER TABLE `sys_clients_apply`
MODIFY COLUMN `short_name` varchar(100) DEFAULT NULL COMMENT '公司简称';

@ -0,0 +1,25 @@
package au.com.royalpay.payment.manage.ofei.web;
import au.com.royalpay.payment.manage.ofei.core.OfeiClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* Created by wangning on 2017/12/8.
*/
@RestController
@RequestMapping("/phone_top_up")
public class PhoneTopUpController {
@Resource
private OfeiClient ofeiClient;
@RequestMapping(value = "/recharge",method = {RequestMethod.GET, RequestMethod.POST})
public void listNotices(@RequestParam String phoneNumber, @RequestParam String amount) {
ofeiClient.phoneTopUp(amount,true,null,phoneNumber);
}
}

@ -47,6 +47,10 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
url: '/wechat_message',
templateUrl: '/static/config/devtools/templates/wechat_message.html',
controller: 'wechatMessageCtrl'
}).state('devtools.phone_top_up', {
url: '/phone_top_up',
templateUrl: '/static/config/devtools/templates/phone_top_up.html',
controller: 'phonetopupCtrl'
});
}]);
app.controller('devManualRefundCtrl', ['$scope', '$http', 'commonDialog', function ($scope, $http, commonDialog) {
@ -222,6 +226,17 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
}
}]);
app.controller('phonetopupCtrl', ['$scope', '$http', '$filter', function ($scope, $http, $filter) {
$scope.topUp = function () {
var params = angular.copy($scope.params);
$http.get('/phone_top_up/recharge',{params: params}).then(function (resp) {
alert('ok');
}, function (resp) {
alert(resp.data.message);
})
}
}]);
app.controller('wechatMessageCtrl', ['$scope', '$http', '$filter', function ($scope, $http, $filter) {
$scope.params = {};
$scope.send_merchant_message = function () {

@ -0,0 +1,36 @@
<section class="content-header">
<h1>Phone Top Up</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-cog"></i> Basic Config
</li>
<li><a ui-sref="^">Dev Tools</a></li>
<li class="active">phone top up</li>
</ol>
</section>
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning">
<div class="box-header">
<form role="form" style="margin:0px auto;width: 50%">
<div class="form-group">
<label>Phone Number</label>
<input ng-model="params.phoneNumber" name="code" class="form-control" type="text"/>
</div>
<div class="form-group">
<label>Amount</label>
<input ng-model="params.amount" class="form-control" type="text" />
</div>
<div class="form-group">
<button class="btn btn-primary btn-block" ng-click="topUp()">commit</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>

@ -62,6 +62,11 @@
<i class="fa fa-shopping-cart"></i>
商品库
</a>
<a class="btn btn-app" role="button" ui-sref=".phone_top_up">
<i class="fa fa-envelope"></i>
Phone Top Up
</a>
</div>
</div>
</section>

Loading…
Cancel
Save