zouxuan пре 4 година
родитељ
комит
e89e3892d4

+ 15 - 15
mec-biz/src/main/java/com/ym/mec/biz/dal/page/GoodsQueryInfo.java

@@ -29,19 +29,19 @@ public class GoodsQueryInfo extends QueryInfo {
     private Integer groupGoods;
 
     @ApiModelProperty(value = "客户端展示分部")
-    private Integer studentShowOrganId;
+    private String studentShowOrganId;
 
     @ApiModelProperty(value = "教务端展示分部")
-    private Integer educationShowOrganId;
+    private String educationShowOrganId;
 
     @ApiModelProperty(value = "课程收费团展示分部")
-    private Integer courseFeeShowOrganId;
+    private String courseFeeShowOrganId;
 
     @ApiModelProperty(value = "会员收费团展示分部")
-    private Integer memberFeeShowOrganId;
+    private String memberFeeShowOrganId;
 
     @ApiModelProperty(value = "乐器置换展示分部")
-    private Integer replacementShowOrganId;
+    private String replacementShowOrganId;
 
     @ApiModelProperty(value = "分部")
     private String organId;
@@ -67,43 +67,43 @@ public class GoodsQueryInfo extends QueryInfo {
         this.organId = organId;
     }
 
-    public Integer getStudentShowOrganId() {
+    public String getStudentShowOrganId() {
         return studentShowOrganId;
     }
 
-    public void setStudentShowOrganId(Integer studentShowOrganId) {
+    public void setStudentShowOrganId(String studentShowOrganId) {
         this.studentShowOrganId = studentShowOrganId;
     }
 
-    public Integer getEducationShowOrganId() {
+    public String getEducationShowOrganId() {
         return educationShowOrganId;
     }
 
-    public void setEducationShowOrganId(Integer educationShowOrganId) {
+    public void setEducationShowOrganId(String educationShowOrganId) {
         this.educationShowOrganId = educationShowOrganId;
     }
 
-    public Integer getCourseFeeShowOrganId() {
+    public String getCourseFeeShowOrganId() {
         return courseFeeShowOrganId;
     }
 
-    public void setCourseFeeShowOrganId(Integer courseFeeShowOrganId) {
+    public void setCourseFeeShowOrganId(String courseFeeShowOrganId) {
         this.courseFeeShowOrganId = courseFeeShowOrganId;
     }
 
-    public Integer getMemberFeeShowOrganId() {
+    public String getMemberFeeShowOrganId() {
         return memberFeeShowOrganId;
     }
 
-    public void setMemberFeeShowOrganId(Integer memberFeeShowOrganId) {
+    public void setMemberFeeShowOrganId(String memberFeeShowOrganId) {
         this.memberFeeShowOrganId = memberFeeShowOrganId;
     }
 
-    public Integer getReplacementShowOrganId() {
+    public String getReplacementShowOrganId() {
         return replacementShowOrganId;
     }
 
-    public void setReplacementShowOrganId(Integer replacementShowOrganId) {
+    public void setReplacementShowOrganId(String replacementShowOrganId) {
         this.replacementShowOrganId = replacementShowOrganId;
     }
 

+ 10 - 10
mec-biz/src/main/resources/config/mybatis/GoodsMapper.xml

@@ -332,20 +332,20 @@
             <if test="groupGoods!=null and groupGoods==1">
                 AND g.complement_goods_id_list_ IS NOT NULL
             </if>
-            <if test="studentShowOrganId != null">
-                AND FIND_IN_SET(#{studentShowOrganId},g.student_show_organ_id_)
+            <if test="studentShowOrganId != null and studentShowOrganId!=''">
+                AND INTE_ARRAY(#{studentShowOrganId},g.student_show_organ_id_)
             </if>
-            <if test="educationShowOrganId != null">
-                AND FIND_IN_SET(#{educationShowOrganId},g.education_show_organ_id_)
+            <if test="educationShowOrganId != null and educationShowOrganId!=''">
+                AND INTE_ARRAY(#{educationShowOrganId},g.education_show_organ_id_)
             </if>
-            <if test="courseFeeShowOrganId != null">
-                AND FIND_IN_SET(#{courseFeeShowOrganId},g.course_fee_show_organ_id_)
+            <if test="courseFeeShowOrganId != null and courseFeeShowOrganId!=''">
+                AND INTE_ARRAY(#{courseFeeShowOrganId},g.course_fee_show_organ_id_)
             </if>
-            <if test="memberFeeShowOrganId!=null">
-                AND FIND_IN_SET(#{memberFeeShowOrganId},g.member_fee_show_organ_id_)
+            <if test="memberFeeShowOrganId!=null and memberFeeShowOrganId!=''">
+                AND INTE_ARRAY(#{memberFeeShowOrganId},g.member_fee_show_organ_id_)
             </if>
-            <if test="replacementShowOrganId!=null">
-                AND FIND_IN_SET(#{replacementShowOrganId},g.replacement_show_organ_id_)
+            <if test="replacementShowOrganId!=null and replacementShowOrganId!=''">
+                AND INTE_ARRAY(#{replacementShowOrganId},g.replacement_show_organ_id_)
             </if>
             <if test="noOrganSearch == null">
                 <if test="organId != null and organId != ''">

+ 1 - 1
mec-student/src/main/java/com/ym/mec/student/controller/GoodsController.java

@@ -51,7 +51,7 @@ public class GoodsController extends BaseController {
         if(sysUser == null){
             throw new BizException("请先登录");
         }
-        queryInfo.setStudentShowOrganId(sysUser.getOrganId());
+        queryInfo.setStudentShowOrganId(sysUser.getOrganId().toString());
         return succeed(goodsService.queryPage(queryInfo));
     }
 

+ 1 - 1
mec-student/src/main/java/com/ym/mec/student/controller/RepairController.java

@@ -137,7 +137,7 @@ public class RepairController extends BaseController {
         if(sysUser == null){
             throw new BizException("请先登录");
         }
-        queryInfo.setStudentShowOrganId(sysUser.getOrganId());
+        queryInfo.setStudentShowOrganId(sysUser.getOrganId().toString());
         return succeed(goodsService.queryPage(queryInfo));
     }
 

+ 0 - 17
mec-web/src/main/java/com/ym/mec/web/controller/GoodsController.java

@@ -131,23 +131,6 @@ public class GoodsController extends BaseController {
             queryInfo.setOrganId(employee.getOrganIdList());
         }else if(StringUtils.isEmpty(employee.getOrganIdList())){
             return failed("用户所在分部异常");
-        }else {
-            Set<Integer> list = Arrays.stream(employee.getOrganIdList().split(",")).map(s -> Integer.valueOf(s)).collect(Collectors.toSet());
-            if(queryInfo.getStudentShowOrganId() != null && !list.contains(queryInfo.getStudentShowOrganId())){
-                return failed("非法请求");
-            }
-            if(queryInfo.getEducationShowOrganId() != null && !list.contains(queryInfo.getEducationShowOrganId())){
-                return failed("非法请求");
-            }
-            if(queryInfo.getCourseFeeShowOrganId() != null && !list.contains(queryInfo.getCourseFeeShowOrganId())){
-                return failed("非法请求");
-            }
-            if(queryInfo.getMemberFeeShowOrganId() != null && !list.contains(queryInfo.getMemberFeeShowOrganId())){
-                return failed("非法请求");
-            }
-            if(queryInfo.getReplacementShowOrganId() != null && !list.contains(queryInfo.getReplacementShowOrganId())){
-                return failed("非法请求");
-            }
         }
         return succeed(goodsService.queryPage(queryInfo));
     }

+ 1 - 18
mec-web/src/main/java/com/ym/mec/web/controller/education/EduRepairController.java

@@ -198,26 +198,9 @@ public class EduRepairController extends BaseController {
                 queryInfo.getCourseFeeShowOrganId() == null &&
                 queryInfo.getMemberFeeShowOrganId() == null &&
                 queryInfo.getReplacementShowOrganId() == null) {
-            queryInfo.setOrganId(employee.getOrganIdList());
+            queryInfo.setEducationShowOrganId(employee.getOrganIdList());
         }else if(StringUtils.isEmpty(employee.getOrganIdList())){
             return failed("用户所在分部异常");
-        }else {
-            Set<Integer> list = Arrays.stream(employee.getOrganIdList().split(",")).map(s -> Integer.valueOf(s)).collect(Collectors.toSet());
-            if(queryInfo.getStudentShowOrganId() != null && !list.contains(queryInfo.getStudentShowOrganId())){
-                return failed("非法请求");
-            }
-            if(queryInfo.getEducationShowOrganId() != null && !list.contains(queryInfo.getEducationShowOrganId())){
-                return failed("非法请求");
-            }
-            if(queryInfo.getCourseFeeShowOrganId() != null && !list.contains(queryInfo.getCourseFeeShowOrganId())){
-                return failed("非法请求");
-            }
-            if(queryInfo.getMemberFeeShowOrganId() != null && !list.contains(queryInfo.getMemberFeeShowOrganId())){
-                return failed("非法请求");
-            }
-            if(queryInfo.getReplacementShowOrganId() != null && !list.contains(queryInfo.getReplacementShowOrganId())){
-                return failed("非法请求");
-            }
         }
         return succeed(goodsService.queryPage(queryInfo));
     }