mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-02 13:07:57 +08:00
根据订单号查询订单分账记录
This commit is contained in:
@@ -1,25 +1,26 @@
|
|||||||
package com.jsowell.pile.mapper;
|
package com.jsowell.pile.mapper;
|
||||||
|
|
||||||
import com.jsowell.pile.domain.OrderSplitRecord;
|
import com.jsowell.pile.domain.OrderSplitRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
public interface OrderSplitRecordMapper {
|
public interface OrderSplitRecordMapper {
|
||||||
int deleteByPrimaryKey(Integer id);
|
// int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
int insertSelective(OrderSplitRecord record);
|
// int insertSelective(OrderSplitRecord record);
|
||||||
|
|
||||||
OrderSplitRecord selectByPrimaryKey(Integer id);
|
// OrderSplitRecord selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(OrderSplitRecord record);
|
// int updateByPrimaryKeySelective(OrderSplitRecord record);
|
||||||
|
|
||||||
int updateBatchSelective(List<OrderSplitRecord> list);
|
// int updateBatchSelective(List<OrderSplitRecord> list);
|
||||||
|
|
||||||
int batchInsert(@Param("list") List<OrderSplitRecord> list);
|
int batchInsert(@Param("list") List<OrderSplitRecord> list);
|
||||||
|
|
||||||
int insertOrUpdate(OrderSplitRecord record);
|
// int insertOrUpdate(OrderSplitRecord record);
|
||||||
|
|
||||||
int insertOrUpdateSelective(OrderSplitRecord record);
|
// int insertOrUpdateSelective(OrderSplitRecord record);
|
||||||
|
|
||||||
|
List<OrderSplitRecord> selectByOrderCode(String orderCode);
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@ import com.jsowell.adapay.dto.PaymentConfirmParam;
|
|||||||
import com.jsowell.adapay.dto.SplitData;
|
import com.jsowell.adapay.dto.SplitData;
|
||||||
import com.jsowell.pile.domain.OrderSplitRecord;
|
import com.jsowell.pile.domain.OrderSplitRecord;
|
||||||
import com.jsowell.pile.vo.OrderInfoDetailVO;
|
import com.jsowell.pile.vo.OrderInfoDetailVO;
|
||||||
|
import com.jsowell.pile.vo.OrderSplitRecordVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -29,5 +30,7 @@ public interface OrderSplitRecordService {
|
|||||||
* 保存订单分账记录
|
* 保存订单分账记录
|
||||||
*/
|
*/
|
||||||
void saveOrderSplitRecord(PaymentConfirmParam param, String id, List<SplitData> stationSplitConfigList, OrderInfoDetailVO orderInfoDetailVO);
|
void saveOrderSplitRecord(PaymentConfirmParam param, String id, List<SplitData> stationSplitConfigList, OrderInfoDetailVO orderInfoDetailVO);
|
||||||
|
|
||||||
|
List<OrderSplitRecordVO> selectByOrderCode(String orderCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import com.jsowell.pile.domain.OrderSplitRecord;
|
|||||||
import com.jsowell.pile.mapper.OrderSplitRecordMapper;
|
import com.jsowell.pile.mapper.OrderSplitRecordMapper;
|
||||||
import com.jsowell.pile.service.OrderSplitRecordService;
|
import com.jsowell.pile.service.OrderSplitRecordService;
|
||||||
import com.jsowell.pile.vo.OrderInfoDetailVO;
|
import com.jsowell.pile.vo.OrderInfoDetailVO;
|
||||||
|
import com.jsowell.pile.vo.OrderSplitRecordVO;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -96,5 +98,34 @@ public class OrderSplitRecordServiceImpl implements OrderSplitRecordService {
|
|||||||
}
|
}
|
||||||
this.batchInsert(list);
|
this.batchInsert(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OrderSplitRecordVO> selectByOrderCode(String orderCode) {
|
||||||
|
List<OrderSplitRecord> orderSplitRecords = orderSplitRecordMapper.selectByOrderCode(orderCode);
|
||||||
|
if (CollectionUtils.isEmpty(orderSplitRecords)) {
|
||||||
|
return Lists.newArrayList();
|
||||||
|
}
|
||||||
|
List<OrderSplitRecordVO> resultList = Lists.newArrayList();
|
||||||
|
for (OrderSplitRecord orderSplitRecord : orderSplitRecords) {
|
||||||
|
OrderSplitRecordVO orderSplitRecordVO = new OrderSplitRecordVO();
|
||||||
|
orderSplitRecordVO.setOrderCode(orderSplitRecord.getOrderCode());
|
||||||
|
orderSplitRecordVO.setStatus(orderSplitRecord.getStatus());
|
||||||
|
orderSplitRecordVO.setSettleAmount(orderSplitRecord.getSettleAmount());
|
||||||
|
orderSplitRecordVO.setElectricityAmount(orderSplitRecord.getElectricityAmount());
|
||||||
|
orderSplitRecordVO.setServiceAmount(orderSplitRecord.getServiceAmount());
|
||||||
|
orderSplitRecordVO.setTradeDate(orderSplitRecord.getTradeDate());
|
||||||
|
orderSplitRecordVO.setAdapayMemberId(orderSplitRecord.getAdapayMemberId());
|
||||||
|
// orderSplitRecordVO.setMerchantName(orderSplitRecord.getMerchantName());
|
||||||
|
orderSplitRecordVO.setPaymentId(orderSplitRecord.getPaymentId());
|
||||||
|
orderSplitRecordVO.setPaymentConfirmId(orderSplitRecord.getPaymentConfirmId());
|
||||||
|
orderSplitRecordVO.setElectricitySplitRatio(orderSplitRecord.getElectricitySplitRatio());
|
||||||
|
orderSplitRecordVO.setElectricitySplitAmount(orderSplitRecord.getElectricitySplitAmount());
|
||||||
|
orderSplitRecordVO.setServiceSplitRatio(orderSplitRecord.getServiceSplitRatio());
|
||||||
|
orderSplitRecordVO.setServiceSplitAmount(orderSplitRecord.getServiceSplitAmount());
|
||||||
|
orderSplitRecordVO.setRemark(orderSplitRecord.getRemark());
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package com.jsowell.pile.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OrderSplitRecordVO {
|
||||||
|
/**
|
||||||
|
* 订单编号
|
||||||
|
*/
|
||||||
|
private String orderCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分账状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单结算金额(总金额)
|
||||||
|
*/
|
||||||
|
private BigDecimal settleAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单电费金额
|
||||||
|
*/
|
||||||
|
private BigDecimal electricityAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单服务费金额
|
||||||
|
*/
|
||||||
|
private BigDecimal serviceAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交易日期 yyyy-MM-dd
|
||||||
|
*/
|
||||||
|
private String tradeDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 汇付用户id
|
||||||
|
*/
|
||||||
|
private String adapayMemberId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营商名称
|
||||||
|
*/
|
||||||
|
private String merchantName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付对象id
|
||||||
|
*/
|
||||||
|
private String paymentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付确认对象id
|
||||||
|
*/
|
||||||
|
private String paymentConfirmId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电费分成比例
|
||||||
|
*/
|
||||||
|
private BigDecimal electricitySplitRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电费分成金额
|
||||||
|
*/
|
||||||
|
private BigDecimal electricitySplitAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务费分成比例
|
||||||
|
*/
|
||||||
|
private BigDecimal serviceSplitRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务费分成金额
|
||||||
|
*/
|
||||||
|
private BigDecimal serviceSplitAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@@ -663,4 +663,11 @@
|
|||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="selectByOrderCode" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from order_split_record
|
||||||
|
where del_flag = '0'
|
||||||
|
and order_code = #{orderCode,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user