From 5dacdee9b54c78372b68140e2b068d03a620eab9 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 02 七月 2025 19:00:52 +0800
Subject: [PATCH] 修改bug

---
 ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyWithdrawController.java |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyWithdrawController.java b/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyWithdrawController.java
index d381547..b7330b0 100644
--- a/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyWithdrawController.java
+++ b/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);

--
Gitblit v1.7.1