parent
14ae15c62e
commit
831abe9957
@ -0,0 +1,15 @@
|
||||
package com.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 登录用户信息
|
||||
*/
|
||||
@Target(ElementType.PARAMETER)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface APPLoginUser {
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 忽略Token验证
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface IgnoreAuth {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 登录用户信息
|
||||
*/
|
||||
@Target(ElementType.PARAMETER)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface LoginUser {
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.config;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
|
||||
|
||||
/**
|
||||
* 自定义填充处理器
|
||||
*/
|
||||
public class MyMetaObjectHandler extends MetaObjectHandler {
|
||||
|
||||
@Override
|
||||
public void insertFill(MetaObject metaObject) {
|
||||
this.setFieldValByName("ctime", new Date(), metaObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean openUpdateFill() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
// 关闭更新填充、这里不执行
|
||||
}
|
||||
}
|
@ -0,0 +1,215 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.BisaibaomingEntity;
|
||||
import com.entity.view.BisaibaomingView;
|
||||
|
||||
import com.service.BisaibaomingService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛报名
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bisaibaoming")
|
||||
public class BisaibaomingController {
|
||||
@Autowired
|
||||
private BisaibaomingService bisaibaomingService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,BisaibaomingEntity bisaibaoming,
|
||||
HttpServletRequest request){
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
bisaibaoming.setDuiyuanzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<BisaibaomingEntity> ew = new EntityWrapper<BisaibaomingEntity>();
|
||||
PageUtils page = bisaibaomingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bisaibaoming), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,BisaibaomingEntity bisaibaoming, HttpServletRequest request){
|
||||
EntityWrapper<BisaibaomingEntity> ew = new EntityWrapper<BisaibaomingEntity>();
|
||||
PageUtils page = bisaibaomingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bisaibaoming), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( BisaibaomingEntity bisaibaoming){
|
||||
EntityWrapper<BisaibaomingEntity> ew = new EntityWrapper<BisaibaomingEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( bisaibaoming, "bisaibaoming"));
|
||||
return R.ok().put("data", bisaibaomingService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(BisaibaomingEntity bisaibaoming){
|
||||
EntityWrapper< BisaibaomingEntity> ew = new EntityWrapper< BisaibaomingEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( bisaibaoming, "bisaibaoming"));
|
||||
BisaibaomingView bisaibaomingView = bisaibaomingService.selectView(ew);
|
||||
return R.ok("查询比赛报名成功").put("data", bisaibaomingView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
BisaibaomingEntity bisaibaoming = bisaibaomingService.selectById(id);
|
||||
return R.ok().put("data", bisaibaoming);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
BisaibaomingEntity bisaibaoming = bisaibaomingService.selectById(id);
|
||||
return R.ok().put("data", bisaibaoming);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody BisaibaomingEntity bisaibaoming, HttpServletRequest request){
|
||||
bisaibaoming.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(bisaibaoming);
|
||||
|
||||
bisaibaomingService.insert(bisaibaoming);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody BisaibaomingEntity bisaibaoming, HttpServletRequest request){
|
||||
bisaibaoming.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(bisaibaoming);
|
||||
|
||||
bisaibaomingService.insert(bisaibaoming);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody BisaibaomingEntity bisaibaoming, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(bisaibaoming);
|
||||
bisaibaomingService.updateById(bisaibaoming);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
bisaibaomingService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<BisaibaomingEntity> wrapper = new EntityWrapper<BisaibaomingEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
wrapper.eq("duiyuanzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = bisaibaomingService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,207 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.BisaixiangmuEntity;
|
||||
import com.entity.view.BisaixiangmuView;
|
||||
|
||||
import com.service.BisaixiangmuService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛项目
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bisaixiangmu")
|
||||
public class BisaixiangmuController {
|
||||
@Autowired
|
||||
private BisaixiangmuService bisaixiangmuService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,BisaixiangmuEntity bisaixiangmu,
|
||||
HttpServletRequest request){
|
||||
|
||||
EntityWrapper<BisaixiangmuEntity> ew = new EntityWrapper<BisaixiangmuEntity>();
|
||||
PageUtils page = bisaixiangmuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bisaixiangmu), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,BisaixiangmuEntity bisaixiangmu, HttpServletRequest request){
|
||||
EntityWrapper<BisaixiangmuEntity> ew = new EntityWrapper<BisaixiangmuEntity>();
|
||||
PageUtils page = bisaixiangmuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bisaixiangmu), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( BisaixiangmuEntity bisaixiangmu){
|
||||
EntityWrapper<BisaixiangmuEntity> ew = new EntityWrapper<BisaixiangmuEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( bisaixiangmu, "bisaixiangmu"));
|
||||
return R.ok().put("data", bisaixiangmuService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(BisaixiangmuEntity bisaixiangmu){
|
||||
EntityWrapper< BisaixiangmuEntity> ew = new EntityWrapper< BisaixiangmuEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( bisaixiangmu, "bisaixiangmu"));
|
||||
BisaixiangmuView bisaixiangmuView = bisaixiangmuService.selectView(ew);
|
||||
return R.ok("查询比赛项目成功").put("data", bisaixiangmuView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
BisaixiangmuEntity bisaixiangmu = bisaixiangmuService.selectById(id);
|
||||
return R.ok().put("data", bisaixiangmu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
BisaixiangmuEntity bisaixiangmu = bisaixiangmuService.selectById(id);
|
||||
return R.ok().put("data", bisaixiangmu);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody BisaixiangmuEntity bisaixiangmu, HttpServletRequest request){
|
||||
bisaixiangmu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(bisaixiangmu);
|
||||
|
||||
bisaixiangmuService.insert(bisaixiangmu);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody BisaixiangmuEntity bisaixiangmu, HttpServletRequest request){
|
||||
bisaixiangmu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(bisaixiangmu);
|
||||
|
||||
bisaixiangmuService.insert(bisaixiangmu);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody BisaixiangmuEntity bisaixiangmu, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(bisaixiangmu);
|
||||
bisaixiangmuService.updateById(bisaixiangmu);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
bisaixiangmuService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<BisaixiangmuEntity> wrapper = new EntityWrapper<BisaixiangmuEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
|
||||
int count = bisaixiangmuService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,209 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.BisaixinxiEntity;
|
||||
import com.entity.view.BisaixinxiView;
|
||||
|
||||
import com.service.BisaixinxiService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛信息
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bisaixinxi")
|
||||
public class BisaixinxiController {
|
||||
@Autowired
|
||||
private BisaixinxiService bisaixinxiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,BisaixinxiEntity bisaixinxi,
|
||||
HttpServletRequest request){
|
||||
|
||||
EntityWrapper<BisaixinxiEntity> ew = new EntityWrapper<BisaixinxiEntity>();
|
||||
PageUtils page = bisaixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bisaixinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,BisaixinxiEntity bisaixinxi, HttpServletRequest request){
|
||||
EntityWrapper<BisaixinxiEntity> ew = new EntityWrapper<BisaixinxiEntity>();
|
||||
PageUtils page = bisaixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bisaixinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( BisaixinxiEntity bisaixinxi){
|
||||
EntityWrapper<BisaixinxiEntity> ew = new EntityWrapper<BisaixinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( bisaixinxi, "bisaixinxi"));
|
||||
return R.ok().put("data", bisaixinxiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(BisaixinxiEntity bisaixinxi){
|
||||
EntityWrapper< BisaixinxiEntity> ew = new EntityWrapper< BisaixinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( bisaixinxi, "bisaixinxi"));
|
||||
BisaixinxiView bisaixinxiView = bisaixinxiService.selectView(ew);
|
||||
return R.ok("查询比赛信息成功").put("data", bisaixinxiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
BisaixinxiEntity bisaixinxi = bisaixinxiService.selectById(id);
|
||||
return R.ok().put("data", bisaixinxi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
BisaixinxiEntity bisaixinxi = bisaixinxiService.selectById(id);
|
||||
return R.ok().put("data", bisaixinxi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody BisaixinxiEntity bisaixinxi, HttpServletRequest request){
|
||||
bisaixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(bisaixinxi);
|
||||
|
||||
bisaixinxiService.insert(bisaixinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody BisaixinxiEntity bisaixinxi, HttpServletRequest request){
|
||||
bisaixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(bisaixinxi);
|
||||
|
||||
bisaixinxiService.insert(bisaixinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody BisaixinxiEntity bisaixinxi, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(bisaixinxi);
|
||||
bisaixinxiService.updateById(bisaixinxi);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
bisaixinxiService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<BisaixinxiEntity> wrapper = new EntityWrapper<BisaixinxiEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
|
||||
int count = bisaixinxiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
|
||||
package com.controller;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.annotation.IgnoreAuth;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.entity.ConfigEntity;
|
||||
import com.service.ConfigService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.ValidatorUtils;
|
||||
|
||||
/**
|
||||
* 登录相关
|
||||
*/
|
||||
@RequestMapping("config")
|
||||
@RestController
|
||||
public class ConfigController{
|
||||
|
||||
@Autowired
|
||||
private ConfigService configService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,ConfigEntity config){
|
||||
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
|
||||
PageUtils page = configService.queryPage(params);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,ConfigEntity config){
|
||||
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
|
||||
PageUtils page = configService.queryPage(params);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") String id){
|
||||
ConfigEntity config = configService.selectById(id);
|
||||
return R.ok().put("data", config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") String id){
|
||||
ConfigEntity config = configService.selectById(id);
|
||||
return R.ok().put("data", config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据name获取信息
|
||||
*/
|
||||
@RequestMapping("/info")
|
||||
public R infoByName(@RequestParam String name){
|
||||
ConfigEntity config = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
|
||||
return R.ok().put("data", config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public R save(@RequestBody ConfigEntity config){
|
||||
// ValidatorUtils.validateEntity(config);
|
||||
configService.insert(config);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody ConfigEntity config){
|
||||
// ValidatorUtils.validateEntity(config);
|
||||
configService.updateById(config);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
configService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
package com.controller;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import com.annotation.IgnoreAuth;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.entity.ConfigEntity;
|
||||
import com.entity.EIException;
|
||||
import com.service.ConfigService;
|
||||
import com.utils.R;
|
||||
|
||||
/**
|
||||
* 上传文件映射表
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("file")
|
||||
@SuppressWarnings({"unchecked","rawtypes"})
|
||||
public class FileController{
|
||||
@Autowired
|
||||
private ConfigService configService;
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
@RequestMapping("/upload")
|
||||
public R upload(@RequestParam("file") MultipartFile file, String type,HttpServletRequest request) throws Exception {
|
||||
if (file.isEmpty()) {
|
||||
throw new EIException("上传文件不能为空");
|
||||
}
|
||||
String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
|
||||
String fileName = new Date().getTime()+"."+fileExt;
|
||||
File dest = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
|
||||
file.transferTo(dest);
|
||||
if(StringUtils.isNotBlank(type) && type.equals("1")) {
|
||||
ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
|
||||
if(configEntity==null) {
|
||||
configEntity = new ConfigEntity();
|
||||
configEntity.setName("faceFile");
|
||||
configEntity.setValue(fileName);
|
||||
} else {
|
||||
configEntity.setValue(fileName);
|
||||
}
|
||||
configService.insertOrUpdate(configEntity);
|
||||
}
|
||||
return R.ok().put("file", fileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/download")
|
||||
public void download(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) {
|
||||
try {
|
||||
File file = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
|
||||
if (file.exists()) {
|
||||
response.reset();
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName+"\"");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setHeader("Access-Control-Allow-Credentials", "true");
|
||||
response.setContentType("application/octet-stream; charset=UTF-8");
|
||||
IOUtils.write(FileUtils.readFileToByteArray(file), response.getOutputStream());
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,209 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.NewsEntity;
|
||||
import com.entity.view.NewsView;
|
||||
|
||||
import com.service.NewsService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 新闻资讯
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/news")
|
||||
public class NewsController {
|
||||
@Autowired
|
||||
private NewsService newsService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,NewsEntity news,
|
||||
HttpServletRequest request){
|
||||
|
||||
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
|
||||
PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,NewsEntity news, HttpServletRequest request){
|
||||
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
|
||||
PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( NewsEntity news){
|
||||
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( news, "news"));
|
||||
return R.ok().put("data", newsService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(NewsEntity news){
|
||||
EntityWrapper< NewsEntity> ew = new EntityWrapper< NewsEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( news, "news"));
|
||||
NewsView newsView = newsService.selectView(ew);
|
||||
return R.ok("查询新闻资讯成功").put("data", newsView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
NewsEntity news = newsService.selectById(id);
|
||||
return R.ok().put("data", news);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
NewsEntity news = newsService.selectById(id);
|
||||
return R.ok().put("data", news);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody NewsEntity news, HttpServletRequest request){
|
||||
news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(news);
|
||||
|
||||
newsService.insert(news);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody NewsEntity news, HttpServletRequest request){
|
||||
news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(news);
|
||||
|
||||
newsService.insert(news);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody NewsEntity news, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(news);
|
||||
newsService.updateById(news);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
newsService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<NewsEntity> wrapper = new EntityWrapper<NewsEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
|
||||
int count = newsService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,215 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.QiquanxinxiEntity;
|
||||
import com.entity.view.QiquanxinxiView;
|
||||
|
||||
import com.service.QiquanxinxiService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 弃权信息
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/qiquanxinxi")
|
||||
public class QiquanxinxiController {
|
||||
@Autowired
|
||||
private QiquanxinxiService qiquanxinxiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,QiquanxinxiEntity qiquanxinxi,
|
||||
HttpServletRequest request){
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
qiquanxinxi.setDuiyuanzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<QiquanxinxiEntity> ew = new EntityWrapper<QiquanxinxiEntity>();
|
||||
PageUtils page = qiquanxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, qiquanxinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,QiquanxinxiEntity qiquanxinxi, HttpServletRequest request){
|
||||
EntityWrapper<QiquanxinxiEntity> ew = new EntityWrapper<QiquanxinxiEntity>();
|
||||
PageUtils page = qiquanxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, qiquanxinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( QiquanxinxiEntity qiquanxinxi){
|
||||
EntityWrapper<QiquanxinxiEntity> ew = new EntityWrapper<QiquanxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( qiquanxinxi, "qiquanxinxi"));
|
||||
return R.ok().put("data", qiquanxinxiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(QiquanxinxiEntity qiquanxinxi){
|
||||
EntityWrapper< QiquanxinxiEntity> ew = new EntityWrapper< QiquanxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( qiquanxinxi, "qiquanxinxi"));
|
||||
QiquanxinxiView qiquanxinxiView = qiquanxinxiService.selectView(ew);
|
||||
return R.ok("查询弃权信息成功").put("data", qiquanxinxiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
QiquanxinxiEntity qiquanxinxi = qiquanxinxiService.selectById(id);
|
||||
return R.ok().put("data", qiquanxinxi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
QiquanxinxiEntity qiquanxinxi = qiquanxinxiService.selectById(id);
|
||||
return R.ok().put("data", qiquanxinxi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody QiquanxinxiEntity qiquanxinxi, HttpServletRequest request){
|
||||
qiquanxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(qiquanxinxi);
|
||||
|
||||
qiquanxinxiService.insert(qiquanxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody QiquanxinxiEntity qiquanxinxi, HttpServletRequest request){
|
||||
qiquanxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(qiquanxinxi);
|
||||
|
||||
qiquanxinxiService.insert(qiquanxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody QiquanxinxiEntity qiquanxinxi, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(qiquanxinxi);
|
||||
qiquanxinxiService.updateById(qiquanxinxi);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
qiquanxinxiService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<QiquanxinxiEntity> wrapper = new EntityWrapper<QiquanxinxiEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
wrapper.eq("duiyuanzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = qiquanxinxiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,221 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.SaiqianbianpaiEntity;
|
||||
import com.entity.view.SaiqianbianpaiView;
|
||||
|
||||
import com.service.SaiqianbianpaiService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 赛前编排
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/saiqianbianpai")
|
||||
public class SaiqianbianpaiController {
|
||||
@Autowired
|
||||
private SaiqianbianpaiService saiqianbianpaiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,SaiqianbianpaiEntity saiqianbianpai,
|
||||
HttpServletRequest request){
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
saiqianbianpai.setDuiyuanzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("caipanyuan")) {
|
||||
saiqianbianpai.setZhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<SaiqianbianpaiEntity> ew = new EntityWrapper<SaiqianbianpaiEntity>();
|
||||
PageUtils page = saiqianbianpaiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saiqianbianpai), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,SaiqianbianpaiEntity saiqianbianpai, HttpServletRequest request){
|
||||
EntityWrapper<SaiqianbianpaiEntity> ew = new EntityWrapper<SaiqianbianpaiEntity>();
|
||||
PageUtils page = saiqianbianpaiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saiqianbianpai), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( SaiqianbianpaiEntity saiqianbianpai){
|
||||
EntityWrapper<SaiqianbianpaiEntity> ew = new EntityWrapper<SaiqianbianpaiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saiqianbianpai, "saiqianbianpai"));
|
||||
return R.ok().put("data", saiqianbianpaiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(SaiqianbianpaiEntity saiqianbianpai){
|
||||
EntityWrapper< SaiqianbianpaiEntity> ew = new EntityWrapper< SaiqianbianpaiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saiqianbianpai, "saiqianbianpai"));
|
||||
SaiqianbianpaiView saiqianbianpaiView = saiqianbianpaiService.selectView(ew);
|
||||
return R.ok("查询赛前编排成功").put("data", saiqianbianpaiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SaiqianbianpaiEntity saiqianbianpai = saiqianbianpaiService.selectById(id);
|
||||
return R.ok().put("data", saiqianbianpai);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
SaiqianbianpaiEntity saiqianbianpai = saiqianbianpaiService.selectById(id);
|
||||
return R.ok().put("data", saiqianbianpai);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SaiqianbianpaiEntity saiqianbianpai, HttpServletRequest request){
|
||||
saiqianbianpai.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saiqianbianpai);
|
||||
|
||||
saiqianbianpaiService.insert(saiqianbianpai);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody SaiqianbianpaiEntity saiqianbianpai, HttpServletRequest request){
|
||||
saiqianbianpai.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saiqianbianpai);
|
||||
|
||||
saiqianbianpaiService.insert(saiqianbianpai);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SaiqianbianpaiEntity saiqianbianpai, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(saiqianbianpai);
|
||||
saiqianbianpaiService.updateById(saiqianbianpai);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
saiqianbianpaiService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<SaiqianbianpaiEntity> wrapper = new EntityWrapper<SaiqianbianpaiEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
wrapper.eq("duiyuanzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("caipanyuan")) {
|
||||
wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = saiqianbianpaiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,209 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.SaiqiantongzhiEntity;
|
||||
import com.entity.view.SaiqiantongzhiView;
|
||||
|
||||
import com.service.SaiqiantongzhiService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 赛前通知
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/saiqiantongzhi")
|
||||
public class SaiqiantongzhiController {
|
||||
@Autowired
|
||||
private SaiqiantongzhiService saiqiantongzhiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,SaiqiantongzhiEntity saiqiantongzhi,
|
||||
HttpServletRequest request){
|
||||
|
||||
EntityWrapper<SaiqiantongzhiEntity> ew = new EntityWrapper<SaiqiantongzhiEntity>();
|
||||
PageUtils page = saiqiantongzhiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saiqiantongzhi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,SaiqiantongzhiEntity saiqiantongzhi, HttpServletRequest request){
|
||||
EntityWrapper<SaiqiantongzhiEntity> ew = new EntityWrapper<SaiqiantongzhiEntity>();
|
||||
PageUtils page = saiqiantongzhiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saiqiantongzhi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( SaiqiantongzhiEntity saiqiantongzhi){
|
||||
EntityWrapper<SaiqiantongzhiEntity> ew = new EntityWrapper<SaiqiantongzhiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saiqiantongzhi, "saiqiantongzhi"));
|
||||
return R.ok().put("data", saiqiantongzhiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(SaiqiantongzhiEntity saiqiantongzhi){
|
||||
EntityWrapper< SaiqiantongzhiEntity> ew = new EntityWrapper< SaiqiantongzhiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saiqiantongzhi, "saiqiantongzhi"));
|
||||
SaiqiantongzhiView saiqiantongzhiView = saiqiantongzhiService.selectView(ew);
|
||||
return R.ok("查询赛前通知成功").put("data", saiqiantongzhiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SaiqiantongzhiEntity saiqiantongzhi = saiqiantongzhiService.selectById(id);
|
||||
return R.ok().put("data", saiqiantongzhi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
SaiqiantongzhiEntity saiqiantongzhi = saiqiantongzhiService.selectById(id);
|
||||
return R.ok().put("data", saiqiantongzhi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SaiqiantongzhiEntity saiqiantongzhi, HttpServletRequest request){
|
||||
saiqiantongzhi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saiqiantongzhi);
|
||||
|
||||
saiqiantongzhiService.insert(saiqiantongzhi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody SaiqiantongzhiEntity saiqiantongzhi, HttpServletRequest request){
|
||||
saiqiantongzhi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saiqiantongzhi);
|
||||
|
||||
saiqiantongzhiService.insert(saiqiantongzhi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SaiqiantongzhiEntity saiqiantongzhi, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(saiqiantongzhi);
|
||||
saiqiantongzhiService.updateById(saiqiantongzhi);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
saiqiantongzhiService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<SaiqiantongzhiEntity> wrapper = new EntityWrapper<SaiqiantongzhiEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
|
||||
int count = saiqiantongzhiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,221 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.SaishichengjiEntity;
|
||||
import com.entity.view.SaishichengjiView;
|
||||
|
||||
import com.service.SaishichengjiService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 赛事成绩
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/saishichengji")
|
||||
public class SaishichengjiController {
|
||||
@Autowired
|
||||
private SaishichengjiService saishichengjiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,SaishichengjiEntity saishichengji,
|
||||
HttpServletRequest request){
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
saishichengji.setDuiyuanzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("caipanyuan")) {
|
||||
saishichengji.setZhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<SaishichengjiEntity> ew = new EntityWrapper<SaishichengjiEntity>();
|
||||
PageUtils page = saishichengjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saishichengji), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,SaishichengjiEntity saishichengji, HttpServletRequest request){
|
||||
EntityWrapper<SaishichengjiEntity> ew = new EntityWrapper<SaishichengjiEntity>();
|
||||
PageUtils page = saishichengjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saishichengji), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( SaishichengjiEntity saishichengji){
|
||||
EntityWrapper<SaishichengjiEntity> ew = new EntityWrapper<SaishichengjiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saishichengji, "saishichengji"));
|
||||
return R.ok().put("data", saishichengjiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(SaishichengjiEntity saishichengji){
|
||||
EntityWrapper< SaishichengjiEntity> ew = new EntityWrapper< SaishichengjiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saishichengji, "saishichengji"));
|
||||
SaishichengjiView saishichengjiView = saishichengjiService.selectView(ew);
|
||||
return R.ok("查询赛事成绩成功").put("data", saishichengjiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SaishichengjiEntity saishichengji = saishichengjiService.selectById(id);
|
||||
return R.ok().put("data", saishichengji);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
SaishichengjiEntity saishichengji = saishichengjiService.selectById(id);
|
||||
return R.ok().put("data", saishichengji);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SaishichengjiEntity saishichengji, HttpServletRequest request){
|
||||
saishichengji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saishichengji);
|
||||
|
||||
saishichengjiService.insert(saishichengji);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody SaishichengjiEntity saishichengji, HttpServletRequest request){
|
||||
saishichengji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saishichengji);
|
||||
|
||||
saishichengjiService.insert(saishichengji);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SaishichengjiEntity saishichengji, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(saishichengji);
|
||||
saishichengjiService.updateById(saishichengji);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
saishichengjiService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<SaishichengjiEntity> wrapper = new EntityWrapper<SaishichengjiEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
wrapper.eq("duiyuanzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("caipanyuan")) {
|
||||
wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = saishichengjiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,221 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.SaizhongxinxiEntity;
|
||||
import com.entity.view.SaizhongxinxiView;
|
||||
|
||||
import com.service.SaizhongxinxiService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 赛中信息
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/saizhongxinxi")
|
||||
public class SaizhongxinxiController {
|
||||
@Autowired
|
||||
private SaizhongxinxiService saizhongxinxiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,SaizhongxinxiEntity saizhongxinxi,
|
||||
HttpServletRequest request){
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
saizhongxinxi.setDuiyuanzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("caipanyuan")) {
|
||||
saizhongxinxi.setZhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<SaizhongxinxiEntity> ew = new EntityWrapper<SaizhongxinxiEntity>();
|
||||
PageUtils page = saizhongxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saizhongxinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,SaizhongxinxiEntity saizhongxinxi, HttpServletRequest request){
|
||||
EntityWrapper<SaizhongxinxiEntity> ew = new EntityWrapper<SaizhongxinxiEntity>();
|
||||
PageUtils page = saizhongxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saizhongxinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( SaizhongxinxiEntity saizhongxinxi){
|
||||
EntityWrapper<SaizhongxinxiEntity> ew = new EntityWrapper<SaizhongxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saizhongxinxi, "saizhongxinxi"));
|
||||
return R.ok().put("data", saizhongxinxiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(SaizhongxinxiEntity saizhongxinxi){
|
||||
EntityWrapper< SaizhongxinxiEntity> ew = new EntityWrapper< SaizhongxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saizhongxinxi, "saizhongxinxi"));
|
||||
SaizhongxinxiView saizhongxinxiView = saizhongxinxiService.selectView(ew);
|
||||
return R.ok("查询赛中信息成功").put("data", saizhongxinxiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SaizhongxinxiEntity saizhongxinxi = saizhongxinxiService.selectById(id);
|
||||
return R.ok().put("data", saizhongxinxi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
SaizhongxinxiEntity saizhongxinxi = saizhongxinxiService.selectById(id);
|
||||
return R.ok().put("data", saizhongxinxi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SaizhongxinxiEntity saizhongxinxi, HttpServletRequest request){
|
||||
saizhongxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saizhongxinxi);
|
||||
|
||||
saizhongxinxiService.insert(saizhongxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody SaizhongxinxiEntity saizhongxinxi, HttpServletRequest request){
|
||||
saizhongxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saizhongxinxi);
|
||||
|
||||
saizhongxinxiService.insert(saizhongxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SaizhongxinxiEntity saizhongxinxi, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(saizhongxinxi);
|
||||
saizhongxinxiService.updateById(saizhongxinxi);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
saizhongxinxiService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<SaizhongxinxiEntity> wrapper = new EntityWrapper<SaizhongxinxiEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
wrapper.eq("duiyuanzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("caipanyuan")) {
|
||||
wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = saizhongxinxiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,215 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.TeshuduiyuanEntity;
|
||||
import com.entity.view.TeshuduiyuanView;
|
||||
|
||||
import com.service.TeshuduiyuanService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 特殊队员
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/teshuduiyuan")
|
||||
public class TeshuduiyuanController {
|
||||
@Autowired
|
||||
private TeshuduiyuanService teshuduiyuanService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,TeshuduiyuanEntity teshuduiyuan,
|
||||
HttpServletRequest request){
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
teshuduiyuan.setDuiyuanzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<TeshuduiyuanEntity> ew = new EntityWrapper<TeshuduiyuanEntity>();
|
||||
PageUtils page = teshuduiyuanService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, teshuduiyuan), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,TeshuduiyuanEntity teshuduiyuan, HttpServletRequest request){
|
||||
EntityWrapper<TeshuduiyuanEntity> ew = new EntityWrapper<TeshuduiyuanEntity>();
|
||||
PageUtils page = teshuduiyuanService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, teshuduiyuan), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( TeshuduiyuanEntity teshuduiyuan){
|
||||
EntityWrapper<TeshuduiyuanEntity> ew = new EntityWrapper<TeshuduiyuanEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( teshuduiyuan, "teshuduiyuan"));
|
||||
return R.ok().put("data", teshuduiyuanService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(TeshuduiyuanEntity teshuduiyuan){
|
||||
EntityWrapper< TeshuduiyuanEntity> ew = new EntityWrapper< TeshuduiyuanEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( teshuduiyuan, "teshuduiyuan"));
|
||||
TeshuduiyuanView teshuduiyuanView = teshuduiyuanService.selectView(ew);
|
||||
return R.ok("查询特殊队员成功").put("data", teshuduiyuanView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
TeshuduiyuanEntity teshuduiyuan = teshuduiyuanService.selectById(id);
|
||||
return R.ok().put("data", teshuduiyuan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
TeshuduiyuanEntity teshuduiyuan = teshuduiyuanService.selectById(id);
|
||||
return R.ok().put("data", teshuduiyuan);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody TeshuduiyuanEntity teshuduiyuan, HttpServletRequest request){
|
||||
teshuduiyuan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(teshuduiyuan);
|
||||
|
||||
teshuduiyuanService.insert(teshuduiyuan);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody TeshuduiyuanEntity teshuduiyuan, HttpServletRequest request){
|
||||
teshuduiyuan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(teshuduiyuan);
|
||||
|
||||
teshuduiyuanService.insert(teshuduiyuan);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody TeshuduiyuanEntity teshuduiyuan, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(teshuduiyuan);
|
||||
teshuduiyuanService.updateById(teshuduiyuan);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
teshuduiyuanService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<TeshuduiyuanEntity> wrapper = new EntityWrapper<TeshuduiyuanEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
wrapper.eq("duiyuanzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = teshuduiyuanService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.BisaibaomingEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.BisaibaomingVO;
|
||||
import com.entity.view.BisaibaomingView;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛报名
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface BisaibaomingDao extends BaseMapper<BisaibaomingEntity> {
|
||||
|
||||
List<BisaibaomingVO> selectListVO(@Param("ew") Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
BisaibaomingVO selectVO(@Param("ew") Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
List<BisaibaomingView> selectListView(@Param("ew") Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
List<BisaibaomingView> selectListView(Pagination page,@Param("ew") Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
BisaibaomingView selectView(@Param("ew") Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.BisaixiangmuEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.BisaixiangmuVO;
|
||||
import com.entity.view.BisaixiangmuView;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛项目
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface BisaixiangmuDao extends BaseMapper<BisaixiangmuEntity> {
|
||||
|
||||
List<BisaixiangmuVO> selectListVO(@Param("ew") Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
BisaixiangmuVO selectVO(@Param("ew") Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
List<BisaixiangmuView> selectListView(@Param("ew") Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
List<BisaixiangmuView> selectListView(Pagination page,@Param("ew") Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
BisaixiangmuView selectView(@Param("ew") Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.BisaixinxiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.BisaixinxiVO;
|
||||
import com.entity.view.BisaixinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface BisaixinxiDao extends BaseMapper<BisaixinxiEntity> {
|
||||
|
||||
List<BisaixinxiVO> selectListVO(@Param("ew") Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
BisaixinxiVO selectVO(@Param("ew") Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
List<BisaixinxiView> selectListView(@Param("ew") Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
List<BisaixinxiView> selectListView(Pagination page,@Param("ew") Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
BisaixinxiView selectView(@Param("ew") Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.CaipanyuanEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.CaipanyuanVO;
|
||||
import com.entity.view.CaipanyuanView;
|
||||
|
||||
|
||||
/**
|
||||
* 裁判员
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface CaipanyuanDao extends BaseMapper<CaipanyuanEntity> {
|
||||
|
||||
List<CaipanyuanVO> selectListVO(@Param("ew") Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
CaipanyuanVO selectVO(@Param("ew") Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
List<CaipanyuanView> selectListView(@Param("ew") Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
List<CaipanyuanView> selectListView(Pagination page,@Param("ew") Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
CaipanyuanView selectView(@Param("ew") Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 通用接口
|
||||
*/
|
||||
public interface CommonDao{
|
||||
List<String> getOption(Map<String, Object> params);
|
||||
|
||||
Map<String, Object> getFollowByOption(Map<String, Object> params);
|
||||
|
||||
List<String> getFollowByOption2(Map<String, Object> params);
|
||||
|
||||
void sh(Map<String, Object> params);
|
||||
|
||||
int remindCount(Map<String, Object> params);
|
||||
|
||||
Map<String, Object> selectCal(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> selectGroup(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> selectValue(Map<String, Object> params);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.entity.ConfigEntity;
|
||||
|
||||
/**
|
||||
* 配置
|
||||
*/
|
||||
public interface ConfigDao extends BaseMapper<ConfigEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.DuiyuanEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.DuiyuanVO;
|
||||
import com.entity.view.DuiyuanView;
|
||||
|
||||
|
||||
/**
|
||||
* 队员
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface DuiyuanDao extends BaseMapper<DuiyuanEntity> {
|
||||
|
||||
List<DuiyuanVO> selectListVO(@Param("ew") Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
DuiyuanVO selectVO(@Param("ew") Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
List<DuiyuanView> selectListView(@Param("ew") Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
List<DuiyuanView> selectListView(Pagination page,@Param("ew") Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
DuiyuanView selectView(@Param("ew") Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.NewsEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.NewsVO;
|
||||
import com.entity.view.NewsView;
|
||||
|
||||
|
||||
/**
|
||||
* 新闻资讯
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface NewsDao extends BaseMapper<NewsEntity> {
|
||||
|
||||
List<NewsVO> selectListVO(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
NewsVO selectVO(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
List<NewsView> selectListView(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
List<NewsView> selectListView(Pagination page,@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
NewsView selectView(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.QiquanxinxiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.QiquanxinxiVO;
|
||||
import com.entity.view.QiquanxinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 弃权信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface QiquanxinxiDao extends BaseMapper<QiquanxinxiEntity> {
|
||||
|
||||
List<QiquanxinxiVO> selectListVO(@Param("ew") Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
QiquanxinxiVO selectVO(@Param("ew") Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
List<QiquanxinxiView> selectListView(@Param("ew") Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
List<QiquanxinxiView> selectListView(Pagination page,@Param("ew") Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
QiquanxinxiView selectView(@Param("ew") Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.SaiqianbianpaiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.SaiqianbianpaiVO;
|
||||
import com.entity.view.SaiqianbianpaiView;
|
||||
|
||||
|
||||
/**
|
||||
* 赛前编排
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface SaiqianbianpaiDao extends BaseMapper<SaiqianbianpaiEntity> {
|
||||
|
||||
List<SaiqianbianpaiVO> selectListVO(@Param("ew") Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
SaiqianbianpaiVO selectVO(@Param("ew") Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
List<SaiqianbianpaiView> selectListView(@Param("ew") Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
List<SaiqianbianpaiView> selectListView(Pagination page,@Param("ew") Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
SaiqianbianpaiView selectView(@Param("ew") Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.SaiqiantongzhiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.SaiqiantongzhiVO;
|
||||
import com.entity.view.SaiqiantongzhiView;
|
||||
|
||||
|
||||
/**
|
||||
* 赛前通知
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface SaiqiantongzhiDao extends BaseMapper<SaiqiantongzhiEntity> {
|
||||
|
||||
List<SaiqiantongzhiVO> selectListVO(@Param("ew") Wrapper<SaiqiantongzhiEntity> wrapper);
|
||||
|
||||
SaiqiantongzhiVO selectVO(@Param("ew") Wrapper<SaiqiantongzhiEntity> wrapper);
|
||||
|
||||
List<SaiqiantongzhiView> selectListView(@Param("ew") Wrapper<SaiqiantongzhiEntity> wrapper);
|
||||
|
||||
List<SaiqiantongzhiView> selectListView(Pagination page,@Param("ew") Wrapper<SaiqiantongzhiEntity> wrapper);
|
||||
|
||||
SaiqiantongzhiView selectView(@Param("ew") Wrapper<SaiqiantongzhiEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.SaishichengjiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.SaishichengjiVO;
|
||||
import com.entity.view.SaishichengjiView;
|
||||
|
||||
|
||||
/**
|
||||
* 赛事成绩
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface SaishichengjiDao extends BaseMapper<SaishichengjiEntity> {
|
||||
|
||||
List<SaishichengjiVO> selectListVO(@Param("ew") Wrapper<SaishichengjiEntity> wrapper);
|
||||
|
||||
SaishichengjiVO selectVO(@Param("ew") Wrapper<SaishichengjiEntity> wrapper);
|
||||
|
||||
List<SaishichengjiView> selectListView(@Param("ew") Wrapper<SaishichengjiEntity> wrapper);
|
||||
|
||||
List<SaishichengjiView> selectListView(Pagination page,@Param("ew") Wrapper<SaishichengjiEntity> wrapper);
|
||||
|
||||
SaishichengjiView selectView(@Param("ew") Wrapper<SaishichengjiEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.SaizhongxinxiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.SaizhongxinxiVO;
|
||||
import com.entity.view.SaizhongxinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 赛中信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface SaizhongxinxiDao extends BaseMapper<SaizhongxinxiEntity> {
|
||||
|
||||
List<SaizhongxinxiVO> selectListVO(@Param("ew") Wrapper<SaizhongxinxiEntity> wrapper);
|
||||
|
||||
SaizhongxinxiVO selectVO(@Param("ew") Wrapper<SaizhongxinxiEntity> wrapper);
|
||||
|
||||
List<SaizhongxinxiView> selectListView(@Param("ew") Wrapper<SaizhongxinxiEntity> wrapper);
|
||||
|
||||
List<SaizhongxinxiView> selectListView(Pagination page,@Param("ew") Wrapper<SaizhongxinxiEntity> wrapper);
|
||||
|
||||
SaizhongxinxiView selectView(@Param("ew") Wrapper<SaizhongxinxiEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.TeshuduiyuanEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.TeshuduiyuanVO;
|
||||
import com.entity.view.TeshuduiyuanView;
|
||||
|
||||
|
||||
/**
|
||||
* 特殊队员
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface TeshuduiyuanDao extends BaseMapper<TeshuduiyuanEntity> {
|
||||
|
||||
List<TeshuduiyuanVO> selectListVO(@Param("ew") Wrapper<TeshuduiyuanEntity> wrapper);
|
||||
|
||||
TeshuduiyuanVO selectVO(@Param("ew") Wrapper<TeshuduiyuanEntity> wrapper);
|
||||
|
||||
List<TeshuduiyuanView> selectListView(@Param("ew") Wrapper<TeshuduiyuanEntity> wrapper);
|
||||
|
||||
List<TeshuduiyuanView> selectListView(Pagination page,@Param("ew") Wrapper<TeshuduiyuanEntity> wrapper);
|
||||
|
||||
TeshuduiyuanView selectView(@Param("ew") Wrapper<TeshuduiyuanEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
import com.entity.TokenEntity;
|
||||
|
||||
/**
|
||||
* token
|
||||
*/
|
||||
public interface TokenDao extends BaseMapper<TokenEntity> {
|
||||
|
||||
List<TokenEntity> selectListView(@Param("ew") Wrapper<TokenEntity> wrapper);
|
||||
|
||||
List<TokenEntity> selectListView(Pagination page,@Param("ew") Wrapper<TokenEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
import com.entity.UserEntity;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*/
|
||||
public interface UserDao extends BaseMapper<UserEntity> {
|
||||
|
||||
List<UserEntity> selectListView(@Param("ew") Wrapper<UserEntity> wrapper);
|
||||
|
||||
List<UserEntity> selectListView(Pagination page,@Param("ew") Wrapper<UserEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
|
||||
/**
|
||||
* 类说明 :
|
||||
*/
|
||||
@TableName("config")
|
||||
public class ConfigEntity implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* key
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* value
|
||||
*/
|
||||
private String value;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
|
||||
package com.entity;
|
||||
|
||||
/**
|
||||
* 自定义异常
|
||||
*/
|
||||
public class EIException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String msg;
|
||||
private int code = 500;
|
||||
|
||||
public EIException(String msg) {
|
||||
super(msg);
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public EIException(String msg, Throwable e) {
|
||||
super(msg, e);
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public EIException(String msg, int code) {
|
||||
super(msg);
|
||||
this.msg = msg;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public EIException(String msg, int code, Throwable e) {
|
||||
super(msg, e);
|
||||
this.msg = msg;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
package com.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
|
||||
/**
|
||||
* token表
|
||||
*/
|
||||
@TableName("token")
|
||||
public class TokenEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userid;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 表名
|
||||
*/
|
||||
private String tablename;
|
||||
|
||||
/**
|
||||
* 角色
|
||||
*/
|
||||
private String role;
|
||||
|
||||
/**
|
||||
* token
|
||||
*/
|
||||
private String token;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
private Date expiratedtime;
|
||||
|
||||
/**
|
||||
* 新增时间
|
||||
*/
|
||||
private Date addtime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getUserid() {
|
||||
return userid;
|
||||
}
|
||||
|
||||
public void setUserid(Long userid) {
|
||||
this.userid = userid;
|
||||
}
|
||||
|
||||
public String getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(String role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public String getTablename() {
|
||||
return tablename;
|
||||
}
|
||||
|
||||
public void setTablename(String tablename) {
|
||||
this.tablename = tablename;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public Date getExpiratedtime() {
|
||||
return expiratedtime;
|
||||
}
|
||||
|
||||
public void setExpiratedtime(Date expiratedtime) {
|
||||
this.expiratedtime = expiratedtime;
|
||||
}
|
||||
|
||||
public Date getAddtime() {
|
||||
return addtime;
|
||||
}
|
||||
|
||||
public void setAddtime(Date addtime) {
|
||||
this.addtime = addtime;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public TokenEntity(Long userid, String username, String tablename,String role, String token, Date expiratedtime) {
|
||||
super();
|
||||
this.userid = userid;
|
||||
this.username = username;
|
||||
this.tablename = tablename;
|
||||
this.role = role;
|
||||
this.token = token;
|
||||
this.expiratedtime = expiratedtime;
|
||||
}
|
||||
|
||||
public TokenEntity() {
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package com.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*/
|
||||
@TableName("users")
|
||||
public class UserEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
private String role;
|
||||
|
||||
private Date addtime;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(String role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public Date getAddtime() {
|
||||
return addtime;
|
||||
}
|
||||
|
||||
public void setAddtime(Date addtime) {
|
||||
this.addtime = addtime;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package com.interceptor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.method.HandlerMethod;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
|
||||
import com.annotation.IgnoreAuth;
|
||||
import com.entity.EIException;
|
||||
import com.entity.TokenEntity;
|
||||
import com.service.TokenService;
|
||||
import com.utils.R;
|
||||
|
||||
/**
|
||||
* 权限(Token)验证
|
||||
*/
|
||||
@Component
|
||||
public class AuthorizationInterceptor implements HandlerInterceptor {
|
||||
|
||||
public static final String LOGIN_TOKEN_KEY = "Token";
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
|
||||
//支持跨域请求
|
||||
response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
|
||||
response.setHeader("Access-Control-Max-Age", "3600");
|
||||
response.setHeader("Access-Control-Allow-Credentials", "true");
|
||||
response.setHeader("Access-Control-Allow-Headers", "x-requested-with,request-source,Token, Origin,imgType, Content-Type, cache-control,postman-token,Cookie, Accept,authorization");
|
||||
response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
|
||||
|
||||
IgnoreAuth annotation;
|
||||
if (handler instanceof HandlerMethod) {
|
||||
annotation = ((HandlerMethod) handler).getMethodAnnotation(IgnoreAuth.class);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
//从header中获取token
|
||||
String token = request.getHeader(LOGIN_TOKEN_KEY);
|
||||
|
||||
/**
|
||||
* 不需要验证权限的方法直接放过
|
||||
*/
|
||||
if(annotation!=null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
TokenEntity tokenEntity = null;
|
||||
if(StringUtils.isNotBlank(token)) {
|
||||
tokenEntity = tokenService.getTokenEntity(token);
|
||||
}
|
||||
|
||||
if(tokenEntity != null) {
|
||||
request.getSession().setAttribute("userId", tokenEntity.getUserid());
|
||||
request.getSession().setAttribute("role", tokenEntity.getRole());
|
||||
request.getSession().setAttribute("tableName", tokenEntity.getTablename());
|
||||
request.getSession().setAttribute("username", tokenEntity.getUsername());
|
||||
return true;
|
||||
}
|
||||
|
||||
PrintWriter writer = null;
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("application/json; charset=utf-8");
|
||||
try {
|
||||
writer = response.getWriter();
|
||||
writer.print(JSONObject.toJSONString(R.error(401, "请先登录")));
|
||||
} finally {
|
||||
if(writer != null){
|
||||
writer.close();
|
||||
}
|
||||
}
|
||||
// throw new EIException("请先登录", 401);
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.BisaibaomingEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.BisaibaomingVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.BisaibaomingView;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛报名
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface BisaibaomingService extends IService<BisaibaomingEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<BisaibaomingVO> selectListVO(Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
BisaibaomingVO selectVO(@Param("ew") Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
List<BisaibaomingView> selectListView(Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
BisaibaomingView selectView(@Param("ew") Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.BisaixiangmuEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.BisaixiangmuVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.BisaixiangmuView;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛项目
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface BisaixiangmuService extends IService<BisaixiangmuEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<BisaixiangmuVO> selectListVO(Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
BisaixiangmuVO selectVO(@Param("ew") Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
List<BisaixiangmuView> selectListView(Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
BisaixiangmuView selectView(@Param("ew") Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.BisaixinxiEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.BisaixinxiVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.BisaixinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface BisaixinxiService extends IService<BisaixinxiEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<BisaixinxiVO> selectListVO(Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
BisaixinxiVO selectVO(@Param("ew") Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
List<BisaixinxiView> selectListView(Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
BisaixinxiView selectView(@Param("ew") Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.CaipanyuanEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.CaipanyuanVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.CaipanyuanView;
|
||||
|
||||
|
||||
/**
|
||||
* 裁判员
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface CaipanyuanService extends IService<CaipanyuanEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<CaipanyuanVO> selectListVO(Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
CaipanyuanVO selectVO(@Param("ew") Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
List<CaipanyuanView> selectListView(Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
CaipanyuanView selectView(@Param("ew") Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface CommonService {
|
||||
List<String> getOption(Map<String, Object> params);
|
||||
|
||||
Map<String, Object> getFollowByOption(Map<String, Object> params);
|
||||
|
||||
void sh(Map<String, Object> params);
|
||||
|
||||
int remindCount(Map<String, Object> params);
|
||||
|
||||
Map<String, Object> selectCal(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> selectGroup(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> selectValue(Map<String, Object> params);
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
|
||||
package com.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.entity.ConfigEntity;
|
||||
import com.utils.PageUtils;
|
||||
|
||||
|
||||
/**
|
||||
* 系统用户
|
||||
*/
|
||||
public interface ConfigService extends IService<ConfigEntity> {
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.DuiyuanEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.DuiyuanVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.DuiyuanView;
|
||||
|
||||
|
||||
/**
|
||||
* 队员
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface DuiyuanService extends IService<DuiyuanEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<DuiyuanVO> selectListVO(Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
DuiyuanVO selectVO(@Param("ew") Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
List<DuiyuanView> selectListView(Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
DuiyuanView selectView(@Param("ew") Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.NewsEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.NewsVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.NewsView;
|
||||
|
||||
|
||||
/**
|
||||
* 新闻资讯
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface NewsService extends IService<NewsEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<NewsVO> selectListVO(Wrapper<NewsEntity> wrapper);
|
||||
|
||||
NewsVO selectVO(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
List<NewsView> selectListView(Wrapper<NewsEntity> wrapper);
|
||||
|
||||
NewsView selectView(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<NewsEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.QiquanxinxiEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.QiquanxinxiVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.QiquanxinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 弃权信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface QiquanxinxiService extends IService<QiquanxinxiEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<QiquanxinxiVO> selectListVO(Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
QiquanxinxiVO selectVO(@Param("ew") Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
List<QiquanxinxiView> selectListView(Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
QiquanxinxiView selectView(@Param("ew") Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.SaiqianbianpaiEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.SaiqianbianpaiVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.SaiqianbianpaiView;
|
||||
|
||||
|
||||
/**
|
||||
* 赛前编排
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface SaiqianbianpaiService extends IService<SaiqianbianpaiEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<SaiqianbianpaiVO> selectListVO(Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
SaiqianbianpaiVO selectVO(@Param("ew") Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
List<SaiqianbianpaiView> selectListView(Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
SaiqianbianpaiView selectView(@Param("ew") Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue