| | |
| | | |
| | | import com.yeshi.fanli.dto.WXMPAcceptData; |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import com.yeshi.fanli.entity.SystemFunction; |
| | | import com.yeshi.fanli.entity.accept.AcceptData; |
| | | |
| | | public class SystemInfoUtil { |
| | |
| | | return getSystem(acceptData.getPlatform(), acceptData.getPackages()); |
| | | } |
| | | |
| | | public static SystemEnum getSystemByWXCXCAppId(String appId) { |
| | | public static SystemEnum getSystemByWXCXCAppId(String appId) { |
| | | if (appId == null) |
| | | return null; |
| | | for (SystemEnum s : SystemEnum.values()) { |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 是否包含系统功能 |
| | | * |
| | | * @param system |
| | | * @param fs |
| | | * @return |
| | | */ |
| | | public static boolean hasFunctions(SystemEnum system, SystemFunction... fs) { |
| | | for (SystemFunction f : fs) { |
| | | if (!system.getFunctionSet().contains(f)) |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | } |