当前位置: 首页 > news >正文

第九次作业

BookInfoMapper.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.rabbiter.bms.mapper.BookInfoMapper"><resultMap id="BaseResultMap" type="com.rabbiter.bms.model.BookInfo"><id column="bookId" jdbcType="INTEGER" property="bookid" /><result column="bookName" jdbcType="VARCHAR" property="bookname" /><result column="bookAuthor" jdbcType="VARCHAR" property="bookauthor" /><result column="bookPrice" jdbcType="DECIMAL" property="bookprice" /><result column="bookTypeId" jdbcType="INTEGER" property="booktypeid" /><result column="bookTypeName" jdbcType="INTEGER" property="booktypename" /><result column="bookDesc" jdbcType="VARCHAR" property="bookdesc" /><result column="isBorrowed" jdbcType="TINYINT" property="isborrowed" /><result column="bookImg" jdbcType="TINYINT" property="bookimg" /></resultMap><sql id="Base_Column_List">bookId, bookName, bookAuthor, bookPrice, bookTypeId, bookDesc, isBorrowed, bookImg</sql><select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from book_infowhere bookId = #{bookid,jdbcType=INTEGER}</select><delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">delete from book_infowhere bookId = #{bookid,jdbcType=INTEGER}</delete><insert id="insert" parameterType="com.rabbiter.bms.model.BookInfo">insert into book_info (bookId, bookName, bookAuthor, bookPrice, bookTypeId, bookDesc, isBorrowed, bookImg)values (#{bookid,jdbcType=INTEGER}, #{bookname,jdbcType=VARCHAR}, #{bookauthor,jdbcType=VARCHAR}, #{bookprice,jdbcType=DECIMAL}, #{booktypeid,jdbcType=INTEGER}, #{bookdesc,jdbcType=VARCHAR}, #{isborrowed,jdbcType=TINYINT}, #{bookimg,jdbcType=TINYINT})</insert><insert id="insertSelective" parameterType="com.rabbiter.bms.model.BookInfo">insert into book_info<trim prefix="(" suffix=")" suffixOverrides=","><if test="bookid != null">bookId,</if><if test="bookname != null">bookName,</if><if test="bookauthor != null">bookAuthor,</if><if test="bookprice != null">bookPrice,</if><if test="booktypeid != null">bookTypeId,</if><if test="bookdesc != null">bookDesc,</if><if test="isborrowed != null">isBorrowed,</if><if test="bookimg != null">bookImg,</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test="bookid != null">#{bookid,jdbcType=INTEGER},</if><if test="bookname != null">#{bookname,jdbcType=VARCHAR},</if><if test="bookauthor != null">#{bookauthor,jdbcType=VARCHAR},</if><if test="bookprice != null">#{bookprice,jdbcType=DECIMAL},</if><if test="booktypeid != null">#{booktypeid,jdbcType=INTEGER},</if><if test="bookdesc != null">#{bookdesc,jdbcType=VARCHAR},</if><if test="isborrowed != null">#{isborrowed,jdbcType=TINYINT},</if><if test="bookimg != null">#{bookimg,jdbcType=TINYINT},</if></trim></insert><update id="updateByPrimaryKeySelective" parameterType="com.rabbiter.bms.model.BookInfo">update book_info<set><if test="bookname != null">bookName = #{bookname,jdbcType=VARCHAR},</if><if test="bookauthor != null">bookAuthor = #{bookauthor,jdbcType=VARCHAR},</if><if test="bookprice != null">bookPrice = #{bookprice,jdbcType=DECIMAL},</if><if test="booktypeid != null">bookTypeId = #{booktypeid,jdbcType=INTEGER},</if><if test="bookdesc != null">bookDesc = #{bookdesc,jdbcType=VARCHAR},</if><if test="isborrowed != null">isBorrowed = #{isborrowed,jdbcType=TINYINT},</if><if test="bookimg != null">bookImg = #{bookimg,jdbcType=TINYINT},</if></set>where bookId = #{bookid,jdbcType=INTEGER}</update><update id="updateByPrimaryKey" parameterType="com.rabbiter.bms.model.BookInfo">update book_infoset bookName = #{bookname,jdbcType=VARCHAR},bookAuthor = #{bookauthor,jdbcType=VARCHAR},bookPrice = #{bookprice,jdbcType=DECIMAL},bookTypeId = #{booktypeid,jdbcType=INTEGER},bookDesc = #{bookdesc,jdbcType=VARCHAR},isBorrowed = #{isborrowed,jdbcType=TINYINT},bookImg = #{bookimg,jdbcType=TINYINT}where bookId = #{bookid,jdbcType=INTEGER}</update><select id="selectAllByLimit" resultMap="BaseResultMap">select bookId, bookName, bookAuthor,bookPrice, bookTypeId, bookDesc,isBorrowed, bookImg,(select bookTypeName from book_type where book_type.bookTypeId = book_info.bookTypeId) as bookTypeNamefrom book_infolimit #{begin}, #{size}</select><select id="selectCount" resultType="int">select count(*) from book_info</select><select id="selectCountBySearch" resultType="int">select count(*) from book_info<where><if test="bookname != null and bookname != '' ">and bookName like concat('%',#{bookname},'%')</if><if test="bookauthor != null and bookauthor != '' ">and bookAuthor like concat('%',#{bookauthor},'%')</if><if test="booktypeid != null and booktypeid != '' ">and bookTypeId = #{booktypeid}</if></where></select><select id="selectBySearch" resultMap="BaseResultMap">select bookId, bookName, bookAuthor,bookPrice, bookTypeId, bookDesc,isBorrowed, bookImg,(select bookTypeName from book_type where book_type.bookTypeId = book_info.bookTypeId) as bookTypeNamefrom book_info<where><if test="bookname != null and bookname != '' ">and bookName like concat('%',#{bookname},'%')</if><if test="bookauthor != null and bookauthor != '' ">and bookAuthor like concat('%',#{bookauthor},'%')</if><if test="booktypeid != null and booktypeid != '' ">and bookTypeId = #{booktypeid}</if></where>limit #{begin}, #{size}</select><select id="selectAll" resultMap="BaseResultMap">select bookId, bookName, bookAuthor,bookPrice, bookTypeId, bookDesc,isBorrowed, bookImg,(select bookTypeName from book_type where book_type.bookTypeId = book_info.bookTypeId) as bookTypeNamefrom book_info</select><select id="selectCountByType" resultType="int">select count(*) from book_info<where><if test="booktypeid != null and booktypeid != '' ">and bookTypeId = #{booktypeid}</if></where></select><select id="selectByType" resultMap="BaseResultMap">select bookId, bookName, bookAuthor,bookPrice, bookTypeId, bookDesc,isBorrowed, bookImg,(select bookTypeName from book_type where book_type.bookTypeId = book_info.bookTypeId) as bookTypeNamefrom book_info<where><if test="booktypeid != null and booktypeid != '' ">and bookTypeId = #{booktypeid}</if></where>limit #{begin}, #{size}</select>
</mapper>

BookTypeMapper.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.rabbiter.bms.mapper.BookTypeMapper"><resultMap id="BaseResultMap" type="com.rabbiter.bms.model.BookType"><id column="bookTypeId" jdbcType="INTEGER" property="booktypeid" /><result column="bookTypeName" jdbcType="VARCHAR" property="booktypename" /><result column="bookTypeDesc" jdbcType="VARCHAR" property="booktypedesc" /></resultMap><sql id="Base_Column_List">bookTypeId, bookTypeName, bookTypeDesc</sql><select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from book_typewhere bookTypeId = #{booktypeid,jdbcType=INTEGER}</select><delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">delete from book_typewhere bookTypeId = #{booktypeid,jdbcType=INTEGER}</delete><insert id="insert" parameterType="com.rabbiter.bms.model.BookType">insert into book_type (bookTypeId, bookTypeName, bookTypeDesc)values (#{booktypeid,jdbcType=INTEGER}, #{booktypename,jdbcType=VARCHAR}, #{booktypedesc,jdbcType=VARCHAR})</insert><insert id="insertSelective" parameterType="com.rabbiter.bms.model.BookType">insert into book_type<trim prefix="(" suffix=")" suffixOverrides=","><if test="booktypeid != null">bookTypeId,</if><if test="booktypename != null">bookTypeName,</if><if test="booktypedesc != null">bookTypeDesc,</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test="booktypeid != null">#{booktypeid,jdbcType=INTEGER},</if><if test="booktypename != null">#{booktypename,jdbcType=VARCHAR},</if><if test="booktypedesc != null">#{booktypedesc,jdbcType=VARCHAR},</if></trim></insert><update id="updateByPrimaryKeySelective" parameterType="com.rabbiter.bms.model.BookType">update book_type<set><if test="booktypename != null">bookTypeName = #{booktypename,jdbcType=VARCHAR},</if><if test="booktypedesc != null">bookTypeDesc = #{booktypedesc,jdbcType=VARCHAR},</if></set>where bookTypeId = #{booktypeid,jdbcType=INTEGER}</update><update id="updateByPrimaryKey" parameterType="com.rabbiter.bms.model.BookType">update book_typeset bookTypeName = #{booktypename,jdbcType=VARCHAR},bookTypeDesc = #{booktypedesc,jdbcType=VARCHAR}where bookTypeId = #{booktypeid,jdbcType=INTEGER}</update><select id="selectAllByLimit" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from book_typelimit #{begin}, #{size}</select><select id="selectCount" resultType="int">select count(*) from book_type</select><select id="selectAll" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from book_type</select><select id="selectCountBySearch" resultType="int">select count(*) from book_type<where><if test="booktypename != null and booktypename != '' ">and bookTypeName like concat('%',#{booktypename},'%')</if></where></select><select id="selectBySearch" resultMap="BaseResultMap">select bookTypeId, bookTypeName, bookTypeDescfrom book_type<where><if test="booktypename != null and booktypename != '' ">and bookTypeName like concat('%',#{booktypename},'%')</if></where>limit #{begin}, #{size}</select>
</mapper>

