|
|
@ -174,6 +174,8 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
private CustomerServiceService customerServiceService;
|
|
|
|
private CustomerServiceService customerServiceService;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private CouponAccuessLogMapper couponAccuessLogMapper;
|
|
|
|
private CouponAccuessLogMapper couponAccuessLogMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private CouponValidateService couponValidateService;
|
|
|
|
private Map<String, AppMsgSender> senderMap = new HashMap<>();
|
|
|
|
private Map<String, AppMsgSender> senderMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
|
|
private final String fileName[] = { "client_bank_file", "client_id_file", "client_company_file" };
|
|
|
|
private final String fileName[] = { "client_bank_file", "client_id_file", "client_company_file" };
|
|
|
@ -449,7 +451,7 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public JSONObject ctripCouponInfo(JSONObject device, String coupon_id) {
|
|
|
|
public JSONObject ctripCouponInfo(JSONObject device, String coupon_id) {
|
|
|
|
return couponVerificationService.ctripCouponInfo(coupon_id,device.getIntValue("client_id"));
|
|
|
|
return couponVerificationService.ctripCouponInfo(coupon_id,device.getIntValue("client_id"), true);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -459,9 +461,20 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
if (client == null) {
|
|
|
|
if (client == null) {
|
|
|
|
throw new BadRequestException("Partner not exists");
|
|
|
|
throw new BadRequestException("Partner not exists");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
PageList<JSONObject> cusCouponLog = couponAccuessLogMapper.getCouponAccuessLog(
|
|
|
|
PageList<JSONObject> cusCouponLogs = couponAccuessLogMapper.getCouponAccuessLog(
|
|
|
|
client.getIntValue("client_id"), new PageBounds(appQueryBean.getPage(), appQueryBean.getLimit(), Order.formString("creation_date.desc")));
|
|
|
|
client.getIntValue("client_id"), new PageBounds(appQueryBean.getPage(), appQueryBean.getLimit(), Order.formString("creation_date.desc")));
|
|
|
|
return PageListUtils.buildPageListResult(cusCouponLog);
|
|
|
|
HashMap<String, JSONObject> couponMap = new HashMap<>();
|
|
|
|
|
|
|
|
for(JSONObject cusCouponLog : cusCouponLogs) {
|
|
|
|
|
|
|
|
cusCouponLog.put("client_moniker", client_moniker);
|
|
|
|
|
|
|
|
if (couponMap.containsKey(cusCouponLog.getString("coupon_id"))) {
|
|
|
|
|
|
|
|
cusCouponLog.put("coupon", couponMap.get(cusCouponLog.getString("coupon_id")));
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
JSONObject coupon = couponValidateService.ctripCouponInfo(cusCouponLog.getString("coupon_id"), cusCouponLog.getIntValue("client_id"), false);
|
|
|
|
|
|
|
|
couponMap.put(cusCouponLog.getString("coupon_id"), coupon);
|
|
|
|
|
|
|
|
cusCouponLog.put("coupon", coupon);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return PageListUtils.buildPageListResult(cusCouponLogs);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|