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

Commit 1d1cc71b authored by 张国柄's avatar 张国柄

Merge remote-tracking branch 'origin/dev_goblin' into dev_goblin

parents e976b519 1eb42693
package com.liquidnet.service.goblin.param;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 首页导航栏
* </p>
*
* @author liquidnet
* @since 2021-12-28
*/
@Data
@ApiModel(value = "GoblinFrontHotWordBuildParam", description = "首页导航栏")
public class GoblinFrontNavigationBuildParam implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty(value = "主键")
private Long mid;
/**
* 图片路径或id
*/
@ApiModelProperty(value = "图片路径或id")
private String picUrl;
/**
* 标题
*/
@ApiModelProperty(value = "标题")
private String title;
/**
* 商品id
*/
@ApiModelProperty(value = "商品id")
private String spuId;
/**
* 展示形式:1、一行2、二行
*/
@ApiModelProperty(value = "1、一行2、二行")
private Integer displayType;
/**
* 分类
*/
@ApiModelProperty(value = "分类")
private String categoryType;
/**
* 活动链接
*/
@ApiModelProperty(value = "活动链接")
private String activityUrl;
/**
* 1、分类2、专题3、商品单品
*/
@ApiModelProperty(value = "1、分类2、专题3、商品单品")
private Integer navigationType;
/**
* 顺序
*/
@ApiModelProperty(value = "顺序")
private Integer indexs;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
/**
* 修改时间
*/
@ApiModelProperty(value = "修改时间")
private LocalDateTime updateTime;
/**
* 导航id
*/
@ApiModelProperty(value = "导航id")
private String navigationId;
/**
* 0未删除1已删除
*/
@ApiModelProperty(value = "0未删除1已删除")
private Integer delTag;
/**
* 商品名字
*/
@ApiModelProperty(value = "商品名字")
private String spuName;
}
......@@ -5,10 +5,11 @@ import com.alibaba.fastjson.JSON;
import com.liquidnet.client.admin.common.core.controller.BaseController;
import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import com.liquidnet.client.admin.zhengzai.goblin.service.impl.GoblinFrontNavigationServiceImpl;
import com.liquidnet.service.goblin.entity.GoblinFrontBanner;
import com.liquidnet.service.goblin.entity.GoblinFrontNavigation;
import com.liquidnet.service.goblin.param.GoblinFrontNavigationBuildParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......@@ -35,7 +36,9 @@ public class GoblinFrontNavigationController extends BaseController {
@PostMapping("create")
@ApiOperation(value = "增加金刚位")
@ResponseBody
public AjaxResult create(@RequestBody GoblinFrontNavigation goblinFrontNavigation) {
public AjaxResult create(@RequestBody GoblinFrontNavigationBuildParam goblinFrontNavigationBuildParam) {
GoblinFrontNavigation goblinFrontNavigation=new GoblinFrontNavigation();
BeanUtils.copyProperties(goblinFrontNavigationBuildParam,goblinFrontNavigation);
logger.info("增加金刚位{}", JSON.toJSONString(goblinFrontNavigation));
boolean result=goblinFrontNavigationService.create(goblinFrontNavigation);
if (result ) {
......@@ -53,7 +56,9 @@ public class GoblinFrontNavigationController extends BaseController {
@PostMapping("update")
@ApiOperation(value = "修改金刚位")
@ResponseBody
public AjaxResult update( @RequestBody GoblinFrontNavigation goblinFrontNavigation) {
public AjaxResult update( @RequestBody GoblinFrontNavigationBuildParam goblinFrontNavigationBuildParam) {
GoblinFrontNavigation goblinFrontNavigation=new GoblinFrontNavigation();
BeanUtils.copyProperties(goblinFrontNavigationBuildParam,goblinFrontNavigation);
logger.info("修改金刚位{}", JSON.toJSONString(goblinFrontNavigation));
boolean result=goblinFrontNavigationService.update(goblinFrontNavigation);
if (result ) {
......@@ -68,7 +73,9 @@ public class GoblinFrontNavigationController extends BaseController {
@PostMapping("delete")
@ApiOperation(value = "删除金刚位")
@ResponseBody
public AjaxResult delete( @RequestBody GoblinFrontNavigation goblinFrontNavigation) {
public AjaxResult delete( @RequestBody GoblinFrontNavigationBuildParam goblinFrontNavigationBuildParam) {
GoblinFrontNavigation goblinFrontNavigation=new GoblinFrontNavigation();
BeanUtils.copyProperties(goblinFrontNavigationBuildParam,goblinFrontNavigation);
logger.info("删除金刚位{}", JSON.toJSONString(goblinFrontNavigation));
boolean result=goblinFrontNavigationService.delete(goblinFrontNavigation.getMid());
if (result ) {
......@@ -84,8 +91,10 @@ public class GoblinFrontNavigationController extends BaseController {
@PostMapping("page")
@ApiOperation(value = "分页")
@ResponseBody
public AjaxResult page( @RequestParam(name = "pageSize", required = true) int pageSize,@RequestParam(name = "pageNumber", required = true)int pageNumber,@RequestBody GoblinFrontBanner goblinFrontBanner) {
logger.info("分页banner{}", JSON.toJSONString(goblinFrontBanner));
public AjaxResult page( @RequestParam(name = "pageSize", required = true) int pageSize,@RequestParam(name = "pageNumber", required = true)int pageNumber,@RequestBody GoblinFrontNavigationBuildParam goblinFrontNavigationBuildParam) {
GoblinFrontNavigation goblinFrontNavigation=new GoblinFrontNavigation();
BeanUtils.copyProperties(goblinFrontNavigationBuildParam,goblinFrontNavigation);
logger.info("分页金刚位{}", JSON.toJSONString(goblinFrontNavigation));
return AjaxResult.success(goblinFrontNavigationService.page(pageSize,pageNumber,null));
}
......@@ -97,7 +106,9 @@ public class GoblinFrontNavigationController extends BaseController {
@PostMapping("getOne")
@ApiOperation(value = "查看金刚位")
@ResponseBody
public AjaxResult getOne( @RequestBody GoblinFrontNavigation goblinFrontNavigation) {
public AjaxResult getOne( @RequestBody GoblinFrontNavigationBuildParam goblinFrontNavigationBuildParam) {
GoblinFrontNavigation goblinFrontNavigation=new GoblinFrontNavigation();
BeanUtils.copyProperties(goblinFrontNavigationBuildParam,goblinFrontNavigation);
logger.info("修改banner{}", JSON.toJSONString(goblinFrontNavigation));
goblinFrontNavigation=goblinFrontNavigationService.getOne(goblinFrontNavigation.getMid());
return AjaxResult.success(goblinFrontNavigation);
......
......@@ -18,7 +18,6 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
/**
......@@ -57,10 +56,14 @@ public class GoblinFrontSeckillController extends BaseController {
LambdaQueryWrapper<GoblinSelfMarketing> queryWrapperM = Wrappers.lambdaQuery(GoblinSelfMarketing.class);
queryWrapperM.ne(GoblinSelfMarketing::getStatus,7);
List<GoblinSelfMarketing> listGoblinSelfMarketing=goblinSelfMarketingMapper.selectList(queryWrapperM);
List<Object> list=CollectionUtil.arrayListObject();
list.addAll(listStoreMarketing);
list.addAll(listGoblinSelfMarketing);
//整合
HashMap<String, Object> list= CollectionUtil.mapStringObject();
/* HashMap<String, Object> list= CollectionUtil.mapStringObject();
list.put("listStoreMarketing",listStoreMarketing);
list.put("listGoblinSelfMarketing",listGoblinSelfMarketing);
list.put("listGoblinSelfMarketing",listGoblinSelfMarketing);*/
return AjaxResult.success(list);
}
......
......@@ -2,7 +2,6 @@ package com.liquidnet.client.admin.zhengzai.goblin.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
......@@ -65,12 +64,12 @@ public class GoblinFrontSeckillServiceImpl extends ServiceImpl<GoblinFrontSeckil
goblinFrontSeckill.setUpdateTime(LocalDateTime.now());
//数据库修改
goblinFrontSeckillMapper.updateById(goblinFrontSeckill);
//修改所有的展示形式
/* //修改所有的展示形式
UpdateWrapper updateWrapper = new UpdateWrapper();
updateWrapper.set("activityType", goblinFrontSeckill.getActivityType());
updateWrapper.set("show_type", goblinFrontSeckill.getShowType());
goblinFrontSeckillMapper.update(null,updateWrapper);
goblinFrontSeckillMapper.update(null,updateWrapper);*/
return true;
}
public GoblinFrontSeckill getOne(Long id){
......
......@@ -15,7 +15,7 @@ import java.time.LocalDateTime;
* </p>
*
* @author liquidnet
* @since 2021-12-29
* @since 2021-12-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
......@@ -30,10 +30,10 @@ public class GoblinFrontSeckill implements Serializable {
private Long mid;
/**
* 活动id
* 官方活动id
*/
@TableField("activityId")
private Long activityId;
@TableField("self_activityIds")
private String selfActivityids;
/**
* 1、一行三个2、两行三个
......@@ -65,13 +65,12 @@ public class GoblinFrontSeckill implements Serializable {
* 排序
*/
private Integer indexs;
/**
* 秒杀id
*/
private String seckilId;
/**
* 1、官方营销表2、商铺营销表
*/
private int marketType;
}
XADD goblin:stream:store.market * 0 0
XGROUP CREATE goblin:stream:store.market group.store.market 0
\ No newline at end of file
......@@ -4,6 +4,8 @@ import com.github.pagehelper.PageInfo;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseItemParam;
import com.liquidnet.service.goblin.dto.vo.GoblinStoreMarketVo;
import com.liquidnet.service.goblin.entity.GoblinStoreMarketPurchasing;
......@@ -11,6 +13,7 @@ import com.liquidnet.service.goblin.entity.GoblinStoreMarketing;
import com.liquidnet.service.goblin.service.manage.IGoblinStorePurchasingService;
import com.liquidnet.service.goblin.util.GoblinMongoUtils;
import com.liquidnet.service.goblin.util.GoblinRedisUtils;
import com.liquidnet.service.goblin.util.QueueUtils;
import me.chanjar.weixin.common.util.DataUtils;
import org.apache.commons.lang.time.DateUtils;
import org.springframework.beans.BeanUtils;
......@@ -30,6 +33,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
GoblinRedisUtils goblinRedisUtils;
@Autowired
GoblinMongoUtils goblinMongoUtils;
@Autowired
QueueUtils queueUtils;
@Override
public ResponseDto<PageInfo<GoblinStoreMarketVo>> purchasingList(int page, String purchaseName, int status, String st, String et, String ct) {
......@@ -75,7 +80,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
goblinRedisUtils.delGoblinStoreMarketVo(marketId, storeId);
break;
}
//mysql todo
//mysql
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_MARKET.getKey(),
SqlMapping.get("goblin.store.market.status", bean.getStatus(), bean.getDelFlag(), marketId, storeId));
return ResponseDto.success();
}
......@@ -95,6 +102,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
bean.setIsPre(isPre);
if (isPre == 1) {
bean.setPreTime(LocalDateTime.parse(preTime, DTF_YMD_HMS));
} else {
bean.setPreTime(null);
}
bean.setCreatedAt(LocalDateTime.now());
......@@ -108,7 +117,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
goblinMongoUtils.insertStoreMarket(vo);
//redis
goblinRedisUtils.setGoblinStoreMarketVo(storeMarketId, storeId, vo);
//mysql todo
//mysql
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_MARKET.getKey(),
SqlMapping.get("goblin.store.market.insert", bean.getStoreMarketId(), bean.getName(), bean.getType(), bean.getStatus(), bean.getStoreId(), bean.getStartTime(), bean.getEndTime(), bean.getDelFlag(), bean.getIsPre(), bean.getPreTime(), bean.getCreatedAt()));
return ResponseDto.success();
}
......@@ -126,7 +137,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
bean.setIsPre(isPre);
if (isPre == 1) {
bean.setPreTime(LocalDateTime.parse(preTime, DTF_YMD_HMS));
}else{
} else {
bean.setPreTime(null);
}
bean.setUpdatedAt(LocalDateTime.now());
......@@ -137,7 +148,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
goblinMongoUtils.updateStoreMarket(marketId, storeId, vo);
//redis
goblinRedisUtils.setGoblinStoreMarketVo(marketId, storeId, vo);
//mysql todo
//mysql
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_MARKET.getKey(),
SqlMapping.get("goblin.store.market.update", bean.getName(), bean.getType(), bean.getStatus(), bean.getStoreId(), bean.getDescribes(), bean.getStartTime(), bean.getEndTime(), bean.getDelFlag(), bean.getIsPre(), bean.getPreTime(), bean.getUpdatedAt(), bean.getStoreMarketId(), bean.getStoreId()));
return ResponseDto.success();
}
......@@ -169,6 +182,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
bean.setDelFlag(0);
bean.setCreatedAt(now);
//mongo
goblinRedisUtils.getGoodsInfoVo(item.getSpuId());
goblinRedisUtils.getGoodsSkuInfoVo(item.getSkuId());
//redis
}
......
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