Compare commits
26 Commits
feature/房屋
...
master
Author | SHA1 | Date |
---|---|---|
deng | 9250a482b4 | 5 months ago |
deng | f243b87226 | 5 months ago |
deng | caa63f9cf1 | 5 months ago |
deng | 6fe0a5d0e5 | 5 months ago |
deng | 1c48b7913a | 5 months ago |
deng | 1a5849f7eb | 5 months ago |
deng | 684f0e879d | 5 months ago |
deng | a1a8fa0ae6 | 5 months ago |
deng | 6b3c2f022d | 5 months ago |
deng | a5045f0841 | 5 months ago |
deng | 531633fdef | 5 months ago |
deng | 3a73527070 | 5 months ago |
罗玲玲 | daa063df79 | 5 months ago |
游小雨 | 7274d882e6 | 5 months ago |
sandow | ecd3b3f05c | 5 months ago |
deng | d291abdce3 | 5 months ago |
黄敏 | 18c4f4da50 | 5 months ago |
deng | 61821f8d6e | 5 months ago |
黄敏 | 3a115ab665 | 5 months ago |
deng | 00a54db6bc | 5 months ago |
黄敏 | e09dedbafa | 5 months ago |
deng | b825fbc163 | 5 months ago |
sandow | 25eee847d6 | 5 months ago |
游小雨 | 25ba432ae1 | 5 months ago |
deng | ac2cf19c2c | 5 months ago |
黄敏 | abd420d070 | 5 months ago |
@ -0,0 +1,203 @@
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,196 @@
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,216 @@
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,212 @@
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,200 @@
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,209 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,204 @@
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,212 @@
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,200 @@
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
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);
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
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);
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
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);
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
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);
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
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);
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
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);
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
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);
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
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);
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
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);
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
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);
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
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);
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.DiscusswoyaodangfangzhuEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.DiscusswoyaodangfangzhuVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.DiscusswoyaodangfangzhuView;
|
||||
|
||||
|
||||
/**
|
||||
* 我要当房主评论表
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface DiscusswoyaodangfangzhuService extends IService<DiscusswoyaodangfangzhuEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<DiscusswoyaodangfangzhuVO> selectListVO(Wrapper<DiscusswoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
DiscusswoyaodangfangzhuVO selectVO(@Param("ew") Wrapper<DiscusswoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
List<DiscusswoyaodangfangzhuView> selectListView(Wrapper<DiscusswoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
DiscusswoyaodangfangzhuView selectView(@Param("ew") Wrapper<DiscusswoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<DiscusswoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.FangwubaoxiuEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.FangwubaoxiuVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.FangwubaoxiuView;
|
||||
|
||||
|
||||
/**
|
||||
* 房屋报修
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface FangwubaoxiuService extends IService<FangwubaoxiuEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<FangwubaoxiuVO> selectListVO(Wrapper<FangwubaoxiuEntity> wrapper);
|
||||
|
||||
FangwubaoxiuVO selectVO(@Param("ew") Wrapper<FangwubaoxiuEntity> wrapper);
|
||||
|
||||
List<FangwubaoxiuView> selectListView(Wrapper<FangwubaoxiuEntity> wrapper);
|
||||
|
||||
FangwubaoxiuView selectView(@Param("ew") Wrapper<FangwubaoxiuEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<FangwubaoxiuEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.FangwuleixingEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.FangwuleixingVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.FangwuleixingView;
|
||||
|
||||
|
||||
/**
|
||||
* 房屋类型
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface FangwuleixingService extends IService<FangwuleixingEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<FangwuleixingVO> selectListVO(Wrapper<FangwuleixingEntity> wrapper);
|
||||
|
||||
FangwuleixingVO selectVO(@Param("ew") Wrapper<FangwuleixingEntity> wrapper);
|
||||
|
||||
List<FangwuleixingView> selectListView(Wrapper<FangwuleixingEntity> wrapper);
|
||||
|
||||
FangwuleixingView selectView(@Param("ew") Wrapper<FangwuleixingEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<FangwuleixingEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.FangwupingjiaEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.FangwupingjiaVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.FangwupingjiaView;
|
||||
|
||||
|
||||
/**
|
||||
* 房屋评价
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface FangwupingjiaService extends IService<FangwupingjiaEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<FangwupingjiaVO> selectListVO(Wrapper<FangwupingjiaEntity> wrapper);
|
||||
|
||||
FangwupingjiaVO selectVO(@Param("ew") Wrapper<FangwupingjiaEntity> wrapper);
|
||||
|
||||
List<FangwupingjiaView> selectListView(Wrapper<FangwupingjiaEntity> wrapper);
|
||||
|
||||
FangwupingjiaView selectView(@Param("ew") Wrapper<FangwupingjiaEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<FangwupingjiaEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.FangwuxinxiEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.FangwuxinxiVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.FangwuxinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 房屋信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface FangwuxinxiService extends IService<FangwuxinxiEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<FangwuxinxiVO> selectListVO(Wrapper<FangwuxinxiEntity> wrapper);
|
||||
|
||||
FangwuxinxiVO selectVO(@Param("ew") Wrapper<FangwuxinxiEntity> wrapper);
|
||||
|
||||
List<FangwuxinxiView> selectListView(Wrapper<FangwuxinxiEntity> wrapper);
|
||||
|
||||
FangwuxinxiView selectView(@Param("ew") Wrapper<FangwuxinxiEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<FangwuxinxiEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.entity.FangzhuEntity;
|
||||
import com.entity.view.FangzhuView;
|
||||
import com.entity.vo.FangzhuVO;
|
||||
import com.utils.PageUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 房主
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface FangzhuService extends IService<FangzhuEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<FangzhuVO> selectListVO(Wrapper<FangzhuEntity> wrapper);
|
||||
|
||||
FangzhuVO selectVO(@Param("ew") Wrapper<FangzhuEntity> wrapper);
|
||||
|
||||
List<FangzhuView> selectListView(Wrapper<FangzhuEntity> wrapper);
|
||||
|
||||
FangzhuView selectView(@Param("ew") Wrapper<FangzhuEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<FangzhuEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.entity.HetongxinxiEntity;
|
||||
import com.entity.view.HetongxinxiView;
|
||||
import com.entity.vo.HetongxinxiVO;
|
||||
import com.utils.PageUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 合同信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface HetongxinxiService extends IService<HetongxinxiEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<HetongxinxiVO> selectListVO(Wrapper<HetongxinxiEntity> wrapper);
|
||||
|
||||
HetongxinxiVO selectVO(@Param("ew") Wrapper<HetongxinxiEntity> wrapper);
|
||||
|
||||
List<HetongxinxiView> selectListView(Wrapper<HetongxinxiEntity> wrapper);
|
||||
|
||||
HetongxinxiView selectView(@Param("ew") Wrapper<HetongxinxiEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<HetongxinxiEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.MessagesEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.MessagesVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.MessagesView;
|
||||
|
||||
|
||||
/**
|
||||
* 留言板
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface MessagesService extends IService<MessagesEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<MessagesVO> selectListVO(Wrapper<MessagesEntity> wrapper);
|
||||
|
||||
MessagesVO selectVO(@Param("ew") Wrapper<MessagesEntity> wrapper);
|
||||
|
||||
List<MessagesView> selectListView(Wrapper<MessagesEntity> wrapper);
|
||||
|
||||
MessagesView selectView(@Param("ew") Wrapper<MessagesEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<MessagesEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.NewsEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.NewsVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.NewsView;
|
||||
|
||||
|
||||
/**
|
||||
* 公告信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface NewsService extends IService<NewsEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<NewsVO> selectListVO(Wrapper<NewsEntity> wrapper);
|
||||
|
||||
NewsVO selectVO(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
List<NewsView> selectListView(Wrapper<NewsEntity> wrapper);
|
||||
|
||||
NewsView selectView(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<NewsEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.WoyaodangfangzhuEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.WoyaodangfangzhuVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.WoyaodangfangzhuView;
|
||||
|
||||
|
||||
/**
|
||||
* 我要当房主
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface WoyaodangfangzhuService extends IService<WoyaodangfangzhuEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<WoyaodangfangzhuVO> selectListVO(Wrapper<WoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
WoyaodangfangzhuVO selectVO(@Param("ew") Wrapper<WoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
List<WoyaodangfangzhuView> selectListView(Wrapper<WoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
WoyaodangfangzhuView selectView(@Param("ew") Wrapper<WoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<WoyaodangfangzhuEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.entity.YuyuekanfangEntity;
|
||||
import com.entity.view.YuyuekanfangView;
|
||||
import com.entity.vo.YuyuekanfangVO;
|
||||
import com.utils.PageUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 预约看房
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
*/
|
||||
public interface YuyuekanfangService extends IService<YuyuekanfangEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<YuyuekanfangVO> selectListVO(Wrapper<YuyuekanfangEntity> wrapper);
|
||||
|
||||
YuyuekanfangVO selectVO(@Param("ew") Wrapper<YuyuekanfangEntity> wrapper);
|
||||
|
||||
List<YuyuekanfangView> selectListView(Wrapper<YuyuekanfangEntity> wrapper);
|
||||
|
||||
YuyuekanfangView selectView(@Param("ew") Wrapper<YuyuekanfangEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<YuyuekanfangEntity> wrapper);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,62 @@
|
||||
package com.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
import com.dao.DiscusswoyaodangfangzhuDao;
|
||||
import com.entity.DiscusswoyaodangfangzhuEntity;
|
||||
import com.service.DiscusswoyaodangfangzhuService;
|
||||
import com.entity.vo.DiscusswoyaodangfangzhuVO;
|
||||
import com.entity.view.DiscusswoyaodangfangzhuView;
|
||||
|
||||
@Service("discusswoyaodangfangzhuService")
|
||||
public class DiscusswoyaodangfangzhuServiceImpl extends ServiceImpl<DiscusswoyaodangfangzhuDao, DiscusswoyaodangfangzhuEntity> implements DiscusswoyaodangfangzhuService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<DiscusswoyaodangfangzhuEntity> page = this.selectPage(
|
||||
new Query<DiscusswoyaodangfangzhuEntity>(params).getPage(),
|
||||
new EntityWrapper<DiscusswoyaodangfangzhuEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<DiscusswoyaodangfangzhuEntity> wrapper) {
|
||||
Page<DiscusswoyaodangfangzhuView> page =new Query<DiscusswoyaodangfangzhuView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DiscusswoyaodangfangzhuVO> selectListVO(Wrapper<DiscusswoyaodangfangzhuEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DiscusswoyaodangfangzhuVO selectVO(Wrapper<DiscusswoyaodangfangzhuEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DiscusswoyaodangfangzhuView> selectListView(Wrapper<DiscusswoyaodangfangzhuEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DiscusswoyaodangfangzhuView selectView(Wrapper<DiscusswoyaodangfangzhuEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
import com.dao.FangwubaoxiuDao;
|
||||
import com.entity.FangwubaoxiuEntity;
|
||||
import com.service.FangwubaoxiuService;
|
||||
import com.entity.vo.FangwubaoxiuVO;
|
||||
import com.entity.view.FangwubaoxiuView;
|
||||
|
||||
@Service("fangwubaoxiuService")
|
||||
public class FangwubaoxiuServiceImpl extends ServiceImpl<FangwubaoxiuDao, FangwubaoxiuEntity> implements FangwubaoxiuService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<FangwubaoxiuEntity> page = this.selectPage(
|
||||
new Query<FangwubaoxiuEntity>(params).getPage(),
|
||||
new EntityWrapper<FangwubaoxiuEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<FangwubaoxiuEntity> wrapper) {
|
||||
Page<FangwubaoxiuView> page =new Query<FangwubaoxiuView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FangwubaoxiuVO> selectListVO(Wrapper<FangwubaoxiuEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FangwubaoxiuVO selectVO(Wrapper<FangwubaoxiuEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FangwubaoxiuView> selectListView(Wrapper<FangwubaoxiuEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FangwubaoxiuView selectView(Wrapper<FangwubaoxiuEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
import com.dao.FangwuleixingDao;
|
||||
import com.entity.FangwuleixingEntity;
|
||||
import com.service.FangwuleixingService;
|
||||
import com.entity.vo.FangwuleixingVO;
|
||||
import com.entity.view.FangwuleixingView;
|
||||
|
||||
@Service("fangwuleixingService")
|
||||
public class FangwuleixingServiceImpl extends ServiceImpl<FangwuleixingDao, FangwuleixingEntity> implements FangwuleixingService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<FangwuleixingEntity> page = this.selectPage(
|
||||
new Query<FangwuleixingEntity>(params).getPage(),
|
||||
new EntityWrapper<FangwuleixingEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<FangwuleixingEntity> wrapper) {
|
||||
Page<FangwuleixingView> page =new Query<FangwuleixingView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FangwuleixingVO> selectListVO(Wrapper<FangwuleixingEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FangwuleixingVO selectVO(Wrapper<FangwuleixingEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FangwuleixingView> selectListView(Wrapper<FangwuleixingEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FangwuleixingView selectView(Wrapper<FangwuleixingEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
import com.dao.FangwupingjiaDao;
|
||||
import com.entity.FangwupingjiaEntity;
|
||||
import com.service.FangwupingjiaService;
|
||||
import com.entity.vo.FangwupingjiaVO;
|
||||
import com.entity.view.FangwupingjiaView;
|
||||
|
||||
@Service("fangwupingjiaService")
|
||||
public class FangwupingjiaServiceImpl extends ServiceImpl<FangwupingjiaDao, FangwupingjiaEntity> implements FangwupingjiaService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<FangwupingjiaEntity> page = this.selectPage(
|
||||
new Query<FangwupingjiaEntity>(params).getPage(),
|
||||
new EntityWrapper<FangwupingjiaEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<FangwupingjiaEntity> wrapper) {
|
||||
Page<FangwupingjiaView> page =new Query<FangwupingjiaView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FangwupingjiaVO> selectListVO(Wrapper<FangwupingjiaEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FangwupingjiaVO selectVO(Wrapper<FangwupingjiaEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FangwupingjiaView> selectListView(Wrapper<FangwupingjiaEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FangwupingjiaView selectView(Wrapper<FangwupingjiaEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
import com.dao.FangwuxinxiDao;
|
||||
import com.entity.FangwuxinxiEntity;
|
||||
import com.service.FangwuxinxiService;
|
||||
import com.entity.vo.FangwuxinxiVO;
|
||||
import com.entity.view.FangwuxinxiView;
|
||||
|
||||
@Service("fangwuxinxiService")
|
||||
public class FangwuxinxiServiceImpl extends ServiceImpl<FangwuxinxiDao, FangwuxinxiEntity> implements FangwuxinxiService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<FangwuxinxiEntity> page = this.selectPage(
|
||||
new Query<FangwuxinxiEntity>(params).getPage(),
|
||||
new EntityWrapper<FangwuxinxiEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<FangwuxinxiEntity> wrapper) {
|
||||
Page<FangwuxinxiView> page =new Query<FangwuxinxiView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FangwuxinxiVO> selectListVO(Wrapper<FangwuxinxiEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FangwuxinxiVO selectVO(Wrapper<FangwuxinxiEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FangwuxinxiView> selectListView(Wrapper<FangwuxinxiEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FangwuxinxiView selectView(Wrapper<FangwuxinxiEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.dao.FangzhuDao;
|
||||
import com.entity.FangzhuEntity;
|
||||
import com.entity.view.FangzhuView;
|
||||
import com.entity.vo.FangzhuVO;
|
||||
import com.service.FangzhuService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service("fangzhuService")
|
||||
public class FangzhuServiceImpl extends ServiceImpl<FangzhuDao, FangzhuEntity> implements FangzhuService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<FangzhuEntity> page = this.selectPage(
|
||||
new Query<FangzhuEntity>(params).getPage(),
|
||||
new EntityWrapper<FangzhuEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<FangzhuEntity> wrapper) {
|
||||
Page<FangzhuView> page =new Query<FangzhuView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FangzhuVO> selectListVO(Wrapper<FangzhuEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FangzhuVO selectVO(Wrapper<FangzhuEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FangzhuView> selectListView(Wrapper<FangzhuEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FangzhuView selectView(Wrapper<FangzhuEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.dao.HetongxinxiDao;
|
||||
import com.entity.HetongxinxiEntity;
|
||||
import com.entity.view.HetongxinxiView;
|
||||
import com.entity.vo.HetongxinxiVO;
|
||||
import com.service.HetongxinxiService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service("hetongxinxiService")
|
||||
public class HetongxinxiServiceImpl extends ServiceImpl<HetongxinxiDao, HetongxinxiEntity> implements HetongxinxiService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<HetongxinxiEntity> page = this.selectPage(
|
||||
new Query<HetongxinxiEntity>(params).getPage(),
|
||||
new EntityWrapper<HetongxinxiEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<HetongxinxiEntity> wrapper) {
|
||||
Page<HetongxinxiView> page =new Query<HetongxinxiView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HetongxinxiVO> selectListVO(Wrapper<HetongxinxiEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HetongxinxiVO selectVO(Wrapper<HetongxinxiEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HetongxinxiView> selectListView(Wrapper<HetongxinxiEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HetongxinxiView selectView(Wrapper<HetongxinxiEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
import com.dao.MessagesDao;
|
||||
import com.entity.MessagesEntity;
|
||||
import com.service.MessagesService;
|
||||
import com.entity.vo.MessagesVO;
|
||||
import com.entity.view.MessagesView;
|
||||
|
||||
@Service("messagesService")
|
||||
public class MessagesServiceImpl extends ServiceImpl<MessagesDao, MessagesEntity> implements MessagesService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<MessagesEntity> page = this.selectPage(
|
||||
new Query<MessagesEntity>(params).getPage(),
|
||||
new EntityWrapper<MessagesEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<MessagesEntity> wrapper) {
|
||||
Page<MessagesView> page =new Query<MessagesView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MessagesVO> selectListVO(Wrapper<MessagesEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MessagesVO selectVO(Wrapper<MessagesEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MessagesView> selectListView(Wrapper<MessagesEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MessagesView selectView(Wrapper<MessagesEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
import com.dao.NewsDao;
|
||||
import com.entity.NewsEntity;
|
||||
import com.service.NewsService;
|
||||
import com.entity.vo.NewsVO;
|
||||
import com.entity.view.NewsView;
|
||||
|
||||
@Service("newsService")
|
||||
public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements NewsService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<NewsEntity> page = this.selectPage(
|
||||
new Query<NewsEntity>(params).getPage(),
|
||||
new EntityWrapper<NewsEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<NewsEntity> wrapper) {
|
||||
Page<NewsView> page =new Query<NewsView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NewsVO> selectListVO(Wrapper<NewsEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NewsVO selectVO(Wrapper<NewsEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NewsView> selectListView(Wrapper<NewsEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NewsView selectView(Wrapper<NewsEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
import com.dao.WoyaodangfangzhuDao;
|
||||
import com.entity.WoyaodangfangzhuEntity;
|
||||
import com.service.WoyaodangfangzhuService;
|
||||
import com.entity.vo.WoyaodangfangzhuVO;
|
||||
import com.entity.view.WoyaodangfangzhuView;
|
||||
|
||||
@Service("woyaodangfangzhuService")
|
||||
public class WoyaodangfangzhuServiceImpl extends ServiceImpl<WoyaodangfangzhuDao, WoyaodangfangzhuEntity> implements WoyaodangfangzhuService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<WoyaodangfangzhuEntity> page = this.selectPage(
|
||||
new Query<WoyaodangfangzhuEntity>(params).getPage(),
|
||||
new EntityWrapper<WoyaodangfangzhuEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<WoyaodangfangzhuEntity> wrapper) {
|
||||
Page<WoyaodangfangzhuView> page =new Query<WoyaodangfangzhuView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WoyaodangfangzhuVO> selectListVO(Wrapper<WoyaodangfangzhuEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WoyaodangfangzhuVO selectVO(Wrapper<WoyaodangfangzhuEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WoyaodangfangzhuView> selectListView(Wrapper<WoyaodangfangzhuEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WoyaodangfangzhuView selectView(Wrapper<WoyaodangfangzhuEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.dao.YuyuekanfangDao;
|
||||
import com.entity.YuyuekanfangEntity;
|
||||
import com.entity.view.YuyuekanfangView;
|
||||
import com.entity.vo.YuyuekanfangVO;
|
||||
import com.service.YuyuekanfangService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service("yuyuekanfangService")
|
||||
public class YuyuekanfangServiceImpl extends ServiceImpl<YuyuekanfangDao, YuyuekanfangEntity> implements YuyuekanfangService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<YuyuekanfangEntity> page = this.selectPage(
|
||||
new Query<YuyuekanfangEntity>(params).getPage(),
|
||||
new EntityWrapper<YuyuekanfangEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<YuyuekanfangEntity> wrapper) {
|
||||
Page<YuyuekanfangView> page =new Query<YuyuekanfangView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<YuyuekanfangVO> selectListVO(Wrapper<YuyuekanfangEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public YuyuekanfangVO selectVO(Wrapper<YuyuekanfangEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<YuyuekanfangView> selectListView(Wrapper<YuyuekanfangEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public YuyuekanfangView selectView(Wrapper<YuyuekanfangEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<svg :class="svgClass" aria-hidden="true" v-on="$listeners">
|
||||
<use :xlink:href="iconName" />
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'SvgIcon',
|
||||
props: {
|
||||
iconClass: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
iconName() {
|
||||
return `#icon-${this.iconClass}`
|
||||
},
|
||||
svgClass() {
|
||||
if (this.className) {
|
||||
return 'svg-icon ' + this.className
|
||||
} else {
|
||||
return 'svg-icon'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.svg-icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
vertical-align: -0.15em;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<el-breadcrumb class="app-breadcrumb" separator="(●'◡'●)" style="height:50px;backgroundColor:rgba(79, 73, 73, 1);borderRadius:0px;padding:0px 20px 0px 20px;boxShadow:;borderWidth:2px;borderStyle:;borderColor:rgba(193, 180, 180, 0.5);">
|
||||
<transition-group name="breadcrumb" class="box" :style="1==1?'justifyContent:flex-start;':1==2?'justifyContent:center;':'justifyContent:flex-end;'">
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.name }}</span>
|
||||
<a v-else @click.prevent="handleLink(item)">{{ item.name }}</a>
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
</el-breadcrumb>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pathToRegexp from 'path-to-regexp'
|
||||
import { generateTitle } from '@/utils/i18n'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
levelList: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route() {
|
||||
this.getBreadcrumb()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getBreadcrumb()
|
||||
this.breadcrumbStyleChange()
|
||||
},
|
||||
methods: {
|
||||
generateTitle,
|
||||
getBreadcrumb() {
|
||||
// only show routes with meta.title
|
||||
let route = this.$route
|
||||
let matched = route.matched.filter(item => item.meta)
|
||||
const first = matched[0]
|
||||
matched = [{ path: '/index' }].concat(matched)
|
||||
|
||||
this.levelList = matched.filter(item => item.meta)
|
||||
},
|
||||
isDashboard(route) {
|
||||
const name = route && route.name
|
||||
if (!name) {
|
||||
return false
|
||||
}
|
||||
return name.trim().toLocaleLowerCase() === 'Index'.toLocaleLowerCase()
|
||||
},
|
||||
pathCompile(path) {
|
||||
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
|
||||
const { params } = this.$route
|
||||
var toPath = pathToRegexp.compile(path)
|
||||
return toPath(params)
|
||||
},
|
||||
handleLink(item) {
|
||||
const { redirect, path } = item
|
||||
if (redirect) {
|
||||
this.$router.push(redirect)
|
||||
return
|
||||
}
|
||||
this.$router.push(path)
|
||||
},
|
||||
breadcrumbStyleChange(val) {
|
||||
this.$nextTick(()=>{
|
||||
document.querySelectorAll('.app-breadcrumb .el-breadcrumb__separator').forEach(el=>{
|
||||
el.innerText = "(●'◡'●)"
|
||||
el.style.color = "rgba(235, 90, 170, 1)"
|
||||
})
|
||||
document.querySelectorAll('.app-breadcrumb .el-breadcrumb__inner a').forEach(el=>{
|
||||
el.style.color = "rgba(196, 212, 244, 1)"
|
||||
})
|
||||
document.querySelectorAll('.app-breadcrumb .el-breadcrumb__inner .no-redirect').forEach(el=>{
|
||||
el.style.color = "rgba(244, 149, 32, 1)"
|
||||
})
|
||||
|
||||
let str = "vertical"
|
||||
if("vertical" === str) {
|
||||
let headHeight = "60px"
|
||||
headHeight = parseInt(headHeight) + 10 + 'px'
|
||||
document.querySelectorAll('.app-breadcrumb').forEach(el=>{
|
||||
el.style.marginTop = headHeight
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-breadcrumb {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 50px;
|
||||
|
||||
.box {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.no-redirect {
|
||||
color: #97a8be;
|
||||
cursor: text;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.name }}</span>
|
||||
<a v-else @click.prevent="handleLink(item)">{{ item.name }}</a>
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
</el-breadcrumb>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pathToRegexp from 'path-to-regexp'
|
||||
import { generateTitle } from '@/utils/i18n'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
levelList: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route() {
|
||||
this.getBreadcrumb()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getBreadcrumb()
|
||||
},
|
||||
methods: {
|
||||
generateTitle,
|
||||
getBreadcrumb() {
|
||||
// only show routes with meta.title
|
||||
console.log(this.$route)
|
||||
let matched = this.$route.matched.filter(item => item.meta)
|
||||
const first = matched[0]
|
||||
matched = [{ path: '/index' }].concat(matched)
|
||||
|
||||
this.levelList = matched.filter(item => item.meta)
|
||||
},
|
||||
isDashboard(route) {
|
||||
const name = route && route.name
|
||||
if (!name) {
|
||||
return false
|
||||
}
|
||||
return name.trim().toLocaleLowerCase() === 'Index'.toLocaleLowerCase()
|
||||
},
|
||||
pathCompile(path) {
|
||||
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
|
||||
const { params } = this.$route
|
||||
var toPath = pathToRegexp.compile(path)
|
||||
return toPath(params)
|
||||
},
|
||||
handleLink(item) {
|
||||
const { redirect, path } = item
|
||||
if (redirect) {
|
||||
this.$router.push(redirect)
|
||||
return
|
||||
}
|
||||
this.$router.push(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-breadcrumb.el-breadcrumb {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
line-height: 50px;
|
||||
margin-left: 8px;
|
||||
|
||||
.no-redirect {
|
||||
color: #97a8be;
|
||||
cursor: text;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="header">
|
||||
<span>{{title}}</span>
|
||||
<span>
|
||||
<el-tag size="small" :type="titleTag">{{titleUnit}}</el-tag>
|
||||
</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
{{content}}
|
||||
<span class="unit">{{contentUnit}}</span>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<span>{{bottomTitle}}</span>
|
||||
<span>
|
||||
{{bottomContent}}
|
||||
<i :class="bottomIcon"></i>
|
||||
</span>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: [
|
||||
"title",
|
||||
"titleTag",
|
||||
"titleUnit",
|
||||
"content",
|
||||
"contentUnit",
|
||||
"bottomTitle",
|
||||
"bottomContent",
|
||||
"bottomIcon"
|
||||
]
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.box-card {
|
||||
margin-right: 10px;
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.content {
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
.unit {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<div class="home-comment">
|
||||
<div class="title">用户留言</div>
|
||||
<div class="comment-list">
|
||||
<div v-for="(item,index) in list" v-bind:key="index" class="comment-item">
|
||||
<div class="user-content">
|
||||
<el-image
|
||||
class="avator"
|
||||
:src="item.avator"
|
||||
></el-image>
|
||||
<span class="user">{{item.name}}</span>
|
||||
</div>
|
||||
<div class="comment">{{item.content}}</div>
|
||||
<div class="create-time">{{item.createTime}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
name: "MaskLin",
|
||||
avator:
|
||||
"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
||||
content:
|
||||
"你以为只要长得漂亮就有男生喜欢?你以为只要有了钱漂亮妹子就自己贴上来了?你以为学霸就能找到好工作?我告诉你吧,这些都是真的!",
|
||||
createTime: "5月02日 00:00"
|
||||
},
|
||||
{
|
||||
name: "MaskLin",
|
||||
avator:
|
||||
"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
||||
content: "作者太帅了",
|
||||
createTime: "5月04日 00:00"
|
||||
},
|
||||
{
|
||||
name: "MaskLin",
|
||||
avator:
|
||||
"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
||||
content: "作者太帅了",
|
||||
createTime: "5月04日 00:00"
|
||||
},
|
||||
{
|
||||
name: "MaskLin",
|
||||
avator: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
||||
content: "作者太帅了",
|
||||
createTime: "5月04日 00:00"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.home-comment {
|
||||
background: #ffffff;
|
||||
.title {
|
||||
font-size: 18px;
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
}
|
||||
.comment-list {
|
||||
padding: 10px;
|
||||
.comment-item {
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
.user-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.user {
|
||||
font-size: 18px;
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
line-height: 50px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.avator {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.comment {
|
||||
margin-top: 10px;
|
||||
font-size: 14px;
|
||||
color: #888888;
|
||||
}
|
||||
.create-time {
|
||||
margin-top: 15px;
|
||||
font-size: 14px;
|
||||
color: #888888;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<div class="home-progress">
|
||||
<div class="title">月访问量</div>
|
||||
<div class="tip">同上期增长</div>
|
||||
<el-progress
|
||||
class="progress"
|
||||
:text-inside="true"
|
||||
:stroke-width="24"
|
||||
:percentage="20"
|
||||
status="success"
|
||||
></el-progress>
|
||||
<div class="title">月用户量</div>
|
||||
<div class="tip">同上期增长</div>
|
||||
<el-progress
|
||||
class="progress"
|
||||
:text-inside="true"
|
||||
:stroke-width="24"
|
||||
:percentage="50"
|
||||
status="success"
|
||||
></el-progress>
|
||||
<div class="title">月收入</div>
|
||||
<div class="tip">同上期减少</div>
|
||||
<el-progress
|
||||
class="progress"
|
||||
:text-inside="true"
|
||||
:stroke-width="24"
|
||||
:percentage="28"
|
||||
status="exception"
|
||||
></el-progress>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.home-progress {
|
||||
background: #ffffff;
|
||||
height: 400px;
|
||||
padding: 20px;
|
||||
.title {
|
||||
color: #666666;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.tip {
|
||||
color: #888888;
|
||||
font-size: 16px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.progress {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue