Merge remote-tracking branch 'origin/develop' into develop

master
yixian 7 years ago
commit 167c977fd8

@ -336,4 +336,10 @@ PRIMARY key(`id`)
alter table act_app_list MODIFY column is_show_window tinyint(1) DEFAULT 0 COMMENT 'app是否弹框'
alter table sys_clients_contract add column confirm_time datetime DEFAULT null comment '合同确认时间';
alter table sys_clients_contract add column confirm_time datetime DEFAULT null comment '合同确认时间';
alter table act_app_list
add show_place smallint(3) default '111' not null comment '1:app顶部 10:banner 100:列表'
;

@ -0,0 +1,23 @@
package au.com.royalpay.payment.manage.activities.app_index.beans;
/**
* Created by yuan on 2018/3/23.
*/
public enum ActAppShowPlaceEnum {
App(1),
Banner(10),
List(100);
private int place;
private ActAppShowPlaceEnum(int placeValue) {
this.place = placeValue;
}
public int getPlace() {
return this.place;
}
public boolean hasPlace(int placeValue) {
return (this.place & placeValue) > 0;
}
}

@ -2,6 +2,7 @@ package au.com.royalpay.payment.manage.activities.app_index.beans;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateUtils;
@ -30,6 +31,9 @@ public class AppActBean {
private String msg_start_date;
private String msg_end_date;
private String msg_interval;
private boolean app;
private boolean banner;
private boolean list;
public JSONObject toJsonParam(){
@ -48,6 +52,17 @@ public class AppActBean {
params.put("is_valid",is_valid);
params.put("msg_start_date", msg_start_date);
params.put("msg_end_date", msg_end_date);
int show_place = 0;
if (app) {
show_place |= ActAppShowPlaceEnum.App.getPlace();
}
if (banner) {
show_place |= ActAppShowPlaceEnum.Banner.getPlace();
}
if (list) {
show_place |= ActAppShowPlaceEnum.List.getPlace();
}
params.put("show_place", show_place);
if (active_date != null) {
try {
Date fromDate = DateUtils.parseDate(active_date, DATE_PATTERNS);
@ -210,4 +225,28 @@ public class AppActBean {
public void setMsg_interval(String msg_interval) {
this.msg_interval = msg_interval;
}
public boolean isApp() {
return app;
}
public void setApp(boolean app) {
this.app = app;
}
public boolean isBanner() {
return banner;
}
public void setBanner(boolean banner) {
this.banner = banner;
}
public boolean isList() {
return list;
}
public void setList(boolean list) {
this.list = list;
}
}

@ -1,5 +1,6 @@
package au.com.royalpay.payment.manage.activities.app_index.core.impls;
import au.com.royalpay.payment.manage.activities.app_index.beans.ActAppShowPlaceEnum;
import au.com.royalpay.payment.manage.activities.app_index.beans.AppActBean;
import au.com.royalpay.payment.manage.activities.app_index.beans.AppActQueryBean;
import au.com.royalpay.payment.manage.activities.app_index.core.AppActService;
@ -42,7 +43,12 @@ public class AppActServiceImp implements AppActService {
@Override
public JSONObject getActDetail(JSONObject manager, String act_id) {
return actAppMapper.getActDetail(act_id);
JSONObject appAct = actAppMapper.getActDetail(act_id);
int show_place = appAct.getIntValue("show_place");
appAct.put("app", ActAppShowPlaceEnum.App.hasPlace(show_place));
appAct.put("banner", ActAppShowPlaceEnum.Banner.hasPlace(show_place));
appAct.put("list", ActAppShowPlaceEnum.List.hasPlace(show_place));
return appAct;
}
@Override

@ -74,9 +74,9 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
List<JSONObject> clientLogs = actMonDelaySettleMapper.clientLog(client_id);
JSONObject res = new JSONObject();
res.put("operation_pause",false);
Boolean apply = true;
if (clientLogs.isEmpty()) {
apply = false;
Boolean apply = false;
if (!clientLogs.isEmpty()) {
apply = true;
res.put("cancel_waring",messageSource.getMessage("sys.mondelay.cancel.waring", null, RequestEnvironment.getLocale()));
}
if (new Date().compareTo(act.getDate("active_date")) < 0) {

@ -28,4 +28,7 @@ public interface TaskManualSettleMapper {
@AutoSql(type = SqlType.UPDATE)
void update(JSONObject task);
List<JSONObject> getEveryLatestRecord();
}

@ -55,6 +55,8 @@ public interface TransactionMapper {
double getClientUnClearedAmount(@Param("client_id") int clientId);
List<JSONObject> getClientsUnClearedAmount(@Param("client_ids") List<Integer> client_ids);
JSONObject getClientAmountAnalysis(JSONObject params);
PageList<JSONObject> listPreRefundClients(PageBounds pagination);

@ -3,6 +3,7 @@ package au.com.royalpay.payment.manage.settlement.core;
import com.alibaba.fastjson.JSONObject;
import java.util.Date;
import java.util.List;
/**
* Create by yixian at 2018-03-20 17:42
@ -13,4 +14,5 @@ public interface ManualSettleSupport {
JSONObject findCurrentSettle(int clientId, boolean includingUnsettleData);
List<JSONObject> listWithClearInfo();
}

@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@ -122,4 +123,24 @@ public class ManualSettleSupportImpl implements ManualSettleSupport {
}
return end;
}
@Override
public List<JSONObject> listWithClearInfo() {
List<JSONObject> manuals = taskManualSettleMapper.getEveryLatestRecord();
List<Integer> client_ids = new ArrayList<>(manuals.size());
manuals.parallelStream().forEach(p->{
client_ids.add(p.getInteger("client_id"));
});
List<JSONObject> clientUnsettle = transactionMapper.getClientsUnClearedAmount(client_ids);
for (JSONObject manual : manuals) {
for (JSONObject settle : clientUnsettle) {
if (manual.getIntValue("client_id") == settle.getIntValue("client_id")) {
manual.put("unsettle", settle.getBigDecimal("clearing_amount"));
break;
}
}
}
return manuals;
}
}

@ -320,7 +320,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
"company_name", "address","business_name","business_structure", "abn","acn","company_phone","suburb","postcode","state","contact_person","contact_phone","contact_email",
"short_name", "logo_url", "enable_refund", "enable_refund_auth", "retail_surcharge", "require_custinfo", "require_remark",
"logo_thumbnail", "creator", "create_time", "approver", "approve_result", "approve_time", "timezone",
"has_children", "source", "customer_surcharge_rate", "enable_alipay", "enable_wechat", "enable_bestpay","manual_settle"};
"has_children", "source", "customer_surcharge_rate", "enable_alipay", "enable_wechat", "enable_bestpay","manual_settle","skip_clearing"};
for (String col : columns) {
simpleClient.put(col, client.get(col));
}

@ -1,6 +1,7 @@
package au.com.royalpay.payment.manage.system.web;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.settlement.core.ManualSettleSupport;
import au.com.royalpay.payment.manage.system.core.ClientContractService;
import com.alibaba.fastjson.JSONObject;
@ -14,13 +15,24 @@ import java.util.List;
import javax.annotation.Resource;
@RestController
@RequestMapping(value = "/manage/contract")
@RequestMapping(value = "/manage/common/analysis")
public class contractController {
@Resource
private ClientContractService clientContractService;
@Resource
private ManualSettleSupport manualSettleSupport;
@ManagerMapping(value = "/list",method = RequestMethod.GET)
public List<JSONObject> list(){
@ManagerMapping(value = "/contract/list", method = RequestMethod.GET)
public List<JSONObject> contractList() {
return clientContractService.list();
}
@RequestMapping(value = "/manualSettle/list", method = RequestMethod.GET)
public List<JSONObject> manualList() {
List<JSONObject> asd = manualSettleSupport.listWithClearInfo();
System.out.println(asd);
System.out.println(asd);
System.out.println(asd);
return manualSettleSupport.listWithClearInfo();
}
}

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.mappers.payment.TaskManualSettleMapper">
<select id="getEveryLatestRecord" resultType="com.alibaba.fastjson.JSONObject">
SELECT
s.request_time,s.client_id,c.client_moniker
FROM
task_client_manual_settle s
left join sys_clients c on s.client_id = c.client_id
where s.request_time=(select max(B.request_time) from task_client_manual_settle B where s.client_id =B.client_id)
</select>
</mapper>

@ -173,6 +173,16 @@
WHERE clearing_status = 0 AND client_id = #{client_id}
</select>
<select id="getClientsUnClearedAmount" resultType="com.alibaba.fastjson.JSONObject">
SELECT ifnull(sum(if(transaction_type = 'Credit', clearing_amount, -clearing_amount)), 0) clearing_amount,client_id
FROM pmt_transactions
where clearing_status = 0 AND
client_id in
<foreach collection="client_ids" open="(" close=")" separator="," item="item">
#{item}
</foreach>
group by client_id
</select>
<select id="getClientAmountAnalysis" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT

@ -35,15 +35,19 @@
<ul>
<li>参与商户<b class="font_color">每周一</b>即可获得营销补贴</li>
<li>
营销补贴金额,<b class="font_color">以发放时账户余额为基数</b>,折算<b class="font_color">年化比率不低于15%最高20%</b>
营销补贴金额,<b class="font_color">以发放时账户余额为基数</b>,折算<b class="font_color">年化比率不低于15%最高20%2000$封顶</b>
</li>
<li>
每周一15:00~16:00GMT+10时区发放营销补贴至商户营销账户。 参与商户周一暂停清算,进行补贴的计算和发放,周二恢复原有规则。
每周一15:00~16:00GMT+10时区发放营销补贴至商户营销账户。
</li>
<li>
参与活动商户系统不再自动清算,商户可以根据自己的需要自行提现,提现完第二天会清算到商户银行账户。
</li>
<li>
补贴活动周期:<b class="font_color">2018/3/20-2018/6/30</b>
</li>
<li>商户自愿参加可以随时取消除周一外周一为补贴的计算和发放日在此期间无法进行报名和取消操作1700之后恢复报名和取消报名</li>
<li>商户一旦取消,则放弃活动补贴,第二天系统会恢复自动清算</li>
<li>本活动最终解释权归RoyalPay所有</li>
</ul>
</div>
@ -57,7 +61,7 @@
<span style="color: #FFFFFF;" th:style="'color:' + @{(${operation_pause} ? '#999' )} + ''">我要参加</span>
</button>
</div>
<div th:class="${apply}?'margin_top'" th:if="${list!=null}">
<div th:class="${apply}?'margin_top'" th:if="${list.size()>0}">
<div class="content">
<div class="h3_width">
<h2>补贴金额记录</h2>
@ -88,7 +92,7 @@
</div>
<div class="button_center cancel_posttion" th:if="${active && apply}" id="cancelButton">
<button class="button_position button_color" th:style="'background-image:' + @{(${operation_pause} ? 'linear-gradient(0deg, #eee 0%, #eee 100%)' )} + ''">
<span class="cancel" th:style="'color:' + @{(${operation_pause} ? '#999' )} + ''">放弃活动资格</span>
<span class="cancel" th:style="'color:' + @{(${operation_pause} ? '#999' )} + ''">退出活动</span>
</button>
</div>
@ -97,7 +101,7 @@
<div class="shape2_position"><img src="/static/templates/activity/mondelay/shape2@2x.png"></div>
<div class="shape3_position"><img src="/static/templates/activity/mondelay/shape3@2x.png"></div>
<div class="shape4_position"><img src="/static/templates/activity/mondelay/shape4@2x.png"></div>
<div class="shape5_position"><img src="/static/templates/activity/mondelay/shape5@2x.png"></div>
<div class="shape5_position"><img src="/static/templates/activity/mondelay/shapey.png"></div>
<div th:class="${list==null&&expire }?'margin_top_80'">
<div th:class="${list==null ||(active && apply) }?'margin_top_0'">
<footer class="royal_position"><img src="/static/templates/activity/mondelay/logo copy@2x.png">
@ -113,7 +117,6 @@
var operation_pause= /*[[${operation_pause}]]*/false;
var cancel_waring= /*[[${cancel_waring}]]*/'';
function is_weixin() {
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger") {
@ -145,7 +148,7 @@
} else if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
window.webkit.messageHandlers.appCmd.postMessage({type:'cmd_cancel_mondelay',cancel_waring:cancel_waring});
} else if (/(Android)/i.test(navigator.userAgent)) {
android.appCmd('{\"type\":\"cmd_cancel_mondelay\"}');
android.appCmd('{\"type\":\"cmd_cancel_mondelay\",\"cancel_waring\":\"'+cancel_waring+'\"}');
} else {
}

@ -138,6 +138,26 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-4 col-sm-2" for="actDetail.act_img">Show Place</label>
<div class="col-xs-8 col-sm-4">
<div class="input-group">
<p class="checkbox checkbox-inline">
<label>
<input type="checkbox" ng-model="actDetail.app" name="app">App
</label>
<label>
<input type="checkbox" ng-model="actDetail.banner" name="banner">Banner
</label>
<label>
<input type="checkbox" ng-model="actDetail.list" name="list">List
</label>
</p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-4 col-sm-2">Show
Type</label>

@ -49,8 +49,8 @@
<tr ng-repeat="act in app_acts">
<td ng-bind="act.act_name"></td>
<td ng-bind="act.create_time"></td>
<td ng-bind="act.active_date | limitTo:10""></td>
<td ng-bind="act.expire_date | limitTo:10""></td>
<td ng-bind="act.active_date | limitTo:10"></td>
<td ng-bind="act.expire_date | limitTo:10"></td>
<td>
<span ng-click="publishedOrIsValid(act)">
<i class="text-success fa fa-check" ng-if="act.is_valid"></i>

@ -1,5 +1,5 @@
/**
* Created by yishuqian on 01/06/2017.
* Created by kira on 01/06/2017.
*/
define(['angular'], function (angular) {
'use strict';
@ -13,11 +13,15 @@ define(['angular'], function (angular) {
url: '/rate_warnings',
templateUrl: '/static/analysis/templates/settle_warnings.html',
controller: 'settleWarningsCtrl'
}).state('manual_settle', {
url: '/manual_settle',
templateUrl: '/static/analysis/templates/manual_settle.html',
controller: 'manualSettleCtrl'
})
}]);
app.controller('contractAnalysisCtrl', ['$scope', '$http', '$state', '$filter', 'commonDialog', function ($scope, $http, $state, $filter, commonDialog) {
$scope.getContractAnalysis = function () {
$http.get('/manage/contract/list').then(function (resp) {
$http.get('/manage/common/analysis/contract/list').then(function (resp) {
$scope.contract_analysis = resp.data;
});
};
@ -50,5 +54,15 @@ define(['angular'], function (angular) {
}
}]);
app.controller('manualSettleCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.getContractAnalysis = function () {
$http.get('/manage/common/analysis/manualSettle/list').then(function (resp) {
$scope.contract_analysis = resp.data;
});
};
$scope.getContractAnalysis();
}]);
return app;
});

@ -4,9 +4,12 @@
<li ui-sref-active-eq="active" class="active">
<a ui-sref="contract">Contract</a>
</li>
<li ui-sref-active="active">
<li ui-sref-active-eq="active" class="active">
<a ui-sref="rate_warnings">Rate Warings</a>
</li>
<li ui-sref-active-eq="active" class="active">
<a ui-sref="manual_settle">Manual Settle</a>
</li>
</ul>
<div class="modal-body">
<div class="box box-danger">

@ -0,0 +1,38 @@
<div class="modal-header">Contract</div>
<ul class="nav nav-tabs">
<li ui-sref-active-eq="active" class="active">
<a ui-sref="contract">Contract</a>
</li>
<li ui-sref-active-eq="active" class="active">
<a ui-sref="rate_warnings">Rate Warings</a>
</li>
<li ui-sref-active-eq="active" class="active">
<a ui-sref="manual_settle">Manual Settle</a>
</li>
</ul>
<div class="modal-body">
<div class="box box-danger">
<div class="box-header">商户</div>
<div class="box-body table-responsive">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Client Moniker</th>
<th>Unsettled</th>
<th>Latest Record</th>
<th>Record Time</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="contract in manual_settle_analysis">
<td ng-bind="contract.client_moniker"></td>
<td ng-bind="contract.unsettle"></td>
<td ng-bind="contract.latest_clearing"></td>
<td ng-bind="contract.latest_clearing_time|date:'dd/MMM/yyyy'"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

@ -163,17 +163,17 @@ tbody tr:nth-child(odd){
}
.shape4_position{
position: absolute;
left: 0px;
left: -10px;
top: 460px;
}
.shape4_position img{
width: 75px;
height: 135px;
width: 70px;
height: 125px;
}
.shape5_position{
position: absolute;
right: 0px;
top: 550px;
right: -50px;
top: 620px;
}
.shape5_position img{
width: 95px;

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Loading…
Cancel
Save