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

Commit c49455bc authored by 胡佳晨's avatar 胡佳晨

提交 正在下单配置

parent 8ea653fa
package com.liquidnet.service.goblin.dto.manage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.List;
@ApiModel(value = "GoblinStorePurchaseItemParam")
@Data
public class GoblinStoreZhengzaiCommonParam {
@ApiModelProperty(required = true, value = "商铺活动Id", example = "1")
@NotBlank(message = "商铺活动Id不能为空")
private String selfMarketId;
@ApiModelProperty(required = true, value = "商铺Id", example = "1")
@NotBlank(message = "商铺id不能为空")
private String storeId;
@ApiModelProperty(required = true, value = "spuId", example = "1")
@NotBlank(message = "spuId不能空")
private String spuId;
@ApiModelProperty(required = true, value = "相关配置")
private List<GoblinStoreZhengzaiItemParam> goblinStoreZhengzaiItemParams;
}
package com.liquidnet.service.goblin.dto.manage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
@ApiModel(value = "GoblinStorePurchaseItemParam")
@Data
public class GoblinStoreZhengzaiItemParam {
@ApiModelProperty(required = true, value = "skuId", example = "1")
@NotBlank(message = "skuId不能为空")
private String skuId;
@ApiModelProperty(required = true, value = "活动价格", example = "1.00")
@NotBlank(message = "活动价格不能为空")
private BigDecimal priceMarketing;
@ApiModelProperty(required = true, value = "活动库存", example = "1.00")
@NotBlank(message = "活动库存不能为空")
private Integer stockMarketing;
@ApiModelProperty(required = true, value = "用户限购[0-不限购|x-限购数量]", example = "1")
@NotBlank(message = "用户限购类型不能为空")
private Integer buyLimit;
@ApiModelProperty(required = true, value = "购买条件[0-全部用户|1-仅支持会员|2-指定用户可买]", example = "1")
@NotBlank(message = "购买条件不能为空")
private Integer buyFactor;
@ApiModelProperty(required = false, value = "购买限制人员名单[购买限制为2-指定用户时必填]", example = "")
private String buyRoster;
}
package com.liquidnet.service.goblin.dto.vo;
import com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
@ApiModel(value = "GoblinStorePurchaseSkuVo", description = "限时秒杀活动-商品SkuVo")
@Data
public class GoblinSelfZhengzaiSkuVo implements Serializable, Cloneable {
private static final long serialVersionUID = 8425727558228094904L;
@ApiModelProperty(position = 0, value = "单品规格信息")
private List<GoblinGoodsSpecDto> skuSpecList;
@ApiModelProperty(position = 1, value = "marketSkuId")
private String marketSkuId;
@ApiModelProperty(position = 1, value = "总库存")
private Integer stock;
@ApiModelProperty(position = 2, value = "可配置库存")
private Integer skuStock;
@ApiModelProperty(position = 3, value = "原价")
private BigDecimal price;
@ApiModelProperty(position = 4, value = "秒杀价")
private BigDecimal priceMarketing;
@ApiModelProperty(position = 5, value = "库存数量")
private Integer stockMarketing;
@ApiModelProperty(position = 6, value = "限量[0-无限制|X:限购数量]")
private Integer buyLimit;
@ApiModelProperty(position = 7, value = "购买限制[0-全部用户|1-仅会员|2-指定用户]")
private String buyFactor;
@ApiModelProperty(position = 8, value = "购买限制人员名单[购买限制为2-指定用户时必填]")
private String buyRoster;
private static final GoblinSelfZhengzaiSkuVo obj = new GoblinSelfZhengzaiSkuVo();
public static GoblinSelfZhengzaiSkuVo getNew() {
try {
return (GoblinSelfZhengzaiSkuVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinSelfZhengzaiSkuVo();
}
}
}
package com.liquidnet.service.goblin.service.manage; package com.liquidnet.service.goblin.service.manage;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseCommonParam;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreZhengzaiCommonParam;
import com.liquidnet.service.goblin.dto.vo.GoblinMarketSpuListVo;
import com.liquidnet.service.goblin.dto.vo.GoblinSelfMarketingVo; import com.liquidnet.service.goblin.dto.vo.GoblinSelfMarketingVo;
import com.liquidnet.service.goblin.dto.vo.GoblinSelfZhengzaiSkuVo;
import com.liquidnet.service.goblin.dto.vo.GoblinStorePurchaseSkuVo;
import java.util.List; import java.util.List;
...@@ -10,4 +16,45 @@ public interface IGoblinZhengzaiService { ...@@ -10,4 +16,45 @@ public interface IGoblinZhengzaiService {
GoblinSelfMarketingVo zhengzaiCanJoinDetails(String marketId,String storeId); GoblinSelfMarketingVo zhengzaiCanJoinDetails(String marketId,String storeId);
/**
* 获取活动内spu列表
*
* @param marketId 活动秒杀id
* @param page 页数
* @return
*/
ResponseDto<List<GoblinMarketSpuListVo>> zhengzaiSpuList(String marketId, String storeId, int page);
/**
* 获取活动内sku列表
*
* @param selfMarketId 正在下单id
* @return
*/
ResponseDto<List<GoblinSelfZhengzaiSkuVo>> zhengzaiSkuList(String selfMarketId, String storeId, String spuId);
/**
* 添加活动相关sku
*
* @param params
* @return
*/
ResponseDto<Boolean> zhengzaiSkuInsert(GoblinStoreZhengzaiCommonParam params);
/**
* 编辑活动相关sku
*
* @param params
* @return
*/
ResponseDto<Boolean> zhengzaiSkuUpdate(GoblinStoreZhengzaiCommonParam params);
/**
* 删除活动内sku
*
* @param marketId 活动秒杀id
* @param spuId spuId
* @return
*/
ResponseDto<Boolean> zhengzaiSpuDel(String marketId, String storeId, String spuId);
} }
...@@ -202,6 +202,7 @@ public class MQConst { ...@@ -202,6 +202,7 @@ public class MQConst {
public enum GoblinQueue { public enum GoblinQueue {
GOBLIN_STORE_MARKET("goblin:stream:store.market", "group.store.market", "店铺活动"), GOBLIN_STORE_MARKET("goblin:stream:store.market", "group.store.market", "店铺活动"),
GOBLIN_SELF_MARKET("goblin:stream:self.market", "group.self.market", "平台活动"),
; ;
private final String key; private final String key;
......
...@@ -63,7 +63,7 @@ public class GoblinMarketingZhengzai implements Serializable,Cloneable { ...@@ -63,7 +63,7 @@ public class GoblinMarketingZhengzai implements Serializable,Cloneable {
/** /**
* 购买限制[0-全部用户|1-仅会员|2-指定用户] * 购买限制[0-全部用户|1-仅会员|2-指定用户]
*/ */
private String buyFactor; private Integer buyFactor;
/** /**
* 购买限制人员名单[购买限制为2-指定用户时必填] * 购买限制人员名单[购买限制为2-指定用户时必填]
...@@ -75,6 +75,11 @@ public class GoblinMarketingZhengzai implements Serializable,Cloneable { ...@@ -75,6 +75,11 @@ public class GoblinMarketingZhengzai implements Serializable,Cloneable {
*/ */
private Integer buyLimit; private Integer buyLimit;
/**
* 删除标记[0-未删除|1-删除]
*/
private Integer delFlag;
private LocalDateTime createdAt; private LocalDateTime createdAt;
private LocalDateTime updatedAt; private LocalDateTime updatedAt;
......
XADD goblin:stream:store.market * 0 0 XADD goblin:stream:store.market * 0 0
XGROUP CREATE goblin:stream:store.market group.store.market 0 XGROUP CREATE goblin:stream:store.market group.store.market 0
\ No newline at end of file
XADD goblin:stream:self.market * 0 0
XGROUP CREATE goblin:stream:self.market group.self.market 0
\ No newline at end of file
package com.liquidnet.service.goblin.controller.manage; package com.liquidnet.service.goblin.controller.manage;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinMarketSpuListVo;
import com.liquidnet.service.goblin.dto.vo.GoblinSelfMarketingVo; import com.liquidnet.service.goblin.dto.vo.GoblinSelfMarketingVo;
import com.liquidnet.service.goblin.dto.vo.GoblinSelfZhengzaiSkuVo;
import com.liquidnet.service.goblin.dto.vo.GoblinStorePurchaseSkuVo;
import com.liquidnet.service.goblin.service.manage.IGoblinZhengzaiService; import com.liquidnet.service.goblin.service.manage.IGoblinZhengzaiService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -45,43 +48,56 @@ public class GoblinZhengzaiController { ...@@ -45,43 +48,56 @@ public class GoblinZhengzaiController {
return ResponseDto.success(goblinZhengzaiService.zhengzaiCanJoinDetails(selfMarketId, storeId)); return ResponseDto.success(goblinZhengzaiService.zhengzaiCanJoinDetails(selfMarketId, storeId));
} }
@PostMapping("zhengzai/config") @GetMapping("zhengzai/config/spu")
@ApiOperation("活动详情-正在下单-配置商铺sku") @ApiOperation("活动详情-正在下单-获取商铺spu")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "storeId", value = "商铺id", example = "1"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "storeId", value = "商铺id", example = "1"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "selfMarketId", value = "官方活动id", example = "1") @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "selfMarketId", value = "官方活动id", example = "1"),
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "page", value = "页数", example = "1")
}) })
public ResponseDto<Boolean> zhengzaiStoreConfig(@RequestParam("storeId") @Valid String storeId, public ResponseDto<List<GoblinMarketSpuListVo>> zhengzaiStoreConfigSpuList(@RequestParam("storeId") @Valid String storeId,
@RequestParam("selfMarketId") @Valid String selfMarketId) { @RequestParam("selfMarketId") @Valid String selfMarketId,
//todo @RequestParam("page") @Valid int page) {
return null; return goblinZhengzaiService.zhengzaiSpuList(selfMarketId, storeId, page);
} }
@GetMapping("zhengzai/config/spu") @GetMapping("zhengzai/config/sku")
@ApiOperation("活动详情-正在下单-获取商铺spu") @ApiOperation("活动详情-正在下单-获取商铺sku")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "storeId", value = "商铺id", example = "1"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "selfMarketId", value = "官方活动id", example = "1"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "spuId", value = "spuId", example = "1")
})
public ResponseDto<List<GoblinSelfZhengzaiSkuVo>> zhengzaiStoreConfigSkuList(@RequestParam("storeId") @Valid String storeId,
@RequestParam("spuId") @Valid String spuId,
@RequestParam("selfMarketId") @Valid String selfMarketId) {
return goblinZhengzaiService.zhengzaiSkuList(selfMarketId, storeId, spuId);
}
@PostMapping("zhengzai/config")
@ApiOperation("活动详情-正在下单-配置商铺sku")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "storeId", value = "商铺id", example = "1"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "storeId", value = "商铺id", example = "1"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "selfMarketId", value = "官方活动id", example = "1") @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "selfMarketId", value = "官方活动id", example = "1")
}) })
public ResponseDto<Boolean> zhengzaiStoreConfigSpuList(@RequestParam("storeId") @Valid String storeId, public ResponseDto<Boolean> zhengzaiStoreInsert(@RequestParam("storeId") @Valid String storeId,
@RequestParam("selfMarketId") @Valid String selfMarketId) { @RequestParam("selfMarketId") @Valid String selfMarketId) {
//todo //todo
return null; return null;
} }
@GetMapping("zhengzai/config/sku") @PostMapping("zhengzai/config")
@ApiOperation("活动详情-正在下单-获取商铺sku") @ApiOperation("活动详情-正在下单-配置商铺sku")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "storeId", value = "商铺id", example = "1"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "storeId", value = "商铺id", example = "1"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "selfMarketId", value = "官方活动id", example = "1"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "selfMarketId", value = "官方活动id", example = "1")
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "spuId", value = "spuId", example = "1")
}) })
public ResponseDto<Boolean> zhengzaiStoreConfigSkuList(@RequestParam("storeId") @Valid String storeId, public ResponseDto<Boolean> zhengzaiStoreUpdate(@RequestParam("storeId") @Valid String storeId,
@RequestParam("spuId") @Valid String spuId, @RequestParam("selfMarketId") @Valid String selfMarketId) {
@RequestParam("selfMarketId") @Valid String selfMarketId) {
//todo //todo
return null; return null;
} }
......
...@@ -20,6 +20,7 @@ public class ObjectUtil { ...@@ -20,6 +20,7 @@ public class ObjectUtil {
private static final ArrayList<GoblinGoodsSpecVo> goblinGoodsSpecVoArrayList = new ArrayList<>(); private static final ArrayList<GoblinGoodsSpecVo> goblinGoodsSpecVoArrayList = new ArrayList<>();
private static final ArrayList<GoblinMarketSpuListVo> goblinMarketSpuListVoArrayList = new ArrayList<>(); private static final ArrayList<GoblinMarketSpuListVo> goblinMarketSpuListVoArrayList = new ArrayList<>();
private static final ArrayList<GoblinStorePurchaseSkuVo> goblinStorePurchaseSkuVoArrayList = new ArrayList<>(); private static final ArrayList<GoblinStorePurchaseSkuVo> goblinStorePurchaseSkuVoArrayList = new ArrayList<>();
private static final ArrayList<GoblinSelfZhengzaiSkuVo> goblinSelfZhengzaiSkuVoArrayList = new ArrayList<>();
private static final BasicDBObject basicDBObject = new BasicDBObject(); private static final BasicDBObject basicDBObject = new BasicDBObject();
...@@ -30,6 +31,7 @@ public class ObjectUtil { ...@@ -30,6 +31,7 @@ public class ObjectUtil {
public static ArrayList<GoblinFrontBannerVo> goblinFrontBannerVoArrayList() { public static ArrayList<GoblinFrontBannerVo> goblinFrontBannerVoArrayList() {
return (ArrayList<GoblinFrontBannerVo>) goblinFrontBannerVoArrayList.clone(); return (ArrayList<GoblinFrontBannerVo>) goblinFrontBannerVoArrayList.clone();
} }
public static ArrayList<GoblinFrontBanner> getGoblinFrontBannerArrayList() { public static ArrayList<GoblinFrontBanner> getGoblinFrontBannerArrayList() {
return (ArrayList<GoblinFrontBanner>) goblinFrontBannerArrayList.clone(); return (ArrayList<GoblinFrontBanner>) goblinFrontBannerArrayList.clone();
} }
...@@ -58,6 +60,11 @@ public class ObjectUtil { ...@@ -58,6 +60,11 @@ public class ObjectUtil {
return (ArrayList<GoblinStorePurchaseSkuVo>) goblinStorePurchaseSkuVoArrayList.clone(); return (ArrayList<GoblinStorePurchaseSkuVo>) goblinStorePurchaseSkuVoArrayList.clone();
} }
public static ArrayList<GoblinSelfZhengzaiSkuVo> getGoblinSelfZhengzaiSkuVoArrayList() {
return (ArrayList<GoblinSelfZhengzaiSkuVo>) goblinSelfZhengzaiSkuVoArrayList.clone();
}
public static BasicDBObject cloneBasicDBObject() { public static BasicDBObject cloneBasicDBObject() {
return (BasicDBObject) basicDBObject.clone(); return (BasicDBObject) basicDBObject.clone();
} }
......
...@@ -3,4 +3,8 @@ goblin.store.market.status=UPDATE goblin_store_marketing SET status=? , del_flag ...@@ -3,4 +3,8 @@ goblin.store.market.status=UPDATE goblin_store_marketing SET status=? , del_flag
goblin.store.market.update=UPDATE goblin_store_marketing SET name=?,type=?,status=?,store_id=?,describes=?,start_time=?,end_time=?,del_flag=?,is_pre=?,pre_time=?,updated_at=? WHERE store_market_id =? and store_id =? goblin.store.market.update=UPDATE goblin_store_marketing SET name=?,type=?,status=?,store_id=?,describes=?,start_time=?,end_time=?,del_flag=?,is_pre=?,pre_time=?,updated_at=? WHERE store_market_id =? and store_id =?
goblin.store.market.insertRelation=INSERT INTO goblin_store_market_purchasing (`purchase_id`,`store_market_id`,`spu_id`,`sku_id`,`store_id`,`price_marketing`,`stock_marketing`,`buy_factor`,`buy_roster`,`buy_limit`,`del_flag`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?) goblin.store.market.insertRelation=INSERT INTO goblin_store_market_purchasing (`purchase_id`,`store_market_id`,`spu_id`,`sku_id`,`store_id`,`price_marketing`,`stock_marketing`,`buy_factor`,`buy_roster`,`buy_limit`,`del_flag`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)
goblin.store.market.updateRelation=UPDATE goblin_store_market_purchasing SET price_marketing=? ,stock_marketing=? , buy_factor=?,buy_roster=?,buy_limit=?,updated_at=? WHERE store_market_id =? and store_id =? goblin.store.market.updateRelation=UPDATE goblin_store_market_purchasing SET price_marketing=? ,stock_marketing=? , buy_factor=?,buy_roster=?,buy_limit=?,updated_at=? WHERE store_market_id =? and store_id =?
goblin.store.market.delSpuRelation=UPDATE goblin_store_market_purchasing SET del_flag = ?,updated_at = ? WHERE store_market_id =? and store_id =? and spu_id=? goblin.store.market.delSpuRelation=UPDATE goblin_store_market_purchasing SET del_flag = ?,updated_at = ? WHERE store_market_id =? and store_id =? and spu_id=?
\ No newline at end of file
goblin.self.market.insertRelation=INSERT INTO goblin_marketing_zhengzai (`zhengzai_id`,`self_market_id`,`spu_id`,`sku_id`,`store_id`,`price_marketing`,`stock_marketing`,`buy_factor`,`buy_roster`,`buy_limit`,`del_flag`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)
goblin.self.market.updateRelation=UPDATE goblin_marketing_zhengzai SET price_marketing=? ,stock_marketing=? , buy_factor=?,buy_roster=?,buy_limit=?,updated_at=? WHERE self_market_id =? and store_id =?
goblin.self.market.delSpuRelation=UPDATE goblin_marketing_zhengzai SET del_flag = ?,updated_at = ? WHERE self_market_id =? and store_id =? and spu_id=?
\ No newline at end of file
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