Authored by Lixiaodi

bug修改

... ... @@ -25,7 +25,7 @@ public interface EntrySellerRechargeOrderMapper {
//根据用户uid ,获取流水(分页)
List<EntrySellerRechargeOrder> selectWithPageByUid(@Param("uid") Integer uid, @Param("start") Integer start, @Param("limit") Integer limit);
void updateByOrderCode(EntrySellerRechargeOrder order);
int updateByOrderCode(EntrySellerRechargeOrder order);
int updateReturnDepositByOrderCode(@Param("orderCode") long orderCode, @Param("amount") BigDecimal amount, @Param("status") Integer status, @Param("updateTime") Integer updateTime);
... ...
... ... @@ -21,5 +21,5 @@ public interface SellerWalletDetailMapper {
int selectUserDetailCount(@Param("uid") Integer uid);
List<SellerWalletDetail> selectUserDetailCount(@Param("uid") Integer uid, @Param("start") Integer start, @Param("count") Integer count);
List<SellerWalletDetail> selectUserDetail(@Param("uid") Integer uid, @Param("start") Integer start, @Param("count") Integer count);
}
\ No newline at end of file
... ...
... ... @@ -149,7 +149,7 @@
payment = #{payment,jdbcType=INTEGER},
</if>
update_time = #{updateTime,jdbcType=INTEGER}
where order_code = #{orderCode,jdbcType=BIGINT}
where order_code = #{orderCode,jdbcType=BIGINT} and status = 0
</update>
<update id="updateReturnDepositByOrderCode">
... ...
... ... @@ -181,13 +181,13 @@
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectUserDetailCount" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectUserDetailCount" resultType="java.lang.Integer" >
select
count(*)
from seller_wallet_detail
where uid = #{uid,jdbcType=INTEGER} and is_batch = 0 and type in (1,31,32,33,61)
</select>
<select id="selectUserDetail" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<select id="selectUserDetail" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List" />
from seller_wallet_detail
... ...
... ... @@ -82,7 +82,9 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
order.setStatus(OrderStatus.HAS_PAYED.getCode());
order.setUpdateTime(DateUtil.getCurrentTimeSecond());
// order.setPayment(orderInfo.getPayment());
entrySellerRechargeOrderMapper.updateByOrderCode(order);
if (entrySellerRechargeOrderMapper.updateByOrderCode(order) == 0) {
throw new ServiceException(400, "充值订单已经处理过:" + orderInfo.getOrderCode());
}
orderInfo.setStatus(OrderStatus.HAS_PAYED.getCode());
}
... ... @@ -346,7 +348,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
pageResp.setData(new ArrayList<>());
return new com.yohoufo.common.ApiResponse(200, "查询成功", pageResp);
} else {
List<SellerWalletDetail> resultList = sellerWalletDetailMapper.selectUserDetailCount(uid,
List<SellerWalletDetail> resultList = sellerWalletDetailMapper.selectUserDetail(uid,
(page - 1) * limit, count);
List<JSONObject> array = new ArrayList<>();
pageResp.setData(array);
... ...
... ... @@ -404,6 +404,7 @@ public class PaymentServiceImpl implements IPaymentService {
payRefundBo.setOrderTotalFee(ordersPay.getAmount().doubleValue());
payRefundBo.setRefundOrderCode(String.valueOf(ordersPay.getOrderCode()) + ordersPay.getId());
payRefundBo.setUid(ordersPay.getUid());
payRefundBo.setRefundType(request.getRefundType());
return payRefundBo;
}
... ...