diff --git a/jsowell-admin/src/main/java/com/jsowell/service/OrderService.java b/jsowell-admin/src/main/java/com/jsowell/service/OrderService.java index 225905f33..38bb66f58 100644 --- a/jsowell-admin/src/main/java/com/jsowell/service/OrderService.java +++ b/jsowell-admin/src/main/java/com/jsowell/service/OrderService.java @@ -123,6 +123,9 @@ public class OrderService { @Autowired private IAdapayMemberAccountService adapayMemberAccountService; + @Autowired + private ClearingWithdrawInfoService clearingWithdrawInfoService; + /** * 生成订单 * @@ -949,6 +952,8 @@ public class OrderService { } else if (AdapayEventEnum.payment_reverse_succeeded.getValue().equals(type)) { // 支付撤销成功 + } else if (AdapayEventEnum.cash_succeeded.getValue().equals(type)) { + } } @@ -1066,4 +1071,16 @@ public class OrderService { adapayMemberAccountService.updateAdapayMemberAccountByMemberId(adapayMemberAccount); } + /** + * 取现成功 + */ + private void cashSucceeded(String data) { + JSONObject jsonObject = JSON.parseObject(data); + String withdrawCode = jsonObject.getString("id"); + // 通过取现id查询取现数据 + ClearingWithdrawInfo clearingWithdrawInfo = clearingWithdrawInfoService.selectByWithdrawCode(withdrawCode); + clearingWithdrawInfo.setWithdrawStatus(Constants.ONE); + clearingWithdrawInfoService.insertOrUpdate(clearingWithdrawInfo); + } + } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ClearingWithdrawInfoMapper.java b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ClearingWithdrawInfoMapper.java index 8a1090820..a035bf87f 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ClearingWithdrawInfoMapper.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ClearingWithdrawInfoMapper.java @@ -1,9 +1,10 @@ package com.jsowell.pile.mapper; import com.jsowell.pile.domain.ClearingWithdrawInfo; -import java.util.List; import org.apache.ibatis.annotations.Param; +import java.util.List; + public interface ClearingWithdrawInfoMapper { /** * delete by primary key @@ -54,4 +55,6 @@ public interface ClearingWithdrawInfoMapper { int updateBatch(List list); int batchInsert(@Param("list") List list); + + ClearingWithdrawInfo selectByWithdrawCode(String withdrawCode); } \ No newline at end of file diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/ClearingWithdrawInfoService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/ClearingWithdrawInfoService.java index 9e0e12b95..0dcfa0b8d 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/ClearingWithdrawInfoService.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/ClearingWithdrawInfoService.java @@ -1,7 +1,8 @@ package com.jsowell.pile.service; -import java.util.List; import com.jsowell.pile.domain.ClearingWithdrawInfo; + +import java.util.List; public interface ClearingWithdrawInfoService{ @@ -25,4 +26,5 @@ public interface ClearingWithdrawInfoService{ int batchInsert(List list); + ClearingWithdrawInfo selectByWithdrawCode(String withdrawCode); } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ClearingWithdrawInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ClearingWithdrawInfoServiceImpl.java index 17af2c2d8..1bb5a6a79 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ClearingWithdrawInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ClearingWithdrawInfoServiceImpl.java @@ -1,11 +1,12 @@ package com.jsowell.pile.service.impl; -import org.springframework.stereotype.Service; -import javax.annotation.Resource; -import com.jsowell.pile.mapper.ClearingWithdrawInfoMapper; -import java.util.List; import com.jsowell.pile.domain.ClearingWithdrawInfo; +import com.jsowell.pile.mapper.ClearingWithdrawInfoMapper; import com.jsowell.pile.service.ClearingWithdrawInfoService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; @Service public class ClearingWithdrawInfoServiceImpl implements ClearingWithdrawInfoService{ @@ -62,4 +63,9 @@ public class ClearingWithdrawInfoServiceImpl implements ClearingWithdrawInfoServ return clearingWithdrawInfoMapper.batchInsert(list); } + @Override + public ClearingWithdrawInfo selectByWithdrawCode(String withdrawCode) { + return clearingWithdrawInfoMapper.selectByWithdrawCode(withdrawCode); + } + } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java index 527842e72..2f8b47914 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java @@ -983,6 +983,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService { clearingBillInfo.setActualClearingAmount(actualClearingAmount); clearingBillInfo.setCreateTime(DateUtils.getNowDate()); clearingBillInfo.setDelFlag(DelFlagEnum.NORMAL.getValue()); + clearingBillInfo.setBillStatus("2"); // 保存清分账单 ClearingBillTransactionDTO dto = new ClearingBillTransactionDTO(); diff --git a/jsowell-pile/src/main/resources/mapper/pile/ClearingWithdrawInfoMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/ClearingWithdrawInfoMapper.xml index 15677455a..727853baf 100644 --- a/jsowell-pile/src/main/resources/mapper/pile/ClearingWithdrawInfoMapper.xml +++ b/jsowell-pile/src/main/resources/mapper/pile/ClearingWithdrawInfoMapper.xml @@ -230,13 +230,12 @@ insert into clearing_withdraw_info - (id, withdraw_code, withdraw_status, application_time, arrival_time, create_by, create_time, - update_by, update_time, del_flag) + (id, withdraw_code, withdraw_status, application_time, arrival_time, create_by, + update_by, del_flag) values (#{id,jdbcType=INTEGER}, #{withdrawCode,jdbcType=VARCHAR}, #{withdrawStatus,jdbcType=VARCHAR}, #{applicationTime,jdbcType=TIMESTAMP}, #{arrivalTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, - #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, - #{delFlag,jdbcType=VARCHAR}) + #{updateBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR}) on duplicate key update id = #{id,jdbcType=INTEGER}, withdraw_code = #{withdrawCode,jdbcType=VARCHAR}, @@ -244,9 +243,7 @@ application_time = #{applicationTime,jdbcType=TIMESTAMP}, arrival_time = #{arrivalTime,jdbcType=TIMESTAMP}, create_by = #{createBy,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=TIMESTAMP}, - update_by = #{updateBy,jdbcType=VARCHAR}, - update_time = #{updateTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, del_flag = #{delFlag,jdbcType=VARCHAR} @@ -351,4 +348,12 @@ + + \ No newline at end of file