BorrowMapper.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.rabbiter.bms.mapper.BorrowMapper"><resultMap id="BaseResultMap" type="com.rabbiter.bms.model.Borrow"><id column="borrowId" jdbcType="INTEGER" property="borrowid" /><result column="userId" jdbcType="INTEGER" property="userid" /><result column="userName" jdbcType="INTEGER" property="username" /><result column="bookId" jdbcType="INTEGER" property="bookid" /><result column="bookName" jdbcType="INTEGER" property="bookname" /><result column="borrowTime" jdbcType="TIMESTAMP" property="borrowtime" /><result column="returnTime" jdbcType="TIMESTAMP" property="returntime" /></resultMap><sql id="Base_Column_List">borrowId, userId, bookId, borrowTime, returnTime</sql><select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from borrowwhere borrowId = #{borrowid,jdbcType=INTEGER}</select><delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">delete from borrowwhere borrowId = #{borrowid,jdbcType=INTEGER}</delete><insert id="insert" parameterType="com.rabbiter.bms.model.Borrow">insert into borrow (borrowId, userId, bookId, borrowTime, returnTime)values (#{borrowid,jdbcType=INTEGER}, #{userid,jdbcType=INTEGER}, #{bookid,jdbcType=INTEGER}, #{borrowtime,jdbcType=TIMESTAMP}, #{returntime,jdbcType=TIMESTAMP})</insert><insert id="insertSelective" parameterType="com.rabbiter.bms.model.Borrow">insert into borrow<trim prefix="(" suffix=")" suffixOverrides=","><if test="borrowid != null">borrowId,</if><if test="userid != null">userId,</if><if test="bookid != null">bookId,</if><if test="borrowtime != null">borrowTime,</if><if test="returntime != null">returnTime,</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test="borrowid != null">#{borrowid,jdbcType=INTEGER},</if><if test="userid != null">#{userid,jdbcType=INTEGER},</if><if test="bookid != null">#{bookid,jdbcType=INTEGER},</if><if test="borrowtime != null">#{borrowtime,jdbcType=TIMESTAMP},</if><if test="returntime != null">#{returntime,jdbcType=TIMESTAMP},</if></trim></insert><update id="updateByPrimaryKeySelective" parameterType="com.rabbiter.bms.model.Borrow">update borrow<set><if test="userid != null">userId = #{userid,jdbcType=INTEGER},</if><if test="bookid != null">bookId = #{bookid,jdbcType=INTEGER},</if><if test="borrowtime != null">borrowTime = #{borrowtime,jdbcType=TIMESTAMP},</if><if test="returntime != null">returnTime = #{returntime,jdbcType=TIMESTAMP},</if></set>where borrowId = #{borrowid,jdbcType=INTEGER}</update><update id="updateByPrimaryKey" parameterType="com.rabbiter.bms.model.Borrow">update borrowset userId = #{userid,jdbcType=INTEGER},bookId = #{bookid,jdbcType=INTEGER},borrowTime = #{borrowtime,jdbcType=TIMESTAMP},returnTime = #{returntime,jdbcType=TIMESTAMP}where borrowId = #{borrowid,jdbcType=INTEGER}</update><select id="selectAllByLimit" resultMap="BaseResultMap">select borrowId, userId, bookId, borrowTime, returnTime,(select userName from user where borrow.userId = user.userId) userName,(select bookName from book_info where borrow.bookId = book_info.bookId) bookNamefrom borrowlimit #{begin}, #{size}</select><select id="selectCount" resultType="int">select count(*) from borrow</select><select id="selectCountBySearch" resultType="int">select count(*)from borrow, user, book_infowhere borrow.userId = user.userId and borrow.bookId = book_info.bookId<if test="bookId != null and bookId != '' ">and borrow.bookId like concat('%',#{bookId},'%')</if><if test="username != null and username != '' ">and userName like concat('%',#{username},'%')</if><if test="bookname != null and bookname != '' ">and bookName like concat('%',#{bookname},'%')</if><if test="userid != null and userid != '' ">and borrow.userId = #{userid}</if></select><select id="selectBySearch" resultMap="BaseResultMap">select borrowId, borrow.userId, borrow.bookId, borrowTime, returnTime, userName, bookNamefrom borrow, user, book_infowhere borrow.userId = user.userId and borrow.bookId = book_info.bookId<if test="username != null and username != '' ">and userName like concat('%',#{username},'%')</if><if test="bookname != null and bookname != '' ">and bookName like concat('%',#{bookname},'%')</if><if test="userid != null and userid != '' ">and borrow.userId = #{userid}</if>limit #{begin}, #{size}</select><select id="selectCountByReader" resultType="int">select count(*) from borrowwhere userId = #{userid}</select><select id="selectAllByLimitByReader" resultMap="BaseResultMap">select borrowId, userId, bookId, borrowTime, returnTime,(select userName from user where borrow.userId = user.userId) userName,(select bookName from book_info where borrow.bookId = book_info.bookId) bookNamefrom borrowwhere userId = #{userid}limit #{begin}, #{size}</select>
</mapper>

