package com.controller;
import java.math.BigDecimal;
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.transaction.annotation.Transactional;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.OrdersEntity;
import com.service.OrdersService;
import com.entity.TushuxinxiEntity;
import com.entity.view.TushuxinxiView;
import com.service.TushuxinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;
import com.service.StoreupService;
import com.entity.StoreupEntity;
/**
* 图书信息
* 后端接口
* @author
* @email
* @date 2023-02-19 08:23:51
*/
@RestController
@RequestMapping("/tushuxinxi")
public class TushuxinxiController {
@Autowired
private TushuxinxiService tushuxinxiService;
@Autowired
private StoreupService storeupService;
@Autowired
private OrdersService ordersService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,TushuxinxiEntity tushuxinxi,
@RequestParam(required = false) Double pricestart,
@RequestParam(required = false) Double priceend,
HttpServletRequest request){
EntityWrapper<TushuxinxiEntity> ew = new EntityWrapper<TushuxinxiEntity>();
if(pricestart!=null) ew.ge("price", pricestart);
if(priceend!=null) ew.le("price", priceend);
PageUtils page = tushuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tushuxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,TushuxinxiEntity tushuxinxi,
@RequestParam(required = false) Double pricestart,
@RequestParam(required = false) Double priceend,
HttpServletRequest request){
EntityWrapper<TushuxinxiEntity> ew = new EntityWrapper<TushuxinxiEntity>();
if(pricestart!=null) ew.ge("price", pricestart);
if(priceend!=null) ew.le("price", priceend);
PageUtils page = tushuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tushuxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( TushuxinxiEntity tushuxinxi){
EntityWrapper<TushuxinxiEntity> ew = new EntityWrapper<TushuxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( tushuxinxi, "tushuxinxi"));
return R.ok().put("data", tushuxinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(TushuxinxiEntity tushuxinxi){
EntityWrapper< TushuxinxiEntity> ew = new EntityWrapper< TushuxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( tushuxinxi, "tushuxinxi"));
TushuxinxiView tushuxinxiView = tushuxinxiService.selectView(ew);
return R.ok("查询图书信息成功").put("data", tushuxinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
TushuxinxiEntity tushuxinxi = tushuxinxiService.selectById(id);
tushuxinxi.setClicktime(new Date());
tushuxinxiService.updateById(tushuxinxi);
return R.ok().put("data", tushuxinxi);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
TushuxinxiEntity tushuxinxi = tushuxinxiService.selectById(id);
tushuxinxi.setClicktime(new Date());
tushuxinxiService.updateById(tushuxinxi);
return R.ok().put("data", tushuxinxi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody TushuxinxiEntity tushuxinxi, HttpServletRequest request){
tushuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(tushuxinxi);
tushuxinxiService.insert(tushuxinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody TushuxinxiEntity tushuxinxi, HttpServletRequest request){
tushuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(tushuxinxi);
tushuxinxiService.insert(tushuxinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody TushuxinxiEntity tushuxinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(tushuxinxi);
tushuxinxiService.updateById(tushuxinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
tushuxinxiService.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<TushuxinxiEntity> wrapper = new EntityWrapper<TushuxinxiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = tushuxinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
* 前端智能排序
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map<String, Object> params,TushuxinxiEntity tushuxinxi, HttpServletRequest request,String pre){
EntityWrapper<TushuxinxiEntity> ew = new EntityWrapper<TushuxinxiEntity>();
Map<String, Object> newMap = new HashMap<String, Object>();
Map<String, Object> param = new HashMap<String, Object>();
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, Object> entry = i
没有合适的资源?快使用搜索试试~ 我知道了~
基于Vue框架的二手图书交易平台SpringBoot+Vue设计源码
共618个文件
svg:161个
java:147个
vue:97个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 181 浏览量
2024-10-03
01:17:27
上传
评论
收藏 38.89MB ZIP 举报
温馨提示
本项目为基于Vue框架的二手图书交易平台,采用SpringBoot和Vue技术栈实现,包含616个文件,其中Vue组件文件97个,Java后端文件147个,以及丰富的图片、CSS、HTML等前端资源。整个系统集成了图书买卖、搜索、用户管理等模块,旨在为用户提供一个便捷的二手图书交易平台环境。
资源推荐
资源详情
资源评论
收起资源包目录
基于Vue框架的二手图书交易平台SpringBoot+Vue设计源码 (618个子文件)
update-password.vue.bak 3KB
main.js.bak 2KB
IndexMain.vue.bak 2KB
IndexAsideStatic.vue.bak 2KB
BreadCrumbs.vue.bak 2KB
IndexHeader.vue.bak 1KB
3-build.bat 15B
2-run.bat 14B
build.bat 14B
run.bat 14B
1-install.bat 12B
install.bat 12B
mvnw.cmd 6KB
app.12d983d2.css 335KB
chunk-vendors.311506b8.css 242KB
app.aef8690d.css 96KB
chunk-vendors.0fdd4e14.css 37KB
swiper.min.css 13KB
swiper.min.css 13KB
iconfont.css 599B
canvas-bg-1.css 379B
canvas-bg-1.css 379B
canvas-bg-2.css 79B
canvas-bg-2.css 79B
canvas-bg-4.css 57B
canvas-bg-5.css 57B
canvas-bg-3.css 57B
canvas-bg-3.css 57B
.gitignore 333B
index.html 1KB
index.html 974B
index.html 798B
index.html 608B
favicon.ico 4KB
favicon.ico 4KB
favicon.ico 4KB
favicon.ico 4KB
maven-wrapper.jar 50KB
TushuxinxiController.java 14KB
OrdersController.java 9KB
YonghuController.java 8KB
AddressController.java 8KB
CommonController.java 7KB
ChatController.java 7KB
BaiduUtil.java 7KB
DiscusstushuxinxiController.java 7KB
StoreupController.java 7KB
TushuleixingController.java 6KB
SystemintroController.java 6KB
MessagesController.java 6KB
CartController.java 6KB
OrdersEntity.java 6KB
AboutusController.java 6KB
NewsController.java 6KB
OrdersModel.java 5KB
OrdersVO.java 5KB
TushuxinxiEntity.java 5KB
UsersController.java 5KB
MPUtil.java 5KB
MavenWrapperDownloader.java 5KB
FileController.java 4KB
TushuxinxiModel.java 4KB
CartEntity.java 4KB
TushuxinxiVO.java 4KB
StoreupEntity.java 4KB
YonghuEntity.java 3KB
MessagesEntity.java 3KB
AuthorizationInterceptor.java 3KB
DiscusstushuxinxiEntity.java 3KB
ConfigController.java 3KB
SystemintroEntity.java 3KB
AboutusEntity.java 3KB
AddressEntity.java 3KB
ChatEntity.java 3KB
CartModel.java 3KB
CartVO.java 3KB
NewsEntity.java 3KB
Query.java 3KB
StoreupModel.java 2KB
TushuxinxiServiceImpl.java 2KB
StoreupVO.java 2KB
YonghuModel.java 2KB
TokenServiceImpl.java 2KB
OrdersServiceImpl.java 2KB
YonghuVO.java 2KB
CommonUtil.java 2KB
MessagesModel.java 2KB
MessagesVO.java 2KB
TokenEntity.java 2KB
DiscusstushuxinxiServiceImpl.java 2KB
TushuleixingEntity.java 2KB
DiscusstushuxinxiModel.java 2KB
SystemintroModel.java 2KB
AboutusModel.java 2KB
TushuleixingServiceImpl.java 2KB
SystemintroServiceImpl.java 2KB
PageUtils.java 2KB
DiscusstushuxinxiVO.java 2KB
SystemintroVO.java 2KB
MessagesServiceImpl.java 2KB
共 618 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
lsx202406
- 粉丝: 2820
- 资源: 5666
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 博思智联-三联集团-新乡连锁店培训流程说明.doc
- 博思智联-三联集团-职位评估培训.ppt
- 博思智联-三联集团-新乡培训流程说明.doc
- Delphi编程-Oracle-控件-delphi连接Oracle数据库控件
- mysql安装配置教程.txt
- 泛华-中国青年报项目—岗 位 描 述 书培训模搬.doc
- 和君创业—上海西域酒业项目培训—培训计划2.doc
- 和君创业—上海西域酒业项目培训—培训小结(提要)学员使用.doc
- 和君创业—上海西域酒业项目培训—业务员培训资料目录.doc
- 基于antlr4 解析器,支持spark sql, tidb sql, flink sql, Sparkflink jar 运行命令解析器详细文档+全部资料.zip
- 毕业设计:基于MQTT的物联网设备接入平台、使用Flink流处理框架详细文档+全部资料.zip
- 基于 SSM 框架,Flink 流,MySQL 数据库、BS 架构的小说网站详细文档+全部资料.zip
- 基于docker的实时监控系统,详细文档+全部资料.zip
- 基于Bilibili公开的数据,通过Flink实时分析计算,做成需要的动态图表详细文档+全部资料.zip
- IMG_20241218_182829.jpg
- 华彩--三鼎控股—华鼎锦纶子集团培训管理办法--外派培训9.27.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功