记得上下班打卡 | git大法好,push需谨慎

Commit ad63c01b authored by zhengfuxin's avatar zhengfuxin

修改金刚位

parent c716615d
package com.liquidnet.service.goblin.dto.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.List;
/**
* <p>
* 首页导航栏
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinFrontNavigationVoo implements Serializable {
@ApiModelProperty( value = "展示形式:1、一行2、二行")
private Integer displayType;
@ApiModelProperty( value = "金刚位")
private List<GoblinFrontNavigationVo> list;
private static final GoblinFrontNavigationVoo obj = new GoblinFrontNavigationVoo();
public static GoblinFrontNavigationVoo getNew() {
try {
return (GoblinFrontNavigationVoo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinFrontNavigationVoo();
}
}
}
package com.liquidnet.service.goblin.service; package com.liquidnet.service.goblin.service;
import com.liquidnet.service.goblin.dto.vo.GoblinFrontBannerVo; import com.liquidnet.service.goblin.dto.vo.GoblinFrontBannerVo;
import com.liquidnet.service.goblin.dto.vo.GoblinFrontNavigationVo; import com.liquidnet.service.goblin.dto.vo.GoblinFrontNavigationVoo;
import com.liquidnet.service.goblin.dto.vo.GoblinFrontSeckillVo; import com.liquidnet.service.goblin.dto.vo.GoblinFrontSeckillVo;
import com.liquidnet.service.goblin.dto.vo.GoblinFrontSelectGoodVo; import com.liquidnet.service.goblin.dto.vo.GoblinFrontSelectGoodVo;
import com.liquidnet.service.goblin.entity.GoblinFrontHotWord; import com.liquidnet.service.goblin.entity.GoblinFrontHotWord;
import com.liquidnet.service.goblin.entity.GoblinFrontNavigation;
import java.text.ParseException; import java.text.ParseException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
public interface GoblinFrontService { public interface GoblinFrontService {
...@@ -31,7 +29,7 @@ public interface GoblinFrontService { ...@@ -31,7 +29,7 @@ public interface GoblinFrontService {
* @Description:获得金刚位 * @Description:获得金刚位
* @date 2022/1/5 下午2:51 * @date 2022/1/5 下午2:51
*/ */
List<GoblinFrontNavigationVo> getNavigation(); GoblinFrontNavigationVoo getNavigation();
/** /**
* 获得秒杀首页要用的 * 获得秒杀首页要用的
......
...@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.RestController;
import java.text.ParseException; import java.text.ParseException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
/** /**
* @author zhangfuxin * @author zhangfuxin
...@@ -52,7 +51,7 @@ public class GoblinFrontController { ...@@ -52,7 +51,7 @@ public class GoblinFrontController {
} }
@GetMapping("getNavigation") @GetMapping("getNavigation")
@ApiOperation("获得金刚栏") @ApiOperation("获得金刚栏")
public ResponseDto<List<GoblinFrontNavigationVo>> getNavigation() { public ResponseDto<GoblinFrontNavigationVoo> getNavigation() {
return ResponseDto.success( goblinFrontService.getNavigation() ); return ResponseDto.success( goblinFrontService.getNavigation() );
} }
......
...@@ -108,15 +108,18 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -108,15 +108,18 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
} }
@Override @Override
public List<GoblinFrontNavigationVo> getNavigation() { public GoblinFrontNavigationVoo getNavigation() {
GoblinFrontNavigationVoo goblinFrontNavigationVoo=GoblinFrontNavigationVoo.getNew();
List<GoblinFrontNavigation> list = (List<GoblinFrontNavigation>) redisUtil.get(GoblinRedisConst.FRONT_NAVIGATION); List<GoblinFrontNavigation> list = (List<GoblinFrontNavigation>) redisUtil.get(GoblinRedisConst.FRONT_NAVIGATION);
ArrayList<GoblinFrontNavigationVo> list1=ObjectUtil.getgoblinFrontNavigationVoArrayList(); ArrayList<GoblinFrontNavigationVo> list1=ObjectUtil.getgoblinFrontNavigationVoArrayList();
for(GoblinFrontNavigation navigation:list){ for(GoblinFrontNavigation navigation:list){
goblinFrontNavigationVoo.setDisplayType(navigation.getDisplayType());
GoblinFrontNavigationVo goblinFrontNavigationVo=GoblinFrontNavigationVo.getNew(); GoblinFrontNavigationVo goblinFrontNavigationVo=GoblinFrontNavigationVo.getNew();
BeanUtils.copyProperties(navigation,goblinFrontNavigationVo); BeanUtils.copyProperties(navigation,goblinFrontNavigationVo);
list1.add(goblinFrontNavigationVo); list1.add(goblinFrontNavigationVo);
} }
return list1; goblinFrontNavigationVoo.setList(list1);
return goblinFrontNavigationVoo;
} }
@Override @Override
......
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