UserMapper.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.rabbiter.bms.mapper.UserMapper"><resultMap id="BaseResultMap" type="com.rabbiter.bms.model.User"><id column="userId" jdbcType="INTEGER" property="userid" /><result column="userName" jdbcType="VARCHAR" property="username" /><result column="userPassword" jdbcType="VARCHAR" property="userpassword" /><result column="isAdmin" jdbcType="TINYINT" property="isadmin" /></resultMap><sql id="Base_Column_List">userId, userName, userPassword, isAdmin</sql><select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from userwhere userId = #{userid,jdbcType=INTEGER}</select><delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">delete from userwhere userId = #{userid,jdbcType=INTEGER}</delete><insert id="insert" parameterType="com.rabbiter.bms.model.User">insert into user (userId, userName, userPassword, isAdmin)values (#{userid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{userpassword,jdbcType=VARCHAR}, #{isadmin,jdbcType=TINYINT})</insert><insert id="insertSelective" parameterType="com.rabbiter.bms.model.User">insert into user<trim prefix="(" suffix=")" suffixOverrides=","><if test="userid != null">userId,</if><if test="username != null">userName,</if><if test="userpassword != null">userPassword,</if><if test="isadmin != null">isAdmin,</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test="userid != null">#{userid,jdbcType=INTEGER},</if><if test="username != null">#{username,jdbcType=VARCHAR},</if><if test="userpassword != null">#{userpassword,jdbcType=VARCHAR},</if><if test="isadmin != null">#{isadmin,jdbcType=TINYINT},</if></trim></insert><update id="updateByPrimaryKeySelective" parameterType="com.rabbiter.bms.model.User">update user<set><if test="username != null">userName = #{username,jdbcType=VARCHAR},</if><if test="userpassword != null">userPassword = #{userpassword,jdbcType=VARCHAR},</if><if test="isadmin != null">isAdmin = #{isadmin,jdbcType=TINYINT},</if></set>where userId = #{userid,jdbcType=INTEGER}</update><update id="updateByPrimaryKey" parameterType="com.rabbiter.bms.model.User">update userset userName = #{username,jdbcType=VARCHAR},userPassword = #{userpassword,jdbcType=VARCHAR},isAdmin = #{isadmin,jdbcType=TINYINT}where userId = #{userid,jdbcType=INTEGER}</update><select id="selectByUsernameAndPasswordAndIsAdmin" resultMap="BaseResultMap">select<include refid="Base_Column_List" />from userwhere userName = #{username}and userPassword = #{password}and isAdmin = #{isAdmin}limit 1</select><select id="selectByUsername" resultMap="BaseResultMap">select<include refid="Base_Column_List" />from userwhere userName = #{username}limit 1</select><select id="selectAllByLimit" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from userlimit #{begin}, #{size}</select><select id="selectCount" resultType="int">select count(*) from user</select><select id="selectAll" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from user</select><select id="selectCountBySearch" resultType="int">select count(*) from user<where><if test="username != null and username != '' ">and userName like concat('%',#{username},'%')</if></where></select><select id="selectBySearch" resultMap="BaseResultMap">select userId, userName, userPassword, isAdminfrom user<where><if test="username != null and username != '' ">and userName like concat('%',#{username},'%')</if></where>limit #{begin}, #{size}</select>
</mapper>

