zst 8 months ago
parent 2c9c58a3b8
commit 74c1f3fe2f

@ -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,18 @@
package com.config;
import java.io.FileWriter;
import java.io.IOException;
/* *
*AlipayConfig
*
*
*2017-04-05
*
*便,使
*使
*/
public class AlipayConfig {
}

@ -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,255 @@
package com.controller;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.text.ParseException;
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 java.io.IOException;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
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.ChatEntity;
import com.entity.view.ChatView;
import com.service.ChatService;
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 2023-02-21 09:46:06
*/
@RestController
@RequestMapping("/chat")
public class ChatController {
@Autowired
private ChatService chatService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ChatEntity chat,
HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
chat.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<ChatEntity> ew = new EntityWrapper<ChatEntity>();
PageUtils page = chatService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chat), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ChatEntity chat,
HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
chat.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<ChatEntity> ew = new EntityWrapper<ChatEntity>();
PageUtils page = chatService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chat), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( ChatEntity chat){
EntityWrapper<ChatEntity> ew = new EntityWrapper<ChatEntity>();
ew.allEq(MPUtil.allEQMapPre( chat, "chat"));
return R.ok().put("data", chatService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(ChatEntity chat){
EntityWrapper< ChatEntity> ew = new EntityWrapper< ChatEntity>();
ew.allEq(MPUtil.allEQMapPre( chat, "chat"));
ChatView chatView = chatService.selectView(ew);
return R.ok("查询在线咨询成功").put("data", chatView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ChatEntity chat = chatService.selectById(id);
return R.ok().put("data", chat);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ChatEntity chat = chatService.selectById(id);
return R.ok().put("data", chat);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody ChatEntity chat, HttpServletRequest request){
chat.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chat);
if(StringUtils.isNotBlank(chat.getAsk())) {
chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", request.getSession().getAttribute("userId")));
chat.setUserid((Long)request.getSession().getAttribute("userId"));
chat.setIsreply(1);
}
if(StringUtils.isNotBlank(chat.getReply())) {
chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", chat.getUserid()));
chat.setAdminid((Long)request.getSession().getAttribute("userId"));
}
chatService.insert(chat);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody ChatEntity chat, HttpServletRequest request){
chat.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chat);
chat.setUserid((Long)request.getSession().getAttribute("userId"));
if(StringUtils.isNotBlank(chat.getAsk())) {
chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", request.getSession().getAttribute("userId")));
chat.setUserid((Long)request.getSession().getAttribute("userId"));
chat.setIsreply(1);
}
if(StringUtils.isNotBlank(chat.getReply())) {
chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", chat.getUserid()));
chat.setAdminid((Long)request.getSession().getAttribute("userId"));
}
chatService.insert(chat);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody ChatEntity chat, HttpServletRequest request){
//ValidatorUtils.validateEntity(chat);
chatService.updateById(chat);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
chatService.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<ChatEntity> wrapper = new EntityWrapper<ChatEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = chatService.selectCount(wrapper);
return R.ok().put("count", count);
}
}

@ -0,0 +1,229 @@
package com.controller;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
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.annotation.IgnoreAuth;
import com.baidu.aip.face.AipFace;
import com.baidu.aip.face.MatchRequest;
import com.baidu.aip.util.Base64Util;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.service.CommonService;
import com.service.ConfigService;
import com.utils.BaiduUtil;
import com.utils.FileUtil;
import com.utils.R;
import com.utils.CommonUtil;
/**
*
*/
@RestController
public class CommonController{
@Autowired
private CommonService commonService;
private static AipFace client = null;
@Autowired
private ConfigService configService;
/**
* tablecolumn()
* @param table
* @param column
* @return
*/
@RequestMapping("/option/{tableName}/{columnName}")
@IgnoreAuth
public R getOption(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName,@RequestParam(required = false) String conditionColumn,@RequestParam(required = false) String conditionValue,String level,String parent) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
if(StringUtils.isNotBlank(level)) {
params.put("level", level);
}
if(StringUtils.isNotBlank(parent)) {
params.put("parent", parent);
}
if(StringUtils.isNotBlank(conditionColumn)) {
params.put("conditionColumn", conditionColumn);
}
if(StringUtils.isNotBlank(conditionValue)) {
params.put("conditionValue", conditionValue);
}
List<String> data = commonService.getOption(params);
return R.ok().put("data", data);
}
/**
* tablecolumn
* @param table
* @param column
* @return
*/
@RequestMapping("/follow/{tableName}/{columnName}")
@IgnoreAuth
public R getFollowByOption(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName, @RequestParam String columnValue) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
params.put("columnValue", columnValue);
Map<String, Object> result = commonService.getFollowByOption(params);
return R.ok().put("data", result);
}
/**
* tablesfsh
* @param table
* @param map
* @return
*/
@RequestMapping("/sh/{tableName}")
public R sh(@PathVariable("tableName") String tableName, @RequestBody Map<String, Object> map) {
map.put("table", tableName);
commonService.sh(map);
return R.ok();
}
/**
*
* @param tableName
* @param columnName
* @param type 1: 2:
* @param map
* @return
*/
@RequestMapping("/remind/{tableName}/{columnName}/{type}")
@IgnoreAuth
public R remindCount(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("table", tableName);
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));
}
}
int count = commonService.remindCount(map);
return R.ok().put("count", count);
}
/**
*
*/
@RequestMapping("/cal/{tableName}/{columnName}")
@IgnoreAuth
public R cal(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
Map<String, Object> result = commonService.selectCal(params);
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/group/{tableName}/{columnName}")
@IgnoreAuth
public R group(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
List<Map<String, Object>> result = commonService.selectGroup(params);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/value/{tableName}/{xColumnName}/{yColumnName}")
@IgnoreAuth
public R value(@PathVariable("tableName") String tableName, @PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
List<Map<String, Object>> result = commonService.selectValue(params);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/value/{tableName}/{xColumnName}/{yColumnName}/{timeStatType}")
public R valueDay(@PathVariable("tableName") String tableName, @PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
params.put("timeStatType", timeStatType);
List<Map<String, Object>> result = commonService.selectTimeStatValue(params);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
}

@ -0,0 +1,112 @@
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.MPUtil;
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, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, config), params), 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, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, config), params), 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,97 @@
package com.controller;
import java.io.File;
import java.io.IOException;
import java.net.URLDecoder;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
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")
@IgnoreAuth
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 path = URLDecoder.decode(request.getSession().getServletContext().getRealPath("/upload"),"UTF-8");
File dest = new File(path);
if (!dest.getParentFile().exists()) {
dest.getParentFile().mkdirs();
}String path2 = path.replace("target\\jspm0c59i\\upload", "src\\main\\webapp\\upload\\");
File upload2 = new File(path2);
if (!upload2.exists()) {
upload2.mkdirs();
}
String fileName = new Date().getTime() + "." + fileExt;
File dest1 = new File(dest.getAbsolutePath() + "/" + fileName);
File dest2 = new File(upload2.getAbsolutePath() + "/" + fileName);
file.transferTo(dest1);
Files.copy(dest1.toPath(), dest2.toPath(), StandardCopyOption.REPLACE_EXISTING);
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,262 @@
package com.controller;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.text.ParseException;
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 java.io.IOException;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
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.ForumEntity;
import com.entity.view.ForumView;
import com.service.ForumService;
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 2023-02-21 09:46:06
*/
@RestController
@RequestMapping("/forum")
public class ForumController {
@Autowired
private ForumService forumService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ForumEntity forum,
HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
forum.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<ForumEntity> ew = new EntityWrapper<ForumEntity>();
PageUtils page = forumService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, forum), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ForumEntity forum,
HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
forum.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<ForumEntity> ew = new EntityWrapper<ForumEntity>();
PageUtils page = forumService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, forum), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/flist")
public R flist(@RequestParam Map<String, Object> params,ForumEntity forum, HttpServletRequest request){
EntityWrapper<ForumEntity> ew = new EntityWrapper<ForumEntity>();
PageUtils page = forumService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, forum), params), params));
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/query")
public R query(ForumEntity forum){
EntityWrapper< ForumEntity> ew = new EntityWrapper< ForumEntity>();
ew.allEq(MPUtil.allEQMapPre( forum, "forum"));
ForumView forumView = forumService.selectView(ew);
return R.ok("查询论坛表成功").put("data", forumView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ForumEntity forum = forumService.selectById(id);
return R.ok().put("data", forum);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ForumEntity forum = forumService.selectById(id);
return R.ok().put("data", forum);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list/{id}")
public R list(@PathVariable("id") String id){
ForumEntity forum = forumService.selectById(id);
getChilds(forum);
return R.ok().put("data", forum);
}
private ForumEntity getChilds(ForumEntity forum) {
List<ForumEntity> childs = new ArrayList<ForumEntity>();
childs = forumService.selectList(new EntityWrapper<ForumEntity>().eq("parentid", forum.getId()));
if(childs == null || childs.size()==0) {
return null;
}
forum.setChilds(childs);
for(ForumEntity forumEntity : childs) {
getChilds(forumEntity);
}
return forum;
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody ForumEntity forum, HttpServletRequest request){
forum.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(forum);
forum.setUserid((Long)request.getSession().getAttribute("userId"));
forumService.insert(forum);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody ForumEntity forum, HttpServletRequest request){
forum.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(forum);
forum.setUserid((Long)request.getSession().getAttribute("userId"));
forumService.insert(forum);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody ForumEntity forum, HttpServletRequest request){
//ValidatorUtils.validateEntity(forum);
forumService.updateById(forum);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
forumService.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<ForumEntity> wrapper = new EntityWrapper<ForumEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = forumService.selectCount(wrapper);
return R.ok().put("count", count);
}
}

@ -0,0 +1,230 @@
package com.controller;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.text.ParseException;
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 java.io.IOException;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
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.LeixingEntity;
import com.entity.view.LeixingView;
import com.service.LeixingService;
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 2023-02-21 09:46:06
*/
@RestController
@RequestMapping("/leixing")
public class LeixingController {
@Autowired
private LeixingService leixingService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,LeixingEntity leixing,
HttpServletRequest request){
EntityWrapper<LeixingEntity> ew = new EntityWrapper<LeixingEntity>();
PageUtils page = leixingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, leixing), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,LeixingEntity leixing,
HttpServletRequest request){
EntityWrapper<LeixingEntity> ew = new EntityWrapper<LeixingEntity>();
PageUtils page = leixingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, leixing), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( LeixingEntity leixing){
EntityWrapper<LeixingEntity> ew = new EntityWrapper<LeixingEntity>();
ew.allEq(MPUtil.allEQMapPre( leixing, "leixing"));
return R.ok().put("data", leixingService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(LeixingEntity leixing){
EntityWrapper< LeixingEntity> ew = new EntityWrapper< LeixingEntity>();
ew.allEq(MPUtil.allEQMapPre( leixing, "leixing"));
LeixingView leixingView = leixingService.selectView(ew);
return R.ok("查询类型成功").put("data", leixingView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
LeixingEntity leixing = leixingService.selectById(id);
return R.ok().put("data", leixing);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
LeixingEntity leixing = leixingService.selectById(id);
return R.ok().put("data", leixing);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody LeixingEntity leixing, HttpServletRequest request){
leixing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(leixing);
leixingService.insert(leixing);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody LeixingEntity leixing, HttpServletRequest request){
leixing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(leixing);
leixingService.insert(leixing);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody LeixingEntity leixing, HttpServletRequest request){
//ValidatorUtils.validateEntity(leixing);
leixingService.updateById(leixing);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
leixingService.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<LeixingEntity> wrapper = new EntityWrapper<LeixingEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = leixingService.selectCount(wrapper);
return R.ok().put("count", count);
}
}

@ -0,0 +1,266 @@
package com.controller;
// 定义控制器所在的包名
import java.math.BigDecimal; // 导入BigDecimal类用于进行高精度的数学运算
import java.text.SimpleDateFormat; // 导入SimpleDateFormat类用于格式化和解析日期
import java.text.ParseException; // 导入ParseException类用于处理日期解析异常
import java.util.ArrayList; // 导入ArrayList类用于创建动态数组
import java.util.Arrays; // 导入Arrays类提供了对数组操作的工具方法
import java.util.Calendar; // 导入Calendar类用于日期时间的操作
import java.util.Map; // 导入Map接口用于键值对集合
import java.util.HashMap; // 导入HashMap类基于哈希表的Map实现
import java.util.Iterator; // 导入Iterator接口用于遍历集合
import java.util.Date; // 导入Date类用于日期时间的表示
import java.util.List; // 导入List接口用于列表集合
import javax.servlet.http.HttpServletRequest; // 导入HttpServletRequest接口用于访问HTTP请求信息
import java.io.IOException; // 导入IOException类用于处理IO异常
import com.utils.ValidatorUtils; // 导入自定义的ValidatorUtils工具类用于数据验证
import org.apache.commons.lang3.StringUtils; // 导入Apache Commons Lang库的StringUtils类用于字符串操作
import org.springframework.beans.factory.annotation.Autowired; // 导入Spring的Autowired注解用于自动注入依赖
import org.springframework.transaction.annotation.Transactional; // 导入Spring的Transactional注解用于声明事务
import org.springframework.format.annotation.DateTimeFormat; // 导入Spring的DateTimeFormat注解用于日期格式注解
import org.springframework.web.bind.annotation.PathVariable; // 导入Spring的PathVariable注解用于将URL中的参数绑定到控制器方法的参数上
import org.springframework.web.bind.annotation.RequestBody; // 导入Spring的RequestBody注解用于将HTTP请求的body部分绑定到控制器方法的参数上
import org.springframework.web.bind.annotation.RequestMapping; // 导入Spring的RequestMapping注解用于定义请求映射
import org.springframework.web.bind.annotation.RequestParam; // 导入Spring的RequestParam注解用于将请求参数绑定到控制器方法的参数上
import org.springframework.web.bind.annotation.RestController; // 导入Spring的RestController注解用于定义REST风格的控制器
import com.baomidou.mybatisplus.mapper.EntityWrapper; // 导入MyBatis Plus的EntityWrapper类用于构建查询条件
import com.baomidou.mybatisplus.mapper.Wrapper; // 导入MyBatis Plus的Wrapper接口EntityWrapper实现该接口
import com.annotation.IgnoreAuth; // 导入自定义的IgnoreAuth注解用于忽略权限验证
import com.entity.NewsEntity; // 导入新闻实体类
import com.entity.view.NewsView; // 导入新闻视图类
import com.service.NewsService; // 导入新闻服务类
import com.service.TokenService; // 导入Token服务类
import com.utils.PageUtils; // 导入自定义的PageUtils工具类用于分页处理
import com.utils.R; // 导入自定义的R类用于封装响应结果
import com.utils.MD5Util; // 导入自定义的MD5Util工具类用于MD5加密
import com.utils.MPUtil; // 导入自定义的MPUtil工具类提供MyBatis Plus工具方法
import com.utils.CommonUtil; // 导入自定义的CommonUtil工具类提供常用方法
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@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对象用于构建查询条件
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
// 使用MPUtil工具类对查询条件进行排序和分页处理
PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));
// 将分页结果设置到request对象中
request.setAttribute("data", page);
// 返回成功响应,包含分页结果
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, NewsEntity news, HttpServletRequest request) {
// 创建一个EntityWrapper对象用于构建查询条件
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
// 使用MPUtil工具类对查询条件进行排序和分页处理
PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));
// 将分页结果设置到request对象中
request.setAttribute("data", page);
// 返回成功响应,包含分页结果
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
//一个Spring MVC的注解用于将HTTP请求映射到 list 方法。当客户端发送一个HTTP请求到 /lists 路径时Spring MVC会调用 list 方法来处理这个请求
public R list(NewsEntity news) //NewsEntity news 参数表示要查询的 NewsEntity 对象
{
// 创建一个EntityWrapper对象用于构建查询条件
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
// 使用MPUtil工具类对查询条件进行排序和分页处理
ew.allEq(MPUtil.allEQMapPre(news, "news"));
// 返回成功响应,包含查询结果
return R.ok().put("data", newsService.selectListView(ew));
//这行代码返回一个表示请求成功的响应对象,并将 newsService.selectListView(ew) 的结果添加到响应对象中,键为 "data"。
//newsService.selectListView(ew) 方法用于查询满足 ew 对象的查询条件的记录,并返回一个包含查询结果的列表。
}
/**
*
*/
@RequestMapping("/query")
public R query(NewsEntity news) {
// 创建一个EntityWrapper对象用于构建查询条件
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
// 使用MPUtil工具类对查询条件进行排序和分页处理
ew.allEq(MPUtil.allEQMapPre(news, "news"));
// 调用 newsService 对象的 selectView 方法,查询满足 ew 对象的查询条件的记录,并返回一个 NewsView 对象
NewsView newsView = newsService.selectView(ew);
return R.ok("查询公告信息成功").put("data", newsView);
}
/**
*
*/
//一个Spring MVC的注解用于将HTTP请求映射到 info 方法。
//当客户端发送一个HTTP请求到 /info/{id} 路径时Spring MVC会调用 info 方法来处理这个请求
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id) {
// 根据ID查询并返回结果
NewsEntity news = newsService.selectById(id);
//调用 newsService 对象的 selectById 方法,根据 id 参数的值查询数据库中的记录,并返回一个 NewsEntity 对象。
return R.ok().put("data", news); //将 news 对象添加到响应对象中,键为 "data"
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id) {
// 根据ID查询并返回结果
NewsEntity news = newsService.selectById(id);
return R.ok().put("data", news);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody NewsEntity news, HttpServletRequest request) {
// 设置ID为当前时间戳加上一个随机数
news.setId(new Date().getTime() + new Double(Math.floor(Math.random() * 1000)).longValue());
// 验证实体对象,如果需要验证,可以取消注释
// ValidatorUtils.validateEntity(news);
// 插入数据,将 news 对象插入到数据库中
newsService.insert(news);
//返回一个表示请求成功的响应对象
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody NewsEntity news, HttpServletRequest request) {
// 设置ID为当前时间戳加上一个随机数
news.setId(new Date().getTime() + new Double(Math.floor(Math.random() * 1000)).longValue());
// 验证实体对象,如果需要验证,可以取消注释
// ValidatorUtils.validateEntity(news);
// 插入数据
newsService.insert(news);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody NewsEntity news, HttpServletRequest request) {
// 验证实体对象,如果需要验证,可以取消注释
// ValidatorUtils.validateEntity(news);
// 更新数据
newsService.updateById(news);
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")//这是一个Spring MVC的注解用于将HTTP请求映射到 delete方法上
public R delete(@RequestBody Long[] ids) {
// 批量删除数据
newsService.deleteBatchIds(Arrays.asList(ids));
return R.ok();//R.ok() 方法通常表示请求成功,并返回一个默认的成功响应。
}
/**
*
*/
@RequestMapping("/remind/{columnName}/{type}")
//这是一个Spring MVC的注解用于将HTTP请求映射到 remindCount 方法。当客户端发送一个HTTP请求到 /remind/{columnName}/{type} 路径时Spring MVC会调用 remindCount 方法来处理这个请求。
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type, @RequestParam Map<String, Object> map) {
// 将列名和类型添加到map中,@PathVariable 注解表示 columnName 和 type 参数的值将从URL路径中获取
map.put("column", columnName);//将 columnName 参数的值添加到 map 中,键为 "column"。
map.put("type", type);
if (type.equals("2")) //如果 type 参数的值为 "2"
{
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//创建一个 SimpleDateFormat 对象sdf用于将日期格式化为 "yyyy-MM-dd" 格式。
Calendar c = Calendar.getInstance();
//创建一个 Calendar 对象用于处理日期和时间。Calendar.getInstance() 方法返回一个表示当前日期和时间的 Calendar 对象。
Date remindStartDate = null;//声明一个变量 remindStartDate,初始化为 null,这个变量将用于存储提醒开始日期。
Date remindEndDate = null;
if (map.get("remindstart") != null)//如果 map 中存在键为 "remindstart" 的元素
{
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
//将 map 中键为 "remindstart" 的元素的值转换为 Integer 类型,并赋值给 remindStart
c.setTime(new Date());//setTime(new Date()) 方法将 Calendar 对象c的时间设置为当前时间。
c.add(Calendar.DAY_OF_MONTH, remindStart);//将 Calendar 对象的时间增加 remindStart 天。
remindStartDate = c.getTime();//返回一个表示 Calendar 对象当前时间的 Date 对象,并将其赋值给 remindStartDate。
map.put("remindstart", sdf.format(remindStartDate));//将 remindStartDate 格式化为 "yyyy-MM-dd" 格式,并将其作为 map 中键为 "remindstart" 的元素的值。
}
if (map.get("remindend") != null)
{
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());//c 的时间设置为当前时间
c.add(Calendar.DAY_OF_MONTH, remindEnd);//c 的时间增加 remindStart 天
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
// 创建一个EntityWrapper对象用于构建查询条件
Wrapper<NewsEntity> wrapper = new EntityWrapper<NewsEntity>();//创建一个EntityWrapper对象用于构建查询条件
if (map.get("remindstart") != null)//如果map中存在键为"remindstart"的元素
{
wrapper.ge(columnName, map.get("remindstart"));//将 wrapper 对象的查询条件设置为 columnName>=map 中键为 "remindend" 的元素的值
}
if (map.get("remindend") != null) {
wrapper.le(columnName, map.get("remindend"));//将 wrapper 对象的查询条件设置为 columnName<=map 中键为 "remindend" 的元素的值
}
// 查询并返回结果
int count = newsService.selectCount(wrapper);//查询满足wrapper对象的查询条件的记录数并赋值给 count 变量
return R.ok().put("count", count);//返回一个包含 count 变量的 R 对象(请求成功的响应对象)
}
}

@ -0,0 +1,222 @@
package com.controller;
import java.math.BigDecimal; // 导入BigDecimal类用于高精度的数学计算
import java.text.SimpleDateFormat; // 导入SimpleDateFormat类用于日期格式化
import java.text.ParseException; // 导入ParseException类用于处理日期解析异常
import java.util.ArrayList; // 导入ArrayList类用于创建动态数组
import java.util.Arrays; // 导入Arrays类提供对数组操作的工具方法
import java.util.Calendar; // 导入Calendar类用于日期时间操作
import java.util.Map; // 导入Map接口用于键值对集合
import java.util.HashMap; // 导入HashMap类基于哈希表的Map实现
import java.util.Iterator; // 导入Iterator接口用于遍历集合
import java.util.Date; // 导入Date类用于日期时间表示
import java.util.List; // 导入List接口用于列表集合
import javax.servlet.http.HttpServletRequest; // 导入HttpServletRequest接口用于访问HTTP请求信息
import java.io.IOException; // 导入IOException类用于处理输入输出异常
import com.utils.ValidatorUtils; // 导入ValidatorUtils工具类用于实体验证
import org.apache.commons.lang3.StringUtils; // 导入StringUtils类提供字符串操作的工具方法
import org.springframework.beans.factory.annotation.Autowired; // 导入Autowired注解用于自动注入依赖
import org.springframework.transaction.annotation.Transactional; // 导入Transactional注解用于声明事务管理
import org.springframework.format.annotation.DateTimeFormat; // 导入DateTimeFormat注解用于日期时间格式化
import org.springframework.web.bind.annotation.PathVariable; // 导入PathVariable注解用于将URL中的参数绑定到控制器方法的参数上
import org.springframework.web.bind.annotation.RequestBody; // 导入RequestBody注解用于将HTTP请求体绑定到控制器方法的参数上
import org.springframework.web.bind.annotation.RequestMapping; // 导入RequestMapping注解用于映射HTTP请求到控制器方法
import org.springframework.web.bind.annotation.RequestParam; // 导入RequestParam注解用于将请求参数绑定到控制器方法的参数上
import org.springframework.web.bind.annotation.RestController; // 导入RestController注解用于声明一个REST风格的控制器
import com.baomidou.mybatisplus.mapper.EntityWrapper; // 导入EntityWrapper类用于构建查询条件
import com.baomidou.mybatisplus.mapper.Wrapper; // 导入Wrapper接口用于封装查询条件
import com.annotation.IgnoreAuth; // 导入IgnoreAuth注解用于标记不需要认证的接口
import com.entity.StoreupEntity; // 导入StoreupEntity实体类代表存储数据
import com.entity.view.StoreupView; // 导入StoreupView视图类用于展示存储数据
import com.service.StoreupService; // 导入StoreupService接口用于存储业务操作
import com.service.TokenService; // 导入TokenService接口用于令牌操作未使用
import com.utils.PageUtils; // 导入PageUtils工具类用于分页处理
import com.utils.R; // 导入R工具类用于构建统一的响应格式
import com.utils.MD5Util; // 导入MD5Util工具类用于MD5加密未使用
import com.utils.MPUtil; // 导入MPUtil工具类提供MyBatis Plus操作的工具方法
import com.utils.CommonUtil; // 导入CommonUtil工具类提供通用的工具方法
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@RestController
@RequestMapping("/storeup")
public class StoreupController {
@Autowired
private StoreupService storeupService;
/**
*
*/
@RequestMapping("/page")//定义了一个处理HTTP请求的映射当请求路径为/page时会调用这个方法
public R page(@RequestParam Map<String, Object> params,StoreupEntity storeup,HttpServletRequest request)
{//定义了一个公共方法接收请求参数、实体对象和HTTP请求对象
if(!request.getSession().getAttribute("role").toString().equals("管理员"))
{//检查当前用户的角色是否为管理员如果不是管理员则设置用户ID
storeup.setUserid((Long)request.getSession().getAttribute("userId"));//设置用户ID
}
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();//创建一个实体包装器对象,用于构建查询条件
PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params));//调用storeupService的queryPage方法根据查询条件和分页参数进行分页查询并返回分页结果
request.setAttribute("data", page);//将分页结果设置到HTTP请求对象中
return R.ok().put("data", page);//返回一个包含分页结果的响应对象
}
/**
*
*/
@IgnoreAuth//定义了一个注解,用于标记不需要权限认证的接口
@RequestMapping("/list")//定义了一个处理HTTP请求的映射当请求路径为/list时会调用这个方法
public R list(@RequestParam Map<String, Object> params,StoreupEntity storeup,HttpServletRequest request)
{
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();//创建一个实体包装器对象,用于构建查询条件
PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params));//调用storeupService的queryPage方法根据查询条件和分页参数进行分页查询并返回分页结果
request.setAttribute("data", page);//将分页查询结果设置到HTTP请求对象中
return R.ok().put("data", page);//返回一个包含分页查询结果的响应对象
}
/**
*
*/
@RequestMapping("/lists")
public R list( StoreupEntity storeup)//定义了一个公共方法,接收实体对象
{
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();//创建一个实体包装器对象,用于构建查询条件
ew.allEq(MPUtil.allEQMapPre( storeup, "storeup")); //使用allEq方法设置查询条件MPUtil.allEQMapPre方法将实体对象的属性转换为Map,并添加前缀"storeup",allEq方法将Map中的键值对作为查询条件查询出符合条件的实体对象
return R.ok().put("data", storeupService.selectListView(ew));//根据查询条件查询出符合条件的实体对象列表,并返回一个包含实体对象列表的响应对象
}
/**
*
*/
@RequestMapping("/query")//定义了一个处理HTTP请求的映射当请求路径为/query时会调用这个方法。
public R query(StoreupEntity storeup)
{
EntityWrapper< StoreupEntity> ew = new EntityWrapper< StoreupEntity>();
//创建一个实体包装器,用于构建查询条件
ew.allEq(MPUtil.allEQMapPre( storeup, "storeup"));
//使用allEq方法设置查询条件,MPUtil.allEQMapPre方法将实体对象的属性转换为Map,并添加前缀"storeup",allEq方法将Map中的键值对作为查询条件查询出符合条件的实体对象。
StoreupView storeupView = storeupService.selectView(ew);
//调用服务层的方法查询单个数据,并返回视图对象
return R.ok("查询收藏表成功").put("data", storeupView);
//返回一个包含查询结果的响应对象,并附带成功消息
}
/**
*
*/
@RequestMapping("/info/{id}")// 定义一个请求映射,当访问 /info/{id} 路径时,会调用这个方法
public R info(@PathVariable("id") Long id)// 定义一个方法,接收一个路径变量 id类型为 Long
{
StoreupEntity storeup = storeupService.selectById(id);//调用服务层的方法根据ID查询数据并返回实体对象
return R.ok().put("data", storeup);//返回一个包含查询结果的 R 对象,其中包含键 "data" 和对应的 storeup 实体对象
}
/**
*
*/
@IgnoreAuth//定义了一个注解,用于标记不需要权限认证的接口
@RequestMapping("/detail/{id}")//定义了一个处理HTTP请求的映射当请求路径为/detail/{id}时,会调用这个方法
public R detail(@PathVariable("id") Long id)//定义了一个方法,接收一个路径变量 id类型为 Long
{
StoreupEntity storeup = storeupService.selectById(id);//调用服务层的方法根据ID查询数据并返回实体对象
return R.ok().put("data", storeup);//返回一个包含查询结果的响应对象,并附带成功消息
}
/**
*
*/
@RequestMapping("/save")//定义了一个处理HTTP请求的映射当请求路径为/save时会调用这个方法
public R save(@RequestBody StoreupEntity storeup, HttpServletRequest request)//定义了一个方法接收一个JSON格式的请求体类型为 StoreupEntity并接收一个 HttpServletRequest 对象
{
storeup.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(storeup);
storeup.setUserid((Long)request.getSession().getAttribute("userId"));//从请求的 session 中获取用户ID并设置到 storeup 实体对象中
storeupService.insert(storeup);//调用服务层的方法将 storeup 实体对象插入数据库
return R.ok();//返回一个包含成功信息的 R 对象
}
/**
*
*/
@RequestMapping("/add")//定义了一个处理HTTP请求的映射当请求路径为/add时会调用这个方法
public R add(@RequestBody StoreupEntity storeup, HttpServletRequest request) //定义一个方法,接收一个请求体中的 StoreupEntity 对象和 HttpServletRequest 对象
{
storeup.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//生成一个新的唯一ID由当前时间戳加上一个随机数
//ValidatorUtils.validateEntity(storeup);
storeupService.insert(storeup);//调用服务层的方法将 storeup 实体对象插入数据库
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional//定义了一个事务注解,表示该方法中的数据库操作应该在一个事务中执行
public R update(@RequestBody StoreupEntity storeup, HttpServletRequest request)//定义了一个方法,接收一个请求体中的 StoreupEntity 对象和 HttpServletRequest 对象
{
//ValidatorUtils.validateEntity(storeup);
storeupService.updateById(storeup);//调用服务层的方法根据 ID 更新 storeup 实体对象的所有字段
return R.ok();//返回一个包含成功信息的 R 对象
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids)// 定义一个方法,接收一个请求体中的 Long 数组,类型为 Long[]
{
storeupService.deleteBatchIds(Arrays.asList(ids));//调用服务层的方法,根据传入的 ID 数组批量删除数据
return R.ok();//返回一个包含成功信息的 R 对象 R.ok()函数是R工具类中的一个静态方法用于创建一个包含成功信息的响应对象
}
/**
*
*/
@RequestMapping("/remind/{columnName}/{type}") // 定义一个请求映射,当访问 /remind/{columnName}/{type} 路径时,会调用这个方法
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) { // 定义一个方法,接收一个路径变量 columnName 和 type类型为 String以及一个请求参数 map类型为 Map<String, Object>
map.put("column", columnName); // 将 columnName 添加到 map 中,键为 "column"
map.put("type", type); // 将 type 添加到 map 中,键为 "type"
if(type.equals("2")) { // 如果 type 等于 "2"
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // 创建一个日期格式化对象,格式为 "yyyy-MM-dd"
Calendar c = Calendar.getInstance(); // 创建一个日历对象,获取当前时间
Date remindStartDate = null; // 创建一个日期对象,用于存储提醒开始时间
Date remindEndDate = null; // 创建一个日期对象,用于存储提醒结束时间
if(map.get("remindstart")!=null) { // 如果 map 中存在 "remindstart" 键
Integer remindStart = Integer.parseInt(map.get("remindstart").toString()); // 将 "remindstart" 键对应的值转换为整数
c.setTime(new Date()); // 设置日历对象的时间为当前时间
c.add(Calendar.DAY_OF_MONTH,remindStart); // 将日历对象的时间增加 remindStart 天
remindStartDate = c.getTime(); // 获取增加后的时间,并赋值给 remindStartDate
map.put("remindstart", sdf.format(remindStartDate)); // 将 remindStartDate 格式化为 "yyyy-MM-dd" 格式,并添加到 map 中,键为 "remindstart"
}
if(map.get("remindend")!=null) { // 如果 map 中存在 "remindend" 键
Integer remindEnd = Integer.parseInt(map.get("remindend").toString()); // 将 "remindend" 键对应的值转换为整数
c.setTime(new Date()); // 设置日历对象的时间为当前时间
c.add(Calendar.DAY_OF_MONTH,remindEnd); // 将日历对象的时间增加 remindEnd 天
remindEndDate = c.getTime(); // 获取增加后的时间,并赋值给 remindEndDate
map.put("remindend", sdf.format(remindEndDate)); // 将 remindEndDate 格式化为 "yyyy-MM-dd" 格式,并添加到 map 中,键为 "remindend"
}
}
Wrapper<StoreupEntity> wrapper = new EntityWrapper<StoreupEntity>(); // 创建一个实体包装器对象,用于构建查询条件
if(map.get("remindstart")!=null) { // 如果 map 中存在 "remindstart" 键
wrapper.ge(columnName, map.get("remindstart")); // 设置查询条件,查询 columnName 字段大于等于 "remindstart" 键对应的值
}
if(map.get("remindend")!=null) { // 如果 map 中存在 "remindend" 键
wrapper.le(columnName, map.get("remindend")); // 设置查询条件,查询 columnName 字段小于等于 "remindend" 键对应的值
}
if(!request.getSession().getAttribute("role").toString().equals("管理员")) { // 如果当前用户的角色不是管理员
wrapper.eq("userid", (Long)request.getSession().getAttribute("userId")); // 设置查询条件,查询 userid 字段等于当前用户的 ID
}
int count = storeupService.selectCount(wrapper); // 调用服务层的方法,根据查询条件查询符合条件的记录数,并赋值给 count
return R.ok().put("count", count); // 返回一个包含查询结果的响应对象,其中包含键 "count" 和对应的 count 值
}
}

