Browse Source

充值权限问题

qzyReal 2 years ago
parent
commit
58b97c3097

+ 1 - 1
sp-admin/sa-view/tb-account/tb-account-list.html

@@ -46,7 +46,7 @@
            <el-table-column label="操作" fixed="right" width="240px">
               <template slot-scope="s">
                   <el-button class="c-btn" type="success" icon="el-icon-view" 
-                             @click="add(s.row)">充值</el-button>
+                             @click="add(s.row)" v-if="sa.isAuth('tb-account-list-add')">充值</el-button>
                   <el-button class="c-btn" type="primary" icon="el-icon-edit" v-if="sa.isAuth('tb-account-list-update')"
                              @click="update(s.row)">修改</el-button>
               </template>

+ 2 - 3
sp-server/src/main/java/com/pj/api/open/service/OpenService.java

@@ -70,9 +70,7 @@ public class OpenService {
     @Resource
     @Lazy
     private TbBusinessCarService tbBusinessCarService;
-    @Resource
-    @Lazy
-    private TbBusinessItemService tbBusinessItemService;
+
     @Resource
     private TbCarService tbCarService;
 
@@ -84,6 +82,7 @@ public class OpenService {
     @Resource
     private TbGoodsService tbGoodsService;
     @Resource
+            @Lazy
     AutomaticPay automaticPay;
 
 

+ 4 - 0
sp-server/src/main/java/com/pj/project/tb_account/TbAccountController.java

@@ -70,6 +70,10 @@ public class TbAccountController {
     @RequestMapping("getList")
     public AjaxJson getList() {
         SoMap so = SoMap.getRequestSoMap();
+        String currentCustomerId = StpUserUtil.getCustomerId();
+        if (!currentCustomerId.equals(UserTypeEnum.PLATFORM_ADMIN.getCustomerId())) {
+            so.put("customerId", currentCustomerId);
+        }
         List<TbAccountBO> list = tbAccountService.getList(so.startPage());
         return AjaxJson.getPageData(so.getDataCount(), list);
     }