package com.bonus.canteen.core.drp.v2.po;

import cn.hutool.core.collection.CollUtil;
import com.bonus.canteen.core.common.utils.SysUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

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

@ApiModel
public class MaterialListBean {
   @ApiModelProperty("货品id")
   private Long materialId;
   @ApiModelProperty("货品名称")
   private String materialName;
   @ApiModelProperty("货品图片")
   private List<String> imageList;

   public void setImageList(List<String> imageList) {
      if (!CollUtil.isEmpty(imageList)) {
         List<String> tempUrlList = new ArrayList();
         Iterator var3 = imageList.iterator();

         while(var3.hasNext()) {
            String imageUrl = (String)var3.next();
            String tempUrl = SysUtil.getCutPath(imageUrl);
            tempUrlList.add(tempUrl);
         }

         this.imageList = tempUrlList;
      }
   }

   public Long getMaterialId() {
      return this.materialId;
   }

   public String getMaterialName() {
      return this.materialName;
   }

   public List<String> getImageList() {
      return this.imageList;
   }

   public void setMaterialId(final Long materialId) {
      this.materialId = materialId;
   }

   public void setMaterialName(final String materialName) {
      this.materialName = materialName;
   }
}
