コード例 #1
0
 public List<DetailCommodityDto> getListDetailCommodityDto(Map map) {
   CommodityMarkMapper commodityMarkMapper =
       (CommodityMarkMapper) SpringContextUtil.getBean("commodityMarkMapper");
   List<DetailCommodityDto> list = mapper.getDetailCommodityDtoList(map);
   //        if(map == null){
   //            map = new HashMap();
   //        }
   // 暂时不做商品你标签所以商品标签全为空
   //        for(DetailCommodityDto dto : list){
   //            map.clear();
   //            map.put("ids", Arrays.asList(dto.getMarkids().split("/")));
   //            dto.setMarks(commodityMarkMapper.getCommoditymarkListByIds(map));
   //        }
   return list;
 }
コード例 #2
0
 public List<PromotionDto> getListPromotionDto(Map map) {
   PromotionPriceMapper promotionPriceMapper =
       (PromotionPriceMapper) SpringContextUtil.getBean("promotionPriceMapper");
   List<PromotionPrice> list = promotionPriceMapper.getPromotionPriceList(map);
   List<PromotionDto> dtoList = new ArrayList<PromotionDto>();
   if (map == null) {
     map = new HashMap();
   }
   for (PromotionPrice temp : list) {
     PromotionDto dto = BeanMapper.map(temp, PromotionDto.class);
     map.clear();
     map.put("commodityid", dto.getPromotionid());
     dto.setCommodity(mapper.getSimpleCommodityDtoList(map).get(0));
     dtoList.add(dto);
   }
   return dtoList;
 }
コード例 #3
0
 public List<UserDiscountDto> getListUserDiscountDto(Map map) {
   UserDiscountMapper userDiscountMapper =
       (UserDiscountMapper) SpringContextUtil.getBean("userDiscountMapper");
   CommodityTypeMapper commodityTypeMapper =
       (CommodityTypeMapper) SpringContextUtil.getBean("commodityTypeMapper");
   List<UserDiscount> list = userDiscountMapper.getUserDiscountList(map);
   List<UserDiscountDto> dtoList = new ArrayList<UserDiscountDto>();
   if (map == null) {
     map = new HashMap();
   }
   for (UserDiscount temp : list) {
     UserDiscountDto dto = BeanMapper.map(temp, UserDiscountDto.class);
     map.clear();
     map.put("commodityid", temp.getCommodityid());
     List<SimpleCommodityDto> SimpleCommoditydtolist = mapper.getSimpleCommodityDtoList(map);
     if (!SimpleCommoditydtolist.isEmpty()) {
       dto.setCommodity(SimpleCommoditydtolist.get(0));
       dto.setType(commodityTypeMapper.getCommodityTypeById(temp.getTypeid()));
       dtoList.add(dto);
     }
   }
   return dtoList;
 }
コード例 #4
0
 public List<SimpleCommodityDto> getListSimpleCommodityDto(Map map) {
   return mapper.getSimpleCommodityDtoList(map);
 }