@ -0,0 +1,212 @@
package com.controller; // 定义一个包,用于组织和管理类
import java.math.BigDecimal; // 导入BigDecimal类用于高精度的数学计算
import java.text.SimpleDateFormat; // 导入SimpleDateFormat类用于日期格式化
import java.text.ParseException; // 导入ParseException类用于处理日期解析异常
import java.util.ArrayList; // 导入ArrayList类用于创建动态数组
import java.util.Arrays; // 导入Arrays类提供对数组操作的工具方法
import java.util.Calendar; // 导入Calendar类用于日期时间操作
import java.util.Map; // 导入Map接口用于键值对集合
import java.util.HashMap; // 导入HashMap类基于哈希表的Map实现
import java.util.Iterator; // 导入Iterator接口用于遍历集合
import java.util.Date; // 导入Date类用于日期时间表示
import java.util.List; // 导入List接口用于列表集合
import javax.servlet.http.HttpServletRequest; // 导入HttpServletRequest接口用于访问HTTP请求信息
import java.io.IOException; // 导入IOException类用于处理输入输出异常
import com.utils.ValidatorUtils; // 导入ValidatorUtils工具类用于实体验证
import org.apache.commons.lang3.StringUtils; // 导入StringUtils类提供字符串操作的工具方法
import org.springframework.beans.factory.annotation.Autowired; // 导入Autowired注解用于自动注入依赖
import org.springframework.transaction.annotation.Transactional; // 导入Transactional注解用于声明事务管理
import org.springframework.format.annotation.DateTimeFormat; // 导入DateTimeFormat注解用于日期时间格式化
import org.springframework.web.bind.annotation.PathVariable; // 导入PathVariable注解用于将URL中的参数绑定到控制器方法的参数上
import org.springframework.web.bind.annotation.RequestBody; // 导入RequestBody注解用于将HTTP请求体绑定到控制器方法的参数上
import org.springframework.web.bind.annotation.RequestMapping; // 导入RequestMapping注解用于映射HTTP请求到控制器方法
import org.springframework.web.bind.annotation.RequestParam; // 导入RequestParam注解用于将请求参数绑定到控制器方法的参数上
import org.springframework.web.bind.annotation.RestController; // 导入RestController注解用于声明一个REST风格的控制器
import com.baomidou.mybatisplus.mapper.EntityWrapper; // 导入EntityWrapper类用于构建查询条件
import com.baomidou.mybatisplus.mapper.Wrapper; // 导入Wrapper接口用于封装查询条件
import com.annotation.IgnoreAuth; // 导入IgnoreAuth注解用于标记不需要认证的接口
import com.entity.SystemintroEntity; // 导入SystemintroEntity实体类代表存储数据
import com.entity.view.SystemintroView; // 导入SystemintroView视图类用于展示存储数据
import com.service.SystemintroService; // 导入SystemintroService接口用于存储业务操作
import com.service.TokenService; // 导入TokenService接口用于令牌操作未使用
import com.utils.PageUtils; // 导入PageUtils工具类用于分页处理
import com.utils.R; // 导入R工具类用于构建统一的响应格式
import com.utils.MD5Util; // 导入MD5Util工具类用于MD5加密未使用
import com.utils.MPUtil; // 导入MPUtil工具类提供MyBatis Plus操作的工具方法
import com.utils.CommonUtil; // 导入CommonUtil工具类提供通用的工具方法
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@RestController // 声明一个REST风格的控制器
@RequestMapping("/systemintro") // 定义一个请求映射,当访问 /systemintro 路径时,会调用这个控制器
public class SystemintroController {
@Autowired // 自动注入依赖
private SystemintroService systemintroService; // 声明一个SystemintroService对象用于存储业务操作
/**
*
*/
@RequestMapping("/page") // 定义一个请求映射,当访问 /page 路径时,会调用这个方法
public R page(@RequestParam Map<String, Object> params,SystemintroEntity systemintro,
HttpServletRequest request){ // 定义一个方法接收请求参数、实体对象和HTTP请求对象
EntityWrapper<SystemintroEntity> ew = new EntityWrapper<SystemintroEntity>(); // 创建一个实体包装器对象,用于构建查询条件
PageUtils page = systemintroService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, systemintro), params), params)); // 调用服务层的方法,根据查询条件和分页参数进行分页查询,并返回分页结果
request.setAttribute("data", page); // 将分页结果设置到HTTP请求对象中
return R.ok().put("data", page); // 返回一个包含分页结果的响应对象
}
/**
*
*/
@IgnoreAuth // 定义了一个注解,用于标记不需要权限认证的接口
@RequestMapping("/list") // 定义一个请求映射,当访问 /list 路径时,会调用这个方法
public R list(@RequestParam Map<String, Object> params,SystemintroEntity systemintro,
HttpServletRequest request){ // 定义一个方法接收请求参数、实体对象和HTTP请求对象
EntityWrapper<SystemintroEntity> ew = new EntityWrapper<SystemintroEntity>(); // 创建一个实体包装器对象,用于构建查询条件
PageUtils page = systemintroService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, systemintro), params), params)); // 调用服务层的方法,根据查询条件和分页参数进行分页查询,并返回分页结果
request.setAttribute("data", page); // 将分页结果设置到HTTP请求对象中
return R.ok().put("data", page); // 返回一个包含分页结果的响应对象
}
/**
*
*/
@RequestMapping("/lists") // 定义一个请求映射,当访问 /lists 路径时,会调用这个方法
public R list( SystemintroEntity systemintro){ // 定义一个方法,接收实体对象
EntityWrapper<SystemintroEntity> ew = new EntityWrapper<SystemintroEntity>(); // 创建一个实体包装器对象,用于构建查询条件
ew.allEq(MPUtil.allEQMapPre( systemintro, "systemintro")); // 使用allEq方法设置查询条件MPUtil.allEQMapPre方法将实体对象的属性转换为Map,并添加前缀"systemintro",allEq方法将Map中的键值对作为查询条件查询出符合条件的实体对象
return R.ok().put("data", systemintroService.selectListView(ew)); // 根据查询条件查询出符合条件的实体对象列表,并返回一个包含实体对象列表的响应对象
}
/**
*
*/
@RequestMapping("/query") // 定义一个请求映射,当访问 /query 路径时,会调用这个方法
public R query(SystemintroEntity systemintro){ // 定义一个方法,接收实体对象
EntityWrapper< SystemintroEntity> ew = new EntityWrapper< SystemintroEntity>(); // 创建一个实体包装器对象,用于构建查询条件
ew.allEq(MPUtil.allEQMapPre( systemintro, "systemintro")); // 使用allEq方法设置查询条件MPUtil.allEQMapPre方法将实体对象的属性转换为Map,并添加前缀"systemintro",allEq方法将Map中的键值对作为查询条件查询出符合条件的实体对象
SystemintroView systemintroView = systemintroService.selectView(ew); // 调用服务层的方法查询单个数据,并返回视图对象
return R.ok("查询关于我们成功").put("data", systemintroView); // 返回一个包含查询结果的响应对象,并附带成功消息
}
/**
*
*/
@RequestMapping("/info/{id}") // 定义一个请求映射,当访问 /info/{id} 路径时,会调用这个方法
public R info(@PathVariable("id") Long id){ // 定义一个方法,接收一个路径变量 id类型为 Long
SystemintroEntity systemintro = systemintroService.selectById(id); // 调用服务层的方法根据ID查询数据并返回实体对象
return R.ok().put("data", systemintro); // 返回一个包含查询结果的 R 对象,其中包含键 "data" 和对应的 systemintro 实体对象
}
/**
*
*/
@IgnoreAuth // 定义了一个注解,用于标记不需要权限认证的接口
@RequestMapping("/detail/{id}") // 定义一个请求映射,当访问 /detail/{id} 路径时,会调用这个方法
public R detail(@PathVariable("id") Long id){ // 定义一个方法,接收一个路径变量 id类型为 Long
SystemintroEntity systemintro = systemintroService.selectById(id); // 调用服务层的方法根据ID查询数据并返回实体对象
return R.ok().put("data", systemintro); // 返回一个包含查询结果的响应对象,并附带成功消息
}
/**
*
*/
@RequestMapping("/save") // 定义一个请求映射,当访问 /save 路径时,会调用这个方法
public R save(@RequestBody SystemintroEntity systemintro, HttpServletRequest request){ // 定义一个方法接收一个JSON格式的请求体类型为 SystemintroEntity并接收一个 HttpServletRequest 对象
systemintro.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); // 生成一个新的唯一ID由当前时间戳加上一个随机数
//ValidatorUtils.validateEntity(systemintro); // 注释掉的代码,用于验证 systemintro 实体对象是否符合要求
systemintroService.insert(systemintro); // 调用服务层的方法将 systemintro 实体对象插入数据库
return R.ok(); // 返回一个包含成功信息的 R 对象
}
/**
*
*/
@RequestMapping("/add") // 定义一个请求映射,当访问 /add 路径时,会调用这个方法
public R add(@RequestBody SystemintroEntity systemintro, HttpServletRequest request){ // 定义一个方法,接收一个请求体中的 SystemintroEntity 对象和 HttpServletRequest 对象
systemintro.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); // 生成一个新的唯一ID由当前时间戳加上一个随机数
//ValidatorUtils.validateEntity(systemintro); // 注释掉的代码,用于验证 systemintro 实体对象是否符合要求
systemintroService.insert(systemintro); // 调用服务层的方法将 systemintro 实体对象插入数据库
return R.ok(); // 返回一个包含成功信息的 R 对象
}
/**
*
*/
@RequestMapping("/update") // 定义一个请求映射,当访问 /update 路径时,会调用这个方法
@Transactional // 定义了一个事务注解,表示该方法中的数据库操作应该在一个事务中执行
public R update(@RequestBody SystemintroEntity systemintro, HttpServletRequest request){ // 定义一个方法,接收一个请求体中的 SystemintroEntity 对象和 HttpServletRequest 对象
//ValidatorUtils.validateEntity(systemintro); // 注释掉的代码,用于验证 systemintro 实体对象是否符合要求
systemintroService.updateById(systemintro); // 调用服务层的方法根据 ID 更新 systemintro 实体对象的所有字段
return R.ok(); // 返回一个包含成功信息的 R 对象
}
/**
*
*/
@RequestMapping("/delete") // 定义一个请求映射,当访问 /delete 路径时,会调用这个方法
public R delete(@RequestBody Long[] ids){ // 定义一个方法,接收一个请求体中的 Long 数组,类型为 Long[]
systemintroService.deleteBatchIds(Arrays.asList(ids)); // 调用服务层的方法,根据传入的 ID 数组批量删除数据
return R.ok(); // 返回一个包含成功信息的 R 对象
}
/**
*
*/
@RequestMapping("/remind/{columnName}/{type}") // 定义一个请求映射,当访问 /remind/{columnName}/{type} 路径时,会调用这个方法
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) { // 定义一个方法,接收一个路径变量 columnName 和 type类型为 String以及一个请求参数 map类型为 Map<String, Object>
map.put("column", columnName); // 将 columnName 添加到 map 中,键为 "column"
map.put("type", type); // 将 type 添加到 map 中,键为 "type"
if(type.equals("2")) { // 如果 type 等于 "2"
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // 创建一个日期格式化对象,格式为 "yyyy-MM-dd"
Calendar c = Calendar.getInstance(); // 创建一个日历对象,获取当前时间
Date remindStartDate = null; // 创建一个日期对象,用于存储提醒开始时间
Date remindEndDate = null; // 创建一个日期对象,用于存储提醒结束时间
if(map.get("remindstart")!=null) { // 如果 map 中存在 "remindstart" 键
Integer remindStart = Integer.parseInt(map.get("remindstart").toString()); // 将 "remindstart" 键对应的值转换为整数
c.setTime(new Date()); // 设置日历对象的时间为当前时间
c.add(Calendar.DAY_OF_MONTH,remindStart); // 将日历对象的时间增加 remindStart 天
remindStartDate = c.getTime(); // 获取增加后的时间,并赋值给 remindStartDate
map.put("remindstart", sdf.format(remindStartDate)); // 将 remindStartDate 格式化为 "yyyy-MM-dd" 格式,并添加到 map 中,键为 "remindstart"
}
if(map.get("remindend")!=null) { // 如果 map 中存在 "remindend" 键
Integer remindEnd = Integer.parseInt(map.get("remindend").toString()); // 将 "remindend" 键对应的值转换为整数
c.setTime(new Date()); // 设置日历对象的时间为当前时间
c.add(Calendar.DAY_OF_MONTH,remindEnd); // 将日历对象的时间增加 remindEnd 天
remindEndDate = c.getTime(); // 获取增加后的时间,并赋值给 remindEndDate
map.put("remindend", sdf.format(remindEndDate)); // 将 remindEndDate 格式化为 "yyyy-MM-dd" 格式,并添加到 map 中,键为 "remindend"
}
}
Wrapper<SystemintroEntity> wrapper = new EntityWrapper<SystemintroEntity>(); // 创建一个实体包装器对象,用于构建查询条件
if(map.get("remindstart")!=null) { // 如果 map 中存在 "remindstart" 键
wrapper.ge(columnName, map.get("remindstart")); // 设置查询条件,查询 columnName 字段大于等于 "remindstart" 键对应的值
}
if(map.get("remindend")!=null) { // 如果 map 中存在 "remindend" 键
wrapper.le(columnName, map.get("remindend")); // 设置查询条件,查询 columnName 字段小于等于 "remindend" 键对应的值
}
int count = systemintroService.selectCount(wrapper); // 调用服务层的方法,根据查询条件查询符合条件的记录数,并赋值给 count
return R.ok().put("count", count); // 返回一个包含查询结果的响应对象,其中包含键 "count" 和对应的 count 值
}
}

@ -0,0 +1,179 @@
package com.controller;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
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.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UsersEntity;
import com.service.TokenService;
import com.service.UsersService;
import com.utils.CommonUtil;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;
/**
*
*/
@RequestMapping("users") // 定义请求路径的基础 URL 为 "users"
@RestController // 标明该类是一个控制器,返回的对象直接作为 JSON 响应
public class UsersController {
@Autowired // 自动注入 UsersService 依赖
private UsersService userService;
@Autowired // 自动注入 TokenService 依赖
private TokenService tokenService;
/**
*
*/
@IgnoreAuth // 忽略认证,允许未登录用户访问
@PostMapping(value = "/login") // 处理 POST 请求,路径为 "users/login"
public R login(String username, String password, String captcha, HttpServletRequest request) {
// 根据用户名查询用户
UsersEntity user = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
// 检查用户是否存在且密码是否匹配
if(user == null || !user.getPassword().equals(password)) {
return R.error("账号或密码不正确"); // 返回错误信息
}
// 生成用户的 token
String token = tokenService.generateToken(user.getId(), username, "users", user.getRole());
return R.ok().put("token", token); // 返回成功信息和 token
}
/**
*
*/
@IgnoreAuth // 忽略认证,允许未登录用户访问
@PostMapping(value = "/register") // 处理 POST 请求,路径为 "users/register"
public R register(@RequestBody UsersEntity user) {
// 校验用户是否已存在
if(userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) != null) {
return R.error("用户已存在"); // 返回用户已存在的错误信息
}
userService.insert(user); // 插入新用户
return R.ok(); // 返回成功信息
}
/**
* 退
*/
@GetMapping(value = "logout") // 处理 GET 请求,路径为 "users/logout"
public R logout(HttpServletRequest request) {
request.getSession().invalidate(); // 使 session 失效,用户登出
return R.ok("退出成功"); // 返回成功信息
}
/**
*
*/
@IgnoreAuth // 忽略认证,允许未登录用户访问
@RequestMapping(value = "/resetPass") // 处理请求,路径为 "users/resetPass"
public R resetPass(String username, HttpServletRequest request){
// 根据用户名查询用户
UsersEntity user = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
if(user == null) {
return R.error("账号不存在"); // 返回账号不存在的错误信息
}
user.setPassword("123456"); // 将用户密码重置为 "123456"
userService.update(user, null); // 更新用户信息
return R.ok("密码已重置为123456"); // 返回成功信息
}
/**
*
*/
@RequestMapping("/page") // 处理请求,路径为 "users/page"
public R page(@RequestParam Map<String, Object> params, UsersEntity user) {
EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>(); // 创建查询条件
// 调用服务层方法查询分页数据
PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
return R.ok().put("data", page); // 返回查询结果
}
/**
*
*/
@RequestMapping("/list") // 处理请求,路径为 "users/list"
public R list(UsersEntity user) {
EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>(); // 创建查询条件
ew.allEq(MPUtil.allEQMapPre(user, "user")); // 添加所有相等条件
return R.ok().put("data", userService.selectListView(ew)); // 返回查询结果
}
/**
*
*/
@RequestMapping("/info/{id}") // 处理请求,路径为 "users/info/{id}"
public R info(@PathVariable("id") String id) {
UsersEntity user = userService.selectById(id); // 根据 ID 查找用户
return R.ok().put("data", user); // 返回用户信息
}
/**
* session
*/
@RequestMapping("/session") // 处理请求,路径为 "users/session"
public R getCurrUser(HttpServletRequest request) {
Long id = (Long) request.getSession().getAttribute("userId"); // 从 session 中获取用户 ID
UsersEntity user = userService.selectById(id); // 根据 ID 查找用户
return R.ok().put("data", user); // 返回用户信息
}
/**
*
*/
@PostMapping("/save") // 处理 POST 请求,路径为 "users/save"
public R save(@RequestBody UsersEntity user) {
// 校验用户是否已存在
if(userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) != null) {
return R.error("用户已存在"); // 返回用户已存在的错误信息
}
userService.insert(user); // 插入新用户
return R.ok(); // 返回成功信息
}
/**
*
*/
@RequestMapping("/update") // 处理请求,路径为 "users/update"
public R update(@RequestBody UsersEntity user) {
// 校验用户是否已存在
UsersEntity u = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername()));
if(u != null && u.getId() != user.getId() && u.getUsername().equals(user.getUsername())) {
return R.error("用户名已存在。"); // 返回用户名已存在的错误信息
}
userService.updateById(user); // 更新用户信息
return R.ok(); // 返回成功信息
}
/**
*
*/
@RequestMapping("/delete") // 处理请求,路径为 "users/delete"
public R delete(@RequestBody Long[] ids) {
userService.deleteBatchIds(Arrays.asList(ids)); // 批量删除用户
return R.ok(); // 返回成功信息
}
}

