cms五拦截接口,比赛,年度比赛

gst4base
王家东 2 months ago
parent b54b3ad9a7
commit 4e3455bfbe
  1. 4
      jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
  2. 7
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java
  3. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/mapper/AnnualCompPointMapper.java
  4. 2
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/IAnnualCompPointService.java
  5. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java
  6. 17
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java
  7. 3
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/mapper/AnnualCompMapper.java
  8. 2
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/service/IAnnualCompService.java
  9. 5
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/service/impl/AnnualCompServiceImpl.java
  10. 8
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java

@ -75,7 +75,9 @@ public class ShiroConfig {
}
}
// 配置不会被拦截的链接 顺序判断
filterChainDefinitionMap.put("/AnnualCompPoint/annualCompPoint/findcompp", "anon"); //查询是已经通过审核的且在报名时间段之内的年度比赛项目
filterChainDefinitionMap.put("/annualcomp/annualComp/findndbswlj", "anon"); //年度比赛列表无拦截需要传比赛id
filterChainDefinitionMap.put("/comp/comp/complistnolj", "anon"); //比赛列表无拦截
filterChainDefinitionMap.put("/AnnualCompPoint/annualCompPoint/findcompp", "anon"); //查询是已经通过审核的且在报名时间段之内的年度比赛项目需要穿年度比赛id
filterChainDefinitionMap.put("/sysconfiguration/sysConfiguration/**", "anon"); //系统配置
filterChainDefinitionMap.put("/sys/cas/client/validateLogin", "anon"); //cas验证登录
filterChainDefinitionMap.put("/sys/randomImage/**", "anon"); //登录验证码接口排除

@ -1545,17 +1545,14 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
*/
@ApiOperation(value="查询是已经通过审核的且在报名时间段之内的年度比赛项目", notes="查询是已经通过审核的且在报名时间段之内的年度比赛项目")
@GetMapping(value = "/findcompp")
public Result<?> findcompp(AnnualCompPoint annualCompPoint,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
public Result<?> findcompp(@RequestParam(name = "id", required = true) String id) {
// 获取当前时间
LocalDateTime now = LocalDateTime.now();
// 定义日期时间格式
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
// 格式化当前时间
String formattedNow = now.format(formatter);
List<AnnualCompPoint> annualCompPointList = annualCompPointService.findcompp(formattedNow);
List<AnnualCompPoint> annualCompPointList = annualCompPointService.findcompp(formattedNow,id);
return Result.OK(annualCompPointList);
}

@ -29,6 +29,6 @@ public interface AnnualCompPointMapper extends BaseMapper<AnnualCompPoint> {
@Select("select * from annual_comp_point where annual_comp_id =#{s}")
List<AnnualCompPoint> getannualCompPointList(String s);
@Select("SELECT * FROM annual_comp_point WHERE #{formattedNow} BETWEEN apply_start_time AND apply_end_time AND annual_comp_state = '2' AND annual_comp_switch = 'Y'")
List<AnnualCompPoint> findcompp(String formattedNow);
@Select("SELECT * FROM annual_comp_point WHERE #{formattedNow} BETWEEN apply_start_time AND apply_end_time AND annual_comp_state = '2' AND annual_comp_switch = 'Y' AND annual_comp_id =#{id}")
List<AnnualCompPoint> findcompp(String formattedNow,String id);
}

@ -32,5 +32,5 @@ public interface IAnnualCompPointService extends IService<AnnualCompPoint> {
List<AnnualCompPoint> getannualCompPointList(String s);
// 查询是已经通过审核的且在报名时间段之内的年度比赛项目
List<AnnualCompPoint> findcompp(String formattedNow);
List<AnnualCompPoint> findcompp(String formattedNow,String id);
}

@ -346,8 +346,8 @@ public class AnnualCompPointServiceImpl extends ServiceImpl<AnnualCompPointMappe
}
@Override
public List<AnnualCompPoint> findcompp(String formattedNow) {
return annualCompPointMapper.findcompp(formattedNow);
public List<AnnualCompPoint> findcompp(String formattedNow,String id) {
return annualCompPointMapper.findcompp(formattedNow, id);
}
}

@ -38,6 +38,8 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
@ -570,5 +572,20 @@ public class AnnualCompController extends JeecgController<AnnualComp, IAnnualCom
}
@ApiOperation(value = "年度比赛在开始时间段之内,状态为打开且已审核(无拦截)", notes = "年度比赛在开始时间段之内,状态为打开且已审核(无拦截)")
@GetMapping(value = "/findndbswlj")
public Result<?> findndbswlj(@RequestParam(name = "id", required = true) String id) {
// 获取当前时间
LocalDateTime now = LocalDateTime.now();
// 定义日期时间格式
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
// 格式化当前时间
String formattedNow = now.format(formatter);
List<AnnualComp> annualComp = annualCompService.findndbswlj(formattedNow,id);
return Result.OK(annualComp);
}
}

@ -22,4 +22,7 @@ public interface AnnualCompMapper extends BaseMapper<AnnualComp> {
@Select("select * from annual_comp where compid =#{s}")
List<AnnualComp> getannualcompidlist(String s);
@Select("SELECT * FROM annual_comp WHERE #{formattedNow} BETWEEN starttime AND endtime AND state = 2 AND isopen = '1' AND compid =#{id}")
List<AnnualComp> findndbswlj(String formattedNow,String id);
}

@ -16,4 +16,6 @@ public interface IAnnualCompService extends IService<AnnualComp> {
List<String> getannualcompid(String s);
List<AnnualComp> getannualcompidlist(String s);
List<AnnualComp> findndbswlj(String formattedNow,String id);
}

@ -32,4 +32,9 @@ public class AnnualCompServiceImpl extends ServiceImpl<AnnualCompMapper, AnnualC
public List<AnnualComp> getannualcompidlist(String s) {
return annualCompMapper.getannualcompidlist(s);
}
@Override
public List<AnnualComp> findndbswlj(String formattedNow,String id) {
return annualCompMapper.findndbswlj(formattedNow,id);
}
}

@ -443,4 +443,12 @@ public class CompController extends JeecgController<Comp, ICompService> {
return super.importExcel(request, response, Comp.class);
}
@ApiOperation(value = "比赛列表无拦截", notes = "比赛列表无拦截")
@GetMapping(value = "/complistnolj")
public Result<List<Comp>> complistnolj() {
List<Comp> compList = compService.list();
return Result.OK(compList);
}
}

Loading…
Cancel
Save