| | |
| | | import java.util.UUID;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.transaction.Transactional;
|
| | |
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.yeshi.utils.tencentcloud.COSManager;
|
| | |
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | @Cacheable(value="classCache",key="'getClassListAllCache'")
|
| | | public List<Map<String, Object>> getClassListAllCache() throws Exception {
|
| | | @Cacheable(value="classCache",key="'getClassListAllCache'+#changePicture")
|
| | | public List<Map<String, Object>> getClassListAllCache(boolean changePicture) throws Exception {
|
| | |
|
| | | List<GoodsClass> goodsClassList = goodsClassMapper.getEffectiveClass();
|
| | | if (goodsClassList == null || goodsClassList.size() == 0) {
|
| | |
| | | GoodsSubClass goodsSubClass = iterator.next();
|
| | | GoodsClass goodsClassInner = goodsSubClass.getRootClass();
|
| | | if (goodsClass.getId() == goodsClassInner.getId()) {
|
| | | |
| | | // 1.5.3新版图片替换
|
| | | if (changePicture) {
|
| | | String pictureSecond = goodsSubClass.getPictureSecond();
|
| | | if (pictureSecond != null && pictureSecond.trim().length() > 0) {
|
| | | goodsSubClass.setPicture(pictureSecond);
|
| | | }
|
| | | }
|
| | | |
| | | // 对应下子分类
|
| | | subClassList.add(goodsSubClass);
|
| | | iterator.remove();
|
| | | }
|
| | | |
| | | |
| | | }
|
| | | }
|
| | |
|