| | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.TCompanyWithdraw; |
| | | import com.stylefeng.guns.modular.system.model.TEnterpriseWithdrawal; |
| | |
| | | @Controller |
| | | @RequestMapping("/tCompanyWithdraw") |
| | | public class TCompanyWithdrawController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/tCompanyWithdraw/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ITCompanyWithdrawService tCompanyWithdrawService; |
| | | |
| | | |
| | | @Resource |
| | | private ITEnterpriseWithdrawalService enterpriseWithdrawalService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | Integer id = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer id = shiroExtUtil.getUser().getObjectId(); |
| | | List<TEnterpriseWithdrawal> companyId = enterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", id)); |
| | | if(companyId.size()>0){ |
| | | }else { |
| | | if (companyId.size() > 0) { |
| | | } else { |
| | | model.addAttribute("money",0); |
| | | } |
| | | return PREFIX + "tCompanyWithdraw.html"; |
| | |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,Integer state) { |
| | | Integer id = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer id = shiroExtUtil.getUser().getObjectId(); |
| | | EntityWrapper<TCompanyWithdraw> withdrawEntityWrapper = new EntityWrapper<>(); |
| | | String sTime=null; |
| | | String eTime=null; |
| | |
| | | @ResponseBody |
| | | @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW) |
| | | public Object add(Double money,String type,String remark) { |
| | | List<TEnterpriseWithdrawal> companyId = enterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | List<TEnterpriseWithdrawal> companyId = enterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", shiroExtUtil.getUser().getObjectId())); |
| | | if (companyId.size() > 0) { |
| | | } |
| | | TCompanyWithdraw tCompanyWithdraw = new TCompanyWithdraw(); |
| | | tCompanyWithdraw.setWithdrawMoney(new BigDecimal(money)); |
| | | tCompanyWithdraw.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | tCompanyWithdraw.setCreateId(ShiroExtUtil.getUser().getId()); |
| | | tCompanyWithdraw.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | tCompanyWithdraw.setCreateId(shiroExtUtil.getUser().getId()); |
| | | tCompanyWithdraw.setCreateTime(new Date()); |
| | | if ("提现".equals(type)) { |
| | | tCompanyWithdraw.setType(1); |