【积分银行】积分

This commit is contained in:
2026-02-09 16:30:50 +08:00
parent 03f8be4c98
commit 6e005f2f4e
20 changed files with 719 additions and 48 deletions
@@ -1,9 +1,11 @@
package org.jeecg.modules.api.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.service.SysBannerApiService;
import org.jeecg.modules.system.entity.SysBanner;
import org.jeecg.modules.system.entity.SysBannerDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -11,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.List;
@Slf4j
@@ -22,10 +25,25 @@ public class SysBannerApiController {
private SysBannerApiService sysBannerApiService;
@Operation(summary = "查询部门", description = "查询轮播图列表")
@Operation(summary = "轮播图-app轮播图列表", description = "查询轮播图列表")
@GetMapping("/selectBannerList")
public Result<List<SysBannerDO>> selectBannerList(@RequestParam(value = "showLocation") String showLocation) {
return sysBannerApiService.selectBannerList(showLocation);
}
@Operation(summary = "轮播图-app轮播图列表", description = "轮播图-app轮播图列表")
@GetMapping(value = "/app/list")
public Result<List<SysBanner>> appBannerList(@RequestParam(name = "showLocation") String showLocation) {
Date date = new Date();
List<SysBanner> list = sysBannerApiService.list(new LambdaQueryWrapper<SysBanner>()
.select(SysBanner::getId, SysBanner::getPhotoUrl, SysBanner::getJumpUrl, SysBanner::getTfJump, SysBanner::getMemo)
.eq(SysBanner::getShowLocation, showLocation)
.eq(SysBanner::getStatus, 1)
.and(wrapper -> wrapper.eq(SysBanner::getIsLongTermEffective, 1)
.or(wrapper1 -> wrapper1.eq(SysBanner::getIsLongTermEffective, 0).ge(SysBanner::getStartTime, date).le(SysBanner::getEndTime, date)))
.orderByDesc(SysBanner::getSort)
);
return Result.OK(list);
}
}
@@ -1,10 +1,12 @@
package org.jeecg.modules.api.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.system.entity.SysBanner;
import org.jeecg.modules.system.entity.SysBannerDO;
import java.util.List;
public interface SysBannerApiService {
public interface SysBannerApiService extends IService<SysBanner> {
Result<List<SysBannerDO>> selectBannerList(String showLocation);
}
@@ -1,6 +1,5 @@
package org.jeecg.modules.system.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
@@ -19,8 +18,6 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* @Description: 轮播图
@@ -157,19 +154,4 @@ public class SysBannerController extends JeecgController<SysBanner, ISysBannerSe
return super.importExcel(request, response, SysBanner.class);
}
@Operation(summary = "轮播图-app轮播图列表", description = "轮播图-app轮播图列表")
@GetMapping(value = "/app/list")
public Result<List<SysBanner>> appBannerList(@RequestParam(name = "showLocation") String showLocation) {
Date date = new Date();
List<SysBanner> list = sysBannerService.list(new LambdaQueryWrapper<SysBanner>()
.select(SysBanner::getId, SysBanner::getPhotoUrl, SysBanner::getJumpUrl, SysBanner::getTfJump, SysBanner::getMemo)
.eq(SysBanner::getShowLocation, showLocation)
.eq(SysBanner::getStatus, 1)
.and(wrapper -> wrapper.eq(SysBanner::getIsLongTermEffective, 1)
.or(wrapper1 -> wrapper1.eq(SysBanner::getIsLongTermEffective, 0).ge(SysBanner::getStartTime, date).le(SysBanner::getEndTime, date)))
.orderByDesc(SysBanner::getSort)
);
return Result.OK(list);
}
}