|
|
|
@ -172,6 +172,8 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
private ClearingLogMapper clearingLogMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private CustomerServiceService customerServiceService;
|
|
|
|
|
@Resource
|
|
|
|
|
private CouponAccuessLogMapper couponAccuessLogMapper;
|
|
|
|
|
private Map<String, AppMsgSender> senderMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
private final String fileName[] = { "client_bank_file", "client_id_file", "client_company_file" };
|
|
|
|
@ -451,6 +453,36 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject getCouponCusCouponLog(String client_moniker, AppQueryBean appQueryBean) {
|
|
|
|
|
JSONObject client = clientMapper.findClientByMoniker(client_moniker);
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new BadRequestException("Partner not exists");
|
|
|
|
|
}
|
|
|
|
|
PageList<JSONObject> cusCouponLog = couponAccuessLogMapper.getCouponAccuessLog(
|
|
|
|
|
client.getIntValue("client_id"), new PageBounds(appQueryBean.getPage(), appQueryBean.getLimit(), Order.formString("creation_date.desc")));
|
|
|
|
|
return PageListUtils.buildPageListResult(cusCouponLog);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void saveCouponAccuessLog(int client_id, String coupon_id) {
|
|
|
|
|
JSONObject client = clientMapper.findClient(client_id);
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new BadRequestException("Partner not exists");
|
|
|
|
|
}
|
|
|
|
|
JSONObject couponAccuessLog = new JSONObject();
|
|
|
|
|
couponAccuessLog.put("client_id", client_id);
|
|
|
|
|
couponAccuessLog.put("order_id", "非平台订单");
|
|
|
|
|
couponAccuessLog.put("coupon_id", coupon_id);
|
|
|
|
|
couponAccuessLog.put("customer_openid", "非平台订单");
|
|
|
|
|
couponAccuessLog.put("coupon_deal_amount", 0);
|
|
|
|
|
couponAccuessLog.put("currency", "AUD");
|
|
|
|
|
couponAccuessLog.put("creation_date", new Date());
|
|
|
|
|
couponAccuessLog.put("last_update_date", new Date());
|
|
|
|
|
couponAccuessLog.put("is_valid", 1);
|
|
|
|
|
couponAccuessLogMapper.save(couponAccuessLog);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void updateClient(JSONObject device, AppClientBean appClientBean) {
|
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
|