| | |
| | | import com.ruoyi.other.service.ShopService; |
| | | import com.ruoyi.other.service.ShopWithdrawService; |
| | | import com.ruoyi.other.util.BankCode; |
| | | import com.ruoyi.other.util.UUIDUtil; |
| | | import com.ruoyi.other.util.withdraw.HttpUtilWithdraw; |
| | | import com.ruoyi.other.util.pay.HttpRequester; |
| | | import com.ruoyi.other.util.pay.HttpRespons; |
| | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | } |
| | | |
| | | private void baseWithdrawalApplication(BigDecimal money, Long userId, Integer shopId) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | String code = sdf.format(new Date()) + UUIDUtil.getNumberRandom(5); |
| | | money=money.setScale(2, BigDecimal.ROUND_HALF_DOWN); |
| | | Shop shop = shopService.getById(shopId); |
| | | if (money.compareTo(BigDecimal.ZERO)==0){ |
| | |
| | | shopWithdraw.setShopName(shop.getName()); |
| | | shopWithdraw.setCreateUserId(userId); |
| | | shopWithdraw.setMoney(money); |
| | | shopWithdraw.setCode(code); |
| | | shopWithdraw.setAuditStatus(0);//待审核 |
| | | shopWithdraw.setStatus(1);//申请中 |
| | | shopWithdraw.setCreateTime(LocalDateTime.now()); |