Compare commits
No commits in common. 'master' and 'feature/后台前端' have entirely different histories.
master
...
feature/后台
@ -1,111 +0,0 @@
|
||||
|
||||
package com.controller;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.annotation.IgnoreAuth;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.entity.ConfigEntity;
|
||||
import com.service.ConfigService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.ValidatorUtils;
|
||||
|
||||
/**
|
||||
* 登录相关
|
||||
*/
|
||||
@RequestMapping("config")
|
||||
@RestController
|
||||
public class ConfigController{
|
||||
|
||||
@Autowired
|
||||
private ConfigService configService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,ConfigEntity config){
|
||||
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
|
||||
PageUtils page = configService.queryPage(params);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,ConfigEntity config){
|
||||
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
|
||||
PageUtils page = configService.queryPage(params);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") String id){
|
||||
ConfigEntity config = configService.selectById(id);
|
||||
return R.ok().put("data", config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") String id){
|
||||
ConfigEntity config = configService.selectById(id);
|
||||
return R.ok().put("data", config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据name获取信息
|
||||
*/
|
||||
@RequestMapping("/info")
|
||||
public R infoByName(@RequestParam String name){
|
||||
ConfigEntity config = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
|
||||
return R.ok().put("data", config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public R save(@RequestBody ConfigEntity config){
|
||||
// ValidatorUtils.validateEntity(config);
|
||||
configService.insert(config);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody ConfigEntity config){
|
||||
// ValidatorUtils.validateEntity(config);
|
||||
configService.updateById(config);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
configService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
}
|
@ -1,203 +0,0 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.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.DiscussfangwuxinxiEntity;
|
||||
import com.entity.view.DiscussfangwuxinxiView;
|
||||
|
||||
import com.service.DiscussfangwuxinxiService;
|
||||
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
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/discussfangwuxinxi")
|
||||
public class DiscussfangwuxinxiController {
|
||||
@Autowired
|
||||
private DiscussfangwuxinxiService discussfangwuxinxiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,DiscussfangwuxinxiEntity discussfangwuxinxi, HttpServletRequest request){
|
||||
EntityWrapper<DiscussfangwuxinxiEntity> ew = new EntityWrapper<DiscussfangwuxinxiEntity>();
|
||||
PageUtils page = discussfangwuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discussfangwuxinxi), params), params));
|
||||
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,DiscussfangwuxinxiEntity discussfangwuxinxi, HttpServletRequest request){
|
||||
EntityWrapper<DiscussfangwuxinxiEntity> ew = new EntityWrapper<DiscussfangwuxinxiEntity>();
|
||||
PageUtils page = discussfangwuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discussfangwuxinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( DiscussfangwuxinxiEntity discussfangwuxinxi){
|
||||
EntityWrapper<DiscussfangwuxinxiEntity> ew = new EntityWrapper<DiscussfangwuxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( discussfangwuxinxi, "discussfangwuxinxi"));
|
||||
return R.ok().put("data", discussfangwuxinxiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(DiscussfangwuxinxiEntity discussfangwuxinxi){
|
||||
EntityWrapper< DiscussfangwuxinxiEntity> ew = new EntityWrapper< DiscussfangwuxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( discussfangwuxinxi, "discussfangwuxinxi"));
|
||||
DiscussfangwuxinxiView discussfangwuxinxiView = discussfangwuxinxiService.selectView(ew);
|
||||
return R.ok("查询房屋信息评论表成功").put("data", discussfangwuxinxiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
DiscussfangwuxinxiEntity discussfangwuxinxi = discussfangwuxinxiService.selectById(id);
|
||||
return R.ok().put("data", discussfangwuxinxi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
DiscussfangwuxinxiEntity discussfangwuxinxi = discussfangwuxinxiService.selectById(id);
|
||||
return R.ok().put("data", discussfangwuxinxi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody DiscussfangwuxinxiEntity discussfangwuxinxi, HttpServletRequest request){
|
||||
discussfangwuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(discussfangwuxinxi);
|
||||
discussfangwuxinxiService.insert(discussfangwuxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody DiscussfangwuxinxiEntity discussfangwuxinxi, HttpServletRequest request){
|
||||
discussfangwuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(discussfangwuxinxi);
|
||||
discussfangwuxinxiService.insert(discussfangwuxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody DiscussfangwuxinxiEntity discussfangwuxinxi, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(discussfangwuxinxi);
|
||||
discussfangwuxinxiService.updateById(discussfangwuxinxi);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
discussfangwuxinxiService.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<DiscussfangwuxinxiEntity> wrapper = new EntityWrapper<DiscussfangwuxinxiEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
|
||||
int count = discussfangwuxinxiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,203 +0,0 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.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.DiscusswoyaodangfangzhuEntity;
|
||||
import com.entity.view.DiscusswoyaodangfangzhuView;
|
||||
|
||||
import com.service.DiscusswoyaodangfangzhuService;
|
||||
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
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/discusswoyaodangfangzhu")
|
||||
public class DiscusswoyaodangfangzhuController {
|
||||
@Autowired
|
||||
private DiscusswoyaodangfangzhuService discusswoyaodangfangzhuService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,DiscusswoyaodangfangzhuEntity discusswoyaodangfangzhu, HttpServletRequest request){
|
||||
EntityWrapper<DiscusswoyaodangfangzhuEntity> ew = new EntityWrapper<DiscusswoyaodangfangzhuEntity>();
|
||||
PageUtils page = discusswoyaodangfangzhuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discusswoyaodangfangzhu), params), params));
|
||||
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,DiscusswoyaodangfangzhuEntity discusswoyaodangfangzhu, HttpServletRequest request){
|
||||
EntityWrapper<DiscusswoyaodangfangzhuEntity> ew = new EntityWrapper<DiscusswoyaodangfangzhuEntity>();
|
||||
PageUtils page = discusswoyaodangfangzhuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discusswoyaodangfangzhu), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( DiscusswoyaodangfangzhuEntity discusswoyaodangfangzhu){
|
||||
EntityWrapper<DiscusswoyaodangfangzhuEntity> ew = new EntityWrapper<DiscusswoyaodangfangzhuEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( discusswoyaodangfangzhu, "discusswoyaodangfangzhu"));
|
||||
return R.ok().put("data", discusswoyaodangfangzhuService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(DiscusswoyaodangfangzhuEntity discusswoyaodangfangzhu){
|
||||
EntityWrapper< DiscusswoyaodangfangzhuEntity> ew = new EntityWrapper< DiscusswoyaodangfangzhuEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( discusswoyaodangfangzhu, "discusswoyaodangfangzhu"));
|
||||
DiscusswoyaodangfangzhuView discusswoyaodangfangzhuView = discusswoyaodangfangzhuService.selectView(ew);
|
||||
return R.ok("查询我要当房主评论表成功").put("data", discusswoyaodangfangzhuView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
DiscusswoyaodangfangzhuEntity discusswoyaodangfangzhu = discusswoyaodangfangzhuService.selectById(id);
|
||||
return R.ok().put("data", discusswoyaodangfangzhu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
DiscusswoyaodangfangzhuEntity discusswoyaodangfangzhu = discusswoyaodangfangzhuService.selectById(id);
|
||||
return R.ok().put("data", discusswoyaodangfangzhu);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody DiscusswoyaodangfangzhuEntity discusswoyaodangfangzhu, HttpServletRequest request){
|
||||
discusswoyaodangfangzhu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(discusswoyaodangfangzhu);
|
||||
discusswoyaodangfangzhuService.insert(discusswoyaodangfangzhu);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody DiscusswoyaodangfangzhuEntity discusswoyaodangfangzhu, HttpServletRequest request){
|
||||
discusswoyaodangfangzhu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(discusswoyaodangfangzhu);
|
||||
discusswoyaodangfangzhuService.insert(discusswoyaodangfangzhu);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody DiscusswoyaodangfangzhuEntity discusswoyaodangfangzhu, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(discusswoyaodangfangzhu);
|
||||
discusswoyaodangfangzhuService.updateById(discusswoyaodangfangzhu);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
discusswoyaodangfangzhuService.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<DiscusswoyaodangfangzhuEntity> wrapper = new EntityWrapper<DiscusswoyaodangfangzhuEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
|
||||
int count = discusswoyaodangfangzhuService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,196 +0,0 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.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.FangwuleixingEntity;
|
||||
import com.entity.view.FangwuleixingView;
|
||||
|
||||
import com.service.FangwuleixingService;
|
||||
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
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/fangwuleixing")
|
||||
public class FangwuleixingController {
|
||||
@Autowired
|
||||
private FangwuleixingService fangwuleixingService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,FangwuleixingEntity fangwuleixing, HttpServletRequest request){
|
||||
EntityWrapper<FangwuleixingEntity> ew = new EntityWrapper<FangwuleixingEntity>();
|
||||
PageUtils page = fangwuleixingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangwuleixing), params), params));
|
||||
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,FangwuleixingEntity fangwuleixing, HttpServletRequest request){
|
||||
EntityWrapper<FangwuleixingEntity> ew = new EntityWrapper<FangwuleixingEntity>();
|
||||
PageUtils page = fangwuleixingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangwuleixing), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( FangwuleixingEntity fangwuleixing){
|
||||
EntityWrapper<FangwuleixingEntity> ew = new EntityWrapper<FangwuleixingEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( fangwuleixing, "fangwuleixing"));
|
||||
return R.ok().put("data", fangwuleixingService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
FangwuleixingEntity fangwuleixing = fangwuleixingService.selectById(id);
|
||||
return R.ok().put("data", fangwuleixing);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
FangwuleixingEntity fangwuleixing = fangwuleixingService.selectById(id);
|
||||
return R.ok().put("data", fangwuleixing);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody FangwuleixingEntity fangwuleixing, HttpServletRequest request){
|
||||
fangwuleixing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(fangwuleixing);
|
||||
fangwuleixingService.insert(fangwuleixing);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody FangwuleixingEntity fangwuleixing, HttpServletRequest request){
|
||||
fangwuleixing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(fangwuleixing);
|
||||
fangwuleixingService.insert(fangwuleixing);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody FangwuleixingEntity fangwuleixing, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(fangwuleixing);
|
||||
fangwuleixingService.updateById(fangwuleixing);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
fangwuleixingService.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<FangwuleixingEntity> wrapper = new EntityWrapper<FangwuleixingEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
|
||||
int count = fangwuleixingService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,216 +0,0 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.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.FangwupingjiaEntity;
|
||||
import com.entity.view.FangwupingjiaView;
|
||||
|
||||
import com.service.FangwupingjiaService;
|
||||
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
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/fangwupingjia")
|
||||
public class FangwupingjiaController {
|
||||
@Autowired
|
||||
private FangwupingjiaService fangwupingjiaService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,FangwupingjiaEntity fangwupingjia, HttpServletRequest request){
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("fangzhu")) {
|
||||
fangwupingjia.setFangzhuzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("yonghu")) {
|
||||
fangwupingjia.setYonghuming((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<FangwupingjiaEntity> ew = new EntityWrapper<FangwupingjiaEntity>();
|
||||
PageUtils page = fangwupingjiaService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangwupingjia), params), params));
|
||||
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,FangwupingjiaEntity fangwupingjia, HttpServletRequest request){
|
||||
EntityWrapper<FangwupingjiaEntity> ew = new EntityWrapper<FangwupingjiaEntity>();
|
||||
PageUtils page = fangwupingjiaService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangwupingjia), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( FangwupingjiaEntity fangwupingjia){
|
||||
EntityWrapper<FangwupingjiaEntity> ew = new EntityWrapper<FangwupingjiaEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( fangwupingjia, "fangwupingjia"));
|
||||
return R.ok().put("data", fangwupingjiaService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(FangwupingjiaEntity fangwupingjia){
|
||||
EntityWrapper< FangwupingjiaEntity> ew = new EntityWrapper< FangwupingjiaEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( fangwupingjia, "fangwupingjia"));
|
||||
FangwupingjiaView fangwupingjiaView = fangwupingjiaService.selectView(ew);
|
||||
return R.ok("查询房屋评价成功").put("data", fangwupingjiaView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
FangwupingjiaEntity fangwupingjia = fangwupingjiaService.selectById(id);
|
||||
return R.ok().put("data", fangwupingjia);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
FangwupingjiaEntity fangwupingjia = fangwupingjiaService.selectById(id);
|
||||
return R.ok().put("data", fangwupingjia);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody FangwupingjiaEntity fangwupingjia, HttpServletRequest request){
|
||||
fangwupingjia.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(fangwupingjia);
|
||||
fangwupingjiaService.insert(fangwupingjia);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody FangwupingjiaEntity fangwupingjia, HttpServletRequest request){
|
||||
fangwupingjia.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(fangwupingjia);
|
||||
fangwupingjiaService.insert(fangwupingjia);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody FangwupingjiaEntity fangwupingjia, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(fangwupingjia);
|
||||
fangwupingjiaService.updateById(fangwupingjia);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
fangwupingjiaService.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<FangwupingjiaEntity> wrapper = new EntityWrapper<FangwupingjiaEntity>();
|
||||
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("fangzhu")) {
|
||||
wrapper.eq("fangzhuzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("yonghu")) {
|
||||
wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = fangwupingjiaService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,212 +0,0 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.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.FangwuxinxiEntity;
|
||||
import com.entity.view.FangwuxinxiView;
|
||||
|
||||
import com.service.FangwuxinxiService;
|
||||
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
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/fangwuxinxi")
|
||||
public class FangwuxinxiController {
|
||||
@Autowired
|
||||
private FangwuxinxiService fangwuxinxiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,FangwuxinxiEntity fangwuxinxi, HttpServletRequest request){
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("fangzhu")) {
|
||||
fangwuxinxi.setFangzhuzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<FangwuxinxiEntity> ew = new EntityWrapper<FangwuxinxiEntity>();
|
||||
PageUtils page = fangwuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangwuxinxi), params), params));
|
||||
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,FangwuxinxiEntity fangwuxinxi, HttpServletRequest request){
|
||||
EntityWrapper<FangwuxinxiEntity> ew = new EntityWrapper<FangwuxinxiEntity>();
|
||||
PageUtils page = fangwuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangwuxinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( FangwuxinxiEntity fangwuxinxi){
|
||||
EntityWrapper<FangwuxinxiEntity> ew = new EntityWrapper<FangwuxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( fangwuxinxi, "fangwuxinxi"));
|
||||
return R.ok().put("data", fangwuxinxiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(FangwuxinxiEntity fangwuxinxi){
|
||||
EntityWrapper< FangwuxinxiEntity> ew = new EntityWrapper< FangwuxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( fangwuxinxi, "fangwuxinxi"));
|
||||
FangwuxinxiView fangwuxinxiView = fangwuxinxiService.selectView(ew);
|
||||
return R.ok("查询房屋信息成功").put("data", fangwuxinxiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
FangwuxinxiEntity fangwuxinxi = fangwuxinxiService.selectById(id);
|
||||
return R.ok().put("data", fangwuxinxi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
FangwuxinxiEntity fangwuxinxi = fangwuxinxiService.selectById(id);
|
||||
return R.ok().put("data", fangwuxinxi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody FangwuxinxiEntity fangwuxinxi, HttpServletRequest request){
|
||||
fangwuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(fangwuxinxi);
|
||||
fangwuxinxiService.insert(fangwuxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody FangwuxinxiEntity fangwuxinxi, HttpServletRequest request){
|
||||
fangwuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(fangwuxinxi);
|
||||
fangwuxinxiService.insert(fangwuxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody FangwuxinxiEntity fangwuxinxi, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(fangwuxinxi);
|
||||
fangwuxinxiService.updateById(fangwuxinxi);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
fangwuxinxiService.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<FangwuxinxiEntity> wrapper = new EntityWrapper<FangwuxinxiEntity>();
|
||||
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("fangzhu")) {
|
||||
wrapper.eq("fangzhuzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = fangwuxinxiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,100 +0,0 @@
|
||||
package com.controller;
|
||||
|
||||
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;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
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 java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 上传文件映射表
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("file")
|
||||
@SuppressWarnings({"unchecked","rawtypes"})
|
||||
public class FileController{
|
||||
@Autowired
|
||||
private ConfigService configService;
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
@RequestMapping("/upload")
|
||||
public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
|
||||
if (file.isEmpty()) {
|
||||
throw new EIException("上传文件不能为空");
|
||||
}
|
||||
String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
|
||||
File path = new File(ResourceUtils.getURL("classpath:static").getPath());
|
||||
if(!path.exists()) {
|
||||
path = new File("");
|
||||
}
|
||||
File upload = new File(path.getAbsolutePath(),"/upload/");
|
||||
if(!upload.exists()) {
|
||||
upload.mkdirs();
|
||||
}
|
||||
String fileName = new Date().getTime()+"."+fileExt;
|
||||
File dest = new File(upload.getAbsolutePath()+"/"+fileName);
|
||||
file.transferTo(dest);
|
||||
if(StringUtils.isNotBlank(type) && type.equals("1")) {
|
||||
ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
|
||||
if(configEntity==null) {
|
||||
configEntity = new ConfigEntity();
|
||||
configEntity.setName("faceFile");
|
||||
configEntity.setValue(fileName);
|
||||
} else {
|
||||
configEntity.setValue(fileName);
|
||||
}
|
||||
configService.insertOrUpdate(configEntity);
|
||||
}
|
||||
return R.ok().put("file", fileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/download")
|
||||
public ResponseEntity<byte[]> download(@RequestParam String fileName) {
|
||||
try {
|
||||
File path = new File(ResourceUtils.getURL("classpath:static").getPath());
|
||||
if(!path.exists()) {
|
||||
path = new File("");
|
||||
}
|
||||
File upload = new File(path.getAbsolutePath(),"/upload/");
|
||||
if(!upload.exists()) {
|
||||
upload.mkdirs();
|
||||
}
|
||||
File file = new File(upload.getAbsolutePath()+"/"+fileName);
|
||||
if(file.exists()){
|
||||
/*if(!fileService.canRead(file, SessionManager.getSessionUser())){
|
||||
getResponse().sendError(403);
|
||||
}*/
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
|
||||
headers.setContentDispositionFormData("attachment", fileName);
|
||||
return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
}
|
@ -1,200 +0,0 @@
|
||||
package com.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.entity.HetongxinxiEntity;
|
||||
import com.entity.view.HetongxinxiView;
|
||||
import com.service.HetongxinxiService;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 合同信息
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/hetongxinxi")
|
||||
public class HetongxinxiController {
|
||||
@Autowired
|
||||
private HetongxinxiService hetongxinxiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,HetongxinxiEntity hetongxinxi, HttpServletRequest request){
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("yonghu")) {
|
||||
hetongxinxi.setYonghuming((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("fangzhu")) {
|
||||
hetongxinxi.setFangzhuzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<HetongxinxiEntity> ew = new EntityWrapper<HetongxinxiEntity>();
|
||||
PageUtils page = hetongxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, hetongxinxi), params), params));
|
||||
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,HetongxinxiEntity hetongxinxi, HttpServletRequest request){
|
||||
EntityWrapper<HetongxinxiEntity> ew = new EntityWrapper<HetongxinxiEntity>();
|
||||
PageUtils page = hetongxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, hetongxinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( HetongxinxiEntity hetongxinxi){
|
||||
EntityWrapper<HetongxinxiEntity> ew = new EntityWrapper<HetongxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( hetongxinxi, "hetongxinxi"));
|
||||
return R.ok().put("data", hetongxinxiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(HetongxinxiEntity hetongxinxi){
|
||||
EntityWrapper< HetongxinxiEntity> ew = new EntityWrapper< HetongxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( hetongxinxi, "hetongxinxi"));
|
||||
HetongxinxiView hetongxinxiView = hetongxinxiService.selectView(ew);
|
||||
return R.ok("查询合同信息成功").put("data", hetongxinxiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
HetongxinxiEntity hetongxinxi = hetongxinxiService.selectById(id);
|
||||
return R.ok().put("data", hetongxinxi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
HetongxinxiEntity hetongxinxi = hetongxinxiService.selectById(id);
|
||||
return R.ok().put("data", hetongxinxi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody HetongxinxiEntity hetongxinxi, HttpServletRequest request){
|
||||
hetongxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(hetongxinxi);
|
||||
hetongxinxiService.insert(hetongxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody HetongxinxiEntity hetongxinxi, HttpServletRequest request){
|
||||
hetongxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(hetongxinxi);
|
||||
hetongxinxiService.insert(hetongxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody HetongxinxiEntity hetongxinxi, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(hetongxinxi);
|
||||
hetongxinxiService.updateById(hetongxinxi);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
hetongxinxiService.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<HetongxinxiEntity> wrapper = new EntityWrapper<HetongxinxiEntity>();
|
||||
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("yonghuming", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("fangzhu")) {
|
||||
wrapper.eq("fangzhuzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = hetongxinxiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,209 +0,0 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.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.MessagesEntity;
|
||||
import com.entity.view.MessagesView;
|
||||
|
||||
import com.service.MessagesService;
|
||||
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
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/messages")
|
||||
public class MessagesController {
|
||||
@Autowired
|
||||
private MessagesService messagesService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,MessagesEntity messages, HttpServletRequest request){
|
||||
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
|
||||
messages.setUserid((Long)request.getSession().getAttribute("userId"));
|
||||
}
|
||||
EntityWrapper<MessagesEntity> ew = new EntityWrapper<MessagesEntity>();
|
||||
PageUtils page = messagesService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, messages), params), params));
|
||||
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,MessagesEntity messages, HttpServletRequest request){
|
||||
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
|
||||
messages.setUserid((Long)request.getSession().getAttribute("userId"));
|
||||
}
|
||||
EntityWrapper<MessagesEntity> ew = new EntityWrapper<MessagesEntity>();
|
||||
PageUtils page = messagesService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, messages), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( MessagesEntity messages){
|
||||
EntityWrapper<MessagesEntity> ew = new EntityWrapper<MessagesEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( messages, "messages"));
|
||||
return R.ok().put("data", messagesService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(MessagesEntity messages){
|
||||
EntityWrapper< MessagesEntity> ew = new EntityWrapper< MessagesEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( messages, "messages"));
|
||||
MessagesView messagesView = messagesService.selectView(ew);
|
||||
return R.ok("查询留言板成功").put("data", messagesView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
MessagesEntity messages = messagesService.selectById(id);
|
||||
return R.ok().put("data", messages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
MessagesEntity messages = messagesService.selectById(id);
|
||||
return R.ok().put("data", messages);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody MessagesEntity messages, HttpServletRequest request){
|
||||
messages.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(messages);
|
||||
messagesService.insert(messages);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody MessagesEntity messages, HttpServletRequest request){
|
||||
messages.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(messages);
|
||||
messages.setUserid((Long)request.getSession().getAttribute("userId"));
|
||||
messagesService.insert(messages);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody MessagesEntity messages, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(messages);
|
||||
messagesService.updateById(messages);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
messagesService.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<MessagesEntity> wrapper = new EntityWrapper<MessagesEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
|
||||
int count = messagesService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,204 +0,0 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.NewsEntity;
|
||||
import com.entity.view.NewsView;
|
||||
|
||||
import com.service.NewsService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 公告信息
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/news")
|
||||
public class NewsController {
|
||||
@Autowired
|
||||
private NewsService newsService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,NewsEntity news, HttpServletRequest request){
|
||||
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
|
||||
PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));
|
||||
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,NewsEntity news, HttpServletRequest request){
|
||||
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
|
||||
PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( NewsEntity news){
|
||||
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( news, "news"));
|
||||
return R.ok().put("data", newsService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(NewsEntity news){
|
||||
EntityWrapper< NewsEntity> ew = new EntityWrapper< NewsEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( news, "news"));
|
||||
NewsView newsView = newsService.selectView(ew);
|
||||
return R.ok("查询公告信息成功").put("data", newsView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
NewsEntity news = newsService.selectById(id);
|
||||
return R.ok().put("data", news);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
NewsEntity news = newsService.selectById(id);
|
||||
return R.ok().put("data", news);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody NewsEntity news, HttpServletRequest request){
|
||||
news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(news);
|
||||
newsService.insert(news);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody NewsEntity news, HttpServletRequest request){
|
||||
news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(news);
|
||||
newsService.insert(news);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody NewsEntity news, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(news);
|
||||
newsService.updateById(news);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
newsService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<NewsEntity> wrapper = new EntityWrapper<NewsEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
|
||||
int count = newsService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,213 +0,0 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.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.StoreupEntity;
|
||||
import com.entity.view.StoreupView;
|
||||
|
||||
import com.service.StoreupService;
|
||||
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
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/storeup")
|
||||
public class StoreupController {
|
||||
@Autowired
|
||||
private StoreupService storeupService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,StoreupEntity storeup, HttpServletRequest request){
|
||||
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
|
||||
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
|
||||
}
|
||||
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
|
||||
PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params));
|
||||
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,StoreupEntity storeup, HttpServletRequest request){
|
||||
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
|
||||
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
|
||||
}
|
||||
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
|
||||
PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params));
|
||||
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"));
|
||||
return R.ok().put("data", storeupService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(StoreupEntity storeup){
|
||||
EntityWrapper< StoreupEntity> ew = new EntityWrapper< StoreupEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( storeup, "storeup"));
|
||||
StoreupView storeupView = storeupService.selectView(ew);
|
||||
return R.ok("查询收藏表成功").put("data", storeupView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
StoreupEntity storeup = storeupService.selectById(id);
|
||||
return R.ok().put("data", storeup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
StoreupEntity storeup = storeupService.selectById(id);
|
||||
return R.ok().put("data", storeup);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody StoreupEntity storeup, HttpServletRequest request){
|
||||
storeup.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(storeup);
|
||||
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
|
||||
storeupService.insert(storeup);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody StoreupEntity storeup, HttpServletRequest request){
|
||||
storeup.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(storeup);
|
||||
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
|
||||
storeupService.insert(storeup);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody StoreupEntity storeup, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(storeup);
|
||||
storeupService.updateById(storeup);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
storeupService.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<StoreupEntity> wrapper = new EntityWrapper<StoreupEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
|
||||
wrapper.eq("userid", (Long)request.getSession().getAttribute("userId"));
|
||||
}
|
||||
|
||||
|
||||
int count = storeupService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,216 +0,0 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.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.WeixiuchuliEntity;
|
||||
import com.entity.view.WeixiuchuliView;
|
||||
|
||||
import com.service.WeixiuchuliService;
|
||||
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
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/weixiuchuli")
|
||||
public class WeixiuchuliController {
|
||||
@Autowired
|
||||
private WeixiuchuliService weixiuchuliService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,WeixiuchuliEntity weixiuchuli, HttpServletRequest request){
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("fangzhu")) {
|
||||
weixiuchuli.setFangzhuzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("yonghu")) {
|
||||
weixiuchuli.setYonghuming((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<WeixiuchuliEntity> ew = new EntityWrapper<WeixiuchuliEntity>();
|
||||
PageUtils page = weixiuchuliService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, weixiuchuli), params), params));
|
||||
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,WeixiuchuliEntity weixiuchuli, HttpServletRequest request){
|
||||
EntityWrapper<WeixiuchuliEntity> ew = new EntityWrapper<WeixiuchuliEntity>();
|
||||
PageUtils page = weixiuchuliService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, weixiuchuli), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( WeixiuchuliEntity weixiuchuli){
|
||||
EntityWrapper<WeixiuchuliEntity> ew = new EntityWrapper<WeixiuchuliEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( weixiuchuli, "weixiuchuli"));
|
||||
return R.ok().put("data", weixiuchuliService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(WeixiuchuliEntity weixiuchuli){
|
||||
EntityWrapper< WeixiuchuliEntity> ew = new EntityWrapper< WeixiuchuliEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( weixiuchuli, "weixiuchuli"));
|
||||
WeixiuchuliView weixiuchuliView = weixiuchuliService.selectView(ew);
|
||||
return R.ok("查询维修处理成功").put("data", weixiuchuliView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
WeixiuchuliEntity weixiuchuli = weixiuchuliService.selectById(id);
|
||||
return R.ok().put("data", weixiuchuli);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
WeixiuchuliEntity weixiuchuli = weixiuchuliService.selectById(id);
|
||||
return R.ok().put("data", weixiuchuli);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody WeixiuchuliEntity weixiuchuli, HttpServletRequest request){
|
||||
weixiuchuli.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(weixiuchuli);
|
||||
weixiuchuliService.insert(weixiuchuli);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody WeixiuchuliEntity weixiuchuli, HttpServletRequest request){
|
||||
weixiuchuli.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(weixiuchuli);
|
||||
weixiuchuliService.insert(weixiuchuli);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody WeixiuchuliEntity weixiuchuli, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(weixiuchuli);
|
||||
weixiuchuliService.updateById(weixiuchuli);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
weixiuchuliService.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<WeixiuchuliEntity> wrapper = new EntityWrapper<WeixiuchuliEntity>();
|
||||
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("fangzhu")) {
|
||||
wrapper.eq("fangzhuzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("yonghu")) {
|
||||
wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = weixiuchuliService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,212 +0,0 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.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.WoyaodangfangzhuEntity;
|
||||
import com.entity.view.WoyaodangfangzhuView;
|
||||
|
||||
import com.service.WoyaodangfangzhuService;
|
||||
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
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/woyaodangfangzhu")
|
||||
public class WoyaodangfangzhuController {
|
||||
@Autowired
|
||||
private WoyaodangfangzhuService woyaodangfangzhuService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,WoyaodangfangzhuEntity woyaodangfangzhu, HttpServletRequest request){
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("yonghu")) {
|
||||
woyaodangfangzhu.setYonghuming((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<WoyaodangfangzhuEntity> ew = new EntityWrapper<WoyaodangfangzhuEntity>();
|
||||
PageUtils page = woyaodangfangzhuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, woyaodangfangzhu), params), params));
|
||||
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,WoyaodangfangzhuEntity woyaodangfangzhu, HttpServletRequest request){
|
||||
EntityWrapper<WoyaodangfangzhuEntity> ew = new EntityWrapper<WoyaodangfangzhuEntity>();
|
||||
PageUtils page = woyaodangfangzhuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, woyaodangfangzhu), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( WoyaodangfangzhuEntity woyaodangfangzhu){
|
||||
EntityWrapper<WoyaodangfangzhuEntity> ew = new EntityWrapper<WoyaodangfangzhuEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( woyaodangfangzhu, "woyaodangfangzhu"));
|
||||
return R.ok().put("data", woyaodangfangzhuService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(WoyaodangfangzhuEntity woyaodangfangzhu){
|
||||
EntityWrapper< WoyaodangfangzhuEntity> ew = new EntityWrapper< WoyaodangfangzhuEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( woyaodangfangzhu, "woyaodangfangzhu"));
|
||||
WoyaodangfangzhuView woyaodangfangzhuView = woyaodangfangzhuService.selectView(ew);
|
||||
return R.ok("查询我要当房主成功").put("data", woyaodangfangzhuView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
WoyaodangfangzhuEntity woyaodangfangzhu = woyaodangfangzhuService.selectById(id);
|
||||
return R.ok().put("data", woyaodangfangzhu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
WoyaodangfangzhuEntity woyaodangfangzhu = woyaodangfangzhuService.selectById(id);
|
||||
return R.ok().put("data", woyaodangfangzhu);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody WoyaodangfangzhuEntity woyaodangfangzhu, HttpServletRequest request){
|
||||
woyaodangfangzhu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(woyaodangfangzhu);
|
||||
woyaodangfangzhuService.insert(woyaodangfangzhu);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody WoyaodangfangzhuEntity woyaodangfangzhu, HttpServletRequest request){
|
||||
woyaodangfangzhu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(woyaodangfangzhu);
|
||||
woyaodangfangzhuService.insert(woyaodangfangzhu);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody WoyaodangfangzhuEntity woyaodangfangzhu, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(woyaodangfangzhu);
|
||||
woyaodangfangzhuService.updateById(woyaodangfangzhu);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
woyaodangfangzhuService.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<WoyaodangfangzhuEntity> wrapper = new EntityWrapper<WoyaodangfangzhuEntity>();
|
||||
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("yonghuming", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = woyaodangfangzhuService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,200 +0,0 @@
|
||||
package com.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.entity.YuyuekanfangEntity;
|
||||
import com.entity.view.YuyuekanfangView;
|
||||
import com.service.YuyuekanfangService;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 预约看房
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/yuyuekanfang")
|
||||
public class YuyuekanfangController {
|
||||
@Autowired
|
||||
private YuyuekanfangService yuyuekanfangService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,YuyuekanfangEntity yuyuekanfang, HttpServletRequest request){
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("yonghu")) {
|
||||
yuyuekanfang.setYonghuming((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("fangzhu")) {
|
||||
yuyuekanfang.setFangzhuzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<YuyuekanfangEntity> ew = new EntityWrapper<YuyuekanfangEntity>();
|
||||
PageUtils page = yuyuekanfangService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yuyuekanfang), params), params));
|
||||
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,YuyuekanfangEntity yuyuekanfang, HttpServletRequest request){
|
||||
EntityWrapper<YuyuekanfangEntity> ew = new EntityWrapper<YuyuekanfangEntity>();
|
||||
PageUtils page = yuyuekanfangService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yuyuekanfang), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( YuyuekanfangEntity yuyuekanfang){
|
||||
EntityWrapper<YuyuekanfangEntity> ew = new EntityWrapper<YuyuekanfangEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( yuyuekanfang, "yuyuekanfang"));
|
||||
return R.ok().put("data", yuyuekanfangService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(YuyuekanfangEntity yuyuekanfang){
|
||||
EntityWrapper< YuyuekanfangEntity> ew = new EntityWrapper< YuyuekanfangEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( yuyuekanfang, "yuyuekanfang"));
|
||||
YuyuekanfangView yuyuekanfangView = yuyuekanfangService.selectView(ew);
|
||||
return R.ok("查询预约看房成功").put("data", yuyuekanfangView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
YuyuekanfangEntity yuyuekanfang = yuyuekanfangService.selectById(id);
|
||||
return R.ok().put("data", yuyuekanfang);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
YuyuekanfangEntity yuyuekanfang = yuyuekanfangService.selectById(id);
|
||||
return R.ok().put("data", yuyuekanfang);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody YuyuekanfangEntity yuyuekanfang, HttpServletRequest request){
|
||||
yuyuekanfang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(yuyuekanfang);
|
||||
yuyuekanfangService.insert(yuyuekanfang);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody YuyuekanfangEntity yuyuekanfang, HttpServletRequest request){
|
||||
yuyuekanfang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(yuyuekanfang);
|
||||
yuyuekanfangService.insert(yuyuekanfang);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody YuyuekanfangEntity yuyuekanfang, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(yuyuekanfang);
|
||||
yuyuekanfangService.updateById(yuyuekanfang);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
yuyuekanfangService.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<YuyuekanfangEntity> wrapper = new EntityWrapper<YuyuekanfangEntity>();
|
||||
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("yonghuming", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("fangzhu")) {
|
||||
wrapper.eq("fangzhuzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = yuyuekanfangService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
|
||||
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);
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.entity.ConfigEntity;
|
||||
|
||||
/**
|
||||
* 配置
|
||||
*/
|
||||
public interface ConfigDao extends BaseMapper<ConfigEntity> {
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.DiscussfangwuxinxiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.DiscussfangwuxinxiVO;
|
||||
import com.entity.view.DiscussfangwuxinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 房屋信息评论表
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface DiscussfangwuxinxiDao extends BaseMapper<DiscussfangwuxinxiEntity> {
|
||||
|
||||
List<DiscussfangwuxinxiVO> selectListVO(@Param("ew") Wrapper<DiscussfangwuxinxiEntity> wrapper);
|
||||
|
||||
DiscussfangwuxinxiVO selectVO(@Param("ew") Wrapper<DiscussfangwuxinxiEntity> wrapper);
|
||||
|
||||
List<DiscussfangwuxinxiView> selectListView(@Param("ew") Wrapper<DiscussfangwuxinxiEntity> wrapper);
|
||||
|
||||
List<DiscussfangwuxinxiView> selectListView(Pagination page,@Param("ew") Wrapper<DiscussfangwuxinxiEntity> wrapper);
|
||||
|
||||
DiscussfangwuxinxiView selectView(@Param("ew") Wrapper<DiscussfangwuxinxiEntity> wrapper);
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.DiscusswoyaodangfangzhuEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.DiscusswoyaodangfangzhuVO;
|
||||
import com.entity.view.DiscusswoyaodangfangzhuView;
|
||||
|
||||
|
||||
/**
|
||||
* 我要当房主评论表
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface DiscusswoyaodangfangzhuDao extends BaseMapper<DiscusswoyaodangfangzhuEntity> {
|
||||
|
||||
List<DiscusswoyaodangfangzhuVO> selectListVO(@Param("ew") Wrapper<DiscusswoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
DiscusswoyaodangfangzhuVO selectVO(@Param("ew") Wrapper<DiscusswoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
List<DiscusswoyaodangfangzhuView> selectListView(@Param("ew") Wrapper<DiscusswoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
List<DiscusswoyaodangfangzhuView> selectListView(Pagination page,@Param("ew") Wrapper<DiscusswoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
DiscusswoyaodangfangzhuView selectView(@Param("ew") Wrapper<DiscusswoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.FangwubaoxiuEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.FangwubaoxiuVO;
|
||||
import com.entity.view.FangwubaoxiuView;
|
||||
|
||||
|
||||
/**
|
||||
* 房屋报修
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface FangwubaoxiuDao extends BaseMapper<FangwubaoxiuEntity> {
|
||||
|
||||
List<FangwubaoxiuVO> selectListVO(@Param("ew") Wrapper<FangwubaoxiuEntity> wrapper);
|
||||
|
||||
FangwubaoxiuVO selectVO(@Param("ew") Wrapper<FangwubaoxiuEntity> wrapper);
|
||||
|
||||
List<FangwubaoxiuView> selectListView(@Param("ew") Wrapper<FangwubaoxiuEntity> wrapper);
|
||||
|
||||
List<FangwubaoxiuView> selectListView(Pagination page,@Param("ew") Wrapper<FangwubaoxiuEntity> wrapper);
|
||||
|
||||
FangwubaoxiuView selectView(@Param("ew") Wrapper<FangwubaoxiuEntity> wrapper);
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.FangwuleixingEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.FangwuleixingVO;
|
||||
import com.entity.view.FangwuleixingView;
|
||||
|
||||
|
||||
/**
|
||||
* 房屋类型
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface FangwuleixingDao extends BaseMapper<FangwuleixingEntity> {
|
||||
|
||||
List<FangwuleixingVO> selectListVO(@Param("ew") Wrapper<FangwuleixingEntity> wrapper);
|
||||
|
||||
FangwuleixingVO selectVO(@Param("ew") Wrapper<FangwuleixingEntity> wrapper);
|
||||
|
||||
List<FangwuleixingView> selectListView(@Param("ew") Wrapper<FangwuleixingEntity> wrapper);
|
||||
|
||||
List<FangwuleixingView> selectListView(Pagination page,@Param("ew") Wrapper<FangwuleixingEntity> wrapper);
|
||||
|
||||
FangwuleixingView selectView(@Param("ew") Wrapper<FangwuleixingEntity> wrapper);
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.FangwupingjiaEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.FangwupingjiaVO;
|
||||
import com.entity.view.FangwupingjiaView;
|
||||
|
||||
|
||||
/**
|
||||
* 房屋评价
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface FangwupingjiaDao extends BaseMapper<FangwupingjiaEntity> {
|
||||
|
||||
List<FangwupingjiaVO> selectListVO(@Param("ew") Wrapper<FangwupingjiaEntity> wrapper);
|
||||
|
||||
FangwupingjiaVO selectVO(@Param("ew") Wrapper<FangwupingjiaEntity> wrapper);
|
||||
|
||||
List<FangwupingjiaView> selectListView(@Param("ew") Wrapper<FangwupingjiaEntity> wrapper);
|
||||
|
||||
List<FangwupingjiaView> selectListView(Pagination page,@Param("ew") Wrapper<FangwupingjiaEntity> wrapper);
|
||||
|
||||
FangwupingjiaView selectView(@Param("ew") Wrapper<FangwupingjiaEntity> wrapper);
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.FangwuxinxiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.FangwuxinxiVO;
|
||||
import com.entity.view.FangwuxinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 房屋信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface FangwuxinxiDao extends BaseMapper<FangwuxinxiEntity> {
|
||||
|
||||
List<FangwuxinxiVO> selectListVO(@Param("ew") Wrapper<FangwuxinxiEntity> wrapper);
|
||||
|
||||
FangwuxinxiVO selectVO(@Param("ew") Wrapper<FangwuxinxiEntity> wrapper);
|
||||
|
||||
List<FangwuxinxiView> selectListView(@Param("ew") Wrapper<FangwuxinxiEntity> wrapper);
|
||||
|
||||
List<FangwuxinxiView> selectListView(Pagination page,@Param("ew") Wrapper<FangwuxinxiEntity> wrapper);
|
||||
|
||||
FangwuxinxiView selectView(@Param("ew") Wrapper<FangwuxinxiEntity> wrapper);
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
import com.entity.FangzhuEntity;
|
||||
import com.entity.view.FangzhuView;
|
||||
import com.entity.vo.FangzhuVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 房主
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface FangzhuDao extends BaseMapper<FangzhuEntity> {
|
||||
|
||||
List<FangzhuVO> selectListVO(@Param("ew") Wrapper<FangzhuEntity> wrapper);
|
||||
|
||||
FangzhuVO selectVO(@Param("ew") Wrapper<FangzhuEntity> wrapper);
|
||||
|
||||
List<FangzhuView> selectListView(@Param("ew") Wrapper<FangzhuEntity> wrapper);
|
||||
|
||||
List<FangzhuView> selectListView(Pagination page,@Param("ew") Wrapper<FangzhuEntity> wrapper);
|
||||
|
||||
FangzhuView selectView(@Param("ew") Wrapper<FangzhuEntity> wrapper);
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
import com.entity.HetongxinxiEntity;
|
||||
import com.entity.view.HetongxinxiView;
|
||||
import com.entity.vo.HetongxinxiVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 合同信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface HetongxinxiDao extends BaseMapper<HetongxinxiEntity> {
|
||||
|
||||
List<HetongxinxiVO> selectListVO(@Param("ew") Wrapper<HetongxinxiEntity> wrapper);
|
||||
|
||||
HetongxinxiVO selectVO(@Param("ew") Wrapper<HetongxinxiEntity> wrapper);
|
||||
|
||||
List<HetongxinxiView> selectListView(@Param("ew") Wrapper<HetongxinxiEntity> wrapper);
|
||||
|
||||
List<HetongxinxiView> selectListView(Pagination page,@Param("ew") Wrapper<HetongxinxiEntity> wrapper);
|
||||
|
||||
HetongxinxiView selectView(@Param("ew") Wrapper<HetongxinxiEntity> wrapper);
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.MessagesEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.MessagesVO;
|
||||
import com.entity.view.MessagesView;
|
||||
|
||||
|
||||
/**
|
||||
* 留言板
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface MessagesDao extends BaseMapper<MessagesEntity> {
|
||||
|
||||
List<MessagesVO> selectListVO(@Param("ew") Wrapper<MessagesEntity> wrapper);
|
||||
|
||||
MessagesVO selectVO(@Param("ew") Wrapper<MessagesEntity> wrapper);
|
||||
|
||||
List<MessagesView> selectListView(@Param("ew") Wrapper<MessagesEntity> wrapper);
|
||||
|
||||
List<MessagesView> selectListView(Pagination page,@Param("ew") Wrapper<MessagesEntity> wrapper);
|
||||
|
||||
MessagesView selectView(@Param("ew") Wrapper<MessagesEntity> wrapper);
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.NewsEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.NewsVO;
|
||||
import com.entity.view.NewsView;
|
||||
|
||||
|
||||
/**
|
||||
* 公告信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface NewsDao extends BaseMapper<NewsEntity> {
|
||||
|
||||
List<NewsVO> selectListVO(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
NewsVO selectVO(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
List<NewsView> selectListView(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
List<NewsView> selectListView(Pagination page,@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
NewsView selectView(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.StoreupEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.StoreupVO;
|
||||
import com.entity.view.StoreupView;
|
||||
|
||||
|
||||
/**
|
||||
* 收藏表
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
|
||||
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);
|
||||
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
import com.entity.UserEntity;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*/
|
||||
public interface UserDao extends BaseMapper<UserEntity> {
|
||||
|
||||
List<UserEntity> selectListView(@Param("ew") Wrapper<UserEntity> wrapper);
|
||||
|
||||
List<UserEntity> selectListView(Pagination page,@Param("ew") Wrapper<UserEntity> wrapper);
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.WeixiuchuliEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.WeixiuchuliVO;
|
||||
import com.entity.view.WeixiuchuliView;
|
||||
|
||||
|
||||
/**
|
||||
* 维修处理
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface WeixiuchuliDao extends BaseMapper<WeixiuchuliEntity> {
|
||||
|
||||
List<WeixiuchuliVO> selectListVO(@Param("ew") Wrapper<WeixiuchuliEntity> wrapper);
|
||||
|
||||
WeixiuchuliVO selectVO(@Param("ew") Wrapper<WeixiuchuliEntity> wrapper);
|
||||
|
||||
List<WeixiuchuliView> selectListView(@Param("ew") Wrapper<WeixiuchuliEntity> wrapper);
|
||||
|
||||
List<WeixiuchuliView> selectListView(Pagination page,@Param("ew") Wrapper<WeixiuchuliEntity> wrapper);
|
||||
|
||||
WeixiuchuliView selectView(@Param("ew") Wrapper<WeixiuchuliEntity> wrapper);
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.WoyaodangfangzhuEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.WoyaodangfangzhuVO;
|
||||
import com.entity.view.WoyaodangfangzhuView;
|
||||
|
||||
|
||||
/**
|
||||
* 我要当房主
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface WoyaodangfangzhuDao extends BaseMapper<WoyaodangfangzhuEntity> {
|
||||
|
||||
List<WoyaodangfangzhuVO> selectListVO(@Param("ew") Wrapper<WoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
WoyaodangfangzhuVO selectVO(@Param("ew") Wrapper<WoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
List<WoyaodangfangzhuView> selectListView(@Param("ew") Wrapper<WoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
List<WoyaodangfangzhuView> selectListView(Pagination page,@Param("ew") Wrapper<WoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
WoyaodangfangzhuView selectView(@Param("ew") Wrapper<WoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.YonghuEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.YonghuVO;
|
||||
import com.entity.view.YonghuView;
|
||||
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
import com.entity.YuyuekanfangEntity;
|
||||
import com.entity.view.YuyuekanfangView;
|
||||
import com.entity.vo.YuyuekanfangVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 预约看房
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface YuyuekanfangDao extends BaseMapper<YuyuekanfangEntity> {
|
||||
|
||||
List<YuyuekanfangVO> selectListVO(@Param("ew") Wrapper<YuyuekanfangEntity> wrapper);
|
||||
|
||||
YuyuekanfangVO selectVO(@Param("ew") Wrapper<YuyuekanfangEntity> wrapper);
|
||||
|
||||
List<YuyuekanfangView> selectListView(@Param("ew") Wrapper<YuyuekanfangEntity> wrapper);
|
||||
|
||||
List<YuyuekanfangView> selectListView(Pagination page,@Param("ew") Wrapper<YuyuekanfangEntity> wrapper);
|
||||
|
||||
YuyuekanfangView selectView(@Param("ew") Wrapper<YuyuekanfangEntity> wrapper);
|
||||
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,132 +0,0 @@
|
||||
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() {
|
||||
}
|
||||
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
package com.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*/
|
||||
@TableName("users")
|
||||
public class UserEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
private String role;
|
||||
|
||||
private Date addtime;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(String role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public Date getAddtime() {
|
||||
return addtime;
|
||||
}
|
||||
|
||||
public void setAddtime(Date addtime) {
|
||||
this.addtime = addtime;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
package com.entity.model;
|
||||
|
||||
import com.entity.FangwuleixingEntity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import java.util.Date;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* 房屋类型
|
||||
* 接收传参的实体类
|
||||
* 取自ModelAndView 的model名称
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public class FangwuleixingModel implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue