提交 2af2a8bc 编写于 作者: whatyn's avatar whatyn

fix

上级 c57227e7
......@@ -72,7 +72,7 @@ Map<String, List<DeliveryGoodsDO>> deliveryGoodsMap = deliveryGoodsDOS.stream().
Map<String, DeliveryDO> deliveryOrderMap = deliveryDOS.stream().collect(Collectors.toMap(DeliveryDO::getDeliveryOrder, a -> a));
// list转map-值为单个对象 (如有重复,用第一个)
Map<String, DeliveryDO> deliveryOrderMap = deliveryDOS.stream().collect(Collectors.toMap(DeliveryDO::getDeliveryOrder, a-> a,(k1,k2)->k2));
Map<String, DeliveryDO> deliveryOrderMap = deliveryDOS.stream().collect(Collectors.toMap(DeliveryDO::getDeliveryOrder, a-> a,(k1,k2)->k1));
// list转map-值为对象的字段
......@@ -492,14 +492,14 @@ syso+Alt+/ 输出
### 3.1、jdk java软件
| 软件 | 下载地址 |
| -------- | ----- |
| 软件 | 下载地址 |
| -------- | -------- |
| idea | [idea官方下载]( https://www.jetbrains.com/idea/download/other.html ) &ensp; [idea2019]( https://www.aliyundrive.com/s/oWgxBBNqGj9 ) |
| maven | [maven官方下载]( https://archive.apache.org/dist/maven/maven-3/ ) |
| mysql | [mysql_5.7]( https://www.aliyundrive.com/s/pymjQca3DbY ) |
| javaSoft | [java软件]( https://www.aliyundrive.com/s/fWXemUwcsUs ) redis/mongo/Navicat/kafka/zookeeper/git/Xshell... |
| tomcat | [tomcat官网]( https://archive.apache.org/dist/tomcat/ ) &ensp; ([云盘]( https://pan.baidu.com/s/1yPhAfIcACTGkpIOYlEds1g ) 密码: j9ug ) |
| eclipse | [eclipse官方下载]( http://www.eclipse.org/downloads/packages ) [版本说明]( ./eclipse.md ) |
| eclipse | [eclipse官方下载]( http://www.eclipse.org/downloads/packages ) |
---
......
......@@ -6,7 +6,8 @@
<br />
## 1.配置文件
## 1 配置文件
```xml
新建java project 导入jar 写配置文件
......@@ -160,7 +161,7 @@ PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
</configuration>
```
## 2.SqlSession
## 2 SqlSession
```
SqlSession
......@@ -306,7 +307,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</mapper>
```
## 3.一对多查询
## 3 一对多查询
```xml
<!-- user-orders 一对一查询,association -->
......@@ -367,7 +368,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
```
## 4.缓存
## 4 缓存
```
<!-- 延迟加载 -->
......
......@@ -600,7 +600,7 @@ select id,group_concat(name order by name desc) from aa group by id;
```
### 2.4、left join左右连接
### 2.4、left join左右内外连接
```sql
sqlleft joinright joininner join的区别
......@@ -696,11 +696,11 @@ compopr参数指定关系比较运算符:"=", "<", ">", "<=", ">=" 或
```
### 2.5、Case when 的使用方法
### 2.5、case when 的使用方法
```java
Case when 的使用方法
case when 的使用方法
https://www.cnblogs.com/yazdao/archive/2009/12/09/1620482.html
Case具有两种格式简单Case函数和Case搜索函数
......@@ -831,7 +831,22 @@ CONSTRAINT check_salary CHECK
```
### 2.6、复制表结构、表数据
```sql
-- case when更新
update ins_xsf_purchase_detail set
purchase_gross_weight = CASE
WHEN product_id = 1 THEN 99
WHEN product_id = 2 THEN 1
ELSE 0 end,
gross_price = CASE
WHEN product_id = 2 THEN 900
WHEN product_id = 2 THEN 1
ELSE 0 end,gross_weight_source=2
where purchase_order='HZCCG20220906618201';
```
### 2.6、复制表结构表数据
```java
......@@ -951,8 +966,8 @@ mysql> exit;
### 3.5、文档
- [数据库隔离级别]( https://blog.xushufa.cn )
- [数据库隔离级别]( https://blog.xushufa.cn/%E7%BC%96%E7%A8%8B/%E6%95%B0%E6%8D%AE%E5%BA%93/%E6%95%B0%E6%8D%AE%E5%BA%93%E9%9A%94%E7%A6%BB%E7%BA%A7%E5%88%AB.html )
- [mysql开启log-bin日志]( https://web.xushufa.cn )
- [mysql开启log-bin日志]( https://web.xushufa.cn/docs/bian-cheng/shu-ju-ku/mysqlkai-qi-log-binri-zhi.html )
......@@ -101,6 +101,9 @@ set global log_output = "table";
查看sql
select * from mysql.general_log where argument like '%select%' ORDER BY event_time DESC limit 100;
清除日志
TRUNCATE table mysql.general_log
```
![g]( https://gitcode.net/xu180/imgs/-/raw/master/other/mysql.general_log.jpg )
......
......@@ -36,6 +36,17 @@
```
| | 脏读 | 不可重复读 | 幻读 |
|-----------------------------|-------------|-------------|-------------|
| 读未提交 read-uncommitted | √ | √ | √ |
| 读已提交 read-committed | × | √ | √ |
| 可重复读 repeatable-read | × | × | √ |
| 串行化 serializable | × | × | × |
## 第1级别:Read Uncommitted
```js
......
......@@ -25,7 +25,26 @@ markdown导出pdf期望达到理想效果:
使用了`Typora``作业部落``小书匠``马克飞象``浏览器打印``pandoc``xelatex``wkhtmltopdf``vscode``MarkText`等等许多方法将markdown导出pdf。有的收费,有的加水印,有的丢文字,有的丢图片,最后发现:
- 操作markdown文件,使用`Typora`最方便。
- 若markdown导出pdf,`MarkText`搭配`PDFPatcher`最优秀。
- 导出markdown为pdf,`MarkText`搭配`PDFPatcher`最优秀。
---
### 1.3 相关
markdown相关操作,格式转换与项目布署。
> html转markdown文件
- pandoc 转化 `pandoc -f html -t markdown -o 202010.md 202110.html`
- turndown `Convert HTML into Markdown with JavaScript.` https://mixmark-io.github.io/turndown/
> markdown文件部署项目
- gitlab、github、gitee布署`mkdocs`主题仓库
- git平台`docsify`布署markdown文件
- `vuepress`构建项目 https://blog.xushufa.cn
- `gitbook`部署博客 https://scott180.github.io/gitbook-blog
......@@ -159,8 +178,17 @@ MarkText是一个简单开源的 Markdown 编辑器。 https://github.com/markte
| MarkText | √ | √ | √ | ○ | √ | ★★★★☆ |
| 网址 | 官网 | 下载 |
| ---------- | ---------- | ---------- |
| Typora | https://typora.io/ | https://typoraio.cn/ |
| marktext | https://marktext.app/ | https://github.com/marktext/marktext |
| PDFPatcher | https://www.cnblogs.com/pdfpatcher/ | https://github.com/wmjordan/PDFPatcher |
综上,`MarkText`四星半夺得魁首,`Typora`屈居亚席。总之: <br/>
操作markdown文件,使用`Typora`最方便。 <br/>
若markdown导出pdf,`MarkText`搭配`PDFPatcher`最优秀。 <br/>
导出markdown为pdf,`MarkText`搭配`PDFPatcher`最优秀。 <br/>
......
# 系统磁盘c盘清理垃圾文件方法一览
## 1、工具清理
使用火绒安全、腾讯电脑管家或者360的垃圾清理。<br>
此方法效果还行,根据工具能力能清理掉几个G的垃圾文件。<br>
## 2、磁盘清理
右击C盘,选择【属性】--【常规】--【磁盘清理】。稍等片刻,选择要删除的文件,确定。<br>
![c1]( https://gitcode.net/xu180/document/-/raw/master/imgs/pagefile/c1.jpg )
## 3、手动删除
推荐使用`Folder Size`工具,扫描磁盘,查看所有文件夹大小,自主判断垃圾文件,手动删除。<br>
![c2]( https://gitcode.net/xu180/document/-/raw/master/imgs/pagefile/c2.jpg )
---
另:临时文件和日志文件可以直接删除 <br>
删除临时文件夹内的所有文件 <br>
`C:\Windows\Temp` <br>
删除日志文件夹LogFiles <br>
`C:\Windows\System32\LogFiles` <br>
## 4、清理受保护的操作系统文件
- [ ] 打开计算机或此电脑,点击【文件夹选项】--【查看】--【高级设置】,不勾选【隐藏受保护的操作系统文件(推荐)】。
- [ ] 清理 System Volume Information
- SystemVolumeInformation文件夹是一个隐藏的系统文件夹,"系统还原"工具使用该文件夹来存储它的信息和还原点。<br>
- System Volume Information怎么删除 参考 http://www.win7zhijia.cn/win10jc/win10_46768.html <br>
- 1.点击控制面板,搜索【创建还原点】。<br>
- 2.之后点击系统保护设置,选择你想删除的磁盘,点击配置。<br>
- 3.勾选禁用系统保护,删除此驱动的所有还原点。之后System Volume Information中的内容就会被自动清理了。<br>
![c3]( https://gitcode.net/xu180/document/-/raw/master/imgs/pagefile/c3.jpg )
- [ ] 清理 pagefile.sys
- pagefile.sys是虚拟内存文件,目地是使用一部分硬盘空间来充当内存使用。当一个程序请求的内存空间大于物理内存时,就需要pagefile.sys文件来提供较大的虚拟内存,从而满足程序对大内存的需求。<br>
- 一般来说,pagefile.sys是不可以删除的,但是我们可以将该文件从一个磁盘转移到另外的磁盘中。 参考 [blog.xushufa.cn]( https://blog.xushufa.cn/%E7%BC%96%E7%A8%8B/%E8%B5%84%E6%96%99/pagefile.sys%E6%9C%89%E5%87%A0%E5%8D%81%E4%B8%AAG%EF%BC%8C%E5%A4%AA%E5%A4%A7%E6%80%8E%E4%B9%88%E5%8A%9E.html ) <br>
# vuepress构建项目
## 一、vuepress默认主题
## 一、vuepress
使用vuepress构建的博客。
[github]( https://github.com/scott180/vuepress-blog ) &ensp; [vuepress-blog]( https://scott180.github.io/vuepress-blog ) &ensp; [vuepress-calligraphy]( https://scott180.github.io/vuepress-calligraphy )
......@@ -137,8 +137,6 @@ echo 'reco-blog.xushufa.cn' > CNAME
---
> github Actions pages build and deployment 报错
```
......@@ -169,6 +167,27 @@ Deployment request failed for 5a3201f6016e6e078f0f3c46eb4132a3d9014bdd due to in
```
---
> npm run docs:build 本地打包项目,丢失css样式
- 1、修改`base`字段为 `./` 参考 https://blog.csdn.net/JZevin/article/details/109195652 <br>
修改 `/docs/.vuepress/config.js` 中配置的`base`字段 <br>
这里的资源路径不应该是绝对路径,根目录 `/` ,而应该是相对路径 `./` <br>
- 2、注释掉 `mode` 参考 https://www.jianshu.com/p/f9b9edd210f8
```c
找到 node_modules\@vuepress\core\lib\client\app.js文件, 注释掉 'mode',让它默认哈希模式。
const router = new Router({
base: routerBase,
// mode: 'history',
```
---
> 主要命令
......@@ -185,6 +204,15 @@ npm run deploy
```
---
```sh
git clone git@github.com:scott180/vuepress-blog.git
npm install
```
### 1.3 备案号
......@@ -216,92 +244,7 @@ Copyright © 2022 · xushufa.cn · 无为徐生 <br/> [浙ICP备2022008289号-1
### 1.4 阅读量
参考 [Vuepress-阅读量统计]( https://heshiyu1996.github.io/blog/tool/vuepress-stat/ ) &ensp; [valine]( https://valine.js.org/ ) &ensp; [leancloud]( https://console.leancloud.cn/apps )
项目 [vuepress-calligraphy]( https://github.com/scott180/vuepress-calligraphy )
```
yarn add leancloud-storage -S
yarn add valine -S
```
创建`Valine.vue` 及 继承默认主题,并在`Page.vue`下引入 `<Valine />`。[commit]( https://github.com/scott180/vuepress-calligraphy/commit/18f3aefd2928e5e445a200842e61f9fa888575c5 )
### 1.5 时间格式化
[plugin-last-updated]( https://vuepress.vuejs.org/zh/plugin/official/plugin-last-updated.html ) &ensp; [momentjs]( http://momentjs.cn/ )
```
npm install moment --save
```
```js
plugins: [
[
'@vuepress/last-updated',
{
transformer: (timestamp, lang) => {
// 不要忘了安装 moment
const moment = require('moment')
moment.locale(lang)
return moment(timestamp).format('YYYY-MM-DD HH:mm:ss');
}
}
]
]
```
```js
locales: {
'/': {
lang: 'zh-CN',
title: 'VuePress',
description: 'Vue 驱动的静态网站生成器'
}
}
```
### 1.6 全局搜索
```js
themeConfig: {
// algolia 全局搜索
algolia: {
apiKey: '123',
indexName: 'xushufa',
appId: '456',
},
官网
https://crawler.algolia.com/admin/crawlers/9f0f4253-4d83-44d8-9f0a-472f436581fd/overview
https://www.algolia.com/apps/ODP1ID8WCB/explorer/browse/xushufa?searchMode=search
教程
https://docsearch.algolia.com/docs/legacy/config-file/
https://www.cnblogs.com/yayujs/p/15982507.html
```
```java
搜索为空,一般是 pathsToMatch 没配置好
crawler.algolia.com -- Editor -- new Crawle -- pathsToMatch
pathsToMatch: ["https://blog.xushufa.cn/**"]
```
## 二、vuepress-theme-reco主题
## 二、vuepress-theme-reco
使用vuepress-theme-reco构建的博客。
......@@ -311,7 +254,7 @@ pathsToMatch: ["https://blog.xushufa.cn/**"]
参考 [vuepress]( https://vuepress.vuejs.org/zh/ ) &ensp; [vuepress-theme-reco]( https://vuepress-theme-reco.recoluan.com/views/1.x/configJs.html ) &ensp; [vuepress-reco]( https://github.com/vuepress-reco/vuepress-theme-reco-1.x ) &ensp; [vuepress-theme-reco 主题优化]( https://blog.csdn.net/qq_42937522/article/details/122676915 ) &ensp; [vuepress-calligraphy]( https://github.com/scott180/vuepress-calligraphy )
```
```sh
# init
npm install @vuepress-reco/theme-cli -g
theme-cli init my-blog
......@@ -355,7 +298,7 @@ module.exports = {
根目录创建 `deploy.sh` 文件
```
```js
#!/usr/bin/env sh
# 确保脚本抛出遇到的错误
......@@ -416,12 +359,178 @@ module.exports = {
```
---
### 2.3 插件
## 三、插件
[插件广场]( https://vuepress-theme-reco.recoluan.com/views/other/recommend.html ) &ensp; [plugin-medium-zoom]( https://v1.vuepress.vuejs.org/zh/plugin/official/plugin-medium-zoom.html#%E5%AE%89%E8%A3%85 ) &ensp; [medium-zoom]( https://vuepress-community.netlify.app/zh/plugins/medium-zoom/#%E5%AE%89%E8%A3%85 )
### 3.1 阅读量
参考 [Vuepress-阅读量统计]( https://heshiyu1996.github.io/blog/tool/vuepress-stat/ ) &ensp; [valine]( https://valine.js.org/ ) &ensp; [leancloud]( https://console.leancloud.cn/apps )
项目 [vuepress-calligraphy]( https://github.com/scott180/vuepress-calligraphy )
```
yarn add leancloud-storage -S
yarn add valine -S
```
创建`Valine.vue` 及 继承默认主题,并在`Page.vue`下引入 `<Valine />`。[commit]( https://github.com/scott180/vuepress-calligraphy/commit/18f3aefd2928e5e445a200842e61f9fa888575c5 )
参考 [插件广场]( https://vuepress-theme-reco.recoluan.com/views/other/recommend.html ) &ensp; [plugin-medium-zoom]( https://v1.vuepress.vuejs.org/zh/plugin/official/plugin-medium-zoom.html#%E5%AE%89%E8%A3%85 ) &ensp; [medium-zoom]( https://vuepress-community.netlify.app/zh/plugins/medium-zoom/#%E5%AE%89%E8%A3%85 )
### 3.2 时间格式化
[plugin-last-updated]( https://vuepress.vuejs.org/zh/plugin/official/plugin-last-updated.html ) &ensp; [momentjs]( http://momentjs.cn/ )
```
npm install moment --save
```
```js
plugins: [
[
'@vuepress/last-updated',
{
transformer: (timestamp, lang) => {
// 不要忘了安装 moment
const moment = require('moment')
moment.locale(lang)
return moment(timestamp).format('YYYY-MM-DD HH:mm:ss');
}
}
]
]
```
```js
locales: {
'/': {
lang: 'zh-CN',
title: 'VuePress',
description: 'Vue 驱动的静态网站生成器'
}
}
```
### 3.3 全局搜索
```js
themeConfig: {
// algolia 全局搜索
algolia: {
apiKey: '123',
indexName: 'xushufa',
appId: '456',
},
官网
https://crawler.algolia.com/admin/crawlers/9f0f4253-4d83-44d8-9f0a-472f436581fd/overview
https://www.algolia.com/apps/ODP1ID8WCB/explorer/browse/xushufa?searchMode=search
教程
https://docsearch.algolia.com/docs/legacy/config-file/
https://www.cnblogs.com/yayujs/p/15982507.html
```
```java
搜索为空,一般是 pathsToMatch 没配置好
crawler.algolia.com -- Editor -- new Crawle -- pathsToMatch
pathsToMatch: ["https://blog.xushufa.cn/**"]
```
### 3.4 流程图
```
参考
https://vuepress-plugin-mermaidjs.efrane.com/
https://www.npmjs.com/package/vuepress-plugin-mermaidjs?activeTab=readme
https://github.com/vuejs/vuepress/issues/111
```
```js
下载
npm install --save-dev vuepress-plugin-mermaidjs
yarn add -D vuepress-plugin-mermaidjs
配置
// .vuepress/config.js
module.exports = {
// ...
plugins: [
'vuepress-plugin-mermaidjs'
]
// ...
}
```
```js
引号格式不支持,只能用箭头格式的。
添加文件
// .vuepress/components/mermaid.vue
<template>
<div class="mermaid">
<slot></slot>
</div>
</template>
<script>
export default {
mounted() {
import("mermaid/dist/mermaid").then(m => {
m.initialize({
startOnLoad: true
});
m.init();
});
}
};
</script>
使用这种格式的
### Random mermaid example
<mermaid>
graph TD
A[Silvester] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[Car]
C -->|Four| F[Mac]
</mermaid>
```
---
### 3.5 图片放大
> 图片放大
......@@ -471,14 +580,15 @@ module.exports = {
}
```
---
### 3.6 展示名人名句
> 默认随机展示名人名句
参考 [vuepress-plugin-boxx]( https://github.com/zpj80231/vuepress-plugin-boxx )
```
```js
在文件package.json中的devDependencies下加入"vuepress-plugin-boxx": "0.0.7":
......@@ -497,7 +607,7 @@ module.exports = {
```
```
```sh
npm install
在文档标题前一行添加 <Boxx/>
......@@ -507,19 +617,5 @@ npm install
---
> 主要命令
```sh
# 启动
npm run dev
# 打包
npm run build
# 部署
npm run deploy
```
---
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册