|
|
@@ -6,6 +6,7 @@ import com.sqx.common.utils.Result;
|
|
|
import com.sqx.modules.activity.dto.JoinActivityDTO;
|
|
|
import com.sqx.modules.activity.dto.QuitActivityDTO;
|
|
|
import com.sqx.modules.activity.service.ActivityShopService;
|
|
|
+import com.sqx.modules.activity.vo.ShopActivityVO;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
@@ -19,6 +20,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 活动商家
|
|
|
@@ -40,6 +43,13 @@ public class ActivityShopController{
|
|
|
return Result.success().put("data", page);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "商家参与活动列表", response = ShopActivityVO.class)
|
|
|
+ @GetMapping("shop-activity-list/{shopId}")
|
|
|
+ public Result getShopActivityPage(@PathVariable @ApiParam("商家id") Long shopId) {
|
|
|
+ List<ShopActivityVO> shopActivityVOList = activityShopService.getActivityByShopIds(Arrays.asList(shopId));
|
|
|
+ return Result.success().put("data", shopActivityVOList);
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation("商家加入活动")
|
|
|
@PostMapping("join")
|
|
|
public Result joinActivity(@RequestBody @Valid JoinActivityDTO dto) {
|