package com.bonus.core.allocation.canteen.service.impl;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.text.CharSequenceUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bonus.core.allocation.canteen.mapper.AllocAreaMapper;
import com.bonus.core.allocation.canteen.model.AllocArea;
import com.bonus.core.allocation.canteen.service.AllocAreaService;
import com.bonus.core.allocation.canteen.vo.AllocAreaFullNameVO;
import com.bonus.core.allocation.canteen.vo.AllocAreaTreeVO;
import com.bonus.core.common.utils.TreeNodeUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

@Service
public class AllocAreaServiceImpl extends ServiceImpl<AllocAreaMapper, AllocArea> implements AllocAreaService {
   private static final Logger log = LoggerFactory.getLogger(AllocAreaServiceImpl.class);
//   @Resource
//   private AesEncryptUtil aesEncryptUtil;
//
//   public Page<AllocAreaVO> pageArea(AllocAreaParam param) {
//      List<Long> areaIdList = new ArrayList();
//      if (ObjectUtil.isNotNull(param.getAreaId())) {
//         areaIdList = this.getAllChildrenId(param.getAreaId());
//      }
//
//      param.setAreaIdList((List)areaIdList);
//      param.setAreaName(LeBeanUtil.fieldLikeHandle(param.getAreaName()));
//      param.setIfDel(LeConstants.COMMON_NO);
//      Page<AllocArea> page = new Page(param.getCurrent(), param.getSize());
//      page = ((AllocAreaMapper)this.baseMapper).pageArea(page, param);
//      if (CollUtil.isEmpty(page.getRecords())) {
//         return new Page(param.getCurrent(), param.getSize());
//      } else {
//         String merchantName = ((AllocAreaMapper)this.baseMapper).getMerchantName();
//         List<AllocAreaVO> areaVOList = new ArrayList();
//         Iterator var6 = page.getRecords().iterator();
//
//         while(var6.hasNext()) {
//            AllocArea allocArea = (AllocArea)var6.next();
//            AllocAreaVO areaVO = new AllocAreaVO();
//            BeanUtils.copyProperties(allocArea, areaVO);
//            boolean firstFlag = CharSequenceUtil.isNotBlank(allocArea.getFirstAreaName());
//            boolean secondFlag = CharSequenceUtil.isNotBlank(allocArea.getSecondAreaName());
//            boolean thirdFlag = CharSequenceUtil.isNotBlank(allocArea.getThirdAreaName());
//            if (firstFlag && !secondFlag && !thirdFlag) {
//               areaVO.setSuperAreaName(merchantName);
//            } else if (firstFlag && secondFlag && !thirdFlag) {
//               areaVO.setSuperAreaName(allocArea.getFirstAreaName());
//            } else if (firstFlag && secondFlag) {
//               String var10001 = allocArea.getFirstAreaName();
//               areaVO.setSuperAreaName(var10001 + " > " + allocArea.getSecondAreaName());
//            }
//
//            areaVOList.add(areaVO);
//            allocArea.setContactTel(this.aesEncryptUtil.aesEncrypt(allocArea.getContactTel()));
//         }
//
//         Page<AllocAreaVO> resultPage = new Page(page.getCurrent(), page.getSize(), page.getTotal());
//         resultPage.setRecords(areaVOList);
//         return resultPage;
//      }
//   }
//
//   public String getLatestFirstAreaNum() {
//      String areaNum = ((AllocAreaMapper)this.baseMapper).getLatestFirstAreaNum();
//      return LeNumUtil.getCanteenNum("", areaNum, false);
//   }
//
//   public String getLatestAreaNum(Long superId) {
//      String superNum = ((AllocAreaMapper)this.baseMapper).getAreaNumById(superId);
//      String areaNum = ((AllocAreaMapper)this.baseMapper).getLatestAreaNum(superId);
//      return LeNumUtil.getCanteenNum(superNum, areaNum, false);
//   }
//
//   public String getAreaName(Long areaId) {
//      if (ObjectUtil.isNull(areaId)) {
//         return null;
//      } else {
//         AllocArea area = (AllocArea)this.getOne((Wrapper)Wrappers.lambdaQuery(AllocArea.class).select(new SFunction[]{AllocArea::getFirstAreaName, AllocArea::getSecondAreaName}).eq(AllocArea::getAreaId, areaId));
//         if (CharSequenceUtil.isNotBlank(area.getSecondAreaName())) {
//            String var10000 = area.getFirstAreaName();
//            return var10000 + " > " + area.getSecondAreaName();
//         } else {
//            return area.getFirstAreaName();
//         }
//      }
//   }

