| | |
| | | package com.yeshi.fanli.service.impl.clazz;
|
| | |
|
| | | import java.util.Calendar;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClass;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabel;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap;
|
| | | import com.yeshi.fanli.exception.GoodsClassException;
|
| | | import com.yeshi.fanli.exception.goods.GoodsClassException;
|
| | | import com.yeshi.fanli.service.inter.clazz.GoodsSubClassLabelService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.vo.goods.GoodsSubClassLabelVO;
|
| | |
| | | public GoodsSubClassLabelMap selectBySubClassId(Long subClassId) {
|
| | | return goodsSubClassLabelMapMapper.selectBySubClassId(subClassId);
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | @Cacheable(value = "classCache", key = "'listSubMapCache-'+#classId")
|
| | | public List<GoodsSubClassLabelVO> listSubMapCache(Long classId) {
|
| | | List<GoodsSubClassLabelVO> list = goodsSubClassLabelMapper.listSubMapByClassId(classId);
|
| | | List<GoodsSubClassLabelVO> list = goodsSubClassLabelMapper.listSubMapByClassId(classId,
|
| | | Calendar.getInstance().get(Calendar.MONTH) + 1);
|
| | | if (list == null || list.size() == 0) {
|
| | | return list;
|
| | | }
|
| | | |
| | |
|
| | | for (int i = 0; i < list.size(); i++) {
|
| | | GoodsSubClassLabelVO labelVO = list.get(i);
|
| | | List<GoodsSubClass> listSub = labelVO.getListSub();
|
| | |
| | | i--;
|
| | | continue;
|
| | | }
|
| | | |
| | | for (GoodsSubClass goodsSubClass: listSub) {
|
| | |
|
| | | for (GoodsSubClass goodsSubClass : listSub) {
|
| | | String pictureSecond = goodsSubClass.getPictureSecond();
|
| | | if (!StringUtil.isNullOrEmpty(pictureSecond)) {
|
| | | goodsSubClass.setPicture(pictureSecond);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | labelVO.setListSub(listSub);
|
| | | }
|
| | | return list;
|
| | | }
|
| | | |
| | | |
| | | |
| | |
|
| | | }
|