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

Commit 836da2f1 authored by 胡佳晨's avatar 胡佳晨

提交 标签列表

parent 4b6fa270
......@@ -111,7 +111,8 @@ public class GoblinRedisConst {
public static final String REDIS_GOBLIN_ORDER_MASTER = PREFIX.concat("order:masterCode:");//用户订单id列表 key:$masterCode
public static final String REDIS_GOBLIN_ORDER_OFFCODE = PREFIX.concat("order:offCode:");//用户订单id列表 key:$wtrieOffCode
public static final String REDIS_GOBLIN_BACK_ORDER_ID = PREFIX.concat("order:backIds:");//用户订单下的退款订单id key:$orderId
public static final String REDIS_CAN_BUY = PREFIX.concat("canBuy:");//用户订单下的退款订单id key:$skuId:$mobile
public static final String REDIS_CAN_BUY = PREFIX.concat("canBuy:");//可以购买的用户 key:$skuId:$mobile
public static final String REDIS_ZZ_MUSIC_TAG = PREFIX.concat("music:tag:ZZ:");//根据场次音乐人标签搜索列表 key:$musicTag:$performanceId
/* ----------------------------------------------------------------- */
/**
* SKU剩余库存
......
......@@ -113,6 +113,8 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
@ApiModelProperty(position = 60, value = "活动Id")
private String marketId;
@ApiModelProperty(position = 63, value = "演出id")
private String performanceId;
@ApiModelProperty(position = 61, value = "销量")
private Integer count;
@ApiModelProperty(position = 62, value = "商铺名称")
......
package com.liquidnet.service.goblin.service;
import com.liquidnet.service.goblin.dto.vo.GoblinFrontBannerVo;
import com.liquidnet.service.goblin.dto.vo.GoblinFrontNavigationVoo;
import com.liquidnet.service.goblin.dto.vo.GoblinFrontSeckillVo;
import com.liquidnet.service.goblin.dto.vo.GoblinFrontSelectGoodVo;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.entity.GoblinFrontHotWord;
import java.awt.*;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
public interface GoblinFrontService {
......@@ -43,4 +42,7 @@ public interface GoblinFrontService {
*/
GoblinFrontSelectGoodVo getSelectGoods(int page, int pageSize);
//根据艺人标签和演出id查询商品列表
List<GoblinGoodsInfoVo> getGoodByMusicTagP(String musicTag, String performanceId);
}
......@@ -5,6 +5,7 @@ import com.liquidnet.commons.lang.util.StringUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.entity.GoblinFrontHotWord;
import com.liquidnet.service.goblin.service.GoblinFrontService;
import com.liquidnet.service.goblin.service.impl.GoblinFrontServiceImpl;
import com.liquidnet.service.goblin.util.GoblinRedisUtils;
import io.swagger.annotations.Api;
......@@ -38,109 +39,114 @@ public class GoblinFrontController {
@GetMapping("getTopBanner")
@ApiOperation("获取顶部banner")
public ResponseDto<ArrayList<GoblinFrontBannerVo>> getBanner() {
return ResponseDto.success( goblinFrontService.getListBanner());
return ResponseDto.success(goblinFrontService.getListBanner());
}
@GetMapping("getMiddleBanner")
@ApiOperation("获取中部banner")
public ResponseDto<ArrayList<GoblinFrontBannerVo>> getMiddleBanner() {
return ResponseDto.success( goblinFrontService.getMiddleBanner());
return ResponseDto.success(goblinFrontService.getMiddleBanner());
}
@GetMapping("getHotWord")
@ApiOperation("获得热词")
public ResponseDto<GoblinFrontHotWord> getHotWord() {
return ResponseDto.success( goblinFrontService.getHotWord() );
return ResponseDto.success(goblinFrontService.getHotWord());
}
@GetMapping("getNavigation")
@ApiOperation("获得金刚栏")
public ResponseDto<GoblinFrontNavigationVoo> getNavigation() {
return ResponseDto.success( goblinFrontService.getNavigation() );
return ResponseDto.success(goblinFrontService.getNavigation());
}
@GetMapping("getSeckilll")
@ApiOperation("获得秒杀首页要用的")
public ResponseDto<GoblinFrontSeckillVo> getSeckilll() throws ParseException {
return ResponseDto.success( goblinFrontService.getSeckilll());
return ResponseDto.success(goblinFrontService.getSeckilll());
}
@GetMapping("getSelectGoods")
@ApiOperation("获得精选商品列表(pageNumber从0开始)")
public ResponseDto<GoblinFrontSelectGoodVo> getSelectGoods(@RequestParam(name = "pageSize", required = true) int pageSize, @RequestParam(name = "pageNumber", required = true)int pageNumber) throws ParseException {
return ResponseDto.success( goblinFrontService.getSelectGoods(pageNumber,pageSize));
public ResponseDto<GoblinFrontSelectGoodVo> getSelectGoods(@RequestParam(name = "pageSize", required = true) int pageSize, @RequestParam(name = "pageNumber", required = true) int pageNumber) throws ParseException {
return ResponseDto.success(goblinFrontService.getSelectGoods(pageNumber, pageSize));
}
@GetMapping("getGoodsDetail")
@ApiOperation("获得商品详情")
public ResponseDto<GoblinFrontGoodDetailVo> getGoodsDetail(@RequestParam(name = "spuId", required = true) String spuId) throws ParseException {
return ResponseDto.success( goblinFrontService.getGoodsDetail(spuId));
return ResponseDto.success(goblinFrontService.getGoodsDetail(spuId));
}
@GetMapping("getMoudleIndex")
@ApiOperation("获取组件排序")
public ResponseDto getMoudleIndex() throws ParseException {
return ResponseDto.success( goblinFrontService.getMoudleIndex());
return ResponseDto.success(goblinFrontService.getMoudleIndex());
}
@GetMapping("getCube")
@ApiOperation("获取魔方")
public ResponseDto<GoblinFrontCubeVo> getCube() throws ParseException {
return ResponseDto.success( goblinFrontService.getCube());
return ResponseDto.success(goblinFrontService.getCube());
}
@GetMapping("getRecommend")
@ApiOperation("获取新品推荐")
public ResponseDto<GoblinFrontCubeVo> getRecommend() throws ParseException {
return ResponseDto.success( goblinFrontService.getRecommend());
return ResponseDto.success(goblinFrontService.getRecommend());
}
@GetMapping("getCategoryList")
@ApiOperation("获取分类列表商品( 1、销量优先、2、新品优先、3、价格降序、4、价格升序)")
public ResponseDto<GoblinFrontCategoryListVo> getCategoryList(@RequestParam(name = "type", required = true) String type,@RequestParam(name = "categoryId", required = true)String categoryId,@RequestParam(name = "page", required = true)int page,@RequestParam(name = "pageSize", required = true)int pageSize) throws ParseException {
return ResponseDto.success( goblinFrontService.getCategoryList(type,categoryId,page,pageSize));
public ResponseDto<GoblinFrontCategoryListVo> getCategoryList(@RequestParam(name = "type", required = true) String type, @RequestParam(name = "categoryId", required = true) String categoryId, @RequestParam(name = "page", required = true) int page, @RequestParam(name = "pageSize", required = true) int pageSize) throws ParseException {
return ResponseDto.success(goblinFrontService.getCategoryList(type, categoryId, page, pageSize));
}
@GetMapping("getMusicList")
@ApiOperation("获取音乐标签列表( 1、销量优先、2、新品优先、3、价格降序、4、价格升序)")
public ResponseDto<GoblinFrontCategoryListVo> getMusicList(@RequestParam(name = "type", required = true) String type,@RequestParam(name = "musicId", required = true)String musicId,@RequestParam(name = "page", required = true)int page,@RequestParam(name = "pageSize", required = true)int pageSize) throws ParseException {
return ResponseDto.success( goblinFrontService.getMusic(musicId,type,page,pageSize));
public ResponseDto<GoblinFrontCategoryListVo> getMusicList(@RequestParam(name = "type", required = true) String type, @RequestParam(name = "musicId", required = true) String musicId, @RequestParam(name = "page", required = true) int page, @RequestParam(name = "pageSize", required = true) int pageSize) throws ParseException {
return ResponseDto.success(goblinFrontService.getMusic(musicId, type, page, pageSize));
}
@GetMapping("getCategory")
@ApiOperation("获取分类子集")
public ResponseDto<GoblinCategoryzfVo> getCategory(@RequestParam(name = "categoryId", required = true)String categoryId) throws ParseException {
return ResponseDto.success( goblinFrontService.getCategory(categoryId));
public ResponseDto<GoblinCategoryzfVo> getCategory(@RequestParam(name = "categoryId", required = true) String categoryId) throws ParseException {
return ResponseDto.success(goblinFrontService.getCategory(categoryId));
}
@GetMapping("getStore")
@ApiOperation("获得店铺详情")
public ResponseDto<GoblinStoreInfoVo> getStore(@RequestParam(name = "storeId", required = true)String storeId) throws ParseException {
return ResponseDto.success( goblinFrontService.getStore(storeId));
public ResponseDto<GoblinStoreInfoVo> getStore(@RequestParam(name = "storeId", required = true) String storeId) throws ParseException {
return ResponseDto.success(goblinFrontService.getStore(storeId));
}
@GetMapping("getStoreCategory")
@ApiOperation("获得店铺分类")
public ResponseDto<List<GoblinStoreGoodsCategoryVo>> getStoreCategory(@RequestParam(name = "storeId", required = true)String storeId) throws ParseException {
return ResponseDto.success( goblinFrontService.getStoreCategory(storeId));
public ResponseDto<List<GoblinStoreGoodsCategoryVo>> getStoreCategory(@RequestParam(name = "storeId", required = true) String storeId) throws ParseException {
return ResponseDto.success(goblinFrontService.getStoreCategory(storeId));
}
@GetMapping("getStoreGoodes")
@ApiOperation("获得店铺商品")
public ResponseDto<GoblinFrontCategoryListVo> getStoreGoodes(@RequestParam(name = "storeId", required = true)String storeId,@RequestParam(name = "categoryId", required = false)String categoryId,@RequestParam(name = "name", required = false)String name) throws ParseException {
return ResponseDto.success( goblinFrontService.getStoreGoodes(storeId,categoryId,name));
public ResponseDto<GoblinFrontCategoryListVo> getStoreGoodes(@RequestParam(name = "storeId", required = true) String storeId, @RequestParam(name = "categoryId", required = false) String categoryId, @RequestParam(name = "name", required = false) String name) throws ParseException {
return ResponseDto.success(goblinFrontService.getStoreGoodes(storeId, categoryId, name));
}
@GetMapping("searchGoodesName")
@ApiOperation("搜索商品名字、或商铺名字")
public ResponseDto<List<GoblinGoodsInfoListVo>> searchGoodesName(@RequestParam(name = "name", required = true)String name) throws ParseException {
if(StringUtil.isNotBlank(name)){
return ResponseDto.success( goblinFrontService.searchGoodesName(name));
public ResponseDto<List<GoblinGoodsInfoListVo>> searchGoodesName(@RequestParam(name = "name", required = true) String name) throws ParseException {
if (StringUtil.isNotBlank(name)) {
return ResponseDto.success(goblinFrontService.searchGoodesName(name));
}
return ResponseDto.success(null);
}
@GetMapping("tagPerformance")
@ApiOperation("标签,演出id获取演出列表")
public ResponseDto<List<GoblinGoodsInfoVo>> getGoodByMusicTagP(@RequestParam(name = "musicTag", required = true) String musicTag,
@RequestParam(name = "performanceId", required = true) String performanceId) {
return ResponseDto.success(goblinFrontService.getGoodByMusicTagP(musicTag, performanceId));
}
}
......@@ -854,6 +854,11 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
// return null;
}
@Override
public List<GoblinGoodsInfoVo> getGoodByMusicTagP(String musicTag, String performanceId) {
return goblinRedisUtils.getMusicTagList(musicTag,performanceId);
}
public boolean belongCalendar( String startString, String endString) throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DateUtil.DATE_FULL_STR);//注意月份是MM
Date from = simpleDateFormat.parse(startString);
......
......@@ -288,6 +288,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
spuVo.setPriceGe(priceList.get(0));
spuVo.setPriceLe(priceList.get(priceList.size() - 1));
spuVo.setMarketId(GoblinStatusConst.MarketPreStatus.MARKET_PRE_PURCHASE.getValue().concat(params.getStoreMarketId()));
GoblinSelfMarketingVo marketVo = goblinRedisUtils.getSelfMarket(params.getStoreMarketId());
spuVo.setPerformanceId(marketVo.getPerformanceId());
goblinMongoUtils.setGoodsInfoVo(spuVo);
//redis
goblinRedisUtils.setGoodsInfoVo(spuVo);
......@@ -369,6 +371,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
spuVo.setPriceLe(priceList.get(priceList.size() - 1));
spuVo.setSkuIdList(marketSkuList);
spuVo.setMarketId(GoblinStatusConst.MarketPreStatus.MARKET_PRE_PURCHASE.getValue().concat(params.getStoreMarketId()));
GoblinSelfMarketingVo marketVo = goblinRedisUtils.getSelfMarket(params.getStoreMarketId());
spuVo.setPerformanceId(marketVo.getPerformanceId());
goblinMongoUtils.updateGoodsInfoVo(spuVo);
//redis
goblinRedisUtils.setGoodsInfoVo(spuVo);
......
......@@ -1002,5 +1002,18 @@ public class GoblinMongoUtils {
return pagedResult.setList(mgtCouponListVos).setTotal(count, filterParam.getPageSize());
}
//根据艺人标签和演出查询商品
public List<GoblinGoodsInfoVo> getMusicTagPGoods(String musicTag, String performanceId) {
return mongoTemplate.find(
Query.query(Criteria.where("extagVoList.tagName").is(musicTag)
.and("performanceId").is(performanceId)
.and("delFlg").is("0").and("shelvesStatus").is(3)),
GoblinGoodsInfoVo.class,
GoblinGoodsInfoVo.class.getSimpleName()
);
}
;
/* ---------------------------------------- ---------------------------------------- */
}
......@@ -79,7 +79,7 @@ public class GoblinRedisUtils {
String rk = GoblinRedisConst.SKU_RELATION.concat(skuId);
List<String> list = getSkuRe(skuId);
list.add(marketSkuId);
redisUtil.set(rk,list);
redisUtil.set(rk, list);
}
//删除 skuId 相关的活动 skuId
......@@ -87,16 +87,16 @@ public class GoblinRedisUtils {
String rk = GoblinRedisConst.SKU_RELATION.concat(skuId);
List<String> list = getSkuRe(skuId);
list.remove(marketSkuId);
redisUtil.set(rk,list);
redisUtil.set(rk, list);
}
//获取 skuId 相关的活动 skuId
public List<String> getSkuRe(String skuId) {
String rk = GoblinRedisConst.SKU_RELATION.concat(skuId);
Object obj = redisUtil.get(rk);
if(obj==null){
if (obj == null) {
return new ArrayList();
}else{
} else {
return (List<String>) obj;
}
}
......@@ -1016,6 +1016,26 @@ public class GoblinRedisUtils {
}
}
//获取艺人标签redis
public List<GoblinGoodsInfoVo> getMusicTagList(String musicTag, String performanceId) {
List<GoblinGoodsInfoVo> listVo = ObjectUtil.getGoblinGoodsInfoVos();
// String rk = GoblinRedisConst.REDIS_ZZ_MUSIC_TAG.concat(musicTag + ":").concat(performanceId);
// Object obj = redisUtil.get(rk);
// if (obj == null) {
listVo = goblinMongoUtils.getMusicTagPGoods(musicTag, performanceId);
// redisUtil.set(rk, listVo);
return listVo;
// } else {
// return (List<GoblinGoodsInfoVo>) obj;
// }
}
//删除艺人标签redis
public void delMusicTagList(String musicTag, String performanceId) {
String rk = GoblinRedisConst.REDIS_ZZ_MUSIC_TAG.concat(musicTag + ":").concat(performanceId);
redisUtil.del(rk);
}
/* ---------------------------------------- 商品活动 ---------------------------------------- */
public List<GoblinStoreCouponVo> getGoodsMarketsForCoupon(String spuId, String storeId) {
......
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