创建Git仓库

相关文章:

第九次作业

BookInfoMapper.xml <?xml version"1.0" encoding"UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace"com.rabbite…...

A股探底回升,跑出惊天大阳,你们知道为什么吗?

今天的A股&#xff0c;探底回升&#xff0c;让人惊呆了&#xff0c;你们知道是为什么吗&#xff1f;盘面上出现3个重要信号&#xff0c;一起来看看&#xff1a; 1、今天A股市场炸锅了&#xff0c;AI人工智能、国产软件、存储芯片迎来了涨停潮&#xff0c;惊呆了&#xff0c;科技…...

jenkins nginx自动化部署 php项目

在当今快速发展的IT领域&#xff0c;自动化部署已成为提高工作效率和减少错误的关键。Jenkins作为持续集成/持续部署&#xff08;CI/CD&#xff09;的佼佼者&#xff0c;结合Docker容器技术和PHP编程语言&#xff0c;以及Ansible自动化工具&#xff0c;可以实现高效、可靠的自动…...

海外代理IP哪个可靠?如何测试代理的稳定性?

在数字化时代&#xff0c;互联网已成为我们日常生活的重要组成部分。然而&#xff0c;随着网络活动的增加&#xff0c;我们面临的安全威胁也随之增加。 黑客攻击、数据泄露、网络钓鱼等安全事件频发&#xff0c;严重威胁着我们的个人隐私和网络安全。代理服务器在当今的互联网世…...

MySQL之可扩展性(四)

可扩展性 向外扩展 分片?还是不分片&#xff1f; 这是一个问题&#xff0c;对吧&#xff1f;答案很简单:如非必要&#xff0c;尽量不分片。首先看是否能通过性能调优或者更好的应用或数据库设计来推迟分片。如果能足够长时间地推迟分片&#xff0c;也许可以直接购买更大地服…...

JupyterLab使用指南(三):JupyterLab的Cell详细介绍

JupyterLab Cell 使用教程 JupyterLab 的 cell 是一种强大的工具&#xff0c;提供了编写、执行、展示和记录的全方位支持&#xff0c;使得复杂的计算任务变得简单直观。通过熟练掌握 cell 的各种操作和快捷键&#xff0c;用户可以显著提高工作效率&#xff0c;专注于解决实际问…...

solidity智能合约如何实现跨合约调用函数

背景 比如现在有一个需求、我需要通过外部合约获取BRC20 token的总交易量。那么我需要在brc20的转账函数里面做一些调整&#xff0c;主要是两个函数内统计转移量。然后再提供外部获取函数。 /*** dev Sets amount as the allowance of spender over the callers tokens.** Ret…...

关于Vue2的生命周期会问到哪些面试题?

在Vue2的面试中&#xff0c;关于生命周期的问题通常会涉及以下几个方面&#xff1a; 一、Vue2的生命周期概述 Vue2的生命周期是什么&#xff1f; Vue2的生命周期是指从Vue实例的创建、初始化数据、编译模板、挂载Dom、渲染、更新、卸载等一系列过程。 二、生命周期钩子函数 …...

尚品汇-(七)

&#xff08;1&#xff09;在网关中实现跨域 全局配置类实现 包名&#xff1a;com.atguigu.gmall.gateway.config 创建CorsConfig类 Configuration public class CorsConfig {Beanpublic CorsWebFilter corsWebFilter(){// cors跨域配置对象CorsConfiguration configuration…...

【Python datetime模块精讲】:时间旅行者的日志,精准操控日期与时间

文章目录 前言一、datetime模块简介二、常用类和方法三、date类四、time类五、datetime类六、timedelta类七、常用的函数和属性八、代码及其演示 前言 Python的datetime模块提供了日期和时间的类&#xff0c;用于处理日期和时间的算术运算。这个模块包括date、time、datetime和…...

keepalived 服务高可用(简约版)

本文基于centos 7记述如何使用keepalived 背景 为生产环境准备一台备机是极其必要的&#xff0c;防止主机宕掉无服务可用的情况出现。但是同一局域网内每台主机都分配了一个唯一IP&#xff0c;这些IP既然相互不同&#xff0c;那么服务请求的时候岂不是要切换IP地址&#xff1f…...

【前端】Vue项目和微信小程序生成二维码和条形码

前言&#xff1a;哈喽&#xff0c;大家好&#xff0c;我是前端菜鸟的自我修养&#xff01;今天给大家分享Vue项目和微信小程序如何生成二维码和条形码&#xff0c;介绍了JsBarcode、wxbarcode等插件&#xff0c;并提供具体代码帮助大家深入理解&#xff0c;彻底掌握&#xff01…...

同时使用接口文档swagger和knife4j

项目场景&#xff1a; springboot项目中同时使用接口文档swagger和knife4j 问题描述 在实体类中设置了字段必填的属性&#xff0c;在访问接口文档时出现异常 实体类关键代码片段 /*** 部门表 sys_dept*/ public class SysDept extends BaseEntity {private static final lo…...

Compose - 权限申请

官方介绍 一、概念 二、使用 Accompanist Permissions 官方介绍 不同版本中&#xff0c;权限状态&#xff08;如PermissionState&#xff09;中获取属性的方法不同&#xff0c;例如在“0.23.1”中&#xff0c;通过 PermissionState.hasPermission 属性拿到是否通过的 Boole…...

第十九条:要么为继承而设计并提供文档说明,要么就禁止继承

在前面一条中&#xff0c;我们已经知道了David写了A类被Tom拿去继承了&#xff0c;导致了A类的封装性遭到了破坏&#xff0c;那么有没有可能做点事情避免此事发生呢&#xff1f;第十九条孕育而生&#xff01;David在创建A类的时候写上文档说明&#xff0c;说Al类不允许任何类来…...

Node.js全栈指南:浏览器显示一个网页

上一章&#xff0c;我们了解到&#xff0c;如何通过第二章的极简 Web 的例子来演示如何查看官方文档。为什么要把查阅官方文档放在前面的章节说明呢&#xff1f;因为查看文档是一个很重要的能力&#xff0c;就跟查字典一样。 回想一下&#xff0c;我们读小学&#xff0c;初中的…...

Linux远程桌面(Ubuntu/Deepin)——安装和使用 VNC 及通过 noVNC 实现浏览器实现远程桌面访问教程

在 Linux 上安装和使用 VNC 及通过 noVNC 实现浏览器远程访问教程 Windows上通常会自带xrdp远程桌面&#xff0c;但是当我们使用 Deepin 或 Ubuntu 系统作为开发机器且需要图形化界面的时候&#xff0c;就需要安装和配置 VNC&#xff08;Virtual Network Computing&#xff09…...

2024年最新通信安全员考试题库

61.架设架空光缆&#xff0c;可使用吊板作业的情况是&#xff08;&#xff09;。 A.在2.2/7规格的电杆与墙壁之间的吊线上&#xff0c;吊线高度5m B.在2.2/7规格的墙壁与墙壁之间的吊线上&#xff0c;吊线高度6m C.在2.2/7规格的电杆与电杆之间的吊线上&#xff0c;吊线高度…...

SpringMVC系列八: 手动实现SpringMVC底层机制-下

手动实现SpringMVC底层机制-下 实现任务阶段五&#x1f34d;完成Spring容器对象的自动装配-Autowired 实现任务阶段六&#x1f34d;完成控制器方法获取参数-RequestParam1.&#x1f966;将 方法的 HttpServletRequest 和 HttpServletResponse 参数封装到数组, 进行反射调用2.&a…...

【昇思初学入门】第八天打卡-模型保存与加载

