基于Java+SpringBoot+vue實(shí)現(xiàn)圖書借閱和銷售商城一體化系統(tǒng)
?? 作者主頁 央順技術(shù)團(tuán)隊(duì)
?? 歡迎點(diǎn)贊 ?? 收藏 ?留言 ??
?? 文末獲取源碼聯(lián)系方式 ??
?? 查看下方微信號獲取聯(lián)系方式 承接各種定制系統(tǒng) ??
??????精彩系列推薦
Java畢設(shè)項(xiàng)目精品實(shí)戰(zhàn)案例《1000套》
前言介紹:
在Internet高速發(fā)展的今天,計(jì)算機(jī)的應(yīng)用幾乎完全覆蓋我們生活的各個領(lǐng)域,互聯(lián)網(wǎng)在經(jīng)濟(jì),生活等方面有著舉足輕重的地位,成為人們資源共享,信息快速傳遞的重要渠道。在中國,網(wǎng)上管理的興起也同時飛速發(fā)展著。為了適應(yīng)現(xiàn)代人類強(qiáng)烈的時間觀念,對于網(wǎng)上圖書商城傳統(tǒng)管理方式的缺點(diǎn),互聯(lián)網(wǎng)的出現(xiàn)打破了這種局限性,給了廣大用戶更大的選擇空間,促進(jìn)了網(wǎng)上圖書商城管理,有效的避免了網(wǎng)上圖書商城管理繚亂的局面,方便用戶。本網(wǎng)站中,管理員可以以最方便的形式,在最短的時間內(nèi)查找最多的網(wǎng)上圖書信息。因此,系統(tǒng)無疑給人們的生活帶來了極大的方便,網(wǎng)絡(luò)的應(yīng)用讓時間和距離不再是局限。
通過網(wǎng)上圖書商城的研究可以更好地理解系統(tǒng)開發(fā)的意義,而且也有利于發(fā)展更多的智能系統(tǒng),解決了人才的供給和需求的平衡問題,網(wǎng)上圖書商城的開發(fā)建設(shè),由于其開發(fā)周期短,維護(hù)方便,所以它可以適應(yīng)網(wǎng)上圖書商城體系基本要求。
系統(tǒng)實(shí)現(xiàn)功能:
本次設(shè)計(jì)任務(wù)是要設(shè)計(jì)一個網(wǎng)上圖書商城,通過這個系統(tǒng)能夠滿足網(wǎng)上圖書商城的管理功能。系統(tǒng)的主要功能包括首頁、個人中心、用戶管理、賣家管理、圖書類型管理、圖書信息管理、圖書借閱管理、訂單管理、系統(tǒng)管理等功能。
管理員可以根據(jù)系統(tǒng)給定的賬號進(jìn)行登錄,登錄后可以進(jìn)入網(wǎng)上圖書商城,對網(wǎng)上圖書商城所有模塊進(jìn)行管理。包括查看和修改自己的個人信息以及登錄密碼。
該系統(tǒng)為每一個用戶都分配了一個用戶賬號,用戶通過賬號的登錄可以在系統(tǒng)中查看網(wǎng)上圖書商城信息及對個人信息進(jìn)行修改等功能。
系統(tǒng)設(shè)計(jì):
業(yè)務(wù)流程分析:
在系統(tǒng)流程分析當(dāng)中調(diào)查分析它是比較重要的環(huán)節(jié),因?yàn)樵谶@個系統(tǒng)當(dāng)中它都涉及到每個環(huán)節(jié)的業(yè)務(wù)流程,所以從婚紗攝影網(wǎng)的設(shè)計(jì)的整體設(shè)計(jì)上要保證各個信息的正確輸入和輸出以及對數(shù)據(jù)儲存的完整,并結(jié)合實(shí)際的操作步驟來繪制出具體的流程圖。具體流程圖如下圖所示:
圖書信息實(shí)體圖
系統(tǒng)流程圖:
下圖是用戶進(jìn)入這個網(wǎng)上圖書商城后,基本的操作流程。一進(jìn)入首頁便可以進(jìn)行各種圖書商城信息的瀏覽,包括圖書信息等,用戶可以根據(jù)自身的需求來找適合自己的圖書,如果有合適的圖書時,就能進(jìn)行相應(yīng)的操作,但前提是必須是登錄的用戶,不然系統(tǒng)會提示需重新登錄才可操作。用戶也可通過公告的消息,了解實(shí)時的情況,這樣有助于結(jié)合自身,更好的適應(yīng)網(wǎng)上圖書商城的管理需求,最后用戶可以根據(jù)自己獲得信息的滿意程度來進(jìn)行操作
功能截圖:
登錄注冊模塊
用戶注冊、用戶登錄,用戶通過輸入用戶名、密碼、姓名、聯(lián)系電話、郵箱等信息進(jìn)行注冊、登錄
前臺首頁
在系統(tǒng)首頁可以查看首頁、圖書信息、圖書資訊、個人中心、購物車等內(nèi)容進(jìn)行詳細(xì)操作
圖書信息
在圖書信息頁面可以查看圖書名稱、價格、單次購買、庫存、店鋪名稱、圖書編號、圖書類型、圖片、作者、出版社、賬號、買家賬號、手機(jī)、圖示介紹等詳細(xì)內(nèi)容
圖書詳情
并進(jìn)行添加到購物車,立即購買,評論,等收藏操作
圖書資訊
個人中心
個人中心,在個人中心頁面通過填寫用戶名、密碼、姓名、性別、上傳圖片、郵箱、手機(jī)、余額等信息進(jìn)行更新信息,根據(jù)需要對我的訂單,我的地址,我的收藏進(jìn)行詳細(xì)操作
購物車管理
購物車頁面可以查看購買商品、價格、數(shù)量、總價等信息,還可以進(jìn)行點(diǎn)擊購買和刪除操作
下單模塊
后臺管理模塊
用戶管理:在用戶管理頁面可以對索引、用戶名、姓名、性別、頭像、郵箱、手機(jī)等信息進(jìn)行詳情,修改和刪除等操作
賣家管理
在賣家管理頁面可以對索引、賬號、賣家姓名、性別、頭像、身份證、手機(jī)、郵箱、審核回復(fù)、審核狀態(tài)等內(nèi)容進(jìn)行詳情,審核,修改和刪除等操作
圖書類型管理
在圖書類型管理頁面可以查看索引、圖書類型等內(nèi)容,并進(jìn)行新增、修改和刪除操作
圖書信息管理
在圖書信息管理頁面可以查看索引、店鋪名稱、圖書編號、圖書名稱、圖書類型、圖片、作者、出版社、賬號、買家姓名、手機(jī)、價格、單限、庫存等內(nèi)容,
并進(jìn)行詳情,修改,查看評論和刪除操作
圖書資訊管理
在圖書資訊可以對索引、標(biāo)題、圖片等內(nèi)容進(jìn)行查看,
還可以對 詳情,修改和刪除等操作
圖書借閱管理
圖書歸還管理
系統(tǒng)輪播圖
還可以對輪播圖管理進(jìn)行相應(yīng)的操作
訂單信息管理
在已支付訂單頁面可以對索引、訂單編號、商品名稱、商品圖片、購買數(shù)量、價格/積分、折扣價格、總價格/總積分、折扣總價格、支付類型、狀態(tài)、地址、電話、收貨人、商戶名稱、下單時間等信息進(jìn)行詳情、發(fā)貨和刪除操作,還可以對已退款訂單,已完成訂單,已發(fā)貨訂單,未支付訂單,已取消訂單等進(jìn)行相應(yīng)的操作
主要代碼:
yml配置:
# Tomcat
server:
tomcat:
uri-encoding: UTF-8
port: 8080
servlet:
context-path: /springbootq3ulr
spring:
datasource:
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3307/springbootq3ulr?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8
username: root
password: crit@123456
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=springbootq3ulr
# username: sa
# password: 123456
servlet:
multipart:
max-file-size: 300MB
max-request-size: 300MB
resources:
static-locations: classpath:static/,file:static/
#mybatis
mybatis-plus:
mapper-locations: classpath*:mapper/*.xml
#實(shí)體掃描,多個package用逗號或者分號分隔
typeAliasesPackage: com.entity
global-config:
#主鍵類型 0:"數(shù)據(jù)庫ID自增", 1:"用戶輸入ID",2:"全局唯一ID (數(shù)字類型唯一ID)", 3:"全局唯一ID UUID";
id-type: 1
#字段策略 0:"忽略判斷",1:"非 NULL 判斷"),2:"非空判斷"
field-strategy: 1
#駝峰下劃線轉(zhuǎn)換
db-column-underline: true
#刷新mapper 調(diào)試神器
refresh-mapper: true
#邏輯刪除配置
logic-delete-value: -1
logic-not-delete-value: 0
#自定義SQL注入器
sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
#springboot 項(xiàng)目mybatis plus 設(shè)置 jdbcTypeForNull (oracle數(shù)據(jù)庫需配置JdbcType.NULL, 默認(rèn)是Other)
jdbc-type-for-null: 'null'
文件上傳:
/**
* 上傳文件映射表
*/
@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);
/**
* 如果使用idea或者eclipse重啟項(xiàng)目,發(fā)現(xiàn)之前上傳的圖片或者文件丟失,將下面一行代碼注釋打開
* 請將以下的"D:\\springbootq33sd\\src\\main\\resources\\static\\upload"替換成你本地項(xiàng)目的upload路徑,
* 并且項(xiàng)目路徑不能存在中文、空格等特殊字符
*/
// FileUtils.copyFile(dest, new File("D:\\springbootq33sd\\src\\main\\resources\\static\\upload"+"/"+fileName)); /**修改了路徑以后請將該行最前面的//注釋去掉**/
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);
}
}
圖書借閱:
/**
* 圖書借閱
* 后端接口
* @lyy
* @date 2022-03-25 17:43:28
*/
@RestController
@RequestMapping("/tushujieyue")
public class TushujieyueController {
@Autowired
private TushujieyueService tushujieyueService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,TushujieyueEntity tushujieyue,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("maijia")) {
tushujieyue.setZhanghao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("yonghu")) {
tushujieyue.setYonghuming((String)request.getSession().getAttribute("username"));
}
EntityWrapper<TushujieyueEntity> ew = new EntityWrapper<TushujieyueEntity>();
PageUtils page = tushujieyueService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tushujieyue), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,TushujieyueEntity tushujieyue,
HttpServletRequest request){
EntityWrapper<TushujieyueEntity> ew = new EntityWrapper<TushujieyueEntity>();
PageUtils page = tushujieyueService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tushujieyue), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( TushujieyueEntity tushujieyue){
EntityWrapper<TushujieyueEntity> ew = new EntityWrapper<TushujieyueEntity>();
ew.allEq(MPUtil.allEQMapPre( tushujieyue, "tushujieyue"));
return R.ok().put("data", tushujieyueService.selectListView(ew));
}
/**
* 查詢
*/
@RequestMapping("/query")
public R query(TushujieyueEntity tushujieyue){
EntityWrapper< TushujieyueEntity> ew = new EntityWrapper< TushujieyueEntity>();
ew.allEq(MPUtil.allEQMapPre( tushujieyue, "tushujieyue"));
TushujieyueView tushujieyueView = tushujieyueService.selectView(ew);
return R.ok("查詢圖書借閱成功").put("data", tushujieyueView);
}
/**
* 后端詳情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
TushujieyueEntity tushujieyue = tushujieyueService.selectById(id);
return R.ok().put("data", tushujieyue);
}
/**
* 前端詳情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
TushujieyueEntity tushujieyue = tushujieyueService.selectById(id);
return R.ok().put("data", tushujieyue);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody TushujieyueEntity tushujieyue, HttpServletRequest request){
tushujieyue.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(tushujieyue);
tushujieyueService.insert(tushujieyue);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody TushujieyueEntity tushujieyue, HttpServletRequest request){
tushujieyue.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(tushujieyue);
tushujieyueService.insert(tushujieyue);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody TushujieyueEntity tushujieyue, HttpServletRequest request){
//ValidatorUtils.validateEntity(tushujieyue);
tushujieyueService.updateById(tushujieyue);//全部更新
return R.ok();
}
/**
* 刪除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
tushujieyueService.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<TushujieyueEntity> wrapper = new EntityWrapper<TushujieyueEntity>();
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("maijia")) {
wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("yonghu")) {
wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
}
int count = tushujieyueService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
論文參考:
文章來源:http://www.zghlxwxcb.cn/news/detail-796368.html
獲取源碼:
總體來說這個項(xiàng)目功能相對還是比較簡單優(yōu)秀的、適合初學(xué)者作為課程設(shè)計(jì)和畢業(yè)設(shè)計(jì)參考
?? 查看下方微信號獲取聯(lián)系方式 承接各種定制系統(tǒng) ??
??????精彩系列推薦
Java畢設(shè)項(xiàng)目精品實(shí)戰(zhàn)案例《1000套》文章來源地址http://www.zghlxwxcb.cn/news/detail-796368.html
到了這里,關(guān)于基于Java+SpringBoot+vue實(shí)現(xiàn)圖書借閱和銷售商城一體化系統(tǒng)的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!