master
james.zhao 6 years ago
parent b8140db7e2
commit c0480d2c62

@ -227,14 +227,29 @@ public class CouponValidateServiceImpl implements CouponValidateService {
@Override @Override
public JSONObject getHalloweenOrderInfo(String customerId, String transactionDate) { public JSONObject getHalloweenOrderInfo(String customerId, String transactionDate) {
List<JSONObject> orderList = new ArrayList<>();
JSONObject relation = customerMapper.findCustomerBykangaId(customerId);
if (relation.containsKey("wechat_openid")) {
JSONObject param = new JSONObject();
param.put("customer_id", relation.getString("wechat_openid"));
param.put("transaction_date", transactionDate);
param.put("status", 5);
List<JSONObject> orderListWechat = orderMapper.listHalloweenActOrder(param);
if(orderListWechat!=null){
orderList.addAll(orderListWechat);
}
}
if (relation.containsKey("globalpay_openid")) {
JSONObject param = new JSONObject();
param.put("customer_id", relation.getString("globalpay_openid"));
param.put("transaction_date", transactionDate);
param.put("status", 5);
List<JSONObject> orderListGlobal = orderMapper.listHalloweenActOrder(param);
if(orderListGlobal!=null){
orderList.addAll(orderListGlobal);
}
}
// 获取万圣节活动当天支付成功的订单 // 获取万圣节活动当天支付成功的订单
JSONObject param = new JSONObject();
param.put("customer_id", customerId);
param.put("transaction_date", transactionDate);
param.put("status", 5);
List<JSONObject> orderList = orderMapper.listHalloweenActOrder(param);
JSONObject result = null; JSONObject result = null;
if (orderList != null && orderList.size() > 0) { if (orderList != null && orderList.size() > 0) {
result = new JSONObject(); result = new JSONObject();

@ -28,4 +28,7 @@ public interface CustomerMapper {
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "wechat_openid like 'o32%'") @AdvanceSelect(addonWhereClause = "wechat_openid like 'o32%'")
JSONObject findCustomerBykangaOpenid(@Param("kanga_openid") String openId); JSONObject findCustomerBykangaOpenid(@Param("kanga_openid") String openId);
@AutoSql(type = SqlType.SELECT)
JSONObject findCustomerBykangaId(@Param("kanga_openid") String openId);
} }

Loading…
Cancel
Save