   public List<AllocAreaFullNameVO> listAreaFullName(List<Long> areaIdList) {
      if (CollUtil.isEmpty(areaIdList)) {
         return new ArrayList();
      } else {
         List<AllocArea> areaList = this.list(Wrappers.lambdaQuery(AllocArea.class).in(AllocArea::getAreaId, areaIdList));
         List<AllocAreaFullNameVO> areaVOList = new ArrayList();
         Iterator var4 = areaList.iterator();

         while(var4.hasNext()) {
            AllocArea allocArea = (AllocArea)var4.next();
            AllocAreaFullNameVO areaVO = new AllocAreaFullNameVO();
            areaVO.setAreaId(allocArea.getAreaId());
            areaVO.setAreaName(allocArea.getAreaName());
            boolean firstFlag = CharSequenceUtil.isNotBlank(allocArea.getFirstAreaName());
            boolean secondFlag = CharSequenceUtil.isNotBlank(allocArea.getSecondAreaName());
            boolean thirdFlag = CharSequenceUtil.isNotBlank(allocArea.getThirdAreaName());
            String fullAreaName = "";
            if (firstFlag && !secondFlag && !thirdFlag) {
               fullAreaName = allocArea.getFirstAreaName();
            } else {
               String var10000;
               if (firstFlag && secondFlag && !thirdFlag) {
                  var10000 = allocArea.getFirstAreaName();
                  fullAreaName = var10000 + " > " + allocArea.getSecondAreaName();
               } else if (firstFlag && secondFlag && thirdFlag) {
                  var10000 = allocArea.getFirstAreaName();
                  fullAreaName = var10000 + " > " + allocArea.getSecondAreaName() + " > " + allocArea.getThirdAreaName();
               }
            }

            areaVO.setFullAreaName(fullAreaName);
            areaVOList.add(areaVO);
         }

         return areaVOList;
      }
   }

