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

master
luoyang 6 years ago
commit f14c1bda2e

@ -457,12 +457,13 @@ public class RetailAppServiceImp implements RetailAppService {
@Override
public JSONObject getCouponCusCouponLog(String client_moniker, AppQueryBean appQueryBean) {
String keyword = "CTRIP_";
JSONObject client = clientMapper.findClientByMoniker(client_moniker);
if (client == null) {
throw new BadRequestException("Partner not exists");
}
PageList<JSONObject> cusCouponLogs = couponAccuessLogMapper.getCouponAccuessLog(
client.getIntValue("client_id"), new PageBounds(appQueryBean.getPage(), appQueryBean.getLimit(), Order.formString("creation_date.desc")));
client.getIntValue("client_id"), keyword, new PageBounds(appQueryBean.getPage(), appQueryBean.getLimit(), Order.formString("creation_date.desc")));
HashMap<String, JSONObject> couponMap = new HashMap<>();
for(JSONObject cusCouponLog : cusCouponLogs) {
cusCouponLog.put("client_moniker", client_moniker);
@ -487,7 +488,7 @@ public class RetailAppServiceImp implements RetailAppService {
Date date = new Date();
couponAccuessLog.put("client_id", client_id);
couponAccuessLog.put("order_id", "非平台订单");
couponAccuessLog.put("coupon_id", coupon_id);
couponAccuessLog.put("coupon_id", "CTRIP_"+coupon_id);
couponAccuessLog.put("customer_openid", "非平台订单");
couponAccuessLog.put("coupon_deal_amount", 0);
couponAccuessLog.put("currency", "AUD");

@ -29,6 +29,5 @@ public interface CouponAccuessLogMapper {
@AutoSql(type = SqlType.SELECT)
List<JSONObject> findCouponByOrderId(@Param("order_id") String order_id);
@AutoSql(type = SqlType.SELECT)
PageList<JSONObject> getCouponAccuessLog(@Param("client_id")int client_id, PageBounds pageBounds);
PageList<JSONObject> getCouponAccuessLog(@Param("client_id")int client_id, @Param("keyword")String keyword, PageBounds pageBounds);
}

@ -3779,7 +3779,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
ctx.setVariable("name", client.getString("contact_person"));
ctx.setVariable("order_id", order.getString("order_id"));
ctx.setVariable("amount", order.getString("total_amount"));
ctx.setVariable("time", order.getString("create_time"));
String create_time = DateFormatUtils.format(order.getDate("create_time"), "yyyy-MM-dd HH:mm:ss");
ctx.setVariable("time", create_time);
final String content = thymeleaf.process( "mail/hf_email_notice", ctx);
final String mailTo = client.getString("contact_email");
if (StringUtils.isEmpty(mailTo)) {

@ -0,0 +1,13 @@
<?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.log.CouponAccuessLogMapper">
<select id="getCouponAccuessLog" resultType="com.alibaba.fastjson.JSONObject">
SELECT
accuess_id,client_id,customer_openid,order_id,
TRIM(LEADING #{keyword} FROM coupon_id) coupon_id,
coupon_deal_amount,min_pay_amount,currency,creation_date,
last_update_date,is_valid,transaction_id,transaction_refund_id,refund_id
FROM cus_coupon_accuess_log
WHERE locate(#{keyword},coupon_id) = 1 AND client_id = #{client_id}
</select>
</mapper>

@ -15,6 +15,7 @@
<div style="border: 1px #EAEAEA solid;margin-bottom: 5.5%;font-size: 12px;">
<p style="margin-left: 3%;">RoyalPay到账提醒</p>
<ul>
<li style="margin-bottom: 6px;">支付渠道:<span style="color: #EE6723;">汇付</span></li>
<li style="margin-bottom: 6px;">订单编号:<span style="color: #EE6723;" th:text="${order_id}"></span></li>
<li style="margin-bottom: 6px;">收款金额:<span style="color: #EE6723;" th:text="${amount}"></span></li>
<li style="margin-bottom: 6px;">到账时间:<span style="color: #EE6723;" th:text="${time}"></span></li>

Loading…
Cancel
Save