模型保存与加载 学习心得 保存 CheckPoint 格式文件&#xff0c;在模型训练过程中&#xff0c;可以添加检查点(CheckPoint)用于保存模型的参数&#xff0c;以便进行推理及再训练使用。如果想继续在不同硬件平台上做推理&#xff0c;可通过网络和CheckPoint格式文件生成对应的…...

Chapter03-Authentication vulnerabilities

文章目录 1. 身份验证简介1.1 What is authentication1.2 difference between authentication and authorization1.3 身份验证机制失效的原因1.4 身份验证机制失效的影响 2. 基于登录功能的漏洞2.1 密码爆破2.2 用户名枚举2.3 有缺陷的暴力破解防护2.3.1 如果用户登录尝试失败次…...

HTML 语义化

目录 HTML 语义化HTML5 新特性HTML 语义化的好处语义化标签的使用场景最佳实践 HTML 语义化 HTML5 新特性 标准答案&#xff1a; 语义化标签&#xff1a; <header>&#xff1a;页头<nav>&#xff1a;导航<main>&#xff1a;主要内容<article>&#x…...

转转集团旗下首家二手多品类循环仓店“超级转转”开业

6月9日&#xff0c;国内领先的循环经济企业转转集团旗下首家二手多品类循环仓店“超级转转”正式开业。 转转集团创始人兼CEO黄炜、转转循环时尚发起人朱珠、转转集团COO兼红布林CEO胡伟琨、王府井集团副总裁祝捷等出席了开业剪彩仪式。 据「TMT星球」了解&#xff0c;“超级…...

高效线程安全的单例模式:Python 中的懒加载与自定义初始化参数

高效线程安全的单例模式:Python 中的懒加载与自定义初始化参数 在软件开发中,单例模式(Singleton Pattern)是一种常见的设计模式,确保一个类仅有一个实例,并提供一个全局访问点。在多线程环境下,实现单例模式时需要注意线程安全问题,以防止多个线程同时创建实例,导致…...

Java + Spring Boot + Mybatis 实现批量插入

在 Java 中使用 Spring Boot 和 MyBatis 实现批量插入可以通过以下步骤完成。这里提供两种常用方法&#xff1a;使用 MyBatis 的 <foreach> 标签和批处理模式&#xff08;ExecutorType.BATCH&#xff09;。 方法一&#xff1a;使用 XML 的 <foreach> 标签&#xff…...

Golang——9、反射和文件操作

反射和文件操作 1、反射1.1、reflect.TypeOf()获取任意值的类型对象1.2、reflect.ValueOf()1.3、结构体反射 2、文件操作2.1、os.Open()打开文件2.2、方式一&#xff1a;使用Read()读取文件2.3、方式二&#xff1a;bufio读取文件2.4、方式三&#xff1a;os.ReadFile读取2.5、写…...

数学建模-滑翔伞伞翼面积的设计,运动状态计算和优化 !

我们考虑滑翔伞的伞翼面积设计问题以及运动状态描述。滑翔伞的性能主要取决于伞翼面积、气动特性以及飞行员的重量。我们的目标是建立数学模型来描述滑翔伞的运动状态,并优化伞翼面积的设计。 一、问题分析 滑翔伞在飞行过程中受到重力、升力和阻力的作用。升力和阻力与伞翼面…...

Vue3中的computer和watch

computed的写法 在页面中 <div>{{ calcNumber }}</div>script中 写法1 常用 import { computed, ref } from vue; let price ref(100);const priceAdd () > { //函数方法 price 1price.value ; }//计算属性 let calcNumber computed(() > {return ${p…...

2.3 物理层设备

在这个视频中&#xff0c;我们要学习工作在物理层的两种网络设备&#xff0c;分别是中继器和集线器。首先来看中继器。在计算机网络中两个节点之间&#xff0c;需要通过物理传输媒体或者说物理传输介质进行连接。像同轴电缆、双绞线就是典型的传输介质&#xff0c;假设A节点要给…...

深入浅出WebGL:在浏览器中解锁3D世界的魔法钥匙

WebGL&#xff1a;在浏览器中解锁3D世界的魔法钥匙 引言&#xff1a;网页的边界正在消失 在数字化浪潮的推动下&#xff0c;网页早已不再是静态信息的展示窗口。如今&#xff0c;我们可以在浏览器中体验逼真的3D游戏、交互式数据可视化、虚拟实验室&#xff0c;甚至沉浸式的V…...