   @Override
   public List<Long> getAllChildrenId(Long areaId) {
      List<AllocAreaTreeVO> areaList = ((AllocAreaMapper)this.baseMapper).listAllTreeArea();
      List<AllocAreaTreeVO> childList = TreeNodeUtil.getChildList(areaList, areaId);
      List<Long> areaIdList = new ArrayList();
      if (CollUtil.isNotEmpty(childList)) {
         Iterator var5 = childList.iterator();

         while(var5.hasNext()) {
            AllocAreaTreeVO areaTreeVO = (AllocAreaTreeVO)var5.next();
            areaIdList.add(areaTreeVO.getId());
         }
      }

      return areaIdList;
   }

//   public List<Tree<Long>> getSystemAreaTree() {
//      List<AllocAreaTreeVO> areaList = ((AllocAreaMapper)this.baseMapper).listSystemArea(TenantContextHolder.getTenantId());
//      TreeNodeConfig treeNodeConfig = new TreeNodeConfig();
//      treeNodeConfig.setWeightKey("crtime");
//      treeNodeConfig.setNameKey("treeName");
//      return TreeUtil.build(areaList, LeConstants.DATA_DEFAULT_LONG, treeNodeConfig, (area, treeNode) -> {
//         treeNode.setId(area.getId());
//         treeNode.setName(area.getTreeName());
//         treeNode.setParentId(area.getParentId());
//         treeNode.putExtra("areaLevel", area.getAreaLevel());
//         treeNode.putExtra("crtime", area.getCrtime());
//      });
//   }
//
//   public List<Tree<Long>> getSystemAuthAreaTree() {
//      List<AllocAreaTreeVO> areaList = ((AllocAreaMapper)this.baseMapper).listSystemArea(TenantContextHolder.getTenantId());
//      List<AllocAreaTreeVO> filterAreaTreeList = ((AllocAreaMapper)this.baseMapper).listAllTreeArea();
//      if (CollUtil.isNotEmpty(filterAreaTreeList)) {
//         List<Long> filterAreaIdList = (List)filterAreaTreeList.stream().map(BaseTreeNode::getId).collect(Collectors.toList());
//         areaList.removeIf((treeVO) -> {
//            return !LeConstants.DATA_DEFAULT_LONG.equals(treeVO.getParentId()) && !filterAreaIdList.contains(treeVO.getId());
//         });
//      }
//
//      TreeNodeConfig treeNodeConfig = new TreeNodeConfig();
//      treeNodeConfig.setWeightKey("crtime");
//      treeNodeConfig.setNameKey("treeName");
//      areaList.sort(Comparator.comparing(AllocAreaTreeVO::getSortNo));
//      if (areaList.size() > 1 && ((AllocAreaTreeVO)areaList.get(1)).getSortNo() >= 2) {
//         if (((AllocAreaTreeVO)areaList.get(1)).getSortNo() == 2) {
//            areaList.forEach((allocAreaTreeVO) -> {
//               if (allocAreaTreeVO.getSortNo() == 2) {
//                  allocAreaTreeVO.setParentId(TenantContextHolder.getTenantId());
//               }
//
//            });
//         }
//
//         if (((AllocAreaTreeVO)areaList.get(1)).getSortNo() == 3) {
//            areaList.forEach((allocAreaTreeVO) -> {
//               if (allocAreaTreeVO.getSortNo() == 3) {
//                  allocAreaTreeVO.setParentId(TenantContextHolder.getTenantId());
//               }
//
//            });
//         }
//      }
//
//      return TreeUtil.build(areaList, LeConstants.DATA_DEFAULT_LONG, treeNodeConfig, (area, treeNode) -> {
//         treeNode.setId(area.getId());
//         treeNode.setName(area.getTreeName());
//         treeNode.setParentId(area.getParentId());
//         treeNode.putExtra("areaLevel", area.getAreaLevel());
//         treeNode.putExtra("sortNo", area.getSortNo());
//         treeNode.putExtra("crtime", area.getCrtime());
//      });
//   }
//
//   public void addArea(AllocAreaAddDTO areaDTO) {
//      this.checkAreaName(areaDTO.getAreaName(), (Long)null);
//      AllocArea addArea = new AllocArea(Id.next());
//      BeanUtils.copyProperties(areaDTO, addArea);
//      Long merchantId = TenantContextHolder.getTenantId();
//      if (!LeConstants.DATA_DEFAULT_LONG.equals(areaDTO.getSuperId()) && !merchantId.equals(areaDTO.getSuperId())) {
//         AllocArea superArea = (AllocArea)this.getOne((Wrapper)Wrappers.lambdaQuery(AllocArea.class).eq(AllocArea::getAreaId, areaDTO.getSuperId()));
//         if (ObjectUtil.isNull(superArea)) {
//            throw new LeException(I18n.getMessage("alloc_area_no_super", new Object[0]));
//         }
//
//         addArea.setFirstAreaName(superArea.getFirstAreaName());
//         if (CharSequenceUtil.isBlank(superArea.getSecondAreaName())) {
//            addArea.setSecondAreaName(areaDTO.getAreaName());
//            addArea.setSortNo(2);
//         } else {
//            addArea.setSecondAreaName(superArea.getSecondAreaName());
//            addArea.setThirdAreaName(areaDTO.getAreaName());
//            addArea.setSortNo(3);
//         }
//
//         String var10001 = superArea.getAreaFullId();
//         addArea.setAreaFullId(var10001 + addArea.getAreaId() + "/");
//      } else {
//         addArea.setFirstAreaName(areaDTO.getAreaName());
//         addArea.setAreaFullId("/" + addArea.getAreaId() + "/");
//         addArea.setSortNo(1);
//      }
//
//      addArea.setContactTel(this.aesEncryptUtil.aesDecode(areaDTO.getContactTel()));
//      this.save(addArea);
//      MqUtil.sendDataChange(addArea, LeMqConstant.DataChangeType.ADD, LeMqConstant.Topic.DATA_CHANGE_AREA);
//   }
//
//   public void batchSaveFirstArea(List<String> areaNameList) {
//      if (!CollUtil.isEmpty(areaNameList)) {
//         List<AllocArea> areaList = new ArrayList();
//         Iterator var3 = areaNameList.iterator();
//
//         while(var3.hasNext()) {
//            String areaName = (String)var3.next();
//            if (!CharSequenceUtil.isBlank(areaName)) {
//               this.checkAreaName(areaName, (Long)null);
//               AllocArea addArea = new AllocArea(Id.next(), areaName);
//               addArea.setFirstAreaName(areaName);
//               addArea.setSortNo(1);
//               areaList.add(addArea);
//            }
//         }
//
//         this.saveBatch(areaList);
//      }
//   }
//
//   private void checkAreaName(String areaName, Long areaId) {
//      LambdaQueryWrapper<AllocArea> queryWrapper = (LambdaQueryWrapper)((LambdaQueryWrapper)Wrappers.lambdaQuery(AllocArea.class).eq(AllocArea::getAreaName, areaName)).eq(AllocArea::getIfDel, LeConstants.COMMON_NO);
//      if (ObjectUtil.isNotNull(areaId)) {
//         queryWrapper.ne(AllocArea::getAreaId, areaId);
//      }
//
//      if (this.count(queryWrapper) > 0L) {
//         throw new LeException(I18n.getMessage("alloc_area_check_name", new Object[]{areaName}));
//      }
//   }
//
//   @Transactional
//   public void updateArea(AllocAreaUpdateDTO areaDTO) {
//      this.checkAreaName(areaDTO.getAreaName(), areaDTO.getAreaId());
//      areaDTO.setContactTel(this.aesEncryptUtil.aesDecode(areaDTO.getContactTel()));
//      List<Long> updateAreaIdList = (List)Stream.of(areaDTO.getAreaId()).collect(Collectors.toList());
//      List<Long> childAreaIdList = ((AllocAreaMapper)this.baseMapper).listChildAreaId(areaDTO.getAreaId());
//      if (CollUtil.isNotEmpty(childAreaIdList)) {
//         updateAreaIdList.addAll(childAreaIdList);
//      }
//
//      AllocArea oldArea = (AllocArea)this.getOne((Wrapper)Wrappers.lambdaQuery(AllocArea.class).eq(AllocArea::getAreaId, areaDTO.getAreaId()));
//      String newAreaName = areaDTO.getAreaName();
//      String oldAreaName = oldArea.getAreaName();
//      LambdaUpdateWrapper<AllocArea> batchUpdateAreaNameWrapper = (LambdaUpdateWrapper)Wrappers.lambdaUpdate(AllocArea.class).in(AllocArea::getAreaId, updateAreaIdList);
//      if (oldAreaName.equals(oldArea.getFirstAreaName())) {
//         batchUpdateAreaNameWrapper.set(AllocArea::getFirstAreaName, newAreaName);
//      } else if (oldAreaName.equals(oldArea.getSecondAreaName())) {
//         batchUpdateAreaNameWrapper.set(AllocArea::getSecondAreaName, newAreaName);
//      } else if (oldAreaName.equals(oldArea.getThirdAreaName())) {
//         batchUpdateAreaNameWrapper.set(AllocArea::getThirdAreaName, newAreaName);
//      }
//
//      this.update(batchUpdateAreaNameWrapper);
//      this.update((Wrapper)((LambdaUpdateWrapper)((LambdaUpdateWrapper)((LambdaUpdateWrapper)((LambdaUpdateWrapper)Wrappers.lambdaUpdate(AllocArea.class).set(AllocArea::getAreaName, newAreaName)).set(AllocArea::getDirector, areaDTO.getDirector())).set(AllocArea::getContactTel, areaDTO.getContactTel())).set(AllocArea::getAreaDescribe, areaDTO.getAreaDescribe())).eq(AllocArea::getAreaId, areaDTO.getAreaId()));
//   }
//
//   public void deleteArea(Long areaId) {
//      this.update((Wrapper)((LambdaUpdateWrapper)Wrappers.lambdaUpdate(AllocArea.class).set(AllocArea::getIfDel, LeConstants.COMMON_YES)).eq(AllocArea::getAreaId, areaId));
//      AllocArea delArea = new AllocArea();
//      delArea.setAreaId(areaId);
//      MqUtil.sendDataChange(delArea, LeMqConstant.DataChangeType.REMOVE, LeMqConstant.Topic.DATA_CHANGE_AREA);
//   }
//
//   // $FF: synthetic method
//   private static Object $deserializeLambda$(SerializedLambda lambda) {
//      switch (lambda.getImplMethodName()) {
//         case "getFirstAreaName":
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
//               return AllocArea::getFirstAreaName;
//            }
//
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
//               return AllocArea::getFirstAreaName;
//            }
//            break;
//         case "getAreaDescribe":
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
//               return AllocArea::getAreaDescribe;
//            }
//            break;
//         case "getDirector":
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
//               return AllocArea::getDirector;
//            }
//            break;
//         case "getThirdAreaName":
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
//               return AllocArea::getThirdAreaName;
//            }
//            break;
//         case "getContactTel":
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
//               return AllocArea::getContactTel;
//            }
//            break;
//         case "getAreaName":
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
//               return AllocArea::getAreaName;
//            }
//
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
//               return AllocArea::getAreaName;
//            }
//            break;
//         case "getSecondAreaName":
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
//               return AllocArea::getSecondAreaName;
//            }
//
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
//               return AllocArea::getSecondAreaName;
//            }
//            break;
//         case "getIfDel":
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) {
//               return AllocArea::getIfDel;
//            }
//
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) {
//               return AllocArea::getIfDel;
//            }
//            break;
//         case "getAreaId":
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
//               return AllocArea::getAreaId;
//            }
//
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
//               return AllocArea::getAreaId;
//            }
//
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
//               return AllocArea::getAreaId;
//            }
//
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
//               return AllocArea::getAreaId;
//            }
//
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
//               return AllocArea::getAreaId;
//            }
//
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
//               return AllocArea::getAreaId;
//            }
//
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
//               return AllocArea::getAreaId;
//            }
//
//            if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/allocation/canteen/model/AllocArea") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
//               return AllocArea::getAreaId;
//            }
//      }
//
//      throw new IllegalArgumentException("Invalid lambda deserialization");
//   }
}
