月木学途开发 5.轮播图模块

概述

效果图

 

数据库设计

轮播图表
DROP TABLE IF EXISTS `banner`;
CREATE TABLE `banner` (`bannerId` int(11) NOT NULL AUTO_INCREMENT,`bannerUrl` longtext,`bannerDesc` varchar(255) DEFAULT NULL,`bannerTypeId` int(11) DEFAULT NULL,PRIMARY KEY (`bannerId`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

轮播图类型表
DROP TABLE IF EXISTS `banner_type`;
CREATE TABLE `banner_type` (`bannerTypeId` int(11) NOT NULL AUTO_INCREMENT,`bannerTypeName` varchar(255) DEFAULT NULL,PRIMARY KEY (`bannerTypeId`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

实体类设计

轮播图
package jkw.pojo;import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;import java.io.Serializable;/*** 轮播图*/
@Data
public class Banner implements Serializable {@TableIdprivate Integer bannerId;private String bannerUrl;//图片private String bannerDesc;//描述private Integer bannerTypeId;//类型@TableField(exist = false)private BannerType bannerType;
}

轮播图类型
package jkw.pojo;import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;import java.io.Serializable;/*** 轮播图类型*/
@Data
public class BannerType implements Serializable {@TableIdprivate Integer bannerTypeId;private String bannerTypeName;//类型名
}

Mapper层开发

BannerTypeMapper
package jkw.mapper;import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jkw.pojo.BannerType;public interface BannerTypeMapper extends BaseMapper<BannerType> {
}

BannerMapper
package jkw.mapper;import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jkw.pojo.Banner;public interface BannerMapper extends BaseMapper<Banner> {
}

Service层开发

BannerTypeService
package jkw.service;import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jkw.pojo.BannerType;import java.util.List;public interface BannerTypeService {void add(BannerType BannerType);void update(BannerType BannerType);void delete(Integer id);BannerType findById(Integer id);List<BannerType> findAll();Page<BannerType> search(String search, int page, int size);
}

BannerTypeServiceImpl
package jkw.service.impl;import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jkw.mapper.BannerTypeMapper;
import jkw.pojo.BannerType;
import jkw.service.BannerTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;import java.util.List;@Service
@Transactional
public class BannerTypeServiceImpl implements BannerTypeService {@Autowiredprivate BannerTypeMapper bannerTypeMapper;@Overridepublic void add(BannerType BannerType) {bannerTypeMapper.insert(BannerType);}@Overridepublic void update(BannerType BannerType) {bannerTypeMapper.updateById(BannerType);}@Overridepublic void delete(Integer id) {bannerTypeMapper.deleteById(id);}@Overridepublic BannerType findById(Integer id) {return bannerTypeMapper.selectById(id);}@Overridepublic List<BannerType> findAll() {return bannerTypeMapper.selectList(null);}@Overridepublic Page<BannerType> search(String search, int page, int size) {QueryWrapper queryWrapper = new QueryWrapper();if (search != null) {}return bannerTypeMapper.selectPage(new Page<>(page, size), queryWrapper);}
}

BannerService
package jkw.service;import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jkw.pojo.Banner;import java.util.List;public interface BannerService {void add(Banner Banner);void update(Banner Banner);void delete(Integer id);Banner findById(Integer id);List<Banner> findAll();Page<Banner> search(String search, int page, int size);
}

BannerServiceImpl
package jkw.service.impl;import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jkw.mapper.BannerMapper;
import jkw.pojo.Banner;
import jkw.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;import java.util.List;@Service
@Transactional
public class BannerServiceImpl implements BannerService {@Autowiredprivate BannerMapper bannerMapper;@Overridepublic void add(Banner Banner) {bannerMapper.insert(Banner);}@Overridepublic void update(Banner Banner) {bannerMapper.updateById(Banner);}@Overridepublic void delete(Integer id) {bannerMapper.deleteById(id);}@Overridepublic Banner findById(Integer id) {return bannerMapper.selectById(id);}@Overridepublic List<Banner> findAll() {return bannerMapper.selectList(null);}@Overridepublic Page<Banner> search(String search, int page, int size) {QueryWrapper queryWrapper = new QueryWrapper();if (search != null) {}return bannerMapper.selectPage(new Page<>(page, size), queryWrapper);}
}

控制层开发

BannerTypeCon
package jkw.controller.back;import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jkw.pojo.BannerType;
import jkw.service.BannerTypeService;
import jkw.vo.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;import java.util.List;@CrossOrigin
@RestController
@RequestMapping("/back/bannerType")
public class BannerTypeCon {@Autowiredprivate BannerTypeService bannerTypeService;/*** 新增** @param bannerType* @return*/@PostMapping("/add")@PreAuthorize("hasAnyAuthority('/website/banner')")public BaseResult add(BannerType bannerType) {bannerTypeService.add(bannerType);return BaseResult.ok();}/*** 修改** @param bannerType* @return*/@PostMapping("/update")@PreAuthorize("hasAnyAuthority('/website/banner')")public BaseResult update(BannerType bannerType) {bannerTypeService.update(bannerType);return BaseResult.ok();}/*** 删除** @param bannerTypeId* @return*/@DeleteMapping("/delete")@PreAuthorize("hasAnyAuthority('/website/banner')")public BaseResult delete(Integer bannerTypeId) {bannerTypeService.delete(bannerTypeId);return BaseResult.ok();}/*** 根据id查询** @param bannerTypeId* @return*/@GetMapping("/findById")@PreAuthorize("hasAnyAuthority('/website/banner')")public BaseResult findById(Integer bannerTypeId) {BannerType bannerType = bannerTypeService.findById(bannerTypeId);return BaseResult.ok(bannerType);}/*** 查询所有** @return*/@GetMapping("/findAll")@PreAuthorize("hasAnyAuthority('/website/banner')")public BaseResult findAll() {List<BannerType> all = bannerTypeService.findAll();return BaseResult.ok(all);}/*** 分页查询** @param page* @param size* @return*/@GetMapping("/search")@PreAuthorize("hasAnyAuthority('/website/banner')")public BaseResult search(String search, int page, int size) {Page<BannerType> brandPage = bannerTypeService.search(search, page, size);return BaseResult.ok(brandPage);}
}

BannerCon
package jkw.controller.back;import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jkw.pojo.Banner;
import jkw.service.BannerService;
import jkw.vo.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;import java.util.List;@RequestMapping("/back/banner")
@CrossOrigin
@RestController
public class BannerCon {@Autowiredprivate BannerService bannerService;/*** 新增** @param banner* @return*/@PostMapping("/add")@PreAuthorize("hasAnyAuthority('/website/banner')")public BaseResult add(Banner banner) {bannerService.add(banner);return BaseResult.ok();}/*** 修改** @param banner* @return*/@PostMapping("/update")@PreAuthorize("hasAnyAuthority('/website/banner')")public BaseResult update(Banner banner) {bannerService.update(banner);return BaseResult.ok();}/*** 删除** @param bannerId* @return*/@DeleteMapping("/delete")@PreAuthorize("hasAnyAuthority('/website/banner')")public BaseResult delete(Integer bannerId) {bannerService.delete(bannerId);return BaseResult.ok();}/*** 根据id查询** @param bannerId* @return*/@GetMapping("/findById")@PreAuthorize("hasAnyAuthority('/website/banner')")public BaseResult findById(Integer bannerId) {Banner banner = bannerService.findById(bannerId);return BaseResult.ok(banner);}/*** 查询所有** @return*/@GetMapping("/findAll")@PreAuthorize("hasAnyAuthority('/website/banner')")public BaseResult findAll() {List<Banner> all = bannerService.findAll();return BaseResult.ok(all);}/*** 分页查询** @param page* @param size* @return*/@GetMapping("/search")@PreAuthorize("hasAnyAuthority('/website/banner')")public BaseResult search(String search, int page, int size) {Page<Banner> brandPage = bannerService.search(search, page, size);return BaseResult.ok(brandPage);}
}

后台ui设计

BannerType.vue
<template><div class="data-container"><!--添加 start--><div class="data-header"><el-input class="input" @keyup.enter="searchHandle" v-model="searchInfo" size="large"placeholder="请输入关键字"></el-input><el-button @click="searchHandle" class="button" size="large" type="primary" plain>搜索</el-button><el-button round @click="addHander" size="large" type="primary"><el-icon><DocumentAdd/></el-icon><span>新增</span></el-button></div><!--添加 end--><!--表格数据展示 start--><div class="data-table"><el-table :data="dataList.list" style="width: 550px;"><el-table-column show-overflow-tooltip label="类型名" prop="bannerTypeName" align="center" width="300"></el-table-column><el-table-column label="操作" align="center" width="220"><template #default="scope"><el-button size="small" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button><el-button size="small" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button></template></el-table-column></el-table><!--分页 start--><div class="page"><el-pagination backgroundlayout="prev,pager,next,jumper":default-page-size="defaultPageSize":total="totalData"@current-change="currentChangeHaddler"></el-pagination></div><!--分页 end--></div><!--表格数据展示 end--><!--添加对话框 start--><el-dialog draggable destroy-on-close v-model="dialogAddVisible" title="添加" width="35%" center><el-form inline :model="addFormInfo" label-width="150px"><el-form-item label="类型名"><el-input v-model="addFormInfo.bannerTypeName"></el-input></el-form-item></el-form><template #footer><span class="dialog-footer"><el-button @click="dialogAddVisible = false">取消</el-button><el-button type="primary" @click="sureHandler">确定</el-button></span></template></el-dialog><!--添加对话框 end--><!--编辑对话框 start--><!--destroy-on-close:每次关闭对话框时直接销毁对话框,没有缓存--><el-dialogdraggabledestroy-on-closev-model="dialogEditorVisible"title="编辑"width="35%"center><el-form inline :model="editorFormInfo" label-width="150px"><el-form-item label="类型名"><el-input v-model="editorFormInfo.bannerTypeName"></el-input></el-form-item></el-form><template #footer><span class="dialog-footer"><el-button @click="dialogEditorVisible = false">取消</el-button><el-button type="primary" @click="sureEditorHandler">确定</el-button></span></template></el-dialog><!--编辑对话框 end--></div>
</template><script setup>
import axios from "../../api/index.js"
import {onMounted, reactive, ref} from "vue";
import {ElMessage} from "element-plus";
//初始化分页查询数据
const dataList = reactive({list: []
})
//初始化总条数
const totalData = ref(0)
//当前页
const currentPage = ref(1)
//初始化分页显示条数
const defaultPageSize = ref(10)
//搜索初始化状态
const searchInfo = ref("")
//添加添加对话框控制器
const dialogAddVisible = ref(false)
//初始化添加对话框状态
const addFormInfo = reactive({bannerTypeName: "",
})
//编辑对话框控制器
const dialogEditorVisible = ref(false)
//初始化编辑对话框状态
const editorFormInfo = reactive({bannerTypeId: '',bannerTypeName: "",
})
/*** 网路请求:分页查询*  */
const http = (search, page, size) => {axios.banner_type_search({search: search,page: page,size: size}).then(res => {if (res.data.code == 200) {dataList.list = res.data.data.recordstotalData.value = res.data.data.total} else {ElMessage.error(res.data.message)}})
}
onMounted(() => {http(searchInfo.value, currentPage.value, defaultPageSize.value)
})
/*** 分页*/
const currentChangeHaddler = (nowPage) => {http(searchInfo.value, nowPage, defaultPageSize.value)currentPage.value = nowPage
}
/*** 搜索按钮*/
const searchHandle = () => {http(searchInfo.value, currentPage.value, defaultPageSize.value)
}
/*** 添加对话框弹出事件*/
const addHander = () => {dialogAddVisible.value = true
}
/*** 添加对话框 确定事件*/
const sureHandler = () => {axios.banner_type_add({bannerTypeName: addFormInfo.bannerTypeName,}).then(res => {if (res.data.code == 200) {dialogAddVisible.value = falsehttp(searchInfo.value, currentPage.value, defaultPageSize.value)} else {ElMessage.error(res.data.message)}})
}
/*** 编辑对话框 弹出事件*  */
const handleEdit = (index, row) => {dialogEditorVisible.value = trueaxios.banner_type_findById({bannerTypeId: row.bannerTypeId}).then(res => {if (res.data.code == 200) {editorFormInfo.bannerTypeId = res.data.data.bannerTypeId;editorFormInfo.bannerTypeName = res.data.data.bannerTypeName;} else {ElMessage.error(res.data.data.message)}})}
/*** 编辑对话框 确定事件*/
const sureEditorHandler = () => {axios.banner_type_update({bannerTypeId: editorFormInfo.bannerTypeId,bannerTypeName: editorFormInfo.bannerTypeName,}).then(res => {if (res.data.code == 200) {dialogEditorVisible.value = falsehttp(searchInfo.value, currentPage.value, defaultPageSize.value)} else {ElMessage.error(res.data.message)}})
}
/**删除 */
const handleDelete = (index, row) => {ElMessageBox.confirm('确定删除么','删除',{confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning',}).then(() => {//确认删除axios.banner_type_delete({bannerTypeId: row.bannerTypeId}).then(res => {if (res.data.code == 200) {ElMessage({type: 'success',message: "删除成功!!!",})//刷新http(searchInfo.value, currentPage.value, defaultPageSize.value)} else {ElMessage({type: 'error',message: res.data.message,})}})}).catch(error => {ElMessage({type: 'info',message: "取消删除",})})}
</script>
<style scoped>
.data-container {background: linear-gradient(left, rgb(89, 234, 233) 27%, rgb(131, 231, 218) 44%, rgb(69, 150, 216) 88%);background: -o-linear-gradient(left, rgb(89, 234, 233) 27%, rgb(131, 231, 218) 44%, rgb(69, 150, 216) 88%);background: -ms-linear-gradient(left, rgb(89, 234, 233) 27%, rgb(131, 231, 218) 44%, rgb(69, 150, 216) 88%);background: -moz-linear-gradient(left, rgb(89, 234, 233) 27%, rgb(131, 231, 218) 44%, rgb(69, 150, 216) 88%);background: -webkit-linear-gradient(left, rgb(89, 234, 233) 27%, rgb(131, 231, 218) 44%, rgb(69, 150, 216) 88%);height: 800px;
}.data-header {padding: 20px;
}.data-header .input {width: 300px;
}.data-table {padding: 20px;
}.page {position: fixed;right: 10px;bottom: 10px;
}
</style>

Banner.vue
<template><div class="data-container"><!--添加 start--><div class="data-header"><el-input class="input" @keyup.enter="searchHandle" v-model="searchInfo" size="large"placeholder="请输入关键字"></el-input><el-button @click="searchHandle" class="button" size="large" type="primary" plain>搜索</el-button><el-button round @click="addHander" size="large" type="primary"><el-icon><DocumentAdd/></el-icon><span>新增</span></el-button></div><!--添加 end--><!--表格数据展示 start--><div class="data-table"><el-table :data="dataList.list" style="width: 800px;"><el-table-column label="图片" prop="bannerUrl" align="center"><template #default="scope"><img :src="scope.row.bannerUrl" style="height:60px"/></template></el-table-column><el-table-column label="类型" prop="bannerTypeId" align="center"><template #default="scope"><span v-for="item in typeList.list" :key="item.bannerTypeId">{{ scope.row.bannerTypeId == item.bannerTypeId ? item.bannerTypeName : '' }}</span></template></el-table-column><el-table-column show-overflow-tooltip label="描述" prop="bannerDesc" align="center"></el-table-column><el-table-column label="操作" align="center" width="220"><template #default="scope"><el-button size="small" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button><el-button size="small" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button></template></el-table-column></el-table><!--分页 start--><div class="page"><el-pagination backgroundlayout="prev,pager,next,jumper":default-page-size="defaultPageSize":total="totalData"@current-change="currentChangeHaddler"></el-pagination></div><!--分页 end--></div><!--表格数据展示 end--><!--添加对话框 start--><el-dialog draggable destroy-on-close v-model="dialogAddVisible" title="添加" width="35%" center><el-form inline :model="addFormInfo" label-width="150px"><el-form-item label="图片"><el-upload list-type="picture-card":action="uploadStore.fastdfsUploadUrl":on-success="onHeadImageAddSuccess":on-remove="onHeadImageAddRemove"><el-icon></el-icon></el-upload></el-form-item><el-form-item label="类型"><el-select v-model="addFormInfo.bannerTypeId" placeholder="请选择类型" size="large"><el-option v-for="item in typeList.list" :key="item.bannerTypeId":label="item.bannerTypeName":value="item.bannerTypeId"></el-option></el-select></el-form-item><el-form-item label="描述"><el-input type="textarea" rows="6" style="width: 200px" v-model="addFormInfo.bannerDesc"></el-input></el-form-item></el-form><template #footer><span class="dialog-footer"><el-button @click="dialogAddVisible = false">取消</el-button><el-button type="primary" @click="sureHandler">确定</el-button></span></template></el-dialog><!--添加对话框 end--><!--编辑对话框 start--><!--destroy-on-close:每次关闭对话框时直接销毁对话框,没有缓存--><el-dialogdraggabledestroy-on-closev-model="dialogEditorVisible"title="编辑"width="35%"center><el-form inline :model="editorFormInfo" label-width="150px"><el-form-item label="头图"><el-upload list-type="picture-card":action="uploadStore.fastdfsUploadUrl":on-success="onHeadImageEditSuccess"><el-image :src="editorFormInfo.bannerUrl"/></el-upload></el-form-item><el-form-item label="类型"><el-select v-model="editorFormInfo.bannerTypeId" placeholder="请选择类型" size="large"><el-option v-for="item in typeList.list" :key="item.bannerTypeId":label="item.bannerTypeName":value="item.bannerTypeId"></el-option></el-select></el-form-item><el-form-item label="描述"><el-input type="textarea" rows="6" style="width: 200px" v-model="editorFormInfo.bannerDesc"></el-input></el-form-item></el-form><template #footer><span class="dialog-footer"><el-button @click="dialogEditorVisible = false">取消</el-button><el-button type="primary" @click="sureEditorHandler">确定</el-button></span></template></el-dialog><!--编辑对话框 end--></div>
</template><script setup>
import axios from "../../api/index.js"
import {onMounted, reactive, ref} from "vue";
import {ElMessage} from "element-plus";
import {useUploadStore} from "../../stores/uploadStore.js"const uploadStore = useUploadStore()
//初始化分页查询数据
const dataList = reactive({list: []
})
//初始化类型列表
const typeList = reactive({list: []
})
//初始化总条数
const totalData = ref(0)
//当前页
const currentPage = ref(1)
//初始化分页显示条数
const defaultPageSize = ref(10)
//搜索初始化状态
const searchInfo = ref("")
//添加添加对话框控制器
const dialogAddVisible = ref(false)
//初始化添加对话框状态
const addFormInfo = reactive({bannerUrl: "",bannerDesc: "",bannerTypeId: ''
})
//编辑对话框控制器
const dialogEditorVisible = ref(false)
//初始化编辑对话框状态
const editorFormInfo = reactive({bannerId: '',bannerUrl: "",bannerDesc: "",bannerTypeId: ''
})
/*** 网路请求:分页查询*  */
const http = (search, page, size) => {axios.banner_search({search: search,page: page,size: size}).then(res => {if (res.data.code == 200) {dataList.list = res.data.data.recordstotalData.value = res.data.data.total} else {ElMessage.error(res.data.message)}})
}
onMounted(() => {http(searchInfo.value, currentPage.value, defaultPageSize.value)axios.banner_type_findAll().then(res => {if (res.data.code == 200) {typeList.list = res.data.data}})
})
/*** 分页*/
const currentChangeHaddler = (nowPage) => {http(searchInfo.value, nowPage, defaultPageSize.value)currentPage.value = nowPage
}
/*** 搜索按钮*/
const searchHandle = () => {http(searchInfo.value, currentPage.value, defaultPageSize.value)
}
/*** 添加对话框弹出事件*/
const addHander = () => {dialogAddVisible.value = true
}
//上传成功的钩子
const onHeadImageAddSuccess = (response, uploadFile) => {addFormInfo.bannerUrl = response.dataElMessage.success("上传成功")
}
//移除图片的钩子
const onHeadImageAddRemove = (response, uploadFile) => {axios.fastdfs_delete({filePath: addFormInfo.bannerUrl}).then(res => {if (res.data.code == 200) {ElMessage.success("移除成功")}})
}
/*** 添加对话框 确定事件*/
const sureHandler = () => {axios.banner_add({bannerUrl: addFormInfo.bannerUrl,bannerDesc: addFormInfo.bannerDesc,bannerTypeId: addFormInfo.bannerTypeId,}).then(res => {if (res.data.code == 200) {dialogAddVisible.value = falsehttp(searchInfo.value, currentPage.value, defaultPageSize.value)} else {ElMessage.error(res.data.message)}})
}
/*** 编辑对话框 弹出事件*  */
const handleEdit = (index, row) => {dialogEditorVisible.value = trueaxios.banner_findById({bannerId: row.bannerId}).then(res => {if (res.data.code == 200) {editorFormInfo.bannerId = res.data.data.bannerId;editorFormInfo.bannerUrl = res.data.data.bannerUrl;editorFormInfo.bannerDesc = res.data.data.bannerDesc;editorFormInfo.bannerTypeId = res.data.data.bannerTypeId;} else {ElMessage.error(res.data.data.message)}})}
/*** 编辑对话框 头图修改时图片上传成功事件*///上传成功的钩子
const onHeadImageEditSuccess = (response, uploadFile) => {//删除以前图片axios.fastdfs_delete({filePath: editorFormInfo.bannerUrl}).then(res => {if (res.data.code == 200) {ElMessage.success("fastdfs移除原图片成功")}})//替换为现在的图片editorFormInfo.bannerUrl = response.dataElMessage.success("上传成功")}
/*** 编辑对话框 确定事件*/
const sureEditorHandler = () => {axios.banner_update({bannerId: editorFormInfo.bannerId,bannerUrl: editorFormInfo.bannerUrl,bannerDesc: editorFormInfo.bannerDesc,bannerTypeId: editorFormInfo.bannerTypeId,}).then(res => {if (res.data.code == 200) {dialogEditorVisible.value = falsehttp(searchInfo.value, currentPage.value, defaultPageSize.value)} else {ElMessage.error(res.data.message)}})
}
/**删除 */
const handleDelete = (index, row) => {ElMessageBox.confirm('确定删除么','删除',{confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning',}).then(() => {//确认删除axios.banner_delete({bannerId: row.bannerId}).then(res => {if (res.data.code == 200) {ElMessage({type: 'success',message: "删除成功!!!",})//刷新http(searchInfo.value, currentPage.value, defaultPageSize.value)} else {ElMessage({type: 'error',message: res.data.message,})}})}).catch(error => {ElMessage({type: 'info',message: "取消删除",})})}
</script>
<style scoped>
.data-container {background: linear-gradient(left, rgb(89, 234, 233) 27%, rgb(131, 231, 218) 44%, rgb(69, 150, 216) 88%);background: -o-linear-gradient(left, rgb(89, 234, 233) 27%, rgb(131, 231, 218) 44%, rgb(69, 150, 216) 88%);background: -ms-linear-gradient(left, rgb(89, 234, 233) 27%, rgb(131, 231, 218) 44%, rgb(69, 150, 216) 88%);background: -moz-linear-gradient(left, rgb(89, 234, 233) 27%, rgb(131, 231, 218) 44%, rgb(69, 150, 216) 88%);background: -webkit-linear-gradient(left, rgb(89, 234, 233) 27%, rgb(131, 231, 218) 44%, rgb(69, 150, 216) 88%);height: 800px;
}.data-header {padding: 20px;
}.data-header .input {width: 300px;
}.data-table {padding: 20px;
}.page {position: fixed;right: 10px;bottom: 10px;
}
</style>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/137962.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

一文看懂这些海外社媒平台属性,跨境外贸必看

随着社交媒体平台的普遍使用&#xff0c;在平台上营销品牌形象、投放广告已经成为销售转化的强大动力&#xff0c;我们普遍熟络的都是国内平台&#xff0c;那么对于跨境外贸的小伙伴来说&#xff0c;熟悉海外社媒平台更加重要&#xff01; 当然仅仅用一个社交媒体平台获得流量的…

【办公小神器】:快速批量转换Word、Excel、PPT为PDF脚本!

文章目录 ✨哔哩吧啦✨脚本使用教程✨温馨小提示设置&#x1f4da;资源领取 专栏Python零基础入门篇&#x1f525;Python网络蜘蛛&#x1f525;Python数据分析Django基础入门宝典&#x1f525;小玩意儿&#x1f525;Web前端学习tkinter学习笔记Excel自动化处理 ✨哔哩吧啦 前…

SpringBoot+MyBatisPlus+MySQL不能储存(保存)emoji表情问题解决

1.之前在学习过程中不知道utf8和utf8mb4的区别&#xff0c;也没过多去了解&#xff0c;直到最近设置的数据库编码全是utf8后发现问题所在了&#xff0c;居然不能储存表情包&#xff01;&#xff01;&#xff01;整个人直接傻了&#xff0c;后面知道了utf8是3字节不能储存表情&a…

计算机视觉与深度学习-全连接神经网络-训练过程-模型正则与超参数调优- [北邮鲁鹏]

目录标题 神经网络中的超参数学习率超参数优化方法网格搜索法随机搜索法 超参数搜索策略粗搜索精搜索 超参数的标尺空间 神经网络中的超参数 超参数 网络结构&#xff1a;隐层神经元个数&#xff0c;网络层数&#xff0c;非线性单元选择等优化相关&#xff1a;学习率、dorpou…

Kubernetes(k8s)上搭建一主两从的mysql8集群

Kubernetes上搭建一主两从的mysql8集群 环境准备搭建nfs服务器安装NFS暴露nfs目录开启nfs服务器 安装MySQL集群创建命名空间创建MySQL密码的Secret安装MySQL主节点创建pv和pvc主节点的配置文件部署mysql主节点 安装第一个MySQL Slave节点创建pv和pvc第一个从节点配置文件部署my…

高质量AI数据服务铺路架桥,云测数据引领行业大模型训练新范式

大模型发展风起云涌&#xff0c;使得AI应用又成为了市场热点。但这场创新运动和上一轮AI热潮的背景不同&#xff0c;如今行业不缺技术、也不乏商业模式健康的玩家&#xff0c;最稀缺的资源&#xff0c;已然变成了高质量数据。大模型的模型从何而来&#xff1f;本质上&#xff0…

计算机竞赛 深度学习+opencv+python实现昆虫识别 -图像识别 昆虫识别

文章目录 0 前言1 课题背景2 具体实现3 数据收集和处理3 卷积神经网络2.1卷积层2.2 池化层2.3 激活函数&#xff1a;2.4 全连接层2.5 使用tensorflow中keras模块实现卷积神经网络 4 MobileNetV2网络5 损失函数softmax 交叉熵5.1 softmax函数5.2 交叉熵损失函数 6 优化器SGD7 学…

iOS“超级签名”绕过App Store作弊解决方案

一直以来&#xff0c;iOS端游戏作弊问题都是游戏行业的一大痛点。在当下游戏多端互通的潮流下&#xff0c;游戏作为一个整体&#xff0c;无论哪一端出现安全问题&#xff0c;都会造成更加严重的影响。因此&#xff0c;iOS端游戏安全保护也同样十分重要。 iOS独特的闭源生态&am…

ATFX汇市:美联储宣布维持利率不变,鲍威尔继续发表鹰派言论

ATFX汇市&#xff1a;今日凌晨02:00&#xff0c;美联储公布9月利率决议结果&#xff0c;宣布维持5.25%5.5%的联邦基金利率区间不变。2:002:05&#xff0c;美元指数从最低104.75飙涨至最高105.21&#xff0c;对应EURUSD的汇率从最高1.0727下跌至最低1.0674&#xff0c;跌幅53基点…

基础组件(线程池、内存池、异步请求池、Mysql连接池)

文章目录 1、概述2、线程池2、异步请求池3、内存池 1、概述 池化技术&#xff0c;减少了资源创建次数&#xff0c;提高了程序响应性能&#xff0c;特别是在高并发场景下&#xff0c;当程序7*24小时运行&#xff0c;创建资源可能会出现耗时较长和失败等问题&#xff0c;池化技术…

小谈设计模式(5)—开放封闭原则

小谈设计模式&#xff08;5&#xff09;—开放封闭原则 专栏介绍专栏地址专栏介绍 开放封闭原则核心思想关键词概括扩展封闭 解释抽象和接口多态 代码示例代码解释 优缺点优点可扩展性可维护性可复用性高内聚低耦合 缺点抽象设计的复杂性需要预留扩展点可能引入过度设计 总结 专…

软件工程第一次作业参考答案

题目 名词解释&#xff1a;软件危机、软件、软件工程、软件生命周期、瀑布模型、原型模型、增量模型、喷泉模型、敏捷过程模型。 答案 软件危机&#xff1a;软件危机是指在软件开发过程中所面临的一系列问题和挑战&#xff0c;包括成本超支、进度延误、质量不达标等。 软件…

ubuntu 22.04 服务器网卡无IP地址

ssh连接服务器连接不上&#xff0c;提示如下&#xff1b; 连接显示器&#xff0c;ip addr ls 命令查看IP地址&#xff0c;有网卡但没有IP地址 solution&#xff1a; sudo dhclient enp10s0用于通过 DHCP 协议获取网络配置信息并为名为 enp10s0 的网络接口分配 IP 地址,enp1…

TiDB 7.1.0 LTS 特性解读丨关于资源管控 (Resource Control) 应该知道的 6 件事

TiDB 7.1.0 LTS 在前段时间发布&#xff0c;相信很多同学都已经抢先使用了起来&#xff0c;甚至都已然经过一系列验证推向了生产环境。面对 TiDB 7.1 若干重要特性&#xff0c;新 GA 的资源管控 (Resource Control) 是必须要充分理解、测试的一个重量级特性。对于常年奋斗在一线…

一个热爱自动驾驶但妥妥外行之人的思考-2023

时间节点为2023年9月&#xff0c;有效期当下及过往&#xff0c;不含未来。 这些年准确说从10年就很关注自动驾驶行业&#xff0c;包括物流/机器人/汽车等。 也和行业内&#xff0c;行业外的朋友做了大量的交流。点滴沟通放在如下链接中&#xff1a; 动态 - CSDN 一些过去的观…

新型智慧公厕“1+3+N”架构,平台、系统、应用的创新

近年来&#xff0c;随着人民生活水平的提高&#xff0c;人们对公共设施的要求也越来越高。其中&#xff0c;如厕问题一直是人们关注的焦点&#xff0c;但传统的公厕设施已经不能满足人们对干净、舒适、安全的需求&#xff0c;这促使了新型智慧公厕的诞生与应用&#xff0c;以如…

八月份跳槽了,历经华为测开岗4轮面试,不出意外,被刷了...

大多数情况下&#xff0c;测试员的个人技能成长速度&#xff0c;远远大于公司规模或业务的成长速度。所以&#xff0c;跳槽成为了这个行业里最常见的一个词汇。 前几天&#xff0c;我看到有朋友留言说&#xff0c;他在面试华为的测试开发工程师的时候&#xff0c;灵魂拷问三小…

c++ 纯虚函数、抽象类

一、 纯虚函数 抽象类 只要有一个纯虚函数&#xff0c;这个类称为抽象类 抽象类的特点 1、无法实例化 2、抽象类的子类&#xff0c;必须要重写父类中的纯虚函数&#xff0c;否者也属于抽象类 例子一 #include <iostream> #include <string.h> using namespa…

MySQL数据库详解 三:索引、事务和存储引擎

文章目录 1. 索引1.1 索引的概念1.2 索引的作用1.3 如何实现索引1.4 索引的缺点1.5 建立索引的原则依据1.6 索引的分类和创建1.6.1 普通索引1.6.2 唯一索引1.6.3 主键索引1.6.4 组合索引1.6.5 全文索引 1.7 查看索引1.8 删除索引 2. 事务2.1 事务的概念2.2 事务的ACID特性2.2.1…

单片机学习--->Keil多文件工程

1、在文件夹中创建新的文件夹 目录&#xff1a; App 文件夹&#xff1a;用于存放外设驱动文件&#xff0c;如 LED、数码管、定时器等。 Obj 文件夹&#xff1a;用于存放编译产生的 c/汇编/链接的列表清单、调试信息、 hex 文件、预览信息、封装库等文件。 Public 文件夹&#x…