parent
7f935392d4
commit
8ce96a7a83
@ -0,0 +1,29 @@
|
||||
package au.com.royalpay.payment.manage.mappers.risk;
|
||||
|
||||
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 com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* Create by yixian at 2017-12-21 11:45
|
||||
*/
|
||||
@AutoMapper(tablename = "risk_customer_black_list", pkName = "openid")
|
||||
public interface RiskCustomerBlackListMapper {
|
||||
@AutoSql(type = SqlType.SELECT)
|
||||
JSONObject findByOpenid(@Param("openid") String openid);
|
||||
|
||||
@AutoSql(type = SqlType.SELECT)
|
||||
@AdvanceSelect(addonWhereClause = "is_valid=1")
|
||||
PageList<JSONObject> query(JSONObject params, PageBounds pagination);
|
||||
|
||||
@AutoSql(type = SqlType.UPDATE)
|
||||
void update(JSONObject customerBlackList);
|
||||
|
||||
@AutoSql(type = SqlType.INSERT)
|
||||
void save(JSONObject customerBlackList);
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package au.com.royalpay.payment.manage.risk.bean;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class QueryBlackListCustomer {
|
||||
private String openid;
|
||||
|
||||
private int page = 1;
|
||||
private int limit = 10;
|
||||
|
||||
|
||||
|
||||
public JSONObject toParams() {
|
||||
JSONObject params = new JSONObject();
|
||||
if(StringUtils.isNotEmpty(openid)){
|
||||
params.put("openid", this.openid);
|
||||
}
|
||||
params.put("is_valid", 1);
|
||||
return params;
|
||||
}
|
||||
|
||||
public String getOpenid() {
|
||||
return openid;
|
||||
}
|
||||
|
||||
public void setOpenid(String openid) {
|
||||
this.openid = openid;
|
||||
}
|
||||
|
||||
public int getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(int page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public int getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setLimit(int limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Merchant Locations</title>
|
||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
|
||||
<script type="text/javascript" src="/static/lib/jquery/jquery-2.1.4.min.js"></script>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
#map {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.controls {
|
||||
margin-top: 10px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 2px 0 0 2px;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
height: 32px;
|
||||
outline: none;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
#pac-input {
|
||||
background-color: #fff;
|
||||
font-family: Roboto;
|
||||
font-size: 15px;
|
||||
font-weight: 300;
|
||||
margin-left: 12px;
|
||||
padding: 0 11px 0 13px;
|
||||
text-overflow: ellipsis;
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<input id="pac-input" class="controls" type="text" placeholder="Search Merchant Location">
|
||||
<div id="map"></div>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDUu6qXRV-j24rSdbPOMfVdTN1-2OfC2o8&libraries=places"
|
||||
type="text/javascript"></script>
|
||||
|
||||
<!--<script src="http://maps.google.cn/maps/api/js?sensor=true&key=AIzaSyDNx0I5o5U0HWPjpHqB4N-y4_f-GLZq4oQ®ion=aus&language=zh-CN"-->
|
||||
<!--type="text/javascript"></script>-->
|
||||
<script>
|
||||
var merchant_location;
|
||||
|
||||
function initMap() {
|
||||
var infoWindow = new google.maps.InfoWindow;
|
||||
try {
|
||||
merchant_location = JSON.parse(window.parent.document.getElementById('merchant_location').innerText);
|
||||
} catch (err) {
|
||||
merchant_location = null;
|
||||
}
|
||||
var map = new google.maps.Map(document.getElementById('map'), {
|
||||
zoom: 13,
|
||||
center: {lat: -33.8688, lng: 151.2195},
|
||||
mapTypeId: 'roadmap'
|
||||
});
|
||||
if (merchant_location) {
|
||||
var point = new google.maps.LatLng(
|
||||
parseFloat(merchant_location.latitude),
|
||||
parseFloat(merchant_location.longitude)
|
||||
);
|
||||
map.setCenter(point, 3);
|
||||
|
||||
var infowincontent = document.createElement('div');
|
||||
var strong = document.createElement('strong');
|
||||
strong.textContent = merchant_location.short_name + '(' + merchant_location.client_moniker + ')';
|
||||
infowincontent.appendChild(strong);
|
||||
infowincontent.appendChild(document.createElement('br'));
|
||||
|
||||
var merchant_address = document.createElement('p');
|
||||
merchant_address.textContent = 'Address: ' + merchant_location.address;
|
||||
infowincontent.appendChild(merchant_address);
|
||||
|
||||
var contact_bd = document.createElement('text');
|
||||
contact_bd.setAttribute("style", "color:blue");
|
||||
contact_bd.textContent = 'BD:' + merchant_location.bd_user_name;
|
||||
infowincontent.appendChild(contact_bd);
|
||||
}
|
||||
|
||||
// var add_view = window.parent.document.getElementById('add_view').innerText;
|
||||
var add_view = 'true';
|
||||
// Create the search box and link it to the UI element.
|
||||
var input = document.getElementById('pac-input');
|
||||
var searchBox = new google.maps.places.SearchBox(input);
|
||||
map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
|
||||
if (add_view === 'true') {
|
||||
$('#pac-input').show();
|
||||
// Bias the SearchBox results towards current map's viewport.
|
||||
map.addListener('bounds_changed', function () {
|
||||
searchBox.setBounds(map.getBounds());
|
||||
});
|
||||
|
||||
searchBox.addListener('places_changed', function () {
|
||||
var places = searchBox.getPlaces();
|
||||
if (places.length == 0) {
|
||||
return;
|
||||
}
|
||||
marker.setMap(null);
|
||||
places.forEach(function (place) {
|
||||
if (!place.geometry) {
|
||||
console.log("Returned place contains no geometry");
|
||||
return;
|
||||
}
|
||||
marker = new google.maps.Marker({
|
||||
map: map,
|
||||
position: place.geometry.location
|
||||
});
|
||||
marker.setMap(map);
|
||||
map.setCenter(place.geometry.location, 3);
|
||||
});
|
||||
});
|
||||
}
|
||||
var marker = new google.maps.Marker();
|
||||
if (merchant_location) {
|
||||
marker = new google.maps.Marker({
|
||||
map: map,
|
||||
position: point
|
||||
});
|
||||
}
|
||||
var geocoder = new google.maps.Geocoder();
|
||||
map.addListener('click', function (event) {
|
||||
var editmap = window.parent.document.getElementById('editmap').innerText;
|
||||
if (editmap === 'true') {
|
||||
marker.setMap(null);
|
||||
marker = new google.maps.Marker({
|
||||
map: map,
|
||||
position: event.latLng
|
||||
});
|
||||
marker.setMap(map);
|
||||
merchant_location = {};
|
||||
geocoder.geocode({
|
||||
'latLng': event.latLng
|
||||
}, function (results, status) {
|
||||
if (status == google.maps.GeocoderStatus.OK) {
|
||||
if (results[0]) {
|
||||
merchant_location.address = results[0].formatted_address;
|
||||
merchant_location.latitude = event.latLng.lat();
|
||||
merchant_location.longitude = event.latLng.lng();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if (merchant_location) {
|
||||
marker.addListener('mouseover', function () {
|
||||
infoWindow.setContent(infowincontent);
|
||||
infoWindow.open(map, marker);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
initMap();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,76 @@
|
||||
<div ui-view>
|
||||
<section class="content-header">
|
||||
<h1>Blacklist</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><i class="fa fa-list-alt"></i> Risk Manager</li>
|
||||
<li class="active">Customer Blacklist</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="box box-warning">
|
||||
<div class="box-header">
|
||||
<div class="form-inline">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="partner-code-search">Openid</label>
|
||||
<input type="text" class="form-control" id="partner-code-search"
|
||||
ng-enter="loadCustomerBlackList(1)"
|
||||
ng-model="params.openid">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary" type="button" ng-click="loadCustomerBlackList(1)"><i
|
||||
class="fa fa-search"></i></button>
|
||||
</div>
|
||||
|
||||
<div class="form-group pull-right">
|
||||
<button class="btn btn-info" type="button" ng-click="save()"><i class="fa fa-plus"></i>Add</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box box-warning">
|
||||
<div class="box-header">Customer</div>
|
||||
<div class="box-body table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Openid</th>
|
||||
<th>Customer</th>
|
||||
<th>Operation Time</th>
|
||||
<th>Remark</th>
|
||||
<th>Operation</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="customer in customerList">
|
||||
<td>{{customer.openid}}</td>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow:ellipsis;">
|
||||
<img ng-src="{{customer.headimg}}" style="height: 30px;width:30px;" class="img-circle" ng-if="customer.headimg"> {{customer.nickname}}
|
||||
</td>
|
||||
<td>{{customer.creation_date}}</td>
|
||||
<td>{{customer.remark}}</td>
|
||||
<td>
|
||||
<a role="button" class="text-bold text-danger"
|
||||
ng-click="disableCustomer(customer.openid)">Disable</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="modal-footer">
|
||||
<uib-pagination ng-if="customerList.length"
|
||||
class="pagination"
|
||||
total-items="pagination.totalCount"
|
||||
boundary-links="true"
|
||||
ng-model="pagination.page"
|
||||
items-per-page="pagination.limit"
|
||||
max-size="10"
|
||||
ng-change="loadCustomerBlackList()"
|
||||
previous-text="‹"
|
||||
next-text="›"
|
||||
first-text="«"
|
||||
last-text="»"></uib-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
@ -0,0 +1,28 @@
|
||||
<section class="content-header">
|
||||
<h1>New Customer Blacklist</h1>
|
||||
</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>Open ID</label>
|
||||
<input ng-model="params.openid" class="form-control" type="text" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Remark</label>
|
||||
<input ng-model="params.remark" class="form-control" type="text" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary btn-block" ng-click="addCustomer()">save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,53 @@
|
||||
<div class="modal-header">
|
||||
<h4>Edit Risk Merchants</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form novalidate name="accountForm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3" for="client-moniker">Client Moniker</label>
|
||||
<div class="col-sm-7">
|
||||
<input class="form-control" type="text" id="client-moniker" name="client_moniker"
|
||||
ng-model="attentions.client_moniker" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3" for="attentions-remark">Remark</label>
|
||||
<div class="col-sm-7">
|
||||
<input class="form-control" type="text" id="attentions-remark" name="remark"
|
||||
ng-model="attentions.remark">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">Channels</label>
|
||||
<p class="checkbox-inline checkbox col-sm-7">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="attentions.enjoin_wechat" name="WeChat|微信">WeChat|微信
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" ng-model="attentions.enjoin_alipay" name="Alipay|支付宝">Alipay|支付宝
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" ng-model="attentions.enjoin_bestpay" name="Bestpay|翼支付">Bestpay|翼支付
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" ng-model="attentions.enjoin_jd" name="JD|京东">JD|京东
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" ng-model="attentions.enjoin_hf" name="HF|汇付">HF|汇付
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-success" type="button" ng-click="update(attentions)">Submit</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Cancel</button>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in new issue