|
@@ -3,6 +3,7 @@ package com.hcloud.microserver.system.bank.service.impl;
|
|
|
import com.github.pagehelper.Page;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
+import com.hcloud.microserver.commoncore.util.reflect.DateUtils;
|
|
|
import com.hcloud.microserver.system.bank.dao.GoodsOrderInfoMapper;
|
|
|
import com.hcloud.microserver.system.bank.dao.OrderPayVoucherMapper;
|
|
|
import com.hcloud.microserver.system.bank.events.CredentialInfoEvent;
|
|
@@ -11,6 +12,7 @@ import com.hcloud.microserver.commoncore.util.BeanCopyUtil;
|
|
|
import com.hcloud.microserver.commoncore.util.GetUUID;
|
|
|
import com.hcloud.microserver.system.facade.carbon.entity.GoodsOrderInfo;
|
|
|
import com.hcloud.microserver.system.facade.carbon.entity.OrderPayVoucher;
|
|
|
+import com.hcloud.microserver.system.facade.carbon.forms.OfflineOrderPayVoucherForm;
|
|
|
import com.hcloud.microserver.system.facade.carbon.forms.OrderPayVoucherForm;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.ApplicationContext;
|
|
@@ -138,4 +140,31 @@ public class OrderPayVoucherServiceImpl implements OrderPayVoucherService {
|
|
|
OrderPayVoucher orderPayVoucher = BeanCopyUtil.convertBean(record,OrderPayVoucher.class);
|
|
|
return orderPayVoucherMapper.updateByPrimaryKey(orderPayVoucher);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成离线支付凭证信息
|
|
|
+ *
|
|
|
+ * @param payVoucher
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ @Transactional
|
|
|
+ public int newSavePayVoucher(OfflineOrderPayVoucherForm payVoucher) {
|
|
|
+ OrderPayVoucher record = new OrderPayVoucher();
|
|
|
+ record.setGuid(GetUUID.getUUID());
|
|
|
+ record.setCreateTime(new Date());
|
|
|
+ record.setModifiedTime(new Date());
|
|
|
+ record.setState(1);
|
|
|
+
|
|
|
+ record.setFkOrderId(payVoucher.getOrderId());
|
|
|
+ record.setFkCustomerId(payVoucher.getCustomerId());
|
|
|
+ record.setPayAmount(payVoucher.getPayAmount());
|
|
|
+ record.setPayBank(payVoucher.getPayBank());
|
|
|
+ record.setPayCardNo(payVoucher.getPayCardNo());
|
|
|
+ record.setPayUserName(payVoucher.getPayUserName());
|
|
|
+ record.setVoucherImages(payVoucher.getVoucherImages());
|
|
|
+ Date payTime = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS,payVoucher.getPayTime());
|
|
|
+ record.setPayTime(payTime);
|
|
|
+ return orderPayVoucherMapper.insertSelective(record);
|
|
|
+ }
|
|
|
}
|