@ -0,0 +1,328 @@
package com.controller;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.text.ParseException;
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 java.io.IOException;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
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.WenjuandafuEntity;
import com.entity.view.WenjuandafuView;
import com.service.WenjuandafuService;
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 2023-02-21 09:46:06
*/
@RestController
@RequestMapping("/wenjuandafu")
public class WenjuandafuController {
@Autowired
private WenjuandafuService wenjuandafuService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,WenjuandafuEntity wenjuandafu,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
wenjuandafu.setZhanghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<WenjuandafuEntity> ew = new EntityWrapper<WenjuandafuEntity>();
PageUtils page = wenjuandafuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wenjuandafu), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,WenjuandafuEntity wenjuandafu,
HttpServletRequest request){
EntityWrapper<WenjuandafuEntity> ew = new EntityWrapper<WenjuandafuEntity>();
PageUtils page = wenjuandafuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wenjuandafu), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( WenjuandafuEntity wenjuandafu){
EntityWrapper<WenjuandafuEntity> ew = new EntityWrapper<WenjuandafuEntity>();
ew.allEq(MPUtil.allEQMapPre( wenjuandafu, "wenjuandafu"));
return R.ok().put("data", wenjuandafuService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(WenjuandafuEntity wenjuandafu){
EntityWrapper< WenjuandafuEntity> ew = new EntityWrapper< WenjuandafuEntity>();
ew.allEq(MPUtil.allEQMapPre( wenjuandafu, "wenjuandafu"));
WenjuandafuView wenjuandafuView = wenjuandafuService.selectView(ew);
return R.ok("查询问卷答复成功").put("data", wenjuandafuView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
WenjuandafuEntity wenjuandafu = wenjuandafuService.selectById(id);
return R.ok().put("data", wenjuandafu);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
WenjuandafuEntity wenjuandafu = wenjuandafuService.selectById(id);
return R.ok().put("data", wenjuandafu);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody WenjuandafuEntity wenjuandafu, HttpServletRequest request){
wenjuandafu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(wenjuandafu);
wenjuandafuService.insert(wenjuandafu);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody WenjuandafuEntity wenjuandafu, HttpServletRequest request){
wenjuandafu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(wenjuandafu);
wenjuandafuService.insert(wenjuandafu);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody WenjuandafuEntity wenjuandafu, HttpServletRequest request){
//ValidatorUtils.validateEntity(wenjuandafu);
wenjuandafuService.updateById(wenjuandafu);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
wenjuandafuService.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<WenjuandafuEntity> wrapper = new EntityWrapper<WenjuandafuEntity>();
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("yonghu")) {
wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
}
int count = wenjuandafuService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
*
*/
@RequestMapping("/value/{xColumnName}/{yColumnName}")
public R value(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
EntityWrapper<WenjuandafuEntity> ew = new EntityWrapper<WenjuandafuEntity>();
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
ew.eq("zhanghao", (String)request.getSession().getAttribute("username"));
}
List<Map<String, Object>> result = wenjuandafuService.selectValue(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/value/{xColumnName}/{yColumnName}/{timeStatType}")
public R valueDay(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
params.put("timeStatType", timeStatType);
EntityWrapper<WenjuandafuEntity> ew = new EntityWrapper<WenjuandafuEntity>();
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
ew.eq("zhanghao", (String)request.getSession().getAttribute("username"));
}
List<Map<String, Object>> result = wenjuandafuService.selectTimeStatValue(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/group/{columnName}")
public R group(@PathVariable("columnName") String columnName,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("column", columnName);
EntityWrapper<WenjuandafuEntity> ew = new EntityWrapper<WenjuandafuEntity>();
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
ew.eq("zhanghao", (String)request.getSession().getAttribute("username"));
}
List<Map<String, Object>> result = wenjuandafuService.selectGroup(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/count")
public R count(@RequestParam Map<String, Object> params,WenjuandafuEntity wenjuandafu, HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
wenjuandafu.setZhanghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<WenjuandafuEntity> ew = new EntityWrapper<WenjuandafuEntity>();
int count = wenjuandafuService.selectCount(MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wenjuandafu), params), params));
return R.ok().put("data", count);
}
}

@ -0,0 +1,382 @@
package com.controller;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.text.ParseException;
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 java.io.IOException;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
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.WenjuandiaochaEntity;
import com.entity.view.WenjuandiaochaView;
import com.service.WenjuandiaochaService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import com.service.StoreupService;
import com.entity.StoreupEntity;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@RestController
@RequestMapping("/wenjuandiaocha")
public class WenjuandiaochaController {
@Autowired
private WenjuandiaochaService wenjuandiaochaService;
@Autowired
private StoreupService storeupService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,WenjuandiaochaEntity wenjuandiaocha,
HttpServletRequest request){
EntityWrapper<WenjuandiaochaEntity> ew = new EntityWrapper<WenjuandiaochaEntity>();
PageUtils page = wenjuandiaochaService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wenjuandiaocha), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,WenjuandiaochaEntity wenjuandiaocha,
HttpServletRequest request){
EntityWrapper<WenjuandiaochaEntity> ew = new EntityWrapper<WenjuandiaochaEntity>();
PageUtils page = wenjuandiaochaService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wenjuandiaocha), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( WenjuandiaochaEntity wenjuandiaocha){
EntityWrapper<WenjuandiaochaEntity> ew = new EntityWrapper<WenjuandiaochaEntity>();
ew.allEq(MPUtil.allEQMapPre( wenjuandiaocha, "wenjuandiaocha"));
return R.ok().put("data", wenjuandiaochaService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(WenjuandiaochaEntity wenjuandiaocha){
EntityWrapper< WenjuandiaochaEntity> ew = new EntityWrapper< WenjuandiaochaEntity>();
ew.allEq(MPUtil.allEQMapPre( wenjuandiaocha, "wenjuandiaocha"));
WenjuandiaochaView wenjuandiaochaView = wenjuandiaochaService.selectView(ew);
return R.ok("查询问卷调查成功").put("data", wenjuandiaochaView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
WenjuandiaochaEntity wenjuandiaocha = wenjuandiaochaService.selectById(id);
wenjuandiaocha.setClicktime(new Date());
wenjuandiaochaService.updateById(wenjuandiaocha);
return R.ok().put("data", wenjuandiaocha);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
WenjuandiaochaEntity wenjuandiaocha = wenjuandiaochaService.selectById(id);
wenjuandiaocha.setClicktime(new Date());
wenjuandiaochaService.updateById(wenjuandiaocha);
return R.ok().put("data", wenjuandiaocha);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody WenjuandiaochaEntity wenjuandiaocha, HttpServletRequest request){
wenjuandiaocha.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(wenjuandiaocha);
wenjuandiaochaService.insert(wenjuandiaocha);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody WenjuandiaochaEntity wenjuandiaocha, HttpServletRequest request){
wenjuandiaocha.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(wenjuandiaocha);
wenjuandiaochaService.insert(wenjuandiaocha);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody WenjuandiaochaEntity wenjuandiaocha, HttpServletRequest request){
//ValidatorUtils.validateEntity(wenjuandiaocha);
wenjuandiaochaService.updateById(wenjuandiaocha);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
wenjuandiaochaService.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<WenjuandiaochaEntity> wrapper = new EntityWrapper<WenjuandiaochaEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = wenjuandiaochaService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map<String, Object> params,WenjuandiaochaEntity wenjuandiaocha, HttpServletRequest request,String pre){
EntityWrapper<WenjuandiaochaEntity> ew = new EntityWrapper<WenjuandiaochaEntity>();
Map<String, Object> newMap = new HashMap<String, Object>();
Map<String, Object> param = new HashMap<String, Object>();
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, Object> entry = it.next();
String key = entry.getKey();
String newKey = entry.getKey();
if (pre.endsWith(".")) {
newMap.put(pre + newKey, entry.getValue());
} else if (StringUtils.isEmpty(pre)) {
newMap.put(newKey, entry.getValue());
} else {
newMap.put(pre + "." + newKey, entry.getValue());
}
}
params.put("sort", "clicktime");
params.put("order", "desc");
PageUtils page = wenjuandiaochaService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wenjuandiaocha), params), params));
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/autoSort2")
public R autoSort2(@RequestParam Map<String, Object> params,WenjuandiaochaEntity wenjuandiaocha, HttpServletRequest request){
String userId = request.getSession().getAttribute("userId").toString();
String inteltypeColumn = "leixing";
List<StoreupEntity> storeups = storeupService.selectList(new EntityWrapper<StoreupEntity>().eq("type", 1).eq("userid", userId).eq("tablename", "wenjuandiaocha").orderBy("addtime", false));
List<String> inteltypes = new ArrayList<String>();
Integer limit = params.get("limit")==null?10:Integer.parseInt(params.get("limit").toString());
List<WenjuandiaochaEntity> wenjuandiaochaList = new ArrayList<WenjuandiaochaEntity>();
//去重
if(storeups!=null && storeups.size()>0) {
for(StoreupEntity s : storeups) {
wenjuandiaochaList.addAll(wenjuandiaochaService.selectList(new EntityWrapper<WenjuandiaochaEntity>().eq(inteltypeColumn, s.getInteltype())));
}
}
EntityWrapper<WenjuandiaochaEntity> ew = new EntityWrapper<WenjuandiaochaEntity>();
params.put("sort", "id");
params.put("order", "desc");
PageUtils page = wenjuandiaochaService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wenjuandiaocha), params), params));
List<WenjuandiaochaEntity> pageList = (List<WenjuandiaochaEntity>)page.getList();
if(wenjuandiaochaList.size()<limit) {
int toAddNum = (limit-wenjuandiaochaList.size())<=pageList.size()?(limit-wenjuandiaochaList.size()):pageList.size();
for(WenjuandiaochaEntity o1 : pageList) {
boolean addFlag = true;
for(WenjuandiaochaEntity o2 : wenjuandiaochaList) {
if(o1.getId().intValue()==o2.getId().intValue()) {
addFlag = false;
break;
}
}
if(addFlag) {
wenjuandiaochaList.add(o1);
if(--toAddNum==0) break;
}
}
} else if(wenjuandiaochaList.size()>limit) {
wenjuandiaochaList = wenjuandiaochaList.subList(0, limit);
}
page.setList(wenjuandiaochaList);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/value/{xColumnName}/{yColumnName}")
public R value(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
EntityWrapper<WenjuandiaochaEntity> ew = new EntityWrapper<WenjuandiaochaEntity>();
List<Map<String, Object>> result = wenjuandiaochaService.selectValue(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/value/{xColumnName}/{yColumnName}/{timeStatType}")
public R valueDay(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
params.put("timeStatType", timeStatType);
EntityWrapper<WenjuandiaochaEntity> ew = new EntityWrapper<WenjuandiaochaEntity>();
List<Map<String, Object>> result = wenjuandiaochaService.selectTimeStatValue(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/group/{columnName}")
public R group(@PathVariable("columnName") String columnName,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("column", columnName);
EntityWrapper<WenjuandiaochaEntity> ew = new EntityWrapper<WenjuandiaochaEntity>();
List<Map<String, Object>> result = wenjuandiaochaService.selectGroup(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/count")
public R count(@RequestParam Map<String, Object> params,WenjuandiaochaEntity wenjuandiaocha, HttpServletRequest request){
EntityWrapper<WenjuandiaochaEntity> ew = new EntityWrapper<WenjuandiaochaEntity>();
int count = wenjuandiaochaService.selectCount(MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wenjuandiaocha), params), params));
return R.ok().put("data", count);
}
}

@ -0,0 +1,383 @@
package com.controller;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.text.ParseException;
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 java.io.IOException;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
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.YonghuEntity;
import com.entity.view.YonghuView;
import com.service.YonghuService;
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 2023-02-21 09:46:06
*/
@RestController
@RequestMapping("/yonghu")
public class YonghuController {
@Autowired
private YonghuService yonghuService;
@Autowired
private TokenService tokenService;
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("zhanghao", username));
if(u==null || !u.getMima().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(u.getId(), username,"yonghu", "用户" );
return R.ok().put("token", token);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/register")
public R register(@RequestBody YonghuEntity yonghu){
//ValidatorUtils.validateEntity(yonghu);
YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("zhanghao", yonghu.getZhanghao()));
if(u!=null) {
return R.error("注册用户已存在");
}
Long uId = new Date().getTime();
yonghu.setId(uId);
yonghuService.insert(yonghu);
return R.ok();
}
/**
* 退
*/
@RequestMapping("/logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
* session
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Long id = (Long)request.getSession().getAttribute("userId");
YonghuEntity u = yonghuService.selectById(id);
return R.ok().put("data", u);
}
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("zhanghao", username));
if(u==null) {
return R.error("账号不存在");
}
u.setMima("123456");
yonghuService.updateById(u);
return R.ok("密码已重置为123456");
}
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,YonghuEntity yonghu,
HttpServletRequest request){
EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
PageUtils page = yonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,YonghuEntity yonghu,
HttpServletRequest request){
EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
PageUtils page = yonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( YonghuEntity yonghu){
EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
ew.allEq(MPUtil.allEQMapPre( yonghu, "yonghu"));
return R.ok().put("data", yonghuService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(YonghuEntity yonghu){
EntityWrapper< YonghuEntity> ew = new EntityWrapper< YonghuEntity>();
ew.allEq(MPUtil.allEQMapPre( yonghu, "yonghu"));
YonghuView yonghuView = yonghuService.selectView(ew);
return R.ok("查询用户成功").put("data", yonghuView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
YonghuEntity yonghu = yonghuService.selectById(id);
return R.ok().put("data", yonghu);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
YonghuEntity yonghu = yonghuService.selectById(id);
return R.ok().put("data", yonghu);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yonghu);
YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("zhanghao", yonghu.getZhanghao()));
if(u!=null) {
return R.error("用户已存在");
}
yonghu.setId(new Date().getTime());
yonghuService.insert(yonghu);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yonghu);
YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("zhanghao", yonghu.getZhanghao()));
if(u!=null) {
return R.error("用户已存在");
}
yonghu.setId(new Date().getTime());
yonghuService.insert(yonghu);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
//ValidatorUtils.validateEntity(yonghu);
yonghuService.updateById(yonghu);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
yonghuService.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<YonghuEntity> wrapper = new EntityWrapper<YonghuEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = yonghuService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
*
*/
@RequestMapping("/value/{xColumnName}/{yColumnName}")
public R value(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
List<Map<String, Object>> result = yonghuService.selectValue(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/value/{xColumnName}/{yColumnName}/{timeStatType}")
public R valueDay(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
params.put("timeStatType", timeStatType);
EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
List<Map<String, Object>> result = yonghuService.selectTimeStatValue(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/group/{columnName}")
public R group(@PathVariable("columnName") String columnName,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("column", columnName);
EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
List<Map<String, Object>> result = yonghuService.selectGroup(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/count")
public R count(@RequestParam Map<String, Object> params,YonghuEntity yonghu, HttpServletRequest request){
EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
int count = yonghuService.selectCount(MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));
return R.ok().put("data", count);
}
}

@ -0,0 +1,35 @@
package com.dao;
import com.entity.ChatEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.ChatVO;
import com.entity.view.ChatView;
/**
* 线
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public interface ChatDao extends BaseMapper<ChatEntity> {
List<ChatVO> selectListVO(@Param("ew") Wrapper<ChatEntity> wrapper);
ChatVO selectVO(@Param("ew") Wrapper<ChatEntity> wrapper);
List<ChatView> selectListView(@Param("ew") Wrapper<ChatEntity> wrapper);
List<ChatView> selectListView(Pagination page,@Param("ew") Wrapper<ChatEntity> wrapper);
ChatView selectView(@Param("ew") Wrapper<ChatEntity> wrapper);
}

@ -0,0 +1,28 @@
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);
List<Map<String, Object>> selectTimeStatValue(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,35 @@
package com.dao;
import com.entity.ForumEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.ForumVO;
import com.entity.view.ForumView;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public interface ForumDao extends BaseMapper<ForumEntity> {
List<ForumVO> selectListVO(@Param("ew") Wrapper<ForumEntity> wrapper);
ForumVO selectVO(@Param("ew") Wrapper<ForumEntity> wrapper);
List<ForumView> selectListView(@Param("ew") Wrapper<ForumEntity> wrapper);
List<ForumView> selectListView(Pagination page,@Param("ew") Wrapper<ForumEntity> wrapper);
ForumView selectView(@Param("ew") Wrapper<ForumEntity> wrapper);
}

@ -0,0 +1,35 @@
package com.dao;
import com.entity.LeixingEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.LeixingVO;
import com.entity.view.LeixingView;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public interface LeixingDao extends BaseMapper<LeixingEntity> {
List<LeixingVO> selectListVO(@Param("ew") Wrapper<LeixingEntity> wrapper);
LeixingVO selectVO(@Param("ew") Wrapper<LeixingEntity> wrapper);
List<LeixingView> selectListView(@Param("ew") Wrapper<LeixingEntity> wrapper);
List<LeixingView> selectListView(Pagination page,@Param("ew") Wrapper<LeixingEntity> wrapper);
LeixingView selectView(@Param("ew") Wrapper<LeixingEntity> wrapper);
}

@ -0,0 +1,38 @@
package com.dao;
import com.entity.NewsEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
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 2023-02-21 09:46:06
*/
public interface NewsDao extends BaseMapper<NewsEntity> {
// 根据查询条件Wrapper选择公告的信息列表并返回一个 NewsVO 对象的列表
List<NewsVO> selectListVO(@Param("ew") Wrapper<NewsEntity> wrapper);
// 根据查询条件Wrapper选择单个公告的信息并返回一个 NewsVO 对象
NewsVO selectVO(@Param("ew") Wrapper<NewsEntity> wrapper);
// 根据查询条件Wrapper选择公告的信息视图列表并返回一个 NewsView 对象的列表
List<NewsView> selectListView(@Param("ew") Wrapper<NewsEntity> wrapper);
// 根据查询条件Wrapper与分页信息选择公告的信息视图列表并返回一个 NewsView 对象的列表
List<NewsView> selectListView(Pagination page, @Param("ew") Wrapper<NewsEntity> wrapper);
// 根据查询条件Wrapper选择单个公告的信息视图并返回一个 NewsView 对象
NewsView selectView(@Param("ew") Wrapper<NewsEntity> wrapper);
}

@ -0,0 +1,35 @@
package com.dao;
import com.entity.StoreupEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.StoreupVO;
import com.entity.view.StoreupView;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public interface StoreupDao extends BaseMapper<StoreupEntity> {
List<StoreupVO> selectListVO(@Param("ew") Wrapper<StoreupEntity> wrapper);
StoreupVO selectVO(@Param("ew") Wrapper<StoreupEntity> wrapper);
List<StoreupView> selectListView(@Param("ew") Wrapper<StoreupEntity> wrapper);
List<StoreupView> selectListView(Pagination page,@Param("ew") Wrapper<StoreupEntity> wrapper);
StoreupView selectView(@Param("ew") Wrapper<StoreupEntity> wrapper);
}

@ -0,0 +1,38 @@
package com.dao;
import com.entity.SystemintroEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.SystemintroVO;
import com.entity.view.SystemintroView;
/**
*
* "关于我们"访
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public interface SystemintroDao extends BaseMapper<SystemintroEntity> {
// 根据查询条件Wrapper选择系统介绍的信息列表并返回一个 SystemintroVO 对象的列表
List<SystemintroVO> selectListVO(@Param("ew") Wrapper<SystemintroEntity> wrapper);
// 根据查询条件Wrapper选择单个系统介绍的信息并返回一个 SystemintroVO 对象
SystemintroVO selectVO(@Param("ew") Wrapper<SystemintroEntity> wrapper);
// 根据查询条件Wrapper选择系统介绍信息视图的列表并返回一个 SystemintroView 对象的列表
List<SystemintroView> selectListView(@Param("ew") Wrapper<SystemintroEntity> wrapper);
// 根据查询条件Wrapper和分页信息选择系统介绍信息视图的列表并返回一个 SystemintroView 对象的列表
List<SystemintroView> selectListView(Pagination page, @Param("ew") Wrapper<SystemintroEntity> wrapper);
// 根据查询条件Wrapper选择单个平台介绍的信息视图并返回一个 SystemintroView 对象
SystemintroView selectView(@Param("ew") Wrapper<SystemintroEntity> 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,25 @@
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.UsersEntity;
/**
*
* 访
*/
public interface UsersDao extends BaseMapper<UsersEntity> {
// 根据查询条件Wrapper选择用户列表并返回一个 UsersEntity 对象的列表
List<UsersEntity> selectListView(@Param("ew") Wrapper<UsersEntity> wrapper);
// 根据查询条件Wrapper和分页信息选择用户列表并返回一个 UsersEntity 对象的列表
List<UsersEntity> selectListView(Pagination page, @Param("ew") Wrapper<UsersEntity> wrapper);
}

@ -0,0 +1,43 @@
package com.dao;
import com.entity.WenjuandafuEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.WenjuandafuVO;
import com.entity.view.WenjuandafuView;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public interface WenjuandafuDao extends BaseMapper<WenjuandafuEntity> {
List<WenjuandafuVO> selectListVO(@Param("ew") Wrapper<WenjuandafuEntity> wrapper);
WenjuandafuVO selectVO(@Param("ew") Wrapper<WenjuandafuEntity> wrapper);
List<WenjuandafuView> selectListView(@Param("ew") Wrapper<WenjuandafuEntity> wrapper);
List<WenjuandafuView> selectListView(Pagination page,@Param("ew") Wrapper<WenjuandafuEntity> wrapper);
WenjuandafuView selectView(@Param("ew") Wrapper<WenjuandafuEntity> wrapper);
List<Map<String, Object>> selectValue(@Param("params") Map<String, Object> params,@Param("ew") Wrapper<WenjuandafuEntity> wrapper);
List<Map<String, Object>> selectTimeStatValue(@Param("params") Map<String, Object> params,@Param("ew") Wrapper<WenjuandafuEntity> wrapper);
List<Map<String, Object>> selectGroup(@Param("params") Map<String, Object> params,@Param("ew") Wrapper<WenjuandafuEntity> wrapper);
}

@ -0,0 +1,43 @@
package com.dao;
import com.entity.WenjuandiaochaEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.WenjuandiaochaVO;
import com.entity.view.WenjuandiaochaView;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public interface WenjuandiaochaDao extends BaseMapper<WenjuandiaochaEntity> {
List<WenjuandiaochaVO> selectListVO(@Param("ew") Wrapper<WenjuandiaochaEntity> wrapper);
WenjuandiaochaVO selectVO(@Param("ew") Wrapper<WenjuandiaochaEntity> wrapper);
List<WenjuandiaochaView> selectListView(@Param("ew") Wrapper<WenjuandiaochaEntity> wrapper);
List<WenjuandiaochaView> selectListView(Pagination page,@Param("ew") Wrapper<WenjuandiaochaEntity> wrapper);
WenjuandiaochaView selectView(@Param("ew") Wrapper<WenjuandiaochaEntity> wrapper);
List<Map<String, Object>> selectValue(@Param("params") Map<String, Object> params,@Param("ew") Wrapper<WenjuandiaochaEntity> wrapper);
List<Map<String, Object>> selectTimeStatValue(@Param("params") Map<String, Object> params,@Param("ew") Wrapper<WenjuandiaochaEntity> wrapper);
List<Map<String, Object>> selectGroup(@Param("params") Map<String, Object> params,@Param("ew") Wrapper<WenjuandiaochaEntity> wrapper);
}

@ -0,0 +1,43 @@
package com.dao;
import com.entity.YonghuEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.YonghuVO;
import com.entity.view.YonghuView;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public interface YonghuDao extends BaseMapper<YonghuEntity> {
List<YonghuVO> selectListVO(@Param("ew") Wrapper<YonghuEntity> wrapper);
YonghuVO selectVO(@Param("ew") Wrapper<YonghuEntity> wrapper);
List<YonghuView> selectListView(@Param("ew") Wrapper<YonghuEntity> wrapper);
List<YonghuView> selectListView(Pagination page,@Param("ew") Wrapper<YonghuEntity> wrapper);
YonghuView selectView(@Param("ew") Wrapper<YonghuEntity> wrapper);
List<Map<String, Object>> selectValue(@Param("params") Map<String, Object> params,@Param("ew") Wrapper<YonghuEntity> wrapper);
List<Map<String, Object>> selectTimeStatValue(@Param("params") Map<String, Object> params,@Param("ew") Wrapper<YonghuEntity> wrapper);
List<Map<String, Object>> selectGroup(@Param("params") Map<String, Object> params,@Param("ew") Wrapper<YonghuEntity> wrapper);
}

@ -0,0 +1,164 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
* 线
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("chat")
public class ChatEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public ChatEntity() {
}
public ChatEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
* id
*/
private Long userid;
/**
* id
*/
private Long adminid;
/**
*
*/
private String ask;
/**
*
*/
private String reply;
/**
*
*/
private Integer isreply;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
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;
}
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
* id
*/
public void setAdminid(Long adminid) {
this.adminid = adminid;
}
/**
* id
*/
public Long getAdminid() {
return adminid;
}
/**
*
*/
public void setAsk(String ask) {
this.ask = ask;
}
/**
*
*/
public String getAsk() {
return ask;
}
/**
*
*/
public void setReply(String reply) {
this.reply = reply;
}
/**
*
*/
public String getReply() {
return reply;
}
/**
*
*/
public void setIsreply(Integer isreply) {
this.isreply = isreply;
}
/**
*
*/
public Integer getIsreply() {
return isreply;
}
}

@ -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,210 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("forum")
public class ForumEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public ForumEntity() {
}
public ForumEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String title;
/**
*
*/
private String content;
/**
* id
*/
private Long parentid;
/**
* id
*/
private Long userid;
/**
*
*/
private String username;
/**
*
*/
private String avatarurl;
/**
*
*/
private String isdone;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
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;
}
@TableField(exist = false)
private List<ForumEntity> childs;
public List<ForumEntity> getChilds() {
return childs;
}
public void setChilds(List<ForumEntity> childs) {
this.childs = childs;
}
/**
*
*/
public void setTitle(String title) {
this.title = title;
}
/**
*
*/
public String getTitle() {
return title;
}
/**
*
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public String getContent() {
return content;
}
/**
* id
*/
public void setParentid(Long parentid) {
this.parentid = parentid;
}
/**
* id
*/
public Long getParentid() {
return parentid;
}
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
*
*/
public void setUsername(String username) {
this.username = username;
}
/**
*
*/
public String getUsername() {
return username;
}
/**
*
*/
public void setAvatarurl(String avatarurl) {
this.avatarurl = avatarurl;
}
/**
*
*/
public String getAvatarurl() {
return avatarurl;
}
/**
*
*/
public void setIsdone(String isdone) {
this.isdone = isdone;
}
/**
*
*/
public String getIsdone() {
return isdone;
}
}

@ -0,0 +1,92 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("leixing")
public class LeixingEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public LeixingEntity() {
}
public LeixingEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String leixing;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
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;
}
/**
*
*/
public void setLeixing(String leixing) {
this.leixing = leixing;
}
/**
*
*/
public String getLeixing() {
return leixing;
}
}

@ -0,0 +1,146 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("news")
public class NewsEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public NewsEntity() {
}
public NewsEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String title;
/**
*
*/
private String introduction;
/**
*
*/
private String picture;
/**
*
*/
private String content;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
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;
}
/**
*
*/
public void setTitle(String title) {
this.title = title;
}
/**
*
*/
public String getTitle() {
return title;
}
/**
*
*/
public void setIntroduction(String introduction) {
this.introduction = introduction;
}
/**
*
*/
public String getIntroduction() {
return introduction;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
/**
*
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public String getContent() {
return content;
}
}

@ -0,0 +1,218 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("storeup")
public class StoreupEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public StoreupEntity() {
}
public StoreupEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
* id
*/
private Long userid;
/**
* id
*/
private Long refid;
/**
*
*/
private String tablename;
/**
*
*/
private String name;
/**
*
*/
private String picture;
/**
* (1:,21:,22:,31:,41:)
*/
private String type;
/**
*
*/
private String inteltype;
/**
*
*/
private String remark;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
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;
}
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
* id
*/
public void setRefid(Long refid) {
this.refid = refid;
}
/**
* id
*/
public Long getRefid() {
return refid;
}
/**
*
*/
public void setTablename(String tablename) {
this.tablename = tablename;
}
/**
*
*/
public String getTablename() {
return tablename;
}
/**
*
*/
public void setName(String name) {
this.name = name;
}
/**
*
*/
public String getName() {
return name;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
/**
* (1:,21:,22:,31:,41:)
*/
public void setType(String type) {
this.type = type;
}
/**
* (1:,21:,22:,31:,41:)
*/
public String getType() {
return type;
}
/**
*
*/
public void setInteltype(String inteltype) {
this.inteltype = inteltype;
}
/**
*
*/
public String getInteltype() {
return inteltype;
}
/**
*
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
*
*/
public String getRemark() {
return remark;
}
}

@ -0,0 +1,182 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("systemintro")
public class SystemintroEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public SystemintroEntity() {
}
public SystemintroEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String title;
/**
*
*/
private String subtitle;
/**
*
*/
private String content;
/**
* 1
*/
private String picture1;
/**
* 2
*/
private String picture2;
/**
* 3
*/
private String picture3;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
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;
}
/**
*
*/
public void setTitle(String title) {
this.title = title;
}
/**
*
*/
public String getTitle() {
return title;
}
/**
*
*/
public void setSubtitle(String subtitle) {
this.subtitle = subtitle;
}
/**
*
*/
public String getSubtitle() {
return subtitle;
}
/**
*
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public String getContent() {
return content;
}
/**
* 1
*/
public void setPicture1(String picture1) {
this.picture1 = picture1;
}
/**
* 1
*/
public String getPicture1() {
return picture1;
}
/**
* 2
*/
public void setPicture2(String picture2) {
this.picture2 = picture2;
}
/**
* 2
*/
public String getPicture2() {
return picture2;
}
/**
* 3
*/
public void setPicture3(String picture3) {
this.picture3 = picture3;
}
/**
* 3
*/
public String getPicture3() {
return picture3;
}
}

@ -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 UsersEntity 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,346 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("wenjuandafu")
public class WenjuandafuEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public WenjuandafuEntity() {
}
public WenjuandafuEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String wenjuanbiaoti;
/**
*
*/
private String leixing;
/**
*
*/
private String wentiyi;
/**
*
*/
private String dafuyi;
/**
*
*/
private String wentier;
/**
*
*/
private String dafuer;
/**
*
*/
private String wentisan;
/**
*
*/
private String dafusan;
/**
*
*/
private String wentisi;
/**
*
*/
private String dafusi;
/**
*
*/
private String wentiwu;
/**
*
*/
private String dafuwu;
/**
*
*/
private String zhanghao;
/**
*
*/
private String xingming;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
@DateTimeFormat
private Date tijiaoriqi;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
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;
}
/**
*
*/
public void setWenjuanbiaoti(String wenjuanbiaoti) {
this.wenjuanbiaoti = wenjuanbiaoti;
}
/**
*
*/
public String getWenjuanbiaoti() {
return wenjuanbiaoti;
}
/**
*
*/
public void setLeixing(String leixing) {
this.leixing = leixing;
}
/**
*
*/
public String getLeixing() {
return leixing;
}
/**
*
*/
public void setWentiyi(String wentiyi) {
this.wentiyi = wentiyi;
}
/**
*
*/
public String getWentiyi() {
return wentiyi;
}
/**
*
*/
public void setDafuyi(String dafuyi) {
this.dafuyi = dafuyi;
}
/**
*
*/
public String getDafuyi() {
return dafuyi;
}
/**
*
*/
public void setWentier(String wentier) {
this.wentier = wentier;
}
/**
*
*/
public String getWentier() {
return wentier;
}
/**
*
*/
public void setDafuer(String dafuer) {
this.dafuer = dafuer;
}
/**
*
*/
public String getDafuer() {
return dafuer;
}
/**
*
*/
public void setWentisan(String wentisan) {
this.wentisan = wentisan;
}
/**
*
*/
public String getWentisan() {
return wentisan;
}
/**
*
*/
public void setDafusan(String dafusan) {
this.dafusan = dafusan;
}
/**
*
*/
public String getDafusan() {
return dafusan;
}
/**
*
*/
public void setWentisi(String wentisi) {
this.wentisi = wentisi;
}
/**
*
*/
public String getWentisi() {
return wentisi;
}
/**
*
*/
public void setDafusi(String dafusi) {
this.dafusi = dafusi;
}
/**
*
*/
public String getDafusi() {
return dafusi;
}
/**
*
*/
public void setWentiwu(String wentiwu) {
this.wentiwu = wentiwu;
}
/**
*
*/
public String getWentiwu() {
return wentiwu;
}
/**
*
*/
public void setDafuwu(String dafuwu) {
this.dafuwu = dafuwu;
}
/**
*
*/
public String getDafuwu() {
return dafuwu;
}
/**
*
*/
public void setZhanghao(String zhanghao) {
this.zhanghao = zhanghao;
}
/**
*
*/
public String getZhanghao() {
return zhanghao;
}
/**
*
*/
public void setXingming(String xingming) {
this.xingming = xingming;
}
/**
*
*/
public String getXingming() {
return xingming;
}
/**
*
*/
public void setTijiaoriqi(Date tijiaoriqi) {
this.tijiaoriqi = tijiaoriqi;
}
/**
*
*/
public Date getTijiaoriqi() {
return tijiaoriqi;
}
}

@ -0,0 +1,259 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
//
@TableName("wenjuandiaocha")
public class WenjuandiaochaEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public WenjuandiaochaEntity() {
}
public WenjuandiaochaEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String wenjuanbiaoti;
/**
*
*/
private String fengmiantupian;
/**
*
*/
private String leixing;
/**
*
*/
private String wentiyi;
/**
*
*/
private String wentier;
/**
*
*/
private String wentisan;
/**
*
*/
private String wentisi;
/**
*
*/
private String wentiwu;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
@DateTimeFormat
private Date faburiqi;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date clicktime;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
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;
}
/**
*
*/
public void setWenjuanbiaoti(String wenjuanbiaoti) {
this.wenjuanbiaoti = wenjuanbiaoti;
}
/**
*
*/
public String getWenjuanbiaoti() {
return wenjuanbiaoti;
}
/**
*
*/
public void setFengmiantupian(String fengmiantupian) {
this.fengmiantupian = fengmiantupian;
}
/**
*
*/
public String getFengmiantupian() {
return fengmiantupian;
}
/**
*
*/
public void setLeixing(String leixing) {
this.leixing = leixing;
}
/**
*
*/
public String getLeixing() {
return leixing;
}
/**
*
*/
public void setWentiyi(String wentiyi) {
this.wentiyi = wentiyi;
}
/**
*
*/
public String getWentiyi() {
return wentiyi;
}
/**
*
*/
public void setWentier(String wentier) {
this.wentier = wentier;
}
/**
*
*/
public String getWentier() {
return wentier;
}
/**
*
*/
public void setWentisan(String wentisan) {
this.wentisan = wentisan;
}
/**
*
*/
public String getWentisan() {
return wentisan;
}
/**
*
*/
public void setWentisi(String wentisi) {
this.wentisi = wentisi;
}
/**
*
*/
public String getWentisi() {
return wentisi;
}
/**
*
*/
public void setWentiwu(String wentiwu) {
this.wentiwu = wentiwu;
}
/**
*
*/
public String getWentiwu() {
return wentiwu;
}
/**
*
*/
public void setFaburiqi(Date faburiqi) {
this.faburiqi = faburiqi;
}
/**
*
*/
public Date getFaburiqi() {
return faburiqi;
}
/**
*
*/
public void setClicktime(Date clicktime) {
this.clicktime = clicktime;
}
/**
*
*/
public Date getClicktime() {
return clicktime;
}
}

@ -0,0 +1,200 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("yonghu")
public class YonghuEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public YonghuEntity() {
}
public YonghuEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String zhanghao;
/**
*
*/
private String mima;
/**
*
*/
private String xingming;
/**
*
*/
private String xingbie;
/**
*
*/
private String youxiang;
/**
*
*/
private String shoujihaoma;
/**
*
*/
private String touxiang;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
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;
}
/**
*
*/
public void setZhanghao(String zhanghao) {
this.zhanghao = zhanghao;
}
/**
*
*/
public String getZhanghao() {
return zhanghao;
}
/**
*
*/
public void setMima(String mima) {
this.mima = mima;
}
/**
*
*/
public String getMima() {
return mima;
}
/**
*
*/
public void setXingming(String xingming) {
this.xingming = xingming;
}
/**
*
*/
public String getXingming() {
return xingming;
}
/**
*
*/
public void setXingbie(String xingbie) {
this.xingbie = xingbie;
}
/**
*
*/
public String getXingbie() {
return xingbie;
}
/**
*
*/
public void setYouxiang(String youxiang) {
this.youxiang = youxiang;
}
/**
*
*/
public String getYouxiang() {
return youxiang;
}
/**
*
*/
public void setShoujihaoma(String shoujihaoma) {
this.shoujihaoma = shoujihaoma;
}
/**
*
*/
public String getShoujihaoma() {
return shoujihaoma;
}
/**
*
*/
public void setTouxiang(String touxiang) {
this.touxiang = touxiang;
}
/**
*
*/
public String getTouxiang() {
return touxiang;
}
}

@ -0,0 +1,113 @@
package com.entity.model;
import com.entity.ChatEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 线
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class ChatModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long adminid;
/**
*
*/
private String ask;
/**
*
*/
private String reply;
/**
*
*/
private Integer isreply;
/**
* id
*/
public void setAdminid(Long adminid) {
this.adminid = adminid;
}
/**
* id
*/
public Long getAdminid() {
return adminid;
}
/**
*
*/
public void setAsk(String ask) {
this.ask = ask;
}
/**
*
*/
public String getAsk() {
return ask;
}
/**
*
*/
public void setReply(String reply) {
this.reply = reply;
}
/**
*
*/
public String getReply() {
return reply;
}
/**
*
*/
public void setIsreply(Integer isreply) {
this.isreply = isreply;
}
/**
*
*/
public Integer getIsreply() {
return isreply;
}
}

@ -0,0 +1,157 @@
package com.entity.model;
import com.entity.ForumEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class ForumModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String content;
/**
* id
*/
private Long parentid;
/**
* id
*/
private Long userid;
/**
*
*/
private String username;
/**
*
*/
private String avatarurl;
/**
*
*/
private String isdone;
/**
*
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public String getContent() {
return content;
}
/**
* id
*/
public void setParentid(Long parentid) {
this.parentid = parentid;
}
/**
* id
*/
public Long getParentid() {
return parentid;
}
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
*
*/
public void setUsername(String username) {
this.username = username;
}
/**
*
*/
public String getUsername() {
return username;
}
/**
*
*/
public void setAvatarurl(String avatarurl) {
this.avatarurl = avatarurl;
}
/**
*
*/
public String getAvatarurl() {
return avatarurl;
}
/**
*
*/
public void setIsdone(String isdone) {
this.isdone = isdone;
}
/**
*
*/
public String getIsdone() {
return isdone;
}
}

@ -0,0 +1,25 @@
package com.entity.model;
import com.entity.LeixingEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class LeixingModel implements Serializable {
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,80 @@
package com.entity.model;
import com.entity.NewsEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class NewsModel implements Serializable {
private static final long serialVersionUID = 1L; // 序列化版本号
/**
*
*/
private String introduction; // 存放公告的简介
/**
*
*/
private String picture; // 存放公告相关的图片
/**
*
*/
private String content; // 存放公告的详细内容
/**
*
*/
public void setIntroduction(String introduction) {
this.introduction = introduction; // 设置简介字段
}
/**
*
*/
public String getIntroduction() {
return introduction; // 返回简介字段的值
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture; // 设置图片字段
}
/**
*
*/
public String getPicture() {
return picture; // 返回图片字段的值
}
/**
*
*/
public void setContent(String content) {
this.content = content; // 设置内容字段
}
/**
*
*/
public String getContent() {
return content; // 返回内容字段的值
}
}

@ -0,0 +1,179 @@
package com.entity.model;
import com.entity.StoreupEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class StoreupModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long refid;
/**
*
*/
private String tablename;
/**
*
*/
private String name;
/**
*
*/
private String picture;
/**
* (1:,21:,22:,31:,41:)
*/
private String type;
/**
*
*/
private String inteltype;
/**
*
*/
private String remark;
/**
* id
*/
public void setRefid(Long refid) {
this.refid = refid;
}
/**
* id
*/
public Long getRefid() {
return refid;
}
/**
*
*/
public void setTablename(String tablename) {
this.tablename = tablename;
}
/**
*
*/
public String getTablename() {
return tablename;
}
/**
*
*/
public void setName(String name) {
this.name = name;
}
/**
*
*/
public String getName() {
return name;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
/**
* (1:,21:,22:,31:,41:)
*/
public void setType(String type) {
this.type = type;
}
/**
* (1:,21:,22:,31:,41:)
*/
public String getType() {
return type;
}
/**
*
*/
public void setInteltype(String inteltype) {
this.inteltype = inteltype;
}
/**
*
*/
public String getInteltype() {
return inteltype;
}
/**
*
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
*
*/
public String getRemark() {
return remark;
}
}

@ -0,0 +1,135 @@
package com.entity.model;
import com.entity.SystemintroEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class SystemintroModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String subtitle;
/**
*
*/
private String content;
/**
* 1
*/
private String picture1;
/**
* 2
*/
private String picture2;
/**
* 3
*/
private String picture3;
/**
*
*/
public void setSubtitle(String subtitle) {
this.subtitle = subtitle;
}
/**
*
*/
public String getSubtitle() {
return subtitle;
}
/**
*
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public String getContent() {
return content;
}
/**
* 1
*/
public void setPicture1(String picture1) {
this.picture1 = picture1;
}
/**
* 1
*/
public String getPicture1() {
return picture1;
}
/**
* 2
*/
public void setPicture2(String picture2) {
this.picture2 = picture2;
}
/**
* 2
*/
public String getPicture2() {
return picture2;
}
/**
* 3
*/
public void setPicture3(String picture3) {
this.picture3 = picture3;
}
/**
* 3
*/
public String getPicture3() {
return picture3;
}
}

@ -0,0 +1,335 @@
package com.entity.model;
import com.entity.WenjuandafuEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class WenjuandafuModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String leixing;
/**
*
*/
private String wentiyi;
/**
*
*/
private String dafuyi;
/**
*
*/
private String wentier;
/**
*
*/
private String dafuer;
/**
*
*/
private String wentisan;
/**
*
*/
private String dafusan;
/**
*
*/
private String wentisi;
/**
*
*/
private String dafusi;
/**
*
*/
private String wentiwu;
/**
*
*/
private String dafuwu;
/**
*
*/
private String zhanghao;
/**
*
*/
private String xingming;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date tijiaoriqi;
/**
*
*/
public void setLeixing(String leixing) {
this.leixing = leixing;
}
/**
*
*/
public String getLeixing() {
return leixing;
}
/**
*
*/
public void setWentiyi(String wentiyi) {
this.wentiyi = wentiyi;
}
/**
*
*/
public String getWentiyi() {
return wentiyi;
}
/**
*
*/
public void setDafuyi(String dafuyi) {
this.dafuyi = dafuyi;
}
/**
*
*/
public String getDafuyi() {
return dafuyi;
}
/**
*
*/
public void setWentier(String wentier) {
this.wentier = wentier;
}
/**
*
*/
public String getWentier() {
return wentier;
}
/**
*
*/
public void setDafuer(String dafuer) {
this.dafuer = dafuer;
}
/**
*
*/
public String getDafuer() {
return dafuer;
}
/**
*
*/
public void setWentisan(String wentisan) {
this.wentisan = wentisan;
}
/**
*
*/
public String getWentisan() {
return wentisan;
}
/**
*
*/
public void setDafusan(String dafusan) {
this.dafusan = dafusan;
}
/**
*
*/
public String getDafusan() {
return dafusan;
}
/**
*
*/
public void setWentisi(String wentisi) {
this.wentisi = wentisi;
}
/**
*
*/
public String getWentisi() {
return wentisi;
}
/**
*
*/
public void setDafusi(String dafusi) {
this.dafusi = dafusi;
}
/**
*
*/
public String getDafusi() {
return dafusi;
}
/**
*
*/
public void setWentiwu(String wentiwu) {
this.wentiwu = wentiwu;
}
/**
*
*/
public String getWentiwu() {
return wentiwu;
}
/**
*
*/
public void setDafuwu(String dafuwu) {
this.dafuwu = dafuwu;
}
/**
*
*/
public String getDafuwu() {
return dafuwu;
}
/**
*
*/
public void setZhanghao(String zhanghao) {
this.zhanghao = zhanghao;
}
/**
*
*/
public String getZhanghao() {
return zhanghao;
}
/**
*
*/
public void setXingming(String xingming) {
this.xingming = xingming;
}
/**
*
*/
public String getXingming() {
return xingming;
}
/**
*
*/
public void setTijiaoriqi(Date tijiaoriqi) {
this.tijiaoriqi = tijiaoriqi;
}
/**
*
*/
public Date getTijiaoriqi() {
return tijiaoriqi;
}
}

@ -0,0 +1,227 @@
package com.entity.model;
import com.entity.WenjuandiaochaEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class WenjuandiaochaModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String fengmiantupian;
/**
*
*/
private String leixing;
/**
*
*/
private String wentiyi;
/**
*
*/
private String wentier;
/**
*
*/
private String wentisan;
/**
*
*/
private String wentisi;
/**
*
*/
private String wentiwu;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date faburiqi;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date clicktime;
/**
*
*/
public void setFengmiantupian(String fengmiantupian) {
this.fengmiantupian = fengmiantupian;
}
/**
*
*/
public String getFengmiantupian() {
return fengmiantupian;
}
/**
*
*/
public void setLeixing(String leixing) {
this.leixing = leixing;
}
/**
*
*/
public String getLeixing() {
return leixing;
}
/**
*
*/
public void setWentiyi(String wentiyi) {
this.wentiyi = wentiyi;
}
/**
*
*/
public String getWentiyi() {
return wentiyi;
}
/**
*
*/
public void setWentier(String wentier) {
this.wentier = wentier;
}
/**
*
*/
public String getWentier() {
return wentier;
}
/**
*
*/
public void setWentisan(String wentisan) {
this.wentisan = wentisan;
}
/**
*
*/
public String getWentisan() {
return wentisan;
}
/**
*
*/
public void setWentisi(String wentisi) {
this.wentisi = wentisi;
}
/**
*
*/
public String getWentisi() {
return wentisi;
}
/**
*
*/
public void setWentiwu(String wentiwu) {
this.wentiwu = wentiwu;
}
/**
*
*/
public String getWentiwu() {
return wentiwu;
}
/**
*
*/
public void setFaburiqi(Date faburiqi) {
this.faburiqi = faburiqi;
}
/**
*
*/
public Date getFaburiqi() {
return faburiqi;
}
/**
*
*/
public void setClicktime(Date clicktime) {
this.clicktime = clicktime;
}
/**
*
*/
public Date getClicktime() {
return clicktime;
}
}

@ -0,0 +1,157 @@
package com.entity.model;
import com.entity.YonghuEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class YonghuModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String mima;
/**
*
*/
private String xingming;
/**
*
*/
private String xingbie;
/**
*
*/
private String youxiang;
/**
*
*/
private String shoujihaoma;
/**
*
*/
private String touxiang;
/**
*
*/
public void setMima(String mima) {
this.mima = mima;
}
/**
*
*/
public String getMima() {
return mima;
}
/**
*
*/
public void setXingming(String xingming) {
this.xingming = xingming;
}
/**
*
*/
public String getXingming() {
return xingming;
}
/**
*
*/
public void setXingbie(String xingbie) {
this.xingbie = xingbie;
}
/**
*
*/
public String getXingbie() {
return xingbie;
}
/**
*
*/
public void setYouxiang(String youxiang) {
this.youxiang = youxiang;
}
/**
*
*/
public String getYouxiang() {
return youxiang;
}
/**
*
*/
public void setShoujihaoma(String shoujihaoma) {
this.shoujihaoma = shoujihaoma;
}
/**
*
*/
public String getShoujihaoma() {
return shoujihaoma;
}
/**
*
*/
public void setTouxiang(String touxiang) {
this.touxiang = touxiang;
}
/**
*
*/
public String getTouxiang() {
return touxiang;
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.ChatEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
* 线
*
* 使
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("chat")
public class ChatView extends ChatEntity implements Serializable {
private static final long serialVersionUID = 1L;
public ChatView(){
}
public ChatView(ChatEntity chatEntity){
try {
BeanUtils.copyProperties(this, chatEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.ForumEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("forum")
public class ForumView extends ForumEntity implements Serializable {
private static final long serialVersionUID = 1L;
public ForumView(){
}
public ForumView(ForumEntity forumEntity){
try {
BeanUtils.copyProperties(this, forumEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.LeixingEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("leixing")
public class LeixingView extends LeixingEntity implements Serializable {
private static final long serialVersionUID = 1L;
public LeixingView(){
}
public LeixingView(LeixingEntity leixingEntity){
try {
BeanUtils.copyProperties(this, leixingEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,42 @@
package com.entity.view;
import com.entity.NewsEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
/**
*
*
* 使
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("news") // 指定该类对应的数据库表名为 "news"
public class NewsView extends NewsEntity implements Serializable {
private static final long serialVersionUID = 1L; // 序列化版本号
// 默认构造函数
public NewsView() {
}
// 构造函数,接受一个 NewsEntity 对象并复制其属性
public NewsView(NewsEntity newsEntity) {
try {
BeanUtils.copyProperties(this, newsEntity); // 使用 BeanUtils 复制属性
} catch (IllegalAccessException | InvocationTargetException e) {
// 捕获并处理属性复制过程中的异常
e.printStackTrace(); // 打印异常堆栈跟踪
}
}
}

@ -0,0 +1,37 @@
package com.entity.view;
import com.entity.StoreupEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("storeup") // 指定该类对应的数据库表名为 "storeup"
public class StoreupView extends StoreupEntity implements Serializable {
private static final long serialVersionUID = 1L; // 序列化版本号
// 默认构造函数
public StoreupView() {
}
// 构造函数,接受一个 StoreupEntity 对象并复制其属性
public StoreupView(StoreupEntity storeupEntity) {
try {
BeanUtils.copyProperties(this, storeupEntity); // 使用 BeanUtils 复制属性
} catch (IllegalAccessException | InvocationTargetException e) {
// 捕获并处理属性复制过程中的异常
e.printStackTrace(); // 打印异常堆栈跟踪
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.SystemintroEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("systemintro")
public class SystemintroView extends SystemintroEntity implements Serializable {
private static final long serialVersionUID = 1L;
public SystemintroView(){
}
public SystemintroView(SystemintroEntity systemintroEntity){
try {
BeanUtils.copyProperties(this, systemintroEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.WenjuandafuEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("wenjuandafu")
public class WenjuandafuView extends WenjuandafuEntity implements Serializable {
private static final long serialVersionUID = 1L;
public WenjuandafuView(){
}
public WenjuandafuView(WenjuandafuEntity wenjuandafuEntity){
try {
BeanUtils.copyProperties(this, wenjuandafuEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.WenjuandiaochaEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("wenjuandiaocha")
public class WenjuandiaochaView extends WenjuandiaochaEntity implements Serializable {
private static final long serialVersionUID = 1L;
public WenjuandiaochaView(){
}
public WenjuandiaochaView(WenjuandiaochaEntity wenjuandiaochaEntity){
try {
BeanUtils.copyProperties(this, wenjuandiaochaEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.YonghuEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date 2023-02-21 09:46:06
*/
@TableName("yonghu")
public class YonghuView extends YonghuEntity implements Serializable {
private static final long serialVersionUID = 1L;
public YonghuView(){
}
public YonghuView(YonghuEntity yonghuEntity){
try {
BeanUtils.copyProperties(this, yonghuEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,113 @@
package com.entity.vo;
import com.entity.ChatEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 线
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class ChatVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long adminid;
/**
*
*/
private String ask;
/**
*
*/
private String reply;
/**
*
*/
private Integer isreply;
/**
* id
*/
public void setAdminid(Long adminid) {
this.adminid = adminid;
}
/**
* id
*/
public Long getAdminid() {
return adminid;
}
/**
*
*/
public void setAsk(String ask) {
this.ask = ask;
}
/**
*
*/
public String getAsk() {
return ask;
}
/**
*
*/
public void setReply(String reply) {
this.reply = reply;
}
/**
*
*/
public String getReply() {
return reply;
}
/**
*
*/
public void setIsreply(Integer isreply) {
this.isreply = isreply;
}
/**
*
*/
public Integer getIsreply() {
return isreply;
}
}

@ -0,0 +1,157 @@
package com.entity.vo;
import com.entity.ForumEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class ForumVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String content;
/**
* id
*/
private Long parentid;
/**
* id
*/
private Long userid;
/**
*
*/
private String username;
/**
*
*/
private String avatarurl;
/**
*
*/
private String isdone;
/**
*
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public String getContent() {
return content;
}
/**
* id
*/
public void setParentid(Long parentid) {
this.parentid = parentid;
}
/**
* id
*/
public Long getParentid() {
return parentid;
}
/**
* id
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* id
*/
public Long getUserid() {
return userid;
}
/**
*
*/
public void setUsername(String username) {
this.username = username;
}
/**
*
*/
public String getUsername() {
return username;
}
/**
*
*/
public void setAvatarurl(String avatarurl) {
this.avatarurl = avatarurl;
}
/**
*
*/
public String getAvatarurl() {
return avatarurl;
}
/**
*
*/
public void setIsdone(String isdone) {
this.isdone = isdone;
}
/**
*
*/
public String getIsdone() {
return isdone;
}
}

@ -0,0 +1,25 @@
package com.entity.vo;
import com.entity.LeixingEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class LeixingVO implements Serializable {
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,91 @@
package com.entity.vo;
import com.entity.NewsEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class NewsVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String introduction;
/**
*
*/
private String picture;
/**
*
*/
private String content;
/**
*
*/
public void setIntroduction(String introduction) {
this.introduction = introduction;
}
/**
*
*/
public String getIntroduction() {
return introduction;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
/**
*
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public String getContent() {
return content;
}
}

@ -0,0 +1,179 @@
package com.entity.vo;
import com.entity.StoreupEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class StoreupVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long refid;
/**
*
*/
private String tablename;
/**
*
*/
private String name;
/**
*
*/
private String picture;
/**
* (1:,21:,22:,31:,41:)
*/
private String type;
/**
*
*/
private String inteltype;
/**
*
*/
private String remark;
/**
* id
*/
public void setRefid(Long refid) {
this.refid = refid;
}
/**
* id
*/
public Long getRefid() {
return refid;
}
/**
*
*/
public void setTablename(String tablename) {
this.tablename = tablename;
}
/**
*
*/
public String getTablename() {
return tablename;
}
/**
*
*/
public void setName(String name) {
this.name = name;
}
/**
*
*/
public String getName() {
return name;
}
/**
*
*/
public void setPicture(String picture) {
this.picture = picture;
}
/**
*
*/
public String getPicture() {
return picture;
}
/**
* (1:,21:,22:,31:,41:)
*/
public void setType(String type) {
this.type = type;
}
/**
* (1:,21:,22:,31:,41:)
*/
public String getType() {
return type;
}
/**
*
*/
public void setInteltype(String inteltype) {
this.inteltype = inteltype;
}
/**
*
*/
public String getInteltype() {
return inteltype;
}
/**
*
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
*
*/
public String getRemark() {
return remark;
}
}

@ -0,0 +1,135 @@
package com.entity.vo;
import com.entity.SystemintroEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class SystemintroVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String subtitle;
/**
*
*/
private String content;
/**
* 1
*/
private String picture1;
/**
* 2
*/
private String picture2;
/**
* 3
*/
private String picture3;
/**
*
*/
public void setSubtitle(String subtitle) {
this.subtitle = subtitle;
}
/**
*
*/
public String getSubtitle() {
return subtitle;
}
/**
*
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public String getContent() {
return content;
}
/**
* 1
*/
public void setPicture1(String picture1) {
this.picture1 = picture1;
}
/**
* 1
*/
public String getPicture1() {
return picture1;
}
/**
* 2
*/
public void setPicture2(String picture2) {
this.picture2 = picture2;
}
/**
* 2
*/
public String getPicture2() {
return picture2;
}
/**
* 3
*/
public void setPicture3(String picture3) {
this.picture3 = picture3;
}
/**
* 3
*/
public String getPicture3() {
return picture3;
}
}

@ -0,0 +1,335 @@
package com.entity.vo;
import com.entity.WenjuandafuEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class WenjuandafuVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String leixing;
/**
*
*/
private String wentiyi;
/**
*
*/
private String dafuyi;
/**
*
*/
private String wentier;
/**
*
*/
private String dafuer;
/**
*
*/
private String wentisan;
/**
*
*/
private String dafusan;
/**
*
*/
private String wentisi;
/**
*
*/
private String dafusi;
/**
*
*/
private String wentiwu;
/**
*
*/
private String dafuwu;
/**
*
*/
private String zhanghao;
/**
*
*/
private String xingming;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date tijiaoriqi;
/**
*
*/
public void setLeixing(String leixing) {
this.leixing = leixing;
}
/**
*
*/
public String getLeixing() {
return leixing;
}
/**
*
*/
public void setWentiyi(String wentiyi) {
this.wentiyi = wentiyi;
}
/**
*
*/
public String getWentiyi() {
return wentiyi;
}
/**
*
*/
public void setDafuyi(String dafuyi) {
this.dafuyi = dafuyi;
}
/**
*
*/
public String getDafuyi() {
return dafuyi;
}
/**
*
*/
public void setWentier(String wentier) {
this.wentier = wentier;
}
/**
*
*/
public String getWentier() {
return wentier;
}
/**
*
*/
public void setDafuer(String dafuer) {
this.dafuer = dafuer;
}
/**
*
*/
public String getDafuer() {
return dafuer;
}
/**
*
*/
public void setWentisan(String wentisan) {
this.wentisan = wentisan;
}
/**
*
*/
public String getWentisan() {
return wentisan;
}
/**
*
*/
public void setDafusan(String dafusan) {
this.dafusan = dafusan;
}
/**
*
*/
public String getDafusan() {
return dafusan;
}
/**
*
*/
public void setWentisi(String wentisi) {
this.wentisi = wentisi;
}
/**
*
*/
public String getWentisi() {
return wentisi;
}
/**
*
*/
public void setDafusi(String dafusi) {
this.dafusi = dafusi;
}
/**
*
*/
public String getDafusi() {
return dafusi;
}
/**
*
*/
public void setWentiwu(String wentiwu) {
this.wentiwu = wentiwu;
}
/**
*
*/
public String getWentiwu() {
return wentiwu;
}
/**
*
*/
public void setDafuwu(String dafuwu) {
this.dafuwu = dafuwu;
}
/**
*
*/
public String getDafuwu() {
return dafuwu;
}
/**
*
*/
public void setZhanghao(String zhanghao) {
this.zhanghao = zhanghao;
}
/**
*
*/
public String getZhanghao() {
return zhanghao;
}
/**
*
*/
public void setXingming(String xingming) {
this.xingming = xingming;
}
/**
*
*/
public String getXingming() {
return xingming;
}
/**
*
*/
public void setTijiaoriqi(Date tijiaoriqi) {
this.tijiaoriqi = tijiaoriqi;
}
/**
*
*/
public Date getTijiaoriqi() {
return tijiaoriqi;
}
}

@ -0,0 +1,227 @@
package com.entity.vo;
import com.entity.WenjuandiaochaEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class WenjuandiaochaVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String fengmiantupian;
/**
*
*/
private String leixing;
/**
*
*/
private String wentiyi;
/**
*
*/
private String wentier;
/**
*
*/
private String wentisan;
/**
*
*/
private String wentisi;
/**
*
*/
private String wentiwu;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date faburiqi;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date clicktime;
/**
*
*/
public void setFengmiantupian(String fengmiantupian) {
this.fengmiantupian = fengmiantupian;
}
/**
*
*/
public String getFengmiantupian() {
return fengmiantupian;
}
/**
*
*/
public void setLeixing(String leixing) {
this.leixing = leixing;
}
/**
*
*/
public String getLeixing() {
return leixing;
}
/**
*
*/
public void setWentiyi(String wentiyi) {
this.wentiyi = wentiyi;
}
/**
*
*/
public String getWentiyi() {
return wentiyi;
}
/**
*
*/
public void setWentier(String wentier) {
this.wentier = wentier;
}
/**
*
*/
public String getWentier() {
return wentier;
}
/**
*
*/
public void setWentisan(String wentisan) {
this.wentisan = wentisan;
}
/**
*
*/
public String getWentisan() {
return wentisan;
}
/**
*
*/
public void setWentisi(String wentisi) {
this.wentisi = wentisi;
}
/**
*
*/
public String getWentisi() {
return wentisi;
}
/**
*
*/
public void setWentiwu(String wentiwu) {
this.wentiwu = wentiwu;
}
/**
*
*/
public String getWentiwu() {
return wentiwu;
}
/**
*
*/
public void setFaburiqi(Date faburiqi) {
this.faburiqi = faburiqi;
}
/**
*
*/
public Date getFaburiqi() {
return faburiqi;
}
/**
*
*/
public void setClicktime(Date clicktime) {
this.clicktime = clicktime;
}
/**
*
*/
public Date getClicktime() {
return clicktime;
}
}

@ -0,0 +1,157 @@
package com.entity.vo;
import com.entity.YonghuEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class YonghuVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String mima;
/**
*
*/
private String xingming;
/**
*
*/
private String xingbie;
/**
*
*/
private String youxiang;
/**
*
*/
private String shoujihaoma;
/**
*
*/
private String touxiang;
/**
*
*/
public void setMima(String mima) {
this.mima = mima;
}
/**
*
*/
public String getMima() {
return mima;
}
/**
*
*/
public void setXingming(String xingming) {
this.xingming = xingming;
}
/**
*
*/
public String getXingming() {
return xingming;
}
/**
*
*/
public void setXingbie(String xingbie) {
this.xingbie = xingbie;
}
/**
*
*/
public String getXingbie() {
return xingbie;
}
/**
*
*/
public void setYouxiang(String youxiang) {
this.youxiang = youxiang;
}
/**
*
*/
public String getYouxiang() {
return youxiang;
}
/**
*
*/
public void setShoujihaoma(String shoujihaoma) {
this.shoujihaoma = shoujihaoma;
}
/**
*
*/
public String getShoujihaoma() {
return shoujihaoma;
}
/**
*
*/
public void setTouxiang(String touxiang) {
this.touxiang = touxiang;
}
/**
*
*/
public String getTouxiang() {
return touxiang;
}
}

@ -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,31 @@
package com.model.enums;
import java.io.Serializable;
import com.baomidou.mybatisplus.enums.IEnum;
/**
* IEnum spring-mybatis.xml typeEnumsPackage
*/
public enum TypeEnum implements IEnum {
DISABLED(0, "禁用"),
NORMAL(1, "正常");
private final int value;
private final String desc;
TypeEnum(final int value, final String desc) {
this.value = value;
this.desc = desc;
}
@Override
public Serializable getValue() {
return this.value;
}
// Jackson 注解为 JsonValue 返回中文 json 描述
public String getDesc() {
return this.desc;
}
}

@ -0,0 +1,37 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.ChatEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.ChatVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.ChatView;
/**
* 线
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public interface ChatService extends IService<ChatEntity> {
PageUtils queryPage(Map<String, Object> params);
List<ChatVO> selectListVO(Wrapper<ChatEntity> wrapper);
ChatVO selectVO(@Param("ew") Wrapper<ChatEntity> wrapper);
List<ChatView> selectListView(Wrapper<ChatEntity> wrapper);
ChatView selectView(@Param("ew") Wrapper<ChatEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<ChatEntity> wrapper);
}

@ -0,0 +1,22 @@
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);
List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params);
}

@ -0,0 +1,17 @@
package com.service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
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,Wrapper<ConfigEntity> wrapper);
}

@ -0,0 +1,37 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.ForumEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.ForumVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.ForumView;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public interface ForumService extends IService<ForumEntity> {
PageUtils queryPage(Map<String, Object> params);
List<ForumVO> selectListVO(Wrapper<ForumEntity> wrapper);
ForumVO selectVO(@Param("ew") Wrapper<ForumEntity> wrapper);
List<ForumView> selectListView(Wrapper<ForumEntity> wrapper);
ForumView selectView(@Param("ew") Wrapper<ForumEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<ForumEntity> wrapper);
}

@ -0,0 +1,37 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.LeixingEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.LeixingVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.LeixingView;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public interface LeixingService extends IService<LeixingEntity> {
PageUtils queryPage(Map<String, Object> params);
List<LeixingVO> selectListVO(Wrapper<LeixingEntity> wrapper);
LeixingVO selectVO(@Param("ew") Wrapper<LeixingEntity> wrapper);
List<LeixingView> selectListView(Wrapper<LeixingEntity> wrapper);
LeixingView selectView(@Param("ew") Wrapper<LeixingEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<LeixingEntity> wrapper);
}

@ -0,0 +1,37 @@
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 2023-02-21 09:46:06 // 创建日期
*/
public interface NewsService extends IService<NewsEntity> { // 声明一个接口,扩展 IService 用于基本的 CRUD 操作
PageUtils queryPage(Map<String, Object> params); // 根据传入的参数进行分页查询,并返回分页结果
List<NewsVO> selectListVO(Wrapper<NewsEntity> wrapper); // 根据条件包装器查询并返回 NewsVO 列表
NewsVO selectVO(@Param("ew") Wrapper<NewsEntity> wrapper); // 根据条件包装器查询并返回单个 NewsVO 对象
List<NewsView> selectListView(Wrapper<NewsEntity> wrapper); // 根据条件包装器查询并返回 NewsView 列表
NewsView selectView(@Param("ew") Wrapper<NewsEntity> wrapper); // 根据条件包装器查询并返回单个 NewsView 对象
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.StoreupEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.StoreupVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.StoreupView;
/**
*
*
* @author // 作者信息
* @email // 邮箱信息
* @date 2023-02-21 09:46:06 // 创建日期
*/
public interface StoreupService extends IService<StoreupEntity> { // 声明一个接口,扩展 IService 用于基本的 CRUD 操作
PageUtils queryPage(Map<String, Object> params); // 根据传入的参数进行分页查询,并返回分页结果
List<StoreupVO> selectListVO(Wrapper<StoreupEntity> wrapper); // 根据条件包装器查询并返回 StoreupVO 列表
StoreupVO selectVO(@Param("ew") Wrapper<StoreupEntity> wrapper); // 根据条件包装器查询并返回单个 StoreupVO 对象
List<StoreupView> selectListView(Wrapper<StoreupEntity> wrapper); // 根据条件包装器查询并返回 StoreupView 列表
StoreupView selectView(@Param("ew") Wrapper<StoreupEntity> wrapper); // 根据条件包装器查询并返回单个 StoreupView 对象
PageUtils queryPage(Map<String, Object> params, Wrapper<StoreupEntity> wrapper); // 根据参数和条件包装器进行分页查询,并返回分页结果
}

@ -0,0 +1,35 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.SystemintroEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.SystemintroVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.SystemintroView;
/**
*
*
* @author // 作者信息
* @email // 邮箱信息
* @date 2023-02-21 09:46:06 // 创建日期
*/
public interface SystemintroService extends IService<SystemintroEntity> { // 声明一个接口,扩展 IService 用于基本的 CRUD 操作
PageUtils queryPage(Map<String, Object> params); // 根据传入的参数进行分页查询,并返回分页结果
List<SystemintroVO> selectListVO(Wrapper<SystemintroEntity> wrapper); // 根据条件包装器查询并返回 SystemintroVO 列表
SystemintroVO selectVO(@Param("ew") Wrapper<SystemintroEntity> wrapper); // 根据条件包装器查询并返回单个 SystemintroVO 对象
List<SystemintroView> selectListView(Wrapper<SystemintroEntity> wrapper); // 根据条件包装器查询并返回 SystemintroView 列表
SystemintroView selectView(@Param("ew") Wrapper<SystemintroEntity> wrapper); // 根据条件包装器查询并返回单个 SystemintroView 对象
PageUtils queryPage(Map<String, Object> params, Wrapper<SystemintroEntity> wrapper); // 根据参数和条件包装器进行分页查询,并返回分页结果
}

@ -0,0 +1,26 @@
package com.service;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.entity.TokenEntity;
import com.utils.PageUtils;
/**
* token
*/
public interface TokenService extends IService<TokenEntity> {
PageUtils queryPage(Map<String, Object> params);
List<TokenEntity> selectListView(Wrapper<TokenEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<TokenEntity> wrapper);
String generateToken(Long userid,String username,String tableName, String role);
TokenEntity getTokenEntity(String token);
}

@ -0,0 +1,25 @@
package com.service;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.entity.UsersEntity;
import com.utils.PageUtils;
/**
*
*/
public interface UsersService extends IService<UsersEntity> { // 声明一个接口,扩展 IService用于基本的 CRUD 操作
PageUtils queryPage(Map<String, Object> params); // 根据传入的参数进行分页查询,并返回分页结果
List<UsersEntity> selectListView(Wrapper<UsersEntity> wrapper); // 根据条件包装器查询并返回 UsersEntity 列表
PageUtils queryPage(Map<String, Object> params, Wrapper<UsersEntity> wrapper); // 根据参数和条件包装器进行分页查询,并返回分页结果
}

@ -0,0 +1,45 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.WenjuandafuEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.WenjuandafuVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.WenjuandafuView;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public interface WenjuandafuService extends IService<WenjuandafuEntity> {
PageUtils queryPage(Map<String, Object> params);
List<WenjuandafuVO> selectListVO(Wrapper<WenjuandafuEntity> wrapper);
WenjuandafuVO selectVO(@Param("ew") Wrapper<WenjuandafuEntity> wrapper);
List<WenjuandafuView> selectListView(Wrapper<WenjuandafuEntity> wrapper);
WenjuandafuView selectView(@Param("ew") Wrapper<WenjuandafuEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<WenjuandafuEntity> wrapper);
List<Map<String, Object>> selectValue(Map<String, Object> params,Wrapper<WenjuandafuEntity> wrapper);
List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params,Wrapper<WenjuandafuEntity> wrapper);
List<Map<String, Object>> selectGroup(Map<String, Object> params,Wrapper<WenjuandafuEntity> wrapper);
}

@ -0,0 +1,45 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.WenjuandiaochaEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.WenjuandiaochaVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.WenjuandiaochaView;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public interface WenjuandiaochaService extends IService<WenjuandiaochaEntity> {
PageUtils queryPage(Map<String, Object> params);
List<WenjuandiaochaVO> selectListVO(Wrapper<WenjuandiaochaEntity> wrapper);
WenjuandiaochaVO selectVO(@Param("ew") Wrapper<WenjuandiaochaEntity> wrapper);
List<WenjuandiaochaView> selectListView(Wrapper<WenjuandiaochaEntity> wrapper);
WenjuandiaochaView selectView(@Param("ew") Wrapper<WenjuandiaochaEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<WenjuandiaochaEntity> wrapper);
List<Map<String, Object>> selectValue(Map<String, Object> params,Wrapper<WenjuandiaochaEntity> wrapper);
List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params,Wrapper<WenjuandiaochaEntity> wrapper);
List<Map<String, Object>> selectGroup(Map<String, Object> params,Wrapper<WenjuandiaochaEntity> wrapper);
}

@ -0,0 +1,45 @@
package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.YonghuEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.YonghuVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.YonghuView;
/**
*
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public interface YonghuService extends IService<YonghuEntity> {
PageUtils queryPage(Map<String, Object> params);
List<YonghuVO> selectListVO(Wrapper<YonghuEntity> wrapper);
YonghuVO selectVO(@Param("ew") Wrapper<YonghuEntity> wrapper);
List<YonghuView> selectListView(Wrapper<YonghuEntity> wrapper);
YonghuView selectView(@Param("ew") Wrapper<YonghuEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<YonghuEntity> wrapper);
List<Map<String, Object>> selectValue(Map<String, Object> params,Wrapper<YonghuEntity> wrapper);
List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params,Wrapper<YonghuEntity> wrapper);
List<Map<String, Object>> selectGroup(Map<String, Object> params,Wrapper<YonghuEntity> wrapper);
}

@ -0,0 +1,63 @@
package com.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;
import com.dao.ChatDao;
import com.entity.ChatEntity;
import com.service.ChatService;
import com.entity.vo.ChatVO;
import com.entity.view.ChatView;
@Service("chatService")
public class ChatServiceImpl extends ServiceImpl<ChatDao, ChatEntity> implements ChatService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
Page<ChatEntity> page = this.selectPage(
new Query<ChatEntity>(params).getPage(),
new EntityWrapper<ChatEntity>()
);
return new PageUtils(page);
}
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<ChatEntity> wrapper) {
Page<ChatView> page =new Query<ChatView>(params).getPage();
page.setRecords(baseMapper.selectListView(page,wrapper));
PageUtils pageUtil = new PageUtils(page);
return pageUtil;
}
@Override
public List<ChatVO> selectListVO(Wrapper<ChatEntity> wrapper) {
return baseMapper.selectListVO(wrapper);
}
@Override
public ChatVO selectVO(Wrapper<ChatEntity> wrapper) {
return baseMapper.selectVO(wrapper);
}
@Override
public List<ChatView> selectListView(Wrapper<ChatEntity> wrapper) {
return baseMapper.selectListView(wrapper);
}
@Override
public ChatView selectView(Wrapper<ChatEntity> wrapper) {
return baseMapper.selectView(wrapper);
}
}

@ -0,0 +1,64 @@
package com.service.impl;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dao.CommonDao;
import com.service.CommonService;
/**
*
*/
@Service("commonService")
public class CommonServiceImpl implements CommonService {
@Autowired
private CommonDao commonDao;
@Override
public List<String> getOption(Map<String, Object> params) {
return commonDao.getOption(params);
}
@Override
public Map<String, Object> getFollowByOption(Map<String, Object> params) {
return commonDao.getFollowByOption(params);
}
@Override
public void sh(Map<String, Object> params) {
commonDao.sh(params);
}
@Override
public int remindCount(Map<String, Object> params) {
return commonDao.remindCount(params);
}
@Override
public Map<String, Object> selectCal(Map<String, Object> params) {
return commonDao.selectCal(params);
}
@Override
public List<Map<String, Object>> selectGroup(Map<String, Object> params) {
return commonDao.selectGroup(params);
}
@Override
public List<Map<String, Object>> selectValue(Map<String, Object> params) {
return commonDao.selectValue(params);
}
@Override
public List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params) {
return commonDao.selectTimeStatValue(params);
}
}

@ -0,0 +1,33 @@
package com.service.impl;
import java.util.Map;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.dao.ConfigDao;
import com.entity.ConfigEntity;
import com.service.ConfigService;
import com.utils.PageUtils;
import com.utils.Query;
/**
*
*/
@Service("configService")
public class ConfigServiceImpl extends ServiceImpl<ConfigDao, ConfigEntity> implements ConfigService {
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<ConfigEntity> wrapper) {
Page<ConfigEntity> page = this.selectPage(
new Query<ConfigEntity>(params).getPage(),
wrapper
);
return new PageUtils(page);
}
}

@ -0,0 +1,63 @@
package com.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;
import com.dao.ForumDao;
import com.entity.ForumEntity;
import com.service.ForumService;
import com.entity.vo.ForumVO;
import com.entity.view.ForumView;
@Service("forumService")
public class ForumServiceImpl extends ServiceImpl<ForumDao, ForumEntity> implements ForumService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
Page<ForumEntity> page = this.selectPage(
new Query<ForumEntity>(params).getPage(),
new EntityWrapper<ForumEntity>()
);
return new PageUtils(page);
}
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<ForumEntity> wrapper) {
Page<ForumView> page =new Query<ForumView>(params).getPage();
page.setRecords(baseMapper.selectListView(page,wrapper));
PageUtils pageUtil = new PageUtils(page);
return pageUtil;
}
@Override
public List<ForumVO> selectListVO(Wrapper<ForumEntity> wrapper) {
return baseMapper.selectListVO(wrapper);
}
@Override
public ForumVO selectVO(Wrapper<ForumEntity> wrapper) {
return baseMapper.selectVO(wrapper);
}
@Override
public List<ForumView> selectListView(Wrapper<ForumEntity> wrapper) {
return baseMapper.selectListView(wrapper);
}
@Override
public ForumView selectView(Wrapper<ForumEntity> wrapper) {
return baseMapper.selectView(wrapper);
}
}

@ -0,0 +1,63 @@
package com.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;
import com.dao.LeixingDao;
import com.entity.LeixingEntity;
import com.service.LeixingService;
import com.entity.vo.LeixingVO;
import com.entity.view.LeixingView;
@Service("leixingService")
public class LeixingServiceImpl extends ServiceImpl<LeixingDao, LeixingEntity> implements LeixingService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
Page<LeixingEntity> page = this.selectPage(
new Query<LeixingEntity>(params).getPage(),
new EntityWrapper<LeixingEntity>()
);
return new PageUtils(page);
}
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<LeixingEntity> wrapper) {
Page<LeixingView> page =new Query<LeixingView>(params).getPage();
page.setRecords(baseMapper.selectListView(page,wrapper));
PageUtils pageUtil = new PageUtils(page);
return pageUtil;
}
@Override
public List<LeixingVO> selectListVO(Wrapper<LeixingEntity> wrapper) {
return baseMapper.selectListVO(wrapper);
}
@Override
public LeixingVO selectVO(Wrapper<LeixingEntity> wrapper) {
return baseMapper.selectVO(wrapper);
}
@Override
public List<LeixingView> selectListView(Wrapper<LeixingEntity> wrapper) {
return baseMapper.selectListView(wrapper);
}
@Override
public LeixingView selectView(Wrapper<LeixingEntity> wrapper) {
return baseMapper.selectView(wrapper);
}
}

@ -0,0 +1,69 @@
package com.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;
import com.dao.NewsDao;
import com.entity.NewsEntity;
import com.service.NewsService;
import com.entity.vo.NewsVO;
import com.entity.view.NewsView;
@Service("newsService") // 声明该类为服务层组件,并指定服务名称为 "newsService"
public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements NewsService {
// 实现分页查询
@Override
public PageUtils queryPage(Map<String, Object> params) {
// 创建一个分页对象,使用传入的参数获取页面信息
Page<NewsEntity> page = this.selectPage(
new Query<NewsEntity>(params).getPage(), // 获取分页对象
new EntityWrapper<NewsEntity>() // 构建查询条件的包装器
);
return new PageUtils(page); // 返回分页结果包装
}
// 实现带条件的分页查询
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<NewsEntity> wrapper) {
// 创建分页对象
Page<NewsView> page = new Query<NewsView>(params).getPage();
// 设置页面记录
page.setRecords(baseMapper.selectListView(page, wrapper));
PageUtils pageUtil = new PageUtils(page); // 包装分页结果
return pageUtil; // 返回分页结果
}
// 查询符合条件的所有 NewsVO 对象
@Override
public List<NewsVO> selectListVO(Wrapper<NewsEntity> wrapper) {
return baseMapper.selectListVO(wrapper); // 调用 DAO 层方法执行查询
}
// 查询单个 NewsVO 对象
@Override
public NewsVO selectVO(Wrapper<NewsEntity> wrapper) {
return baseMapper.selectVO(wrapper); // 调用 DAO 层方法执行查询
}
// 查询符合条件的所有 NewsView 对象
@Override
public List<NewsView> selectListView(Wrapper<NewsEntity> wrapper) {
return baseMapper.selectListView(wrapper); // 调用 DAO 层方法执行查询
}
// 查询单个 NewsView 对象
@Override
public NewsView selectView(Wrapper<NewsEntity> wrapper) {
return baseMapper.selectView(wrapper); // 调用 DAO 层方法执行查询
}
}

@ -0,0 +1,68 @@
package com.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;
import com.dao.StoreupDao;
import com.entity.StoreupEntity;
import com.service.StoreupService;
import com.entity.vo.StoreupVO;
import com.entity.view.StoreupView;
@Service("storeupService") // 将该类标记为服务,并指定 bean 的名称为 "storeupService"
public class StoreupServiceImpl extends ServiceImpl<StoreupDao, StoreupEntity> implements StoreupService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
// 根据传入的参数创建分页对象,并调用 selectPage 方法获取数据
Page<StoreupEntity> page = this.selectPage(
new Query<StoreupEntity>(params).getPage(), // 构造分页信息
new EntityWrapper<StoreupEntity>() // 创建 EntityWrapper 用于封装查询条件
);
// 返回封装好的分页结果
return new PageUtils(page);
}
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<StoreupEntity> wrapper) {
// 创建分页对象
Page<StoreupView> page = new Query<StoreupView>(params).getPage();
// 设置分页记录
page.setRecords(baseMapper.selectListView(page, wrapper)); // 根据分页信息和条件查询数据
// 返回封装好的分页结果
PageUtils pageUtil = new PageUtils(page);
return pageUtil;
}
@Override
public List<StoreupVO> selectListVO(Wrapper<StoreupEntity> wrapper) {
// 根据 Wrapper 条件查询并返回 StoreupVO 列表
return baseMapper.selectListVO(wrapper);
}
@Override
public StoreupVO selectVO(Wrapper<StoreupEntity> wrapper) {
// 根据 Wrapper 条件查询并返回单个 StoreupVO 对象
return baseMapper.selectVO(wrapper);
}
@Override
public List<StoreupView> selectListView(Wrapper<StoreupEntity> wrapper) {
// 根据 Wrapper 条件查询并返回 StoreupView 列表
return baseMapper.selectListView(wrapper);
}
@Override
public StoreupView selectView(Wrapper<StoreupEntity> wrapper) {
// 根据 Wrapper 条件查询并返回单个 StoreupView 对象
return baseMapper.selectView(wrapper);
}
}

