master
wangning 7 years ago
parent 1b462fd599
commit 0a87728a96

@ -9,6 +9,7 @@ import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.tools.device.DeviceSupport;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.RequestEnvironment;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
@ -19,6 +20,7 @@ import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
@ -47,11 +49,11 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
private ClientsOperationLogMapper clientsOperationLogMapper;
@Resource
private ClientManager clientManager;
@Resource
private MessageSource messageSource;
@Override
public JSONObject getActNotice(JSONObject device) {
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
int client_id = device.getIntValue("client_id");
BigDecimal total_redpack = actMonDelaySettleRedPackMapper.getTotalRedPack(client_id);
JSONObject res = new JSONObject();
@ -68,15 +70,14 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
if (!act.getBoolean("is_valid")) {
throw new BadRequestException("Activity is not valid");
}
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
int client_id = device.getIntValue("client_id");
List<JSONObject> clientLogs = actMonDelaySettleMapper.clientLog(client_id);
JSONObject res = new JSONObject();
res.put("operation_pause",false);
Boolean apply = false;
if (!clientLogs.isEmpty()) {
apply = true;
Boolean apply = true;
if (clientLogs.isEmpty()) {
apply = false;
res.put("cancel_waring",messageSource.getMessage("sys.mondelay.cancel.waring", null, RequestEnvironment.getLocale()));
}
if (new Date().compareTo(act.getDate("active_date")) < 0) {
res.put("active", false);
@ -98,6 +99,7 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
res.put("apply", apply);
res.put("total_redpack", total_redpack);
res.put("list", list);
return res;
}

@ -105,3 +105,6 @@ sys.contract.ordinary.info=Dear merchant, your service contract with ROYALPAY ha
sys.contract.ordinary.waring=Dear merchant, your service contract with ROYALPAY expires in {0} days. In order not to affect your normal use, please contact your supervisor or use your administrator account as soon as possible in order to renew your service contract.
sys.contract.waring=Dear merchant, your service contract with ROYALPAY is due to expire in {0} days. In order not to affect your normal use, please see the latest service agreement for renewal.
sys.contract.info=Dear merchant, your service contract with ROYALPAY has expired. Please check the latest service agreement to renew your contract so as not to affect your normal use.
sys.mondelay.cancel.waring=this is mondelay cancel waring

@ -99,3 +99,5 @@ sys.contract.ordinary.info=尊敬的商户您与ROYALPAY的服务合同已到
sys.contract.ordinary.waring=尊敬的商户您与ROYALPAY的服务合同还有{0}天到期,为了不影响您的正常使用,请尽快联系您的主管或使用管理员账户登录以便进行服务续约
sys.contract.waring=尊敬的商户您与ROYALPAY的服务合同还有{0}天到期,为了不影响您的正常使用,请查看最新服务协议进行续约。
sys.contract.info=尊敬的商户您与ROYALPAY的服务合同已到期为了不影响您的正常使用请查看最新服务协议进行续约。
sys.mondelay.cancel.waring=商户取消活动警告

@ -111,6 +111,8 @@
<script type="text/javascript" data-th-inline="javascript">
$(document).ready(function () {
var operation_pause= /*[[${operation_pause}]]*/false;
var cancel_waring= /*[[${cancel_waring}]]*/'';
function is_weixin() {
var ua = navigator.userAgent.toLowerCase();
@ -141,7 +143,7 @@
if(is_weixin()){
return;
} else if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
window.webkit.messageHandlers.appCmd.postMessage({type:'cmd_cancel_mondelay'});
window.webkit.messageHandlers.appCmd.postMessage({type:'cmd_cancel_mondelay',waring:cancel_waring});
} else if (/(Android)/i.test(navigator.userAgent)) {
android.appCmd('{\"type\":\"cmd_cancel_mondelay\"}');
} else {

Loading…
Cancel
Save