| | |
| | | import com.stylefeng.guns.core.util.JwtTokenUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.account.controller.AppOrderController; |
| | | import com.stylefeng.guns.modular.account.dao.UserWithdrawalMapper; |
| | | import com.stylefeng.guns.modular.account.server.UserWithdrawalService; |
| | | import com.stylefeng.guns.modular.huifu.biz.DouGongPayUtil; |
| | | import com.stylefeng.guns.modular.system.dao.*; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | |
| | | private boolean pushMinistryOfTransport; |
| | | |
| | | private String salt = "&a.s"; |
| | | @Autowired |
| | | private UserWithdrawalService userWithdrawalService; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public void payCancelUserBalance(Integer id, String order_id, Integer paymentRecordId, Integer type) throws Exception { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd"); |
| | | UserInfo userInfo = this.selectById(id); |
| | | System.out.println("用户信息"+userInfo); |
| | | PaymentRecord query = paymentRecordService.selectById(paymentRecordId); |
| | |
| | | paymentRecordService.updateById(query); |
| | | |
| | | this.addCoupon(userInfo.getId(), query.getAmount(), userInfo.getCompanyId(), query.getId());//添加优惠券 |
| | | String date = simpleDateFormat.format(new Date()); |
| | | |
| | | |
| | | UserWithdrawal userWithdrawal1 = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>() |
| | | .eq("phone", userInfo.getPhone()).eq("type", 1) |
| | | .last("LIMIT 1")); |
| | | if(userWithdrawal1.getHuifuId()!=null){ |
| | | DouGongPayUtil.payFromUser(order_id,date, query.getAmount().toString(), userWithdrawal1.getHuifuId()); |
| | | } |
| | | |
| | | } else { |
| | | System.err.println("预支付数据异常(userId = " + id + ")"); |