Pu Zhibing
2 天以前 5dacdee9b54c78372b68140e2b068d03a620eab9
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyWithdrawController.java
@@ -4,7 +4,6 @@
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;
@@ -36,24 +35,26 @@
@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";
@@ -85,7 +86,7 @@
    @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;
@@ -114,13 +115,13 @@
    @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);