bug
This commit is contained in:
parent
552c14d4f1
commit
8513b981c9
@ -1,107 +0,0 @@
|
||||
//package io.modules.sys.controller;
|
||||
//import io.common.annotation.LogOperation;
|
||||
//import io.common.constant.Constant;
|
||||
//import io.modules.item.dto.AccountDTO;
|
||||
//
|
||||
//import io.modules.item.service.AccountService;
|
||||
//import io.common.page.PageData;
|
||||
//import io.common.utils.Result;
|
||||
//import io.common.validator.AssertUtils;
|
||||
//import io.common.validator.ValidatorUtils;
|
||||
//import io.common.validator.group.AddGroup;
|
||||
//import io.common.validator.group.DefaultGroup;
|
||||
//import io.common.validator.group.UpdateGroup;
|
||||
//import io.modules.item.service.DictService;
|
||||
//import io.swagger.v3.oas.annotations.Operation;
|
||||
//import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
//import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
//import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.web.bind.annotation.*;
|
||||
//import io.swagger.v3.oas.annotations.Parameter;
|
||||
//import io.swagger.v3.oas.annotations.Parameters;
|
||||
//
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
///**
|
||||
// * 文章表
|
||||
//
|
||||
// */
|
||||
//@RestController
|
||||
//@RequestMapping("item/article")
|
||||
//@Tag(name="文章表")
|
||||
//public class ArticleController {
|
||||
// @Autowired
|
||||
// private AccountService articleService;
|
||||
//
|
||||
//
|
||||
// @Autowired
|
||||
// private DictService dictService;
|
||||
//
|
||||
// @GetMapping("page")
|
||||
// @Operation(summary = "分页")
|
||||
// @Parameters({
|
||||
// @Parameter(name = Constant.PAGE, description = "当前页码,从1开始", in = ParameterIn.QUERY, required = true, ref="int") ,
|
||||
// @Parameter(name = Constant.LIMIT, description = "每页显示记录数", in = ParameterIn.QUERY,required = true, ref="int") ,
|
||||
// @Parameter(name = Constant.ORDER_FIELD, description = "排序字段", in = ParameterIn.QUERY, ref="String") ,
|
||||
// @Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)", in = ParameterIn.QUERY, ref="String"),
|
||||
// @Parameter(name = "type", description = "类型", in = ParameterIn.QUERY, ref="String")
|
||||
// })
|
||||
// @RequiresPermissions("item:article:page")
|
||||
// public Result<PageData<AccountDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){
|
||||
// PageData<AccountDTO> page = articleService.page(params);
|
||||
// return new Result<PageData<AccountDTO>>().ok(page);
|
||||
// }
|
||||
//
|
||||
// @GetMapping("{id}")
|
||||
// @Operation(summary = "信息")
|
||||
// @RequiresPermissions("item:article:info")
|
||||
// public Result<AccountDTO> get(@PathVariable("id") Long id){
|
||||
// AccountDTO data = articleService.get(id);
|
||||
//
|
||||
// return new Result<AccountDTO>().ok(data);
|
||||
// }
|
||||
//
|
||||
// @PostMapping
|
||||
// @Operation(summary = "保存")
|
||||
// @LogOperation("保存")
|
||||
// @RequiresPermissions("item:article:save")
|
||||
// public Result save(@RequestBody AccountDTO dto){
|
||||
// //效验数据
|
||||
// ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
// List<String> existsList = dictService.isExistsList(dto.getIntroduction());
|
||||
// if (!existsList.isEmpty()){
|
||||
// return new Result().error("简介出现敏感词:"+existsList);
|
||||
// }
|
||||
// List<String> contentExistsList = dictService.isExistsList(dto.getContent());
|
||||
// if (!contentExistsList.isEmpty()){
|
||||
// return new Result().error("发布内容出现敏感词:"+ contentExistsList);
|
||||
// }
|
||||
// articleService.save(dto);
|
||||
// return new Result();
|
||||
// }
|
||||
// @PutMapping
|
||||
// @Operation(summary = "修改")
|
||||
// @LogOperation("修改")
|
||||
// @RequiresPermissions("item:article:update")
|
||||
// public Result update(@RequestBody AccountDTO dto){
|
||||
// //效验数据
|
||||
// ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
// articleService.update(dto);
|
||||
// return new Result();
|
||||
// }
|
||||
//
|
||||
// @DeleteMapping
|
||||
// @Operation(summary = "删除")
|
||||
// @LogOperation("删除")
|
||||
// @RequiresPermissions("item:article:delete")
|
||||
// public Result delete(@RequestBody Long[] ids){
|
||||
// //效验数据
|
||||
// AssertUtils.isArrayEmpty(ids, "id");
|
||||
// articleService.delete(ids);
|
||||
// return new Result();
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
//}
|
@ -28,9 +28,6 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* 商品分类表
|
||||
*
|
||||
* @author Mark #
|
||||
* @since 1.0.0 2025-02-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("sys/categories")
|
||||
|
@ -28,7 +28,6 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* 敏感词
|
||||
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("item/dict")
|
||||
@ -48,7 +47,6 @@ public class DictController {
|
||||
@RequiresPermissions("item:dict:page")
|
||||
public Result<PageData<DictDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){
|
||||
PageData<DictDTO> page = dictService.page(params);
|
||||
|
||||
return new Result<PageData<DictDTO>>().ok(page);
|
||||
}
|
||||
|
||||
@ -57,7 +55,6 @@ public class DictController {
|
||||
@RequiresPermissions("item:dict:info")
|
||||
public Result<DictDTO> get(@PathVariable("id") Long id){
|
||||
DictDTO data = dictService.get(id);
|
||||
|
||||
return new Result<DictDTO>().ok(data);
|
||||
}
|
||||
|
||||
@ -68,10 +65,7 @@ public class DictController {
|
||||
public Result save(@RequestBody DictDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
|
||||
|
||||
dictService.save(dto);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@ -83,7 +77,6 @@ public class DictController {
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
dictService.update(dto);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@ -94,12 +87,7 @@ public class DictController {
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
|
||||
dictService.delete(ids);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
package io.modules.sys.controller;
|
||||
|
||||
|
||||
import io.common.annotation.LogOperation;
|
||||
import io.common.constant.Constant;
|
||||
import io.common.page.PageData;
|
||||
@ -26,14 +24,9 @@ import io.swagger.v3.oas.annotations.Parameters;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 电影表
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("sys/item")
|
||||
@Tag(name = "电影表")
|
||||
public class ItemController {
|
||||
@Autowired
|
||||
private ItemService itemService;
|
||||
|
@ -1,6 +1,5 @@
|
||||
package io.modules.sys.controller;
|
||||
|
||||
|
||||
import io.common.constant.Constant;
|
||||
import io.common.page.PageData;
|
||||
import io.common.utils.Result;
|
||||
@ -30,7 +29,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* 订单表
|
||||
*/
|
||||
|
@ -24,8 +24,6 @@ import io.swagger.v3.oas.annotations.Parameters;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* 轮播图
|
||||
*/
|
||||
|
@ -28,15 +28,12 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 用户管理
|
||||
*
|
||||
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sys/user")
|
||||
|
@ -1,6 +1,5 @@
|
||||
package io.modules.sys.controller;
|
||||
|
||||
|
||||
import io.common.annotation.LogOperation;
|
||||
import io.common.constant.Constant;
|
||||
import io.common.page.PageData;
|
||||
@ -24,13 +23,8 @@ import io.swagger.v3.oas.annotations.Parameters;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 吐槽墙
|
||||
*
|
||||
* @author Mark #
|
||||
* @since 1.0.0 2024-12-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("item/wall")
|
||||
@ -47,7 +41,6 @@ public class WallController {
|
||||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段", in = ParameterIn.QUERY, ref="String") ,
|
||||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)", in = ParameterIn.QUERY, ref="String")
|
||||
})
|
||||
@RequiresPermissions("item:wall:page")
|
||||
public Result<PageData<WallDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){
|
||||
PageData<WallDTO> page = wallService.page(params);
|
||||
|
||||
@ -55,8 +48,6 @@ public class WallController {
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
@RequiresPermissions("item:wall:info")
|
||||
public Result<WallDTO> get(@PathVariable("id") Long id){
|
||||
WallDTO data = wallService.get(id);
|
||||
|
||||
@ -65,40 +56,28 @@ public class WallController {
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
@LogOperation("保存")
|
||||
@RequiresPermissions("item:wall:save")
|
||||
public Result save(@RequestBody WallDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
|
||||
wallService.save(dto);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
@LogOperation("修改")
|
||||
@RequiresPermissions("item:wall:update")
|
||||
public Result update(@RequestBody WallDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
|
||||
wallService.update(dto);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
@LogOperation("删除")
|
||||
@RequiresPermissions("item:wall:delete")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
|
||||
wallService.delete(ids);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
|
@ -1,33 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--增、查交易记录的按钮-->
|
||||
<!-- <el-button type="primary" round @click="openAddDialog" size="small">添加</el-button>-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <el-form :inline="true" :model="state.query" class="demo-form-inline">-->
|
||||
<!-- <el-form-item label="电影名称:">-->
|
||||
<!-- <el-input v-model="state.query.title" placeholder="请输入电影名称" clearable @input="init" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!--表格-->
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table :data="state.getList">
|
||||
<!-- 列表结开始-->
|
||||
<el-table-column prop="item.id" label="编号" align="center" width="120px"/>
|
||||
<el-table-column prop="item.title" label="名称" align="center" width="120px"/>
|
||||
<el-table-column prop="userEntity.nickName" label="用户昵称" align="center" width="120px" />
|
||||
<el-table-column prop="itemDTO.largePic" label="图片" align="center" width="100" >
|
||||
<template #default="{ row }">
|
||||
<!-- 点击图片后显示弹框预览 -->
|
||||
<el-image
|
||||
:src="row.item.image"
|
||||
fit="cover"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="itemDTO.title" label="名称" align="center"/>
|
||||
<el-table-column prop="nickName" label="用户昵称" align="center" />
|
||||
<el-table-column prop="score" label="评分" align="center" />
|
||||
<el-table-column prop="content" label="评论内容" align="center">
|
||||
<template #default="scope">
|
||||
@ -35,7 +14,6 @@
|
||||
{{ scope.row.content }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<!--列表结束-->
|
||||
<el-table-column label="操作" align="center" width="120px">
|
||||
@ -65,7 +43,7 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
const state = reactive({
|
||||
route:"sys/order",
|
||||
route:"sys/comment",
|
||||
dialogVisible:false,
|
||||
getList: [],//获取数据
|
||||
query:{
|
||||
@ -137,8 +115,8 @@ onMounted(() => {
|
||||
}
|
||||
.avatar{
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
object-fit: cover;
|
||||
height: 178px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,68 +1,161 @@
|
||||
<template>
|
||||
<!--轮播图-->
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<div class="h-250px hot" >
|
||||
<el-space wrap>
|
||||
<div v-for="item in state.commit" :key="i" style="margin-top: 10px;">
|
||||
<el-button text style="width: 290px" @click="to(item.id)">{{item.title}} </el-button>
|
||||
<!-- 轮播图和热门推荐 -->
|
||||
<el-row :gutter="20" class="banner-section">
|
||||
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
||||
<div class="hot-recommend">
|
||||
<div class="section-header">
|
||||
<el-icon><StarFilled /></el-icon>
|
||||
<span>热门书评</span>
|
||||
</div>
|
||||
<div class="recommend-list">
|
||||
<div
|
||||
v-for="(item, index) in state.commit"
|
||||
:key="index"
|
||||
class="recommend-item"
|
||||
@click="to(item.id)"
|
||||
>
|
||||
<el-button text class="recommend-btn">
|
||||
<span class="item-index">{{ index + 1 }}.</span>
|
||||
<span class="item-title">{{ item.title }}</span>
|
||||
</el-button>
|
||||
</div>
|
||||
</el-space>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="h-300px">
|
||||
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
||||
<div class="carousel-container">
|
||||
<carousel></carousel>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 推荐商品列表-->
|
||||
<item :get-list=state.getList></item>
|
||||
|
||||
<!-- 推荐商品列表 -->
|
||||
<div class="recommend-section">
|
||||
<div class="section-header">
|
||||
<el-icon><GoodsFilled /></el-icon>
|
||||
<span>热门图书</span>
|
||||
</div>
|
||||
<item :get-list="state.getList"></item>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Carousel from '~/components/front/carousel.vue'
|
||||
import Item from '~/components/front/item.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { StarFilled, GoodsFilled } from '@element-plus/icons-vue'
|
||||
|
||||
const router = useRouter()
|
||||
const state = reactive({
|
||||
const state = reactive({
|
||||
getList: [],
|
||||
commit: [],
|
||||
})
|
||||
|
||||
// frontRequest.get("/api/user/userInfo").then(response =>{
|
||||
// user.frontUserInfo = response.data
|
||||
// })
|
||||
|
||||
onMounted(()=>{
|
||||
frontRequest.get("/api/item/score").then(res =>{
|
||||
onMounted(() => {
|
||||
frontRequest.get("/api/item/score").then(res => {
|
||||
state.getList = res.data
|
||||
})
|
||||
|
||||
frontRequest.get("/api/item/commit").then(res =>{
|
||||
frontRequest.get("/api/item/commit").then(res => {
|
||||
state.commit = res.data
|
||||
})
|
||||
})
|
||||
|
||||
/**
|
||||
* 跳转
|
||||
*/
|
||||
const to = (id:number) => {
|
||||
const to = (id: number) => {
|
||||
router.push(`/info/${id}`)
|
||||
}
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.hot {
|
||||
background-color: rgba(0, 0, 0, 0.2); /* 更浅的黑色 */
|
||||
border-radius: 10px; /* 四周圆弧,值可以根据需要调整 */
|
||||
<style scoped lang="scss">
|
||||
.banner-section {
|
||||
margin-bottom: 30px;
|
||||
|
||||
.hot-recommend {
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
height: 100%;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
transition: all 0.3s ease;
|
||||
/* 删除或注释掉 align-items: flex-end */
|
||||
/* align-items: flex-end; */
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.recommend-list {
|
||||
width: 100%;
|
||||
/* 改为左对齐 */
|
||||
text-align: left;
|
||||
.recommend-item {
|
||||
transition: all 0.2s;
|
||||
/* 改为左对齐 */
|
||||
justify-content: flex-start;
|
||||
&:hover {
|
||||
/* 悬停改为向右移动 */
|
||||
transform: translateX(5px);
|
||||
}
|
||||
.recommend-btn {
|
||||
/* 改为左对齐 */
|
||||
text-align: left;
|
||||
border-radius: 6px;
|
||||
padding: 8px 12px;
|
||||
/* 改为左对齐 */
|
||||
justify-content: flex-start;
|
||||
|
||||
.item-index {
|
||||
color: var(--el-color-primary);
|
||||
font-weight: bold;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
display: inline-block;
|
||||
max-width: calc(100% - 30px);
|
||||
white-space: nowrap;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
/* 改为左对齐 */
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.carousel-container {
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
:deep(.el-button){
|
||||
color: #2e191e;
|
||||
font-weight: 700;
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
/* 确保标题左对齐 */
|
||||
justify-content: flex-start;
|
||||
.el-icon {
|
||||
margin-right: 8px;
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
}
|
||||
:deep(.el-button:hover) {
|
||||
background-color: black;
|
||||
|
||||
.recommend-section {
|
||||
margin-top: 30px;
|
||||
background-color: #fff;
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
</style>
|
||||
<route lang="json">
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user