Commit 3ac2f3e0 authored by hezhen's avatar hezhen

Merge branch 'master-tiande' of...

Merge branch 'master-tiande' of http://113.105.137.151:22280/youjj/cloud-platform into master-tiande
parents 286e7d4b e8d73bcf
package com.xxfc.platform.campsite.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.xxfc.platform.campsite.dto.CampsiteShopTagDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......@@ -9,6 +10,7 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
......@@ -111,4 +113,7 @@ public class CampsiteShopPageVo implements Serializable {
@ApiModelProperty("seo*html标签优化")
private String imgDesc;
@ApiModelProperty("标签列表")
private List<CampsiteShopTagDTO>list;
}
......@@ -100,6 +100,12 @@ public class CampsiteShopBiz extends BaseBiz<CampsiteShopMapper, CampsiteShop> {
}*/
PageDataVO<CampsiteShopPageVo> campsiteShopPageDataVO = findCampsiteShopPageByTypeAndName(campsiteShopFindDTO);
/* campHashOperations.put(CAMPSITE_LIST_CACHE_PREKEY,campsite_cache_key,JSONObject.toJSONString(campsiteShopPageDataVO));*/
//查询营地的标签
List<CampsiteShopPageVo>list = campsiteShopPageDataVO.getData();
for(CampsiteShopPageVo campsiteShopPageVo : list){
List<CampsiteShopTagDTO> tagList = campsiteShopTagBiz.findByCampsiteShopId(campsiteShopPageVo.getId());
campsiteShopPageVo.setList(tagList);
}
return campsiteShopPageDataVO;
}
......@@ -196,7 +202,7 @@ public class CampsiteShopBiz extends BaseBiz<CampsiteShopMapper, CampsiteShop> {
campsiteShopDetailVo.setHasCollection(false);
}
//
/* campsiteValueOperations.set(String.format("%s%d", CAMSITE_DETAIL_CACHE_PREKEY, id), JSONObject.toJSONString(campsiteShopDetailVo));*/
return campsiteShopDetailVo;
......
......@@ -104,4 +104,7 @@ public class TourTag implements Serializable {
@Column(name = "is_del")
@ApiModelProperty(value = "是否删除:0-正常;1-删除")
private Integer isDel;
@Transient
private List<TourGood> list;
}
package com.xxfc.platform.tour.biz;
import cn.hutool.db.handler.HandleHelper;
import com.ace.cache.annotation.CacheClear;
import com.github.wxiaoqi.security.admin.feign.dto.UserDTO;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
......@@ -7,6 +8,8 @@ import com.xxfc.platform.tour.comstnt.RedisKey;
import com.xxfc.platform.tour.dto.TourTagAndBannerDTO;
import com.xxfc.platform.tour.dto.TourTagBannerDTO;
import com.xxfc.platform.tour.dto.TourTagDTO;
import com.xxfc.platform.tour.entity.TourGood;
import com.xxfc.platform.tour.mapper.TourGoodMapper;
import com.xxfc.platform.tour.mapper.TourTagMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
......@@ -19,10 +22,7 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
import org.springframework.transaction.annotation.Transactional;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -40,6 +40,9 @@ public class TourTagBiz extends BaseBiz<TourTagMapper,TourTag> {
@Autowired
private TourTagBannerBiz tourTagBannerBiz;
@Autowired
private TourGoodMapper tourGoodMapper;
// @Cache(key = RedisKey.CONSTANT_CODE_PREFIX_HOTTAG)
public List<TourTag> getHotTag() {
......@@ -49,6 +52,22 @@ public class TourTagBiz extends BaseBiz<TourTagMapper,TourTag> {
return mapper.findHotListTag(tag);
}
public List<TourTag> getHotTagAndGoods() {
TourTag tag = new TourTag();
tag.setIsDel(0);
tag.setIsHot(1);
List<TourTag>list = mapper.findHotListTag(tag);
Map<String,Object>map = new HashMap<String,Object>();
//增加两条线路例子
for(TourTag tourTag :list){
map.put("tagId",tourTag.getId());
PageDataVO<TourGood> dataVO = PageDataVO.pageInfo(1, 2, () -> tourGoodMapper.getGoodList(map));
List<TourGood> pageDataVO = dataVO.getData();
tourTag.setList(pageDataVO);
}
return list;
}
public List<TourTag> getTagList(Integer isHot) {
TourTag tag = new TourTag();
tag.setIsDel(0);
......
......@@ -45,6 +45,29 @@ public class TourTagController extends BaseController<TourTagBiz,TourTag> {
}
/**
* 标签带两条线路
* @param dto
* @return
*/
@GetMapping("/app/unauth/getTagListAndGoods")
public ObjectRestResponse getTagListAndGoods(pageDTO dto){
if (dto==null) {
return ObjectRestResponse.createDefaultFail();
}
Integer hot = dto.getHot();
if (hot==1){
List<TourTag> hotTag = tagBiz.getHotTagAndGoods();
return ObjectRestResponse.succ(hotTag);
}
PageDataVO<TourTag> all = tagBiz.findPage(BeanUtil.beanToMap(dto));
return ObjectRestResponse.succ(all);
}
@Override
@ApiOperation("修改")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment