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

Commit 715c622d authored by 张国柄's avatar 张国柄

+API:商铺活动:优惠券相关;

parent da308c8e
...@@ -62,7 +62,7 @@ public class GoblinStoreMgtCouponAddParam implements Serializable { ...@@ -62,7 +62,7 @@ public class GoblinStoreMgtCouponAddParam implements Serializable {
@ApiModelProperty(position = 20, required = true, value = "使用范围[0-全部商品|1-部分商品]", allowableValues = "0,1", example = "0") @ApiModelProperty(position = 20, required = true, value = "使用范围[0-全部商品|1-部分商品]", allowableValues = "0,1", example = "0")
private String useScope; private String useScope;
@ApiModelProperty(position = 21, required = false, value = "适用商品集合LIST") @ApiModelProperty(position = 21, required = false, value = "适用SPUID集合LIST")
@Valid private List<String> spuIdList;
private List<GoblinStoreMgtCouponAddGoods> skuParamList; // private List<GoblinStoreMgtCouponAddGoods> skuParamList;
} }
...@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import javax.validation.Valid;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@ApiSupport(order = 149006) @ApiSupport(order = 149006)
@Api(tags = "商铺活动:优惠券管理") @Api(tags = "商铺活动:优惠券管理")
...@@ -42,7 +43,9 @@ public class GoblinStoreMgtCouponController { ...@@ -42,7 +43,9 @@ public class GoblinStoreMgtCouponController {
@ApiOperation(value = "优惠券列表") @ApiOperation(value = "优惠券列表")
@PostMapping("list") @PostMapping("list")
public ResponseDto<PagedResult<GoblinStoreMgtCouponListVo>> list(@Valid @RequestBody GoblinStoreMgtCouponFilterParam mgtCouponFilterParam) { public ResponseDto<PagedResult<GoblinStoreMgtCouponListVo>> list(@Valid @RequestBody GoblinStoreMgtCouponFilterParam mgtCouponFilterParam) {
if (log.isDebugEnabled()) {
log.debug("商铺活动:优惠券列表:[mgtCouponFilterParam={}]", JsonUtils.toJson(mgtCouponFilterParam));
}
return ResponseDto.success(); return ResponseDto.success();
} }
...@@ -50,6 +53,9 @@ public class GoblinStoreMgtCouponController { ...@@ -50,6 +53,9 @@ public class GoblinStoreMgtCouponController {
@ApiOperation(value = "优惠券导出", notes = "#以POST模拟FORM表单请求该接口") @ApiOperation(value = "优惠券导出", notes = "#以POST模拟FORM表单请求该接口")
@PostMapping("export") @PostMapping("export")
public void export(@Valid GoblinStoreMgtCouponFilterParam mgtCouponFilterParam) { public void export(@Valid GoblinStoreMgtCouponFilterParam mgtCouponFilterParam) {
if (log.isDebugEnabled()) {
log.debug("商铺活动:优惠券导出:[mgtCouponFilterParam={}]", JsonUtils.toJson(mgtCouponFilterParam));
}
} }
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
...@@ -85,7 +91,9 @@ public class GoblinStoreMgtCouponController { ...@@ -85,7 +91,9 @@ public class GoblinStoreMgtCouponController {
@ApiOperation(value = "新增优惠券") @ApiOperation(value = "新增优惠券")
@PutMapping("add") @PutMapping("add")
public ResponseDto<Object> add(@Valid @RequestBody GoblinStoreMgtCouponAddParam mgtCouponAddParam) { public ResponseDto<Object> add(@Valid @RequestBody GoblinStoreMgtCouponAddParam mgtCouponAddParam) {
if (log.isDebugEnabled()) {
log.debug("商铺活动:新增优惠券:[mgtCouponAddParam={}]", JsonUtils.toJson(mgtCouponAddParam));
}
return ResponseDto.success(); return ResponseDto.success();
} }
...@@ -93,7 +101,7 @@ public class GoblinStoreMgtCouponController { ...@@ -93,7 +101,7 @@ public class GoblinStoreMgtCouponController {
@ApiOperation(value = "优惠券详情") @ApiOperation(value = "优惠券详情")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "storeId", value = "店铺ID"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "storeId", value = "店铺ID"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "spuId", value = "优惠券ID"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "storeCouponId", value = "优惠券ID"),
}) })
@GetMapping("info") @GetMapping("info")
public ResponseDto<GoblinStoreMgtCouponInfoVo> info(@NotBlank(message = "店铺ID不能为空") @RequestParam String storeId, public ResponseDto<GoblinStoreMgtCouponInfoVo> info(@NotBlank(message = "店铺ID不能为空") @RequestParam String storeId,
...@@ -102,7 +110,7 @@ public class GoblinStoreMgtCouponController { ...@@ -102,7 +110,7 @@ public class GoblinStoreMgtCouponController {
return ResponseDto.failure(ErrorMapping.get("149002")); return ResponseDto.failure(ErrorMapping.get("149002"));
} }
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("商品管理:SPU详情:[storeId={},spuId={}]", storeId, storeCouponId); log.debug("商铺活动:优惠券详情:[storeId={},storeCouponId={}]", storeId, storeCouponId);
} }
return ResponseDto.success(); return ResponseDto.success();
} }
...@@ -110,8 +118,23 @@ public class GoblinStoreMgtCouponController { ...@@ -110,8 +118,23 @@ public class GoblinStoreMgtCouponController {
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@ApiOperation(value = "优惠券编辑", notes = "只修改基本信息,不包含发放设置修改") @ApiOperation(value = "优惠券编辑", notes = "只修改基本信息,不包含发放设置修改")
@PostMapping("edit") @PostMapping("edit")
public ResponseDto<Object> editSpu(@Valid @RequestBody GoblinStoreMgtCouponAddParam mgtCouponEditParam) { public ResponseDto<Object> edit(@Valid @RequestBody GoblinStoreMgtCouponAddParam mgtCouponEditParam) {
log.info("商铺活动:优惠券编辑:[mgtCouponEditParam={}]", JsonUtils.toJson(mgtCouponEditParam));
return ResponseDto.success();
}
@ApiOperationSupport(order = 7)
@ApiOperation(value = "优惠券库存编辑")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "storeId", value = "店铺ID"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "storeCouponId", value = "优惠券ID"),
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "stock", value = "增减库存"),
})
@PostMapping("edit_stock")
public ResponseDto<Object> editStock(@NotBlank(message = "店铺ID不能为空") @RequestParam String storeId,
@NotBlank(message = "优惠券ID不能为空") @RequestParam String storeCouponId,
@NotNull(message = "增减库存值不能为空") @RequestParam Integer stock) {
log.info("商铺活动:优惠券库存编辑:[storeId={},storeCouponId={},stock={}]", storeId, storeCouponId, stock);
return ResponseDto.success(); return ResponseDto.success();
} }
} }
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