| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | |
| | | @Slf4j |
| | | @RequestMapping("/tPubWithdrawal") |
| | | public class TPubWithdrawalController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tPubWithdrawal/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITPubWithdrawalService tPubWithdrawalService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService tSystemNoticeService; |
| | | @Resource |
| | | private IUserWithdrawalService userWithdrawalService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到提现列表首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | model.addAttribute("id", ShiroExtUtil.getUser().getObjectId()); |
| | | model.addAttribute("id", shiroExtUtil.getUser().getObjectId()); |
| | | return PREFIX + "tPubWithdrawal.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到查看详情 |
| | | */ |
| | |
| | | tPubWithdrawal.setHandleTime(new Date()); |
| | | if (SinataUtil.isNotEmpty(tPubWithdrawal)){ |
| | | // tPubWithdrawal.setState(state); //调用接口修改状态 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | Integer stateObj = 1; |
| | | if (2 == state){ //同意提现 |
| | | if (2 == state) { //同意提现 |
| | | stateObj = 1; |
| | | }else if (3 == state){ //拒绝提现 |
| | | } else if (3 == state) { //拒绝提现 |
| | | stateObj = 2; |
| | | } |
| | | |
| | | Integer objectId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer objectId = shiroExtUtil.getUser().getObjectId(); |
| | | // 获取手续费 |
| | | Double poundage = tPubWithdrawalService.getPoundage(objectId); |
| | | if(poundage!=null && poundage>0){ |
| | | if (poundage != null && poundage > 0) { |
| | | BigDecimal money = tPubWithdrawal.getMoney(); |
| | | if(money.doubleValue()>=1){ |
| | | if (money.doubleValue() >= 1) { |
| | | BigDecimal divide = new BigDecimal(poundage).divide(new BigDecimal(100)); |
| | | tPubWithdrawal.setMoney(money.subtract(money.multiply(divide))); |
| | | } |