eason.qian 7 years ago
parent df99ae3218
commit 0ea54d7191

@ -238,7 +238,28 @@ alter table statistics_customer_order add column refund_amount DECIMAL(20,2) DEF
ALTER TABLE `financial_bd_prize_log`
MODIFY COLUMN `manager_id` varchar(50) NOT NULL COMMENT 'bd user id' AFTER `record_id`;
CREATE TABLE act_mon_delay_settle
(
id VARCHAR(50) PRIMARY KEY NOT NULL,
client_id INT(11) NOT NULL,
account_id VARCHAR(50) NOT NULL,
account_name VARCHAR(100) COMMENT '商户账户名称',
create_time DATETIME NOT NULL COMMENT '参与开始时间(若在周一,下周生效)',
expire_time DATETIME COMMENT '结束时间',
is_valid TINYINT DEFAULT 1,
rate DECIMAL(4,2) COMMENT '年化收益率'
);
CREATE TABLE act_mon_delay_settle_redpack
(
id VARCHAR(50) PRIMARY KEY NOT NULL,
client_id INT(11) NOT NULL,
settle_amount DECIMAL(10,2) NOT NULL,
rate DECIMAL(4,2) COMMENT '收益率',
redpack_amount DECIMAL(10,2) COMMENT '奖励金额',
create_time DATETIME NOT NULL,
send_time DATETIME COMMENT '奖励发放时间'
);
CREATE TABLE `act_app_list` (
`act_id` varchar(50) NOT NULL,
`act_name` varchar(100) NOT NULL COMMENT '活动名称',

@ -2,7 +2,6 @@ package au.com.royalpay.payment.manage.activities.app_index.core.impls;
import au.com.royalpay.payment.manage.activities.app_index.core.AppActService;
import au.com.royalpay.payment.manage.mappers.act.ActAppMapper;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service;
@ -17,11 +16,11 @@ public class AppActServiceImp implements AppActService {
@Override
public List<JSONObject> listAppActs(){
List<JSONObject> list = actAppMapper.listActs();
for (JSONObject act:list){
String url = act.getString("act_url");
act.put("act_url", PlatformEnvironment.getEnv().concatUrl(url));
}
// List<JSONObject> list = actAppMapper.listActs();
// for (JSONObject act:list){
// String url = act.getString("act_url");
// act.put("act_url", PlatformEnvironment.getEnv().concatUrl(url));
// }
return actAppMapper.listActs();
}
}

@ -331,7 +331,7 @@ public class RetailAppController {
}
@RequestMapping(value = "/act",method = RequestMethod.GET)
@RequestMapping(value = "/acts",method = RequestMethod.GET)
public List<JSONObject> getIndexAct(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device){
return appActService.listAppActs();
}
@ -343,4 +343,14 @@ public class RetailAppController {
return mav;
}
@RequestMapping(value = "/act/mondelay/apply", method = RequestMethod.POST)
public void apply(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
actMonDelaySettleService.actApply(device);
}
@RequestMapping(value = "/act/mondelay/cancel", method = RequestMethod.PUT)
public void cancel(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
actMonDelaySettleService.cancelAct(device);
}
}

@ -11,7 +11,7 @@
<meta http-equiv="pragma" content="no-cache">
<link rel="stylesheet" href="/static/lib/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/templates/activity/mondelay/mondelay.css?t=201607242202">
<title>跨境电商优选补贴计划</title>
<title>余额增值,周一专享活动</title>
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="/static/lib/jquery/jquery-2.1.4.min.js"></script>
@ -39,12 +39,12 @@
<li>本活动最终解释权归RoyalPay所有</li>
</ul>
</div>
<div class="button_center" th:if="!${detail['apply']}" id="applyButton">
<div class="button_center" th:if="!${apply}" id="applyButton">
<button class="button_position">
<span style="color: #FFFFFF;">我要参加</span>
</button>
</div>
<div th:class="${detail['apply']}?'margin_top'">
<div th:class="${apply}?'margin_top'">
<div class="content">
<div class="h3_width">
<h2>补贴金额记录</h2>
@ -59,7 +59,7 @@
</tr>
</thead>
<tbody>
<tr th:each="redpack:${detail['list']}">
<tr th:each="redpack:${list}">
<td th:text="${#dates.format(redpack['send_time'], 'yyyy-MM-dd')}">>04-01 12:00</td>
<td style="text-align: right" th:text="${redpack['redpack_amount']}">$5.00</td>
</tr>
@ -75,35 +75,49 @@
<div class="shape5_position"><img src="/static/templates/activity/mondelay/shape5@2x.png"></div>
<div class="shape6_position"><img src="/static/templates/activity/mondelay/shape6@2x.png"></div>
<footer class="royal_position"><img src="/static/templates/activity/mondelay/logo@2x.png">
<button type="button" class="btn btn-primary" th:if="${detail['apply']}" id="cancelButton">取消</button>
<button type="button" class="btn btn-primary" th:if="${apply}" id="cancelButton">取消</button>
</footer>
</body>
</html>
<script type="text/javascript" data-th-inline="javascript">
$(document).ready(function () {
function is_weixin() {
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger") {
return true;
} else {
return false;
}
}
$('#applyButton').click(function () {
$.ajax({
url: '/act/mondelay/apply',
method: 'POST',
dataType: "json",
success: function (resp) {
var u = navigator.userAgent;
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
}, error: function (jqXHR) {
if(is_weixin()){
}
});
} else if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
appCmd('{\"type\":\"cmd_join_mondelay\"');
} else if (/(Android)/i.test(navigator.userAgent)) {
android.appCmd('{\"type\":\"cmd_join_mondelay\"}');
} else {
}
});
$('#cancelButton').click(function () {
$.ajax({
url: '/act/mondelay/cancel',
method: 'PUT',
dataType: "json",
success: function (resp) {
var u = navigator.userAgent;
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
if(is_weixin()){
}, error: function (jqXHR) {
} else if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
appCmd('{\"type\":\"cmd_cancel_mondelay\"');
} else if (/(Android)/i.test(navigator.userAgent)) {
android.appCmd('{\"type\":\"cmd_cancel_mondelay\"}');
} else {
}
});
}
});
})
</script>
Loading…
Cancel
Save