小程序轮播图
This commit is contained in:
parent
61353a17f4
commit
6f1d1f2be1
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.playlet.web.controller.app;
|
||||||
|
|
||||||
|
import com.playlet.common.core.domain.Result;
|
||||||
|
import com.playlet.system.domain.PlayletBanner;
|
||||||
|
import com.playlet.web.service.app.PlayletBannerService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "小程序*短剧轮播图接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = "/app/banner")
|
||||||
|
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||||
|
public class PlayletBannerAppController {
|
||||||
|
|
||||||
|
private final PlayletBannerService playletBannerService;
|
||||||
|
|
||||||
|
@ResponseBody
|
||||||
|
@PostMapping(value = "/getBannerList")
|
||||||
|
@ApiOperation(value = "获取轮播图资料", httpMethod = "POST")
|
||||||
|
public Result<List<PlayletBanner>> getBannerList(@RequestBody PlayletBanner playletBanner){
|
||||||
|
try {
|
||||||
|
return Result.success(playletBannerService.getBannerList(playletBanner));
|
||||||
|
}catch (Exception e){
|
||||||
|
return Result.error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.playlet.web.service.app;
|
||||||
|
|
||||||
|
import com.playlet.system.domain.PlayletBanner;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>短剧公告app的service类</p>
|
||||||
|
* @author clunt
|
||||||
|
*/
|
||||||
|
public interface PlayletBannerService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param playletBanner 轮播图查询条件
|
||||||
|
* @return 轮播图全部
|
||||||
|
*/
|
||||||
|
List<PlayletBanner> getBannerList(PlayletBanner playletBanner);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.playlet.web.service.app.impl;
|
||||||
|
|
||||||
|
import com.playlet.system.domain.PlayletBanner;
|
||||||
|
import com.playlet.system.service.IPlayletBannerService;
|
||||||
|
import com.playlet.web.service.app.PlayletBannerService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author clunt
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||||
|
public class PlayletBannerServiceImpl implements PlayletBannerService {
|
||||||
|
|
||||||
|
private final IPlayletBannerService iPlayletBannerService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PlayletBanner> getBannerList(PlayletBanner playletBanner) {
|
||||||
|
return iPlayletBannerService.selectPlayletBannerList(playletBanner);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue