Browse Source

修改集团权限接口。营销管理

zangguocen 4 năm trước cách đây
mục cha
commit
acb1a37746

+ 2 - 2
yijia-admin/src/main/java/com/yijia/web/controller/system/SysDeptController.java

@@ -95,10 +95,10 @@ public class SysDeptController extends BaseController
         LoginUser currentUser = SecurityUtils.getLoginUser();
         SysDept  sysDept=deptService.selectDeptById(currentUser.getUser().getDeptId());
         if(sysDept.getJiBie()!=null && sysDept.getJiBie()==1){
-            dept.setDeptId(currentUser.getUser().getDeptId());
+            dept.setDeptId(sysDept.getDeptId());
             sysDepts=deptService.getGroupInfo(dept);
         }else if(sysDept.getJiBie()!=null && sysDept.getJiBie()==2){
-            dept.setParentId(currentUser.getUser().getDeptId());
+            dept.setDeptId(sysDept.getParentId());
             sysDepts=deptService.getGroupInfo(dept);
         }else{
             sysDepts=new SysDept();

+ 3 - 3
yijia-market/src/main/resources/mapper/market/MarkertPlanMapper.xml

@@ -24,9 +24,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectMarkertPlanVo">
-        select id, grade, discount_term, discount_amt, gasoil_discount_amt, dieseloil_discount_amt, vip_discounty_plus, coupon_plus, discount_plan_type,
-         oil_name, station_id, station_name, status,create_by,create_time,update_by,update_time
-          from markert_plan
+       select p.id, p.grade, p.discount_term, p.discount_amt, p.gasoil_discount_amt, p.vip_discounty_plus, p.coupon_plus, p.discount_plan_type,
+         p.oil_name, p.station_id,d.dept_name as station_name, p.status,p.create_by,p.create_time,p.update_by,p.update_time
+          from markert_plan p join sys_dept d on p.station_id = d.dept_id
     </sql>
 
     <select id="selectMarkertPlanList" parameterType="MarkertPlan" resultMap="MarkertPlanResult">

+ 2 - 2
yijia-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -149,9 +149,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		where dept_name=#{deptName} and parent_id = #{parentId} limit 1
 	</select>
     <!--调用存储过程-->
-	<select id="selectDeptListTree" statementType="CALLABLE" useCache="false">
+<!--	<select id="selectDeptListTree" statementType="CALLABLE" useCache="false">
 		{call deptinfo()};
-	</select>
+	</select>-->
 	<select id="getGroupInfo" resultMap="SysDeptResult">
 		<include refid="selectDeptVo"/>
 		<where>