diff --git a/electripper-admin/src/main/java/com/ruoyi/web/controller/system/EtCapitalFlowController.java b/electripper-admin/src/main/java/com/ruoyi/web/controller/system/EtCapitalFlowController.java new file mode 100644 index 0000000..ec2657f --- /dev/null +++ b/electripper-admin/src/main/java/com/ruoyi/web/controller/system/EtCapitalFlowController.java @@ -0,0 +1,104 @@ +package com.ruoyi.web.controller.system; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.EtCapitalFlow; +import com.ruoyi.system.service.IEtCapitalFlowService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 资金流水Controller + * + * @author 邱贞招 + * @date 2024-05-24 + */ +@RestController +@RequestMapping("/system/flow") +public class EtCapitalFlowController extends BaseController +{ + @Autowired + private IEtCapitalFlowService etCapitalFlowService; + + /** + * 查询资金流水列表 + */ + @PreAuthorize("@ss.hasPermi('system:flow:list')") + @GetMapping("/list") + public TableDataInfo list(EtCapitalFlow etCapitalFlow) + { + startPage(); + List list = etCapitalFlowService.selectEtCapitalFlowList(etCapitalFlow); + return getDataTable(list); + } + + /** + * 导出资金流水列表 + */ + @PreAuthorize("@ss.hasPermi('system:flow:export')") + @Log(title = "资金流水", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EtCapitalFlow etCapitalFlow) + { + List list = etCapitalFlowService.selectEtCapitalFlowList(etCapitalFlow); + ExcelUtil util = new ExcelUtil(EtCapitalFlow.class); + util.exportExcel(response, list, "资金流水数据"); + } + + /** + * 获取资金流水详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:flow:query')") + @GetMapping(value = "/{flowId}") + public AjaxResult getInfo(@PathVariable("flowId") Long flowId) + { + return success(etCapitalFlowService.selectEtCapitalFlowByFlowId(flowId)); + } + + /** + * 新增资金流水 + */ + @PreAuthorize("@ss.hasPermi('system:flow:add')") + @Log(title = "资金流水", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EtCapitalFlow etCapitalFlow) + { + return toAjax(etCapitalFlowService.insertEtCapitalFlow(etCapitalFlow)); + } + + /** + * 修改资金流水 + */ + @PreAuthorize("@ss.hasPermi('system:flow:edit')") + @Log(title = "资金流水", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EtCapitalFlow etCapitalFlow) + { + return toAjax(etCapitalFlowService.updateEtCapitalFlow(etCapitalFlow)); + } + + /** + * 删除资金流水 + */ + @PreAuthorize("@ss.hasPermi('system:flow:remove')") + @Log(title = "资金流水", businessType = BusinessType.DELETE) + @DeleteMapping("/{flowIds}") + public AjaxResult remove(@PathVariable Long[] flowIds) + { + return toAjax(etCapitalFlowService.deleteEtCapitalFlowByFlowIds(flowIds)); + } +} diff --git a/electripper-admin/src/main/java/com/ruoyi/web/controller/system/EtOrderController.java b/electripper-admin/src/main/java/com/ruoyi/web/controller/system/EtOrderController.java index 4dc5a12..cf07907 100644 --- a/electripper-admin/src/main/java/com/ruoyi/web/controller/system/EtOrderController.java +++ b/electripper-admin/src/main/java/com/ruoyi/web/controller/system/EtOrderController.java @@ -3,7 +3,7 @@ package com.ruoyi.web.controller.system; import java.util.List; import javax.servlet.http.HttpServletResponse; -import com.ruoyi.framework.web.service.TokenService; +import com.ruoyi.system.domain.vo.RechargeVo; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -48,6 +48,18 @@ public class EtOrderController extends BaseController return getDataTable(list); } + /** + * 查询充值/退款订单列表 + */ + @PreAuthorize("@ss.hasPermi('system:order:list')") + @GetMapping("/rechargeList") + public TableDataInfo rechargeList(EtOrder etOrder) + { + startPage(); + List list = etOrderService.rechargeList(etOrder); + return getDataTable(list); + } + /** * 导出订单列表 */ diff --git a/electripper-common/src/main/java/com/ruoyi/common/constant/ServiceConstants.java b/electripper-common/src/main/java/com/ruoyi/common/constant/ServiceConstants.java index 1b063bb..b06244b 100644 --- a/electripper-common/src/main/java/com/ruoyi/common/constant/ServiceConstants.java +++ b/electripper-common/src/main/java/com/ruoyi/common/constant/ServiceConstants.java @@ -20,6 +20,11 @@ public class ServiceConstants { */ public static final String ORDER_TYPE_DEPOSIT = "2"; + /** + * 订单类型: 3-押金退款 + */ + public static final String ORDER_TYPE_DEPOSIT_REFUND = "3"; + /**----------------------------订单类型end----------------------------*/ /**----------------------------支付场景start----------------------------*/ /** 支付场景: 1-骑行支付,2-取消预约支付,3-套餐支付,4-押金支付 */ @@ -375,7 +380,7 @@ public class ServiceConstants { /**----------------------------租赁单位end----------------------------*/ /**----------------------------计费周期start----------------------------*/ - /** 计费周期:1-订单生成后__小时 2-自定义时刻 + /** 计费周期:1-订单生成后__小时 2-自定义时刻 */ /** * 计费周期:1-订单生成后__小时 */ @@ -387,4 +392,19 @@ public class ServiceConstants { public static final String CHARGING_CYCLE_CUSTOM = "2"; /**----------------------------计费周期end----------------------------*/ + + /**----------------------------充值状态start----------------------------*/ + /** 充值状态:1-充值成功;2-退款成功; */ + /** + * 充值状态:1-充值成功 + */ + public static final String RECHARGE_STATUS_SUCCESS = "1"; + + /** + * 充值状态:2-退款成功 + */ + public static final String RECHARGE_STATUS_REFUND_SUCCESS = "2"; + + /**----------------------------充值状态end----------------------------*/ + } diff --git a/electripper-system/src/main/java/com/ruoyi/system/domain/EtCapitalFlow.java b/electripper-system/src/main/java/com/ruoyi/system/domain/EtCapitalFlow.java new file mode 100644 index 0000000..8a9c426 --- /dev/null +++ b/electripper-system/src/main/java/com/ruoyi/system/domain/EtCapitalFlow.java @@ -0,0 +1,69 @@ +package com.ruoyi.system.domain; + +import java.math.BigDecimal; + +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 资金流水对象 et_capital_flow + * + * @author 邱贞招 + * @date 2024-05-24 + */ +@Data +public class EtCapitalFlow extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 流水id */ + private Long flowId; + + /** 区域 */ + @Excel(name = "区域") + private Long areaId; + + /** 关联订单号 */ + @Excel(name = "关联订单号") + private String orderNo; + + /** 第三方交易单号 */ + @Excel(name = "第三方交易单号") + private String outTradeNo; + + /** 收支类型 */ + @Excel(name = "收支类型") + private String type; + + /** 业务类型 */ + @Excel(name = "业务类型") + private String busType; + + /** 交易金额 */ + @Excel(name = "交易金额") + private BigDecimal amount; + + /** 手续费 */ + @Excel(name = "手续费") + private BigDecimal handlingCharge; + + /** 运营商分账 */ + @Excel(name = "运营商分账") + private BigDecimal operatorDividend; + + /** 运营商结余 */ + @Excel(name = "运营商结余") + private BigDecimal operatorBalance; + + /** 合伙人分账 */ + @Excel(name = "合伙人分账") + private BigDecimal partnerDividend; + + /** 支付方式 */ + @Excel(name = "支付方式") + private String payType; + +} diff --git a/electripper-system/src/main/java/com/ruoyi/system/domain/vo/RechargeVo.java b/electripper-system/src/main/java/com/ruoyi/system/domain/vo/RechargeVo.java new file mode 100644 index 0000000..c8d632e --- /dev/null +++ b/electripper-system/src/main/java/com/ruoyi/system/domain/vo/RechargeVo.java @@ -0,0 +1,57 @@ +package com.ruoyi.system.domain.vo; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 押金管理视图层 + * + * @author 邱贞招 + * @date 2024-05-24 + */ +@Data +public class RechargeVo { + + /** 订单号 */ + @Excel(name = "订单号") + private String orderNo; + + /** 内部交易号 */ + @Excel(name = "内部交易号") + private String outTradeNo; + + /** 类型:2-押金充值;3-押金退款 */ + @Excel(name = "类型") + private String rechargeType; + + /** 订单总金额(元) */ + @Excel(name = "订单总金额(元)") + private BigDecimal totalFee; + + /** 支付时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date payTime; + + /** 用户id */ + @Excel(name = "用户id") + private Long userId; + + /** 用户 */ + @Excel(name = "用户") + private String userName; + + /** 用户手机号 */ + @Excel(name = "用户手机号") + private String phonenumber; + + /** 充值状态:1-充值成功;2-退款成功; */ + @Excel(name = "充值状态:1-充值成功;2-退款成功;") + private String rechargeStatus; + +} diff --git a/electripper-system/src/main/java/com/ruoyi/system/mapper/EtCapitalFlowMapper.java b/electripper-system/src/main/java/com/ruoyi/system/mapper/EtCapitalFlowMapper.java new file mode 100644 index 0000000..1db370a --- /dev/null +++ b/electripper-system/src/main/java/com/ruoyi/system/mapper/EtCapitalFlowMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.EtCapitalFlow; + +/** + * 资金流水Mapper接口 + * + * @author 邱贞招 + * @date 2024-05-24 + */ +public interface EtCapitalFlowMapper +{ + /** + * 查询资金流水 + * + * @param flowId 资金流水主键 + * @return 资金流水 + */ + public EtCapitalFlow selectEtCapitalFlowByFlowId(Long flowId); + + /** + * 查询资金流水列表 + * + * @param etCapitalFlow 资金流水 + * @return 资金流水集合 + */ + public List selectEtCapitalFlowList(EtCapitalFlow etCapitalFlow); + + /** + * 新增资金流水 + * + * @param etCapitalFlow 资金流水 + * @return 结果 + */ + public int insertEtCapitalFlow(EtCapitalFlow etCapitalFlow); + + /** + * 修改资金流水 + * + * @param etCapitalFlow 资金流水 + * @return 结果 + */ + public int updateEtCapitalFlow(EtCapitalFlow etCapitalFlow); + + /** + * 删除资金流水 + * + * @param flowId 资金流水主键 + * @return 结果 + */ + public int deleteEtCapitalFlowByFlowId(Long flowId); + + /** + * 批量删除资金流水 + * + * @param flowIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteEtCapitalFlowByFlowIds(Long[] flowIds); +} diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/IEtCapitalFlowService.java b/electripper-system/src/main/java/com/ruoyi/system/service/IEtCapitalFlowService.java new file mode 100644 index 0000000..c537db2 --- /dev/null +++ b/electripper-system/src/main/java/com/ruoyi/system/service/IEtCapitalFlowService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.EtCapitalFlow; + +/** + * 资金流水Service接口 + * + * @author 邱贞招 + * @date 2024-05-24 + */ +public interface IEtCapitalFlowService +{ + /** + * 查询资金流水 + * + * @param flowId 资金流水主键 + * @return 资金流水 + */ + public EtCapitalFlow selectEtCapitalFlowByFlowId(Long flowId); + + /** + * 查询资金流水列表 + * + * @param etCapitalFlow 资金流水 + * @return 资金流水集合 + */ + public List selectEtCapitalFlowList(EtCapitalFlow etCapitalFlow); + + /** + * 新增资金流水 + * + * @param etCapitalFlow 资金流水 + * @return 结果 + */ + public int insertEtCapitalFlow(EtCapitalFlow etCapitalFlow); + + /** + * 修改资金流水 + * + * @param etCapitalFlow 资金流水 + * @return 结果 + */ + public int updateEtCapitalFlow(EtCapitalFlow etCapitalFlow); + + /** + * 批量删除资金流水 + * + * @param flowIds 需要删除的资金流水主键集合 + * @return 结果 + */ + public int deleteEtCapitalFlowByFlowIds(Long[] flowIds); + + /** + * 删除资金流水信息 + * + * @param flowId 资金流水主键 + * @return 结果 + */ + public int deleteEtCapitalFlowByFlowId(Long flowId); +} diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/IEtOrderService.java b/electripper-system/src/main/java/com/ruoyi/system/service/IEtOrderService.java index 2b29d7e..b3396e9 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/service/IEtOrderService.java +++ b/electripper-system/src/main/java/com/ruoyi/system/service/IEtOrderService.java @@ -7,6 +7,7 @@ import com.ruoyi.system.domain.EtOrder; import com.ruoyi.system.domain.EtRefund; import com.ruoyi.system.domain.vo.EtOrderVo; import com.ruoyi.system.domain.vo.OperatingDataVo; +import com.ruoyi.system.domain.vo.RechargeVo; import com.ruoyi.system.domain.vo.ReconciliationVo; import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse; import com.wechat.pay.java.service.refund.model.Refund; @@ -154,5 +155,11 @@ public interface IEtOrderService public EtRefund createRefund(EtOrder etOrder, BigDecimal refundAmount, BigDecimal appointmentFee, BigDecimal dispatchFee, BigDecimal manageFee, BigDecimal ridingFee, Refund refund, String type); + /** + * 查询充值/退款订单列表 + */ + List rechargeList(EtOrder etOrder); + + // public partnerBill(); } diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/impl/CallbackServiceImpl.java b/electripper-system/src/main/java/com/ruoyi/system/service/impl/CallbackServiceImpl.java index 83a3282..dfe0d77 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/service/impl/CallbackServiceImpl.java +++ b/electripper-system/src/main/java/com/ruoyi/system/service/impl/CallbackServiceImpl.java @@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; import com.ruoyi.common.constant.CacheConstants; +import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.ServiceConstants; import com.ruoyi.common.core.domain.entity.AsUser; import com.ruoyi.common.core.redis.RedisCache; @@ -257,7 +258,7 @@ public class CallbackServiceImpl implements CallbackService { String outRefundNo = refundNotification.getOutRefundNo(); EtRefund etRefund = new EtRefund(); etRefund.setRefundNo(outRefundNo); - etRefund.setRefundResult("SUCCESS"); + etRefund.setRefundResult(Constants.SUCCESS2); int i = etRefundService.updateEtRefundByRefundNo(etRefund); if(i==0){ logger.error("【微信退款回调】更新退款单失败"); diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtCapitalFlowServiceImpl.java b/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtCapitalFlowServiceImpl.java new file mode 100644 index 0000000..86d5d97 --- /dev/null +++ b/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtCapitalFlowServiceImpl.java @@ -0,0 +1,95 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.EtCapitalFlowMapper; +import com.ruoyi.system.domain.EtCapitalFlow; +import com.ruoyi.system.service.IEtCapitalFlowService; + +/** + * 资金流水Service业务层处理 + * + * @author 邱贞招 + * @date 2024-05-24 + */ +@Service +public class EtCapitalFlowServiceImpl implements IEtCapitalFlowService +{ + @Autowired + private EtCapitalFlowMapper etCapitalFlowMapper; + + /** + * 查询资金流水 + * + * @param flowId 资金流水主键 + * @return 资金流水 + */ + @Override + public EtCapitalFlow selectEtCapitalFlowByFlowId(Long flowId) + { + return etCapitalFlowMapper.selectEtCapitalFlowByFlowId(flowId); + } + + /** + * 查询资金流水列表 + * + * @param etCapitalFlow 资金流水 + * @return 资金流水 + */ + @Override + public List selectEtCapitalFlowList(EtCapitalFlow etCapitalFlow) + { + return etCapitalFlowMapper.selectEtCapitalFlowList(etCapitalFlow); + } + + /** + * 新增资金流水 + * + * @param etCapitalFlow 资金流水 + * @return 结果 + */ + @Override + public int insertEtCapitalFlow(EtCapitalFlow etCapitalFlow) + { + etCapitalFlow.setCreateTime(DateUtils.getNowDate()); + return etCapitalFlowMapper.insertEtCapitalFlow(etCapitalFlow); + } + + /** + * 修改资金流水 + * + * @param etCapitalFlow 资金流水 + * @return 结果 + */ + @Override + public int updateEtCapitalFlow(EtCapitalFlow etCapitalFlow) + { + return etCapitalFlowMapper.updateEtCapitalFlow(etCapitalFlow); + } + + /** + * 批量删除资金流水 + * + * @param flowIds 需要删除的资金流水主键 + * @return 结果 + */ + @Override + public int deleteEtCapitalFlowByFlowIds(Long[] flowIds) + { + return etCapitalFlowMapper.deleteEtCapitalFlowByFlowIds(flowIds); + } + + /** + * 删除资金流水信息 + * + * @param flowId 资金流水主键 + * @return 结果 + */ + @Override + public int deleteEtCapitalFlowByFlowId(Long flowId) + { + return etCapitalFlowMapper.deleteEtCapitalFlowByFlowId(flowId); + } +} diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java b/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java index 0197888..20f1859 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java +++ b/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java @@ -12,10 +12,7 @@ import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.onenet.Token; import com.ruoyi.common.utils.uuid.IdUtils; import com.ruoyi.system.domain.*; -import com.ruoyi.system.domain.vo.EtOrderVo; -import com.ruoyi.system.domain.vo.OperatingDataVo; -import com.ruoyi.system.domain.vo.PrepayWithRequestPaymentResponseVo; -import com.ruoyi.system.domain.vo.ReconciliationVo; +import com.ruoyi.system.domain.vo.*; import com.ruoyi.system.mapper.AsDeviceMapper; import com.ruoyi.system.mapper.EtOrderMapper; import com.ruoyi.system.service.*; @@ -35,10 +32,7 @@ import org.springframework.web.bind.annotation.RequestBody; import javax.annotation.Resource; import java.math.BigDecimal; import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.List; +import java.util.*; /** * 订单Service业务层处理 @@ -225,6 +219,46 @@ public class EtOrderServiceImpl implements IEtOrderService return etOrders; } + /** + * 查询充值/退款订单列表 资本 capital flow 收支 业务 + */ + @Override + public List rechargeList(EtOrder etOrder) { + List rechargeVoList = new ArrayList<>(); + etOrder.setPaid(ServiceConstants.ORDER_PAY_STATUS_PAID); + etOrder.setStatus(ServiceConstants.ORDER_STATUS_ORDER_END); + List etOrders = etOrderMapper.selectEtOrderList(etOrder); + etOrders.forEach(etOrder1 -> { + RechargeVo rechargeVo = new RechargeVo(); + BeanUtils.copyProperties(etOrder1,rechargeVo); + rechargeVo.setRechargeStatus(ServiceConstants.RECHARGE_STATUS_SUCCESS); + rechargeVo.setRechargeType(ServiceConstants.ORDER_TYPE_DEPOSIT); + rechargeVoList.add(rechargeVo); + }); + //如果查询押金则增加退款记录 + EtRefund refund = new EtRefund(); + refund.setType(ServiceConstants.REFUND_TYPE_DEPOSIT); + refund.setRefundResult(Constants.SUCCESS2); + List etRefunds = etRefundService.selectEtRefundList(refund); + etRefunds.forEach(etRefund -> { + AsUser asUser = asUserService.selectUserById(etRefund.getUserId()); + RechargeVo rechargeVo = new RechargeVo(); + BeanUtils.copyProperties(etRefund,rechargeVo); + rechargeVo.setOutTradeNo(etRefund.getRefundNo()); + rechargeVo.setPayTime(etRefund.getCreateTime()); + rechargeVo.setTotalFee(etRefund.getAmount()); + rechargeVo.setUserId(etRefund.getUserId()); + rechargeVo.setUserName(asUser.getUserName()); + rechargeVo.setPhonenumber(asUser.getPhonenumber()); + rechargeVo.setRechargeStatus(ServiceConstants.RECHARGE_STATUS_REFUND_SUCCESS); + rechargeVo.setRechargeType(ServiceConstants.ORDER_TYPE_DEPOSIT_REFUND); + rechargeVoList.add(rechargeVo); + }); + //将rechargeVoList根据payTime倒序 + rechargeVoList.sort(Comparator.comparing(RechargeVo::getPayTime).reversed()); + return rechargeVoList; + } + private boolean toBePaid(String[] statusList) { boolean hasOne = false; boolean hasThree = false; diff --git a/electripper-system/src/main/resources/mapper/system/EtCapitalFlowMapper.xml b/electripper-system/src/main/resources/mapper/system/EtCapitalFlowMapper.xml new file mode 100644 index 0000000..820aaa0 --- /dev/null +++ b/electripper-system/src/main/resources/mapper/system/EtCapitalFlowMapper.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + select flow_id, area_id, order_no, out_trade_no, type, bus_type, amount, handling_charge, operator_dividend, operator_balance, partner_dividend, pay_type, create_time from et_capital_flow + + + + + + + + insert into et_capital_flow + + flow_id, + area_id, + order_no, + out_trade_no, + type, + bus_type, + amount, + handling_charge, + operator_dividend, + operator_balance, + partner_dividend, + pay_type, + create_time, + + + #{flowId}, + #{areaId}, + #{orderNo}, + #{outTradeNo}, + #{type}, + #{busType}, + #{amount}, + #{handlingCharge}, + #{operatorDividend}, + #{operatorBalance}, + #{partnerDividend}, + #{payType}, + #{createTime}, + + + + + update et_capital_flow + + area_id = #{areaId}, + order_no = #{orderNo}, + out_trade_no = #{outTradeNo}, + type = #{type}, + bus_type = #{busType}, + amount = #{amount}, + handling_charge = #{handlingCharge}, + operator_dividend = #{operatorDividend}, + operator_balance = #{operatorBalance}, + partner_dividend = #{partnerDividend}, + pay_type = #{payType}, + create_time = #{createTime}, + + where flow_id = #{flowId} + + + + delete from et_capital_flow where flow_id = #{flowId} + + + + delete from et_capital_flow where flow_id in + + #{flowId} + + + \ No newline at end of file