|
@@ -1,16 +1,20 @@
|
|
|
package shop.alien.store.controller;
|
|
package shop.alien.store.controller;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
|
|
-import io.swagger.annotations.ApiOperationSupport;
|
|
|
|
|
|
|
+import io.swagger.annotations.*;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import shop.alien.entity.result.R;
|
|
import shop.alien.entity.result.R;
|
|
|
|
|
+import shop.alien.entity.store.LifeDiscountCouponFriendRule;
|
|
|
|
|
+import shop.alien.entity.store.LifeGroupBuyThali;
|
|
|
import shop.alien.entity.store.UserLoginInfo;
|
|
import shop.alien.entity.store.UserLoginInfo;
|
|
|
import shop.alien.entity.store.dto.LifeDiscountCouponStoreFriendDto;
|
|
import shop.alien.entity.store.dto.LifeDiscountCouponStoreFriendDto;
|
|
|
|
|
+import shop.alien.entity.store.dto.LifeGroupBuyDto;
|
|
|
|
|
+import shop.alien.entity.store.vo.LifeDiscountCouponFriendRuleDetailVo;
|
|
|
|
|
+import shop.alien.entity.store.vo.LifeDiscountCouponFriendRuleVo;
|
|
|
import shop.alien.entity.store.vo.LifeDiscountCouponStoreFriendVo;
|
|
import shop.alien.entity.store.vo.LifeDiscountCouponStoreFriendVo;
|
|
|
|
|
+import shop.alien.entity.store.vo.LifeGroupBuyCountDateVo;
|
|
|
import shop.alien.store.service.LifeDiscountCouponStoreFriendService;
|
|
import shop.alien.store.service.LifeDiscountCouponStoreFriendService;
|
|
|
import shop.alien.util.common.TokenInfo;
|
|
import shop.alien.util.common.TokenInfo;
|
|
|
import springfox.documentation.annotations.ApiIgnore;
|
|
import springfox.documentation.annotations.ApiIgnore;
|
|
@@ -119,4 +123,51 @@ public class LifeDiscountCouponStoreFriendController {
|
|
|
}
|
|
}
|
|
|
return R.fail("删除失败");
|
|
return R.fail("删除失败");
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperation("保存好友赠券规则")
|
|
|
|
|
+ @PostMapping("/saveFriendCouponRule")
|
|
|
|
|
+ public R saveFriendCouponRule(@RequestBody LifeDiscountCouponFriendRule lifeDiscountCouponFriendRule) {
|
|
|
|
|
+ log.info("LifeDiscountCouponStoreFriendController.saveFriendCouponRule?lifeDiscountCouponFriendRule={}", lifeDiscountCouponFriendRule.toString());
|
|
|
|
|
+ LifeDiscountCouponFriendRuleVo lifeDiscountCouponFriendRuleVo = lifeDiscountCouponStoreFriendService.saveFriendCouponRule(lifeDiscountCouponFriendRule);
|
|
|
|
|
+ return R.data(lifeDiscountCouponFriendRuleVo);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperation("删除赠券规则")
|
|
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true)
|
|
|
|
|
+ })
|
|
|
|
|
+ @GetMapping("/delFriendCouponRule")
|
|
|
|
|
+ private R delFriendCouponRule(@RequestParam(value = "id") String id) {
|
|
|
|
|
+ log.info("LifeDiscountCouponStoreFriendController.delFriendCouponRule?id={}", id);
|
|
|
|
|
+ lifeDiscountCouponStoreFriendService.delFriendCouponRule(id);
|
|
|
|
|
+ return R.success("删除成功");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperation("查询好友赠券")
|
|
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "storeUserId", value = "当前登录店铺用户id", dataType = "String", paramType = "query", required = true)
|
|
|
|
|
+ ,@ApiImplicitParam(name = "friendStoreUserId", value = "选中好友店铺用户id", dataType = "String", paramType = "query", required = false)
|
|
|
|
|
+ })
|
|
|
|
|
+ @GetMapping("/getReceivedFriendCouponList")
|
|
|
|
|
+ private R<List<LifeDiscountCouponFriendRuleDetailVo>> getReceivedFriendCouponList(@RequestParam(value = "storeUserId") String storeUserId, @RequestParam(value = "friendStoreUserId",required = false)String friendStoreUserId) {
|
|
|
|
|
+ log.info("LifeDiscountCouponStoreFriendController.getReceivedFriendCouponList?storeId={},friendStoreUserId={}", storeUserId,friendStoreUserId);
|
|
|
|
|
+ return R.data(lifeDiscountCouponStoreFriendService.getReceivedFriendCouponList(storeUserId,friendStoreUserId));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperation("查询赠券规则")
|
|
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "storeId", value = "当前登录店铺id", dataType = "String", paramType = "query", required = true)
|
|
|
|
|
+ })
|
|
|
|
|
+ @GetMapping("/getRuleList")
|
|
|
|
|
+ private R<List<LifeDiscountCouponFriendRuleVo>> getRuleList(@RequestParam(value = "storeId") String storeId) {
|
|
|
|
|
+ log.info("LifeDiscountCouponStoreFriendController.getRuleList?storeId={}", storeId);
|
|
|
|
|
+ return R.data(lifeDiscountCouponStoreFriendService.getRuleList(storeId));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperation("查询赠券记录")
|
|
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "storeUserId", value = "好友赠我", dataType = "String", paramType = "query", required = false)
|
|
|
|
|
+ ,@ApiImplicitParam(name = "friendStoreUserId", value = "我赠好友", dataType = "String", paramType = "query", required = false)
|
|
|
|
|
+ })
|
|
|
|
|
+ @GetMapping("/getReceivedSendFriendCouponList")
|
|
|
|
|
+ private R<List<LifeDiscountCouponFriendRuleVo>> getReceivedSendFriendCouponList(@RequestParam(value = "storeUserId",required = false) String storeUserId, @RequestParam(value = "friendStoreUserId",required = false)String friendStoreUserId) {
|
|
|
|
|
+ log.info("LifeDiscountCouponStoreFriendController.getReceivedSendFriendCouponList?storeId={},friendStoreUserId={}", storeUserId,friendStoreUserId);
|
|
|
|
|
+ return R.data(lifeDiscountCouponStoreFriendService.getReceivedSendFriendCouponList(storeUserId,friendStoreUserId));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|