|
@@ -124,7 +124,6 @@ public class GoodsController extends BaseController {
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
if (queryInfo.getStudentShowOrganId() == null &&
|
|
if (queryInfo.getStudentShowOrganId() == null &&
|
|
queryInfo.getEducationShowOrganId() == null &&
|
|
queryInfo.getEducationShowOrganId() == null &&
|
|
- queryInfo.getMusicShowOrganId() == null &&
|
|
|
|
queryInfo.getCourseFeeShowOrganId() == null &&
|
|
queryInfo.getCourseFeeShowOrganId() == null &&
|
|
queryInfo.getMemberFeeShowOrganId() == null &&
|
|
queryInfo.getMemberFeeShowOrganId() == null &&
|
|
queryInfo.getReplacementShowOrganId() == null) {
|
|
queryInfo.getReplacementShowOrganId() == null) {
|
|
@@ -133,26 +132,23 @@ public class GoodsController extends BaseController {
|
|
return failed("用户所在分部异常");
|
|
return failed("用户所在分部异常");
|
|
}else {
|
|
}else {
|
|
Set<Integer> list = Arrays.stream(employee.getOrganIdList().split(",")).map(s -> Integer.valueOf(s)).collect(Collectors.toSet());
|
|
Set<Integer> list = Arrays.stream(employee.getOrganIdList().split(",")).map(s -> Integer.valueOf(s)).collect(Collectors.toSet());
|
|
- if(!list.contains(queryInfo.getStudentShowOrganId())){
|
|
|
|
|
|
+ if(queryInfo.getStudentShowOrganId() != null && !list.contains(queryInfo.getStudentShowOrganId())){
|
|
return failed("非法请求");
|
|
return failed("非法请求");
|
|
}
|
|
}
|
|
- if(!list.contains(queryInfo.getEducationShowOrganId())){
|
|
|
|
|
|
+ if(queryInfo.getEducationShowOrganId() != null && !list.contains(queryInfo.getEducationShowOrganId())){
|
|
return failed("非法请求");
|
|
return failed("非法请求");
|
|
}
|
|
}
|
|
- if(!list.contains(queryInfo.getMusicShowOrganId())){
|
|
|
|
|
|
+ if(queryInfo.getCourseFeeShowOrganId() != null && !list.contains(queryInfo.getCourseFeeShowOrganId())){
|
|
return failed("非法请求");
|
|
return failed("非法请求");
|
|
}
|
|
}
|
|
- if(!list.contains(queryInfo.getCourseFeeShowOrganId())){
|
|
|
|
|
|
+ if(queryInfo.getMemberFeeShowOrganId() != null && !list.contains(queryInfo.getMemberFeeShowOrganId())){
|
|
return failed("非法请求");
|
|
return failed("非法请求");
|
|
}
|
|
}
|
|
- if(!list.contains(queryInfo.getMemberFeeShowOrganId())){
|
|
|
|
- return failed("非法请求");
|
|
|
|
- }
|
|
|
|
- if(!list.contains(queryInfo.getReplacementShowOrganId())){
|
|
|
|
|
|
+ if(queryInfo.getReplacementShowOrganId() != null && !list.contains(queryInfo.getReplacementShowOrganId())){
|
|
return failed("非法请求");
|
|
return failed("非法请求");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- return succeed(goodsService.queryGoodsPage(queryInfo));
|
|
|
|
|
|
+ return succeed(goodsService.queryPage(queryInfo));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "通过科目编号、商品分类 查询商品(教材、辅件)列表")
|
|
@ApiOperation(value = "通过科目编号、商品分类 查询商品(教材、辅件)列表")
|
|
@@ -162,9 +158,6 @@ public class GoodsController extends BaseController {
|
|
@ApiImplicitParam(name = "organId", value = "分部编号", required = true, dataType = "Integer"),
|
|
@ApiImplicitParam(name = "organId", value = "分部编号", required = true, dataType = "Integer"),
|
|
@ApiImplicitParam(name = "type", value = "INSTRUMENT 乐器, ACCESSORIES 教辅", required = true, dataType = "String")})
|
|
@ApiImplicitParam(name = "type", value = "INSTRUMENT 乐器, ACCESSORIES 教辅", required = true, dataType = "String")})
|
|
public Object findGoodsBySubId(Integer subjectId,String type,Integer organId){
|
|
public Object findGoodsBySubId(Integer subjectId,String type,Integer organId){
|
|
- if(organId == null){
|
|
|
|
- throw new BizException("请选择用户分部");
|
|
|
|
- }
|
|
|
|
return succeed(goodsService.findGoodsBySubId(subjectId,type,organId));
|
|
return succeed(goodsService.findGoodsBySubId(subjectId,type,organId));
|
|
}
|
|
}
|
|
}
|
|
}
|