## 新广告banner接口;
This commit is contained in:
parent
03844a7cb0
commit
2724653173
|
@ -5,14 +5,6 @@ import com.hzs.system.config.dto.AdvertBannerDTO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
|
||||||
* @BelongsProject: hzs_cloud
|
|
||||||
* @BelongsPackage: com.hzs.system.config
|
|
||||||
* @Author: yh
|
|
||||||
* @CreateTime: 2023-05-15 10:15
|
|
||||||
* @Description:
|
|
||||||
* @Version: 1.0
|
|
||||||
*/
|
|
||||||
public interface AdvertBannerServiceApi {
|
public interface AdvertBannerServiceApi {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -10,13 +10,6 @@ import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 广告banner
|
* 广告banner
|
||||||
*
|
|
||||||
* @BelongsProject: hzs_cloud
|
|
||||||
* @BelongsPackage: com.hzs.system.config.dto
|
|
||||||
* @Author: yh
|
|
||||||
* @CreateTime: 2023-05-15 10:21
|
|
||||||
* @Description:
|
|
||||||
* @Version: 1.0
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class AdvertBannerDTO implements Serializable {
|
public class AdvertBannerDTO implements Serializable {
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.hzs.system.base.controller.api;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.hzs.common.core.web.controller.BaseController;
|
||||||
|
import com.hzs.common.core.web.domain.AjaxResult;
|
||||||
|
import com.hzs.common.domain.system.config.BdAdvertBanner;
|
||||||
|
import com.hzs.system.config.dto.AdvertBannerDTO;
|
||||||
|
import com.hzs.system.config.service.IBdAdvertBannerService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页banner
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/banner")
|
||||||
|
public class ApiBannerController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBdAdvertBannerService iBdAdvertBannerService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner列表
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list() {
|
||||||
|
List<BdAdvertBanner> bannerList = iBdAdvertBannerService.listData(null);
|
||||||
|
if (CollectionUtil.isNotEmpty(bannerList)) {
|
||||||
|
return AjaxResult.success(bannerList.stream().map(advertBanner -> BeanUtil.copyProperties(advertBanner, AdvertBannerDTO.class)).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -51,7 +51,6 @@ public class ApiNoticeController extends BaseController {
|
||||||
return tableDataInfo;
|
return tableDataInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页显示公告弹窗
|
* 首页显示公告弹窗
|
||||||
*
|
*
|
||||||
|
@ -108,6 +107,12 @@ public class ApiNoticeController extends BaseController {
|
||||||
return AjaxResult.success(iBdNoticeService.showIndexMailCount(noticeVO));
|
return AjaxResult.success(iBdNoticeService.showIndexMailCount(noticeVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页站内弹详情
|
||||||
|
*
|
||||||
|
* @param pkId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@GetMapping("index-detail")
|
@GetMapping("index-detail")
|
||||||
public AjaxResult index(Long pkId) {
|
public AjaxResult index(Long pkId) {
|
||||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||||
|
@ -115,7 +120,6 @@ public class ApiNoticeController extends BaseController {
|
||||||
return AjaxResult.success(iBdNoticeService.showIndexNoticeDetail(pkId, pkCountry, pkMember));
|
return AjaxResult.success(iBdNoticeService.showIndexNoticeDetail(pkId, pkCountry, pkMember));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页显示站内信弹窗
|
* 首页显示站内信弹窗
|
||||||
*
|
*
|
||||||
|
@ -125,4 +129,5 @@ public class ApiNoticeController extends BaseController {
|
||||||
public AjaxResult indexMailPopScreen() {
|
public AjaxResult indexMailPopScreen() {
|
||||||
return AjaxResult.success(iBdNoticeService.indexMailPopScreen(SecurityUtils.getUserId(), SecurityUtils.getPkCountry()));
|
return AjaxResult.success(iBdNoticeService.indexMailPopScreen(SecurityUtils.getUserId(), SecurityUtils.getPkCountry()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,9 +7,6 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 广告banner 服务类
|
* 广告banner 服务类
|
||||||
*
|
|
||||||
* @author hzs
|
|
||||||
* @since 2023-04-13
|
|
||||||
*/
|
*/
|
||||||
public interface IBdAdvertBannerService extends IService<BdAdvertBanner> {
|
public interface IBdAdvertBannerService extends IService<BdAdvertBanner> {
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,6 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 广告banner 服务实现类
|
* 广告banner 服务实现类
|
||||||
*
|
|
||||||
* @author hzs
|
|
||||||
* @since 2023-04-13
|
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class BdAdvertBannerServiceImpl extends ServiceImpl<BdAdvertBannerMapper, BdAdvertBanner> implements IBdAdvertBannerService {
|
public class BdAdvertBannerServiceImpl extends ServiceImpl<BdAdvertBannerMapper, BdAdvertBanner> implements IBdAdvertBannerService {
|
||||||
|
|
Loading…
Reference in New Issue