|
|
@@ -16,6 +16,7 @@ import shop.alien.store.annotation.TrackEvent;
|
|
|
import shop.alien.store.service.LifeDiscountCouponStoreFriendService;
|
|
|
import shop.alien.util.common.TokenInfo;
|
|
|
import springfox.documentation.annotations.ApiIgnore;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
@@ -177,12 +178,25 @@ public class LifeDiscountCouponStoreFriendController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation("查询赠券规则")
|
|
|
- @ApiImplicitParams({@ApiImplicitParam(name = "storeId", value = "当前登录店铺id", dataType = "String", paramType = "query", required = true)
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "storeId", value = "当前登录店铺id", dataType = "String", paramType = "query", required = true),
|
|
|
+ @ApiImplicitParam(name = "acName", value = "活动名称(模糊查询,可选)", dataType = "String", paramType = "query", required = false),
|
|
|
+ @ApiImplicitParam(name = "status", value = "状态:0-启用,1-禁用(可选)", dataType = "String", paramType = "query", required = false)
|
|
|
})
|
|
|
@GetMapping("/getRuleList")
|
|
|
- public R<List<LifeDiscountCouponFriendRuleVo>> getRuleList(@RequestParam(value = "storeId") String storeId, String acName, String status) {
|
|
|
- log.info("LifeDiscountCouponStoreFriendController.getRuleList?storeId={},name={},status={}", storeId, acName, status);
|
|
|
- return R.data(lifeDiscountCouponStoreFriendService.getRuleList(storeId, acName, status));
|
|
|
+ public R<List<LifeDiscountCouponFriendRuleVo>> getRuleList(@RequestParam(value = "storeId") String storeId,
|
|
|
+ @RequestParam(value = "acName", required = false) String acName,
|
|
|
+ @RequestParam(value = "status", required = false) String status) {
|
|
|
+ log.info("LifeDiscountCouponStoreFriendController.getRuleList?storeId={},acName={},status={}", storeId, acName, status);
|
|
|
+ try {
|
|
|
+ if (StringUtils.isEmpty(storeId)) {
|
|
|
+ return R.fail("店铺ID不能为空");
|
|
|
+ }
|
|
|
+ return R.data(lifeDiscountCouponStoreFriendService.getRuleList(storeId, acName, status));
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("LifeDiscountCouponStoreFriendController.getRuleList ERROR Msg={}", e.getMessage(), e);
|
|
|
+ return R.fail("查询失败:" + e.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@ApiOperation("查询赠券记录(商户送给商户券)。queryType=1查询我收到的,queryType=2查询我送出的。type=4仅代金券,不传返回全部(优惠券+代金券)。couponType=1仅满减券,couponType=2仅折扣券,不传返回全部优惠券")
|