权限区分超市、食堂

This commit is contained in:
dzc committed 2025-03-25 19:06:46 +08:00
1 parent ac75e72a49
commit 686ef7abca
12 files changed
+224 -105

No files matched your search

@@ -0,0 +1,40 @@
package com.bsd.pjcloud.hard.api.dto.hard;
import cn.hutool.core.util.ObjectUtil;
import com.bsd.pjcloud.hard.api.constant.HardTypeEnum;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
public class CurrentUserHardTypeInfoDto {
/**
* 是否有查询食堂权限
*/
private Boolean canteenView = false;
/**
* 是否有查询超市权限
*/
private Boolean supermarket = false;
public boolean isAll() {
return this.getCanteenView() != null && this.getCanteenView() && this.getSupermarket() != null && this.getSupermarket();
}
/**
* 硬件类型集合
*/
public List<String> getHardTypeList() {
List<String> list = new ArrayList<>();
if (isAll()) return list;
if (this.getCanteenView() != null && this.getCanteenView()) {
list.add(HardTypeEnum.CANTEEN.getType());
}
if (this.getSupermarket() != null && this.getSupermarket()) {
list.add(HardTypeEnum.SUPERMARKET.getType());
}
return list;
}
}
@@ -23,6 +23,8 @@ public class HardOrderDto extends HardOrderEntity implements BaseIsIncludeTreeIn
private List<Long> hardIds;
private List<String> hardTypeCodes;
private List<Long> mchIds;
private List<String> orderStatusCodes;