菜品缺少eduId字段优化,送货子单权限,学校权限,教育局权限bug优化
This commit is contained in:
@@ -48,7 +48,7 @@ public class EduController extends BaseController {
|
||||
public AjaxResult add(@RequestBody @Validated(AddGroup.class) EduVO eduVO){
|
||||
SysUser user = getLoginUser().getUser();
|
||||
if(!user.isAdmin()){
|
||||
return error("非管理员账号无法添加供货商");
|
||||
return error("非管理员账号无法添加教育局");
|
||||
}
|
||||
return eduService.saveVO(eduVO);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public class SupplierController extends BaseController {
|
||||
SysUser user = getLoginUser().getUser();
|
||||
if(!user.isAdmin()){
|
||||
Integer accountType =getLoginUser().getUser().getAccountType();
|
||||
if(!WxAPPAccountConstants.EDU.equals(accountType)){
|
||||
if(!WxAPPAccountConstants.SUPPLIER.equals(accountType)){
|
||||
return error("非供货商账号无法修改供货商信息");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.zf.foodpurchase.fdsafe.web.school;
|
||||
|
||||
|
||||
import com.zf.foodpurchase.common.constant.WxAPPAccountConstants;
|
||||
import com.zf.foodpurchase.common.core.controller.BaseController;
|
||||
import com.zf.foodpurchase.common.core.domain.AjaxResult;
|
||||
import com.zf.foodpurchase.common.core.domain.entity.SysUser;
|
||||
import com.zf.foodpurchase.common.core.page.TableDataInfo;
|
||||
import com.zf.foodpurchase.common.exception.ServiceException;
|
||||
import com.zf.foodpurchase.common.valigroud.AddGroup;
|
||||
import com.zf.foodpurchase.common.valigroud.UpdateGroup;
|
||||
import com.zf.foodpurchase.fdsafe.service.ISchoolCartItemService;
|
||||
@@ -12,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -33,6 +37,17 @@ public class SchoolCartItemController extends BaseController {
|
||||
startPage();
|
||||
// 填充学校id,教育局id等数据
|
||||
dealCommonVO(schoolCartItemVO);
|
||||
//
|
||||
SysUser user = getLoginUser().getUser();
|
||||
if(!user.isAdmin()){
|
||||
Integer accountType =getLoginUser().getUser().getAccountType();
|
||||
if(!WxAPPAccountConstants.SCHOOL.equals(accountType)){
|
||||
// throw new ServiceException("非学校账号无法查询购物车信息");
|
||||
// 返回空的数据
|
||||
List<SchoolCartItemVO> list = new ArrayList<>();
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
List<SchoolCartItemVO> list = schoolCartItemService.querySchoolCartItemVO(schoolCartItemVO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@ public class SupplierDeliveryItemController extends BaseController {
|
||||
@GetMapping("/pageList")
|
||||
public TableDataInfo pageList(SupplierDeliveryItemVO supplierDeliveryItemVO) {
|
||||
startPage();
|
||||
// 填充学校id,教育局id等数据
|
||||
dealCommonVO(supplierDeliveryItemVO);
|
||||
List<SupplierDeliveryItemVO> list = supplierDeliveryItemService.querySupplierDeliveryItemVO(supplierDeliveryItemVO);
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
list.forEach(item -> {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<select id="queryDishVO" resultType="com.zf.foodpurchase.fdsafe.vo.DishVO"
|
||||
parameterType="com.zf.foodpurchase.fdsafe.vo.DishVO">
|
||||
select <include refid="Base_Column_List"/>,
|
||||
s.school_name
|
||||
s.school_name,ed.edu_id
|
||||
from dish dh left join school s on dh.school_id = s.school_id
|
||||
left join edu ed on ed.edu_id = s.edu_id
|
||||
<where>
|
||||
|
||||
Reference in New Issue
Block a user