@ -0,0 +1,68 @@
package com.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;
import com.dao.SystemintroDao;
import com.entity.SystemintroEntity;
import com.service.SystemintroService;
import com.entity.vo.SystemintroVO;
import com.entity.view.SystemintroView;
@Service("systemintroService") // 将该类标记为服务,并指定 bean 的名称为 "systemintroService"
public class SystemintroServiceImpl extends ServiceImpl<SystemintroDao, SystemintroEntity> implements SystemintroService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
// 根据传入的参数创建分页对象,并调用 selectPage 方法获取数据
Page<SystemintroEntity> page = this.selectPage(
new Query<SystemintroEntity>(params).getPage(), // 构造分页信息
new EntityWrapper<SystemintroEntity>() // 创建 EntityWrapper 用于封装查询条件
);
// 返回封装好的分页结果
return new PageUtils(page);
}
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<SystemintroEntity> wrapper) {
// 创建分页对象
Page<SystemintroView> page = new Query<SystemintroView>(params).getPage();
// 设置分页记录
page.setRecords(baseMapper.selectListView(page, wrapper)); // 根据分页信息和条件查询数据
// 返回封装好的分页结果
PageUtils pageUtil = new PageUtils(page);
return pageUtil;
}
@Override
public List<SystemintroVO> selectListVO(Wrapper<SystemintroEntity> wrapper) {
// 根据 Wrapper 条件查询并返回 SystemintroVO 列表
return baseMapper.selectListVO(wrapper);
}
@Override
public SystemintroVO selectVO(Wrapper<SystemintroEntity> wrapper) {
// 根据 Wrapper 条件查询并返回单个 SystemintroVO 对象
return baseMapper.selectVO(wrapper);
}
@Override
public List<SystemintroView> selectListView(Wrapper<SystemintroEntity> wrapper) {
// 根据 Wrapper 条件查询并返回 SystemintroView 列表
return baseMapper.selectListView(wrapper);
}
@Override
public SystemintroView selectView(Wrapper<SystemintroEntity> wrapper) {
// 根据 Wrapper 条件查询并返回单个 SystemintroView 对象
return baseMapper.selectView(wrapper);
}
}

@ -0,0 +1,79 @@
package com.service.impl;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.dao.TokenDao;
import com.entity.TokenEntity;
import com.entity.TokenEntity;
import com.service.TokenService;
import com.utils.CommonUtil;
import com.utils.PageUtils;
import com.utils.Query;
/**
* token
*/
@Service("tokenService")
public class TokenServiceImpl extends ServiceImpl<TokenDao, TokenEntity> implements TokenService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
Page<TokenEntity> page = this.selectPage(
new Query<TokenEntity>(params).getPage(),
new EntityWrapper<TokenEntity>()
);
return new PageUtils(page);
}
@Override
public List<TokenEntity> selectListView(Wrapper<TokenEntity> wrapper) {
return baseMapper.selectListView(wrapper);
}
@Override
public PageUtils queryPage(Map<String, Object> params,
Wrapper<TokenEntity> wrapper) {
Page<TokenEntity> page =new Query<TokenEntity>(params).getPage();
page.setRecords(baseMapper.selectListView(page,wrapper));
PageUtils pageUtil = new PageUtils(page);
return pageUtil;
}
@Override
public String generateToken(Long userid,String username, String tableName, String role) {
TokenEntity tokenEntity = this.selectOne(new EntityWrapper<TokenEntity>().eq("userid", userid).eq("role", role));
String token = CommonUtil.getRandomString(32);
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.add(Calendar.HOUR_OF_DAY, 1);
if(tokenEntity!=null) {
tokenEntity.setToken(token);
tokenEntity.setExpiratedtime(cal.getTime());
this.updateById(tokenEntity);
} else {
this.insert(new TokenEntity(userid,username, tableName, role, token, cal.getTime()));
}
return token;
}
@Override
public TokenEntity getTokenEntity(String token) {
TokenEntity tokenEntity = this.selectOne(new EntityWrapper<TokenEntity>().eq("token", token));
if(tokenEntity == null || tokenEntity.getExpiratedtime().getTime()<new Date().getTime()) {
return null;
}
return tokenEntity;
}
}

@ -0,0 +1,54 @@
package com.service.impl;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.dao.UsersDao;
import com.entity.UsersEntity;
import com.service.UsersService;
import com.utils.PageUtils;
import com.utils.Query;
/**
*
*/
@Service("usersService") // 将该类标记为服务,并指定 bean 的名称为 "usersService"
public class UsersServiceImpl extends ServiceImpl<UsersDao, UsersEntity> implements UsersService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
// 根据传入的参数创建分页对象,并调用 selectPage 方法获取用户数据
Page<UsersEntity> page = this.selectPage(
new Query<UsersEntity>(params).getPage(), // 构造分页信息
new EntityWrapper<UsersEntity>() // 创建 EntityWrapper 用于封装查询条件
);
// 返回封装好的分页结果
return new PageUtils(page);
}
@Override
public List<UsersEntity> selectListView(Wrapper<UsersEntity> wrapper) {
// 根据 Wrapper 条件查询并返回 UsersEntity 列表
return baseMapper.selectListView(wrapper);
}
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<UsersEntity> wrapper) {
// 创建分页对象
Page<UsersEntity> page = new Query<UsersEntity>(params).getPage();
// 设置分页记录
page.setRecords(baseMapper.selectListView(page, wrapper)); // 根据分页信息和条件查询数据
// 返回封装好的分页结果
PageUtils pageUtil = new PageUtils(page);
return pageUtil;
}
}

@ -0,0 +1,80 @@
package com.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;
import com.dao.WenjuandafuDao;
import com.entity.WenjuandafuEntity;
import com.service.WenjuandafuService;
import com.entity.vo.WenjuandafuVO;
import com.entity.view.WenjuandafuView;
@Service("wenjuandafuService")
public class WenjuandafuServiceImpl extends ServiceImpl<WenjuandafuDao, WenjuandafuEntity> implements WenjuandafuService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
Page<WenjuandafuEntity> page = this.selectPage(
new Query<WenjuandafuEntity>(params).getPage(),
new EntityWrapper<WenjuandafuEntity>()
);
return new PageUtils(page);
}
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<WenjuandafuEntity> wrapper) {
Page<WenjuandafuView> page =new Query<WenjuandafuView>(params).getPage();
page.setRecords(baseMapper.selectListView(page,wrapper));
PageUtils pageUtil = new PageUtils(page);
return pageUtil;
}
@Override
public List<WenjuandafuVO> selectListVO(Wrapper<WenjuandafuEntity> wrapper) {
return baseMapper.selectListVO(wrapper);
}
@Override
public WenjuandafuVO selectVO(Wrapper<WenjuandafuEntity> wrapper) {
return baseMapper.selectVO(wrapper);
}
@Override
public List<WenjuandafuView> selectListView(Wrapper<WenjuandafuEntity> wrapper) {
return baseMapper.selectListView(wrapper);
}
@Override
public WenjuandafuView selectView(Wrapper<WenjuandafuEntity> wrapper) {
return baseMapper.selectView(wrapper);
}
@Override
public List<Map<String, Object>> selectValue(Map<String, Object> params, Wrapper<WenjuandafuEntity> wrapper) {
return baseMapper.selectValue(params, wrapper);
}
@Override
public List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params, Wrapper<WenjuandafuEntity> wrapper) {
return baseMapper.selectTimeStatValue(params, wrapper);
}
@Override
public List<Map<String, Object>> selectGroup(Map<String, Object> params, Wrapper<WenjuandafuEntity> wrapper) {
return baseMapper.selectGroup(params, wrapper);
}
}

@ -0,0 +1,80 @@
package com.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;
import com.dao.WenjuandiaochaDao;
import com.entity.WenjuandiaochaEntity;
import com.service.WenjuandiaochaService;
import com.entity.vo.WenjuandiaochaVO;
import com.entity.view.WenjuandiaochaView;
@Service("wenjuandiaochaService")
public class WenjuandiaochaServiceImpl extends ServiceImpl<WenjuandiaochaDao, WenjuandiaochaEntity> implements WenjuandiaochaService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
Page<WenjuandiaochaEntity> page = this.selectPage(
new Query<WenjuandiaochaEntity>(params).getPage(),
new EntityWrapper<WenjuandiaochaEntity>()
);
return new PageUtils(page);
}
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<WenjuandiaochaEntity> wrapper) {
Page<WenjuandiaochaView> page =new Query<WenjuandiaochaView>(params).getPage();
page.setRecords(baseMapper.selectListView(page,wrapper));
PageUtils pageUtil = new PageUtils(page);
return pageUtil;
}
@Override
public List<WenjuandiaochaVO> selectListVO(Wrapper<WenjuandiaochaEntity> wrapper) {
return baseMapper.selectListVO(wrapper);
}
@Override
public WenjuandiaochaVO selectVO(Wrapper<WenjuandiaochaEntity> wrapper) {
return baseMapper.selectVO(wrapper);
}
@Override
public List<WenjuandiaochaView> selectListView(Wrapper<WenjuandiaochaEntity> wrapper) {
return baseMapper.selectListView(wrapper);
}
@Override
public WenjuandiaochaView selectView(Wrapper<WenjuandiaochaEntity> wrapper) {
return baseMapper.selectView(wrapper);
}
@Override
public List<Map<String, Object>> selectValue(Map<String, Object> params, Wrapper<WenjuandiaochaEntity> wrapper) {
return baseMapper.selectValue(params, wrapper);
}
@Override
public List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params, Wrapper<WenjuandiaochaEntity> wrapper) {
return baseMapper.selectTimeStatValue(params, wrapper);
}
@Override
public List<Map<String, Object>> selectGroup(Map<String, Object> params, Wrapper<WenjuandiaochaEntity> wrapper) {
return baseMapper.selectGroup(params, wrapper);
}
}

@ -0,0 +1,80 @@
package com.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;
import com.dao.YonghuDao;
import com.entity.YonghuEntity;
import com.service.YonghuService;
import com.entity.vo.YonghuVO;
import com.entity.view.YonghuView;
@Service("yonghuService")
public class YonghuServiceImpl extends ServiceImpl<YonghuDao, YonghuEntity> implements YonghuService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
Page<YonghuEntity> page = this.selectPage(
new Query<YonghuEntity>(params).getPage(),
new EntityWrapper<YonghuEntity>()
);
return new PageUtils(page);
}
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<YonghuEntity> wrapper) {
Page<YonghuView> page =new Query<YonghuView>(params).getPage();
page.setRecords(baseMapper.selectListView(page,wrapper));
PageUtils pageUtil = new PageUtils(page);
return pageUtil;
}
@Override
public List<YonghuVO> selectListVO(Wrapper<YonghuEntity> wrapper) {
return baseMapper.selectListVO(wrapper);
}
@Override
public YonghuVO selectVO(Wrapper<YonghuEntity> wrapper) {
return baseMapper.selectVO(wrapper);
}
@Override
public List<YonghuView> selectListView(Wrapper<YonghuEntity> wrapper) {
return baseMapper.selectListView(wrapper);
}
@Override
public YonghuView selectView(Wrapper<YonghuEntity> wrapper) {
return baseMapper.selectView(wrapper);
}
@Override
public List<Map<String, Object>> selectValue(Map<String, Object> params, Wrapper<YonghuEntity> wrapper) {
return baseMapper.selectValue(params, wrapper);
}
@Override
public List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params, Wrapper<YonghuEntity> wrapper) {
return baseMapper.selectTimeStatValue(params, wrapper);
}
@Override
public List<Map<String, Object>> selectGroup(Map<String, Object> params, Wrapper<YonghuEntity> wrapper) {
return baseMapper.selectGroup(params, wrapper);
}
}

@ -0,0 +1,196 @@
package com.utils;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
import com.baidu.aip.ocr.AipOcr;
import com.baidu.aip.imageclassify.AipImageClassify;
/**
* :
*/
public class BaiduUtil {
/**
*
* @param lon
* @param lat
* @param coordtype
* @return
*/
public static Map<String, String> getCityByLonLat(String key, String lng, String lat) {
String location = lat + "," + lng;
try {
//拼装url
String url = "http://api.map.baidu.com/reverse_geocoding/v3/?ak="+key+"&output=json&coordtype=wgs84ll&location="+location;
String result = HttpClientUtils.doGet(url);
JSONObject o = new JSONObject(result);
Map<String, String> area = new HashMap<>();
area.put("province", o.getJSONObject("result").getJSONObject("addressComponent").getString("province"));
area.put("city", o.getJSONObject("result").getJSONObject("addressComponent").getString("city"));
area.put("district", o.getJSONObject("result").getJSONObject("addressComponent").getString("district"));
area.put("street", o.getJSONObject("result").getJSONObject("addressComponent").getString("street"));
return area;
}catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* API访token
* token.
* @param ak - API Key
* @param sk - Securet Key
* @return assess_token
*/
public static String getAuth(String ak, String sk) {
// 获取token地址
String authHost = "https://aip.baidubce.com/oauth/2.0/token?";
String getAccessTokenUrl = authHost
// 1. grant_type为固定参数
+ "grant_type=client_credentials"
// 2. 官网获取的 API Key
+ "&client_id=" + ak
// 3. 官网获取的 Secret Key
+ "&client_secret=" + sk;
try {
URL realUrl = new URL(getAccessTokenUrl);
// 打开和URL之间的连接
HttpURLConnection connection = (HttpURLConnection) realUrl.openConnection();
connection.setRequestMethod("GET");
connection.connect();
// 获取所有响应头字段
Map<String, List<String>> map = connection.getHeaderFields();
// 遍历所有的响应头字段
for (String key : map.keySet()) {
System.err.println(key + "--->" + map.get(key));
}
// 定义 BufferedReader输入流来读取URL的响应
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String result = "";
String line;
while ((line = in.readLine()) != null) {
result += line;
}
/**
*
*/
System.err.println("result:" + result);
org.json.JSONObject jsonObject = new org.json.JSONObject(result);
String access_token = jsonObject.getString("access_token");
return access_token;
} catch (Exception e) {
System.err.printf("获取token失败");
e.printStackTrace(System.err);
}
return null;
}
//设置APPID/AK/SK
public static final String APP_ID = "29917330";
public static final String API_KEY = "yMnHy1guHZRzGhXB7BILdktB";
public static final String SECRET_KEY = "1oHG8X0yizyZmIwj3bZygG470b648iE1";
private static AipOcr ocrClient = null;
/**
*
* @param imagePath
*/
public static String generalString(String imagePath, boolean isNewline){
try{
HashMap<String, String> options = new HashMap<String, String>();
options.put("language_type", "CHN_ENG"); //CHN_ENG:中英文混合, ENG:英文
options.put("detect_direction", "true"); //是否检测图像朝向默认不检测false
options.put("detect_language", "true"); //是否检测语言,默认不检测。
options.put("probability", "false"); //是否返回识别结果中每一行的置信度
//通用文字识别
if(ocrClient==null) {
ocrClient = new AipOcr(APP_ID, API_KEY, SECRET_KEY);
ocrClient.setConnectionTimeoutInMillis(5000);
ocrClient.setSocketTimeoutInMillis(60000);
}
JSONObject jsonObject = ocrClient.basicAccurateGeneral(imagePath, options);
String result = mergeString(jsonObject, isNewline);
return result;
}catch(Exception ex){
ex.printStackTrace();
}
return null;
}
private static String mergeString(JSONObject jsonObject, boolean isNewline){
if(jsonObject == null){
return "";
}
if(jsonObject.has("words_result") && jsonObject.has("words_result_num")){
int wordsResultNum = jsonObject.getInt("words_result_num");
if(wordsResultNum > 0){
StringBuilder sb = new StringBuilder();
JSONArray jsonArray = jsonObject.getJSONArray("words_result");
int len = jsonArray.length();
for(int i=0;i<len;i++) {
JSONObject obj = (JSONObject)jsonArray.get(i);
if(isNewline){
sb.append(obj.get("words") + "\n");
}else{
sb.append(obj.get("words"));
}
}
return sb.toString();
}
}else{
return jsonObject.toString();
}
return null;
}
public static JSONObject animalDetect(String imgPath) {
//初始化
AipImageClassify aic = new AipImageClassify(APP_ID, API_KEY, SECRET_KEY);
//返回JSON格式的数据
HashMap<String, String> params = new HashMap<String, String>();
params.put("baike_num", "1");
JSONObject res = aic.animalDetect(imgPath, params);
System.out.println(res.toString(2));
return res;
}
public static JSONObject dishDetect(String imgPath) {
//初始化
AipImageClassify aic = new AipImageClassify(APP_ID, API_KEY, SECRET_KEY);
//返回JSON格式的数据
HashMap<String, String> params = new HashMap<String, String>();
params.put("baike_num", "1");
JSONObject res = aic.dishDetect(imgPath, params);
System.out.println(res.toString(2));
return res;
}
public static JSONObject plantDetect(String imgPath) {
//初始化
AipImageClassify aic = new AipImageClassify(APP_ID, API_KEY, SECRET_KEY);
//返回JSON格式的数据
HashMap<String, String> params = new HashMap<String, String>();
params.put("baike_num", "1");
JSONObject res = aic.plantDetect(imgPath, params);
System.out.println(res.toString(2));
return res;
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save