| | |
| | | import com.huifu.bspay.sdk.opps.core.utils.RsaUtils; |
| | | import com.stylefeng.guns.modular.huifu.properties.HuiFuProperties; |
| | | import com.stylefeng.guns.modular.system.model.TCompanyWithdraw; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.stylefeng.guns.modular.system.model.TEnterpriseWithdrawal; |
| | | import com.stylefeng.guns.modular.system.model.TOrderCrossCity; |
| | | import com.stylefeng.guns.modular.system.model.TOrderLogistics; |
| | | import com.stylefeng.guns.modular.system.model.TPubWithdrawal; |
| | | import com.stylefeng.guns.modular.system.model.TUser; |
| | | import com.stylefeng.guns.modular.system.service.ITCompanyWithdrawService; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverService; |
| | | import com.stylefeng.guns.modular.system.service.ITEnterpriseWithdrawalService; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderCrossCityService; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderLogisticsService; |
| | | import com.stylefeng.guns.modular.system.service.ITPubWithdrawalService; |
| | | import com.stylefeng.guns.modular.system.service.ITUserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.PrintWriter; |
| | | import java.math.BigDecimal; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private ITOrderLogisticsService orderLogisticsService; |
| | | |
| | | @Autowired |
| | | private ITUserService userService; |
| | | |
| | | @Autowired |
| | | private ITDriverService driverService; |
| | | |
| | | /** |
| | | * 斗拱主动取现接口企业回调 |
| | |
| | | pubWithdrawal.setState(2); |
| | | } else if ("F".equalsIgnoreCase(transStat)) { |
| | | pubWithdrawal.setState(3); |
| | | if (pubWithdrawal.getUserType() == 1) { |
| | | TUser tUser = userService.selectById(pubWithdrawal.getUserId()); |
| | | tUser.setBalance(tUser.getBalance().add(pubWithdrawal.getMoney())); |
| | | userService.updateById(tUser); |
| | | } else { |
| | | TDriver driver = driverService.selectById(pubWithdrawal.getUserId()); |
| | | driver.setLaveBusinessMoney(new BigDecimal(driver.getLaveBusinessMoney()).add(pubWithdrawal.getMoney()).doubleValue()); |
| | | driverService.updateById(driver); |
| | | } |
| | | } |
| | | pubWithdrawalService.updateById(pubWithdrawal); |
| | | log.info("更新用户/司机提现记录成功,更新内容“{}", JSONObject.toJSON(pubWithdrawal)); |