JasonsGong.github.io/search.xml
2024-06-14 22:00:25 +08:00

8860 lines
5.9 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>DFA算法实现敏感词自管理</title>
<url>/posts/28101.html</url>
<content><![CDATA[<h2 id="一-需求分析"><a href="#一-需求分析" class="headerlink" title="一.需求分析"></a>一.需求分析</h2><p> 在审核文本内容的时候,我们可以调用第三方成熟的服务(例如阿里云的内容安全)来实现,但是基于不同的场景,第三方的服务不可能涉及到方方面面的敏感词,比如在游戏类的场景中,开挂一词算敏感词,但是在其它的场景中,开挂一词是一个正常的词汇。这时候需要我们根据不同场景自己维护一套敏感词,在文本审核的时候,需要验证文本中是否包含这些敏感词。</p>
<h2 id="二-可选方案"><a href="#二-可选方案" class="headerlink" title="二.可选方案"></a>二.可选方案</h2><table>
<thead>
<tr>
<th><strong>方案</strong></th>
<th><strong>说明</strong></th>
</tr>
</thead>
<tbody><tr>
<td>数据库模糊查询</td>
<td>效率太低</td>
</tr>
<tr>
<td>String.indexOf(“”)查找</td>
<td>数据库量大的话也是比较慢</td>
</tr>
<tr>
<td>全文检索</td>
<td>分词再匹配</td>
</tr>
<tr>
<td>DFA算法</td>
<td>确定有穷自动机(一种数据结构)</td>
</tr>
</tbody></table>
<h2 id="三-DFA算法"><a href="#三-DFA算法" class="headerlink" title="三. DFA算法"></a>三. DFA算法</h2><h3 id="1-简介"><a href="#1-简介" class="headerlink" title="1.简介"></a>1.简介</h3><p>DFA全称为Deterministic Finite Automaton,即确定有穷自动机。</p>
<p>存储一次性的把所有的敏感词存储到了多个map中就是下图表示这种结构</p>
<p>敏感词:冰毒、大麻、大坏蛋</p>
<p><img src="/pictures/image-20231203134106231.png" alt="image-20231203134106231"></p>
<h3 id="2-检索过程"><a href="#2-检索过程" class="headerlink" title="2.检索过程"></a>2.检索过程</h3><p><img src="/pictures/image-20231203134335076.png" alt="image-20231203134335076"></p>
<h2 id="四-工具类"><a href="#四-工具类" class="headerlink" title="四.工具类"></a>四.工具类</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.utils.common;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.*;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">SensitiveWordUtil</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> Map&lt;String, Object&gt; dictionaryMap = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 生成关键词字典库</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> words</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">initMap</span><span class="params">(Collection&lt;String&gt; words)</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (words == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;敏感词列表不能为空&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span> ;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// map初始长度words.size(),整个字典库的入口字数(小于words.size(),因为不同的词可能会有相同的首字)</span></span><br><span class="line"> Map&lt;String, Object&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;(words.size());</span><br><span class="line"> <span class="comment">// 遍历过程中当前层次的数据</span></span><br><span class="line"> Map&lt;String, Object&gt; curMap = <span class="literal">null</span>;</span><br><span class="line"> Iterator&lt;String&gt; iterator = words.iterator();</span><br><span class="line"></span><br><span class="line"> <span class="keyword">while</span> (iterator.hasNext()) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">word</span> <span class="operator">=</span> iterator.next();</span><br><span class="line"> curMap = map;</span><br><span class="line"> <span class="type">int</span> <span class="variable">len</span> <span class="operator">=</span> word.length();</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span><span class="number">0</span>; i &lt; len; i++) &#123;</span><br><span class="line"> <span class="comment">// 遍历每个词的字</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">key</span> <span class="operator">=</span> String.valueOf(word.charAt(i));</span><br><span class="line"> <span class="comment">// 当前字在当前层是否存在, 不存在则新建, 当前层数据指向下一个节点, 继续判断是否存在数据</span></span><br><span class="line"> Map&lt;String, Object&gt; wordMap = (Map&lt;String, Object&gt;) curMap.get(key);</span><br><span class="line"> <span class="keyword">if</span> (wordMap == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="comment">// 每个节点存在两个数据: 下一个节点和isEnd(是否结束标志)</span></span><br><span class="line"> wordMap = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;(<span class="number">2</span>);</span><br><span class="line"> wordMap.put(<span class="string">&quot;isEnd&quot;</span>, <span class="string">&quot;0&quot;</span>);</span><br><span class="line"> curMap.put(key, wordMap);</span><br><span class="line"> &#125;</span><br><span class="line"> curMap = wordMap;</span><br><span class="line"> <span class="comment">// 如果当前字是词的最后一个字则将isEnd标志置1</span></span><br><span class="line"> <span class="keyword">if</span> (i == len -<span class="number">1</span>) &#123;</span><br><span class="line"> curMap.put(<span class="string">&quot;isEnd&quot;</span>, <span class="string">&quot;1&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> dictionaryMap = map;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 搜索文本中某个文字是否匹配关键词</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> text</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> beginIndex</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="type">int</span> <span class="title function_">checkWord</span><span class="params">(String text, <span class="type">int</span> beginIndex)</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (dictionaryMap == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;字典不能为空&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isEnd</span> <span class="operator">=</span> <span class="literal">false</span>;</span><br><span class="line"> <span class="type">int</span> <span class="variable">wordLength</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> Map&lt;String, Object&gt; curMap = dictionaryMap;</span><br><span class="line"> <span class="type">int</span> <span class="variable">len</span> <span class="operator">=</span> text.length();</span><br><span class="line"> <span class="comment">// 从文本的第beginIndex开始匹配</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> beginIndex; i &lt; len; i++) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">key</span> <span class="operator">=</span> String.valueOf(text.charAt(i));</span><br><span class="line"> <span class="comment">// 获取当前key的下一个节点</span></span><br><span class="line"> curMap = (Map&lt;String, Object&gt;) curMap.get(key);</span><br><span class="line"> <span class="keyword">if</span> (curMap == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> wordLength ++;</span><br><span class="line"> <span class="keyword">if</span> (<span class="string">&quot;1&quot;</span>.equals(curMap.get(<span class="string">&quot;isEnd&quot;</span>))) &#123;</span><br><span class="line"> isEnd = <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (!isEnd) &#123;</span><br><span class="line"> wordLength = <span class="number">0</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> wordLength;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 获取匹配的关键词和命中次数</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> text</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> Map&lt;String, Integer&gt; <span class="title function_">matchWords</span><span class="params">(String text)</span> &#123;</span><br><span class="line"> Map&lt;String, Integer&gt; wordMap = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> <span class="type">int</span> <span class="variable">len</span> <span class="operator">=</span> text.length();</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; len; i++) &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">wordLength</span> <span class="operator">=</span> checkWord(text, i);</span><br><span class="line"> <span class="keyword">if</span> (wordLength &gt; <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">word</span> <span class="operator">=</span> text.substring(i, i + wordLength);</span><br><span class="line"> <span class="comment">// 添加关键词匹配次数</span></span><br><span class="line"> <span class="keyword">if</span> (wordMap.containsKey(word)) &#123;</span><br><span class="line"> wordMap.put(word, wordMap.get(word) + <span class="number">1</span>);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> wordMap.put(word, <span class="number">1</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> i += wordLength - <span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> wordMap;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> List&lt;String&gt; list = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> list.add(<span class="string">&quot;法轮&quot;</span>);</span><br><span class="line"> list.add(<span class="string">&quot;法轮功&quot;</span>);</span><br><span class="line"> list.add(<span class="string">&quot;冰毒&quot;</span>);</span><br><span class="line"> <span class="comment">//初始化敏感词库</span></span><br><span class="line"> initMap(list);</span><br><span class="line"> String content=<span class="string">&quot;我是一个好人,并不会卖冰毒,也不操练法轮功,我真的不卖冰毒&quot;</span>;</span><br><span class="line"> Map&lt;String, Integer&gt; map = matchWords(content);</span><br><span class="line"> System.out.println(map);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>结果:</strong></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&#123;冰毒=2, 法轮功=1&#125;</span><br></pre></td></tr></table></figure>
<p><strong>最佳实践:</strong> <a href="https://qingling.icu/posts/64695.html">项目实战-黑马头条 | The Blog (qingling.icu)</a></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>DFA</tag>
</tags>
</entry>
<entry>
<title>Docker容器化技术</title>
<url>/posts/19306.html</url>
<content><![CDATA[<p><img src="/pictures/docker01.png" alt="img"></p>
<h2 id="1-Docker概念"><a href="#1-Docker概念" class="headerlink" title="1.Docker概念"></a>1.Docker概念</h2><p>• Docker 是一个开源的应用容器引擎 </p>
<p>• 诞生于 2013 年初,基于 Go 语言实现, dotCloud 公司出品后改名为Docker Inc </p>
<p>• Docker 可以让开发者打包他们的应用以及依赖包到一个轻量级、可移植的容器中,然后发布到任何流行的 Linux 机器上。</p>
<p>• 容器是完全使用沙箱机制,相互隔离 </p>
<p>• 容器性能开销极低。</p>
<p>• Docker 从 17.03 版本之后分为 CECommunity Edition: 社区版) 和 EEEnterprise Edition: 企业版)</p>
<h2 id="2-安装Docker"><a href="#2-安装Docker" class="headerlink" title="2.安装Docker"></a>2.安装Docker</h2><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">1、yum 包更新到最新</span> </span><br><span class="line">yum update</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">2、安装需要的软件包 yum-util 提供yum-config-manager功能另外两个是devicemapper驱动依赖的</span> </span><br><span class="line">yum install -y yum-utils device-mapper-persistent-data lvm2</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">3、 设置yum源</span></span><br><span class="line">yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">4、 安装docker出现输入的界面都按 y</span> </span><br><span class="line">yum install -y docker-ce</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">5、 查看docker版本验证是否验证成功</span></span><br><span class="line">docker -v</span><br></pre></td></tr></table></figure>
<h2 id="3-配置Docker镜像加速器"><a href="#3-配置Docker镜像加速器" class="headerlink" title="3.配置Docker镜像加速器"></a>3.配置Docker镜像加速器</h2><p>提升下载速度</p>
<h3 id="第一步:登录阿里云获取镜像加速地址"><a href="#第一步:登录阿里云获取镜像加速地址" class="headerlink" title="第一步:登录阿里云获取镜像加速地址"></a>第一步:登录阿里云获取镜像加速地址</h3><p>每个人的加速器地址不一样</p>
<p><img src="/pictures/image-20230421103035776.png" alt="image-20230421103035776"></p>
<h3 id="第二步Linux命令行执行如下命令"><a href="#第二步Linux命令行执行如下命令" class="headerlink" title="第二步Linux命令行执行如下命令"></a>第二步Linux命令行执行如下命令</h3><p>直接将阿里云上提供的命令直接粘贴到命令行即可</p>
<p><img src="/pictures/image-20230421103610184.png" alt="image-20230421103610184"></p>
<p><img src="/pictures/image-20230421103755984.png" alt="image-20230421103755984"></p>
<h3 id="第三步:查看是否配置成功"><a href="#第三步:查看是否配置成功" class="headerlink" title="第三步:查看是否配置成功"></a>第三步:查看是否配置成功</h3><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">查看刚才配置的文件是否存在</span></span><br><span class="line">cat /etc/docker/daemon.json</span><br></pre></td></tr></table></figure>
<p>出现下图所示的内容表示配置成功</p>
<p><img src="/pictures/image-20230421104103726.png" alt="image-20230421104103726"></p>
<h2 id="4-Docker相关命令"><a href="#4-Docker相关命令" class="headerlink" title="4.Docker相关命令"></a>4.Docker相关命令</h2><h3 id="4-1-Docker进程相关的命令"><a href="#4-1-Docker进程相关的命令" class="headerlink" title="4.1 Docker进程相关的命令"></a>4.1 Docker进程相关的命令</h3><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">启动docker服务:</span></span><br><span class="line">systemctl start docker </span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">停止docker服务:</span></span><br><span class="line">systemctl stop docker </span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">重启docker服务:</span></span><br><span class="line">systemctl restart docker</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">查看docker服务状态:</span></span><br><span class="line">systemctl status docker </span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">设置开机启动docker服务:</span></span><br><span class="line">systemctl enable docker</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h3 id="4-2-Docker镜像相关的命令"><a href="#4-2-Docker镜像相关的命令" class="headerlink" title="4.2 Docker镜像相关的命令"></a>4.2 Docker镜像相关的命令</h3><p>查看镜像对应版本号的网站: <a href="https://hub.docker.com/">https://hub.docker.com/</a></p>
<p><img src="/pictures/image-20230421110034731.png" alt="image-20230421110034731"></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">查看镜像: 查看本地所有的镜像</span></span><br><span class="line">docker images</span><br><span class="line">docker images q # 查看所用镜像的id</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">搜索镜像:从网络中查找需要的镜像</span></span><br><span class="line">docker search 镜像名称</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">拉取镜像:从Docker仓库下载镜像到本地镜像名称格式为 名称:版本号,如果版本号不指定则是最新的版本。</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">如果不知道镜像版本可以去docker hub 搜索对应镜像查看。</span></span><br><span class="line">docker pull 镜像名称 # 默认下载的是latest版本的镜像</span><br><span class="line">docker pull 镜像名称:版本号 #下载指定版本的镜像</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">删除镜像: 删除本地镜像</span></span><br><span class="line">docker rmi 镜像id # 删除指定本地镜像</span><br><span class="line">docker rmi 镜像名称:版本号 #删除指定版本的镜像</span><br><span class="line">docker rmi `docker images -q` # 删除所有本地镜像</span><br></pre></td></tr></table></figure>
<h3 id="4-3-容器相关的命令"><a href="#4-3-容器相关的命令" class="headerlink" title="4.3 容器相关的命令"></a>4.3 容器相关的命令</h3><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">查看容器</span></span><br><span class="line">docker ps # 查看正在运行的容器</span><br><span class="line">docker ps a # 查看所有容器</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">创建并启动容器</span></span><br><span class="line">docker run 参数</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">删除所有的容器</span></span><br><span class="line">docker rm $(docker ps -a -q)</span><br></pre></td></tr></table></figure>
<p>参数说明:<br>• -i保持容器运行。通常与 -t 同时使用。加入it这两个参数后容器创建后自动进入容器中退出容器后容器自动关闭。<br>• -t为容器重新分配一个伪输入终端通常与 -i 同时使用。<br>• -d以守护后台模式运行容器。创建一个容器在后台运行需要使用docker exec 进入容器。退出后,容器不会关闭。<br>• -it 创建的容器一般称为交互式容器,-id 创建的容器一般称为守护式容器<br>• name为创建的容器命名。</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">进入容器</span></span><br><span class="line">docker exec 参数 # 退出容器,容器不会关闭</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">停止容器</span></span><br><span class="line">docker stop 容器名称</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">启动容器</span></span><br><span class="line">docker start 容器名称</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">删除容器:如果容器是运行状态则删除失败,需要停止容器才能删除</span></span><br><span class="line">docker rm 容器名称</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">查看容器信息</span></span><br><span class="line">docker inspect 容器名称</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看容器的日志信息</span></span><br><span class="line">docker logs 容器名称</span><br></pre></td></tr></table></figure>
<h2 id="5-Docker-应用部署"><a href="#5-Docker-应用部署" class="headerlink" title="5.Docker 应用部署"></a>5.Docker 应用部署</h2><div class="note danger flat"><p>Docker中常见的应用安装部署详细内容请参考下面文章</p>
<p><a href="https://qingling.icu/posts/20683.html">Linux中开发环境的搭建 | The Blog (qingling.icu)</a></p>
</div>
<p><a href="https://qingling.icu/posts/63333.html">开发环境的搭建 | The Blog (qingling.icu)</a></p>
<p><strong>5.1、部署MySQL</strong></p>
<ol>
<li>搜索mysql镜像</li>
</ol>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker search mysql</span><br></pre></td></tr></table></figure>
<ol start="2">
<li>拉取mysql镜像</li>
</ol>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker pull mysql:5.6</span><br></pre></td></tr></table></figure>
<ol start="3">
<li>创建容器,设置端口映射、目录映射</li>
</ol>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">在/root目录下创建mysql目录用于存储mysql数据信息</span></span><br><span class="line">mkdir ~/mysql</span><br><span class="line">cd ~/mysql</span><br></pre></td></tr></table></figure>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker run -id \</span><br><span class="line">-p 3307:3306 \</span><br><span class="line">--name=c_mysql \</span><br><span class="line">-v $PWD/conf:/etc/mysql/conf.d \</span><br><span class="line">-v $PWD/logs:/logs \</span><br><span class="line">-v $PWD/data:/var/lib/mysql \</span><br><span class="line">-e MYSQL_ROOT_PASSWORD=123456 \</span><br><span class="line">mysql:5.6</span><br></pre></td></tr></table></figure>
<ul>
<li>参数说明:<ul>
<li><strong>-p 3307:3306</strong>:将容器的 3306 端口映射到宿主机的 3307 端口。</li>
<li><strong>-v $PWD&#x2F;conf:&#x2F;etc&#x2F;mysql&#x2F;conf.d</strong>:将主机当前目录下的 conf&#x2F;my.cnf 挂载到容器的 &#x2F;etc&#x2F;mysql&#x2F;my.cnf。配置目录</li>
<li><strong>-v $PWD&#x2F;logs:&#x2F;logs</strong>:将主机当前目录下的 logs 目录挂载到容器的 &#x2F;logs。日志目录</li>
<li><strong>-v $PWD&#x2F;data:&#x2F;var&#x2F;lib&#x2F;mysql</strong> 将主机当前目录下的data目录挂载到容器的 &#x2F;var&#x2F;lib&#x2F;mysql 。数据目录</li>
<li><strong>-e MYSQL_ROOT_PASSWORD&#x3D;123456</strong>初始化 root 用户的密码。</li>
</ul>
</li>
</ul>
<ol start="4">
<li>进入容器操作mysql</li>
</ol>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker exec it c_mysql /bin/bash</span><br></pre></td></tr></table></figure>
<ol start="5">
<li>使用外部机器连接容器中的mysql</li>
</ol>
<p><img src="/pictures/1573636765632.png" alt="1573636765632"></p>
<p><strong>5.2、部署Tomcat</strong></p>
<ol>
<li>搜索tomcat镜像</li>
</ol>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker search tomcat</span><br></pre></td></tr></table></figure>
<ol start="2">
<li>拉取tomcat镜像</li>
</ol>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker pull tomcat</span><br></pre></td></tr></table></figure>
<ol start="3">
<li>创建容器,设置端口映射、目录映射</li>
</ol>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">在/root目录下创建tomcat目录用于存储tomcat数据信息</span></span><br><span class="line">mkdir ~/tomcat</span><br><span class="line">cd ~/tomcat</span><br></pre></td></tr></table></figure>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker run -id --name=c_tomcat \</span><br><span class="line">-p 8080:8080 \</span><br><span class="line">-v $PWD:/usr/local/tomcat/webapps \</span><br><span class="line">tomcat </span><br></pre></td></tr></table></figure>
<ul>
<li><p>参数说明:</p>
<ul>
<li><p><strong>-p 8080:8080</strong>将容器的8080端口映射到主机的8080端口</p>
<p><strong>-v $PWD:&#x2F;usr&#x2F;local&#x2F;tomcat&#x2F;webapps</strong>将主机中当前目录挂载到容器的webapps</p>
</li>
</ul>
</li>
</ul>
<ol start="4">
<li>使用外部机器访问tomcat</li>
</ol>
<p><img src="/pictures/1573649804623.png" alt="1573649804623"></p>
<p><strong>5.3 部署Nginx</strong></p>
<ol>
<li>搜索nginx镜像</li>
</ol>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker search nginx</span><br></pre></td></tr></table></figure>
<ol start="2">
<li>拉取nginx镜像</li>
</ol>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker pull nginx</span><br></pre></td></tr></table></figure>
<ol start="3">
<li>创建容器,设置端口映射、目录映射</li>
</ol>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">在/root目录下创建nginx目录用于存储nginx数据信息</span></span><br><span class="line">mkdir ~/nginx</span><br><span class="line">cd ~/nginx</span><br><span class="line">mkdir conf</span><br><span class="line">cd conf</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">在~/nginx/conf/下创建nginx.conf文件,粘贴下面内容</span></span><br><span class="line">vim nginx.conf</span><br></pre></td></tr></table></figure>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">user nginx;</span><br><span class="line">worker_processes 1;</span><br><span class="line"></span><br><span class="line">error_log /var/log/nginx/error.log warn;</span><br><span class="line">pid /var/run/nginx.pid;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">events &#123;</span><br><span class="line"> worker_connections 1024;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">http &#123;</span><br><span class="line"> include /etc/nginx/mime.types;</span><br><span class="line"> default_type application/octet-stream;</span><br><span class="line"></span><br><span class="line"> log_format main &#x27;$remote_addr - $remote_user [$time_local] &quot;$request&quot; &#x27;</span><br><span class="line"> &#x27;$status $body_bytes_sent &quot;$http_referer&quot; &#x27;</span><br><span class="line"> &#x27;&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;&#x27;;</span><br><span class="line"></span><br><span class="line"> access_log /var/log/nginx/access.log main;</span><br><span class="line"></span><br><span class="line"> sendfile on;</span><br><span class="line"> #tcp_nopush on;</span><br><span class="line"></span><br><span class="line"> keepalive_timeout 65;</span><br><span class="line"></span><br><span class="line"> #gzip on;</span><br><span class="line"></span><br><span class="line"> include /etc/nginx/conf.d/*.conf;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker run -id --name=c_nginx \</span><br><span class="line">-p 80:80 \</span><br><span class="line">-v $PWD/conf/nginx.conf:/etc/nginx/nginx.conf \</span><br><span class="line">-v $PWD/logs:/var/log/nginx \</span><br><span class="line">-v $PWD/html:/usr/share/nginx/html \</span><br><span class="line">nginx</span><br></pre></td></tr></table></figure>
<ul>
<li>参数说明:<ul>
<li><strong>-p 80:80</strong>:将容器的 80端口映射到宿主机的 80 端口。</li>
<li><strong>-v $PWD&#x2F;conf&#x2F;nginx.conf:&#x2F;etc&#x2F;nginx&#x2F;nginx.conf</strong>:将主机当前目录下的 &#x2F;conf&#x2F;nginx.conf 挂载到容器的 :&#x2F;etc&#x2F;nginx&#x2F;nginx.conf。配置目录</li>
<li><strong>-v $PWD&#x2F;logs:&#x2F;var&#x2F;log&#x2F;nginx</strong>:将主机当前目录下的 logs 目录挂载到容器的&#x2F;var&#x2F;log&#x2F;nginx。日志目录</li>
</ul>
</li>
</ul>
<ol start="4">
<li>使用外部机器访问nginx</li>
</ol>
<p><img src="/pictures/1573652396669.png" alt="1573652396669"></p>
<p><strong>5.4 部署Redis</strong></p>
<ol>
<li>搜索redis镜像</li>
</ol>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker search redis</span><br></pre></td></tr></table></figure>
<ol start="2">
<li>拉取redis镜像</li>
</ol>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker pull redis:5.0</span><br></pre></td></tr></table></figure>
<ol start="3">
<li>创建容器,设置端口映射</li>
</ol>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker run -id --name=c_redis -p 6379:6379 redis:5.0</span><br></pre></td></tr></table></figure>
<ol start="4">
<li>使用外部机器连接redis</li>
</ol>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">./redis-cli.exe -h 192.168.149.135 -p 6379</span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>运维</category>
</categories>
<tags>
<tag>Docker</tag>
</tags>
</entry>
<entry>
<title>ElementUI使用示例</title>
<url>/posts/50908.html</url>
<content><![CDATA[<p><strong><a href="https://element.eleme.cn/#/zh-CN/component/quickstart">ElementUI官网</a></strong></p>
<h2 id="一-树形显示-树形控件"><a href="#一-树形显示-树形控件" class="headerlink" title="一.树形显示-树形控件"></a>一.树形显示-树形控件</h2><h3 id="1-树形显示"><a href="#1-树形显示" class="headerlink" title="1.树形显示"></a>1.树形显示</h3><p><strong>示例-以谷粒商城项目的商品分类为例</strong></p>
<p><strong>数据中商品分类的数据表,所有的分类数据在同一张表中</strong></p>
<img src="/pictures/image-20230530174911409.png" alt="image-20230530174911409" style="zoom:150%;" />
<p><strong>商品分类的实体类</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.product.entity;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableField;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableId;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableName;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.Serializable;</span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 商品三级分类</span></span><br><span class="line"><span class="comment"> * </span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> JasonGong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@email</span> JasonGong@gmail.com</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@date</span> 2023-05-19 00:23:36</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@TableName(&quot;pms_category&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">CategoryEntity</span> <span class="keyword">implements</span> <span class="title class_">Serializable</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">long</span> <span class="variable">serialVersionUID</span> <span class="operator">=</span> <span class="number">1L</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 分类id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableId</span></span><br><span class="line"> <span class="keyword">private</span> Long catId;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 分类名称</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String name;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 父分类id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Long parentCid;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 层级</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Integer catLevel;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 是否显示[0-不显示1显示]</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Integer showStatus;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Integer sort;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 图标地址</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String icon;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 计量单位</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String productUnit;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 商品数量</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Integer productCount;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@TableField(exist = false)</span><span class="comment">//这个注解要加,因为这个属性不是数据库中的字段</span></span><br><span class="line"> <span class="keyword">private</span> List&lt;CategoryEntity&gt; children;<span class="comment">//这里的属性名不是瞎起的,与ElementUI中的显示相对应,这里改了,前端也要改</span></span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>封装数据,供前端显示</strong></p>
<p>controller层</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查询所有的分类以及子分类,以树形结构组装起来</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/list/tree&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">list</span><span class="params">()</span>&#123;</span><br><span class="line"> List&lt;CategoryEntity&gt; entities = categoryService.listWithTree();</span><br><span class="line"> <span class="keyword">return</span> R.ok().put(<span class="string">&quot;data&quot;</span>, entities);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>service层这里主要有一个单独的递归方法使用的时候会改就行</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查询所有分类,以树形结构显示</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> List&lt;CategoryEntity&gt; <span class="title function_">listWithTree</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//查出所有的分类</span></span><br><span class="line"> List&lt;CategoryEntity&gt; entities = categoryDao.selectList(<span class="literal">null</span>);</span><br><span class="line"> <span class="comment">//组装成父子的树形结构</span></span><br><span class="line"> <span class="comment">//找到所有的一级分类</span></span><br><span class="line"> List&lt;CategoryEntity&gt; level1List = entities.stream().filter(categoryEntity -&gt;</span><br><span class="line"> <span class="comment">//父级分类的id等于0的就是一级分类</span></span><br><span class="line"> categoryEntity.getParentCid() == <span class="number">0</span></span><br><span class="line"> ).map((menu) -&gt; &#123;</span><br><span class="line"> <span class="comment">//为当前分类的子分类赋值</span></span><br><span class="line"> menu.setChildren(getChildren(menu, entities));</span><br><span class="line"> <span class="keyword">return</span> menu;</span><br><span class="line"> &#125;).sorted((menu1, menu2) -&gt; &#123;</span><br><span class="line"> <span class="comment">//排序</span></span><br><span class="line"> <span class="keyword">return</span> (menu1.getSort() == <span class="literal">null</span> ? <span class="number">0</span> : menu1.getSort()) - (menu2.getSort() == <span class="literal">null</span> ? <span class="number">0</span> : menu2.getSort());</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> level1List;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 递归查询所有菜单的子菜单</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> root 当前分类</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> all 所有的分类数据</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 子菜单的集合</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> List&lt;CategoryEntity&gt; <span class="title function_">getChildren</span><span class="params">(CategoryEntity root, List&lt;CategoryEntity&gt; all)</span> &#123;</span><br><span class="line"> List&lt;CategoryEntity&gt; children = all.stream().filter(categoryEntity -&gt; &#123;</span><br><span class="line"> <span class="keyword">return</span> categoryEntity.getParentCid().equals(root.getCatId());</span><br><span class="line"> &#125;).map(categoryEntity -&gt; &#123;</span><br><span class="line"> <span class="comment">//1.递归找子菜单</span></span><br><span class="line"> categoryEntity.setChildren(getChildren(categoryEntity, all));</span><br><span class="line"> <span class="keyword">return</span> categoryEntity;</span><br><span class="line"> &#125;).sorted((menu1, menu2) -&gt; &#123;</span><br><span class="line"> <span class="comment">//2.菜单的排序</span></span><br><span class="line"> <span class="keyword">return</span> (menu1.getSort() == <span class="literal">null</span> ? <span class="number">0</span> : menu1.getSort()) - (menu2.getSort() == <span class="literal">null</span> ? <span class="number">0</span> : menu2.getSort());</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> <span class="keyword">return</span> children;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p><strong>返回数据的格式</strong></p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;msg&quot;</span><span class="punctuation">:</span> <span class="string">&quot;success&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;code&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;data&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;catId&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;图书、音像、电子书刊&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;parentCid&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;catLevel&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showStatus&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;icon&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productUnit&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productCount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;children&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;catId&quot;</span><span class="punctuation">:</span> <span class="number">22</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;电子书刊&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;parentCid&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;catLevel&quot;</span><span class="punctuation">:</span> <span class="number">2</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showStatus&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;icon&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productUnit&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productCount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;children&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;catId&quot;</span><span class="punctuation">:</span> <span class="number">165</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;电子书&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;parentCid&quot;</span><span class="punctuation">:</span> <span class="number">22</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;catLevel&quot;</span><span class="punctuation">:</span> <span class="number">3</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showStatus&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;icon&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productUnit&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productCount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;children&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;catId&quot;</span><span class="punctuation">:</span> <span class="number">166</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;网络原创&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;parentCid&quot;</span><span class="punctuation">:</span> <span class="number">22</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;catLevel&quot;</span><span class="punctuation">:</span> <span class="number">3</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showStatus&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;icon&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productUnit&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productCount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;children&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;catId&quot;</span><span class="punctuation">:</span> <span class="number">167</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;数字杂志&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;parentCid&quot;</span><span class="punctuation">:</span> <span class="number">22</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;catLevel&quot;</span><span class="punctuation">:</span> <span class="number">3</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showStatus&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;icon&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productUnit&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productCount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;children&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;catId&quot;</span><span class="punctuation">:</span> <span class="number">168</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;多媒体图书&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;parentCid&quot;</span><span class="punctuation">:</span> <span class="number">22</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;catLevel&quot;</span><span class="punctuation">:</span> <span class="number">3</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showStatus&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;icon&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productUnit&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productCount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;children&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;catId&quot;</span><span class="punctuation">:</span> <span class="number">23</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;音像&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;parentCid&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;catLevel&quot;</span><span class="punctuation">:</span> <span class="number">2</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showStatus&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;icon&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productUnit&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productCount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;children&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;catId&quot;</span><span class="punctuation">:</span> <span class="number">169</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;音乐&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;parentCid&quot;</span><span class="punctuation">:</span> <span class="number">23</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;catLevel&quot;</span><span class="punctuation">:</span> <span class="number">3</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showStatus&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;icon&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productUnit&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productCount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;children&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;catId&quot;</span><span class="punctuation">:</span> <span class="number">170</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;影视&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;parentCid&quot;</span><span class="punctuation">:</span> <span class="number">23</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;catLevel&quot;</span><span class="punctuation">:</span> <span class="number">3</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showStatus&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;icon&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productUnit&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productCount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;children&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;catId&quot;</span><span class="punctuation">:</span> <span class="number">171</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;教育音像&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;parentCid&quot;</span><span class="punctuation">:</span> <span class="number">23</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;catLevel&quot;</span><span class="punctuation">:</span> <span class="number">3</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showStatus&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;icon&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productUnit&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;productCount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;children&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> 略.............................</span><br></pre></td></tr></table></figure>
<p><strong>前端代码</strong></p>
<p>模板</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;div&gt;</span><br><span class="line"> &lt;!-- 树形控件 --&gt;</span><br><span class="line"> &lt;el-tree</span><br><span class="line"> :data=&quot;menus&quot;</span><br><span class="line"> :props=&quot;defaultProps&quot;</span><br><span class="line"> @node-click=&quot;handleNodeClick&quot;</span><br><span class="line"> &gt;&lt;/el-tree&gt;</span><br><span class="line"> &lt;/div&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line"> export default &#123;</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> data: [],//发送请求获取的数据(比如 return R.ok().put(&quot;data&quot;, entities);里面的data)</span><br><span class="line"> defaultProps: &#123;</span><br><span class="line"> children: &#x27;children&#x27;,//实体类中的属性(比如:private List&lt;CategoryEntity&gt; children;)</span><br><span class="line"> label: &#x27;label&#x27;//需要显示的属性的属性名(比如商品分类名属性名是name,这里就填name)</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> methods: &#123;</span><br><span class="line"> handleNodeClick(data) &#123;</span><br><span class="line"> console.log(data);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;;</span><br><span class="line">&lt;/script&gt;</span><br></pre></td></tr></table></figure>
<p>完整代码</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;div&gt;</span><br><span class="line"> &lt;!-- 树形控件 --&gt;</span><br><span class="line"> &lt;el-tree</span><br><span class="line"> :data=&quot;menus&quot;</span><br><span class="line"> :props=&quot;defaultProps&quot;</span><br><span class="line"> @node-click=&quot;handleNodeClick&quot;</span><br><span class="line"> &gt;&lt;/el-tree&gt;</span><br><span class="line"> &lt;/div&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line">export default &#123;</span><br><span class="line"> //定义变量</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> menus: [],</span><br><span class="line"> defaultProps: &#123;//这里的配置看官方的文档</span><br><span class="line"> children: &quot;children&quot;,//父节点上的子节点</span><br><span class="line"> label: &quot;name&quot;,//每个对象要显示的属性值,比如我们当前要显示商品分类中的分类名的值这里就改成name</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> //钩子函数</span><br><span class="line"> created() &#123;</span><br><span class="line"> //调用获取商品分类数据的方法</span><br><span class="line"> this.getMenus();</span><br><span class="line"> &#125;,</span><br><span class="line"></span><br><span class="line"> //方法</span><br><span class="line"> methods: &#123;</span><br><span class="line"> handleNodeClick(data) &#123;</span><br><span class="line"> console.log(data);</span><br><span class="line"> &#125;,</span><br><span class="line"> //获取所有的菜单</span><br><span class="line"> getMenus() &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/list/tree&quot;),</span><br><span class="line"> method: &quot;get&quot;,</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.menus = data.data;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;,</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br><span class="line"></span><br><span class="line">&lt;style&gt;</span><br><span class="line">&lt;/style&gt;</span><br></pre></td></tr></table></figure>
<p><strong>显示效果</strong></p>
<img src="/pictures/image-20230530181102832.png" alt="image-20230530181102832" style="zoom:150%;" />
<h3 id="2-树形控件的删除、添加"><a href="#2-树形控件的删除、添加" class="headerlink" title="2.树形控件的删除、添加"></a>2.树形控件的删除、添加</h3><p>页面的显示效果</p>
<p><img src="/pictures/image-20230605145343384.png" alt="image-20230605145343384"></p>
<p>使用的组件 在树形控件的基础上添加相关的代码</p>
<img src="/pictures/image-20230605145433594.png" alt="image-20230605145433594" style="zoom:150%;" />
<p>添加的时候弹出的对话框使用的组件</p>
<img src="/pictures/image-20230605153935967.png" alt="image-20230605153935967" style="zoom:150%;" />
<img src="/pictures/image-20230605154629290.png" alt="image-20230605154629290" style="zoom:150%;" />
<p><strong>前端代码的实现</strong></p>
<p>Tips删除成功之后依然展开删除的节点</p>
<p>删除和添加的前端代码</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;div&gt;</span><br><span class="line"> &lt;!-- 树形控件--&gt;</span><br><span class="line"> &lt;!-- :expand-on-click-node=&quot;false&quot;设置为点击箭头的时候才会展开,避免点击删除的按钮的时候展开 --&gt;</span><br><span class="line"> &lt;!-- show-checkbox表示开启选择框批量选择--&gt;</span><br><span class="line"> &lt;!-- node-key表示在整个树中唯一的表示 --&gt;</span><br><span class="line"> &lt;el-tree</span><br><span class="line"> :data=&quot;menus&quot;</span><br><span class="line"> :props=&quot;defaultProps&quot;</span><br><span class="line"> :expand-on-click-node=&quot;false&quot;</span><br><span class="line"> show-checkbox</span><br><span class="line"> node-key=&quot;catId&quot;</span><br><span class="line"> :default-expanded-keys=&quot;expandedKey&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;span class=&quot;custom-tree-node&quot; slot-scope=&quot;&#123; node, data &#125;&quot;&gt;</span><br><span class="line"> &lt;span&gt;&#123;&#123; node.label &#125;&#125;&lt;/span&gt;</span><br><span class="line"> &lt;span&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;node.level &lt;= 2&quot;</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;mini&quot;</span><br><span class="line"> @click=&quot;() =&gt; append(data)&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> 添加</span><br><span class="line"> &lt;/el-button&gt;</span><br><span class="line"> &lt;!-- 添加判断,没有下一级节点的时候就显示删除的按钮 --&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;data.children.length &lt;= 0&quot;</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;mini&quot;</span><br><span class="line"> @click=&quot;() =&gt; remove(node, data)&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> 删除</span><br><span class="line"> &lt;/el-button&gt;</span><br><span class="line"> &lt;/span&gt;</span><br><span class="line"> &lt;/span&gt;&lt;/el-tree</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;!-- 添加分类的时候弹出的对话框 --&gt;</span><br><span class="line"> &lt;el-dialog title=&quot;提示&quot; :visible.sync=&quot;dialogVisible&quot; width=&quot;30%&quot;&gt;</span><br><span class="line"> &lt;el-form :model=&quot;category&quot;&gt;</span><br><span class="line"> &lt;el-form-item label=&quot;分类名称&quot;&gt;</span><br><span class="line"> &lt;el-input v-model=&quot;category.name&quot; autocomplete=&quot;off&quot;&gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;/el-form&gt;</span><br><span class="line"> &lt;span slot=&quot;footer&quot; class=&quot;dialog-footer&quot;&gt;</span><br><span class="line"> &lt;el-button @click=&quot;dialogVisible = false&quot;&gt;取 消&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button type=&quot;primary&quot; @click=&quot;addCategory&quot;&gt;确 定&lt;/el-button&gt;</span><br><span class="line"> &lt;/span&gt;</span><br><span class="line"> &lt;/el-dialog&gt;</span><br><span class="line"> &lt;/div&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line">export default &#123;</span><br><span class="line"> //定义变量</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> menus: [],</span><br><span class="line"> defaultProps: &#123;</span><br><span class="line"> //这里的配置看官方的文档</span><br><span class="line"> children: &quot;children&quot;, //父节点上的子节点</span><br><span class="line"> label: &quot;name&quot;, //每个对象要显示的属性值,比如我们当前要显示商品分类中的分类名的值这里就改成name</span><br><span class="line"> &#125;,</span><br><span class="line"> expandedKey: [], //需要展开的数组,用于删除之后树形控件仍然展开</span><br><span class="line"> dialogVisible: false, //添加菜单的对话框的开启或者关闭</span><br><span class="line"> //表单绑定的对象</span><br><span class="line"> category: &#123;</span><br><span class="line"> name: &quot;&quot;, //分类的名称</span><br><span class="line"> parentCid: 0, //父类的id</span><br><span class="line"> catLevel: 0, //分类的级别</span><br><span class="line"> showStatus: 1, //是否显示该分类</span><br><span class="line"> sort: 0, //排序</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> //钩子函数</span><br><span class="line"> created() &#123;</span><br><span class="line"> //调用获取商品分类数据的方法</span><br><span class="line"> this.getMenus();</span><br><span class="line"> &#125;,</span><br><span class="line"></span><br><span class="line"> //方法</span><br><span class="line"> methods: &#123;</span><br><span class="line"> //添加分类(弹出的对话框确定按钮执行的方法)</span><br><span class="line"> addCategory() &#123;</span><br><span class="line"> console.log(&quot;提交的数据:&quot;, this.category);</span><br><span class="line"> //将添加的数据返回给后端</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/save&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(this.category, false),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;菜单添加成功&quot;,</span><br><span class="line"> type: &quot;success&quot;,</span><br><span class="line"> &#125;);</span><br><span class="line"> //刷新一下页面</span><br><span class="line"> this.getMenus()</span><br><span class="line"> //设置需要默认展开的菜单(依然展开刚才添加的节点)</span><br><span class="line"> this.expandedKey = [this.category.parentCid];</span><br><span class="line"> &#125;);</span><br><span class="line"> //关闭对话框</span><br><span class="line"> this.dialogVisible = false;</span><br><span class="line"> &#125;,</span><br><span class="line"> //添加分类的方法</span><br><span class="line"> append(data) &#123;</span><br><span class="line"> //清空一下表单的数据</span><br><span class="line"> this.category.name = &quot;&quot;;</span><br><span class="line"> //打开添加的对话框</span><br><span class="line"> this.dialogVisible = true;</span><br><span class="line"> //为分类的对象赋值</span><br><span class="line"> this.category.parentCid = data.catId;</span><br><span class="line"> this.category.catLevel = data.catLevel * 1 + 1; //防止catLevel是一个字符串</span><br><span class="line"> &#125;,</span><br><span class="line"> //删除节点的方法</span><br><span class="line"> remove(node, data) &#123;</span><br><span class="line"> var ids = [data.catId];</span><br><span class="line"> this.$confirm(`是否要删除[$&#123;data.name&#125;]菜单?`, &quot;提示&quot;, &#123;</span><br><span class="line"> confirmButtonText: &quot;确定&quot;,</span><br><span class="line"> cancelButtonText: &quot;取消&quot;,</span><br><span class="line"> type: &quot;warning&quot;,</span><br><span class="line"> &#125;)</span><br><span class="line"> .then(() =&gt; &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/delete&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(ids, false),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;菜单删除成功&quot;,</span><br><span class="line"> type: &quot;success&quot;,</span><br><span class="line"> &#125;);</span><br><span class="line"> //刷新一下页面</span><br><span class="line"> this.getMenus();</span><br><span class="line"> //设置需要默认展开的菜单(依然展开刚才删除的节点)</span><br><span class="line"> this.expandedKey = [node.parent.data.catId];</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;)</span><br><span class="line"> .catch(() =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> type: &quot;info&quot;,</span><br><span class="line"> message: &quot;已取消删除&quot;,</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> //获取所有的菜单</span><br><span class="line"> getMenus() &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/list/tree&quot;),</span><br><span class="line"> method: &quot;get&quot;,</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.menus = data.data;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;,</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br><span class="line"></span><br><span class="line">&lt;style&gt;</span><br><span class="line">&lt;/style&gt;</span><br></pre></td></tr></table></figure>
<p><strong>后端代码</strong></p>
<p>删除的后端代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 删除</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@RequestMapping(&quot;/delete&quot;)</span></span><br><span class="line"> <span class="comment">//@RequiresPermissions(&quot;product:category:delete&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> R <span class="title function_">delete</span><span class="params">(<span class="meta">@RequestBody</span> Long[] catIds)</span> &#123;</span><br><span class="line"> <span class="comment">//检查当前删除的菜单,是否被别的地方引用</span></span><br><span class="line"> <span class="comment">//categoryService.removeByIds(Arrays.asList(catIds));</span></span><br><span class="line"> categoryService.removeMenuByIds(Arrays.asList(catIds));</span><br><span class="line"> <span class="keyword">return</span> R.ok();</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>添加的后端代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/save&quot;)</span></span><br><span class="line"><span class="comment">//@RequiresPermissions(&quot;product:category:save&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">save</span><span class="params">(<span class="meta">@RequestBody</span> CategoryEntity category)</span> &#123;</span><br><span class="line"> categoryService.save(category);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> R.ok();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>实现的效果</p>
<p><img src="/pictures/image-20230605163004850.png" alt="image-20230605163004850"></p>
]]></content>
<categories>
<category>前端</category>
</categories>
<tags>
<tag>前端</tag>
</tags>
</entry>
<entry>
<title>IDEA常用快捷键</title>
<url>/posts/63724.html</url>
<content><![CDATA[<h3 id="1-常用快捷键"><a href="#1-常用快捷键" class="headerlink" title="1.常用快捷键"></a>1.常用快捷键</h3><ol>
<li><p>在写一个main主函数的时候可以直接在键盘上敲main ,然后根据提示补全全部(模板快捷键)</p>
</li>
<li><p>在写System.out.println();输出函数代码的时候可以直接在键盘上面敲sout然后根据提示补全模板快捷键</p>
</li>
<li><p>在写for循环的时候我们可以直接在键盘上面打出 fori 然后根据提示补全代码(模板快捷键)</p>
</li>
<li><p>删除当前行 Ctrl+D (并非默认Ctrl + D默认为Ctrl + Y),需要我们自己设置</p>
</li>
<li><p>复制当前行,快速向下复制一行 Ctrl + Alt + 向下箭头(并非默认,需要我们自己设置)</p>
</li>
<li><p>代码补全 Alt + &#x2F;</p>
</li>
<li><p>添加注释和取消注释 Ctrl + &#x2F;</p>
</li>
<li><p>自动导入import java.util.Scanner;我们在键盘上敲Scanner in &#x3D; new Scanner(System,in);的时候按快捷键Alt + Enter 可以自动导入import java.util.Scanner;</p>
</li>
<li><p>代码格式化(格式调整为正常格式,,让代码变整洁,并非删除代码) Ctrl + Alt +L</p>
</li>
<li><p>快速运行程序(并非默认,需要我们自己设置)Alt + R如果要使用这个快捷键我们要切换到当前的主类否则运行的还是之前运行的程序</p>
</li>
<li><p>构造器快捷键 Alt + insert ,按住Ctrl可以选择任意个参数的构造器也可以点击Select None选择无参构造器 我们在写一个私有类的getXxx()和setXxx()方法的时候我们可以使用这个快捷键光标移动到”Getter and Setter“的位置并选择。</p>
</li>
<li><p>查看一个类的层级关系 Ctrl + H</p>
</li>
<li><p>将光标放在一个方法上,使用快捷键 Ctrl + B 可以快速定位到这个方法的代码</p>
</li>
<li><p>我们在键盘上面敲Scanner in &#x3D; new Scanner(System.in);的时候我们先敲new Scanner(System.in)再在后面加上new Scanner(System.in).var,按Enter,就会自动补全前面的代码定义一个Person类对象的时候我们也可以使用这种方法如new Person().var,按Enter,就会自动补全前面的代码,变成 Person person &#x3D; new Person();</p>
</li>
<li><p>重写某个方法的时候我们可以直接打出这个方法名,然后根据提示,移动光标选择。</p>
</li>
<li><p>Alt+insert移动光标选择toString可以重写toString方法并输出对象的属性。</p>
</li>
<li><p>断点调试的快捷键F7(跳入)F8跳过shift+F8(跳出),F9(resume,执行到下一个断点)</p>
<p> F7:跳入方法内</p>
<p> F8:逐行执行代码</p>
<p> shift+F8:跳出方法</p>
</li>
<li><p>一个普通类实现接口就必须将该接口的所有方法都实现我们在实现这些接口的时候可以使用快捷键Alt+Enter</p>
</li>
<li><p>Ctrl+Alt+t 可以快捷的使用try-catch</p>
</li>
<li><p>遍历一个数组生成while循环可以快捷生成快捷键是 itit + 回车 ,增强的for循环的迭代器的快捷输入 是大写的 I + enter</p>
</li>
<li><p>Ctrl + J 可以显示所有的快捷模板</p>
</li>
<li><p>Ctrl + R 查找替换</p>
</li>
<li><p>Shift+Enter 快速向下换一行</p>
</li>
<li><p>Shift+Home 快速选中一行</p>
</li>
<li><p>Ctrl + F 全局查找</p>
</li>
</ol>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>快捷键</tag>
</tags>
</entry>
<entry>
<title>JWT-token生成工具</title>
<url>/posts/28118.html</url>
<content><![CDATA[<h2 id="1-介绍"><a href="#1-介绍" class="headerlink" title="1.介绍"></a>1.介绍</h2><p> JWTJson Web Token是为了在网络应用环境间传递声明而执行的一种基于JSON的开放标准。JWT的声明一般被用来在身份提供者和服务提供者间传递被认证的用户身份信息以便于从资源服务器获取资源。比如用在用户登录上。JWT最重要的作用就是对 token信息的<strong>防伪</strong>作用。 </p>
<p> JWT的原理 </p>
<p> 一个JWT由三个部分组成公共部分、私有部分、签名部分。最后由这三者组合进行base64编码得到JWT。</p>
<p><img src="/pictures/image-20230420102523288.png" alt="image-20230420102523288"></p>
<p><img src="/pictures/image-20230420103234232.png" alt="image-20230420103234232"></p>
<p>1、 公共部分</p>
<p> 主要是该JWT的相关配置参数比如签名的加密算法、格式类型、过期时间等等。</p>
<p> Key&#x3D;ATGUIGU</p>
<p>2、 私有部分</p>
<p> 用户自定义的内容,根据实际需要真正要封装的信息。</p>
<p> userInfo{用户的Id用户的昵称nickName}</p>
<p>3、 签名部分</p>
<p> SaltiP: 当前服务器的Ip地址!{linux 中配置代理服务器的ip}</p>
<p> 主要用户对JWT生成字符串的时候进行加密{盐值}</p>
<p>最终组成 key+salt+userInfo -&gt; token!</p>
<p>base64编码并不是加密只是把明文信息变成了不可见的字符串。但是其实只要用一些工具就可以把base64编码解成明文所以不要在JWT中放入涉及私密的信息。</p>
<h2 id="2-使用"><a href="#2-使用" class="headerlink" title="2.使用"></a>2.使用</h2><h3 id="1-导入依赖"><a href="#1-导入依赖" class="headerlink" title="1.导入依赖"></a>1.导入依赖</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>io.jsonwebtoken<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>jjwt<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>0.7.0<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-引入工具类"><a href="#2-引入工具类" class="headerlink" title="2.引入工具类"></a>2.引入工具类</h3><p>以下工具类根据情况任选一种即可</p>
<p>一种是在请求头中获取token,然后再获取用户的信息,另一种直接传入token然后获取用户信息</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.yygh.common.helper;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> io.jsonwebtoken.*;</span><br><span class="line"><span class="keyword">import</span> org.springframework.util.StringUtils;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/20</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">JwtHelper</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="type">long</span> <span class="variable">tokenExpiration</span> <span class="operator">=</span> <span class="number">24</span>*<span class="number">60</span>*<span class="number">60</span>*<span class="number">1000</span>; <span class="comment">//token的过期时间</span></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="type">String</span> <span class="variable">tokenSignKey</span> <span class="operator">=</span> <span class="string">&quot;123456&quot;</span>; <span class="comment">//token 签名的密钥</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 根据参数生成token</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> userId 用户的id</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> userName 用户名</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> token字符串</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">createToken</span><span class="params">(Long userId, String userName)</span> &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">token</span> <span class="operator">=</span> Jwts.builder()</span><br><span class="line"> .setSubject(<span class="string">&quot;YYGH-USER&quot;</span>) <span class="comment">//分类,自定义</span></span><br><span class="line"> .setExpiration(<span class="keyword">new</span> <span class="title class_">Date</span>(System.currentTimeMillis() + tokenExpiration))<span class="comment">//设置过期时间</span></span><br><span class="line"> .claim(<span class="string">&quot;userId&quot;</span>, userId)<span class="comment">//设置主体信息</span></span><br><span class="line"> .claim(<span class="string">&quot;userName&quot;</span>, userName)</span><br><span class="line"> .signWith(SignatureAlgorithm.HS512, tokenSignKey)<span class="comment">//签名hash</span></span><br><span class="line"> .compressWith(CompressionCodecs.GZIP)</span><br><span class="line"> .compact();</span><br><span class="line"> <span class="keyword">return</span> token;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 根据token字符串得到用户的id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> Long <span class="title function_">getUserId</span><span class="params">(String token)</span> &#123;</span><br><span class="line"> <span class="keyword">if</span>(StringUtils.isEmpty(token)) <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> Jws&lt;Claims&gt; claimsJws = Jwts.parser().setSigningKey(tokenSignKey).parseClaimsJws(token);</span><br><span class="line"> <span class="type">Claims</span> <span class="variable">claims</span> <span class="operator">=</span> claimsJws.getBody();</span><br><span class="line"> <span class="type">Integer</span> <span class="variable">userId</span> <span class="operator">=</span> (Integer)claims.get(<span class="string">&quot;userId&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span> userId.longValue();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 根据token字符串得到用户名</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">getUserName</span><span class="params">(String token)</span> &#123;</span><br><span class="line"> <span class="keyword">if</span>(StringUtils.isEmpty(token)) <span class="keyword">return</span> <span class="string">&quot;&quot;</span>;</span><br><span class="line"> Jws&lt;Claims&gt; claimsJws</span><br><span class="line"> = Jwts.parser().setSigningKey(tokenSignKey).parseClaimsJws(token);</span><br><span class="line"> <span class="type">Claims</span> <span class="variable">claims</span> <span class="operator">=</span> claimsJws.getBody();</span><br><span class="line"> <span class="keyword">return</span> (String)claims.get(<span class="string">&quot;userName&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.commonutils;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> io.jsonwebtoken.Claims;</span><br><span class="line"><span class="keyword">import</span> io.jsonwebtoken.Jws;</span><br><span class="line"><span class="keyword">import</span> io.jsonwebtoken.Jwts;</span><br><span class="line"><span class="keyword">import</span> io.jsonwebtoken.SignatureAlgorithm;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.server.reactive.ServerHttpRequest;</span><br><span class="line"><span class="keyword">import</span> org.springframework.util.StringUtils;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletRequest;</span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> helen</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@since</span> 2019/10/16</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">JwtUtils</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 设置token的过期时间</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">long</span> <span class="variable">EXPIRE</span> <span class="operator">=</span> <span class="number">1000</span> * <span class="number">60</span> * <span class="number">60</span> * <span class="number">24</span>;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 密钥</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">String</span> <span class="variable">APP_SECRET</span> <span class="operator">=</span> <span class="string">&quot;ukc8BDbRigUDaY6pZFfWus2jZWLPHO&quot;</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 生成token字符串</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">getJwtToken</span><span class="params">(String id, String nickname)</span>&#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">String</span> <span class="variable">JwtToken</span> <span class="operator">=</span> Jwts.builder()</span><br><span class="line"> .setHeaderParam(<span class="string">&quot;typ&quot;</span>, <span class="string">&quot;JWT&quot;</span>)</span><br><span class="line"> .setHeaderParam(<span class="string">&quot;alg&quot;</span>, <span class="string">&quot;HS256&quot;</span>)</span><br><span class="line"> .setSubject(<span class="string">&quot;guli-user&quot;</span>)</span><br><span class="line"> .setIssuedAt(<span class="keyword">new</span> <span class="title class_">Date</span>())</span><br><span class="line"> .setExpiration(<span class="keyword">new</span> <span class="title class_">Date</span>(System.currentTimeMillis() + EXPIRE))</span><br><span class="line"> .claim(<span class="string">&quot;id&quot;</span>, id)</span><br><span class="line"> .claim(<span class="string">&quot;nickname&quot;</span>, nickname)</span><br><span class="line"> .signWith(SignatureAlgorithm.HS256, APP_SECRET)</span><br><span class="line"> .compact();</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> JwtToken;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断token是否存在与有效</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">boolean</span> <span class="title function_">checkToken</span><span class="params">(String jwtToken)</span> &#123;</span><br><span class="line"> <span class="keyword">if</span>(StringUtils.isEmpty(jwtToken)) <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> Jwts.parser().setSigningKey(APP_SECRET).parseClaimsJws(jwtToken);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断token是否存在与有效</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">boolean</span> <span class="title function_">checkToken</span><span class="params">(HttpServletRequest request)</span> &#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">jwtToken</span> <span class="operator">=</span> request.getHeader(<span class="string">&quot;token&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span>(StringUtils.isEmpty(jwtToken)) <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> Jwts.parser().setSigningKey(APP_SECRET).parseClaimsJws(jwtToken);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 根据token获取会员id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">getMemberIdByJwtToken</span><span class="params">(HttpServletRequest request)</span> &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">jwtToken</span> <span class="operator">=</span> request.getHeader(<span class="string">&quot;token&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span>(StringUtils.isEmpty(jwtToken)) <span class="keyword">return</span> <span class="string">&quot;&quot;</span>;</span><br><span class="line"> Jws&lt;Claims&gt; claimsJws = Jwts.parser().setSigningKey(APP_SECRET).parseClaimsJws(jwtToken);</span><br><span class="line"> <span class="type">Claims</span> <span class="variable">claims</span> <span class="operator">=</span> claimsJws.getBody();</span><br><span class="line"> <span class="keyword">return</span> (String)claims.get(<span class="string">&quot;id&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="3-在登录中使用Jwt工具"><a href="#3-在登录中使用Jwt工具" class="headerlink" title="3.在登录中使用Jwt工具"></a>3.在登录中使用Jwt工具</h3><p>1.登录成功之后返回token字符串</p>
<p><img src="/pictures/image-20230420110340570.png" alt="image-20230420110340570"></p>
<p>2.前端处理的思路</p>
<p>获取token字符串 <strong>-&gt;</strong> 将token字符串和用户信息存放在cokkie中 <strong>-&gt;</strong> 页面在cokkie中获取用户信息显示在页面上</p>
<p>前端登录与否的校验、后端网关登录与否的校验…….</p>
<p>之后补充完整的代码示例 这里没有遇到好的登录示例 ……….</p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>Java</tag>
</tags>
</entry>
<entry>
<title>FreeMarker模板引擎</title>
<url>/posts/29367.html</url>
<content><![CDATA[<h1 id="一-FreeMarker介绍"><a href="#一-FreeMarker介绍" class="headerlink" title="一.FreeMarker介绍"></a>一.FreeMarker介绍</h1><p> FreeMarker 是一款 模板引擎: 即一种基于模板和要改变的数据, 并用来生成输出文本(HTML网页电子邮件配置文件源代码等)的通用工具。 它不是面向最终用户的而是一个Java类库是一款程序员可以嵌入他们所开发产品的组件。</p>
<p> 模板编写为FreeMarker Template Language (FTL)。它是简单的,专用的语言, <em>不是</em> 像PHP那样成熟的编程语言。 那就意味着要准备数据在真实编程语言中来显示,比如数据库查询和业务运算, 之后模板显示已经准备好的数据。在模板中,你可以专注于如何展现数据, 而在模板之外可以专注于要展示什么数据。</p>
<p><img src="/pictures/image-20230816145012534.png" alt="image-20230816145012534"></p>
<p><strong>技术选型对比</strong></p>
<table>
<thead>
<tr>
<th><strong>技术</strong></th>
<th><strong>说明</strong></th>
</tr>
</thead>
<tbody><tr>
<td>Jsp</td>
<td>Jsp 为 Servlet 专用,不能单独进行使用</td>
</tr>
<tr>
<td>Velocity</td>
<td>Velocity从2010年更新完 2.0 版本后7年没有更新。Spring Boot 官方在 1.4 版本后对此也不在支持</td>
</tr>
<tr>
<td>thmeleaf</td>
<td>新技术,功能较为强大,但是执行的效率比较低</td>
</tr>
<tr>
<td>freemarker</td>
<td>性能好,强大的模板语言、轻量</td>
</tr>
</tbody></table>
<h1 id="二-快速入门"><a href="#二-快速入门" class="headerlink" title="二.快速入门"></a>二.快速入门</h1><h2 id="1-环境搭建"><a href="#1-环境搭建" class="headerlink" title="1.环境搭建"></a>1.环境搭建</h2><h3 id="1-1-创建一个demo工程"><a href="#1-1-创建一个demo工程" class="headerlink" title="1.1 创建一个demo工程"></a>1.1 创建一个demo工程</h3><p>此处为了方便建的是子模块,测试使用可以创建一个单独的工程</p>
<p><img src="/pictures/image-20230816145923876.png" alt="image-20230816145923876"></p>
<h3 id="1-2-引入依赖"><a href="#1-2-引入依赖" class="headerlink" title="1.2 引入依赖"></a>1.2 引入依赖</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependencies</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-web<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-freemarker<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-test<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- lombok --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.projectlombok<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>lombok<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- apache 对 java io 的封装工具库 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.apache.commons<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>commons-io<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>1.3.2<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependencies</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="1-3-添加配置"><a href="#1-3-添加配置" class="headerlink" title="1.3 添加配置"></a>1.3 添加配置</h3><figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">server:</span></span><br><span class="line"> <span class="attr">port:</span> <span class="number">8881</span> <span class="comment">#服务端口</span></span><br><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">application:</span></span><br><span class="line"> <span class="attr">name:</span> <span class="string">freemarker-demo</span> <span class="comment">#指定服务名</span></span><br><span class="line"> <span class="attr">freemarker:</span></span><br><span class="line"> <span class="attr">cache:</span> <span class="literal">false</span> <span class="comment">#关闭模板缓存,方便测试</span></span><br><span class="line"> <span class="attr">settings:</span></span><br><span class="line"> <span class="attr">template_update_delay:</span> <span class="number">0</span> <span class="comment">#检查模板更新延迟时间设置为0表示立即检查如果时间大于0会有缓存不方便进行模板测试</span></span><br><span class="line"> <span class="attr">suffix:</span> <span class="string">.ftl</span> <span class="comment">#指定Freemarker模板文件的后缀名,通常都是以ftl作为扩展名,也可以为html、xml、jsp等!</span></span><br></pre></td></tr></table></figure>
<h3 id="1-4-创建模板"><a href="#1-4-创建模板" class="headerlink" title="1.4 创建模板"></a>1.4 创建模板</h3><p>在resources下创建<strong>templates</strong>此目录为freemarker的默认模板存放目录</p>
<p><img src="/pictures/image-20230816150936881.png" alt="image-20230816150936881"></p>
<p>在templates下创建模板文件 01-basic.ftl ,模板中的<strong>插值表达式</strong>最终会被freemarker替换成具体的数据</p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;utf-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>Hello World!<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">b</span>&gt;</span>普通文本 String 展示:<span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">Hello $&#123;name&#125; <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">b</span>&gt;</span>对象Student中的数据展示<span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">姓名:$&#123;stu.name&#125;<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">年龄:$&#123;stu.age&#125;</span><br><span class="line"><span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="1-5-创建启动类和模型类"><a href="#1-5-创建启动类和模型类" class="headerlink" title="1.5 创建启动类和模型类"></a>1.5 创建启动类和模型类</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.freemarker;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.SpringApplication;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.autoconfigure.SpringBootApplication;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/16</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@SpringBootApplication</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">FreeMarkerDemoApplication</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> SpringApplication.run(FreeMarkerDemoApplication.class,args);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.freemarker.entity;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/16</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Student</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> String name;<span class="comment">//姓名</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> age;<span class="comment">//年龄</span></span><br><span class="line"> <span class="keyword">private</span> Date birthday;<span class="comment">//生日</span></span><br><span class="line"> <span class="keyword">private</span> Float money;<span class="comment">//钱包</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="1-6-创建Controller"><a href="#1-6-创建Controller" class="headerlink" title="1.6 创建Controller"></a>1.6 创建Controller</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.freemarker.controller;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.freemarker.entity.Student;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Controller;</span><br><span class="line"><span class="keyword">import</span> org.springframework.ui.Model;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.GetMapping;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/16</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">HelloController</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/basic&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">test</span><span class="params">(Model model)</span> &#123;</span><br><span class="line"> <span class="comment">//1.纯文本形式的参数</span></span><br><span class="line"> model.addAttribute(<span class="string">&quot;name&quot;</span>, <span class="string">&quot;freemarker&quot;</span>);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//2.实体类相关的参数</span></span><br><span class="line"> <span class="type">Student</span> <span class="variable">student</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Student</span>();</span><br><span class="line"> student.setName(<span class="string">&quot;小明&quot;</span>);</span><br><span class="line"> student.setAge(<span class="number">18</span>);</span><br><span class="line"> model.addAttribute(<span class="string">&quot;stu&quot;</span>, student);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;01-basic&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="1-7-测试访问"><a href="#1-7-测试访问" class="headerlink" title="1.7 测试访问"></a>1.7 测试访问</h3><p>访问 <a href="http://localhost:8881/basic">http://localhost:8881/basic</a></p>
<p><img src="/pictures/image-20230816152750639.png" alt="image-20230816152750639"></p>
<h1 id="三-FreeMarker语法基础"><a href="#三-FreeMarker语法基础" class="headerlink" title="三.FreeMarker语法基础"></a>三.FreeMarker语法基础</h1><h2 id="1-基础语法种类"><a href="#1-基础语法种类" class="headerlink" title="1.基础语法种类"></a>1.基础语法种类</h2><p> 1、注释即&lt;# &gt;介于其之间的内容会被freemarker忽略</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;#--我是一个freemarker注释--&gt;</span><br></pre></td></tr></table></figure>
<p> 2、插值Interpolation即 <strong><code>$&#123;..&#125;</code></strong> 部分,freemarker会用真实的值代替**<code>$&#123;..&#125;</code>**</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">Hello $&#123;name&#125;</span><br></pre></td></tr></table></figure>
<p> 3、FTL指令和HTML标记类似名字前加#予以区分Freemarker会解析标签中的表达式或逻辑。</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;# &gt;FTL指令&lt;/#&gt; </span><br></pre></td></tr></table></figure>
<p> 4、文本仅文本信息这些不是freemarker的注释、插值、FTL指令的内容会被freemarker忽略解析直接输出内容。</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;#--freemarker中的普通文本--&gt;</span><br><span class="line">我是一个普通的文本</span><br></pre></td></tr></table></figure>
<h2 id="2-集合指令"><a href="#2-集合指令" class="headerlink" title="2.集合指令"></a>2.集合指令</h2><p><img src="/pictures/image-20230816170028648.png" alt="image-20230816170028648"></p>
<p><img src="/pictures/image-20230816170704421.png" alt="image-20230816170704421"></p>
<p>1、数据模型</p>
<p>在HelloController中新增如下方法</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@GetMapping(&quot;/list&quot;)</span></span><br><span class="line"><span class="keyword">public</span> String <span class="title function_">list</span><span class="params">(Model model)</span>&#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//------------------------------------</span></span><br><span class="line"> <span class="type">Student</span> <span class="variable">stu1</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Student</span>();</span><br><span class="line"> stu1.setName(<span class="string">&quot;小强&quot;</span>);</span><br><span class="line"> stu1.setAge(<span class="number">18</span>);</span><br><span class="line"> stu1.setMoney(<span class="number">1000.86f</span>);</span><br><span class="line"> stu1.setBirthday(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"></span><br><span class="line"> <span class="comment">//小红对象模型数据</span></span><br><span class="line"> <span class="type">Student</span> <span class="variable">stu2</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Student</span>();</span><br><span class="line"> stu2.setName(<span class="string">&quot;小红&quot;</span>);</span><br><span class="line"> stu2.setMoney(<span class="number">200.1f</span>);</span><br><span class="line"> stu2.setAge(<span class="number">19</span>);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//将两个对象模型数据存放到List集合中</span></span><br><span class="line"> List&lt;Student&gt; stus = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> stus.add(stu1);</span><br><span class="line"> stus.add(stu2);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//向model中存放List集合数据</span></span><br><span class="line"> model.addAttribute(<span class="string">&quot;stus&quot;</span>,stus);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//------------------------------------</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//创建Map数据</span></span><br><span class="line"> HashMap&lt;String,Student&gt; stuMap = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> stuMap.put(<span class="string">&quot;stu1&quot;</span>,stu1);</span><br><span class="line"> stuMap.put(<span class="string">&quot;stu2&quot;</span>,stu2);</span><br><span class="line"> <span class="comment">// 3.1 向model中存放Map数据</span></span><br><span class="line"> model.addAttribute(<span class="string">&quot;stuMap&quot;</span>, stuMap);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;02-list&quot;</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>2、模板</p>
<p>在templates中新增<code>02-list.ftl</code>文件</p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;utf-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>Hello World!<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> </span><br><span class="line">&lt;#-- list 数据的展示 --&gt;</span><br><span class="line"><span class="tag">&lt;<span class="name">b</span>&gt;</span>展示list中的stu数据:<span class="tag">&lt;/<span class="name">b</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">table</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">tr</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>序号<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>姓名<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>年龄<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>钱包<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">table</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line"> </span><br><span class="line">&lt;#-- Map 数据的展示 --&gt;</span><br><span class="line"><span class="tag">&lt;<span class="name">b</span>&gt;</span>map数据的展示<span class="tag">&lt;/<span class="name">b</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">br</span>/&gt;</span><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;###&quot;</span>&gt;</span>方式一通过map[&#x27;keyname&#x27;].property<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">输出stu1的学生信息<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">姓名:<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">年龄:<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;###&quot;</span>&gt;</span>方式二通过map.keyname.property<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">输出stu2的学生信息<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">姓名:<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">年龄:<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;###&quot;</span>&gt;</span>遍历map中两个学生信息<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">table</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">tr</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>序号<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>姓名<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>年龄<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>钱包<span class="tag">&lt;/<span class="name">td</span>&gt;</span> </span><br><span class="line"> <span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">table</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line"> </span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>实例代码:</p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;utf-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>Hello World!<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> </span><br><span class="line">&lt;#-- list 数据的展示 --&gt;</span><br><span class="line"><span class="tag">&lt;<span class="name">b</span>&gt;</span>展示list中的stu数据:<span class="tag">&lt;/<span class="name">b</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">table</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">tr</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>序号<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>姓名<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>年龄<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>钱包<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line"> &lt;#list stus as stu&gt;</span><br><span class="line"> <span class="tag">&lt;<span class="name">tr</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>$&#123;stu_index+1&#125;<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>$&#123;stu.name&#125;<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>$&#123;stu.age&#125;<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>$&#123;stu.money&#125;<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line"> &lt;/#list&gt;</span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">table</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line"> </span><br><span class="line">&lt;#-- Map 数据的展示 --&gt;</span><br><span class="line"><span class="tag">&lt;<span class="name">b</span>&gt;</span>map数据的展示<span class="tag">&lt;/<span class="name">b</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">br</span>/&gt;</span><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;###&quot;</span>&gt;</span>方式一通过map[&#x27;keyname&#x27;].property<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">输出stu1的学生信息<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">姓名:$&#123;stuMap[&#x27;stu1&#x27;].name&#125;<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">年龄:$&#123;stuMap[&#x27;stu1&#x27;].age&#125;<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;###&quot;</span>&gt;</span>方式二通过map.keyname.property<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">输出stu2的学生信息<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">姓名:$&#123;stuMap.stu2.name&#125;<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">年龄:$&#123;stuMap.stu2.age&#125;<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;###&quot;</span>&gt;</span>遍历map中两个学生信息<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">table</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">tr</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>序号<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>姓名<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>年龄<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>钱包<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line"> &lt;#list stuMap?keys as key &gt;</span><br><span class="line"> <span class="tag">&lt;<span class="name">tr</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>$&#123;key_index&#125;<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>$&#123;stuMap[key].name&#125;<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>$&#123;stuMap[key].age&#125;<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">td</span>&gt;</span>$&#123;stuMap[key].money&#125;<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line"> &lt;/#list&gt;</span><br><span class="line"><span class="tag">&lt;/<span class="name">table</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line"> </span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>上面代码解释:</p>
<p>${k_index}index得到循环的下标使用方法是在stu后边加”_index”它的值是从0开始${stu_index+1}下标从1开始</p>
<p>展示效果:</p>
<p><img src="/pictures/image-20230816170550343.png" alt="image-20230816170550343"></p>
<h2 id="3-if指令"><a href="#3-if指令" class="headerlink" title="3.if指令"></a>3.if指令</h2><p><img src="/pictures/image-20230816170909497.png" alt="image-20230816170909497"></p>
<p> if 指令即判断指令是常用的FTL指令freemarker在解析时遇到if会进行判断条件为真则输出if中间的内容否则跳过内容不再输出。</p>
<ul>
<li>指令格式</li>
</ul>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line">&lt;#if &gt;<span class="tag">&lt;/<span class="name">if</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>1、数据模型</p>
<p>使用list指令中测试数据模型判断名称为小红的数据字体显示为红色。</p>
<p>2、模板</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;table&gt;</span><br><span class="line"> &lt;tr&gt;</span><br><span class="line"> &lt;td&gt;姓名&lt;/td&gt;</span><br><span class="line"> &lt;td&gt;年龄&lt;/td&gt;</span><br><span class="line"> &lt;td&gt;钱包&lt;/td&gt;</span><br><span class="line"> &lt;/tr&gt;</span><br><span class="line"> &lt;#list stus as stu&gt;</span><br><span class="line"> &lt;tr&gt;</span><br><span class="line"> &lt;td &gt;$&#123;stu.name&#125;&lt;/td&gt;</span><br><span class="line"> &lt;td&gt;$&#123;stu.age&#125;&lt;/td&gt;</span><br><span class="line"> &lt;td &gt;$&#123;stu.mondy&#125;&lt;/td&gt;</span><br><span class="line"> &lt;/tr&gt;</span><br><span class="line"> &lt;/#list&gt;</span><br><span class="line"></span><br><span class="line">&lt;/table&gt;</span><br></pre></td></tr></table></figure>
<p>实例代码:</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;table&gt;</span><br><span class="line"> &lt;tr&gt;</span><br><span class="line"> &lt;td&gt;姓名&lt;/td&gt;</span><br><span class="line"> &lt;td&gt;年龄&lt;/td&gt;</span><br><span class="line"> &lt;td&gt;钱包&lt;/td&gt;</span><br><span class="line"> &lt;/tr&gt;</span><br><span class="line"> &lt;#list stus as stu &gt;</span><br><span class="line"> &lt;#if stu.name=&#x27;小红&#x27;&gt;</span><br><span class="line"> &lt;tr style=&quot;color: red&quot;&gt;</span><br><span class="line"> &lt;td&gt;$&#123;stu_index&#125;&lt;/td&gt;</span><br><span class="line"> &lt;td&gt;$&#123;stu.name&#125;&lt;/td&gt;</span><br><span class="line"> &lt;td&gt;$&#123;stu.age&#125;&lt;/td&gt;</span><br><span class="line"> &lt;td&gt;$&#123;stu.money&#125;&lt;/td&gt;</span><br><span class="line"> &lt;/tr&gt;</span><br><span class="line"> &lt;#else &gt;</span><br><span class="line"> &lt;tr&gt;</span><br><span class="line"> &lt;td&gt;$&#123;stu_index&#125;&lt;/td&gt;</span><br><span class="line"> &lt;td&gt;$&#123;stu.name&#125;&lt;/td&gt;</span><br><span class="line"> &lt;td&gt;$&#123;stu.age&#125;&lt;/td&gt;</span><br><span class="line"> &lt;td&gt;$&#123;stu.money&#125;&lt;/td&gt;</span><br><span class="line"> &lt;/tr&gt;</span><br><span class="line"> &lt;/#if&gt;</span><br><span class="line"> &lt;/#list&gt;</span><br><span class="line">&lt;/table&gt;</span><br></pre></td></tr></table></figure>
<p>3、输出</p>
<p><img src="/pictures/image-20230816171119081.png" alt="image-20230816171119081"></p>
<h2 id="4-运算符"><a href="#4-运算符" class="headerlink" title="4.运算符"></a>4.运算符</h2><p><strong>1、算数运算符</strong></p>
<p>FreeMarker表达式中完全支持算术运算,FreeMarker支持的算术运算符包括:</p>
<ul>
<li>加法: <code>+</code></li>
<li>减法: <code>-</code></li>
<li>乘法: <code>*</code></li>
<li>除法: <code>/</code></li>
<li>求模 (求余) <code>%</code></li>
</ul>
<p>模板代码</p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">b</span>&gt;</span>算数运算符<span class="tag">&lt;/<span class="name">b</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">br</span>/&gt;</span><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"> 100+5 运算: $&#123;100 + 5 &#125;<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"> 100 - 5 * 5运算$&#123;100 - 5 * 5&#125;<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"> 5 / 2运算$&#123;5 / 2&#125;<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"> 12 % 10运算$&#123;12 % 10&#125;<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>除了 + 运算以外,其他的运算只能和 number 数字类型的计算。</p>
<p><strong>2、比较运算符</strong></p>
<ul>
<li><strong><code>=</code><strong>或者</strong><code>==</code></strong>:判断两个值是否相等. </li>
<li><strong><code>!=</code></strong>:判断两个值是否不等. </li>
<li><strong><code>&gt;</code><strong>或者</strong><code>gt</code></strong>:判断左边值是否大于右边值 </li>
<li><strong><code>&gt;=</code><strong>或者</strong><code>gte</code></strong>:判断左边值是否大于等于右边值 </li>
<li><strong><code>&lt;</code><strong>或者</strong><code>lt</code></strong>:判断左边值是否小于右边值 </li>
<li><strong><code>&lt;=</code><strong>或者</strong><code>lte</code></strong>:判断左边值是否小于等于右边值</li>
</ul>
<p>&#x3D; 和 &#x3D;&#x3D; 模板代码</p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;utf-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>Hello World!<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">b</span>&gt;</span>比较运算符<span class="tag">&lt;/<span class="name">b</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">dl</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dt</span>&gt;</span> =/== 和 != 比较:<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dd</span>&gt;</span></span><br><span class="line"> &lt;#if &quot;xiaoming&quot; == &quot;xiaoming&quot;&gt;</span><br><span class="line"> 字符串的比较 &quot;xiaoming&quot; == &quot;xiaoming&quot;</span><br><span class="line"> &lt;/#if&gt;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dd</span>&gt;</span></span><br><span class="line"> &lt;#if 10 != 100&gt;</span><br><span class="line"> 数值的比较 10 != 100</span><br><span class="line"> &lt;/#if&gt;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dl</span>&gt;</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">dl</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dt</span>&gt;</span>其他比较<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dd</span>&gt;</span></span><br><span class="line"> &lt;#if 10 gt 5 &gt;</span><br><span class="line"> 形式一:使用特殊字符比较数值 10 gt 5</span><br><span class="line"> &lt;/#if&gt;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dd</span>&gt;</span></span><br><span class="line"> &lt;#-- 日期的比较需要通过?date将属性转为data类型才能进行比较 --&gt;</span><br><span class="line"> &lt;#if (date1?date &gt;= date2?date)&gt;</span><br><span class="line"> 形式二:使用括号形式比较时间 date1?date &gt;= date2?date</span><br><span class="line"> &lt;/#if&gt;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dl</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>Controller 的 数据模型代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@GetMapping(&quot;operation&quot;)</span></span><br><span class="line"><span class="keyword">public</span> String <span class="title function_">testOperation</span><span class="params">(Model model)</span> &#123;</span><br><span class="line"> <span class="comment">//构建 Date 数据</span></span><br><span class="line"> <span class="type">Date</span> <span class="variable">now</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Date</span>();</span><br><span class="line"> model.addAttribute(<span class="string">&quot;date1&quot;</span>, now);</span><br><span class="line"> model.addAttribute(<span class="string">&quot;date2&quot;</span>, now);</span><br><span class="line"> </span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;03-operation&quot;</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>比较运算符注意</strong></p>
<ul>
<li><code>=</code>和<code>!=</code>可以用于字符串、数值和日期来比较是否相等</li>
<li><code>=</code>和<code>!=</code>两边必须是相同类型的值,否则会产生错误</li>
<li>字符串 <code>&quot;x&quot;</code> 、<code>&quot;x &quot;</code> 、<code>&quot;X&quot;</code>比较是不等的.因为FreeMarker是精确比较</li>
<li>其它的运行符可以作用于数字和日期,但不能作用于字符串</li>
<li>使用<code>gt</code>等字母运算符代替<code>&gt;</code>会有更好的效果,因为 FreeMarker会把<code>&gt;</code>解释成FTL标签的结束字符</li>
<li>可以使用括号来避免这种情况,如:<code>&lt;#if (x&gt;y)&gt;</code></li>
</ul>
<p><strong>3、逻辑运算符</strong></p>
<ul>
<li>逻辑与:&amp;&amp; </li>
<li>逻辑或:|| </li>
<li>逻辑非:!</li>
</ul>
<p>逻辑运算符只能作用于布尔值,否则将产生错误 。</p>
<p>模板代码</p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">b</span>&gt;</span>逻辑运算符<span class="tag">&lt;/<span class="name">b</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"> &lt;#if (10 lt 12 )&amp;&amp;( 10 gt 5 ) &gt;</span><br><span class="line"> (10 lt 12 )&amp;&amp;( 10 gt 5 ) 显示为 true</span><br><span class="line"> &lt;/#if&gt;</span><br><span class="line"> <span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line"> &lt;#if !false&gt;</span><br><span class="line"> false 取反为true</span><br><span class="line"> &lt;/#if&gt;</span><br><span class="line"><span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h2 id="5-空值处理"><a href="#5-空值处理" class="headerlink" title="5.空值处理"></a>5.空值处理</h2><p><strong>1、判断某变量是否存在使用 “??”</strong></p>
<p>用法为:variable??,如果该变量存在,返回true,否则返回false </p>
<p>例为防止stus为空报错可以加上判断如下</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;#if stus??&gt;</span><br><span class="line">&lt;#list stus as stu&gt;</span><br><span class="line"> ......</span><br><span class="line">&lt;/#list&gt;</span><br><span class="line">&lt;/#if&gt;</span><br></pre></td></tr></table></figure>
<p><strong>2、缺失变量默认值使用 “!”</strong></p>
<ul>
<li><p>使用!要以指定一个默认值,当变量为空时显示默认值</p>
<p>例: ${name!}表示如果name为空显示空字符串。</p>
</li>
<li><p>如果是嵌套对象则建议使用()括起来</p>
<p>例: ${(stu.bestFriend.name)!}表示如果stu或bestFriend或name为空默认显示空字符串。</p>
</li>
</ul>
<h2 id="6-内建函数"><a href="#6-内建函数" class="headerlink" title="6.内建函数"></a>6.内建函数</h2><p>内建函数语法格式: <strong><code>变量+?+函数名称</code></strong> </p>
<p><strong>1、某个集合的大小</strong></p>
<p><strong><code>$&#123;集合名?size&#125;</code></strong></p>
<p><strong>2、日期格式化</strong></p>
<p>显示年月日: <code>$&#123;today?date&#125;</code> </p>
<p>显示时分秒:<code>$&#123;today?time&#125;</code> </p>
<p>显示日期+时间:<code>$&#123;today?datetime&#125;</code> </p>
<p>自定义格式化: <code>$&#123;today?string(&quot;yyyy年MM月&quot;)&#125;</code></p>
<p><strong>3、内建函数<code>c</code></strong></p>
<p>model.addAttribute(“point”, 102920122);</p>
<p>point是数字型使用${point}会显示这个数字的值,每三位使用逗号分隔。</p>
<p>如果不想显示为每三位分隔的数字可以使用c函数将数字型转成字符串输出</p>
<p><strong><code>$&#123;point?c&#125;</code></strong></p>
<p><strong>4、将json字符串转成对象</strong></p>
<p>一个例子:</p>
<p>其中用到了 assign标签assign的作用是定义一个变量。</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;#assign text=&quot;&#123;&#x27;bank&#x27;:&#x27;工商银行&#x27;,&#x27;account&#x27;:&#x27;10101920201920212&#x27;&#125;&quot; /&gt;</span><br><span class="line">&lt;#assign data=text?eval /&gt;</span><br><span class="line">开户行:$&#123;data.bank&#125; 账号:$&#123;data.account&#125;</span><br></pre></td></tr></table></figure>
<p>模板代码:</p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;utf-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>inner Function<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">b</span>&gt;</span>获得集合大小<span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> 集合大小:</span><br><span class="line"> <span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">b</span>&gt;</span>获得日期<span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> 显示年月日: <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> 显示时分秒:<span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> 显示日期+时间:<span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> 自定义格式化: <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">b</span>&gt;</span>内建函数C<span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> 没有C函数显示的数值 <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> 有C函数显示的数值</span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">b</span>&gt;</span>声明变量assign<span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>内建函数模板页面:</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;!DOCTYPE html&gt;</span><br><span class="line">&lt;html&gt;</span><br><span class="line">&lt;head&gt;</span><br><span class="line"> &lt;meta charset=&quot;utf-8&quot;&gt;</span><br><span class="line"> &lt;title&gt;inner Function&lt;/title&gt;</span><br><span class="line">&lt;/head&gt;</span><br><span class="line">&lt;body&gt;</span><br><span class="line"></span><br><span class="line"> &lt;b&gt;获得集合大小&lt;/b&gt;&lt;br&gt;</span><br><span class="line"></span><br><span class="line"> 集合大小:$&#123;stus?size&#125;</span><br><span class="line"> &lt;hr&gt;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> &lt;b&gt;获得日期&lt;/b&gt;&lt;br&gt;</span><br><span class="line"></span><br><span class="line"> 显示年月日: $&#123;today?date&#125; &lt;br&gt;</span><br><span class="line"></span><br><span class="line"> 显示时分秒:$&#123;today?time&#125;&lt;br&gt;</span><br><span class="line"></span><br><span class="line"> 显示日期+时间:$&#123;today?datetime&#125;&lt;br&gt;</span><br><span class="line"></span><br><span class="line"> 自定义格式化: $&#123;today?string(&quot;yyyy年MM月&quot;)&#125;&lt;br&gt;</span><br><span class="line"></span><br><span class="line"> &lt;hr&gt;</span><br><span class="line"></span><br><span class="line"> &lt;b&gt;内建函数C&lt;/b&gt;&lt;br&gt;</span><br><span class="line"> 没有C函数显示的数值$&#123;point&#125; &lt;br&gt;</span><br><span class="line"></span><br><span class="line"> 有C函数显示的数值$&#123;point?c&#125;</span><br><span class="line"></span><br><span class="line"> &lt;hr&gt;</span><br><span class="line"></span><br><span class="line"> &lt;b&gt;声明变量assign&lt;/b&gt;&lt;br&gt;</span><br><span class="line"> &lt;#assign text=&quot;&#123;&#x27;bank&#x27;:&#x27;工商银行&#x27;,&#x27;account&#x27;:&#x27;10101920201920212&#x27;&#125;&quot; /&gt;</span><br><span class="line"> &lt;#assign data=text?eval /&gt;</span><br><span class="line"> 开户行:$&#123;data.bank&#125; 账号:$&#123;data.account&#125;</span><br><span class="line"></span><br><span class="line">&lt;hr&gt;</span><br><span class="line">&lt;/body&gt;</span><br><span class="line">&lt;/html&gt;</span><br></pre></td></tr></table></figure>
<p>内建函数Controller数据模型</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@GetMapping(&quot;innerFunc&quot;)</span></span><br><span class="line"><span class="keyword">public</span> String <span class="title function_">testInnerFunc</span><span class="params">(Model model)</span> &#123;</span><br><span class="line"> <span class="comment">//1.1 小强对象模型数据</span></span><br><span class="line"> <span class="type">Student</span> <span class="variable">stu1</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Student</span>();</span><br><span class="line"> stu1.setName(<span class="string">&quot;小强&quot;</span>);</span><br><span class="line"> stu1.setAge(<span class="number">18</span>);</span><br><span class="line"> stu1.setMoney(<span class="number">1000.86f</span>);</span><br><span class="line"> stu1.setBirthday(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> <span class="comment">//1.2 小红对象模型数据</span></span><br><span class="line"> <span class="type">Student</span> <span class="variable">stu2</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Student</span>();</span><br><span class="line"> stu2.setName(<span class="string">&quot;小红&quot;</span>);</span><br><span class="line"> stu2.setMoney(<span class="number">200.1f</span>);</span><br><span class="line"> stu2.setAge(<span class="number">19</span>);</span><br><span class="line"> <span class="comment">//1.3 将两个对象模型数据存放到List集合中</span></span><br><span class="line"> List&lt;Student&gt; stus = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> stus.add(stu1);</span><br><span class="line"> stus.add(stu2);</span><br><span class="line"> model.addAttribute(<span class="string">&quot;stus&quot;</span>, stus);</span><br><span class="line"> <span class="comment">// 2.1 添加日期</span></span><br><span class="line"> <span class="type">Date</span> <span class="variable">date</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Date</span>();</span><br><span class="line"> model.addAttribute(<span class="string">&quot;today&quot;</span>, date);</span><br><span class="line"> <span class="comment">// 3.1 添加数值</span></span><br><span class="line"> model.addAttribute(<span class="string">&quot;point&quot;</span>, <span class="number">102920122</span>);</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;04-innerFunc&quot;</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h1 id="四-静态化测试"><a href="#四-静态化测试" class="headerlink" title="四.静态化测试"></a>四.静态化测试</h1><h2 id="1-思路分析"><a href="#1-思路分析" class="headerlink" title="1.思路分析"></a>1.思路分析</h2><p><img src="/pictures/image-20230816172633599.png" alt="image-20230816172633599"></p>
<h2 id="2-实现步骤"><a href="#2-实现步骤" class="headerlink" title="2.实现步骤"></a>2.实现步骤</h2><p><strong>根据模板文件生成html文件</strong></p>
<p>①修改application.yml文件添加以下模板存放位置的配置信息完整配置如下</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">server:</span></span><br><span class="line"> <span class="attr">port:</span> <span class="number">8881</span> <span class="comment">#服务端口</span></span><br><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">application:</span></span><br><span class="line"> <span class="attr">name:</span> <span class="string">freemarker-demo</span> <span class="comment">#指定服务名</span></span><br><span class="line"> <span class="attr">freemarker:</span></span><br><span class="line"> <span class="attr">cache:</span> <span class="literal">false</span> <span class="comment">#关闭模板缓存,方便测试</span></span><br><span class="line"> <span class="attr">settings:</span></span><br><span class="line"> <span class="attr">template_update_delay:</span> <span class="number">0</span> <span class="comment">#检查模板更新延迟时间设置为0表示立即检查如果时间大于0会有缓存不方便进行模板测试</span></span><br><span class="line"> <span class="attr">suffix:</span> <span class="string">.ftl</span> <span class="comment">#指定Freemarker模板文件的后缀名</span></span><br><span class="line"> <span class="attr">template-loader-path:</span> <span class="string">classpath:/templates</span> <span class="comment">#模板存放位置</span></span><br></pre></td></tr></table></figure>
<p>②在test下创建测试类</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.freemarker.test;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.freemarker.FreeMarkerDemoApplication;</span><br><span class="line"><span class="keyword">import</span> com.heima.freemarker.entity.Student;</span><br><span class="line"><span class="keyword">import</span> freemarker.template.Configuration;</span><br><span class="line"><span class="keyword">import</span> freemarker.template.Template;</span><br><span class="line"><span class="keyword">import</span> freemarker.template.TemplateException;</span><br><span class="line"><span class="keyword">import</span> org.junit.Test;</span><br><span class="line"><span class="keyword">import</span> org.junit.runner.RunWith;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.test.context.SpringBootTest;</span><br><span class="line"><span class="keyword">import</span> org.springframework.test.context.junit4.SpringRunner;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.FileWriter;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.util.HashMap;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/16</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@SpringBootTest(classes = FreeMarkerDemoApplication.class)</span></span><br><span class="line"><span class="meta">@RunWith(SpringRunner.class)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">FreeMarkerTest</span> &#123;</span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="comment">//freemarker.template.Configuration</span></span><br><span class="line"> <span class="keyword">private</span> Configuration configuration;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">test</span><span class="params">()</span> <span class="keyword">throws</span> IOException, TemplateException &#123;</span><br><span class="line"> <span class="type">Template</span> <span class="variable">template</span> <span class="operator">=</span> configuration.getTemplate(<span class="string">&quot;01-basic.ftl&quot;</span>);</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 第一个参数:数据模型</span></span><br><span class="line"><span class="comment"> * 第二个参数:输出流</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> template.process(getData(),<span class="keyword">new</span> <span class="title class_">FileWriter</span>(<span class="string">&quot;C:\\Gong\\data\\test.html&quot;</span>));</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 构建数据模型</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Map&lt;String,Object&gt; <span class="title function_">getData</span><span class="params">()</span>&#123;</span><br><span class="line"> HashMap&lt;String, Object&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//1.纯文本形式的参数</span></span><br><span class="line"> map.put(<span class="string">&quot;name&quot;</span>, <span class="string">&quot;freemarker&quot;</span>);</span><br><span class="line"> <span class="comment">//2.实体类相关的参数</span></span><br><span class="line"> <span class="type">Student</span> <span class="variable">student</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Student</span>();</span><br><span class="line"> student.setName(<span class="string">&quot;小明&quot;</span>);</span><br><span class="line"> student.setAge(<span class="number">18</span>);</span><br><span class="line"> map.put(<span class="string">&quot;stu&quot;</span>, student);</span><br><span class="line"> <span class="keyword">return</span> map;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p> ③ :运行结果</p>
<p><img src="/pictures/image-20230816174550953.png" alt="image-20230816174550953"></p>
]]></content>
<categories>
<category>前端</category>
</categories>
<tags>
<tag>FreeMarker</tag>
</tags>
</entry>
<entry>
<title>Java爬虫</title>
<url>/posts/60685.html</url>
<content><![CDATA[<p>视频教程1: 狂神说Java Jsoup爬虫入门实战 <a href="https://www.bilibili.com/video/BV1La4y1x7Wm?vd_source=aee5e475191b69e6c781059ab6662584">https://www.bilibili.com/video/BV1La4y1x7Wm?vd_source=aee5e475191b69e6c781059ab6662584</a></p>
<p>视频教程2<a href="https://www.bilibili.com/video/BV1RU4y147eZ?vd_source=aee5e475191b69e6c781059ab6662584">https://www.bilibili.com/video/BV1RU4y147eZ?vd_source=aee5e475191b69e6c781059ab6662584</a></p>
<p>具体的看视频 急速入门</p>
<h2 id="入门实战教程"><a href="#入门实战教程" class="headerlink" title="入门实战教程"></a>入门实战教程</h2><h3 id="1-引入依赖"><a href="#1-引入依赖" class="headerlink" title="1.引入依赖"></a>1.引入依赖</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 爬取视频或者音频需要使用别的依赖 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.jsoup<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>jsoup<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>1.14.3<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-编写测试代码"><a href="#2-编写测试代码" class="headerlink" title="2.编写测试代码"></a>2.编写测试代码</h3><p>下面我们以爬取京东上的商品的图片和价格为例</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.jason;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.jsoup.Jsoup;</span><br><span class="line"><span class="keyword">import</span> org.jsoup.nodes.Document;</span><br><span class="line"><span class="keyword">import</span> org.jsoup.nodes.Element;</span><br><span class="line"><span class="keyword">import</span> org.jsoup.select.Elements;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.net.URL;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/9</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">HtmlParseUtil</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> HtmlParseUtil.parseJd(<span class="string">&quot;联想电脑&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 爬取京东上的商品数据</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> keywords 商品的品牌或者关键字 例如 联想电脑、华为手机、java书籍</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">parseJd</span><span class="params">(String keywords)</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="comment">//获取请求</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">url</span> <span class="operator">=</span> <span class="string">&quot;https://search.jd.com/Search?keyword=&quot;</span> + keywords;<span class="comment">//页面上的地址信息</span></span><br><span class="line"> <span class="comment">//解析网页</span></span><br><span class="line"> <span class="comment">//第一个参数是url地址</span></span><br><span class="line"> <span class="comment">//第二个参数是响应时间,超过30秒就报错</span></span><br><span class="line"> <span class="comment">//返回的document就是浏览器的Document对象</span></span><br><span class="line"> <span class="type">Document</span> <span class="variable">document</span> <span class="operator">=</span> Jsoup.parse(<span class="keyword">new</span> <span class="title class_">URL</span>(url), <span class="number">30000</span>);</span><br><span class="line"> <span class="comment">//所有在js中可以使用的方法,这里都可以使用</span></span><br><span class="line"> <span class="type">Element</span> <span class="variable">element</span> <span class="operator">=</span> document.getElementById(<span class="string">&quot;J_goodsList&quot;</span>);<span class="comment">//通过id获取元素</span></span><br><span class="line"> <span class="comment">//获取所有的li元素</span></span><br><span class="line"> <span class="type">Elements</span> <span class="variable">elements</span> <span class="operator">=</span> element.getElementsByTag(<span class="string">&quot;li&quot;</span>);</span><br><span class="line"> <span class="comment">//遍历li元素的集合 获取每一个li元素</span></span><br><span class="line"> <span class="keyword">for</span> (Element el : elements) &#123;</span><br><span class="line"> <span class="comment">//这种图片特别多的图片 会有一个懒加载</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">attr</span> <span class="operator">=</span> el.getElementsByTag(<span class="string">&quot;img&quot;</span>).eq(<span class="number">0</span>).attr(<span class="string">&quot;data-lazy-img&quot;</span>);<span class="comment">//通过标签获取元素</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">title</span> <span class="operator">=</span> el.getElementsByClass(<span class="string">&quot;p-name&quot;</span>).eq(<span class="number">0</span>).text();<span class="comment">//通过class获取元素</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">price</span> <span class="operator">=</span> el.getElementsByClass(<span class="string">&quot;p-price&quot;</span>).eq(<span class="number">0</span>).text();</span><br><span class="line"> System.out.println(<span class="string">&quot;图片地址:https:&quot;</span> + attr);</span><br><span class="line"> System.out.println(<span class="string">&quot;商品名称:&quot;</span> + title);</span><br><span class="line"> System.out.println(<span class="string">&quot;商品价格:&quot;</span> + price);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="3-运行测试"><a href="#3-运行测试" class="headerlink" title="3.运行测试"></a>3.运行测试</h3><p><img src="/pictures/image-20230509161845558.png" alt="image-20230509161845558"></p>
<p><img src="/pictures/image-20230509161907139.png" alt="image-20230509161907139"></p>
<h2 id="示例"><a href="#示例" class="headerlink" title="示例"></a>示例</h2><h3 id="爬取房天下上面的房价信息"><a href="#爬取房天下上面的房价信息" class="headerlink" title="爬取房天下上面的房价信息"></a>爬取房天下上面的房价信息</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.jason;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.jsoup.Jsoup;</span><br><span class="line"><span class="keyword">import</span> org.jsoup.nodes.Document;</span><br><span class="line"><span class="keyword">import</span> org.jsoup.nodes.Element;</span><br><span class="line"><span class="keyword">import</span> org.jsoup.select.Elements;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.net.URL;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/9</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ParseHouse</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="comment">//爬起房天下上面的房源数据</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">91</span>;</span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>)&#123;<span class="comment">//换页读取 页面有分页条的情况</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">url</span> <span class="operator">=</span> <span class="string">&quot;https://newhouse.fang.com/house/s/b&quot;</span>+i;</span><br><span class="line"> System.out.println(<span class="string">&quot;正在爬取第&quot;</span>+i+<span class="string">&quot;页的数据.....&quot;</span>);</span><br><span class="line"> ParseHouse.selectHouses(url);</span><br><span class="line"> i++;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">selectHouses</span><span class="params">(String url)</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">Document</span> <span class="variable">document</span> <span class="operator">=</span> Jsoup.parse(<span class="keyword">new</span> <span class="title class_">URL</span>(url), <span class="number">30000</span>);</span><br><span class="line"> <span class="type">Element</span> <span class="variable">element</span> <span class="operator">=</span> document.getElementById(<span class="string">&quot;newhouse_loupan_list&quot;</span>);</span><br><span class="line"> <span class="type">Elements</span> <span class="variable">elements</span> <span class="operator">=</span> element.getElementsByTag(<span class="string">&quot;li&quot;</span>);</span><br><span class="line"> <span class="keyword">for</span> (Element el : elements) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">images</span> <span class="operator">=</span> el.getElementsByTag(<span class="string">&quot;img&quot;</span>).eq(<span class="number">1</span>).attr(<span class="string">&quot;src&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">alt</span> <span class="operator">=</span> el.getElementsByTag(<span class="string">&quot;img&quot;</span>).eq(<span class="number">1</span>).attr(<span class="string">&quot;alt&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">price</span> <span class="operator">=</span> el.getElementsByClass(<span class="string">&quot;nhouse_price&quot;</span>).text();</span><br><span class="line"> System.out.println(<span class="string">&quot;图片:https:&quot;</span>+images);</span><br><span class="line"> System.out.println(<span class="string">&quot;名称:&quot;</span>+alt);</span><br><span class="line"> System.out.println(<span class="string">&quot;房价:&quot;</span>+price);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230509180334969.png" alt="image-20230509180334969"></p>
<p><img src="/pictures/image-20230509180435467.png" alt="image-20230509180435467"></p>
<h3 id="爬取豆瓣电影排行榜的信息"><a href="#爬取豆瓣电影排行榜的信息" class="headerlink" title="爬取豆瓣电影排行榜的信息"></a>爬取豆瓣电影排行榜的信息</h3><p><img src="/pictures/image-20230509180547905.png" alt="image-20230509180547905"></p>
<h3 id="爬取全国各地房价的信息到excel表格中"><a href="#爬取全国各地房价的信息到excel表格中" class="headerlink" title="爬取全国各地房价的信息到excel表格中"></a>爬取全国各地房价的信息到excel表格中</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.jason;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.excel.EasyExcel;</span><br><span class="line"><span class="keyword">import</span> com.jason.entity.HorseInfo;</span><br><span class="line"><span class="keyword">import</span> org.jsoup.Jsoup;</span><br><span class="line"><span class="keyword">import</span> org.jsoup.nodes.Document;</span><br><span class="line"><span class="keyword">import</span> org.jsoup.nodes.Element;</span><br><span class="line"><span class="keyword">import</span> org.jsoup.select.Elements;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.File;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.net.URL;</span><br><span class="line"><span class="keyword">import</span> java.util.ArrayList;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/9</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 爬取全国各地房价的信息到excel表格中</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">HousePriseList</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="comment">//爬取全国房价排行榜</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">fileName</span> <span class="operator">=</span> <span class="string">&quot;C:\\AlYun\\work\\housePriceList.xlsx&quot;</span>;</span><br><span class="line"> <span class="comment">//通过下面的中间表我们可以实现向excel中追加数据 不是每次删除之前的数据再写入 或者追加的时候有多个表头信息</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">temp</span> <span class="operator">=</span> <span class="string">&quot;C:\\AlYun\\work\\temp.xlsx&quot;</span>; <span class="comment">//中间表 会自动被删除</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">1</span>;</span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">url</span> <span class="operator">=</span> <span class="string">&quot;https://fangjia.gotohui.com/top/&quot;</span> + i + <span class="string">&quot;.html&quot;</span>;</span><br><span class="line"> List&lt;HorseInfo&gt; horseInfos = HousePriseList.selectHorse(url);</span><br><span class="line"> <span class="type">File</span> <span class="variable">file</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">File</span>(fileName);</span><br><span class="line"> <span class="type">File</span> <span class="variable">tempFile</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">File</span>(temp);</span><br><span class="line"> <span class="keyword">if</span> (file.exists()) &#123; <span class="comment">//判断excel表中是否写入过数据 写入过数据就追加数据</span></span><br><span class="line"> <span class="comment">// 第二次按照原有格式,不需要表头,追加写入</span></span><br><span class="line"> EasyExcel.write(file, HorseInfo.class).needHead(<span class="literal">false</span>).</span><br><span class="line"> withTemplate(file).file(tempFile).sheet().doWrite(horseInfos);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">// 第一次写入需要表头</span></span><br><span class="line"> EasyExcel.write(file, HorseInfo.class).sheet().doWrite(horseInfos);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (tempFile.exists()) &#123;</span><br><span class="line"> file.delete();</span><br><span class="line"> tempFile.renameTo(file);</span><br><span class="line"> &#125;</span><br><span class="line"> i++;</span><br><span class="line"> Thread.sleep(<span class="number">2000</span>);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> List&lt;HorseInfo&gt; <span class="title function_">selectHorse</span><span class="params">(String url)</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">Document</span> <span class="variable">document</span> <span class="operator">=</span> Jsoup.parse(<span class="keyword">new</span> <span class="title class_">URL</span>(url), <span class="number">30000</span>);</span><br><span class="line"> <span class="type">Elements</span> <span class="variable">elements</span> <span class="operator">=</span> document.getElementsByClass(<span class="string">&quot;ntable table-striped table-hover&quot;</span>);</span><br><span class="line"> ArrayList&lt;HorseInfo&gt; horseInfos = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> <span class="keyword">for</span> (Element element : elements) &#123;</span><br><span class="line"> <span class="type">Elements</span> <span class="variable">tr</span> <span class="operator">=</span> element.getElementsByTag(<span class="string">&quot;tr&quot;</span>);</span><br><span class="line"> <span class="keyword">for</span> (Element el : tr) &#123;</span><br><span class="line"> <span class="type">Elements</span> <span class="variable">td</span> <span class="operator">=</span> el.getElementsByTag(<span class="string">&quot;td&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;-----------------------------------------&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;编号:&quot;</span> + td.eq(<span class="number">0</span>).text());</span><br><span class="line"> System.out.println(<span class="string">&quot;城市:&quot;</span> + td.eq(<span class="number">1</span>).text());</span><br><span class="line"> System.out.println(<span class="string">&quot;单价(元/㎡):&quot;</span> + td.eq(<span class="number">2</span>).text());</span><br><span class="line"> System.out.println(<span class="string">&quot;同比(去年):&quot;</span> + td.eq(<span class="number">3</span>).text());</span><br><span class="line"> System.out.println(<span class="string">&quot;环比(上月):&quot;</span> + td.eq(<span class="number">4</span>).text());</span><br><span class="line"> System.out.println(<span class="string">&quot;收入比:&quot;</span> + td.eq(<span class="number">5</span>).text());</span><br><span class="line"> <span class="keyword">if</span> (!td.eq(<span class="number">0</span>).text().equals(<span class="string">&quot;&quot;</span>)) &#123;</span><br><span class="line"> horseInfos.add(<span class="keyword">new</span> <span class="title class_">HorseInfo</span>(</span><br><span class="line"> td.eq(<span class="number">0</span>).text(),</span><br><span class="line"> td.eq(<span class="number">1</span>).text(),</span><br><span class="line"> td.eq(<span class="number">2</span>).text(),</span><br><span class="line"> td.eq(<span class="number">3</span>).text(),</span><br><span class="line"> td.eq(<span class="number">4</span>).text(),</span><br><span class="line"> td.eq(<span class="number">5</span>).text()</span><br><span class="line"> ));</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> horseInfos;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230509233922789.png" alt="image-20230509233922789"></p>
<p><img src="/pictures/image-20230509234019249.png" alt="image-20230509234019249"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>爬虫</tag>
</tags>
</entry>
<entry>
<title>Git命令速查</title>
<url>/posts/18459.html</url>
<content><![CDATA[<p><strong>安装教程</strong></p>
<p>官网下载:<a href="https://git-scm.com/downloads">https://git-scm.com/downloads</a></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">以下的操作在下载安装完毕之后进行</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">1.鼠标在桌面右键 选择Git Bash Here 打开控制台</span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">2.配置用户名和邮箱</span></span><br><span class="line">git config --global user.name &quot;用户名&quot; #随意</span><br><span class="line">git config --global user.email &quot;邮箱&quot; #自己的邮箱</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">3.配置SSH免密连接</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">生成密钥</span></span><br><span class="line">ssh-keygen -t rsa -C &quot;在码云上注册的邮箱地址&quot; #连续三次回车</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看密钥并复制公钥的内容</span></span><br><span class="line">cat ~/.ssh/id_rsa.pub</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">4.将密钥的复制到码云的SSH公钥中</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">4.1添加公钥 公钥名随意 公钥内容就是上面复制的内容</span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">5.测试</span></span><br><span class="line">ssh -T git@gitee.com</span><br></pre></td></tr></table></figure>
<p><strong>常用命令</strong></p>
<p><img src="/pictures/image-20230520173824247.png" alt="image-20230520173824247"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>Git</tag>
</tags>
</entry>
<entry>
<title>Java生成二维码</title>
<url>/posts/62439.html</url>
<content><![CDATA[<div class="note success flat"><p>SpringBoot + zxing 生成二维码</p>
<p>SpringBoot + qrcode生成二维码</p>
<p>原视频地址: <a href="https://www.bilibili.com/video/BV1Kw41197kh/?share_source=copy_web&vd_source=aee5e475191b69e6c781059ab6662584">Java生成二维码教程 | 两小时学会Java生成二维码</a></p>
<p>源码地址: <a href="https://github.com/JasonsGong/two-dimensional-code">JasonsGong&#x2F;two-dimensional-code: 使用java生成二维码 (github.com)</a></p>
</div>
<h2 id="一-谷歌zxing开源库生成二维码"><a href="#一-谷歌zxing开源库生成二维码" class="headerlink" title="一.谷歌zxing开源库生成二维码"></a>一.谷歌zxing开源库生成二维码</h2><h3 id="1-创建一个sprinBoot项目"><a href="#1-创建一个sprinBoot项目" class="headerlink" title="1.创建一个sprinBoot项目"></a>1.创建一个sprinBoot项目</h3><p><img src="/pictures/image-20230828215513289.png" alt="image-20230828215513289"></p>
<h3 id="2-引入相关的依赖"><a href="#2-引入相关的依赖" class="headerlink" title="2.引入相关的依赖"></a>2.引入相关的依赖</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependencies</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-web<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-test<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">scope</span>&gt;</span>test<span class="tag">&lt;/<span class="name">scope</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-thymeleaf<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.google.zxing<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>core<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>3.1.0<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.google.zxing<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>javase<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>3.1.0<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>commons-lang<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>commons-lang<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.6<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.projectlombok<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>lombok<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">optional</span>&gt;</span>true<span class="tag">&lt;/<span class="name">optional</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependencies</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="3-在templates目录下新建index-html文件"><a href="#3-在templates目录下新建index-html文件" class="headerlink" title="3.在templates目录下新建index.html文件"></a>3.在templates目录下新建index.html文件</h3><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>Title<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="4-编写controller跳转到该页面完成后重启项目访问localhost-8080-测试"><a href="#4-编写controller跳转到该页面完成后重启项目访问localhost-8080-测试" class="headerlink" title="4.编写controller跳转到该页面完成后重启项目访问localhost:8080 测试"></a>4.编写controller跳转到该页面完成后重启项目访问localhost:8080 测试</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">CodeController</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">index</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;index&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="5-打开index-html编写前端页面"><a href="#5-打开index-html编写前端页面" class="headerlink" title="5.打开index.html编写前端页面"></a>5.打开index.html编写前端页面</h3><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>二维码<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">h1</span>&gt;</span>谷歌zxing开源库生成黑白二维码<span class="tag">&lt;/<span class="name">h1</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line">请输入文本内容:<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;text&quot;</span> <span class="attr">id</span>=<span class="string">&quot;url&quot;</span>&gt;</span><span class="tag">&lt;<span class="name">button</span> <span class="attr">onclick</span>=<span class="string">&quot;generateQRCode()&quot;</span>&gt;</span>生成二维码<span class="tag">&lt;/<span class="name">button</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">img</span> <span class="attr">id</span>=<span class="string">&quot;qrCodeImg&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">function</span> <span class="title function_">generateQRCode</span>(<span class="params"></span>)&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//获取url</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> url = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&quot;url&quot;</span>).<span class="property">value</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//设置img标签的src属性</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> qrCodeImg = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&quot;qrCodeImg&quot;</span>)</span></span><br><span class="line"><span class="language-javascript"> qrCodeImg.<span class="property">src</span> = <span class="string">&quot;/generate?url=&quot;</span>+ url</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"></span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>由于后端部分没有编写这时我们访问项目的时候会返回404</p>
<p><img src="/pictures/image-20230828223201038.png" alt="image-20230828223201038"></p>
<h3 id="6-后端代码的编写"><a href="#6-后端代码的编写" class="headerlink" title="6.后端代码的编写"></a>6.后端代码的编写</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.mine.code.controller;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.google.zxing.BarcodeFormat;</span><br><span class="line"><span class="keyword">import</span> com.google.zxing.EncodeHintType;</span><br><span class="line"><span class="keyword">import</span> com.google.zxing.MultiFormatWriter;</span><br><span class="line"><span class="keyword">import</span> com.google.zxing.WriterException;</span><br><span class="line"><span class="keyword">import</span> com.google.zxing.aztec.encoder.AztecCode;</span><br><span class="line"><span class="keyword">import</span> com.google.zxing.common.BitMatrix;</span><br><span class="line"><span class="keyword">import</span> com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;</span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Controller;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.GetMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestParam;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.ResponseBody;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.imageio.ImageIO;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.ServletOutputStream;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletResponse;</span><br><span class="line"><span class="keyword">import</span> java.awt.image.BufferedImage;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.util.HashMap;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/28</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">CodeController</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">index</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;index&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/generate&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">generate</span><span class="params">(<span class="meta">@RequestParam(&quot;url&quot;)</span> String url, HttpServletResponse response)</span> &#123;</span><br><span class="line"> log.info(<span class="string">&quot;文本内容:&#123;&#125;&quot;</span>, url);</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//创建一个map集合存储二维码的相关属性</span></span><br><span class="line"> <span class="type">Map</span> <span class="variable">map</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//EncodeHintType 编码的提示类型</span></span><br><span class="line"> <span class="comment">//设置二维码的误差校正级别 可选值有 L(7%) M(15%) Q(25%) H(30%)</span></span><br><span class="line"> <span class="comment">//选择L级别的容错率相当于允许二维码在整体的颜色区域中最多有7%的坏像素点;择H级别的容错率相当于允许二维码在整体的颜色区域中最多有30%的坏像素点</span></span><br><span class="line"> map.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);</span><br><span class="line"> <span class="comment">//设置二维码的字符集</span></span><br><span class="line"> map.put(EncodeHintType.CHARACTER_SET, <span class="string">&quot;utf-8&quot;</span>);</span><br><span class="line"> <span class="comment">//设置二维码四周的留白 1表示1像素</span></span><br><span class="line"> map.put(EncodeHintType.MARGIN, <span class="number">1</span>);</span><br><span class="line"> <span class="comment">//创建zxing的核心对象MultiFormatWriter (多格式写入器)</span></span><br><span class="line"> <span class="comment">//通过MultiFormatWriter对象来生成二维码</span></span><br><span class="line"> <span class="type">MultiFormatWriter</span> <span class="variable">writer</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">MultiFormatWriter</span>();</span><br><span class="line"> <span class="comment">//参数一:内容</span></span><br><span class="line"> <span class="comment">//参数二:二维码格式</span></span><br><span class="line"> <span class="comment">//BarcodeFormat(码格式) QR_CODE :常见的二维码格式之一,广泛应用于商品包装、扫码支付</span></span><br><span class="line"> <span class="comment">//AZTEC_CODE高密度可靠性很高 容错率更低 储存个人信息、证件信息、账户密码</span></span><br><span class="line"> <span class="comment">//PDF417 可以存储大量的信息 数据密度高 应用于航空机票、配送标签、法律文件</span></span><br><span class="line"> <span class="comment">//DATA_MATRIX: 小巧的二维码格式 编码格式类似于QR_CODE 但是优于QR_CODE 适合嵌入简单的产品标签 医疗图像 检测数据</span></span><br><span class="line"> <span class="comment">//参数三四:二维码的宽度和高度</span></span><br><span class="line"> <span class="comment">//参数五:二维码参数</span></span><br><span class="line"> <span class="comment">//位矩阵对象 位矩阵对象对象的内部实际上是一个二位数组二维数组中每一个元素是boolean类型 true代表黑色 false代表白色</span></span><br><span class="line"> <span class="type">BitMatrix</span> <span class="variable">bitMatrix</span> <span class="operator">=</span> writer.encode(url, BarcodeFormat.QR_CODE, <span class="number">300</span>, <span class="number">300</span>, map);</span><br><span class="line"> <span class="comment">//获取矩阵的宽度和高度</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">width</span> <span class="operator">=</span> bitMatrix.getWidth();</span><br><span class="line"> <span class="type">int</span> <span class="variable">height</span> <span class="operator">=</span> bitMatrix.getHeight();</span><br><span class="line"> <span class="comment">//生成二维码图片</span></span><br><span class="line"> <span class="type">BufferedImage</span> <span class="variable">image</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">BufferedImage</span>(width, height, BufferedImage.TYPE_INT_BGR);</span><br><span class="line"> <span class="comment">//遍历位矩阵对象</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">x</span> <span class="operator">=</span> <span class="number">0</span>; x &lt; width; x++) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">y</span> <span class="operator">=</span> <span class="number">0</span>; y &lt; height; y++) &#123;</span><br><span class="line"> <span class="comment">//设置每一块的颜色值</span></span><br><span class="line"> <span class="comment">//0xFF000000表示黑色 0xFFFFFFFF表示白色</span></span><br><span class="line"> image.setRGB(x, y, bitMatrix.get(x, y) ? <span class="number">0xFF000000</span> : <span class="number">0xFFFFFFFF</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//将图片响应到客户端</span></span><br><span class="line"> <span class="type">ServletOutputStream</span> <span class="variable">out</span> <span class="operator">=</span> response.getOutputStream();</span><br><span class="line"> ImageIO.write(image,<span class="string">&quot;png&quot;</span>,out);</span><br><span class="line"> out.flush();</span><br><span class="line"> out.close();</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="7-测试生成二维码"><a href="#7-测试生成二维码" class="headerlink" title="7.测试生成二维码"></a>7.测试生成二维码</h3><p><img src="/pictures/image-20230828233052417.png" alt="image-20230828233052417"></p>
<p><strong>完整的项目结构</strong></p>
<p><img src="/pictures/image-20230828233917645.png" alt="image-20230828233917645"></p>
<h3 id="8-生成一个带Logo的黑白二维码"><a href="#8-生成一个带Logo的黑白二维码" class="headerlink" title="8.生成一个带Logo的黑白二维码"></a>8.生成一个带Logo的黑白二维码</h3><p><strong>1.编写qrcode.html页面和跳转到该页面的controller</strong></p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>生成带logo的黑白二维码<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">form</span> <span class="attr">action</span>=<span class="string">&quot;/generateWithLogo&quot;</span> <span class="attr">method</span>=<span class="string">&quot;post&quot;</span> <span class="attr">enctype</span>=<span class="string">&quot;multipart/form-data&quot;</span>&gt;</span></span><br><span class="line"> 请输入文本内容:<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;text&quot;</span> <span class="attr">name</span>=<span class="string">&quot;url&quot;</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> 请选择logo图片:<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;file&quot;</span> <span class="attr">name</span>=<span class="string">&quot;logo&quot;</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;submit&quot;</span> <span class="attr">value</span>=<span class="string">&quot;生成二维码&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 跳转到生成带logo的黑白二维码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@GetMapping(&quot;/logo&quot;)</span></span><br><span class="line"><span class="keyword">public</span> String <span class="title function_">toLogo</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;qrcode&quot;</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>2.编写后端生成二维码逻辑</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 生成带logo的黑白二维码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@PostMapping(&quot;/generateWithLogo&quot;)</span></span><br><span class="line"><span class="keyword">public</span> String <span class="title function_">generateWithLogo</span><span class="params">(<span class="meta">@RequestParam(&quot;url&quot;)</span> String url, HttpServletResponse response, HttpServletRequest request)</span> &#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">Map</span> <span class="variable">map</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> map.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);</span><br><span class="line"> map.put(EncodeHintType.CHARACTER_SET, <span class="string">&quot;utf-8&quot;</span>);</span><br><span class="line"> map.put(EncodeHintType.MARGIN, <span class="number">1</span>);</span><br><span class="line"> <span class="type">MultiFormatWriter</span> <span class="variable">writer</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">MultiFormatWriter</span>();</span><br><span class="line"> <span class="type">BitMatrix</span> <span class="variable">bitMatrix</span> <span class="operator">=</span> writer.encode(url, BarcodeFormat.QR_CODE, <span class="number">300</span>, <span class="number">300</span>, map);</span><br><span class="line"> <span class="type">int</span> <span class="variable">width</span> <span class="operator">=</span> bitMatrix.getWidth();</span><br><span class="line"> <span class="type">int</span> <span class="variable">height</span> <span class="operator">=</span> bitMatrix.getHeight();</span><br><span class="line"> <span class="type">BufferedImage</span> <span class="variable">image</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">BufferedImage</span>(width, height, BufferedImage.TYPE_INT_BGR);</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">x</span> <span class="operator">=</span> <span class="number">0</span>; x &lt; width; x++) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">y</span> <span class="operator">=</span> <span class="number">0</span>; y &lt; height; y++) &#123;</span><br><span class="line"> image.setRGB(x, y, bitMatrix.get(x, y) ? <span class="number">0xFF000000</span> : <span class="number">0xFFFFFFFF</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//给二维码添加logo</span></span><br><span class="line"> <span class="comment">//1.获取logo</span></span><br><span class="line"> <span class="type">Part</span> <span class="variable">logoPart</span> <span class="operator">=</span> request.getPart(<span class="string">&quot;logo&quot;</span>);</span><br><span class="line"> <span class="type">InputStream</span> <span class="variable">inputStream</span> <span class="operator">=</span> logoPart.getInputStream();</span><br><span class="line"> <span class="type">BufferedImage</span> <span class="variable">logoImage</span> <span class="operator">=</span> ImageIO.read(inputStream);</span><br><span class="line"> <span class="comment">//2.对获取的logo图片进行缩放</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">logoWidth</span> <span class="operator">=</span> logoImage.getWidth(<span class="literal">null</span>);</span><br><span class="line"> <span class="type">int</span> <span class="variable">logoHeight</span> <span class="operator">=</span> logoImage.getHeight(<span class="literal">null</span>);</span><br><span class="line"> <span class="keyword">if</span> (logoWidth &gt; <span class="number">60</span>)&#123;</span><br><span class="line"> logoWidth = <span class="number">60</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (logoHeight &gt; <span class="number">60</span>)&#123;</span><br><span class="line"> logoHeight = <span class="number">60</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//使用平滑缩放算法对原始的logo图像进行缩放到一个全新的图像</span></span><br><span class="line"> <span class="type">Image</span> <span class="variable">scaledLogo</span> <span class="operator">=</span> logoImage.getScaledInstance(logoWidth, logoHeight, Image.SCALE_SMOOTH);</span><br><span class="line"> <span class="comment">//3.将缩放的图片画在黑白的二维码上</span></span><br><span class="line"> <span class="comment">//获取一个画笔</span></span><br><span class="line"> <span class="type">Graphics2D</span> <span class="variable">graphics2D</span> <span class="operator">=</span> image.createGraphics();</span><br><span class="line"> <span class="comment">//计算从哪里开始画 300指的是二维码的宽度和高度</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">x</span> <span class="operator">=</span> (<span class="number">300</span> - logoWidth) /<span class="number">2</span>;</span><br><span class="line"> <span class="type">int</span> <span class="variable">y</span> <span class="operator">=</span> (<span class="number">300</span> - logoHeight) /<span class="number">2</span>;</span><br><span class="line"> <span class="comment">//画上去</span></span><br><span class="line"> graphics2D.drawImage(scaledLogo,x,y,<span class="literal">null</span>);</span><br><span class="line"> <span class="comment">//实现logo的圆角效果</span></span><br><span class="line"> <span class="type">Shape</span> <span class="variable">shape</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">RoundRectangle2D</span>.Float(x, y, logoWidth, logoHeight, <span class="number">10</span>, <span class="number">10</span>);</span><br><span class="line"> <span class="comment">//使用一个宽度为4像素的基本笔触</span></span><br><span class="line"> graphics2D.setStroke(<span class="keyword">new</span> <span class="title class_">BasicStroke</span>(<span class="number">4f</span>));</span><br><span class="line"> <span class="comment">//给logo画圆角矩形</span></span><br><span class="line"> graphics2D.draw(shape);</span><br><span class="line"> <span class="comment">//释放画笔</span></span><br><span class="line"> graphics2D.dispose();</span><br><span class="line"> <span class="comment">//将二维码响应到浏览器</span></span><br><span class="line"> ImageIO.write(image, <span class="string">&quot;png&quot;</span>, response.getOutputStream());</span><br><span class="line"> <span class="comment">//关闭流</span></span><br><span class="line"> inputStream.close();</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>访问 <a href="http://localhost:8080/logo">http://localhost:8080/logo</a> 测试</p>
<p><strong>实现的效果</strong></p>
<p><img src="/pictures/image-20230829160901904.png" alt="image-20230829160901904"></p>
<p><img src="/pictures/image-20230829160938795.png" alt="image-20230829160938795"></p>
<h2 id="二-github开源项目qrcode生成二维码"><a href="#二-github开源项目qrcode生成二维码" class="headerlink" title="二.github开源项目qrcode生成二维码"></a>二.github开源项目qrcode生成二维码</h2><h3 id="1-引入依赖文件"><a href="#1-引入依赖文件" class="headerlink" title="1.引入依赖文件"></a>1.引入依赖文件</h3><p>这里就不在重新创建工程了,直接在上面工程的基础上操作</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.github.liuyueyi.media<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>qrcode-plugin<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.5.2<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-生成黑白二维码"><a href="#2-生成黑白二维码" class="headerlink" title="2.生成黑白二维码"></a>2.生成黑白二维码</h3><p><strong>1.创建github-qrcode.html文件</strong></p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>qrcode生成黑白二维码<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">h1</span>&gt;</span>使用github上的开源项目qrcode生成二维码<span class="tag">&lt;/<span class="name">h1</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">form</span> <span class="attr">action</span>=<span class="string">&quot;/generateWithQrCode&quot;</span> <span class="attr">method</span>=<span class="string">&quot;post&quot;</span> <span class="attr">enctype</span>=<span class="string">&quot;multipart/form-data&quot;</span>&gt;</span></span><br><span class="line"> 请输入文本内容:<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;text&quot;</span> <span class="attr">name</span>=<span class="string">&quot;url&quot;</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> 请选择logo图片:<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;file&quot;</span> <span class="attr">name</span>=<span class="string">&quot;logo&quot;</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;submit&quot;</span> <span class="attr">value</span>=<span class="string">&quot;生成二维码&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><strong>2.编写controller处理请求</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.mine.code.controller;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeDeWrapper;</span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeGenWrapper;</span><br><span class="line"><span class="keyword">import</span> com.google.zxing.WriterException;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Controller;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.GetMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.PostMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestParam;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.imageio.ImageIO;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletRequest;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletResponse;</span><br><span class="line"><span class="keyword">import</span> java.awt.image.BufferedImage;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/29</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 使用qrcode生成二维码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">GithubQrCodeController</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 编写请求跳转到使用qrcode生成二维码的页面</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/qrcode&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">toQrCode</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;github-qrcode&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 使用qrcode生成黑白二维码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@PostMapping(&quot;/generateWithQrCode&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">generateWithQrCode</span><span class="params">(<span class="meta">@RequestParam(&quot;url&quot;)</span> String url, HttpServletResponse response, HttpServletRequest request)</span>&#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//生成二维码</span></span><br><span class="line"> <span class="type">BufferedImage</span> <span class="variable">image</span> <span class="operator">=</span> QrCodeGenWrapper.of(url).asBufferedImage();</span><br><span class="line"> <span class="comment">//将生成的二维码响应到浏览器</span></span><br><span class="line"> ImageIO.write(image,<span class="string">&quot;png&quot;</span>,response.getOutputStream());</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>3.访问测试</strong></p>
<p><img src="/pictures/image-20230829223442421.png" alt="image-20230829223442421"></p>
<h3 id="3-生成带有logo的黑白二维码"><a href="#3-生成带有logo的黑白二维码" class="headerlink" title="3.生成带有logo的黑白二维码"></a>3.生成带有logo的黑白二维码</h3><p>前端页面延续使用上面的github-qrcode.html</p>
<p><strong>1.后端代码的编写</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.mine.code.controller;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeDeWrapper;</span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeGenWrapper;</span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeOptions;</span><br><span class="line"><span class="keyword">import</span> com.google.zxing.WriterException;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Controller;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.GetMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.PostMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestParam;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.imageio.ImageIO;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletRequest;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletResponse;</span><br><span class="line"><span class="keyword">import</span> java.awt.image.BufferedImage;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.io.InputStream;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/29</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 使用qrcode生成二维码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">GithubQrCodeController</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 编写请求跳转到使用qrcode生成二维码的页面</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/qrcode&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">toQrCode</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;github-qrcode&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 使用qrcode生成黑白二维码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@PostMapping(&quot;/generateWithQrCode&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">generateWithQrCode</span><span class="params">(<span class="meta">@RequestParam(&quot;url&quot;)</span> String url, HttpServletResponse response, HttpServletRequest request)</span>&#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//生成二维码</span></span><br><span class="line"> <span class="comment">//生成黑白的二维码</span></span><br><span class="line"> <span class="comment">//BufferedImage image = QrCodeGenWrapper.of(url).asBufferedImage();</span></span><br><span class="line"> <span class="comment">//生成带logo的黑白二维码</span></span><br><span class="line"> <span class="type">InputStream</span> <span class="variable">inputStream</span> <span class="operator">=</span> request.getPart(<span class="string">&quot;logo&quot;</span>).getInputStream();</span><br><span class="line"> <span class="type">BufferedImage</span> <span class="variable">image</span> <span class="operator">=</span> QrCodeGenWrapper.of(url)</span><br><span class="line"> .setLogo(inputStream)<span class="comment">//logo图片的输入流</span></span><br><span class="line"> .setLogoRate(<span class="number">7</span>)<span class="comment">//设置logo图片和二维码之间的比例7表示logo的宽度等于二维码的1/7</span></span><br><span class="line"> .setLogoStyle(QrCodeOptions.LogoStyle.ROUND)<span class="comment">//设置logo图片的样式将logo的边框形状设置成圆形</span></span><br><span class="line"> .asBufferedImage();</span><br><span class="line"> <span class="comment">//将生成的二维码响应到浏览器</span></span><br><span class="line"> ImageIO.write(image,<span class="string">&quot;png&quot;</span>,response.getOutputStream());</span><br><span class="line"> <span class="comment">//关闭流</span></span><br><span class="line"> inputStream.close();</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>实现的效果</strong></p>
<p><img src="/pictures/image-20230829224339809.png" alt="image-20230829224339809"></p>
<h3 id="4-生成彩色的二维码"><a href="#4-生成彩色的二维码" class="headerlink" title="4.生成彩色的二维码"></a>4.生成彩色的二维码</h3><p>前端页面延续使用上面的github-qrcode.html</p>
<p><strong>1.后端代码的编写</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.mine.code.controller;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeDeWrapper;</span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeGenWrapper;</span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeOptions;</span><br><span class="line"><span class="keyword">import</span> com.google.zxing.WriterException;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Controller;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.GetMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.PostMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestParam;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.imageio.ImageIO;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletRequest;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletResponse;</span><br><span class="line"><span class="keyword">import</span> java.awt.*;</span><br><span class="line"><span class="keyword">import</span> java.awt.image.BufferedImage;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.io.InputStream;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/29</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 使用qrcode生成二维码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">GithubQrCodeController</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 编写请求跳转到使用qrcode生成二维码的页面</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/qrcode&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">toQrCode</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;github-qrcode&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 使用qrcode生成黑白二维码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@PostMapping(&quot;/generateWithQrCode&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">generateWithQrCode</span><span class="params">(<span class="meta">@RequestParam(&quot;url&quot;)</span> String url, HttpServletResponse response, HttpServletRequest request)</span>&#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//生成彩色的二维码</span></span><br><span class="line"> <span class="type">BufferedImage</span> <span class="variable">image</span> <span class="operator">=</span> QrCodeGenWrapper.of(url).setDrawPreColor(Color.GREEN).asBufferedImage();</span><br><span class="line"> <span class="comment">//将生成的二维码响应到浏览器</span></span><br><span class="line"> ImageIO.write(image,<span class="string">&quot;png&quot;</span>,response.getOutputStream());</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>实现的效果</strong></p>
<p><img src="/pictures/image-20230829225017032.png" alt="image-20230829225017032"></p>
<h3 id="5-生成带有背景图的二维码"><a href="#5-生成带有背景图的二维码" class="headerlink" title="5.生成带有背景图的二维码"></a>5.生成带有背景图的二维码</h3><p>前端页面延续使用上面的github-qrcode.html</p>
<p><strong>1.后端代码的编写</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.mine.code.controller;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeDeWrapper;</span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeGenWrapper;</span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeOptions;</span><br><span class="line"><span class="keyword">import</span> com.google.zxing.WriterException;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Controller;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.GetMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.PostMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestParam;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.imageio.ImageIO;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletRequest;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletResponse;</span><br><span class="line"><span class="keyword">import</span> java.awt.*;</span><br><span class="line"><span class="keyword">import</span> java.awt.image.BufferedImage;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.io.InputStream;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/29</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 使用qrcode生成二维码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">GithubQrCodeController</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 编写请求跳转到使用qrcode生成二维码的页面</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/qrcode&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">toQrCode</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;github-qrcode&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 使用qrcode生成黑白二维码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@PostMapping(&quot;/generateWithQrCode&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">generateWithQrCode</span><span class="params">(<span class="meta">@RequestParam(&quot;url&quot;)</span> String url, HttpServletResponse response, HttpServletRequest request)</span>&#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//生成带有背景图的二维码</span></span><br><span class="line"> <span class="type">InputStream</span> <span class="variable">inputStream</span> <span class="operator">=</span> request.getPart(<span class="string">&quot;logo&quot;</span>).getInputStream();</span><br><span class="line"> <span class="type">BufferedImage</span> <span class="variable">image</span> <span class="operator">=</span> QrCodeGenWrapper.of(url)</span><br><span class="line"> .setBgImg(inputStream)</span><br><span class="line"> .setBgOpacity(<span class="number">0.5F</span>)<span class="comment">//设置透明度</span></span><br><span class="line"> .asBufferedImage();</span><br><span class="line"> <span class="comment">//将生成的二维码响应到浏览器</span></span><br><span class="line"> ImageIO.write(image,<span class="string">&quot;png&quot;</span>,response.getOutputStream());</span><br><span class="line"> <span class="comment">//关闭流</span></span><br><span class="line"> inputStream.close();</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>实现的效果</strong></p>
<p><img src="/pictures/image-20230829225740156.png" alt="image-20230829225740156"></p>
<h3 id="6-生成特殊形状的二维码"><a href="#6-生成特殊形状的二维码" class="headerlink" title="6.生成特殊形状的二维码"></a>6.生成特殊形状的二维码</h3><p>前端页面延续使用上面的github-qrcode.html</p>
<p><strong>1.后端代码的编写</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.mine.code.controller;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeDeWrapper;</span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeGenWrapper;</span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeOptions;</span><br><span class="line"><span class="keyword">import</span> com.google.zxing.WriterException;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Controller;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.GetMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.PostMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestParam;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.imageio.ImageIO;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletRequest;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletResponse;</span><br><span class="line"><span class="keyword">import</span> java.awt.*;</span><br><span class="line"><span class="keyword">import</span> java.awt.image.BufferedImage;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.io.InputStream;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/29</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 使用qrcode生成二维码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">GithubQrCodeController</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 编写请求跳转到使用qrcode生成二维码的页面</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/qrcode&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">toQrCode</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;github-qrcode&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 使用qrcode生成黑白二维码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@PostMapping(&quot;/generateWithQrCode&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">generateWithQrCode</span><span class="params">(<span class="meta">@RequestParam(&quot;url&quot;)</span> String url, HttpServletResponse response, HttpServletRequest request)</span>&#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//生成特殊形状的二维码</span></span><br><span class="line"> <span class="type">BufferedImage</span> <span class="variable">image</span> <span class="operator">=</span> QrCodeGenWrapper.of(url)</span><br><span class="line"> .setDrawEnableScale(<span class="literal">true</span>)<span class="comment">//启用二维码绘制时的缩放功能</span></span><br><span class="line"> .setDrawStyle(QrCodeOptions.DrawStyle.DIAMOND)<span class="comment">//绘制钻石形状的二维码</span></span><br><span class="line"> .asBufferedImage();</span><br><span class="line"> <span class="comment">//将生成的二维码响应到浏览器</span></span><br><span class="line"> ImageIO.write(image,<span class="string">&quot;png&quot;</span>,response.getOutputStream());</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>实现的效果</strong></p>
<p><img src="/pictures/image-20230829230236500.png" alt="image-20230829230236500"></p>
<h3 id="7-生成图片填充二维码"><a href="#7-生成图片填充二维码" class="headerlink" title="7.生成图片填充二维码"></a>7.生成图片填充二维码</h3><p>前端页面延续使用上面的github-qrcode.html</p>
<p><strong>1.后端代码的编写</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.mine.code.controller;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeDeWrapper;</span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeGenWrapper;</span><br><span class="line"><span class="keyword">import</span> com.github.hui.quick.plugin.qrcode.wrapper.QrCodeOptions;</span><br><span class="line"><span class="keyword">import</span> com.google.zxing.WriterException;</span><br><span class="line"><span class="keyword">import</span> com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Controller;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.GetMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.PostMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestParam;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.imageio.ImageIO;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletRequest;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletResponse;</span><br><span class="line"><span class="keyword">import</span> java.awt.*;</span><br><span class="line"><span class="keyword">import</span> java.awt.image.BufferedImage;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.io.InputStream;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/29</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 使用qrcode生成二维码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">GithubQrCodeController</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 编写请求跳转到使用qrcode生成二维码的页面</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/qrcode&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">toQrCode</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;github-qrcode&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 使用qrcode生成黑白二维码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@PostMapping(&quot;/generateWithQrCode&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">generateWithQrCode</span><span class="params">(<span class="meta">@RequestParam(&quot;url&quot;)</span> String url, HttpServletResponse response, HttpServletRequest request)</span> &#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//生成图片填充二维码</span></span><br><span class="line"> <span class="type">InputStream</span> <span class="variable">inputStream</span> <span class="operator">=</span> request.getPart(<span class="string">&quot;logo&quot;</span>).getInputStream();</span><br><span class="line"> <span class="type">BufferedImage</span> <span class="variable">image</span> <span class="operator">=</span> QrCodeGenWrapper.of(url)</span><br><span class="line"> .setErrorCorrection(ErrorCorrectionLevel.H)<span class="comment">//设置二维码的纠正级别</span></span><br><span class="line"> .setDrawStyle(QrCodeOptions.DrawStyle.IMAGE)<span class="comment">//绘制二维码的时候采用图片填充</span></span><br><span class="line"> .addImg(<span class="number">1</span>, <span class="number">1</span>, inputStream)<span class="comment">//添加图片</span></span><br><span class="line"> .asBufferedImage();</span><br><span class="line"> <span class="comment">//将生成的二维码响应到浏览器</span></span><br><span class="line"> ImageIO.write(image, <span class="string">&quot;png&quot;</span>, response.getOutputStream());</span><br><span class="line"> <span class="comment">//关闭流</span></span><br><span class="line"> inputStream.close();</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>实现的效果</strong></p>
<p>二维码中的每一个像素点都是上传的图片,生成的速度很慢</p>
<p><img src="/pictures/image-20230829230843477.png" alt="image-20230829230843477"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>二维码</tag>
</tags>
</entry>
<entry>
<title>Linux中开发环境的搭建</title>
<url>/posts/20683.html</url>
<content><![CDATA[<h2 id="一-Linux操作系统的安装与配置"><a href="#一-Linux操作系统的安装与配置" class="headerlink" title="一.Linux操作系统的安装与配置"></a>一.Linux操作系统的安装与配置</h2><p><strong>软件:VMware 、Linux镜像文件</strong><br><a href="https://qingling.icu/47407.html"><a href="https://qingling.icu/posts/47407.html">VMWare虚拟机安装Linux教程 | The Blog (qingling.icu)</a></a></p>
<h2 id="二-配置Java环境"><a href="#二-配置Java环境" class="headerlink" title="二.配置Java环境"></a>二.配置Java环境</h2><p><strong>2.1.删除自带的JDK</strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看系统是否有java环境</span></span><br><span class="line">java -version</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">查找Linux中已有的java环境的相关文件</span></span><br><span class="line">rpm -qa |grep java</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">执行命令 删除上面的java文件</span></span><br><span class="line">rpm -e --nodeps +上面查找出来的文件</span><br></pre></td></tr></table></figure>
<p><strong>2.2.安装JDK</strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">创建一个文件夹将JDK8上传到这个文件夹中去</span></span><br><span class="line">mkdir /opt/jdk</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">解压上传的压缩包 解压后得到一个名为jdk1.8.0_261的文件夹</span></span><br><span class="line">tar -zvxf jdk-8u261-linux-x64.tar.gz</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">创建一个目录作为java的安装目录</span></span><br><span class="line">mkdir /usr/local/java</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">将解压后的文件移动到这个安装目录中去</span></span><br><span class="line">mv jdk1.8.0_261/ /usr/local/java/</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">配置环境变量</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">进入环境变量的配置文件中</span></span><br><span class="line">vim /etc/profile</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">在文件的最后添加如下的配置</span></span><br><span class="line">export JAVA_HOME=/usr/local/java/jdk1.8.0_261</span><br><span class="line">export PATH=$JAVA_HOME/bin:$PATH</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">刷新配置文件,让新的环境变量生效</span></span><br><span class="line">source /etc/profile</span><br></pre></td></tr></table></figure>
<h2 id="三-使用Docker安装常用软件"><a href="#三-使用Docker安装常用软件" class="headerlink" title="三.使用Docker安装常用软件"></a>三.使用Docker安装常用软件</h2><p><a href="https://qingling.icu/posts/19306.html"><strong>Docker容器化技术 | The Blog (qingling.icu)</strong></a></p>
<h3 id="3-1-Docker的安装"><a href="#3-1-Docker的安装" class="headerlink" title="3.1 Docker的安装"></a><strong>3.1 Docker的安装</strong></h3><p><strong>3.1.1 安装Docker</strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">1、yum 包更新到最新</span> </span><br><span class="line">yum update</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">2、安装需要的软件包 yum-util 提供yum-config-manager功能另外两个是devicemapper驱动依赖的</span> </span><br><span class="line">yum install -y yum-utils device-mapper-persistent-data lvm2</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">3、 设置yum源</span></span><br><span class="line">yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">4、 安装docker出现输入的界面都按 y</span> </span><br><span class="line">yum install -y docker-ce</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">5、 查看docker版本验证是否验证成功</span></span><br><span class="line">docker -v</span><br></pre></td></tr></table></figure>
<p><strong>3.1.2 配置镜像加速服务</strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">1.创建相关的目录</span></span><br><span class="line">sudo mkdir -p /etc/docker</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">2加入配置</span></span><br><span class="line">sudo tee /etc/docker/daemon.json &lt;&lt;-&#x27;EOF&#x27;</span><br><span class="line">&#123;</span><br><span class="line"> &quot;registry-mirrors&quot;: [&quot;https://cagfgua5.mirror.aliyuncs.com&quot;]</span><br><span class="line">&#125;</span><br><span class="line">EOF</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">3.重新加载,让配置文件生效</span></span><br><span class="line">sudo systemctl daemon-reload</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">4.重新启动Docker服务</span></span><br><span class="line">sudo systemctl restart docker</span><br></pre></td></tr></table></figure>
<p><strong>3.1.3 启动Docker服务</strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">启动docker服务:</span></span><br><span class="line">systemctl start docker </span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">停止docker服务:</span></span><br><span class="line">systemctl stop docker </span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">重启docker服务:</span></span><br><span class="line">systemctl restart docker</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">查看docker服务状态:</span></span><br><span class="line">systemctl status docker </span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">设置开机启动docker服务:</span></span><br><span class="line">systemctl enable docker</span><br></pre></td></tr></table></figure>
<h3 id="3-2-使用Docker安装Mysql"><a href="#3-2-使用Docker安装Mysql" class="headerlink" title="3.2 使用Docker安装Mysql"></a>3.2 使用Docker安装Mysql</h3><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">下载mysql的镜像文件 这里以下载mysql5.7为例</span></span><br><span class="line">docker pull mysql:5.7</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看是否下载成功</span></span><br><span class="line">docker images</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">使用MySQL的镜像启动一个容器</span></span><br><span class="line"> docker run -p 3306:3306 --name mysql \</span><br><span class="line">-v /mydata/mysql/log:/var/log/mysql \</span><br><span class="line">-v /mydata/mysql/data:/var/lib/mysql \</span><br><span class="line">-v /mydata/mysql/conf:/etc/mysql \</span><br><span class="line">-e MYSQL_ROOT_PASSWORD=root \</span><br><span class="line">-d mysql:5.7</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">参数说明</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">-p 3306:3306将容器的 3306 端口映射到主机的 3306 端口</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">-v /mydata/mysql/conf:/etc/mysql将配置文件夹挂载到主机</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">-v /mydata/mysql/log:/var/log/mysql将日志文件夹挂载到主机</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">-v /mydata/mysql/data:/var/lib/mysql/:将配置文件夹挂载到主机</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">-e MYSQL_ROOT_PASSWORD=root初始化 root 用户的密码</span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看是否运行成功 这时使用Navicat就可以连接上了 连接不上 关闭防火墙</span></span><br><span class="line">docker ps #查看正在运行的容器</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">进入容器的内部</span></span><br><span class="line">docker exec -it mysql /bin/bash</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看容器内部的目录结构 我们可以看到容器的内部是一个小小的linux系统</span></span><br><span class="line">ls / #注意中间有一个空格</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看与mysql相关的目录</span></span><br><span class="line">whereis mysql</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">退出容器</span></span><br><span class="line">exit;</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">在容器外部查看mysql挂载在本地的三个文件</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">容器内部文件的变化会同步在这三个文件中 conf data <span class="built_in">log</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">外部修改 也会同步到内部</span></span><br><span class="line">cd /mydata/mysql</span><br><span class="line">ls</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">创建一个mysql的配置文件设置字符编码 将下面的内容粘贴到配置文件中</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">1.创建配置文件</span></span><br><span class="line">vi /mydata/mysql/conf/my.cnf</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">2.将以下的内容粘贴到配置文件配置文件内容</span></span><br><span class="line">[client]</span><br><span class="line">default-character-set=utf8</span><br><span class="line">[mysql]</span><br><span class="line">default-character-set=utf8</span><br><span class="line">[mysqld]</span><br><span class="line">init_connect=&#x27;SET collation_connection = utf8_unicode_ci&#x27;</span><br><span class="line">init_connect=&#x27;SET NAMES utf8&#x27;</span><br><span class="line">character-set-server=utf8</span><br><span class="line">collation-server=utf8_unicode_ci</span><br><span class="line">skip-character-set-client-handshake</span><br><span class="line">skip-name-resolve</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">3.重启MySQl的服务 让配置文件生效 这个配置文件也会同步到容器内部</span></span><br><span class="line">docker restart mysql</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">设置开机自启动</span></span><br><span class="line">docker update mysql --restart=always</span><br></pre></td></tr></table></figure>
<h3 id="3-3-使用Docker安装Redis"><a href="#3-3-使用Docker安装Redis" class="headerlink" title="3.3 使用Docker安装Redis"></a>3.3 使用Docker安装Redis</h3><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">下载redis的镜像文件 直接下载最新的</span></span><br><span class="line">docker pull redis</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">创建redis挂载在宿主机的配置文件和目录</span></span><br><span class="line">mkdir -p /mydata/redis/conf #创建目录</span><br><span class="line">touch /mydata/redis/conf/redis.conf #创建配置文件</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">创建并启动容器 这是以配置文件的方式启动 \前面有一个空格</span></span><br><span class="line">docker run -p 6379:6379 --name redis \</span><br><span class="line">-v /mydata/redis/data:/data \</span><br><span class="line">-v /mydata/redis/conf/redis.conf:/etc/redis/redis.conf \</span><br><span class="line">-d redis redis-server /etc/redis/redis.conf</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">检查容器的运行情况</span></span><br><span class="line">docker ps</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">测试客户端的使用</span></span><br><span class="line">docker exec -it redis redis-cli</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">可以在redis客户端中使用如下命令</span></span><br><span class="line">127.0.0.1:6379&gt; set name tom #存值</span><br><span class="line">OK</span><br><span class="line">127.0.0.1:6379&gt; get name #取值</span><br><span class="line">&quot;tom&quot;</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">redis中的数据不能持久化 关机重启之后数据会丢失</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">通过以下的配置 实现redis的持久化操作 AOF的持久化</span></span><br><span class="line">vi /mydata/redis/conf/redis.conf #修改之前创建的配置文件</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">添加如下配置</span></span><br><span class="line">appendonly yes</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">重启redis 让配置生效</span></span><br><span class="line">docker restart redis</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">设置开机自启动</span></span><br><span class="line">docker update redis --restart=always</span><br></pre></td></tr></table></figure>
<h3 id="3-4-使用Docker安装ElasticSearch"><a href="#3-4-使用Docker安装ElasticSearch" class="headerlink" title="3.4 使用Docker安装ElasticSearch"></a>3.4 使用Docker安装ElasticSearch</h3><p><strong>3.4.1 安装ElasticSearch</strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">拉取ElasticSearch</span></span><br><span class="line">docker pull elasticsearch:7.4.2</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">ES的配置文件存放的位置</span></span><br><span class="line">mkdir -p /mydata/elasticsearch/config</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">ES相关的数据</span></span><br><span class="line">mkdir -p /mydata/elasticsearch/data</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">将<span class="string">&quot;http.host: 0.0.0.0&quot;</span>(可以被任何的机器访问)的配置写入elasticsearch.yml中注意冒号后面的空格</span></span><br><span class="line">echo &quot;http.host: 0.0.0.0&quot; &gt;&gt; /mydata/elasticsearch/config/elasticsearch.yml</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">设置文件的权限</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">递归更改权限es需要访问</span></span><br><span class="line">chmod -R 777 /mydata/elasticsearch/</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">运行容器的命令 9200端口用于发送请求使用 9300端口用于集群中节点中的通信使用</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">单节点运行</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">初始占用64m最大占用5m不指定ES会占用所有的内存</span></span><br><span class="line">docker run --name elasticsearch -p 9200:9200 -p 9300:9300 \</span><br><span class="line">-e &quot;discovery.type=single-node&quot; \</span><br><span class="line">-e ES_JAVA_OPTS=&quot;-Xms64m -Xmx512m&quot; \</span><br><span class="line">-v /mydata/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \</span><br><span class="line">-v /mydata/elasticsearch/data:/usr/share/elasticsearch/data \</span><br><span class="line">-v /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins \</span><br><span class="line">-d elasticsearch:7.4.2 </span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">设置开机启动elasticsearch</span></span><br><span class="line">docker update elasticsearch --restart=always</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">访问端口 测试是否安装成功</span></span><br><span class="line">http://虚拟机的ip:9200/</span><br></pre></td></tr></table></figure>
<p>安装成功之后:</p>
<p><img src="/pictures/image-20230628191936254.png" alt="image-20230628191936254"></p>
<p><strong>3.4.2 安装Kibana(可视化界面)</strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">拉取Kibana</span></span><br><span class="line">docker pull kibana:7.4.2</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">这里-e是自己的elasticsearch服务地址这里的地址一定要改为自己虚拟机的地址</span></span><br><span class="line">docker run --name kibana -e ELASTICSEARCH_HOSTS=http://192.168.195.100:9200 -p 5601:5601 -d kibana:7.4.2</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">设置开机启动kibana</span></span><br><span class="line">docker update kibana --restart=always</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">访问对应的网址查看服务</span></span><br><span class="line">http://虚拟机的ip:5601</span><br></pre></td></tr></table></figure>
<p>安装成功之后</p>
<p><img src="/pictures/image-20230701104616032.png" alt="image-20230701104616032"></p>
<p><strong>3.4.3 安装IK分词器</strong></p>
<p>安装地址: <a href="https://github.com/medcl/elasticsearch-analysis-ik">https://github.com/medcl/elasticsearch-analysis-ik</a></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">切换到es挂载在注解的plugins目录</span></span><br><span class="line">cd /mydata/elasticsearch/plugins/</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">安装wget</span></span><br><span class="line">yum install wget </span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">下载ik分词器的压缩包(下载的速度不是很快(5分钟左右),建议本地下载好了之后,上传上去)</span></span><br><span class="line">wget https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.4.2/elasticsearch-analysis-ik-7.4.2.zip</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">进入容器内部查看一下文件是否同步到了容器的内部</span></span><br><span class="line">docker exec -it 容器Id /bin/bash</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">切换到plugins目录中去,这时目录中也存在elasticsearch-analysis-ik-7.4.2.zip这个压缩包</span></span><br><span class="line">cd plugins/ #使用ls查看一下</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">退出容器</span></span><br><span class="line">exit</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">在主机下解压elasticsearch-analysis-ik-7.4.2.zip这个压缩包</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">zip的解压需要使用unzip解压命令 这里我们可以直接在本地解压一下 上传到plugins目录解压的文件名为ik</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">安装unzip</span></span><br><span class="line">yum install -y unzip</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看ik分词器是否安装成功</span></span><br><span class="line">docker exec -it 容器Id /bin/bash</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">切换到bin目录</span></span><br><span class="line">cd bin/</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">执行下面的命令有ik显示即为安装成功</span></span><br><span class="line">elasticsearch-plugin list</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">退出容器,重启一下</span></span><br><span class="line">docker restart elasticsearch</span><br></pre></td></tr></table></figure>
<h3 id="3-5-使用Docker安装nginx"><a href="#3-5-使用Docker安装nginx" class="headerlink" title="3.5 使用Docker安装nginx"></a>3.5 使用Docker安装nginx</h3><p>方法一:</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">创建nginx容器挂载的目录</span></span><br><span class="line">mkdir /mydata/nginx/conf</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">拉取nginx的镜像</span></span><br><span class="line">docker pull nginx:1.10</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">随便启动一个nginx实例为了复制其配置</span></span><br><span class="line">docker run -p 80:80 --name nginx -d nginx:1.10</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">将容器内的配置文件拷贝到conf目录(注意这里有个点和空格)</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">注意在nginx的目录下操作,(成功之后/mydata/nginx/conf目录下会有相应的配置文件和目录)</span></span><br><span class="line">docker container cp nginx:/etc/nginx /mydata/nginx/conf</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">停掉并删除之前的启动的nginx</span></span><br><span class="line">docker stop nginx</span><br><span class="line">docker rm nginx</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">正式的启动容器</span></span><br><span class="line">docker run -p 80:80 --name nginx \</span><br><span class="line">-v /mydata/nginx/html:/usr/share/nginx/html \</span><br><span class="line">-v /mydata/nginx/logs:/var/log/nginx \</span><br><span class="line">-v /mydata/nginx/conf:/etc/nginx \</span><br><span class="line">-d nginx:1.10</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">设置开机启动nginx</span></span><br><span class="line">docker update nginx --restart=always</span><br></pre></td></tr></table></figure>
<p>方法二</p>
<p>先在宿主机的&#x2F;opt&#x2F;nginx&#x2F;conf&#x2F;目录下创建nginx.conf配置文件并加入相关的配置</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="attr">user</span> <span class="string">root;</span></span><br><span class="line"><span class="attr">worker_processes</span> <span class="string">1;</span></span><br><span class="line"></span><br><span class="line"><span class="attr">events</span> <span class="string">&#123;</span></span><br><span class="line"> <span class="attr">worker_connections</span> <span class="string">1024;</span></span><br><span class="line"><span class="attr">&#125;</span></span><br><span class="line"></span><br><span class="line"><span class="attr">http</span> <span class="string">&#123;</span></span><br><span class="line"> <span class="attr">include</span> <span class="string">mime.types;</span></span><br><span class="line"> <span class="attr">default_type</span> <span class="string">application/octet-stream;</span></span><br><span class="line"> <span class="attr">sendfile</span> <span class="string">on;</span></span><br><span class="line"> <span class="attr">keepalive_timeout</span> <span class="string">65;</span></span><br><span class="line"> </span><br><span class="line"> </span><br><span class="line"></span><br><span class="line"> <span class="attr">server</span> <span class="string">&#123;</span></span><br><span class="line"> <span class="attr">listen</span> <span class="string">80;</span></span><br><span class="line"> <span class="attr">server_name</span> <span class="string">localhost;</span></span><br><span class="line"> <span class="attr">charset</span> <span class="string">utf-8;</span></span><br><span class="line"><span class="comment"> </span></span><br><span class="line"><span class="comment"> # set site favicon</span></span><br><span class="line"><span class="comment"> # 这里的路径时容器的路径,不是宿主机的路径</span></span><br><span class="line"> <span class="attr">location</span> <span class="string">/favicon.ico &#123;</span></span><br><span class="line"> <span class="attr">root</span> <span class="string">/usr/share/nginx/html/dist;</span></span><br><span class="line"> <span class="attr">&#125;</span></span><br><span class="line"></span><br><span class="line"> <span class="attr">location</span> <span class="string">/ &#123;</span></span><br><span class="line"><span class="comment"> # 这里的路径时容器的路径,不是宿主机的路径</span></span><br><span class="line"> <span class="attr">root</span> <span class="string">/usr/share/nginx/html/dist;</span></span><br><span class="line"> <span class="attr">try_files</span> <span class="string">$uri $uri/ /index.html; </span></span><br><span class="line"> <span class="attr">index</span> <span class="string">index.html index.htm;</span></span><br><span class="line"> <span class="attr">&#125;</span></span><br><span class="line"> </span><br><span class="line"> <span class="attr">location</span> <span class="string">/prod-api/ &#123;</span></span><br><span class="line"> <span class="attr">proxy_set_header</span> <span class="string">Host $http_host;</span></span><br><span class="line"> <span class="attr">proxy_set_header</span> <span class="string">X-Real-IP $remote_addr;</span></span><br><span class="line"> <span class="attr">proxy_set_header</span> <span class="string">REMOTE-HOST $remote_addr;</span></span><br><span class="line"> <span class="attr">proxy_set_header</span> <span class="string">X-Forwarded-For $proxy_add_x_forwarded_for;</span></span><br><span class="line"> <span class="attr">proxy_pass</span> <span class="string">http://8.137.109.244:8080/;</span></span><br><span class="line"> <span class="attr">&#125;</span></span><br><span class="line"></span><br><span class="line"> <span class="attr">error_page</span> <span class="string">500 502 503 504 /50x.html;</span></span><br><span class="line"> <span class="attr">location</span> = <span class="string">/50x.html &#123;</span></span><br><span class="line"><span class="comment"> # 这里的路径时容器的路径,不是宿主机的路径</span></span><br><span class="line"> <span class="attr">root</span> <span class="string">/usr/share/nginx/html/dist;</span></span><br><span class="line"> <span class="attr">&#125;</span></span><br><span class="line"> <span class="attr">&#125;</span></span><br><span class="line"><span class="attr">&#125;</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>创建容器</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker run -id --name=nginx \</span><br><span class="line">-p 80:80 \</span><br><span class="line">-v /opt/nginx/conf/nginx.conf:/etc/nginx/nginx.conf \</span><br><span class="line">-v /opt/nginx/logs:/var/log/nginx \</span><br><span class="line">-v /opt/nginx/html:/usr/share/nginx/html \</span><br><span class="line">nginx</span><br></pre></td></tr></table></figure>
<h3 id="3-6-使用Docker安装RabbitMQ"><a href="#3-6-使用Docker安装RabbitMQ" class="headerlink" title="3.6 使用Docker安装RabbitMQ"></a>3.6 使用Docker安装RabbitMQ</h3><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">直接执行运行rabbitMQ容器的命令,没有镜像会自动下载</span></span><br><span class="line">docker run -d --name rabbitmq \</span><br><span class="line">-p 5671:5671 \</span><br><span class="line">-p 5672:5672 \</span><br><span class="line">-p 4369:4369 \</span><br><span class="line">-p 25672:25672 \</span><br><span class="line">-p 15671:15671 \</span><br><span class="line">-p 15672:15672 \</span><br><span class="line">rabbitmq:management</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">设置开机启动rabbitmq</span></span><br><span class="line">docker update rabbitmq --restart=always</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">测试访问</span></span><br><span class="line">虚拟机的ip:15672</span><br></pre></td></tr></table></figure>
<p>账号:guest</p>
<p>密码:guest</p>
<p><img src="/pictures/image-20230717123217404.png" alt="image-20230717123217404"></p>
<h3 id="3-7-使用docker安装nacos"><a href="#3-7-使用docker安装nacos" class="headerlink" title="3.7 使用docker安装nacos"></a>3.7 使用docker安装nacos</h3><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">拉取镜像</span></span><br><span class="line">docker pull nacos/nacos-server:1.2.0</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">创建容器并运行</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">MODE=standalone 单机版</span></span><br><span class="line">docker run --env MODE=standalone --name nacos --restart=always -d -p 8848:8848 nacos/nacos-server:1.2.0</span><br></pre></td></tr></table></figure>
<p>测试访问:http:&#x2F;&#x2F;虚拟机ip:8848&#x2F;nacos </p>
<p><img src="/pictures/image-20230811105925843.png" alt="image-20230811105925843"></p>
]]></content>
<categories>
<category>运维</category>
</categories>
<tags>
<tag>环境搭建</tag>
<tag>Linux</tag>
</tags>
</entry>
<entry>
<title>Linux从入门到进阶</title>
<url>/posts/8957.html</url>
<content><![CDATA[<div class="note success flat"><p>本篇博客转载于传智播客黑马程序员,只作在线笔记使用,详细的课程资料请关注黑马程序员!</p>
</div>
<p>Linux相关的书籍: <a href="https://qingling.icu/posts/3661.html">技术书籍-Linux指令大全 | The Blog (qingling.icu)</a></p>
<h1 id="一-初识Linux"><a href="#一-初识Linux" class="headerlink" title="一.初识Linux"></a>一.初识Linux</h1><p> Linux是一套免费使用和自由传播的类Unix操作系统是一个基于POSIX和UNIX的多用户、多任务、支持多线程和多CPU的操作系统。它能运行主要的UNIX工具软件、应用程序和网络协议。支持32位和64位硬件。Linux继承了Unix以网络为核心的设计思想是一个性能稳定的多用户网络操作系统。</p>
<p><img src="/pictures/image-20230919214601245.png" alt="image-20230919214601245"></p>
<p>视频链接: <a href="https://www.bilibili.com/video/BV1n84y1i7td/?share_source=copy_web&vd_source=aee5e475191b69e6c781059ab6662584">https://www.bilibili.com/video/BV1n84y1i7td/?share_source=copy_web&amp;vd_source=aee5e475191b69e6c781059ab6662584</a></p>
<h1 id="二-Linux的安装和配置教程"><a href="#二-Linux的安装和配置教程" class="headerlink" title="二.Linux的安装和配置教程"></a>二.Linux的安装和配置教程</h1><h2 id="1-通过虚拟机安装Linux"><a href="#1-通过虚拟机安装Linux" class="headerlink" title="1.通过虚拟机安装Linux"></a>1.通过虚拟机安装Linux</h2><p>Linux安装教程: <a href="https://qingling.icu/posts/47407.html">VMWare虚拟机安装Linux教程 | The Blog (qingling.icu)</a></p>
<p>Linux设置静态IP:<a href="https://qingling.icu/posts/21883.html">Linux设置静态IP | The Blog (qingling.icu)</a></p>
<h2 id="2-通过WSL获取Linux环境"><a href="#2-通过WSL获取Linux环境" class="headerlink" title="2.通过WSL获取Linux环境"></a>2.通过WSL获取Linux环境</h2><p><strong>安装教程:</strong> <a href="https://qingling.icu/posts/25154.html">Windows10的Linux子系统WSL的安装和使用 | The Blog (qingling.icu)</a></p>
<h1 id="三-Linux的目录结构"><a href="#三-Linux的目录结构" class="headerlink" title="三.Linux的目录结构"></a>三.Linux的目录结构</h1><p><img src="/pictures/image-20230919230906304.png" alt="image-20230919230906304"></p>
<p><img src="/pictures/image-20230919231127383.png" alt="image-20230919231127383"></p>
<h1 id="四-LInux基础命令"><a href="#四-LInux基础命令" class="headerlink" title="四.LInux基础命令"></a>四.LInux基础命令</h1><h2 id="ls命令"><a href="#ls命令" class="headerlink" title="ls命令"></a>ls命令</h2><p>功能:列出文件夹信息</p>
<p>语法:<code>ls [-l -h -a] [参数]</code></p>
<ul>
<li>参数:被查看的文件夹,不提供参数,表示查看当前工作目录</li>
<li>-l以列表形式查看</li>
<li>-h配合-l以更加人性化的方式显示文件大小</li>
<li>-a显示隐藏文件</li>
</ul>
<h3 id="隐藏文件、文件夹"><a href="#隐藏文件、文件夹" class="headerlink" title="隐藏文件、文件夹"></a>隐藏文件、文件夹</h3><p>在Linux中以 <code>.</code>开头的,均是隐藏的。</p>
<p>默认不显示出来,需要 <code>-a</code>选项才可查看到。</p>
<h2 id="pwd命令"><a href="#pwd命令" class="headerlink" title="pwd命令"></a>pwd命令</h2><p>功能:展示当前工作目录</p>
<p>语法:<code>pwd</code></p>
<h2 id="cd命令"><a href="#cd命令" class="headerlink" title="cd命令"></a>cd命令</h2><p>功能:切换工作目录</p>
<p>语法:<code>cd [目标目录]</code></p>
<p>参数:目标目录,要切换去的地方,不提供默认切换到 <code>当前登录用户HOME目录</code></p>
<h2 id="HOME目录"><a href="#HOME目录" class="headerlink" title="HOME目录"></a>HOME目录</h2><p>每一个用户在Linux系统中都有自己的专属工作目录称之为HOME目录。</p>
<ul>
<li>普通用户的HOME目录默认在<code>/home/用户名</code></li>
<li>root用户的HOME目录<code>/root</code></li>
</ul>
<p>FinalShell登陆终端后默认的工作目录就是用户的HOME目录</p>
<h2 id="相对路径、绝对路径"><a href="#相对路径、绝对路径" class="headerlink" title="相对路径、绝对路径"></a>相对路径、绝对路径</h2><ul>
<li><p>相对路径,&#x3D;&#x3D;非&#x3D;&#x3D;<code>/</code>开头的称之为相对路径</p>
<p>相对路径表示以 <code>当前目录</code>作为起点,去描述路径,如 <code>test/a.txt</code>表示当前工作目录内的test文件夹内的a.txt文件</p>
</li>
<li><p>绝对路径,&#x3D;&#x3D;以&#x3D;&#x3D;<code>/</code>开头的称之为绝对路径</p>
<p>绝对路径从 <code>根</code>开始描述路径</p>
</li>
</ul>
<h2 id="特殊路径符"><a href="#特殊路径符" class="headerlink" title="特殊路径符"></a>特殊路径符</h2><ul>
<li><code>.</code>,表示当前,比如.&#x2F;a.txt表示当前文件夹内的 <code>a.txt</code>文件</li>
<li><code>..</code>,表示上级目录,比如 <code>../</code>表示上级目录,<code>../../</code>表示上级的上级目录</li>
<li><code>~</code>表示用户的HOME目录比如 <code>cd ~</code>即可切回用户HOME目录</li>
</ul>
<h2 id="mkdir命令"><a href="#mkdir命令" class="headerlink" title="mkdir命令"></a>mkdir命令</h2><p>功能:创建文件夹</p>
<p>语法:<code>mkdir [-p] 参数</code></p>
<ul>
<li>参数:被创建文件夹的路径</li>
<li>选项:-p可选表示创建前置路径</li>
</ul>
<h2 id="touch命令"><a href="#touch命令" class="headerlink" title="touch命令"></a>touch命令</h2><p>功能:创建文件</p>
<p>语法:<code>touch 参数</code></p>
<ul>
<li>参数:被创建的文件路径</li>
</ul>
<h2 id="cat命令"><a href="#cat命令" class="headerlink" title="cat命令"></a>cat命令</h2><p>功能:查看文件内容</p>
<p>语法:<code>cat 参数</code></p>
<ul>
<li>参数:被查看的文件路径</li>
</ul>
<h2 id="more命令"><a href="#more命令" class="headerlink" title="more命令"></a>more命令</h2><p>功能:查看文件,可以支持翻页查看</p>
<p>语法:<code>more 参数</code></p>
<ul>
<li>参数:被查看的文件路径</li>
<li>在查看过程中:<ul>
<li><code>空格</code>键翻页</li>
<li><code>q</code>退出查看</li>
</ul>
</li>
</ul>
<h2 id="cp命令"><a href="#cp命令" class="headerlink" title="cp命令"></a>cp命令</h2><p>功能:复制文件、文件夹</p>
<p>语法:<code>cp [-r] 参数1 参数2</code></p>
<ul>
<li>参数1被复制的</li>
<li>参数2要复制去的地方</li>
<li>选项:-r可选复制文件夹使用</li>
</ul>
<p>示例:</p>
<ul>
<li>cp a.txt b.txt复制当前目录下a.txt为b.txt</li>
<li>cp a.txt test&#x2F;复制当前目录a.txt到test文件夹内</li>
<li>cp -r test test2复制文件夹test到当前文件夹内为test2存在</li>
</ul>
<h2 id="mv命令"><a href="#mv命令" class="headerlink" title="mv命令"></a>mv命令</h2><p>功能:移动文件、文件夹</p>
<p>语法:<code>mv 参数1 参数2</code></p>
<ul>
<li>参数1被移动的</li>
<li>参数2要移动去的地方参数2如果不存在则会进行改名</li>
</ul>
<h2 id="rm命令"><a href="#rm命令" class="headerlink" title="rm命令"></a>rm命令</h2><p>功能:删除文件、文件夹</p>
<p>语法:<code>rm [-r -f] 参数...参数</code></p>
<ul>
<li>参数:支持多个,每一个表示被删除的,空格进行分隔</li>
<li>选项:-r删除文件夹使用</li>
<li>选项:-f强制删除不会给出确认提示一般root用户会用到</li>
</ul>
<blockquote>
<p>rm命令很危险一定要注意特别是切换到root用户的时候。</p>
</blockquote>
<p><img src="/pictures/image-20230920231224351.png" alt="image-20230920231224351"></p>
<h2 id="which命令"><a href="#which命令" class="headerlink" title="which命令"></a>which命令</h2><p>功能:查看命令的程序本体文件路径</p>
<p>语法:<code>which 参数</code></p>
<ul>
<li>参数:被查看的命令</li>
</ul>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">jason@DESKTOP-PC4GEUR:~$ which pwd</span><br><span class="line">/usr/bin/pwd</span><br><span class="line">jason@DESKTOP-PC4GEUR:~$ which touch</span><br><span class="line">/usr/bin/touch</span><br></pre></td></tr></table></figure>
<h2 id="find命令"><a href="#find命令" class="headerlink" title="find命令"></a>find命令</h2><p>功能:搜索文件</p>
<p>语法1按文件名搜索<code>find 路径 -name 参数</code></p>
<ul>
<li>路径,搜索的起始路径</li>
<li>参数,搜索的关键字,支持通配符* 比如:<code>*</code>test表示搜索任意以test结尾的文件</li>
</ul>
<p><img src="/pictures/image-20230923175004853.png" alt="image-20230923175004853"></p>
<h2 id="grep命令"><a href="#grep命令" class="headerlink" title="grep命令"></a>grep命令</h2><p>功能:过滤关键字</p>
<p>语法:<code>grep [-n] 关键字 文件路径</code></p>
<ul>
<li>选项-n可选表示在结果中显示匹配的行的行号。</li>
<li>参数,关键字,必填,表示过滤的关键字,带有空格或其它特殊符号,建议使用””将关键字包围起来</li>
<li>参数,文件路径,必填,表示要过滤内容的文件路径,可作为内容输入端口</li>
</ul>
<blockquote>
<p>参数文件路径,可以作为管道符的输入</p>
</blockquote>
<h2 id="wc命令"><a href="#wc命令" class="headerlink" title="wc命令"></a>wc命令</h2><p>功能:统计</p>
<p>语法:<code>wc [-c -m -l -w] 文件路径</code></p>
<ul>
<li>选项,-c统计bytes数量</li>
<li>选项,-m统计字符数量</li>
<li>选项,-l统计行数</li>
<li>选项,-w统计单词数量</li>
<li>参数,文件路径,被统计的文件,可作为内容输入端口</li>
</ul>
<blockquote>
<p>参数文件路径,可作为管道符的输入</p>
</blockquote>
<h2 id="管道符"><a href="#管道符" class="headerlink" title="管道符|"></a>管道符|</h2><p>写法:<code>|</code></p>
<p>功能:将符号左边的结果,作为符号右边的输入</p>
<p>示例:</p>
<p><code>cat a.txt | grep itheima</code>将cat a.txt的结果作为grep命令的输入用来过滤 <code>itheima</code>关键字</p>
<p>可以支持嵌套:</p>
<p><code>cat a.txt | grep itheima | grep itcast</code></p>
<h2 id="echo命令"><a href="#echo命令" class="headerlink" title="echo命令"></a>echo命令</h2><p>功能:输出内容</p>
<p>语法:<code>echo 参数</code></p>
<ul>
<li>参数:被输出的内容</li>
</ul>
<p><img src="/pictures/image-20230923181041583.png" alt="image-20230923181041583"></p>
<h2 id="反引号"><a href="#反引号" class="headerlink" title="&#96;反引号"></a>&#96;反引号</h2><p>功能:被两个反引号包围的内容,会作为命令执行</p>
<p>示例:</p>
<ul>
<li>echo `pwd`,会输出当前工作目录</li>
</ul>
<h2 id="tail命令"><a href="#tail命令" class="headerlink" title="tail命令"></a>tail命令</h2><p>功能:查看文件尾部内容</p>
<p>语法:<code>tail [-f] 参数</code></p>
<ul>
<li>参数:被查看的文件</li>
<li>选项:-f持续跟踪文件修改</li>
<li>选项, -num表示查看尾部多少行不填默认10行(tail -10 文件)</li>
</ul>
<h2 id="head命令"><a href="#head命令" class="headerlink" title="head命令"></a>head命令</h2><p>功能:查看文件头部内容</p>
<p>语法:<code>head [-n] 参数</code></p>
<ul>
<li>参数:被查看的文件</li>
<li>选项:-n查看的行数</li>
</ul>
<h2 id="重定向符"><a href="#重定向符" class="headerlink" title="重定向符"></a>重定向符</h2><p>功能:将符号左边的结果,输出到右边指定的文件中去</p>
<ul>
<li><code>&gt;</code>,表示覆盖输出</li>
<li><code>&gt;&gt;</code>,表示追加输出</li>
</ul>
<p><img src="/pictures/image-20230923181307011.png" alt="image-20230923181307011"></p>
<h2 id="vi编辑器"><a href="#vi编辑器" class="headerlink" title="vi编辑器"></a>vi编辑器</h2><h3 id="命令模式快捷键"><a href="#命令模式快捷键" class="headerlink" title="命令模式快捷键"></a>命令模式快捷键</h3><p><img src="/pictures/20221027215841.png" alt="image-20221027215841573"></p>
<p><img src="/pictures/20221027215846.png" alt="image-20221027215846581"></p>
<p><img src="/pictures/20221027215849.png" alt="image-20221027215849668"></p>
<h3 id="底线命令快捷键"><a href="#底线命令快捷键" class="headerlink" title="底线命令快捷键"></a>底线命令快捷键</h3><p><img src="/pictures/20221027215858.png" alt="image-20221027215858967"></p>
<h2 id="命令的选项"><a href="#命令的选项" class="headerlink" title="命令的选项"></a>命令的选项</h2><p>我们学习的一系列Linux命令它们所拥有的选项都是非常多的。</p>
<p>比如简单的ls命令就有-a -A -b -c -C -d -D -f -F -g -G -h -H -i -I -k -l -L -m -n -N -o -p -q -Q -r-R -s -S -t -T -u -U -v -w -x -X -1等选项可以发现选项是极其多的。</p>
<p>课程中, 并不会将全部的选项都进行讲解否则一个ls命令就可能讲解2小时之久。</p>
<p>课程中,会对常见的选项进行讲解, 足够满足绝大多数的学习、工作场景。</p>
<h3 id="查看命令的帮助"><a href="#查看命令的帮助" class="headerlink" title="查看命令的帮助"></a>查看命令的帮助</h3><p>可以通过:<code>命令 --help</code>查看命令的帮助手册</p>
<p><img src="/pictures/20221027220005.png" alt="image-20221027220005610"></p>
<h3 id="查看命令的详细手册"><a href="#查看命令的详细手册" class="headerlink" title="查看命令的详细手册"></a>查看命令的详细手册</h3><p>可以通过:<code>man 命令</code>查看某命令的详细手册</p>
<p><img src="/pictures/20221027220010.png" alt="image-20221027220009949"></p>
<h1 id="五-Linux常用操作"><a href="#五-Linux常用操作" class="headerlink" title="五.Linux常用操作"></a>五.Linux常用操作</h1><h2 id="软件安装"><a href="#软件安装" class="headerlink" title="软件安装"></a>软件安装</h2><ul>
<li>CentOS系统使用<ul>
<li>yum [install remove search] [-y] 软件名称<ul>
<li>install 安装</li>
<li>remove 卸载</li>
<li>search 搜索</li>
<li>-y自动确认</li>
</ul>
</li>
</ul>
</li>
<li>Ubuntu系统使用<ul>
<li>apt [install remove search] [-y] 软件名称<ul>
<li>install 安装</li>
<li>remove 卸载</li>
<li>search 搜索</li>
<li>-y自动确认</li>
</ul>
</li>
</ul>
</li>
</ul>
<blockquote>
<p>yum 和 apt 均需要root权限</p>
</blockquote>
<h2 id="systemctl"><a href="#systemctl" class="headerlink" title="systemctl"></a>systemctl</h2><p>功能:控制系统服务的启动关闭等</p>
<p>语法:<code>systemctl start | stop | restart | disable | enable | status 服务名</code></p>
<ul>
<li>start启动</li>
<li>stop停止</li>
<li>status查看状态</li>
<li>disable关闭开机自启</li>
<li>enable开启开机自启</li>
<li>restart重启</li>
</ul>
<h2 id="软链接"><a href="#软链接" class="headerlink" title="软链接"></a>软链接</h2><p>功能:创建文件、文件夹软链接(快捷方式)</p>
<p>语法:<code>ln -s 参数1 参数2</code></p>
<ul>
<li>参数1被链接的</li>
<li>参数2要链接去的地方快捷方式的名称和存放位置</li>
</ul>
<h2 id="日期"><a href="#日期" class="headerlink" title="日期"></a>日期</h2><p>语法:<code>date [-d] [+格式化字符串]</code></p>
<ul>
<li><p>-d 按照给定的字符串显示日期,一般用于日期计算</p>
</li>
<li><p>格式化字符串:通过特定的字符串标记,来控制显示的日期格式</p>
<ul>
<li>%Y 年%y 年份后两位数字 (00..99)</li>
<li>%m 月份 (01..12)</li>
<li>%d 日 (01..31)</li>
<li>%H 小时 (00..23)</li>
<li>%M 分钟 (00..59)</li>
<li>%S 秒 (00..60)</li>
<li>%s 自 1970-01-01 00:00:00 UTC 到现在的秒数</li>
</ul>
</li>
</ul>
<p>示例:</p>
<ul>
<li><p>按照2022-01-01的格式显示日期</p>
<p><img src="/pictures/20221027220514.png" alt="image-20221027220514640"></p>
</li>
<li><p>按照2022-01-01 10:00:00的格式显示日期</p>
<p><img src="/pictures/20221027220525.png" alt="image-20221027220525625"></p>
</li>
<li><p>-d选项日期计算</p>
<p><img src="/pictures/20221027220429.png" alt="image-20221027220429831"></p>
<ul>
<li><p>支持的时间标记为:</p>
<p><img src="/pictures/20221027220449.png" alt="image-20221027220449312"></p>
</li>
</ul>
</li>
</ul>
<h2 id="时区"><a href="#时区" class="headerlink" title="时区"></a>时区</h2><p>修改时区为中国时区</p>
<p><img src="/pictures/20221027220554.png" alt="image-20221027220554654"></p>
<h2 id="ntp"><a href="#ntp" class="headerlink" title="ntp"></a>ntp</h2><p>功能:同步时间</p>
<p>安装:<code>yum install -y ntp</code></p>
<p>启动管理:<code>systemctl start | stop | restart | status | disable | enable ntpd</code></p>
<p>手动校准时间:<code>ntpdate -u ntp.aliyun.com</code></p>
<h2 id="ip地址"><a href="#ip地址" class="headerlink" title="ip地址"></a>ip地址</h2><p>格式a.b.c.d</p>
<ul>
<li>abcd为0~255的数字</li>
</ul>
<p>特殊IP</p>
<ul>
<li>127.0.0.1,表示本机</li>
<li>0.0.0.0<ul>
<li>可以表示本机</li>
<li>也可以表示任意IP看使用场景</li>
</ul>
</li>
</ul>
<p>查看ip<code>ifconfig</code></p>
<h2 id="主机名"><a href="#主机名" class="headerlink" title="主机名"></a>主机名</h2><p>功能Linux系统的名称</p>
<p>查看:<code>hostname</code></p>
<p>设置:<code>hostnamectl set-hostname 主机名</code></p>
<h2 id="配置VMware固定IP"><a href="#配置VMware固定IP" class="headerlink" title="配置VMware固定IP"></a>配置VMware固定IP</h2><ol>
<li><p>修改VMware网络参阅PPT图太多</p>
</li>
<li><p>设置Linux内部固定IP</p>
<p>修改文件:<code>/etc/sysconfig/network-scripts/ifcfg-ens33</code></p>
<p>示例文件内容:</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">TYPE=&quot;Ethernet&quot;</span><br><span class="line">PROXY_METHOD=&quot;none&quot;</span><br><span class="line">BROWSER_ONLY=&quot;no&quot;</span><br><span class="line">BOOTPROTO=&quot;static&quot; # 改为static固定IP</span><br><span class="line">DEFROUTE=&quot;yes&quot;</span><br><span class="line">IPV4_FAILURE_FATAL=&quot;no&quot;</span><br><span class="line">IPV6INIT=&quot;yes&quot;</span><br><span class="line">IPV6_AUTOCONF=&quot;yes&quot;</span><br><span class="line">IPV6_DEFROUTE=&quot;yes&quot;</span><br><span class="line">IPV6_FAILURE_FATAL=&quot;no&quot;</span><br><span class="line">IPV6_ADDR_GEN_MODE=&quot;stable-privacy&quot;</span><br><span class="line">NAME=&quot;ens33&quot;</span><br><span class="line">UUID=&quot;1b0011cb-0d2e-4eaa-8a11-af7d50ebc876&quot;</span><br><span class="line">DEVICE=&quot;ens33&quot;</span><br><span class="line">ONBOOT=&quot;yes&quot;</span><br><span class="line">IPADDR=&quot;192.168.88.131&quot; # IP地址自己设置要匹配网络范围</span><br><span class="line">NETMASK=&quot;255.255.255.0&quot; # 子网掩码固定写法255.255.255.0</span><br><span class="line">GATEWAY=&quot;192.168.88.2&quot; # 网关要和VMware中配置的一致</span><br><span class="line">DNS1=&quot;192.168.88.2&quot; # DNS1服务器和网关一致即可</span><br></pre></td></tr></table></figure></li>
</ol>
<h2 id="ps命令"><a href="#ps命令" class="headerlink" title="ps命令"></a>ps命令</h2><p>功能:查看进程信息</p>
<p>语法:<code>ps -ef</code>查看全部进程信息可以搭配grep做过滤<code>ps -ef | grep xxx</code></p>
<p><img src="/pictures/image-20230925200901791.png" alt="image-20230925200901791"></p>
<h2 id="kill命令"><a href="#kill命令" class="headerlink" title="kill命令"></a>kill命令</h2><p><img src="/pictures/20221027221303.png" alt="image-20221027221303037"></p>
<h2 id="nmap命令"><a href="#nmap命令" class="headerlink" title="nmap命令"></a>nmap命令</h2><p><img src="/pictures/20221027221241.png" alt="image-20221027221241123"></p>
<h2 id="netstat命令"><a href="#netstat命令" class="headerlink" title="netstat命令"></a>netstat命令</h2><p>功能:查看端口占用</p>
<p>用法:<code>netstat -anp | grep xxx</code></p>
<h2 id="ping命令"><a href="#ping命令" class="headerlink" title="ping命令"></a>ping命令</h2><p>测试网络是否联通</p>
<p>语法:<code>ping [-c num] 参数</code></p>
<p><img src="/pictures/20221027221129.png" alt="image-20221027221129782"></p>
<h2 id="wget命令"><a href="#wget命令" class="headerlink" title="wget命令"></a>wget命令</h2><p><img src="/pictures/20221027221149.png" alt="image-20221027221148964"></p>
<h2 id="curl命令"><a href="#curl命令" class="headerlink" title="curl命令"></a>curl命令</h2><p><img src="/pictures/20221027221201.png" alt="image-20221027221201079"></p>
<p><img src="/pictures/20221027221210.png" alt="image-20221027221210518"></p>
<h2 id="top命令"><a href="#top命令" class="headerlink" title="top命令"></a>top命令</h2><p>功能:查看主机运行状态</p>
<p>语法:<code>top</code>,查看基础信息</p>
<p>可用选项:</p>
<p><img src="/pictures/20221027221340.png" alt="image-20221027221340729"></p>
<p>交互式模式中,可用快捷键:</p>
<p><img src="/pictures/20221027221354.png" alt="image-20221027221354137"></p>
<p><img src="/pictures/image-20230925203631826.png" alt="image-20230925203631826"></p>
<p><img src="/pictures/image-20230925203743893.png" alt="image-20230925203743893"></p>
<h2 id="df命令"><a href="#df命令" class="headerlink" title="df命令"></a>df命令</h2><p>查看磁盘占用</p>
<p><img src="/pictures/20221027221413.png" alt="image-20221027221413787"></p>
<h2 id="iostat命令"><a href="#iostat命令" class="headerlink" title="iostat命令"></a>iostat命令</h2><p>查看CPU、磁盘的相关信息</p>
<p><img src="/pictures/20221027221440.png" alt="image-20221027221439990"></p>
<p><img src="/pictures/20221027221514.png" alt="image-20221027221514237"></p>
<h2 id="sar命令"><a href="#sar命令" class="headerlink" title="sar命令"></a>sar命令</h2><p>查看网络统计</p>
<p><img src="/pictures/20221027221545.png" alt="image-20221027221545822"></p>
<h2 id="环境变量"><a href="#环境变量" class="headerlink" title="环境变量"></a>环境变量</h2><ul>
<li>临时设置export 变量名&#x3D;变量值</li>
<li>永久设置:<ul>
<li>针对用户设置用户HOME目录内<code>.bashrc</code>文件</li>
<li>针对全局,设置 <code>/etc/profile</code></li>
</ul>
</li>
</ul>
<h3 id="PATH变量"><a href="#PATH变量" class="headerlink" title="PATH变量"></a>PATH变量</h3><p>记录了执行程序的搜索路径</p>
<p>可以将自定义路径加入PATH内实现自定义命令在任意地方均可执行的效果</p>
<h2 id="符号"><a href="#符号" class="headerlink" title="$符号"></a>$符号</h2><p>可以取出指定的环境变量的值</p>
<p>语法:<code>$变量名</code></p>
<p>示例:</p>
<p><code>echo $PATH</code>输出PATH环境变量的值</p>
<p><code>echo $&#123;PATH&#125;ABC</code>输出PATH环境变量的值以及ABC</p>
<p>如果变量名和其它内容混淆在一起,可以使用${}</p>
<h2 id="RZSZ"><a href="#RZSZ" class="headerlink" title="RZSZ"></a>RZSZ</h2><p><img src="/pictures/image-20230925215103228.png" alt="image-20230925215103228"></p>
<h2 id="压缩解压"><a href="#压缩解压" class="headerlink" title="压缩解压"></a>压缩解压</h2><h3 id="压缩"><a href="#压缩" class="headerlink" title="压缩"></a>压缩</h3><p><code>tar -zcvf 压缩包 被压缩1...被压缩2...被压缩N</code></p>
<ul>
<li>-z表示使用gzip可以不写</li>
</ul>
<p><code>zip [-r] 参数1 参数2 参数N</code></p>
<p><img src="/pictures/20221027221906.png" alt="image-20221027221906247"></p>
<p><img src="/pictures/image-20230925215409296.png" alt="image-20230925215409296"></p>
<h3 id="解压"><a href="#解压" class="headerlink" title="解压"></a>解压</h3><p><code>tar -zxvf 被解压的文件 -C 要解压去的地方</code></p>
<ul>
<li>-z表示使用gzip可以省略</li>
<li>-C可以省略指定要解压去的地方不写解压到当前目录</li>
</ul>
<p><code>unzip [-d] 参数</code></p>
<p><img src="/pictures/20221027221939.png" alt="image-20221027221939899"></p>
<h2 id="su命令"><a href="#su命令" class="headerlink" title="su命令"></a>su命令</h2><p>切换用户</p>
<p>语法:<code>su [-] [用户]</code></p>
<p><img src="/pictures/20221027222021.png" alt="image-20221027222021619"></p>
<h2 id="sudo命令"><a href="#sudo命令" class="headerlink" title="sudo命令"></a>sudo命令</h2><p><img src="/pictures/20221027222035.png" alt="image-20221027222035337"></p>
<p>比如:</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">itheima ALL=(ALL) NOPASSWD: ALL</span><br></pre></td></tr></table></figure>
<p>在visudo内配置如上内容可以让itheima用户无需密码直接使用 <code>sudo</code></p>
<h2 id="chmod命令"><a href="#chmod命令" class="headerlink" title="chmod命令"></a>chmod命令</h2><p>修改文件、文件夹权限</p>
<p>语法:<code>chmod [-R] 权限 参数</code></p>
<p>权限可以用3位数字来代表第一位数字表示用户权限第二位表示用户组权限第三位表示其它用户权限。数字的细节如下r记为4w记为2x记为1可以有</p>
<ul>
<li><p>权限要设置的权限比如755表示<code>rwxr-xr-x</code></p>
<p><img src="/pictures/20221027222157.png" alt="image-20221027222157276"></p>
</li>
<li><p>参数,被修改的文件、文件夹</p>
</li>
<li><p>选项-R设置文件夹和其内部全部内容一样生效</p>
</li>
</ul>
<p><strong>示例:</strong></p>
<p> • chmod u&#x3D;rwx,g&#x3D;rx,o&#x3D;x hello.txt 将文件权限修改为rwxr-xx</p>
<p> • 其中u表示user所属用户权限g表示group组权限o表示other其它用户权限</p>
<p> • chmod -R u&#x3D;rwx,g&#x3D;rx,o&#x3D;x test将文件夹test以及文件夹内全部内容权限设置为rwxr-xx</p>
<p>除此之外,还有快捷写法:<strong>chmod 751 hello.txt</strong>所以751表示 rwx(7) r-x(5) x(1)[数字代表的含义见上面]</p>
<p><strong>rwx的含义</strong></p>
<p> • r表示读权限</p>
<p> • w表示写权限</p>
<p> • x表示执行权限</p>
<p><strong>针对文件、文件夹的不同rwx的含义有细微差别</strong></p>
<p> •r针对文件可以查看文件内容</p>
<p> •针对文件夹可以查看文件夹内容如ls命令</p>
<p> •w针对文件表示可以修改此文件</p>
<p> •针对文件夹,可以在文件夹内:创建、删除、改名等操作</p>
<p> •x针对文件表示可以将文件作为程序执行</p>
<p> •针对文件夹表示可以更改工作目录到此文件夹即cd进入</p>
<p><img src="/pictures/image-20230925112857636.png" alt="image-20230925112857636"></p>
<p>举例drwxr-xr-x表示</p>
<p>•这是一个文件夹首字母d表示</p>
<p>•所属用户(右上角图序号2)的权限是有r有w有xrwx</p>
<p>•所属用户组(右上角图序号3)的权限是有r无w有xr-x -表示无此权限)</p>
<p>•其它用户的权限是有r无w有xr-x</p>
<h2 id="chown命令"><a href="#chown命令" class="headerlink" title="chown命令"></a>chown命令</h2><p>修改文件、文件夹所属用户、组</p>
<p>语法:<code>chown [-R] [用户][:][用户组] 文件或文件夹</code></p>
<p><img src="/pictures/20221027222326.png" alt="image-20221027222326192"></p>
<h2 id="用户组管理"><a href="#用户组管理" class="headerlink" title="用户组管理"></a>用户组管理</h2><p><img src="/pictures/20221027222354.png" alt="image-20221027222354498"></p>
<h2 id="用户管理"><a href="#用户管理" class="headerlink" title="用户管理"></a>用户管理</h2><p><img src="/pictures/20221027222407.png" alt="image-20221027222407618"></p>
<h2 id="genent命令"><a href="#genent命令" class="headerlink" title="genent命令"></a>genent命令</h2><ul>
<li><p><code>getent group</code>,查看系统全部的用户组</p>
<p><img src="/pictures/20221027222446.png" alt="image-20221027222446514"></p>
</li>
<li><p><code>getent passwd</code>,查看系统全部的用户</p>
<p><img src="/pictures/20221027222512.png" alt="image-20221027222512274"></p>
</li>
</ul>
<h2 id="env命令"><a href="#env命令" class="headerlink" title="env命令"></a>env命令</h2><p>查看系统全部的环境变量</p>
<p>语法:<code>env</code></p>
<h2 id="开启指定端口的防火墙限制"><a href="#开启指定端口的防火墙限制" class="headerlink" title="开启指定端口的防火墙限制"></a>开启指定端口的防火墙限制</h2><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">永久性地在防火墙配置中打开TCP的9000端口</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">--permanent表示永久的</span></span><br><span class="line">sudo firewall-cmd --permanent --add-port=9000/tcp</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">刷新防火墙规则</span></span><br><span class="line">sudo firewall-cmd --reload</span><br></pre></td></tr></table></figure>
<h2 id="实用的小技巧"><a href="#实用的小技巧" class="headerlink" title="实用的小技巧"></a>实用的小技巧</h2><h3 id="history命令"><a href="#history命令" class="headerlink" title="history命令"></a>history命令</h3><p>用于查看历史输入的命令</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">root@DESKTOP-PC4GEUR:/# history</span><br><span class="line"> 1 cd /</span><br><span class="line"> 2 ls</span><br><span class="line"> 3 clear</span><br><span class="line"> 4 ls</span><br><span class="line"> 5 cd /</span><br><span class="line"> 略略略</span><br><span class="line"> 51 clear</span><br><span class="line"> 52 hostory</span><br><span class="line"> 53 clear</span><br><span class="line"> 54 history</span><br><span class="line">root@DESKTOP-PC4GEUR:/#</span><br></pre></td></tr></table></figure>
<h3 id="光标移动的快捷键"><a href="#光标移动的快捷键" class="headerlink" title="光标移动的快捷键"></a>光标移动的快捷键</h3><p><img src="/pictures/image-20230925132050649.png" alt="image-20230925132050649"></p>
<h3 id="小技巧汇总"><a href="#小技巧汇总" class="headerlink" title="小技巧汇总"></a>小技巧汇总</h3><p><img src="/pictures/image-20230925133017257.png" alt="image-20230925133017257"></p>
]]></content>
<categories>
<category>运维</category>
</categories>
<tags>
<tag>Linux</tag>
</tags>
</entry>
<entry>
<title>Linux运维管理面板-1Panel</title>
<url>/posts/56106.html</url>
<content><![CDATA[<h1 id="一-官方文档"><a href="#一-官方文档" class="headerlink" title="一.官方文档"></a>一.官方文档</h1><p><strong>官网:</strong><a href="https://1panel.cn/">1Panel - 现代化、开源的 Linux 服务器运维管理面板</a></p>
<p><strong>官方文档:</strong><a href="https://1panel.cn/docs/">1Panel 文档</a></p>
<div class="note success flat"><p>1Panel是飞致云旗下的一款现代化、开源的 Linux 服务器运维管理面板</p>
</div>
<h1 id="二-安装教程"><a href="#二-安装教程" class="headerlink" title="二.安装教程"></a>二.安装教程</h1><p><strong>详细安装教程见官方文档:</strong><a href="https://1panel.cn/docs/installation/online_installation/">在线安装 - 1Panel 文档</a></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">linux命令一键安装并启动</span></span><br><span class="line">curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh &amp;&amp; sh quick_start.sh</span><br></pre></td></tr></table></figure>
<p>安装成功后浏览器访问<code>http://目标服务器 IP 地址:目标端口/安全入口</code>进入运维面板(安装成功后根据命令行返回链接和密码信息访问并登录面板即可)</p>
<p><img src="/pictures/image-20240101201242287.png" alt="image-20240101201242287"></p>
<h1 id="三-常用工具"><a href="#三-常用工具" class="headerlink" title="三.常用工具"></a>三.常用工具</h1><h2 id="1-Fail2ban"><a href="#1-Fail2ban" class="headerlink" title="1.Fail2ban"></a>1.Fail2ban</h2><p><strong>简介</strong></p>
<p>Fail2Ban 是一款入侵防御软件,可以保护服务器免受暴力攻击。 它是用 Python 编程语言编写的。 Fail2Ban 基于auth 日志文件工作,默认情况下它会扫描所有 auth 日志文件,如 &#x2F;var&#x2F;log&#x2F;auth.log、&#x2F;var&#x2F;log&#x2F;apache&#x2F;access.log 等并禁止带有恶意标志的IP比如密码失败太多寻找漏洞等等标志。通常Fail2Ban 用于更新防火墙规则,用于在指定的时间内拒绝 IP 地址。 它也会发送邮件通知。 Fail2Ban 为各种服务提供了许多过滤器,如 ssh、apache、nginx、squid、named、mysql、nagios 等。(简单来说就是避免别人暴力破解服务器的连接账号密码信息,入侵服务器)</p>
<p><strong>安装</strong></p>
<p><strong>详细教程:</strong> <a href="https://1panel.cn/docs/user_manual/toolbox/fail2ban/">Fail2ban - 1Panel 文档</a></p>
<p>1、安装 epel 源</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">yum install -y epel-release</span><br></pre></td></tr></table></figure>
<p>2、安装 Fail2ban</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">yum install -y fail2ban</span><br></pre></td></tr></table></figure>
<p>3、启动 Fail2ban 服务</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">systemctl start fail2ban</span><br></pre></td></tr></table></figure>
<p>4、开机自启动</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">systemctl enable fail2ban</span><br></pre></td></tr></table></figure>
<p>5、查看 Fail2ban 服务状态</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">systemctl status fail2ban</span><br></pre></td></tr></table></figure>
<p><strong>默认配置</strong> (后续自定义的配置直接在运维面板中更改即可)</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment">#DEFAULT-START</span></span><br><span class="line"><span class="attr">[DEFAULT]</span></span><br><span class="line"><span class="attr">bantime</span> = <span class="string">600</span></span><br><span class="line"><span class="attr">findtime</span> = <span class="string">300</span></span><br><span class="line"><span class="attr">maxretry</span> = <span class="string">5</span></span><br><span class="line"><span class="attr">banaction</span> = <span class="string">firewallcmd-ipset</span></span><br><span class="line"><span class="attr">action</span> = <span class="string">%(action_mwl)s</span></span><br><span class="line"><span class="comment">#DEFAULT-END</span></span><br><span class="line"></span><br><span class="line"><span class="attr">[sshd]</span></span><br><span class="line"><span class="attr">ignoreip</span> = <span class="string">127.0.0.1/8 # 白名单</span></span><br><span class="line"><span class="attr">enabled</span> = <span class="string">true</span></span><br><span class="line"><span class="attr">filter</span> = <span class="string">sshd</span></span><br><span class="line"><span class="attr">port</span> = <span class="string">22 # 端口</span></span><br><span class="line"><span class="attr">maxretry</span> = <span class="string">2 # 最大尝试次数</span></span><br><span class="line"><span class="attr">findtime</span> = <span class="string">300 # 发现周期 单位s [在findtime(300秒)周期内尝试次数超过maxretry(2)次,就 #加入黑名单</span></span><br><span class="line"><span class="attr">bantime</span> = <span class="string">600 # 封禁时间单位s。-1为永久封禁</span></span><br><span class="line"><span class="attr">action</span> = <span class="string">%(action_mwl)s</span></span><br><span class="line"><span class="attr">banaction</span> = <span class="string">iptables-multiport # 禁用方式</span></span><br><span class="line"><span class="attr">logpath</span> = <span class="string">/var/log/secure # SSH 登陆日志位置</span></span><br></pre></td></tr></table></figure>
<p><strong>验证</strong></p>
<p><img src="/pictures/image-20240101195315281.png" alt="image-20240101195315281"></p>
<p><img src="/pictures/image-20240101195455038.png" alt="image-20240101195455038"></p>
]]></content>
<categories>
<category>运维</category>
</categories>
<tags>
<tag>1Panel</tag>
</tags>
</entry>
<entry>
<title>Maven配置文件settings.xml</title>
<url>/posts/26768.html</url>
<content><![CDATA[<p><strong>用途</strong>更换IDEA中Maven配置文件实现不下载配置maven的阿里云镜像 </p>
<h2 id="设置本地仓库磁盘存储位置"><a href="#设置本地仓库磁盘存储位置" class="headerlink" title="设置本地仓库磁盘存储位置"></a>设置本地仓库磁盘存储位置</h2><p>1.在C盘的根目录下创建如下的文件夹C:\maven\maven-repository</p>
<p>2.任选下面的两个配置文件中的一个放在C:\maven目录下 配置文件的名字为 <strong>settings.xml</strong></p>
<p>3.在IDEA中配置本地仓库的位置和配置文件的位置</p>
<h2 id="配置文件"><a href="#配置文件" class="headerlink" title="配置文件"></a>配置文件</h2><h3 id="apache-maven-3-6-3"><a href="#apache-maven-3-6-3" class="headerlink" title="apache-maven-3.6.3"></a>apache-maven-3.6.3</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;?xml version=<span class="string">&quot;1.0&quot;</span> encoding=<span class="string">&quot;UTF-8&quot;</span>?&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment">Licensed to the Apache Software Foundation (ASF) under one</span></span><br><span class="line"><span class="comment">or more contributor license agreements. See the NOTICE file</span></span><br><span class="line"><span class="comment">distributed with this work for additional information</span></span><br><span class="line"><span class="comment">regarding copyright ownership. The ASF licenses this file</span></span><br><span class="line"><span class="comment">to you under the Apache License, Version 2.0 (the</span></span><br><span class="line"><span class="comment">&quot;License&quot;); you may not use this file except in compliance</span></span><br><span class="line"><span class="comment">with the License. You may obtain a copy of the License at</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment"> http://www.apache.org/licenses/LICENSE-2.0</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">Unless required by applicable law or agreed to in writing,</span></span><br><span class="line"><span class="comment">software distributed under the License is distributed on an</span></span><br><span class="line"><span class="comment">&quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span></span><br><span class="line"><span class="comment">KIND, either express or implied. See the License for the</span></span><br><span class="line"><span class="comment">specific language governing permissions and limitations</span></span><br><span class="line"><span class="comment">under the License.</span></span><br><span class="line"><span class="comment">--&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment"> | This is the configuration file for Maven. It can be specified at two levels:</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | 1. User Level. This settings.xml file provides configuration for a single user,</span></span><br><span class="line"><span class="comment"> | and is normally provided in $&#123;user.home&#125;/.m2/settings.xml.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | <span class="doctag">NOTE:</span> This location can be overridden with the CLI option:</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | -s /path/to/user/settings.xml</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | 2. Global Level. This settings.xml file provides configuration for all Maven</span></span><br><span class="line"><span class="comment"> | users on a machine (assuming they&#x27;re all using the same Maven</span></span><br><span class="line"><span class="comment"> | installation). It&#x27;s normally provided in</span></span><br><span class="line"><span class="comment"> | $&#123;maven.conf&#125;/settings.xml.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | <span class="doctag">NOTE:</span> This location can be overridden with the CLI option:</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | -gs /path/to/global/settings.xml</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | The sections in this sample file are intended to give you a running start at</span></span><br><span class="line"><span class="comment"> | getting the most out of your Maven installation. Where appropriate, the default</span></span><br><span class="line"><span class="comment"> | values (values used when the setting is not specified) are provided.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> |--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">settings</span> <span class="attr">xmlns</span>=<span class="string">&quot;http://maven.apache.org/SETTINGS/1.0.0&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">xmlns:xsi</span>=<span class="string">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">xsi:schemaLocation</span>=<span class="string">&quot;http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- localRepository</span></span><br><span class="line"><span class="comment"> | The path to the local repository maven will use to store artifacts.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | Default: $&#123;user.home&#125;/.m2/repository</span></span><br><span class="line"><span class="comment"> &lt;localRepository&gt;/path/to/local/repo&lt;/localRepository&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">localRepository</span>&gt;</span>C:\maven\maven-repository<span class="tag">&lt;/<span class="name">localRepository</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- interactiveMode</span></span><br><span class="line"><span class="comment"> | This will determine whether maven prompts you when it needs input. If set to false,</span></span><br><span class="line"><span class="comment"> | maven will use a sensible default value, perhaps based on some other setting, for</span></span><br><span class="line"><span class="comment"> | the parameter in question.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | Default: true</span></span><br><span class="line"><span class="comment"> &lt;interactiveMode&gt;true&lt;/interactiveMode&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- offline</span></span><br><span class="line"><span class="comment"> | Determines whether maven should attempt to connect to the network when executing a build.</span></span><br><span class="line"><span class="comment"> | This will have an effect on artifact downloads, artifact deployment, and others.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | Default: false</span></span><br><span class="line"><span class="comment"> &lt;offline&gt;false&lt;/offline&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- pluginGroups</span></span><br><span class="line"><span class="comment"> | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.</span></span><br><span class="line"><span class="comment"> | when invoking a command line like &quot;mvn prefix:goal&quot;. Maven will automatically add the group identifiers</span></span><br><span class="line"><span class="comment"> | &quot;org.apache.maven.plugins&quot; and &quot;org.codehaus.mojo&quot; if these are not already contained in the list.</span></span><br><span class="line"><span class="comment"> |--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">pluginGroups</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- pluginGroup</span></span><br><span class="line"><span class="comment"> | Specifies a further group identifier to use for plugin lookup.</span></span><br><span class="line"><span class="comment"> &lt;pluginGroup&gt;com.your.plugins&lt;/pluginGroup&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">pluginGroups</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- proxies</span></span><br><span class="line"><span class="comment"> | This is a list of proxies which can be used on this machine to connect to the network.</span></span><br><span class="line"><span class="comment"> | Unless otherwise specified (by system property or command-line switch), the first proxy</span></span><br><span class="line"><span class="comment"> | specification in this list marked as active will be used.</span></span><br><span class="line"><span class="comment"> |--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">proxies</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- proxy</span></span><br><span class="line"><span class="comment"> | Specification for one proxy, to be used in connecting to the network.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> &lt;proxy&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;optional&lt;/id&gt;</span></span><br><span class="line"><span class="comment"> &lt;active&gt;true&lt;/active&gt;</span></span><br><span class="line"><span class="comment"> &lt;protocol&gt;http&lt;/protocol&gt;</span></span><br><span class="line"><span class="comment"> &lt;username&gt;proxyuser&lt;/username&gt;</span></span><br><span class="line"><span class="comment"> &lt;password&gt;proxypass&lt;/password&gt;</span></span><br><span class="line"><span class="comment"> &lt;host&gt;proxy.host.net&lt;/host&gt;</span></span><br><span class="line"><span class="comment"> &lt;port&gt;80&lt;/port&gt;</span></span><br><span class="line"><span class="comment"> &lt;nonProxyHosts&gt;local.net|some.host.com&lt;/nonProxyHosts&gt;</span></span><br><span class="line"><span class="comment"> &lt;/proxy&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">proxies</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- servers</span></span><br><span class="line"><span class="comment"> | This is a list of authentication profiles, keyed by the server-id used within the system.</span></span><br><span class="line"><span class="comment"> | Authentication profiles can be used whenever maven must make a connection to a remote server.</span></span><br><span class="line"><span class="comment"> |--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">servers</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- server</span></span><br><span class="line"><span class="comment"> | Specifies the authentication information to use when connecting to a particular server, identified by</span></span><br><span class="line"><span class="comment"> | a unique name within the system (referred to by the &#x27;id&#x27; attribute below).</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | <span class="doctag">NOTE:</span> You should either specify username/password OR privateKey/passphrase, since these pairings are</span></span><br><span class="line"><span class="comment"> | used together.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> &lt;server&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;deploymentRepo&lt;/id&gt;</span></span><br><span class="line"><span class="comment"> &lt;username&gt;repouser&lt;/username&gt;</span></span><br><span class="line"><span class="comment"> &lt;password&gt;repopwd&lt;/password&gt;</span></span><br><span class="line"><span class="comment"> &lt;/server&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- Another sample, using keys to authenticate.</span></span><br><span class="line"><span class="comment"> &lt;server&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;siteServer&lt;/id&gt;</span></span><br><span class="line"><span class="comment"> &lt;privateKey&gt;/path/to/private/key&lt;/privateKey&gt;</span></span><br><span class="line"><span class="comment"> &lt;passphrase&gt;optional; leave empty if not used.&lt;/passphrase&gt;</span></span><br><span class="line"><span class="comment"> &lt;/server&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">servers</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- mirrors</span></span><br><span class="line"><span class="comment"> | This is a list of mirrors to be used in downloading artifacts from remote repositories.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | It works like this: a POM may declare a repository to use in resolving certain artifacts.</span></span><br><span class="line"><span class="comment"> | However, this repository may have problems with heavy traffic at times, so people have mirrored</span></span><br><span class="line"><span class="comment"> | it to several places.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | That repository definition will have a unique id, so we can create a mirror reference for that</span></span><br><span class="line"><span class="comment"> | repository, to be used as an alternate download site. The mirror site will be the preferred</span></span><br><span class="line"><span class="comment"> | server for that repository.</span></span><br><span class="line"><span class="comment"> |--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">mirrors</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- mirror</span></span><br><span class="line"><span class="comment"> | Specifies a repository mirror site to use instead of a given repository. The repository that</span></span><br><span class="line"><span class="comment"> | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used</span></span><br><span class="line"><span class="comment"> | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> &lt;mirror&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;mirrorId&lt;/id&gt;</span></span><br><span class="line"><span class="comment"> &lt;mirrorOf&gt;repositoryId&lt;/mirrorOf&gt;</span></span><br><span class="line"><span class="comment"> &lt;name&gt;Human Readable Name for this Mirror.&lt;/name&gt;</span></span><br><span class="line"><span class="comment"> &lt;url&gt;http://my.repository.com/repo/path&lt;/url&gt;</span></span><br><span class="line"><span class="comment"> &lt;/mirror&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 阿里云仓库,个人配置 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">mirror</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">id</span>&gt;</span>alimaven<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">mirrorOf</span>&gt;</span>central<span class="tag">&lt;/<span class="name">mirrorOf</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">name</span>&gt;</span>aliyun maven<span class="tag">&lt;/<span class="name">name</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">url</span>&gt;</span>http://maven.aliyun.com/nexus/content/repositories/central/<span class="tag">&lt;/<span class="name">url</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">mirror</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">mirrors</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- profiles</span></span><br><span class="line"><span class="comment"> | This is a list of profiles which can be activated in a variety of ways, and which can modify</span></span><br><span class="line"><span class="comment"> | the build process. Profiles provided in the settings.xml are intended to provide local machine-</span></span><br><span class="line"><span class="comment"> | specific paths and repository locations which allow the build to work in the local environment.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | For example, if you have an integration testing plugin - like cactus - that needs to know where</span></span><br><span class="line"><span class="comment"> | your Tomcat instance is installed, you can provide a variable here such that the variable is</span></span><br><span class="line"><span class="comment"> | dereferenced during the build process to configure the cactus plugin.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles</span></span><br><span class="line"><span class="comment"> | section of this document (settings.xml) - will be discussed later. Another way essentially</span></span><br><span class="line"><span class="comment"> | relies on the detection of a system property, either matching a particular value for the property,</span></span><br><span class="line"><span class="comment"> | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a</span></span><br><span class="line"><span class="comment"> | value of &#x27;1.4&#x27; might activate a profile when the build is executed on a JDK version of &#x27;1.4.2_07&#x27;.</span></span><br><span class="line"><span class="comment"> | Finally, the list of active profiles can be specified directly from the command line.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | <span class="doctag">NOTE:</span> For profiles defined in the settings.xml, you are restricted to specifying only artifact</span></span><br><span class="line"><span class="comment"> | repositories, plugin repositories, and free-form properties to be used as configuration</span></span><br><span class="line"><span class="comment"> | variables for plugins in the POM.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> |--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">profiles</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- profile</span></span><br><span class="line"><span class="comment"> | Specifies a set of introductions to the build process, to be activated using one or more of the</span></span><br><span class="line"><span class="comment"> | mechanisms described above. For inheritance purposes, and to activate profiles via &lt;activatedProfiles/&gt;</span></span><br><span class="line"><span class="comment"> | or the command line, profiles have to have an ID that is unique.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | An encouraged best practice for profile identification is to use a consistent naming convention</span></span><br><span class="line"><span class="comment"> | for profiles, such as &#x27;env-dev&#x27;, &#x27;env-test&#x27;, &#x27;env-production&#x27;, &#x27;user-jdcasey&#x27;, &#x27;user-brett&#x27;, etc.</span></span><br><span class="line"><span class="comment"> | This will make it more intuitive to understand what the set of introduced profiles is attempting</span></span><br><span class="line"><span class="comment"> | to accomplish, particularly when you only have a list of profile id&#x27;s for debug.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.</span></span><br><span class="line"><span class="comment"> &lt;profile&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;jdk-1.4&lt;/id&gt;</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment"> &lt;activation&gt;</span></span><br><span class="line"><span class="comment"> &lt;jdk&gt;1.4&lt;/jdk&gt;</span></span><br><span class="line"><span class="comment"> &lt;/activation&gt;</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment"> &lt;repositories&gt;</span></span><br><span class="line"><span class="comment"> &lt;repository&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;jdk14&lt;/id&gt;</span></span><br><span class="line"><span class="comment"> &lt;name&gt;Repository for JDK 1.4 builds&lt;/name&gt;</span></span><br><span class="line"><span class="comment"> &lt;url&gt;http://www.myhost.com/maven/jdk14&lt;/url&gt;</span></span><br><span class="line"><span class="comment"> &lt;layout&gt;default&lt;/layout&gt;</span></span><br><span class="line"><span class="comment"> &lt;snapshotPolicy&gt;always&lt;/snapshotPolicy&gt;</span></span><br><span class="line"><span class="comment"> &lt;/repository&gt;</span></span><br><span class="line"><span class="comment"> &lt;/repositories&gt;</span></span><br><span class="line"><span class="comment"> &lt;/profile&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment"> | Here is another profile, activated by the system property &#x27;target-env&#x27; with a value of &#x27;dev&#x27;,</span></span><br><span class="line"><span class="comment"> | which provides a specific path to the Tomcat instance. To use this, your plugin configuration</span></span><br><span class="line"><span class="comment"> | might hypothetically look like:</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | ...</span></span><br><span class="line"><span class="comment"> | &lt;plugin&gt;</span></span><br><span class="line"><span class="comment"> | &lt;groupId&gt;org.myco.myplugins&lt;/groupId&gt;</span></span><br><span class="line"><span class="comment"> | &lt;artifactId&gt;myplugin&lt;/artifactId&gt;</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | &lt;configuration&gt;</span></span><br><span class="line"><span class="comment"> | &lt;tomcatLocation&gt;$&#123;tomcatPath&#125;&lt;/tomcatLocation&gt;</span></span><br><span class="line"><span class="comment"> | &lt;/configuration&gt;</span></span><br><span class="line"><span class="comment"> | &lt;/plugin&gt;</span></span><br><span class="line"><span class="comment"> | ...</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | <span class="doctag">NOTE:</span> If you just wanted to inject this configuration whenever someone set &#x27;target-env&#x27; to</span></span><br><span class="line"><span class="comment"> | anything, you could just leave off the &lt;value/&gt; inside the activation-property.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> &lt;profile&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;env-dev&lt;/id&gt;</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment"> &lt;activation&gt;</span></span><br><span class="line"><span class="comment"> &lt;property&gt;</span></span><br><span class="line"><span class="comment"> &lt;name&gt;target-env&lt;/name&gt;</span></span><br><span class="line"><span class="comment"> &lt;value&gt;dev&lt;/value&gt;</span></span><br><span class="line"><span class="comment"> &lt;/property&gt;</span></span><br><span class="line"><span class="comment"> &lt;/activation&gt;</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment"> &lt;properties&gt;</span></span><br><span class="line"><span class="comment"> &lt;tomcatPath&gt;/path/to/tomcat/instance&lt;/tomcatPath&gt;</span></span><br><span class="line"><span class="comment"> &lt;/properties&gt;</span></span><br><span class="line"><span class="comment"> &lt;/profile&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">profiles</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- activeProfiles</span></span><br><span class="line"><span class="comment"> | List of profiles that are active for all builds.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> &lt;activeProfiles&gt;</span></span><br><span class="line"><span class="comment"> &lt;activeProfile&gt;alwaysActiveProfile&lt;/activeProfile&gt;</span></span><br><span class="line"><span class="comment"> &lt;activeProfile&gt;anotherAlwaysActiveProfile&lt;/activeProfile&gt;</span></span><br><span class="line"><span class="comment"> &lt;/activeProfiles&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">settings</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="apache-maven-3-8-6"><a href="#apache-maven-3-8-6" class="headerlink" title="apache-maven-3.8.6"></a>apache-maven-3.8.6</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;?xml version=<span class="string">&quot;1.0&quot;</span> encoding=<span class="string">&quot;UTF-8&quot;</span>?&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment">Licensed to the Apache Software Foundation (ASF) under one</span></span><br><span class="line"><span class="comment">or more contributor license agreements. See the NOTICE file</span></span><br><span class="line"><span class="comment">distributed with this work for additional information</span></span><br><span class="line"><span class="comment">regarding copyright ownership. The ASF licenses this file</span></span><br><span class="line"><span class="comment">to you under the Apache License, Version 2.0 (the</span></span><br><span class="line"><span class="comment">&quot;License&quot;); you may not use this file except in compliance</span></span><br><span class="line"><span class="comment">with the License. You may obtain a copy of the License at</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment"> http://www.apache.org/licenses/LICENSE-2.0</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">Unless required by applicable law or agreed to in writing,</span></span><br><span class="line"><span class="comment">software distributed under the License is distributed on an</span></span><br><span class="line"><span class="comment">&quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span></span><br><span class="line"><span class="comment">KIND, either express or implied. See the License for the</span></span><br><span class="line"><span class="comment">specific language governing permissions and limitations</span></span><br><span class="line"><span class="comment">under the License.</span></span><br><span class="line"><span class="comment">--&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment"> | This is the configuration file for Maven. It can be specified at two levels:</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | 1. User Level. This settings.xml file provides configuration for a single user,</span></span><br><span class="line"><span class="comment"> | and is normally provided in $&#123;user.home&#125;/.m2/settings.xml.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | <span class="doctag">NOTE:</span> This location can be overridden with the CLI option:</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | -s /path/to/user/settings.xml</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | 2. Global Level. This settings.xml file provides configuration for all Maven</span></span><br><span class="line"><span class="comment"> | users on a machine (assuming they&#x27;re all using the same Maven</span></span><br><span class="line"><span class="comment"> | installation). It&#x27;s normally provided in</span></span><br><span class="line"><span class="comment"> | $&#123;maven.conf&#125;/settings.xml.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | <span class="doctag">NOTE:</span> This location can be overridden with the CLI option:</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | -gs /path/to/global/settings.xml</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | The sections in this sample file are intended to give you a running start at</span></span><br><span class="line"><span class="comment"> | getting the most out of your Maven installation. Where appropriate, the default</span></span><br><span class="line"><span class="comment"> | values (values used when the setting is not specified) are provided.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> |--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">settings</span> <span class="attr">xmlns</span>=<span class="string">&quot;http://maven.apache.org/SETTINGS/1.2.0&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">xmlns:xsi</span>=<span class="string">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">xsi:schemaLocation</span>=<span class="string">&quot;http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- localRepository</span></span><br><span class="line"><span class="comment"> | The path to the local repository maven will use to store artifacts.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | Default: $&#123;user.home&#125;/.m2/repository</span></span><br><span class="line"><span class="comment"> &lt;localRepository&gt;/path/to/local/repo&lt;/localRepository&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">localRepository</span>&gt;</span>C:\maven\maven-repository<span class="tag">&lt;/<span class="name">localRepository</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- interactiveMode</span></span><br><span class="line"><span class="comment"> | This will determine whether maven prompts you when it needs input. If set to false,</span></span><br><span class="line"><span class="comment"> | maven will use a sensible default value, perhaps based on some other setting, for</span></span><br><span class="line"><span class="comment"> | the parameter in question.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | Default: true</span></span><br><span class="line"><span class="comment"> &lt;interactiveMode&gt;true&lt;/interactiveMode&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- offline</span></span><br><span class="line"><span class="comment"> | Determines whether maven should attempt to connect to the network when executing a build.</span></span><br><span class="line"><span class="comment"> | This will have an effect on artifact downloads, artifact deployment, and others.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | Default: false</span></span><br><span class="line"><span class="comment"> &lt;offline&gt;false&lt;/offline&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- pluginGroups</span></span><br><span class="line"><span class="comment"> | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.</span></span><br><span class="line"><span class="comment"> | when invoking a command line like &quot;mvn prefix:goal&quot;. Maven will automatically add the group identifiers</span></span><br><span class="line"><span class="comment"> | &quot;org.apache.maven.plugins&quot; and &quot;org.codehaus.mojo&quot; if these are not already contained in the list.</span></span><br><span class="line"><span class="comment"> |--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">pluginGroups</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- pluginGroup</span></span><br><span class="line"><span class="comment"> | Specifies a further group identifier to use for plugin lookup.</span></span><br><span class="line"><span class="comment"> &lt;pluginGroup&gt;com.your.plugins&lt;/pluginGroup&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">pluginGroups</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- proxies</span></span><br><span class="line"><span class="comment"> | This is a list of proxies which can be used on this machine to connect to the network.</span></span><br><span class="line"><span class="comment"> | Unless otherwise specified (by system property or command-line switch), the first proxy</span></span><br><span class="line"><span class="comment"> | specification in this list marked as active will be used.</span></span><br><span class="line"><span class="comment"> |--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">proxies</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- proxy</span></span><br><span class="line"><span class="comment"> | Specification for one proxy, to be used in connecting to the network.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> &lt;proxy&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;optional&lt;/id&gt;</span></span><br><span class="line"><span class="comment"> &lt;active&gt;true&lt;/active&gt;</span></span><br><span class="line"><span class="comment"> &lt;protocol&gt;http&lt;/protocol&gt;</span></span><br><span class="line"><span class="comment"> &lt;username&gt;proxyuser&lt;/username&gt;</span></span><br><span class="line"><span class="comment"> &lt;password&gt;proxypass&lt;/password&gt;</span></span><br><span class="line"><span class="comment"> &lt;host&gt;proxy.host.net&lt;/host&gt;</span></span><br><span class="line"><span class="comment"> &lt;port&gt;80&lt;/port&gt;</span></span><br><span class="line"><span class="comment"> &lt;nonProxyHosts&gt;local.net|some.host.com&lt;/nonProxyHosts&gt;</span></span><br><span class="line"><span class="comment"> &lt;/proxy&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">proxies</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- servers</span></span><br><span class="line"><span class="comment"> | This is a list of authentication profiles, keyed by the server-id used within the system.</span></span><br><span class="line"><span class="comment"> | Authentication profiles can be used whenever maven must make a connection to a remote server.</span></span><br><span class="line"><span class="comment"> |--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">servers</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- server</span></span><br><span class="line"><span class="comment"> | Specifies the authentication information to use when connecting to a particular server, identified by</span></span><br><span class="line"><span class="comment"> | a unique name within the system (referred to by the &#x27;id&#x27; attribute below).</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | <span class="doctag">NOTE:</span> You should either specify username/password OR privateKey/passphrase, since these pairings are</span></span><br><span class="line"><span class="comment"> | used together.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> &lt;server&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;deploymentRepo&lt;/id&gt;</span></span><br><span class="line"><span class="comment"> &lt;username&gt;repouser&lt;/username&gt;</span></span><br><span class="line"><span class="comment"> &lt;password&gt;repopwd&lt;/password&gt;</span></span><br><span class="line"><span class="comment"> &lt;/server&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- Another sample, using keys to authenticate.</span></span><br><span class="line"><span class="comment"> &lt;server&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;siteServer&lt;/id&gt;</span></span><br><span class="line"><span class="comment"> &lt;privateKey&gt;/path/to/private/key&lt;/privateKey&gt;</span></span><br><span class="line"><span class="comment"> &lt;passphrase&gt;optional; leave empty if not used.&lt;/passphrase&gt;</span></span><br><span class="line"><span class="comment"> &lt;/server&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">servers</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- mirrors</span></span><br><span class="line"><span class="comment"> | This is a list of mirrors to be used in downloading artifacts from remote repositories.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | It works like this: a POM may declare a repository to use in resolving certain artifacts.</span></span><br><span class="line"><span class="comment"> | However, this repository may have problems with heavy traffic at times, so people have mirrored</span></span><br><span class="line"><span class="comment"> | it to several places.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | That repository definition will have a unique id, so we can create a mirror reference for that</span></span><br><span class="line"><span class="comment"> | repository, to be used as an alternate download site. The mirror site will be the preferred</span></span><br><span class="line"><span class="comment"> | server for that repository.</span></span><br><span class="line"><span class="comment"> |--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">mirrors</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- mirror</span></span><br><span class="line"><span class="comment"> | Specifies a repository mirror site to use instead of a given repository. The repository that</span></span><br><span class="line"><span class="comment"> | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used</span></span><br><span class="line"><span class="comment"> | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> &lt;mirror&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;mirrorId&lt;/id&gt;</span></span><br><span class="line"><span class="comment"> &lt;mirrorOf&gt;repositoryId&lt;/mirrorOf&gt;</span></span><br><span class="line"><span class="comment"> &lt;name&gt;Human Readable Name for this Mirror.&lt;/name&gt;</span></span><br><span class="line"><span class="comment"> &lt;url&gt;http://my.repository.com/repo/path&lt;/url&gt;</span></span><br><span class="line"><span class="comment"> &lt;/mirror&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--&lt;mirror&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;maven-default-http-blocker&lt;/id&gt;</span></span><br><span class="line"><span class="comment"> &lt;mirrorOf&gt;external:http:*&lt;/mirrorOf&gt;</span></span><br><span class="line"><span class="comment"> &lt;name&gt;Pseudo repository to mirror external repositories initially using HTTP.&lt;/name&gt;</span></span><br><span class="line"><span class="comment"> &lt;url&gt;http://0.0.0.0/&lt;/url&gt;</span></span><br><span class="line"><span class="comment"> &lt;blocked&gt;true&lt;/blocked&gt;</span></span><br><span class="line"><span class="comment"> &lt;/mirror&gt;--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">mirror</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">id</span>&gt;</span>nexus-aliyun<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">mirrorOf</span>&gt;</span>central<span class="tag">&lt;/<span class="name">mirrorOf</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">name</span>&gt;</span>Nexus aliyun<span class="tag">&lt;/<span class="name">name</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">url</span>&gt;</span>http://maven.aliyun.com/nexus/content/groups/public<span class="tag">&lt;/<span class="name">url</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">mirror</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">mirrors</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- profiles</span></span><br><span class="line"><span class="comment"> | This is a list of profiles which can be activated in a variety of ways, and which can modify</span></span><br><span class="line"><span class="comment"> | the build process. Profiles provided in the settings.xml are intended to provide local machine-</span></span><br><span class="line"><span class="comment"> | specific paths and repository locations which allow the build to work in the local environment.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | For example, if you have an integration testing plugin - like cactus - that needs to know where</span></span><br><span class="line"><span class="comment"> | your Tomcat instance is installed, you can provide a variable here such that the variable is</span></span><br><span class="line"><span class="comment"> | dereferenced during the build process to configure the cactus plugin.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles</span></span><br><span class="line"><span class="comment"> | section of this document (settings.xml) - will be discussed later. Another way essentially</span></span><br><span class="line"><span class="comment"> | relies on the detection of a system property, either matching a particular value for the property,</span></span><br><span class="line"><span class="comment"> | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a</span></span><br><span class="line"><span class="comment"> | value of &#x27;1.4&#x27; might activate a profile when the build is executed on a JDK version of &#x27;1.4.2_07&#x27;.</span></span><br><span class="line"><span class="comment"> | Finally, the list of active profiles can be specified directly from the command line.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | <span class="doctag">NOTE:</span> For profiles defined in the settings.xml, you are restricted to specifying only artifact</span></span><br><span class="line"><span class="comment"> | repositories, plugin repositories, and free-form properties to be used as configuration</span></span><br><span class="line"><span class="comment"> | variables for plugins in the POM.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> |--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">profiles</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- profile</span></span><br><span class="line"><span class="comment"> | Specifies a set of introductions to the build process, to be activated using one or more of the</span></span><br><span class="line"><span class="comment"> | mechanisms described above. For inheritance purposes, and to activate profiles via &lt;activatedProfiles/&gt;</span></span><br><span class="line"><span class="comment"> | or the command line, profiles have to have an ID that is unique.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | An encouraged best practice for profile identification is to use a consistent naming convention</span></span><br><span class="line"><span class="comment"> | for profiles, such as &#x27;env-dev&#x27;, &#x27;env-test&#x27;, &#x27;env-production&#x27;, &#x27;user-jdcasey&#x27;, &#x27;user-brett&#x27;, etc.</span></span><br><span class="line"><span class="comment"> | This will make it more intuitive to understand what the set of introduced profiles is attempting</span></span><br><span class="line"><span class="comment"> | to accomplish, particularly when you only have a list of profile id&#x27;s for debug.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.</span></span><br><span class="line"><span class="comment"> &lt;profile&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;jdk-1.4&lt;/id&gt;</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment"> &lt;activation&gt;</span></span><br><span class="line"><span class="comment"> &lt;jdk&gt;1.4&lt;/jdk&gt;</span></span><br><span class="line"><span class="comment"> &lt;/activation&gt;</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment"> &lt;repositories&gt;</span></span><br><span class="line"><span class="comment"> &lt;repository&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;jdk14&lt;/id&gt;</span></span><br><span class="line"><span class="comment"> &lt;name&gt;Repository for JDK 1.4 builds&lt;/name&gt;</span></span><br><span class="line"><span class="comment"> &lt;url&gt;http://www.myhost.com/maven/jdk14&lt;/url&gt;</span></span><br><span class="line"><span class="comment"> &lt;layout&gt;default&lt;/layout&gt;</span></span><br><span class="line"><span class="comment"> &lt;snapshotPolicy&gt;always&lt;/snapshotPolicy&gt;</span></span><br><span class="line"><span class="comment"> &lt;/repository&gt;</span></span><br><span class="line"><span class="comment"> &lt;/repositories&gt;</span></span><br><span class="line"><span class="comment"> &lt;/profile&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment"> | Here is another profile, activated by the system property &#x27;target-env&#x27; with a value of &#x27;dev&#x27;,</span></span><br><span class="line"><span class="comment"> | which provides a specific path to the Tomcat instance. To use this, your plugin configuration</span></span><br><span class="line"><span class="comment"> | might hypothetically look like:</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | ...</span></span><br><span class="line"><span class="comment"> | &lt;plugin&gt;</span></span><br><span class="line"><span class="comment"> | &lt;groupId&gt;org.myco.myplugins&lt;/groupId&gt;</span></span><br><span class="line"><span class="comment"> | &lt;artifactId&gt;myplugin&lt;/artifactId&gt;</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | &lt;configuration&gt;</span></span><br><span class="line"><span class="comment"> | &lt;tomcatLocation&gt;$&#123;tomcatPath&#125;&lt;/tomcatLocation&gt;</span></span><br><span class="line"><span class="comment"> | &lt;/configuration&gt;</span></span><br><span class="line"><span class="comment"> | &lt;/plugin&gt;</span></span><br><span class="line"><span class="comment"> | ...</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> | <span class="doctag">NOTE:</span> If you just wanted to inject this configuration whenever someone set &#x27;target-env&#x27; to</span></span><br><span class="line"><span class="comment"> | anything, you could just leave off the &lt;value/&gt; inside the activation-property.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> &lt;profile&gt;</span></span><br><span class="line"><span class="comment"> &lt;id&gt;env-dev&lt;/id&gt;</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment"> &lt;activation&gt;</span></span><br><span class="line"><span class="comment"> &lt;property&gt;</span></span><br><span class="line"><span class="comment"> &lt;name&gt;target-env&lt;/name&gt;</span></span><br><span class="line"><span class="comment"> &lt;value&gt;dev&lt;/value&gt;</span></span><br><span class="line"><span class="comment"> &lt;/property&gt;</span></span><br><span class="line"><span class="comment"> &lt;/activation&gt;</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment"> &lt;properties&gt;</span></span><br><span class="line"><span class="comment"> &lt;tomcatPath&gt;/path/to/tomcat/instance&lt;/tomcatPath&gt;</span></span><br><span class="line"><span class="comment"> &lt;/properties&gt;</span></span><br><span class="line"><span class="comment"> &lt;/profile&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">profile</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">id</span>&gt;</span>jdk-1.8<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">activation</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">activeByDefault</span>&gt;</span>true<span class="tag">&lt;/<span class="name">activeByDefault</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">jdk</span>&gt;</span>1.8<span class="tag">&lt;/<span class="name">jdk</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">activation</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">properties</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">maven.compiler.source</span>&gt;</span>1.8<span class="tag">&lt;/<span class="name">maven.compiler.source</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">maven.compiler.target</span>&gt;</span>1.8<span class="tag">&lt;/<span class="name">maven.compiler.target</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">maven.compiler.compilerVersion</span>&gt;</span>1.8<span class="tag">&lt;/<span class="name">maven.compiler.compilerVersion</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">properties</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">profile</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">profiles</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- activeProfiles</span></span><br><span class="line"><span class="comment"> | List of profiles that are active for all builds.</span></span><br><span class="line"><span class="comment"> |</span></span><br><span class="line"><span class="comment"> &lt;activeProfiles&gt;</span></span><br><span class="line"><span class="comment"> &lt;activeProfile&gt;alwaysActiveProfile&lt;/activeProfile&gt;</span></span><br><span class="line"><span class="comment"> &lt;activeProfile&gt;anotherAlwaysActiveProfile&lt;/activeProfile&gt;</span></span><br><span class="line"><span class="comment"> &lt;/activeProfiles&gt;</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">settings</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="Linux中使用-去掉了注释"><a href="#Linux中使用-去掉了注释" class="headerlink" title="Linux中使用,去掉了注释"></a>Linux中使用,去掉了注释</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;?xml version=<span class="string">&quot;1.0&quot;</span> encoding=<span class="string">&quot;UTF-8&quot;</span>?&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">settings</span> <span class="attr">xmlns</span>=<span class="string">&quot;http://maven.apache.org/SETTINGS/1.0.0&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">xmlns:xsi</span>=<span class="string">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">xsi:schemaLocation</span>=<span class="string">&quot;http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd&quot;</span>&gt;</span></span><br><span class="line"> </span><br><span class="line"><span class="tag">&lt;<span class="name">localRepository</span>&gt;</span>/root/.m2/repository<span class="tag">&lt;/<span class="name">localRepository</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">pluginGroups</span>&gt;</span></span><br><span class="line"> </span><br><span class="line"> <span class="tag">&lt;/<span class="name">pluginGroups</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">proxies</span>&gt;</span></span><br><span class="line"> </span><br><span class="line"> <span class="tag">&lt;/<span class="name">proxies</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">servers</span>&gt;</span></span><br><span class="line"> </span><br><span class="line"> <span class="tag">&lt;/<span class="name">servers</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">mirrors</span>&gt;</span></span><br><span class="line"> </span><br><span class="line"> <span class="tag">&lt;<span class="name">mirror</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">id</span>&gt;</span>alimaven<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">mirrorOf</span>&gt;</span>central<span class="tag">&lt;/<span class="name">mirrorOf</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">name</span>&gt;</span>aliyun maven<span class="tag">&lt;/<span class="name">name</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">url</span>&gt;</span>http://maven.aliyun.com/nexus/content/repositories/central/<span class="tag">&lt;/<span class="name">url</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">mirror</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">mirrors</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">profiles</span>&gt;</span></span><br><span class="line"> </span><br><span class="line"> <span class="tag">&lt;/<span class="name">profiles</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">settings</span>&gt;</span></span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>Java</tag>
</tags>
</entry>
<entry>
<title>ElasticSearch</title>
<url>/posts/22654.html</url>
<content><![CDATA[<p>官网: <a href="https://www.elastic.co/cn/elasticsearch/">https://www.elastic.co/cn/elasticsearch/</a></p>
<h1 id="简介"><a href="#简介" class="headerlink" title="简介"></a>简介</h1><p> Elasticsearch 是一个分布式、RESTful 风格的搜索和数据分析引擎,能够解决不断涌现出的各种用例。作为 Elastic Stack 的核心Elasticsearch 会集中存储您的数据,让您飞快完成搜索,微调相关性,进行强大的分析,并轻松缩放规模。</p>
<h1 id="一-基本概念"><a href="#一-基本概念" class="headerlink" title="一.基本概念"></a>一.基本概念</h1><p><strong>1.Index(索引)</strong></p>
<p>动词:相当于mysql的insert</p>
<p>名词:相当于mysql的database</p>
<p><strong>2.Type(类型)</strong></p>
<p>在index中可以定义一个或者多个类型</p>
<p>类似于mysql中的Table每一种类型的数据放在一起</p>
<p><strong>3.Document(文档)</strong></p>
<p>保存在某个索引(index)下,某种类型(Type)的一个数据(Document),文档是JSON格式的</p>
<p>Document就是像mysql中的某个Table里面的内容。</p>
<p><strong>4.倒排索引</strong></p>
<p><img src="/pictures/image-20230628180000365.png" alt="image-20230628180000365"></p>
<h1 id="二-Docker安装ElasticSearch"><a href="#二-Docker安装ElasticSearch" class="headerlink" title="二.Docker安装ElasticSearch"></a>二.Docker安装ElasticSearch</h1><h2 id="1-安装ElasticSearch-存储和检索数据"><a href="#1-安装ElasticSearch-存储和检索数据" class="headerlink" title="1.安装ElasticSearch(存储和检索数据)"></a>1.安装ElasticSearch(存储和检索数据)</h2><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">拉取ElasticSearch</span></span><br><span class="line">docker pull elasticsearch:7.4.2</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">ES的配置文件存放的位置</span></span><br><span class="line">mkdir -p /mydata/elasticsearch/config</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">ES相关的数据</span></span><br><span class="line">mkdir -p /mydata/elasticsearch/data</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">将<span class="string">&quot;http.host: 0.0.0.0&quot;</span>(可以被任何的机器访问)的配置写入elasticsearch.yml中注意冒号后面的空格</span></span><br><span class="line">echo &quot;http.host: 0.0.0.0&quot; &gt;&gt; /mydata/elasticsearch/config/elasticsearch.yml</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">设置文件的权限</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">递归更改权限es需要访问</span></span><br><span class="line">chmod -R 777 /mydata/elasticsearch/</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">运行容器的命令 9200端口用于发送请求使用 9300端口用于集群中节点中的通信使用</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">单节点运行</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">初始占用64m最大占用512m不指定ES会占用所有的内存</span></span><br><span class="line">docker run --name elasticsearch -p 9200:9200 -p 9300:9300 \</span><br><span class="line">-e &quot;discovery.type=single-node&quot; \</span><br><span class="line">-e ES_JAVA_OPTS=&quot;-Xms64m -Xmx512m&quot; \</span><br><span class="line">-v /mydata/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \</span><br><span class="line">-v /mydata/elasticsearch/data:/usr/share/elasticsearch/data \</span><br><span class="line">-v /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins \</span><br><span class="line">-d elasticsearch:7.4.2 </span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">设置开机启动elasticsearch</span></span><br><span class="line">docker update elasticsearch --restart=always</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">访问端口 测试是否安装成功</span></span><br><span class="line">http://虚拟机的ip:9200/</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230628191936254.png" alt="image-20230628191936254"></p>
<h2 id="2-安装Kibana-可视化检索数据"><a href="#2-安装Kibana-可视化检索数据" class="headerlink" title="2.安装Kibana(可视化检索数据)"></a>2.安装Kibana(可视化检索数据)</h2><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">拉取Kibana</span></span><br><span class="line">docker pull kibana:7.4.2</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">这里-e是自己的elasticsearch服务地址这里的地址一定要改为自己虚拟机的地址</span></span><br><span class="line">docker run --name kibana -e ELASTICSEARCH_HOSTS=http://192.168.195.100:9200 -p 5601:5601 -d kibana:7.4.2</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">设置开机启动kibana</span></span><br><span class="line">docker update kibana --restart=always</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">访问对应的网址查看服务</span></span><br><span class="line">http://虚拟机的ip:5601</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230701104616032.png" alt="image-20230701104616032"></p>
<h1 id="三-初步检索"><a href="#三-初步检索" class="headerlink" title="三.初步检索"></a>三.初步检索</h1><h2 id="1-Cat"><a href="#1-Cat" class="headerlink" title="1._Cat"></a>1._Cat</h2><p>GET&#x2F;_cat&#x2F;nodes 查看所有节点</p>
<p>GET&#x2F;_cat&#x2F;health 查看es的健康状态</p>
<p>GET&#x2F;_cat&#x2F;master 查看主节点</p>
<p>GET&#x2F;_cat&#x2F;indices 查看所有索引 </p>
<h2 id="2-索引文档-保存"><a href="#2-索引文档-保存" class="headerlink" title="2.索引文档(保存)"></a>2.索引文档(保存)</h2><p><strong>保存操作可以发送PUT或者POST请求</strong></p>
<p>put需要在路径上指定id</p>
<p>post请求可以不指定id自动生成一个唯一标识</p>
<p>例:PUT customer&#x2F;external&#x2F;1 在customer索引下的external类型下保存1号数据为</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line">-&gt; PUT customer/external/<span class="number">1</span></span><br><span class="line"><span class="comment">//请求体</span></span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span><span class="string">&quot;John Doe&quot;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230701144040577.png" alt="image-20230701144040577"></p>
<p>返回的数据解析</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="comment">//_开头的数据称为元数据</span></span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;_index&quot;</span><span class="punctuation">:</span> <span class="string">&quot;customer&quot;</span><span class="punctuation">,</span><span class="comment">//数据存在的数据库</span></span><br><span class="line"> <span class="attr">&quot;_type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;external&quot;</span><span class="punctuation">,</span><span class="comment">//保存数据的类型</span></span><br><span class="line"> <span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span> <span class="string">&quot;1&quot;</span><span class="punctuation">,</span><span class="comment">//数据的id</span></span><br><span class="line"> <span class="attr">&quot;_version&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span><span class="comment">//数据的版本</span></span><br><span class="line"> <span class="attr">&quot;result&quot;</span><span class="punctuation">:</span> <span class="string">&quot;created&quot;</span><span class="punctuation">,</span><span class="comment">//保存为&quot;created&quot;,修改为&quot;updated&quot;,发送多次为更新的操作</span></span><br><span class="line"> <span class="attr">&quot;_shards&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span> <span class="comment">//分片</span></span><br><span class="line"> <span class="attr">&quot;total&quot;</span><span class="punctuation">:</span> <span class="number">2</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;successful&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;failed&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_seq_no&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_primary_term&quot;</span><span class="punctuation">:</span> <span class="number">1</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<h2 id="3-查询文档"><a href="#3-查询文档" class="headerlink" title="3.查询文档"></a>3.查询文档</h2><figure class="highlight json"><table><tr><td class="code"><pre><span class="line">-&gt; GET customer/external/<span class="number">1</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230701145518348.png" alt="image-20230701145518348"></p>
<p>返回数据解析</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;_index&quot;</span><span class="punctuation">:</span> <span class="string">&quot;customer&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;external&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span> <span class="string">&quot;1&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_version&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_seq_no&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span><span class="comment">//并发控制的字段,每次更新就会+1用来做乐观锁</span></span><br><span class="line"> <span class="attr">&quot;_primary_term&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span><span class="comment">//同上,主分片重新分配,如重启,就会有变化</span></span><br><span class="line"> <span class="attr">&quot;found&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">true</span></span><span class="punctuation">,</span><span class="comment">//是否找到</span></span><br><span class="line"> <span class="attr">&quot;_source&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span><span class="comment">//数据真正的内容</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;John Doe&quot;</span> </span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<h2 id="4-更新文档"><a href="#4-更新文档" class="headerlink" title="4.更新文档"></a>4.更新文档</h2><figure class="highlight json"><table><tr><td class="code"><pre><span class="line">POST customer/external/<span class="number">1</span>/_update <span class="comment">//对比原先的数据和原先的一样_version和_seq_no不会发生改变</span></span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;doc&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;John Doe&quot;</span> </span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br><span class="line">或者 </span><br><span class="line">POST customer/external/<span class="number">1</span> <span class="comment">//和之前的数据一样的话也会执行更新操作</span></span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;John Doe&quot;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br><span class="line">或者</span><br><span class="line">PUT customer/external/<span class="number">1</span></span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;John Doe&quot;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p> 使用POST customer&#x2F;external&#x2F;1&#x2F;_update 的方式进行更新会对比原先的数据和原先的一样version和_seq_no不会发生改变,下面是我们使用同样的数据发送两次更新请求第二次的result显示”noop”没有进行操作</p>
<p><img src="/pictures/image-20230701151445190.png" alt="image-20230701151445190"></p>
<h2 id="5-删除文档-索引"><a href="#5-删除文档-索引" class="headerlink" title="5.删除文档|索引"></a>5.删除文档|索引</h2><figure class="highlight json"><table><tr><td class="code"><pre><span class="line">DELETE customer/external/<span class="number">1</span></span><br><span class="line">DELETE customer</span><br></pre></td></tr></table></figure>
<p>删除文档</p>
<p><img src="/pictures/image-20230701152501989.png" alt="image-20230701152501989"></p>
<p>删除索引</p>
<p><img src="/pictures/image-20230701152648756.png" alt="image-20230701152648756"></p>
<h2 id="6-bulk批量API"><a href="#6-bulk批量API" class="headerlink" title="6.bulk批量API"></a>6.bulk批量API</h2><p><strong>Kibana的使用</strong></p>
<p><img src="/pictures/image-20230701153754438.png" alt="image-20230701153754438"></p>
<p><strong>批量保存数据</strong></p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line">POST /customer/external/_bulk</span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;1&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;name&quot;</span><span class="punctuation">:</span><span class="string">&quot;a&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;2&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;name&quot;</span><span class="punctuation">:</span><span class="string">&quot;b&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line">新增两条数据</span><br><span class="line">新增id为<span class="number">1</span>的 对应 name为a</span><br><span class="line">新增Id为<span class="number">2</span>的 对应 name为b</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230701154217181.png" alt="image-20230701154217181"></p>
<p><strong>复杂批量操作</strong></p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line">POST /_bulk</span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;delete&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_index&quot;</span><span class="punctuation">:</span><span class="string">&quot;website&quot;</span><span class="punctuation">,</span><span class="attr">&quot;_type&quot;</span><span class="punctuation">:</span><span class="string">&quot;blog&quot;</span><span class="punctuation">,</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;123&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;create&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_index&quot;</span><span class="punctuation">:</span><span class="string">&quot;website&quot;</span><span class="punctuation">,</span><span class="attr">&quot;_type&quot;</span><span class="punctuation">:</span><span class="string">&quot;blog&quot;</span><span class="punctuation">,</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;123&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;title&quot;</span><span class="punctuation">:</span><span class="string">&quot;my first blog post&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_index&quot;</span><span class="punctuation">:</span><span class="string">&quot;website&quot;</span><span class="punctuation">,</span><span class="attr">&quot;_type&quot;</span><span class="punctuation">:</span><span class="string">&quot;blog&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;title&quot;</span><span class="punctuation">:</span><span class="string">&quot;my second blog post&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;update&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_index&quot;</span><span class="punctuation">:</span><span class="string">&quot;website&quot;</span><span class="punctuation">,</span><span class="attr">&quot;_type&quot;</span><span class="punctuation">:</span><span class="string">&quot;blog&quot;</span><span class="punctuation">,</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;123&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;doc&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;title&quot;</span><span class="punctuation">:</span><span class="string">&quot;my updated blog post&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230701154839574.png" alt="image-20230701154839574"></p>
<h2 id="7-样本测试数据"><a href="#7-样本测试数据" class="headerlink" title="7.样本测试数据"></a>7.样本测试数据</h2><figure class="highlight json"><table><tr><td class="code"><pre><span class="line">POST /bank/account/_bulk</span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;1&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">1</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39225</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Amber&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Duke&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;880 Holmes Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pyrami&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;amberduke@pyrami.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brogan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;6&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">6</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5686</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hattie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bond&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;671 Bristol Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Netagy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hattiebond@netagy.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dante&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;13&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">13</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32838</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nanette&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bates&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;789 Madison Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quility&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;nanettebates@quility.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nogal&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;18&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">18</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4180</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Adams&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;467 Hutchinson Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Boink&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;daleadams@boink.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Orick&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;20&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16418</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elinor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ratliff&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;282 Kings Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Scentric&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;elinorratliff@scentric.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ribera&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;25&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40540</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Virginia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ayala&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;171 Putnam Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Filodyne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;virginiaayala@filodyne.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nicholson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;32&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48086</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dillard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcpherson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;702 Quentin Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quailcom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dillardmcpherson@quailcom.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Veguita&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;37&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18612</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcgee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mooney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;826 Fillmore Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reversus&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mcgeemooney@reversus.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tooleville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;44&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">44</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34487</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aurelia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harding&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;502 Baycliff Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Orbalix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;aureliaharding@orbalix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Yardville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;49&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">49</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29104</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fulton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;451 Humboldt Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Anocha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;fultonholt@anocha.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sunriver&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;51&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">51</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14097</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Burton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Meyers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;334 River Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bezal&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;burtonmeyers@bezal.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jacksonburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;56&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">56</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14992</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Josie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nelson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;857 Tabor Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Emtrac&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;josienelson@emtrac.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sunnyside&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;63&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">63</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6077</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hughes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Owens&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;510 Sedgwick Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Valpreal&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hughesowens@valpreal.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Guilford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;68&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">68</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44214</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hall&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Key&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;927 Bay Parkway&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eventex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hallkey@eventex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shawmut&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;70&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">70</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38172</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Deidre&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Thompson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;685 School Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Netplode&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;deidrethompson@netplode.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chestnut&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;75&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">75</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40500</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sandoval&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kramer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;166 Irvington Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Overfork&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sandovalkramer@overfork.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Limestone&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;82&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">82</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41412</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Concetta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barnes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;195 Bayview Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fitcore&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;concettabarnes@fitcore.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Summerfield&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;87&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">87</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1133</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hewitt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kidd&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;446 Halleck Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isologics&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hewittkidd@isologics.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coalmont&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;94&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">94</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41060</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brittany&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cabrera&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;183 Kathleen Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mixers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;brittanycabrera@mixers.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cornucopia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AZ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;99&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">99</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47159</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ratliff&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Heath&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;806 Rockwell Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zappix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ratliffheath@zappix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shaft&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;102&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">102</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29712</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dena&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Olson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;759 Newkirk Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hinway&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;denaolson@hinway.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Choctaw&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;107&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">107</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48844</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Randi&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rich&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;694 Jefferson Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Netplax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;randirich@netplax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bellfountain&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;114&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">114</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43045</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Josephine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Joseph&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;451 Oriental Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Turnabout&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;josephinejoseph@turnabout.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sedley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;119&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">119</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49222</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Laverne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Johnson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;302 Howard Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Senmei&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lavernejohnson@senmei.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Herlong&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;121&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">121</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19594</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Acevedo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dorsey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;479 Nova Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Netropic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;acevedodorsey@netropic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Islandia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;126&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">126</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3607</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Effie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gates&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;620 National Drive&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Digitalus&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;effiegates@digitalus.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blodgett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;133&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">133</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26135</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Deena&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Richmond&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;646 Underhill Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sunclipse&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;deenarichmond@sunclipse.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Austinburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;138&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">138</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9006</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Daniel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Arnold&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;422 Malbone Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ecstasia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;danielarnold@ecstasia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gardiner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;140&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">140</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26696</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cotton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Christensen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;878 Schermerhorn Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Prowaste&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cottonchristensen@prowaste.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mayfair&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;145&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">145</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47406</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rowena&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wilkinson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;891 Elton Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Asimiline&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rowenawilkinson@asimiline.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ripley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;152&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">152</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8088</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wolfe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rocha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;457 Guernsey Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hivedom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wolferocha@hivedom.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Adelino&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;157&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">157</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39868</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Claudia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Terry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;132 Gunnison Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lumbrex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;claudiaterry@lumbrex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Castleton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;164&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">164</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9101</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cummings&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Little&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;308 Schaefer Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comtrak&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cummingslittle@comtrak.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chaparrito&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;169&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">169</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45953</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hollie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Osborn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;671 Seaview Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Musaphics&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hollieosborn@musaphics.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hanover&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;171&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">171</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">7091</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nelda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hopper&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;742 Prospect Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Equicom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;neldahopper@equicom.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Finderne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;176&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">176</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18607</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kemp&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Walters&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;906 Howard Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eyewax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kempwalters@eyewax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Why&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;183&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">183</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14223</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hudson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;English&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;823 Herkimer Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xinware&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hudsonenglish@xinware.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Robbins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;188&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">188</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41504</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Miranda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;583 Ainslie Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jasper&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tiamiranda@jasper.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Summerset&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;190&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">190</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3150</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blake&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Davidson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;636 Diamond Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quantasis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;blakedavidson@quantasis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Crumpler&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;195&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">195</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5025</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kaye&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gibson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;955 Hopkins Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zork&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kayegibson@zork.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ola&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;203&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">203</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21890</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eve&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wyatt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;435 Furman Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Assitia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;evewyatt@assitia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jamestown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;208&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">208</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40760</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Garcia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hess&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;810 Nostrand Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quiltigen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;garciahess@quiltigen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brooktrails&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;210&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">210</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33946</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cherry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;539 Tiffany Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Martgo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cherrycarey@martgo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fairacres&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;215&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">215</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">37427</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Copeland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Solomon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;741 McDonald Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Recognia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;copelandsolomon@recognia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Edmund&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;222&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">222</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14764</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rachelle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rice&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;333 Narrows Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Enaut&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rachellerice@enaut.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wright&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AZ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;227&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">227</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19780</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coleman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Berg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;776 Little Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exoteric&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;colemanberg@exoteric.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eagleville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;234&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">234</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44207</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Betty&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hall&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;709 Garfield Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Miraclis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bettyhall@miraclis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bendon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;239&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">239</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">25719</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chang&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Boyer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;895 Brigham Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Qaboos&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;changboyer@qaboos.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Belgreen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;241&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">241</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">25379</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Schroeder&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harrington&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;610 Tapscott Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Otherway&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;schroederharrington@otherway.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ebro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;246&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">246</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28405</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Katheryn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Foster&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;259 Kane Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quantalia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;katherynfoster@quantalia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bath&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;253&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">253</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20240</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Melissa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gould&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;440 Fuller Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Buzzopia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;melissagould@buzzopia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lumberton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;258&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">258</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5712</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lindsey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hawkins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;706 Frost Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Enormo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lindseyhawkins@enormo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gardners&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;260&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">260</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">2726</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kari&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Skinner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;735 Losee Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Singavera&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kariskinner@singavera.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rushford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;265&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">265</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46910</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marion&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Schneider&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;574 Everett Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Evidends&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;marionschneider@evidends.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maplewood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;272&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">272</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19253</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lilly&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morgan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;689 Fleet Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Biolive&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lillymorgan@biolive.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sunbury&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;277&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">277</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29564</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Romero&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lott&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;456 Danforth Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Plasto&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;romerolott@plasto.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vincent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;284&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">284</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22806</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Randolph&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Banks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;875 Hamilton Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Caxt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;randolphbanks@caxt.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Crawfordsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;289&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">289</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">7798</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blair&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Church&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;370 Sutton Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cubix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;blairchurch@cubix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nile&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;291&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">291</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19955</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lynn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pollard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;685 Pierrepont Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Slambda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lynnpollard@slambda.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mappsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;296&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">296</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24606</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oliver&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;168 Woodbine Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Idetica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rosaoliver@idetica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Robinson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;304&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">304</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28647</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Palmer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clark&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;866 Boulevard Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maximind&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;palmerclark@maximind.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Avalon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;309&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">309</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3830</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosemarie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nieves&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;206 Alice Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zounds&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rosemarienieves@zounds.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ferney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;311&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">311</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13388</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vinson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ballard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;960 Glendale Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gynk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;vinsonballard@gynk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fairforest&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;316&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">316</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8214</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Anita&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ewing&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;396 Lombardy Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Panzent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;anitaewing@panzent.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Neahkahnie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;323&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">323</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42230</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chelsea&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gamble&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;356 Dare Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isosphere&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;chelseagamble@isosphere.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dundee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;328&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">328</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12523</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Good&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Campbell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;438 Hicks Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gracker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;goodcampbell@gracker.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marion&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;330&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">330</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41620</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Yvette&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Browning&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;431 Beekman Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marketoid&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;yvettebrowning@marketoid.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Talpa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;335&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">335</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35433</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vera&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hansen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;252 Bushwick Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zanilla&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;verahansen@zanilla.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Manila&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;342&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">342</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33670</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vivian&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wells&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;570 Cobek Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nutralab&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;vivianwells@nutralab.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fontanelle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;347&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">347</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36038</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gould&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;784 Pulaski Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mobildata&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gouldcarson@mobildata.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Goochland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;354&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">354</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21294</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kidd&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mclean&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;691 Saratoga Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ronbert&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kiddmclean@ronbert.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tioga&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;359&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">359</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29927</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vanessa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harvey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;679 Rutledge Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zentime&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;vanessaharvey@zentime.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Williston&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;361&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">361</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23659</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Noreen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shelton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;702 Tillary Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Medmex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;noreenshelton@medmex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Derwood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;366&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">366</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42368</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lydia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cooke&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;470 Coleman Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comstar&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lydiacooke@comstar.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Datil&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;373&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">373</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9671</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Simpson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carpenter&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;837 Horace Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Snips&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;simpsoncarpenter@snips.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tolu&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;378&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">378</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27100</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Watson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Simpson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;644 Thomas Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wrapture&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;watsonsimpson@wrapture.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Keller&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;380&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">380</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35628</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fernandez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reid&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;154 Melba Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cosmosis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;fernandezreid@cosmosis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Boyd&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;385&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">385</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11022</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosalinda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Valencia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;933 Lloyd Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zoarere&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rosalindavalencia@zoarere.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Waverly&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;392&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">392</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31613</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dotson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dean&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;136 Ford Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Petigems&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dotsondean@petigems.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chical&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;397&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">397</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">37418</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leonard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gray&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;840 Morgan Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Recritube&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;leonardgray@recritube.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Edenburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;400&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">400</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20685</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;King&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;405 Cornelia Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tri@Tribalog&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kaneking@tri@tribalog.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gulf&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;405&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">405</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5679</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Strickland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fuller&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;990 Concord Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Digique&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;stricklandfuller@digique.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Southmont&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;412&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">412</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27436</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ilene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Abbott&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;846 Vine Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Typhonica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ileneabbott@typhonica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cedarville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;417&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">417</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1788</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wheeler&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ayers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;677 Hope Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fortean&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wheelerayers@fortean.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ironton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;424&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">424</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36818</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tracie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gregory&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;112 Hunterfly Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comstruct&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;traciegregory@comstruct.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Onton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;429&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">429</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46970</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cantu&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lindsey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;404 Willoughby Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Inquala&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cantulindsey@inquala.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cowiche&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;431&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">431</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13136</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Laurie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shaw&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;263 Aviation Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zillanet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;laurieshaw@zillanet.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harmon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;436&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">436</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27585</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alexander&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sargent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;363 Albemarle Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fangold&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;alexandersargent@fangold.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Calpine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;443&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">443</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">7588</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Huff&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Thomas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;538 Erskine Loop&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Accufarm&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;huffthomas@accufarm.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Corinne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;448&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">448</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22776</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Adriana&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcfadden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;984 Woodside Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Telequiet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;adrianamcfadden@telequiet.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Darrtown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;450&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">450</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">2643</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bradford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nielsen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;487 Keen Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exovent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bradfordnielsen@exovent.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hamilton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;455&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">455</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39556</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lynn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tran&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;741 Richmond Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Optyk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lynntran@optyk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clinton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;462&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">462</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10871</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Calderon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Day&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;810 Milford Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cofine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;calderonday@cofine.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kula&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;467&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">467</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6312</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Angelica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;May&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;384 Karweg Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Keeg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;angelicamay@keeg.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tetherow&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;474&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">474</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35896</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Obrien&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Walton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;192 Ide Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Suremax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;obrienwalton@suremax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Crucible&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;479&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">479</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31865</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cameron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ross&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;904 Bouck Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Telpod&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cameronross@telpod.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nord&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;481&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">481</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20024</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stanley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;361 Hanover Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Strozen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;linastanley@strozen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wyoming&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;486&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">486</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35902</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dixie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fuentes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;991 Applegate Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Portico&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dixiefuentes@portico.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Salix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;493&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">493</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5871</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Campbell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Best&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;297 Friel Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fanfare&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;campbellbest@fanfare.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kidder&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;498&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">498</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10516</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stella&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hinton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;649 Columbia Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Flyboyz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;stellahinton@flyboyz.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Crenshaw&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;501&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">501</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16572</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kelley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ochoa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;451 Clifton Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bluplanet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kelleyochoa@bluplanet.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gouglersville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;506&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">506</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43440</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Davidson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Salas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;731 Cleveland Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sequitur&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;davidsonsalas@sequitur.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lloyd&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;513&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">513</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">30040</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maryellen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rose&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;428 Durland Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Waterbaby&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;maryellenrose@waterbaby.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kiskimere&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;518&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">518</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48954</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Finch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Curtis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;137 Ryder Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Viagrand&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;finchcurtis@viagrand.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Riverton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;520&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">520</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27987</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brandy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Calhoun&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;818 Harden Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maxemia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;brandycalhoun@maxemia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sidman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;525&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">525</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23545</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holly&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Miles&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;746 Ludlam Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xurban&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hollymiles@xurban.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harold&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;532&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">532</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">17207</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hardin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kirk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;268 Canarsie Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exposa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hardinkirk@exposa.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stouchsburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;537&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">537</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31069</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frost&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;910 Lake Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Primordia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;morinfrost@primordia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rivera&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;544&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">544</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41735</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Short&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dennis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;908 Glen Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Minga&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;shortdennis@minga.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;549&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">549</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1932</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jacqueline&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maxwell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;444 Schenck Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fuelworks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jacquelinemaxwell@fuelworks.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oretta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;551&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">551</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21732</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Milagros&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Travis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;380 Murdock Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sloganaut&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;milagrostravis@sloganaut.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Homeland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;556&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">556</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36420</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Collier&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Odonnell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;591 Nolans Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sultraxin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;collierodonnell@sultraxin.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fulford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;563&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">563</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43403</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morgan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Torres&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;672 Belvidere Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quonata&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;morgantorres@quonata.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hollymead&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;568&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">568</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36628</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lesa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maynard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;295 Whitty Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coash&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lesamaynard@coash.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Broadlands&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;570&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">570</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26751</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Church&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mercado&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;892 Wyckoff Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xymonk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;churchmercado@xymonk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gloucester&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;575&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">575</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12588</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Buchanan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pope&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;581 Sumner Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stucco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;buchananpope@stucco.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ellerslie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;582&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">582</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33371</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Manning&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Guthrie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;271 Jodie Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xerex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;manningguthrie@xerex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Breinigsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NM&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;587&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">587</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3468</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carly&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Johns&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;390 Noll Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gallaxia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;carlyjohns@gallaxia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Emison&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;594&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">594</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28194</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Golden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Donovan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;199 Jewel Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Organica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;goldendonovan@organica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Macdona&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;599&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">599</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11944</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Joanna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jennings&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;318 Irving Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Extremo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;joannajennings@extremo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bartley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;602&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">602</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38699</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcgowan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcclain&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;361 Stoddard Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oatfarm&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mcgowanmcclain@oatfarm.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kapowsin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;607&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">607</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38350</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;White&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Small&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;736 Judge Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Immunics&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;whitesmall@immunics.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fairfield&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;614&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">614</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13157</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Salazar&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Howard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;847 Imlay Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Retrack&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;salazarhoward@retrack.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grill&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;619&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">619</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48755</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grimes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reynolds&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;378 Denton Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frenex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;grimesreynolds@frenex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Murillo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;621&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">621</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35480</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leslie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sloan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;336 Kansas Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dancity&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lesliesloan@dancity.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Corriganville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;626&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">626</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19498</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ava&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Richardson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;666 Nautilus Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cinaster&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;avarichardson@cinaster.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sutton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;633&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">633</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35874</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Conner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ramos&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;575 Agate Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Insource&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;connerramos@insource.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Madaket&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;638&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">638</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">2658</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bridget&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gallegos&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;383 Wogan Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Songlines&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bridgetgallegos@songlines.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Linganore&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;640&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">640</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35596</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Candace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hancock&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;574 Riverdale Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Animalia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;candacehancock@animalia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blandburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;645&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">645</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29362</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Edwina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hutchinson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;892 Pacific Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Essensia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;edwinahutchinson@essensia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dowling&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;652&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">652</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">17363</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bonner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Garner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;219 Grafton Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Utarian&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bonnergarner@utarian.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vandiver&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;657&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">657</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40475</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kathleen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wilder&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;286 Sutter Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Solgan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kathleenwilder@solgan.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Graniteville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;664&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">664</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16163</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hart&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mccormick&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;144 Guider Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dyno&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hartmccormick@dyno.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carbonville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;669&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">669</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16934</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jewel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Estrada&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;896 Meeker Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zilla&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jewelestrada@zilla.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Goodville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;671&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">671</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29029</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Antoinette&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cook&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;375 Cumberland Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harmoney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;antoinettecook@harmoney.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bergoo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;676&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">676</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23842</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lisa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dudley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;506 Vanderveer Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tropoli&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lisadudley@tropoli.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Konterra&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;683&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">683</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4381</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Matilda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Berger&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;884 Noble Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fibrodyne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;matildaberger@fibrodyne.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shepardsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;688&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">688</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">17931</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Freeman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zamora&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;114 Herzl Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elemantra&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;freemanzamora@elemantra.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Libertytown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NM&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;690&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">690</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18127</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Russo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Swanson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;256 Roebling Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zaj&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;russoswanson@zaj.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hoagland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;695&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">695</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36800</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gonzales&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcfarland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;647 Louisa Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Songbird&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gonzalesmcfarland@songbird.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Crisman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;703&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">703</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27443</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dona&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Burton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;489 Flatlands Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cytrex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;donaburton@cytrex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reno&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;708&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">708</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34002</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;May&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ortiz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;244 Chauncey Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Syntac&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mayortiz@syntac.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Munjor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;710&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">710</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33650</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shelton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stark&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;404 Ovington Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kraggle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sheltonstark@kraggle.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ogema&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;715&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">715</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23734</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tammi&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hodge&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;865 Church Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Netur&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tammihodge@netur.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lacomb&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;722&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">722</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27256</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roberts&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Beasley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;305 Kings Hwy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quintity&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;robertsbeasley@quintity.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hayden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;727&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">727</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27263</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Natasha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Knapp&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;723 Hubbard Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exostream&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;natashaknapp@exostream.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Trexlertown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;734&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">734</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20325</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Keri&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kinney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;490 Balfour Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Retrotex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kerikinney@retrotex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Salunga&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;739&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">739</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39063</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gwen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hardy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;733 Stuart Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exozent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gwenhardy@exozent.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Drytown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;741&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">741</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33074</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nielsen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Good&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;404 Norfolk Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kiggle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;nielsengood@kiggle.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cumberland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;746&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">746</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15970</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marguerite&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wall&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;364 Crosby Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aquoavo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;margueritewall@aquoavo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jeff&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;753&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">753</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33340</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Katina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;690 Ross Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Intrawear&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;katinaalford@intrawear.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grimsley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;758&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">758</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15739</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Berta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Short&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;149 Surf Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ozean&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bertashort@ozean.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Odessa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;760&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">760</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40996</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rhea&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blair&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;440 Hubbard Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bicol&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rheablair@bicol.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stockwell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;765&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">765</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31278</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Knowles&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cunningham&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;753 Macdougal Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Thredz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;knowlescunningham@thredz.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Thomasville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;772&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">772</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">37849</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eloise&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sparks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;608 Willow Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Satiance&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;eloisesparks@satiance.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Richford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;777&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">777</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48294</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Adkins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mejia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;186 Oxford Walk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Datagen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;adkinsmejia@datagen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Faywood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;784&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">784</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">25291</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mabel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Thornton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;124 Louisiana Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zolavo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mabelthornton@zolavo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lynn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;789&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">789</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8760</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cunningham&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kerr&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;154 Sharon Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Polarium&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cunninghamkerr@polarium.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tuskahoma&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;791&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">791</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48249</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Janine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Huber&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;348 Porter Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Viocular&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;janinehuber@viocular.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fivepointville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;796&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">796</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23503</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mona&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Craft&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;511 Henry Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Opticom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;monacraft@opticom.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Websterville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;804&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">804</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23610</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rojas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oneal&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;669 Sandford Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Glukgluk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rojasoneal@glukgluk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wheaton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;809&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">809</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47812</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Christie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Strickland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;346 Bancroft Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Anarco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;christiestrickland@anarco.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Baden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;811&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">811</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26007</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Walls&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rogers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;352 Freeman Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geekmosis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wallsrogers@geekmosis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Caroleen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;816&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">816</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9567</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cornelia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;384 Bainbridge Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sulfax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cornelialane@sulfax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elizaville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;823&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">823</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48726</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Celia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bernard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;466 Amboy Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mitroc&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;celiabernard@mitroc.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Skyland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;828&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">828</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44890</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blanche&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holmes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;605 Stryker Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Motovate&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;blancheholmes@motovate.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Loomis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;830&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">830</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45210</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Louella&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;511 Heath Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Conferia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;louellachan@conferia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brookfield&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;835&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">835</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46558</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Glover&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rutledge&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;641 Royce Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ginkogene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gloverrutledge@ginkogene.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dixonville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;842&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">842</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49587</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Meagan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Buckner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;833 Bushwick Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Biospan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;meaganbuckner@biospan.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Craig&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;847&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">847</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8652</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Antonia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Duncan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;644 Stryker Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Talae&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;antoniaduncan@talae.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dawn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;854&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">854</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49795</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jimenez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;603 Cooper Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Verton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jimenezbarry@verton.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moscow&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;859&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">859</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20734</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Beulah&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stuart&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;651 Albemarle Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hatology&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;beulahstuart@hatology.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Waiohinu&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;861&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">861</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44173</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jaime&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wilson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;680 Richardson Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Temorak&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jaimewilson@temorak.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fidelis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;866&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">866</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45565</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Araceli&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Woodward&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;326 Meadow Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Olympix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;araceliwoodward@olympix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dana&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;873&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">873</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43931</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tisha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cotton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;432 Lincoln Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Buzzmaker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tishacotton@buzzmaker.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bluetown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;878&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">878</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49159</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Battle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blackburn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;234 Hendrix Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zilphur&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;battleblackburn@zilphur.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wanamie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;880&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">880</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22575</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Christian&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Myers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;737 Crown Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Combogen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;christianmyers@combogen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Abrams&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;885&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">885</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31661</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Valdez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roberson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;227 Scholes Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Delphide&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;valdezroberson@delphide.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chilton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;892&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">892</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44974</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hill&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hayes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;721 Dooley Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fuelton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hillhayes@fuelton.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Orason&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;897&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">897</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45973</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alyson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Irwin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;731 Poplar Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quizka&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;alysonirwin@quizka.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Singer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;900&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">900</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6124</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gonzalez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Watson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;624 Sullivan Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marvane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gonzalezwatson@marvane.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wikieup&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;905&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">905</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29438</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Schultz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moreno&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;761 Cedar Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Paragonia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;schultzmoreno@paragonia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Glenshaw&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;912&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">912</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13675</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Flora&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alvarado&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;771 Vandervoort Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Boilicon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;floraalvarado@boilicon.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vivian&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;917&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">917</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47782</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Parks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hurst&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;933 Cozine Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pyramis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;parkshurst@pyramis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lindcove&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;924&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">924</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3811</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hilary&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leonard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;235 Hegeman Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Metroz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hilaryleonard@metroz.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roosevelt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;929&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">929</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34708</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Willie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hickman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;430 Devoe Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Apextri&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;williehickman@apextri.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clay&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;931&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">931</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8244</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ingrid&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Garcia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;674 Indiana Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Balooba&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ingridgarcia@balooba.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Interlochen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AZ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;936&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">936</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22430</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Beth&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frye&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;462 Thatford Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Puria&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bethfrye@puria.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hiseville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;943&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">943</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24187</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wagner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Griffin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;489 Ellery Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gazak&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wagnergriffin@gazak.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lorraine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;948&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">948</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">37074</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sargent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Powers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;532 Fiske Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Accuprint&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sargentpowers@accuprint.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Umapine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;950&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">950</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">30916</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sherrie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Patel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;658 Langham Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Futurize&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sherriepatel@futurize.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Garfield&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;955&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">955</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41621</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Klein&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kemp&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;370 Vanderbilt Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Synkgen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kleinkemp@synkgen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bonanza&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;962&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">962</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32096</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Trujillo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wilcox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;914 Duffield Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Extragene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;trujillowilcox@extragene.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Golconda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;967&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">967</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19161</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carrie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Huffman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;240 Sands Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Injoy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;carriehuffman@injoy.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leroy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;974&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">974</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38082</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Deborah&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Yang&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;463 Goodwin Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Entogrok&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;deborahyang@entogrok.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Herald&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;979&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">979</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43130</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vaughn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pittman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;446 Tompkins Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Phormula&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;vaughnpittman@phormula.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fingerville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;981&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">981</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20278</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nolan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Warner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;753 Channel Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Interodeo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;nolanwarner@interodeo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Layhill&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;986&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">986</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35086</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Norris&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hubbard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;600 Celeste Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Printspan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;norrishubbard@printspan.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cassel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;993&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">993</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26487</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Campos&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Olsen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;873 Covert Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isbol&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;camposolsen@isbol.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Glendale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;998&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">998</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16869</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Letha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Baker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;206 Llama Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dognosis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lethabaker@dognosis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dunlo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;2&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">2</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28838</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roberta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bender&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;560 Kingsway Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chillium&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;robertabender@chillium.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bennett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;7&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">7</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39121</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Levy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Richard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;820 Logan Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Teraprene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;levyrichard@teraprene.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shrewsbury&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;14&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">14</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20480</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Erma&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;661 Vista Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stockpost&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ermakane@stockpost.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chamizal&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;19&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">19</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27894</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Schwartz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Buchanan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;449 Mersereau Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sybixtex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;schwartzbuchanan@sybixtex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Greenwich&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;21&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">7004</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Estella&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Paul&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;859 Portal Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zillatide&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;estellapaul@zillatide.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Churchill&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;26&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14127</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lorraine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mccullough&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;157 Dupont Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zosis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lorrainemccullough@zosis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dennard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;33&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35439</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Savannah&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kirby&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;372 Malta Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Musanpoly&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;savannahkirby@musanpoly.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Muse&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;38&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10511</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Erna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fields&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;357 Maple Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eweville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ernafields@eweville.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Twilight&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;40&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33882</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Molina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;263 Ovington Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cytrak&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pacemolina@cytrak.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Silkworth&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;45&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">45</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44478</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geneva&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;357 Herkimer Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ezent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;genevamorin@ezent.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blanco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AZ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;52&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">52</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46425</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kayla&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bradshaw&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;449 Barlow Drive&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Magnemo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kaylabradshaw@magnemo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wawona&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AZ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;57&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">57</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8705</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Powell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Herring&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;263 Merit Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Digiprint&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;powellherring@digiprint.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coral&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;64&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">64</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44036</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Miles&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Battle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;988 Homecrest Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Koffee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;milesbattle@koffee.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Motley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;69&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">69</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14253</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Desiree&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harrison&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;694 Garland Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barkarama&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;desireeharrison@barkarama.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hackneyville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;71&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">71</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38201</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sharpe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hoffman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;450 Conklin Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Centree&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sharpehoffman@centree.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Urbana&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;76&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">76</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38345</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Claudette&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Beard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;748 Dorset Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Repetwire&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;claudettebeard@repetwire.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Caln&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;83&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">83</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35928</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mayo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cleveland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;720 Brooklyn Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Indexia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mayocleveland@indexia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roberts&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;88&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">88</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26418</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Adela&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tyler&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;737 Clove Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Surelogic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;adelatyler@surelogic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Boling&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;90&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">90</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">25332</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Herman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Snyder&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;737 College Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lunchpod&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hermansnyder@lunchpod.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Flintville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;95&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">95</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1650</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dominguez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Le&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;539 Grace Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Portica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dominguezle@portica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wollochet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;103&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">103</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11253</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Calhoun&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bruce&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;731 Clarkson Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Automon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;calhounbruce@automon.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marienthal&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;108&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">108</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19015</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Christensen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Weaver&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;398 Dearborn Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quilk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;christensenweaver@quilk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Belvoir&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;110&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">110</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4850</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Daphne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Byrd&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;239 Conover Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Freakin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;daphnebyrd@freakin.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Taft&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;115&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">115</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18750</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nikki&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Doyle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;537 Clara Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fossiel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;nikkidoyle@fossiel.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Caron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;122&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">122</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">17128</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aurora&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;227 Knapp Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Makingway&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;aurorafry@makingway.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maybell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;127&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">127</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48734</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Diann&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mclaughlin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;340 Clermont Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Enomen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;diannmclaughlin@enomen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rutherford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;134&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">134</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33829</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Madelyn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Norris&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;176 Noel Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Endicil&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;madelynnorris@endicil.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Walker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;139&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">139</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18444</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rios&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Todd&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;281 Georgia Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Uberlux&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;riostodd@uberlux.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hannasville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;141&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">141</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20790</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Liliana&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Caldwell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;414 Huron Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rubadub&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lilianacaldwell@rubadub.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hiwasse&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;146&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">146</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39078</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lang&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kaufman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;626 Beverley Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rodeomad&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;langkaufman@rodeomad.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mahtowa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;153&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">153</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32074</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bird&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cochran&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;691 Bokee Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Supremia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;birdcochran@supremia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barrelville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;158&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">158</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9380</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Natalie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcdowell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;953 Roder Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Myopium&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;nataliemcdowell@myopium.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Savage&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;160&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">160</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48974</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hull&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cherry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;275 Beaumont Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Noralex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hullcherry@noralex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Whipholt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;165&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">165</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18956</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sims&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mckay&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;205 Jackson Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comtour&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;simsmckay@comtour.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tilden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;172&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">172</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18356</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Whitehead&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;704 Monaco Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sultrax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mariewhitehead@sultrax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dragoon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;177&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">177</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48972</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harris&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gross&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;468 Suydam Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kidstock&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;harrisgross@kidstock.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Yettem&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;184&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">184</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9157</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cathy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morrison&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;882 Pine Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zytrek&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cathymorrison@zytrek.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fedora&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;189&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">189</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20167</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ada&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cortez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;700 Forest Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Micronaut&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;adacortez@micronaut.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eagletown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;191&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">191</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26172</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barr&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sharpe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;428 Auburn Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ziggles&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;barrsharpe@ziggles.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Springdale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;196&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">196</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29931</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Caldwell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Daniel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;405 Oliver Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Furnigeer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;caldwelldaniel@furnigeer.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zortman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;204&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">204</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27714</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mavis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Deleon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;400 Waldane Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lotron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mavisdeleon@lotron.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stollings&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;209&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">209</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31052</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Myers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Noel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;691 Alton Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Greeker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;myersnoel@greeker.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hinsdale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;211&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">211</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21539</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Graciela&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vaughan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;558 Montauk Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fishland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gracielavaughan@fishland.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Madrid&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;216&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">216</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11422</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Price&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Haley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;233 Portland Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zeam&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pricehaley@zeam.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Titanic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;223&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">223</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9528</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Newton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fletcher&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;654 Dewitt Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Assistia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;newtonfletcher@assistia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nipinnawasee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;228&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">228</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10543</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosella&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Albert&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;185 Gotham Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isoplex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rosellaalbert@isoplex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Finzel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;230&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">230</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10829</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chris&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Raymond&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;464 Remsen Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cogentry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;chrisraymond@cogentry.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bowmansville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;235&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">235</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">17729</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcpherson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mueller&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;541 Strong Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tingles&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mcphersonmueller@tingles.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brantleyville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;242&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">242</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42318</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Berger&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roach&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;125 Wakeman Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ovium&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bergerroach@ovium.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hessville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;247&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">247</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45123</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mccormick&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;582 Brighton Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Norsup&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mccormickmoon@norsup.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Forestburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;254&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">254</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35104</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Yang&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dodson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;531 Lott Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mondicil&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;yangdodson@mondicil.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Enoree&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;259&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">259</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41877</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eleanor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gonzalez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;800 Sumpter Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Futuris&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;eleanorgonzalez@futuris.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jenkinsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;261&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">261</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39998</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Millicent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pickett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;722 Montieth Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gushkool&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;millicentpickett@gushkool.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Norwood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;266&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">266</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">2777</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Monique&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Conner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;489 Metrotech Courtr&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Flotonic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;moniqueconner@flotonic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Retsof&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;273&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">273</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11181</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Murphy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chandler&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;569 Bradford Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zilch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;murphychandler@zilch.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vicksburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;278&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">278</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22530</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tamra&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Navarro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;175 Woodruff Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Norsul&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tamranavarro@norsul.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Glasgow&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;280&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">280</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3380</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vilma&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shields&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;133 Berriman Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Applidec&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;vilmashields@applidec.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Adamstown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;285&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">285</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47369</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hilda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Phillips&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;618 Nixon Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comcur&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hildaphillips@comcur.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Siglerville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;292&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">292</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26679</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morrow&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Greene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;691 Nassau Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Columella&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;morrowgreene@columella.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sanborn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;297&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">297</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20508</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tucker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Patrick&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;978 Whitwell Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Valreda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tuckerpatrick@valreda.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Deseret&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;300&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">300</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">25654</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tate&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;632 Kay Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Genesynk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lanetate@genesynk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lowell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;305&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">305</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11655</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Augusta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Winters&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;377 Paerdegat Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vendblend&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;augustawinters@vendblend.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gwynn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;312&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">312</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8511</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Burgess&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gentry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;382 Bergen Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Orbixtar&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;burgessgentry@orbixtar.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Conestoga&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;317&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">317</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31968</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ruiz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morris&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;972 Dean Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Apex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ruizmorris@apex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jacksonwald&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;324&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">324</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44976</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gladys&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Erickson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;250 Battery Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eternis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gladyserickson@eternis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;329&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">329</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31138</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nellie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mercer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;967 Ebony Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Scenty&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;nelliemercer@scenty.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jardine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;331&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">331</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46004</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gibson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Potts&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;994 Dahill Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zensus&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gibsonpotts@zensus.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frizzleburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;336&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">336</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40891</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dudley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Avery&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;405 Powers Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Genmom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dudleyavery@genmom.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clarksburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;343&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">343</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">37684</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Robbie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Logan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;488 Linden Boulevard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hydrocom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;robbielogan@hydrocom.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stockdale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;348&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">348</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1360</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Karina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Russell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;797 Moffat Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Limozen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;karinarussell@limozen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Riegelwood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;350&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">350</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4267</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wyatt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wise&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;896 Bleecker Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rockyard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wyattwise@rockyard.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Joes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;355&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">355</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40961</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gregory&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Delacruz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;876 Cortelyou Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oulu&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gregorydelacruz@oulu.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Waterloo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;362&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">362</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14938</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jimmie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dejesus&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;351 Navy Walk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ecolight&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jimmiedejesus@ecolight.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Berlin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;367&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">367</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40458</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elaine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Workman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;188 Ridge Boulevard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Colaire&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;elaineworkman@colaire.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Herbster&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;374&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">374</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19521</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blanchard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stein&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;313 Bartlett Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cujo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;blanchardstein@cujo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cascades&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;379&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">379</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12962</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ruthie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lamb&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;796 Rockaway Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Incubus&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ruthielamb@incubus.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hickory&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;381&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">381</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40978</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sophie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mays&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;261 Varanda Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Uneeq&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sophiemays@uneeq.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cressey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;386&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">386</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42588</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wallace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barr&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;246 Beverly Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Concility&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wallacebarr@concility.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Durham&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;393&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">393</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43936</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;William&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kelly&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;178 Lawrence Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Techtrix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;williamkelly@techtrix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Orin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;398&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">398</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8543</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leticia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Duran&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;305 Senator Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xleen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;leticiaduran@xleen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cavalero&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;401&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">401</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29408</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Contreras&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Randolph&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;104 Lewis Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Inrt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;contrerasrandolph@inrt.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chesapeake&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;406&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">406</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28127</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mccarthy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dunlap&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;684 Seacoast Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Canopoly&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mccarthydunlap@canopoly.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elliott&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;413&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">413</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15631</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pugh&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hamilton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;124 Euclid Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Techade&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pughhamilton@techade.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Beaulieu&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;418&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">418</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10207</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reed&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Goff&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;959 Everit Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zillan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;reedgoff@zillan.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hiko&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;420&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">420</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44699</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brandie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hayden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;291 Ash Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Digifad&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;brandiehayden@digifad.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Spelter&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NM&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;425&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">425</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41308</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Queen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leach&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;105 Fair Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Magneato&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;queenleach@magneato.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barronett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;432&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">432</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28969</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Preston&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ferguson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;239 Greenwood Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bitendrex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;prestonferguson@bitendrex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Idledale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;437&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">437</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41225</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosales&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marquez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;873 Ryerson Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ronelon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rosalesmarquez@ronelon.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Allendale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;444&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">444</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44219</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dolly&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Finch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;974 Interborough Parkway&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zytrac&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dollyfinch@zytrac.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vowinckel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;449&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">449</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41950</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barnett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cantrell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;945 Bedell Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zentility&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;barnettcantrell@zentility.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Swartzville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;451&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">451</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31950</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mason&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcleod&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;438 Havemeyer Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Omatom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;masonmcleod@omatom.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ryderwood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;456&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">456</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21419</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Solis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kline&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;818 Ashford Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vetron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;soliskline@vetron.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ruffin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;463&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">463</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36672</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Heidi&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Acosta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;692 Kenmore Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elpro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;heidiacosta@elpro.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ezel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;468&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">468</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18400</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Foreman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fowler&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;443 Jackson Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zillactic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;foremanfowler@zillactic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wakarusa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;470&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">470</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20455</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Schneider&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hull&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;724 Apollo Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exospeed&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;schneiderhull@exospeed.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Watchtower&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;475&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">475</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24427</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morales&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jacobs&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;225 Desmond Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oronoko&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;moralesjacobs@oronoko.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clayville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;482&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">482</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14834</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Janie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bass&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;781 Grattan Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Manglo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;janiebass@manglo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kenwood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;487&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">487</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">30718</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sawyer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vincent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;238 Lancaster Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brainquil&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sawyervincent@brainquil.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Galesville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;494&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">494</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3592</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bowen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;374 Elmwood Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Endipine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;holdenbowen@endipine.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;499&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">499</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26060</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lara&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Perkins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;703 Monroe Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Paprikut&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;laraperkins@paprikut.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barstow&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;502&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">502</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31898</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Woodard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bailey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;585 Albee Square&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Imperium&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;woodardbailey@imperium.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Matheny&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;507&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">507</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27675</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blankenship&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ramirez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;630 Graham Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bytrex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;blankenshipramirez@bytrex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bancroft&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;514&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">514</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">30125</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Solomon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bush&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;409 Harkness Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Snacktion&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;solomonbush@snacktion.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grayhawk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;519&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">519</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3282</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lorna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Franco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;722 Schenck Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zentia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lornafranco@zentia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;National&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;521&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">521</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16348</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Josefa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Buckley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;848 Taylor Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mazuda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;josefabuckley@mazuda.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Saranap&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NM&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;526&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">526</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35375</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sweeney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fulton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;550 Martense Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cormoran&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sweeneyfulton@cormoran.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chalfant&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;533&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">533</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13761</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Margarita&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Diaz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;295 Tapscott Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zilodyne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;margaritadiaz@zilodyne.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hondah&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;538&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">538</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16416</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Koch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;919 Gerry Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xplor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kochbarker@xplor.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dixie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;540&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">540</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40235</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tammy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wiggins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;186 Schenectady Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Speedbolt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tammywiggins@speedbolt.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Salvo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;545&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">545</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27011</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lena&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lucas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;110 Lamont Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kindaloo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lenalucas@kindaloo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harleigh&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;552&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">552</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14727</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kate&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Estes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;785 Willmohr Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rodeocean&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kateestes@rodeocean.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elfrida&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;557&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">557</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3119</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Landry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Buck&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;558 Schweikerts Walk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Protodyne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;landrybuck@protodyne.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Edneyville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;564&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">564</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43631</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Owens&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bowers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;842 Congress Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nspire&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;owensbowers@nspire.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Machias&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;569&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">569</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40019</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sherri&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rowe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;591 Arlington Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Netility&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sherrirowe@netility.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bridgetown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;571&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">571</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3014</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ayers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Duffy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;721 Wortman Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aquasseur&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ayersduffy@aquasseur.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tilleda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;576&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">576</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29682</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Helena&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Robertson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;774 Devon Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vicon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;helenarobertson@vicon.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dyckesville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;583&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">583</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26558</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Castro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;West&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;814 Williams Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cipromox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;castrowest@cipromox.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nescatunga&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;588&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">588</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43531</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Martina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Collins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;301 Anna Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geekwagon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;martinacollins@geekwagon.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oneida&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;590&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">590</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4652</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ladonna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tucker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;162 Kane Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Infotrips&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ladonnatucker@infotrips.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Utting&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;595&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">595</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12478</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mccall&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Britt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;823 Hill Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cablam&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mccallbritt@cablam.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vernon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;603&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">603</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28145</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Janette&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Guzman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;976 Kingston Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Splinx&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;janetteguzman@splinx.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Boomer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;608&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">608</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47091</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Whitley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;976 Lawrence Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Poshome&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;careywhitley@poshome.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Weogufka&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;610&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">610</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40571</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Foster&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Weber&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;323 Rochester Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Firewax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;fosterweber@firewax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Winston&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;615&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">615</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28726</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Delgado&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Curry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;706 Butler Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zoxy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;delgadocurry@zoxy.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gracey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;622&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">622</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9661</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Paulette&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hartman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;375 Emerald Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Locazone&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;paulettehartman@locazone.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Canterwood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;627&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">627</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47546</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Crawford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sears&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;686 Eastern Parkway&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Updat&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;crawfordsears@updat.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bison&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;634&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">634</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29805</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Deloris&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Levy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;838 Foster Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Homelux&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;delorislevy@homelux.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kempton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;639&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">639</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28875</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Caitlin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clements&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;627 Aster Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bunga&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;caitlinclements@bunga.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cetronia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;641&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">641</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18345</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sheppard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Everett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;791 Norwood Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roboid&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sheppardeverett@roboid.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Selma&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;646&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">646</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15559</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lavonne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reyes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;983 Newport Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Parcoe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lavonnereyes@parcoe.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Monument&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;653&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">653</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">7606</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marcia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bennett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;455 Bragg Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Opticall&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;marciabennett@opticall.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Magnolia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;658&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">658</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10210</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bass&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcconnell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;274 Ocean Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Combot&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bassmcconnell@combot.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Beyerville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;660&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">660</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46427</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;916 Amersfort Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Olucore&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;moonwood@olucore.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Como&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;665&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">665</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15215</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Britney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Young&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;766 Sackman Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geoforma&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;britneyyoung@geoforma.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tuttle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;672&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">672</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12621</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Camille&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Munoz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;959 Lewis Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vantage&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;camillemunoz@vantage.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Whitmer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;677&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">677</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8491</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Snider&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Benton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;827 Evans Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Medicroix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sniderbenton@medicroix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kaka&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;684&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">684</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46091</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Warren&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Snow&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;756 Oakland Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bizmatic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;warrensnow@bizmatic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hatteras&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;689&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">689</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14985</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ines&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chaney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;137 Dikeman Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zidant&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ineschaney@zidant.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nettie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;691&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">691</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10792</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mclean&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Colon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;876 Classon Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elentrix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mcleancolon@elentrix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Unionville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;696&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">696</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">17568</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Crane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Matthews&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;721 Gerritsen Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Intradisk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cranematthews@intradisk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brewster&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;704&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">704</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45347</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Peters&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;871 Independence Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Extragen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;peterskent@extragen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morriston&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;709&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">709</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11015</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Abbott&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Odom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;893 Union Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jimbies&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;abbottodom@jimbies.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leeper&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;711&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">711</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26939</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Villarreal&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Horton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;861 Creamer Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lexicondo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;villarrealhorton@lexicondo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lydia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;716&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">716</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19789</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Paul&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mason&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;618 Nichols Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Slax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;paulmason@slax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Snowville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;723&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">723</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16421</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nixon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moran&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;569 Campus Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cuizine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;nixonmoran@cuizine.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Buxton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;728&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">728</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44818</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Conley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Preston&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;450 Coventry Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Obones&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;conleypreston@obones.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;730&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">730</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41299</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moore&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;797 Turner Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Orbean&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;moorelee@orbean.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Highland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;735&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">735</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3984</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Loraine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Willis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;928 Grove Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gadtron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lorainewillis@gadtron.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lowgap&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;742&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">742</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24765</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Merle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wooten&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;317 Pooles Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tropolis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;merlewooten@tropolis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bentley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;747&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">747</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16617</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Diaz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Austin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;676 Harway Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Irack&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;diazaustin@irack.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cliff&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;754&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">754</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10779</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jones&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vega&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;795 India Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gluid&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jonesvega@gluid.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tyhee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;759&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">759</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38007</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rose&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carlson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;987 Navy Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aquasure&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rosecarlson@aquasure.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carlton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;761&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">761</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">7663</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rae&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Juarez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;560 Gilmore Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Entropix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;raejuarez@entropix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Northchase&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;766&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">766</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21957</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Thomas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gillespie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;993 Williams Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Octocore&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;thomasgillespie@octocore.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Defiance&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;773&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">773</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31126</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Liza&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coffey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;540 Bulwer Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Assurity&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lizacoffey@assurity.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gilgo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;778&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">778</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46007</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Underwood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wheeler&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;477 Provost Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Decratex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;underwoodwheeler@decratex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sardis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;780&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">780</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4682</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maryanne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hendricks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;709 Wolcott Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sarasonic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;maryannehendricks@sarasonic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Santel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;785&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">785</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">25078</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fields&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lester&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;808 Chestnut Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Visualix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;fieldslester@visualix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rowe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;792&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">792</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13109</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Becky&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jimenez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;539 Front Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isologia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;beckyjimenez@isologia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Summertown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;797&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">797</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6854</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lindsay&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mills&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;919 Quay Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zoinage&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lindsaymills@zoinage.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elliston&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;800&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">800</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26217</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Candy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oconnor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;200 Newel Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Radiantix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;candyoconnor@radiantix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sandston&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;805&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">805</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18426</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jackson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sampson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;722 Kenmore Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Daido&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jacksonsampson@daido.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bellamy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;812&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">812</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42593</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Graves&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Newman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;916 Joralemon Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ecrater&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gravesnewman@ecrater.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Crown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;817&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">817</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36582</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Padilla&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bauer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;310 Cadman Plaza&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exoblue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;padillabauer@exoblue.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ahwahnee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;824&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">824</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6053</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dyer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Henson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;650 Seaview Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nitracyr&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dyerhenson@nitracyr.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gibsonia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;829&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">829</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20263</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Althea&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;319 Cook Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hyplex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;altheabell@hyplex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wadsworth&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;831&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">831</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">25375</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wendy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Savage&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;421 Veranda Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Neurocell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wendysavage@neurocell.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fresno&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;836&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">836</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20797</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lloyd&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lindsay&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;953 Dinsmore Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Suretech&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lloydlindsay@suretech.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Conway&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;843&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">843</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15555</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Patricia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;406 Seabring Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Providco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;patriciabarton@providco.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Avoca&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;848&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">848</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15443</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carmella&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cash&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;988 Exeter Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bristo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;carmellacash@bristo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Northridge&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;850&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">850</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6531</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carlene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gaines&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;753 Monroe Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Naxdis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;carlenegaines@naxdis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Genoa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;855&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">855</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40170</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stevens&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;326 Driggs Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aeora&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;miastevens@aeora.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Delwood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;862&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">862</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38792</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clayton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Golden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;620 Regent Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Accusage&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;claytongolden@accusage.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ona&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;867&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">867</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45453</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blanca&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ellison&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;593 McKibben Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Koogle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;blancaellison@koogle.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frystown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;874&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">874</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23079</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lynette&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Higgins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;377 McKinley Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Menbrain&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lynettehiggins@menbrain.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Manitou&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;879&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">879</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48332</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sabrina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lancaster&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;382 Oak Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Webiotic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sabrinalancaster@webiotic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lindisfarne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AZ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;881&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">881</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26684</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barnes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ware&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;666 Hooper Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Norali&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;barnesware@norali.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cazadero&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;886&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">886</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14867</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Willa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leblanc&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;773 Bergen Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nurali&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;willaleblanc@nurali.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hilltop&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;893&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">893</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42584</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moses&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Campos&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;991 Bevy Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Trollery&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mosescampos@trollery.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Freetown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;898&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">898</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12019</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lori&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stevenson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;910 Coles Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Honotron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;loristevenson@honotron.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shindler&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;901&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">901</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35038</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Irma&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dotson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;245 Mayfair Drive&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bleeko&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;irmadotson@bleeko.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lodoga&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;906&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">906</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24073</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vicki&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Suarez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;829 Roosevelt Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Utara&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;vickisuarez@utara.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Albrightsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;913&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">913</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47657</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Margery&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Monroe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;941 Fanchon Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exerta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;margerymonroe@exerta.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bannock&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;918&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">918</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36776</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dianna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hernandez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;499 Moultrie Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isologica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;diannahernandez@isologica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Falconaire&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;920&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">920</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41513</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jerri&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mitchell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;831 Kent Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tasmania&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jerrimitchell@tasmania.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cotopaxi&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;925&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">925</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18295</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosario&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jackson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;178 Leonora Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Progenex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rosariojackson@progenex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rivereno&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;932&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">932</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3111</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Summer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Porter&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;949 Grand Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Multiflex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;summerporter@multiflex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Spokane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;937&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">937</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43491</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Selma&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Anderson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;205 Reed Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dadabase&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;selmaanderson@dadabase.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Malo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;944&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">944</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46478</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Donaldson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Woodard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;498 Laurel Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zogak&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;donaldsonwoodard@zogak.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hasty&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;949&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">949</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48703</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Latasha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mullins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;272 Lefferts Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zenolux&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;latashamullins@zenolux.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kieler&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;951&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">951</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36337</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tran&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Burris&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;561 Rutland Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geoform&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tranburris@geoform.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Longbranch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;956&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">956</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19477</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Randall&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lynch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;490 Madison Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cosmetex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;randalllynch@cosmetex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wells&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;963&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">963</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">30461</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Griffin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sheppard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;682 Linden Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zanymax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;griffinsheppard@zanymax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fannett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NM&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;968&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">968</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32371</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Luella&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Burch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;684 Arkansas Drive&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Krag&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;luellaburch@krag.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brambleton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;970&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">970</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19648</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Forbes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wallace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;990 Mill Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pheast&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;forbeswallace@pheast.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lopezo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;975&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">975</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5239</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Delores&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Booker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;328 Conselyea Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Centice&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;deloresbooker@centice.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Williams&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;982&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">982</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16511</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Buck&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Robinson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;301 Melrose Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Calcu&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;buckrobinson@calcu.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Welch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;987&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">987</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4072</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brock&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sandoval&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;977 Gem Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fiberox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;brocksandoval@fiberox.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Celeryville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;994&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">994</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33298</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Madge&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holcomb&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;612 Hawthorne Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Escenta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;madgeholcomb@escenta.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alafaya&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;999&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">999</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6087</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dorothy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;499 Laurel Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xurban&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dorothybarron@xurban.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Belvoir&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;4&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">4</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27658</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rodriquez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Flores&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;986 Wyckoff Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tourmania&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rodriquezflores@tourmania.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eastvale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;9&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">9</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24776</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Opal&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Meadows&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;963 Neptune Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cedward&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;opalmeadows@cedward.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Olney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;11&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">11</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20203</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jenkins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Haney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;740 Ferry Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Qimonk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jenkinshaney@qimonk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Steinhatchee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;16&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">16</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35883</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Adrian&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pitts&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;963 Fay Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Combogene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;adrianpitts@combogene.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Remington&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;23&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42374</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kirsten&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;330 Dumont Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Codax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kirstenfox@codax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Walton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;28&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42112</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vega&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Flynn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;647 Hyman Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Accupharm&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;vegaflynn@accupharm.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Masthope&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;30&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19087</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lamb&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Townsend&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;169 Lyme Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geeknet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lambtownsend@geeknet.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Epworth&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;35&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42039</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Darla&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bridges&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;315 Central Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xeronk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;darlabridges@xeronk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Woodlake&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;42&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">42</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21137</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harding&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hobbs&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;474 Ridgewood Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xth&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hardinghobbs@xth.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Heil&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;47&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">47</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33044</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Georgia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wilkerson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;369 Herbert Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Endipin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;georgiawilkerson@endipin.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dellview&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;54&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">54</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23406</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Angel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mann&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;229 Ferris Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Amtas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;angelmann@amtas.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Calverton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;59&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">59</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">37728</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Malone&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Justice&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;721 Russell Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Emoltra&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;malonejustice@emoltra.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Trucksville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;61&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">61</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6856</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shawn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Baird&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;605 Monument Walk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moltonic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;shawnbaird@moltonic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Darlington&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;66&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">66</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">25939</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Franks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Salinas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;437 Hamilton Walk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cowtown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;frankssalinas@cowtown.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chase&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;73&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">73</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33457</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Irene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stephenson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;684 Miller Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hawkster&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;irenestephenson@hawkster.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Levant&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;78&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">78</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48656</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elvira&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Patterson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;834 Amber Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Assistix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;elvirapatterson@assistix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dunbar&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;80&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">80</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13445</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lacey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blanchard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;823 Himrod Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comdom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;laceyblanchard@comdom.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Matthews&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;85&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">85</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48735</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wilcox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sellers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;212 Irving Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Confrenzy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wilcoxsellers@confrenzy.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kipp&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;92&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">92</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26753</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gay&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brewer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;369 Ditmars Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Savvy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gaybrewer@savvy.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moquino&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;97&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">97</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49671</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Karen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Trujillo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;512 Cumberland Walk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tsunamia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;karentrujillo@tsunamia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fredericktown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;100&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">100</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29869</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Madden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Woods&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;696 Ryder Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Slumberia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;maddenwoods@slumberia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Deercroft&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;105&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">105</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29654</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Castillo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dickerson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;673 Oxford Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tellifly&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;castillodickerson@tellifly.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Succasunna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;112&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">112</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38395</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frederick&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Case&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;580 Lexington Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Talkalot&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;frederickcase@talkalot.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Orovada&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;117&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">117</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48831</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Robin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hays&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;347 Hornell Loop&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pasturia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;robinhays@pasturia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sims&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;124&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">124</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16425</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fern&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lambert&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;511 Jay Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Furnitech&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;fernlambert@furnitech.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cloverdale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;129&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">129</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42409</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alexandria&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sanford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;934 Ridgecrest Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kyagoro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;alexandriasanford@kyagoro.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Concho&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;131&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">131</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28030</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dollie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Koch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;287 Manhattan Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Skinserve&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dolliekoch@skinserve.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shasta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;136&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">136</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45801</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Winnie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;198 Mill Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Neteria&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;winnieholland@neteria.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Urie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;143&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">143</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43093</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cohen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Noble&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;454 Nelson Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Buzzworks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cohennoble@buzzworks.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Norvelt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;148&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">148</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3662</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Annmarie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Snider&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;857 Lafayette Walk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Edecine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;annmariesnider@edecine.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hollins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;150&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">150</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15306</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ortega&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dalton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;237 Mermaid Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rameon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ortegadalton@rameon.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maxville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;155&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">155</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27878</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Atkinson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hudson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;434 Colin Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Qualitern&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;atkinsonhudson@qualitern.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hoehne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;162&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">162</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6302</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Griffith&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Calderon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;871 Vandervoort Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quotezart&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;griffithcalderon@quotezart.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barclay&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;167&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">167</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42051</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hampton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ryan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;618 Fleet Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zipak&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hamptonryan@zipak.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Irwin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;174&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">174</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1464</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gamble&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pierce&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;650 Eagle Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Matrixity&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gamblepierce@matrixity.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Abiquiu&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;179&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">179</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13265</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elise&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Drake&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;305 Christopher Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Turnling&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;elisedrake@turnling.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Loretto&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;181&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">181</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27983</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bennett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hampton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;435 Billings Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Voipa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bennetthampton@voipa.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rodman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;186&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">186</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18373</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kline&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Joyce&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;285 Falmouth Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tetratrex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;klinejoyce@tetratrex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Klondike&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;193&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">193</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13412</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Patty&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Petty&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;251 Vermont Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kinetica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pattypetty@kinetica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grantville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;198&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">198</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19686</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rachael&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sharp&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;443 Vernon Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Powernet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rachaelsharp@powernet.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Canoochee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;201&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">201</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14586</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ronda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Perry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;856 Downing Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Artiq&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rondaperry@artiq.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Colton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;206&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">206</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47423</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kelli&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Francis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;671 George Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exoswitch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kellifrancis@exoswitch.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Babb&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;213&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">213</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34172</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bauer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Summers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;257 Boynton Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Voratak&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bauersummers@voratak.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oceola&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;218&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">218</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26702</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Garrison&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bryan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;478 Greenpoint Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Uniworld&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;garrisonbryan@uniworld.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comptche&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;220&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">220</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3086</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tania&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Middleton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;541 Gunther Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zerology&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;taniamiddleton@zerology.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Linwood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;225&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">225</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21949</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maryann&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Murphy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;894 Bridgewater Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cinesanct&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;maryannmurphy@cinesanct.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cartwright&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;232&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">232</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11984</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carr&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jensen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;995 Micieli Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Biohab&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;carrjensen@biohab.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Waikele&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;237&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">237</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5603</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kirby&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Watkins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;348 Blake Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sonique&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kirbywatkins@sonique.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Freelandville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;244&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">244</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8048</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Judith&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Riggs&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;590 Kosciusko Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Arctiq&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;judithriggs@arctiq.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gorham&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;249&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">249</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16822</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mckinney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gallagher&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;939 Seigel Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Premiant&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mckinneygallagher@premiant.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Catharine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;251&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">251</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13475</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Graves&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;427 Lawn Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dentrex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;marksgraves@dentrex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Waukeenah&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;256&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">256</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48318</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Simon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hogan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;789 Suydam Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dancerity&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;simonhogan@dancerity.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dargan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;263&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">263</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12837</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Thornton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Meyer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;575 Elliott Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Peticular&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;thorntonmeyer@peticular.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dotsero&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;268&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">268</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20925</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Avis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blackwell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;569 Jerome Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Magnina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;avisblackwell@magnina.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bethany&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;270&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">270</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43951</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moody&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harmon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;233 Vanderbilt Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Otherside&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;moodyharmon@otherside.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elwood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;275&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">275</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">2384</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reynolds&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barnett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;394 Stockton Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Austex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;reynoldsbarnett@austex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grandview&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;282&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">282</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38540</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gay&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Schultz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;805 Claver Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Handshake&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gayschultz@handshake.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tampico&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;287&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">287</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10845</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Valerie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lang&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;423 Midwood Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quarx&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;valerielang@quarx.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cannondale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;294&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">294</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29582</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pitts&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Haynes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;901 Broome Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aquazure&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pittshaynes@aquazure.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Turah&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;299&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">299</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40825</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Angela&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Talley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;822 Bills Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Remold&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;angelatalley@remold.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bethpage&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;302&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">302</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11298</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isabella&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hewitt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;455 Bedford Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cincyr&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;isabellahewitt@cincyr.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blanford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;307&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">307</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43355</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Enid&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ashley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;412 Emerson Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Avenetro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;enidashley@avenetro.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Catherine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;314&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">314</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5848</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Norton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Norton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;252 Ditmas Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Talkola&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;nortonnorton@talkola.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Veyo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;319&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">319</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15430</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ferrell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mckinney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;874 Cranberry Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Portaline&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ferrellmckinney@portaline.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rose&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;321&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">321</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43370</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Larsen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;617 Williams Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Manufact&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;martalarsen@manufact.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sisquoc&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;326&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">326</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9692</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pearl&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reese&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;451 Colonial Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Accruex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pearlreese@accruex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Westmoreland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;333&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">333</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22778</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Trudy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sweet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;881 Kiely Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Acumentor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;trudysweet@acumentor.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;338&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">338</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6969</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pierce&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lawrence&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;318 Gallatin Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lunchpad&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;piercelawrence@lunchpad.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Iola&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;340&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">340</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42072</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Juarez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gutierrez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;802 Seba Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Billmed&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;juarezgutierrez@billmed.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Malott&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;345&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">345</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9812</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Parker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hines&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;715 Mill Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Baluba&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;parkerhines@baluba.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blackgum&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;352&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">352</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20290</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kendra&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcintosh&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;963 Wolf Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Orboid&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kendramcintosh@orboid.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bladensburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;357&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">357</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15102</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Adele&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carroll&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;381 Arion Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aquafire&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;adelecarroll@aquafire.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Springville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;364&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">364</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35247</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Felicia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Merrill&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;229 Branton Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Prosely&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;feliciamerrill@prosely.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dola&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;369&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">369</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">17047</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcfadden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Guy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;445 Lott Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kangle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mcfaddenguy@kangle.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Greenbackville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;371&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">371</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19751</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Allen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;295 Wallabout Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nexgene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;barkerallen@nexgene.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nanafalia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;376&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">376</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44407</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcmillan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dunn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;771 Dorchester Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eargo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mcmillandunn@eargo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Yogaville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;383&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">383</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48889</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Knox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Larson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;962 Bartlett Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bostonic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;knoxlarson@bostonic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Smeltertown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;388&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">388</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9606</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Julianne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nicholson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;338 Crescent Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Viasia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;juliannenicholson@viasia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alleghenyville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;390&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">390</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">7464</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ramona&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;135 Banner Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Deminimum&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ramonaroy@deminimum.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dodge&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;395&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">395</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18679</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Juliet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Whitaker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;128 Remsen Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Toyletry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;julietwhitaker@toyletry.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Yonah&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;403&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">403</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18833</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Williamson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Horn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;223 Strickland Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nimon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;williamsonhorn@nimon.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bawcomville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;408&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">408</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34666</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lidia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Guerrero&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;254 Stratford Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Snowpoke&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lidiaguerrero@snowpoke.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fairlee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;410&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">410</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31200</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cardenas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;987 Monitor Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Corpulse&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;foxcardenas@corpulse.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Southview&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;415&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">415</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19449</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Martinez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Benson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;172 Berkeley Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Enersol&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;martinezbenson@enersol.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chumuckla&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;422&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">422</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40162</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brigitte&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Scott&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;662 Vermont Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Waretel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;brigittescott@waretel.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elrama&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;427&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">427</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1463</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rebekah&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Garrison&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;837 Hampton Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Niquent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rebekahgarrison@niquent.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zarephath&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;434&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">434</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11329</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Christa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Huff&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;454 Oriental Boulevard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Earthpure&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;christahuff@earthpure.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stevens&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;439&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">439</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22752</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lula&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Williams&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;630 Furman Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vinch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lulawilliams@vinch.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Newcastle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;441&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">441</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47947</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dickson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcgee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;478 Knight Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gogol&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dicksonmcgee@gogol.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Laurelton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;446&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">446</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23071</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lolita&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fleming&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;918 Bridge Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vidto&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lolitafleming@vidto.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brownlee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;453&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">453</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21520</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Powell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;479 Brevoort Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vortexaco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hoodpowell@vortexaco.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alderpoint&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;458&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">458</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8865</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aida&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wolf&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;403 Thames Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;aidawolf@isis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bordelonville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;460&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">460</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">37734</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aguirre&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;White&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;190 Crooke Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Unq&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;aguirrewhite@unq.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Albany&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;465&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">465</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10681</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pearlie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;916 Evergreen Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hometown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pearlieholman@hometown.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Needmore&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;472&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">472</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">25571</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Long&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;288 Mill Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comverges&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;leelong@comverges.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Movico&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;477&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">477</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">25892</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holcomb&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cobb&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;369 Marconi Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Steeltab&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;holcombcobb@steeltab.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Byrnedale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;484&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">484</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3274</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Staci&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Melendez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;751 Otsego Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Namebox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;stacimelendez@namebox.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harborton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;489&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">489</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">7879</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Garrett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Langley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;331 Bowne Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zillidium&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;garrettlangley@zillidium.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Riviera&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;491&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">491</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42942</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Teresa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Owen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;713 Canton Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Plasmos&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;teresaowen@plasmos.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bartonsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;496&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">496</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14869</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alison&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Conrad&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;347 Varet Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Perkle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;alisonconrad@perkle.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cliffside&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;504&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">504</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49205</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shanna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chambers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;220 Beard Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Corporana&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;shannachambers@corporana.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cashtown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AZ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;509&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">509</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34754</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Durham&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pacheco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;129 Plymouth Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Datacator&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;durhampacheco@datacator.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Loveland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;511&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">511</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40908</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elba&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grant&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;157 Bijou Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dognost&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;elbagrant@dognost.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coyote&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;516&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">516</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44940</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Smith&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;770 Cherry Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Parleynet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;roysmith@parleynet.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carrsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;523&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">523</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28729</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Amalia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Benjamin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;173 Bushwick Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sentia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;amaliabenjamin@sentia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jacumba&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;528&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">528</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4071</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Thompson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hoover&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;580 Garden Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Portalis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;thompsonhoover@portalis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Knowlton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;530&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">530</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8840</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kathrine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Evans&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;422 Division Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Spherix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kathrineevans@spherix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Biddle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;535&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">535</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8715</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;George&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;722 Green Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ewaves&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;frygeorge@ewaves.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kenmar&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;542&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">542</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23285</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Michelle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mayo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;657 Caton Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Biflex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;michellemayo@biflex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Beaverdale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;547&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">547</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12870</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eaton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rios&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;744 Withers Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Podunk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;eatonrios@podunk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chelsea&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;554&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">554</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33163</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Townsend&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Atkins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;566 Ira Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Acruex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;townsendatkins@acruex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Valle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;559&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">559</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11450</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tonia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Schmidt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;508 Sheffield Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Extro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;toniaschmidt@extro.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Newry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;561&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">561</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12370</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sellers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Davis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;860 Madoc Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isodrive&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sellersdavis@isodrive.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Trail&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;566&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">566</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6183</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;349 Winthrop Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Medcom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;coxroman@medcom.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosewood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;573&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">573</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32171</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Callie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Castaneda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;799 Scott Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Earthwax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;calliecastaneda@earthwax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marshall&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;578&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">578</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34259</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holmes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcknight&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;969 Metropolitan Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cubicide&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;holmesmcknight@cubicide.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aguila&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;580&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">580</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13716</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcmahon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;York&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;475 Beacon Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zillar&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mcmahonyork@zillar.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Farmington&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;585&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">585</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26745</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nieves&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nolan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;115 Seagate Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jumpstack&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;nievesnolan@jumpstack.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eastmont&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;592&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">592</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32968</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Head&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Webster&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;987 Lefferts Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Empirica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;headwebster@empirica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rockingham&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;597&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">597</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11246</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Penny&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Knowles&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;139 Forbell Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ersum&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pennyknowles@ersum.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vallonia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;600&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">600</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10336</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Simmons&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Byers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;250 Dictum Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Qualitex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;simmonsbyers@qualitex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wanship&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;605&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">605</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38427</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcclain&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Manning&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;832 Leonard Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Qiao&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mcclainmanning@qiao.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Calvary&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;612&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">612</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11868</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dunn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cameron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;156 Lorimer Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isonus&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dunncameron@isonus.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Virgie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;617&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">617</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35445</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kitty&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cooley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;788 Seagate Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ultrimax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kittycooley@ultrimax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clarktown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;624&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">624</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27538</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roxanne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Franklin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;299 Woodrow Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Silodyne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;roxannefranklin@silodyne.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roulette&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;629&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">629</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32987</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcclure&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rodgers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;806 Pierrepont Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elita&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mcclurerodgers@elita.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brownsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;631&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">631</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21657</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Corrine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barber&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;447 Hunts Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quarmony&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;corrinebarber@quarmony.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wyano&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;636&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">636</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8036</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Agnes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hooper&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;865 Hanson Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Digial&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;agneshooper@digial.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sperryville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;643&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">643</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8057</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hendricks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stokes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;142 Barbey Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Remotion&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hendricksstokes@remotion.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lewis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;648&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">648</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11506</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Terry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Montgomery&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;115 Franklin Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Enervate&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;terrymontgomery@enervate.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bascom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;650&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">650</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18091</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Benton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Knight&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;850 Aitken Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pholio&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bentonknight@pholio.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cobbtown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;655&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">655</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22912</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eula&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Taylor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;520 Orient Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Miracula&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;eulataylor@miracula.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wacissa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;662&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">662</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10138</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Daisy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Burnett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;114 Norman Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Liquicom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;daisyburnett@liquicom.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grahamtown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;667&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">667</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22559</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Juliana&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chase&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;496 Coleridge Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comtract&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;julianachase@comtract.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wilsonia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;674&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">674</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36038</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Watts&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shannon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;600 Story Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Joviold&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wattsshannon@joviold.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fairhaven&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;679&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">679</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20149</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Henrietta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bonner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;461 Bond Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geekol&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;henriettabonner@geekol.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Richville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;681&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">681</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34244</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Velazquez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wolfe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;773 Eckford Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zisis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;velazquezwolfe@zisis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Smock&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;686&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">686</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10116</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Decker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcclure&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;236 Commerce Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Everest&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;deckermcclure@everest.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gibbsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;693&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">693</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31233</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tabatha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zimmerman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;284 Emmons Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pushcart&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tabathazimmerman@pushcart.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Esmont&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;698&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">698</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14965</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Baker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Armstrong&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;796 Tehama Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nurplex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bakerarmstrong@nurplex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Starks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;701&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">701</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23772</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gardner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Griffith&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;187 Moore Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vertide&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gardnergriffith@vertide.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coventry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;706&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">706</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5282</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eliza&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Potter&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;945 Dunham Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Playce&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;elizapotter@playce.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Woodruff&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;713&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">713</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20054</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Iris&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcguire&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;508 Benson Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Duflex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;irismcguire@duflex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hillsboro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;718&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">718</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13876</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hickman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dillard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;132 Etna Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Genmy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hickmandillard@genmy.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Curtice&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;720&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">720</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31356</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ruth&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vance&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;229 Adams Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zilidium&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ruthvance@zilidium.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Allison&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;725&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">725</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14677</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reeves&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tillman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;674 Ivan Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cemention&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;reevestillman@cemention.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Navarre&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;732&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">732</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38445</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Delia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cruz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;870 Cheever Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Multron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;deliacruz@multron.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cresaptown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;737&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">737</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40431</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sampson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Yates&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;214 Cox Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Signidyne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sampsonyates@signidyne.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brazos&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;744&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">744</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8690</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bernard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Martinez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;148 Dunne Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dragbot&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bernardmartinez@dragbot.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moraida&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;749&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">749</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1249</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rush&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Boyle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;310 Argyle Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sportan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rushboyle@sportan.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brady&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;751&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">751</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49252</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Patrick&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Osborne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;915 Prospect Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gynko&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;patrickosborne@gynko.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Takilma&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;756&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">756</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40006</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jasmine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Howell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;605 Elliott Walk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ecratic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jasminehowell@ecratic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harrodsburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;763&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">763</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12091</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Liz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bentley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;933 Debevoise Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nipaz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lizbentley@nipaz.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Glenville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;768&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">768</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">2213</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sondra&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Soto&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;625 Colonial Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Navir&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sondrasoto@navir.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Benson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;770&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">770</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39505</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Joann&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Crane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;798 Farragut Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lingoage&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;joanncrane@lingoage.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kirk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;775&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">775</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27943</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wilson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Merritt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;288 Thornton Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geeky&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wilsonmerritt@geeky.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holtville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;782&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">782</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3960</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maldonado&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Craig&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;345 Myrtle Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zilencio&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;maldonadocraig@zilencio.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Yukon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;787&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">787</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11876</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harper&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wynn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;139 Oceanic Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Interfind&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;harperwynn@interfind.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gerber&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;794&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">794</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16491</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Walker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Charles&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;215 Kenilworth Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Orbin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;walkercharles@orbin.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rivers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;799&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">799</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">2889</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Myra&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Guerra&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;625 Dahlgreen Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Digigene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;myraguerra@digigene.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Draper&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;802&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">802</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19630</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gracie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Foreman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;219 Kent Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Supportal&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gracieforeman@supportal.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Westboro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;807&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">807</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29206</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hatfield&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lowe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;499 Adler Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lovepad&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hatfieldlowe@lovepad.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wiscon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;814&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">814</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9838</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morse&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcbride&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;776 Calyer Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Inear&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;morsemcbride@inear.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kingstowne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;819&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">819</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3971</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Karyn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Medina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;417 Utica Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Qnekt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;karynmedina@qnekt.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kerby&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;821&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">821</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33271</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Trisha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blankenship&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;329 Jamaica Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chorizon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;trishablankenship@chorizon.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sexton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;826&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">826</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11548</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Summers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vinson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;742 Irwin Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Globoil&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;summersvinson@globoil.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Callaghan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;833&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">833</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46154</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Woodward&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;398 Atkins Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zedalis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;woodwardhood@zedalis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stonybrook&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;838&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">838</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24629</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Latonya&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blake&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;531 Milton Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rugstars&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;latonyablake@rugstars.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tedrow&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;840&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">840</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39615</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Boone&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gomez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;256 Hampton Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geekular&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;boonegomez@geekular.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Westerville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;845&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">845</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35422</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tracy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vaughn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;645 Rockaway Parkway&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Andryx&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tracyvaughn@andryx.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wilmington&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;852&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">852</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6041</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Allen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hammond&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;793 Essex Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tersanki&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;allenhammond@tersanki.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Osmond&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;857&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">857</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39678</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alyce&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Douglas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;326 Robert Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Earbang&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;alycedouglas@earbang.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Thornport&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;864&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">864</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21804</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Duffy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Anthony&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;582 Cooke Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Schoolio&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;duffyanthony@schoolio.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brenton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;869&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">869</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43544</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Corinne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Robbins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;732 Quentin Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Orbaxter&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;corinnerobbins@orbaxter.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;871&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">871</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35854</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Norma&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Burt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;934 Cyrus Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Magnafone&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;normaburt@magnafone.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;876&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">876</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48568</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brady&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Glover&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;565 Oceanview Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comvex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bradyglover@comvex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Noblestown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;883&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">883</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33679</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Austin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jefferson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;846 Lincoln Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Polarax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;austinjefferson@polarax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Savannah&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;888&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">888</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22277</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Myrna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Herman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;649 Harwood Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Enthaze&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;myrnaherman@enthaze.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Idamay&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;890&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">890</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31198</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alvarado&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pate&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;269 Ashland Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ovolo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;alvaradopate@ovolo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Volta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;895&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">895</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">7327</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lara&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcdaniel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;854 Willow Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Acusage&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;laramcdaniel@acusage.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Imperial&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;903&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">903</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10238</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wade&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Page&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;685 Waldorf Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eplosion&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wadepage@eplosion.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Welda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;908&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">908</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45975</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mosley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holloway&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;929 Eldert Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Anivet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mosleyholloway@anivet.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Biehle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;910&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">910</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36831</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Esmeralda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;James&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;535 High Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Terrasys&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;esmeraldajames@terrasys.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dubois&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;915&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">915</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19816</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Farrell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;French&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;126 McKibbin Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Techmania&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;farrellfrench@techmania.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wescosville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;922&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">922</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39347</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Irwin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pugh&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;463 Shale Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Idego&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;irwinpugh@idego.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ivanhoe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;927&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">927</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19976</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jeanette&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Acevedo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;694 Polhemus Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Halap&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jeanetteacevedo@halap.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harrison&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;934&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">934</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43987</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Freida&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Daniels&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;448 Cove Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vurbo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;freidadaniels@vurbo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Snelling&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;939&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">939</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31228</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hodges&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Massey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;431 Dahl Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kegular&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hodgesmassey@kegular.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Katonah&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;941&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">941</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38796</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kim&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moss&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;105 Onderdonk Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Digirang&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kimmoss@digirang.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Centerville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;946&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">946</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42794</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Obrien&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;339 Rewe Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eclipsent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;inaobrien@eclipsent.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Soham&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;953&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">953</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1110</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Baxter&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Black&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;720 Stillwell Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Uplinx&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;baxterblack@uplinx.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Drummond&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;958&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">958</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32849</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wilkins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;686 Delmonico Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Medesign&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;brownwilkins@medesign.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shelby&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;960&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">960</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">2905</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Curry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vargas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;242 Blake Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pearlesex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;curryvargas@pearlesex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Henrietta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;965&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">965</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21882</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Patrica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Melton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;141 Rodney Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Flexigen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;patricamelton@flexigen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Klagetoh&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;972&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">972</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24719</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leona&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Christian&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;900 Woodpoint Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Extrawear&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;leonachristian@extrawear.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roderfield&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;977&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">977</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6744</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rodgers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mccray&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;612 Duryea Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Papricut&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rodgersmccray@papricut.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marenisco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;984&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">984</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1904</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Viola&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Crawford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;354 Linwood Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ginkle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;violacrawford@ginkle.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Witmer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;989&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">989</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48622</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Franklin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frank&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;270 Carlton Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shopabout&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;franklinfrank@shopabout.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Guthrie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;991&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">991</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4239</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Connie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Berry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;647 Gardner Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Flumbo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;connieberry@flumbo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frierson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;996&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">996</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">17541</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Andrews&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Herrera&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;570 Vandam Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Klugger&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;andrewsherrera@klugger.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Whitehaven&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;0&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">0</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16623</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bradshaw&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mckenzie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;244 Columbus Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Euron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bradshawmckenzie@euron.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hobucken&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;5&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">5</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29342</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leola&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stewart&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;311 Elm Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Diginetic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;leolastewart@diginetic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fairview&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;12&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">12</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">37055</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stafford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brock&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;296 Wythe Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Uncorp&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;staffordbrock@uncorp.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bend&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;17&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">17</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">7831</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bessie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Orr&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;239 Hinsdale Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Skyplex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bessieorr@skyplex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Graball&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;24&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44182</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;582 Gelston Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Besto&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wooddale@besto.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Juntura&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;29&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27323</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leah&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Santiago&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;193 Schenck Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isologix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;leahsantiago@isologix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gerton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;31&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">30443</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kristen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Santana&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;130 Middagh Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dogspa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kristensantana@dogspa.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;36&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15902</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alexandra&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nguyen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;389 Elizabeth Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bittor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;alexandranguyen@bittor.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hemlock&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;43&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">43</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33474</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ryan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Howe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;660 Huntington Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Microluxe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ryanhowe@microluxe.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clara&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;48&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">48</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40608</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Peck&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Downs&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;594 Dwight Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ramjob&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;peckdowns@ramjob.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coloma&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;50&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">50</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43695</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sheena&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kirkland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;598 Bank Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zerbina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sheenakirkland@zerbina.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Walland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;55&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">55</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22020</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shelia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Puckett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;265 Royce Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Izzby&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sheliapuckett@izzby.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Slovan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;62&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">62</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43065</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lester&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stanton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;969 Doughty Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geekko&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lesterstanton@geekko.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Itmann&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;67&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">67</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39430</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isabelle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Spence&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;718 Troy Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geeketron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;isabellespence@geeketron.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Camptown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;74&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">74</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47167</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lauri&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Saunders&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;768 Lynch Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Securia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;laurisaunders@securia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Caroline&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;79&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">79</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28185</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Booker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lowery&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;817 Campus Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sensate&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bookerlowery@sensate.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carlos&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;81&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">81</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46568</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dennis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gilbert&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;619 Minna Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Melbacor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dennisgilbert@melbacor.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kersey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;86&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">86</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15428</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Walton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Butler&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;999 Schenck Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Unisure&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;waltonbutler@unisure.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bentonville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;93&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">93</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">17728</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jeri&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Booth&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;322 Roosevelt Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geekology&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jeribooth@geekology.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leming&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;98&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">98</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15085</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cora&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barrett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;555 Neptune Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kiosk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;corabarrett@kiosk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Independence&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;101&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">101</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43400</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cecelia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grimes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;972 Lincoln Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ecosys&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ceceliagrimes@ecosys.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Manchester&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;106&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">106</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8212</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Josefina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wagner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;418 Estate Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kyaguru&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;josefinawagner@kyaguru.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Darbydale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;113&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">113</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41652</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Burt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moses&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;633 Berry Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Uni&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;burtmoses@uni.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Russellville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;118&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">118</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">2223</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ballard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vasquez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;101 Bush Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Intergeek&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ballardvasquez@intergeek.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Century&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;120&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">120</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38565</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Browning&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rodriquez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;910 Moore Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Opportech&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;browningrodriquez@opportech.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cutter&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;125&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">125</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5396</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tanisha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dixon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;482 Hancock Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Junipoor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tanishadixon@junipoor.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wauhillau&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;132&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">132</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">37707</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Horton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Romero&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;427 Rutherford Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Affluex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hortonromero@affluex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hall&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;137&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">137</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3596</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frost&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Freeman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;191 Dennett Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Beadzza&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;frostfreeman@beadzza.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sabillasville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;144&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">144</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43257</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Evans&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dyer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;912 Post Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Magmina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;evansdyer@magmina.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gordon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;149&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">149</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22994</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Megan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gonzales&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;836 Tampa Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Andershun&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;megangonzales@andershun.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rockhill&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;151&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">151</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34473</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Joyner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;799 Truxton Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kozgene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kentjoyner@kozgene.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Allamuchy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;156&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">156</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40185</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sloan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pennington&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;573 Opal Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hopeli&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sloanpennington@hopeli.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Evergreen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;163&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">163</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43075</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wilda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Norman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;173 Beadel Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kog&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wildanorman@kog.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bodega&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;168&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">168</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49568</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carissa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Simon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;975 Flatbush Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zillacom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;carissasimon@zillacom.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Neibert&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;170&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">170</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6025</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mann&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Madden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;161 Radde Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Farmex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mannmadden@farmex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Thermal&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;175&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">175</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16213</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Montoya&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Donaldson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;481 Morton Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Envire&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;montoyadonaldson@envire.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Delco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;182&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">182</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">7803</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Manuela&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dillon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;742 Garnet Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moreganic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;manueladillon@moreganic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ilchester&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;187&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">187</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26581</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Autumn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hodges&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;757 Granite Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ezentia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;autumnhodges@ezentia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Martinsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;194&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">194</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16311</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Beck&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosario&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;721 Cambridge Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zoid&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;beckrosario@zoid.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Efland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;199&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">199</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18086</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Branch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Love&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;458 Commercial Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frolix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;branchlove@frolix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Caspar&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;202&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">202</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26466</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Medina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;519 Sunnyside Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bleendot&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;medinabrown@bleendot.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Winfred&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;207&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">207</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45535</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Evelyn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lara&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;636 Chestnut Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ultrasure&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;evelynlara@ultrasure.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Logan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;214&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">214</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24418</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Luann&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Faulkner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;697 Hazel Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zolar&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;luannfaulkner@zolar.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ticonderoga&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;219&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">219</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">17127</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Edwards&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hurley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;834 Stockholm Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Austech&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;edwardshurley@austech.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bayview&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;221&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">221</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15803</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Benjamin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barrera&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;568 Main Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zaphire&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;benjaminbarrera@zaphire.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Germanton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;226&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">226</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">37720</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wilkins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brady&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;486 Baltic Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dogtown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wilkinsbrady@dogtown.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Condon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;233&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">233</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23020</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Washington&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Walsh&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;366 Church Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Candecor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;washingtonwalsh@candecor.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Westphalia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;238&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">238</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21287</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Constance&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wong&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;496 Brown Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grainspot&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;constancewong@grainspot.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cecilia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;240&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">240</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49741</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oconnor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clay&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;659 Highland Boulevard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Franscene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;oconnorclay@franscene.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kilbourne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;245&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">245</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22026</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fran&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bolton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;147 Jerome Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Solaren&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;franbolton@solaren.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nash&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;252&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">252</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18831</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elvia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Poole&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;836 Delevan Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Velity&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;elviapoole@velity.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Groveville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;257&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">257</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5318</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Olive&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oneil&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;457 Decatur Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Helixo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;oliveoneil@helixo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chicopee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;264&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">264</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22084</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Samantha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ferrell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;488 Fulton Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Flum&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;samanthaferrell@flum.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brandywine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;269&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">269</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43317</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Crosby&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Figueroa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;910 Aurelia Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pyramia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;crosbyfigueroa@pyramia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leyner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;271&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">271</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11864</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Walter&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;645 Poplar Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grupoli&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;holtwalter@grupoli.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mansfield&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;276&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">276</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11606</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pittman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mathis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;567 Charles Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zuvy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pittmanmathis@zuvy.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roeville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;283&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">283</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24070</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fuentes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Foley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;729 Walker Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Knowlysis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;fuentesfoley@knowlysis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tryon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;288&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">288</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27243</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wong&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stone&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;440 Willoughby Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zentix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wongstone@zentix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wheatfields&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;290&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">290</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26103</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Neva&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Burgess&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;985 Wyona Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Slofast&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;nevaburgess@slofast.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cawood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;295&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">295</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">37358</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Howe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nash&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;833 Union Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aquacine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;howenash@aquacine.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Indio&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;303&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">303</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21976</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Huffman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Green&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;455 Colby Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comtest&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;huffmangreen@comtest.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Weeksville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;308&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">308</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33989</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Glass&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Schroeder&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;670 Veterans Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Realmo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;glassschroeder@realmo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gratton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;310&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">310</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23049</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shannon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;412 Pleasant Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ovation&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;shannonmorton@ovation.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Edgar&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AZ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;315&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">315</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1314</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clare&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morrow&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;728 Madeline Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gaptec&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;claremorrow@gaptec.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mapletown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;322&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">322</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6303</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gilliam&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Horne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;414 Florence Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shepard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gilliamhorne@shepard.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Winesburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;327&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">327</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29294</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Contreras&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;694 Gold Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Momentia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;nellcontreras@momentia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cumminsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;334&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">334</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9178</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cross&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Floyd&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;815 Herkimer Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maroptic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;crossfloyd@maroptic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kraemer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;339&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">339</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3992</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Franco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Welch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;776 Brightwater Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Earthplex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;francowelch@earthplex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Naomi&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;341&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">341</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44367</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alberta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bradford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;670 Grant Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bugsall&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;albertabradford@bugsall.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Romeville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;346&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">346</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26594</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shelby&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sanchez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;257 Fillmore Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geekus&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;shelbysanchez@geekus.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Seymour&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;353&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">353</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45182</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rivera&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sherman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;603 Garden Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bovis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;riverasherman@bovis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Otranto&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;358&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">358</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44043</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Baldwin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;845 Menahan Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kidgrease&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;halebaldwin@kidgrease.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Day&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;360&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">360</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26651</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ward&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hicks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;592 Brighton Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Biotica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wardhicks@biotica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kanauga&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;365&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">365</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3176</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sanders&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holder&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;453 Cypress Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geekola&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sandersholder@geekola.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Staples&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;372&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">372</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28566</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alba&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Forbes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;814 Meserole Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isostream&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;albaforbes@isostream.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clarence&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;377&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">377</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5374</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Margo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gay&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;613 Chase Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rotodyne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;margogay@rotodyne.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Waumandee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;384&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">384</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48758</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sallie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Houston&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;836 Polar Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Squish&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;salliehouston@squish.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morningside&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;389&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">389</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8839</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;York&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cummings&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;778 Centre Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Insurity&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;yorkcummings@insurity.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Freeburn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;391&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">391</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14733</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jordan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;391 Forrest Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maineland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;holmanjordan@maineland.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cade&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;396&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">396</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14613</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marsha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elliott&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;297 Liberty Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Orbiflex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;marshaelliott@orbiflex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Windsor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;404&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">404</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34978</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Massey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Becker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;930 Pitkin Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Genekom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;masseybecker@genekom.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blairstown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;409&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">409</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36960</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maura&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Glenn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;183 Poly Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Viagreat&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mauraglenn@viagreat.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Foscoe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;411&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">411</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1172</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Guzman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Whitfield&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;181 Perry Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Springbee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;guzmanwhitfield@springbee.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Balm&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;416&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">416</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27169</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hunt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Schwartz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;461 Havens Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Danja&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;huntschwartz@danja.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grenelefe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;423&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">423</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38852</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hines&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Underwood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;284 Louise Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Namegen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hinesunderwood@namegen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Downsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;428&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">428</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13925</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stephens&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cain&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;189 Summit Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rocklogic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;stephenscain@rocklogic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bourg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;430&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">430</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15251</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alejandra&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chavez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;651 Butler Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gology&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;alejandrachavez@gology.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Allensworth&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;435&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">435</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14654</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lopez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;632 Stone Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Emergent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;suelopez@emergent.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Waterford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;442&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">442</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36211</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lawanda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;126 Canal Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xixan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lawandaleon@xixan.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Berwind&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;447&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">447</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11402</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lucia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Livingston&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;773 Lake Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Soprano&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lucialivingston@soprano.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Edgewater&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;454&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">454</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31687</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alicia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rollins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;483 Verona Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Boilcat&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;aliciarollins@boilcat.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lutsen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;459&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">459</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18869</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pamela&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Henry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;361 Locust Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Imageflow&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pamelahenry@imageflow.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Greenfields&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;461&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">461</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38807</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcbride&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Padilla&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;550 Borinquen Pl&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zepitope&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mcbridepadilla@zepitope.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Emory&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AZ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;466&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">466</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">25109</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marcie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcmillan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;947 Gain Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Entroflex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;marciemcmillan@entroflex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ronco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;473&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">473</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5391</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Susan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Luna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;521 Bogart Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zaya&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;susanluna@zaya.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grazierville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;478&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">478</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28044</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dana&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Decker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;627 Dobbin Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Acrodance&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;danadecker@acrodance.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sharon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;480&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">480</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40807</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Anastasia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Parker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;650 Folsom Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zilladyne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;anastasiaparker@zilladyne.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oberlin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;485&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">485</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44235</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Albert&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roberts&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;385 Harman Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stralum&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;albertroberts@stralum.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Watrous&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NM&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;492&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">492</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31055</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Burnett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Briggs&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;987 Cass Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pharmex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;burnettbriggs@pharmex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cornfields&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;497&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">497</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13493</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Doyle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jenkins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;205 Nevins Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Unia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;doylejenkins@unia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nicut&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;500&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">500</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39143</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pope&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Keith&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;537 Fane Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zboo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;popekeith@zboo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Courtland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;505&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">505</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45493</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shelley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Webb&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;873 Crawford Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quadeebo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;shelleywebb@quadeebo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Topanga&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;512&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">512</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47432</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alisha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morales&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;623 Batchelder Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Terragen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;alishamorales@terragen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gilmore&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;517&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">517</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3022</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Allyson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Walls&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;334 Coffey Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gorganic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;allysonwalls@gorganic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dahlen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;524&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">524</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49334</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Salas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Farley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;499 Trucklemans Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xumonk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;salasfarley@xumonk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Noxen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;529&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">529</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21788</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Deann&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fisher&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;511 Buffalo Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Twiist&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;deannfisher@twiist.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Templeton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;531&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">531</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39770</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Janet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pena&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;645 Livonia Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Corecom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;janetpena@corecom.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Garberville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;536&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">536</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6255</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Emma&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Adkins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;971 Calder Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ontagene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;emmaadkins@ontagene.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ruckersville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;543&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">543</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48022</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rasmussen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;446 Love Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Crustatia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;marinarasmussen@crustatia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Statenville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;548&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">548</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36930</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sandra&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Andrews&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;973 Prospect Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Datagene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sandraandrews@datagene.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Inkerman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;550&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">550</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32238</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Walsh&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Goodwin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;953 Canda Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Proflex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;walshgoodwin@proflex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ypsilanti&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;555&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">555</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10750</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fannie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Slater&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;457 Tech Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kineticut&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;fannieslater@kineticut.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Basye&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;562&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">562</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10737</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sarah&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Strong&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;177 Pioneer Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Megall&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sarahstrong@megall.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ladera&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;567&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">567</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6507</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Diana&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dominguez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;419 Albany Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ohmnet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dianadominguez@ohmnet.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wildwood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;574&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">574</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32954</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Andrea&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mosley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;368 Throop Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Musix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;andreamosley@musix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blende&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;579&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">579</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12044</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Banks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sawyer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;652 Doone Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rooforia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bankssawyer@rooforia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Foxworth&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;581&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">581</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16525</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fuller&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcintyre&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;169 Bergen Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Applideck&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;fullermcintyre@applideck.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kenvil&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;586&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">586</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13644</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Love&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Velasquez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;290 Girard Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zomboid&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lovevelasquez@zomboid.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Villarreal&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;593&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">593</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41230</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Muriel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vazquez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;395 Montgomery Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sustenza&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;murielvazquez@sustenza.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Strykersville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;598&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">598</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33251</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morgan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coleman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;324 McClancy Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aclima&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;morgancoleman@aclima.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bowden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;601&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">601</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20796</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vickie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Valentine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;432 Bassett Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comvene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;vickievalentine@comvene.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Teasdale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;606&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">606</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28770</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Michael&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bray&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;935 Lake Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Telepark&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;michaelbray@telepark.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lemoyne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;613&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">613</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39340</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eddie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mccarty&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;971 Richards Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bisba&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;eddiemccarty@bisba.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fruitdale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;618&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">618</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8976</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cheri&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;803 Ridgewood Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zorromop&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cheriford@zorromop.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gambrills&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;620&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">620</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">7224</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coleen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bartlett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;761 Carroll Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Idealis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;coleenbartlett@idealis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mathews&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;625&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">625</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46010</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cynthia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Johnston&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;142 Box Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zentry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cynthiajohnston@zentry.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Makena&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;632&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">632</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40470</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kay&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Warren&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;422 Alabama Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Realysis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kaywarren@realysis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Homestead&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;637&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">637</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3169</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kathy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carter&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;410 Jamison Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Limage&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kathycarter@limage.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ernstville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;644&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">644</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44021</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Etta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Miller&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;376 Lawton Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bluegrain&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ettamiller@bluegrain.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Baker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;649&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">649</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20275</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jeanine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Malone&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;114 Dodworth Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nixelt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jeaninemalone@nixelt.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Keyport&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;651&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">651</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18360</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Young&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reeves&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;581 Plaza Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Krog&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;youngreeves@krog.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sussex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;656&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">656</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21632</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Olson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hunt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;342 Jaffray Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Volax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;olsonhunt@volax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bangor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;663&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">663</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">2456</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rollins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Richards&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;129 Sullivan Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geostele&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rollinsrichards@geostele.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morgandale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;668&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">668</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45069</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Potter&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Michael&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;803 Glenmore Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ontality&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pottermichael@ontality.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Newkirk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;670&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">670</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10178</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ollie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Riley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;252 Jackson Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Adornica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ollieriley@adornica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brethren&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;675&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">675</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36102</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fisher&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shepard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;859 Varick Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Qot&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;fishershepard@qot.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Diaperville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;682&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">682</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14168</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Anne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;708 Anthony Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cytrek&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;annehale@cytrek.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Beechmont&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;687&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">687</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48630</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Caroline&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;626 Hillel Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Opticon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;carolinecox@opticon.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Loma&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;694&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">694</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33125</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Craig&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Palmer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;273 Montrose Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comvey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;craigpalmer@comvey.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cleary&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;699&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">699</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4156</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gallagher&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marshall&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;648 Clifford Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exiand&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gallaghermarshall@exiand.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Belfair&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;702&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">702</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46490</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Meadows&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Delgado&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;612 Jardine Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Daisu&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;meadowsdelgado@daisu.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Venice&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;707&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">707</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">30325</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sonya&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Trevino&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;181 Irving Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Atgen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sonyatrevino@atgen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Enetai&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;714&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">714</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16602</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Socorro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Murray&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;810 Manhattan Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isoswitch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;socorromurray@isoswitch.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jugtown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AZ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;719&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">719</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33107</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leanna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reed&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;528 Krier Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rodeology&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;leannareed@rodeology.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carrizo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;721&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">721</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32958</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mara&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dickson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;810 Harrison Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comtours&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;maradickson@comtours.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Thynedale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;726&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">726</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44737</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosemary&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Salazar&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;290 Croton Loop&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rockabye&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rosemarysalazar@rockabye.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Helen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;733&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">733</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15722</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lakeisha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mccarthy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;782 Turnbull Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exosis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lakeishamccarthy@exosis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Caberfae&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NM&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;738&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">738</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44936</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosalind&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hunter&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;644 Eaton Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zolarity&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rosalindhunter@zolarity.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cataract&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;740&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">740</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6143</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chambers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hahn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;937 Windsor Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Medalert&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;chambershahn@medalert.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dorneyville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;745&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">745</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4572</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jacobs&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sweeney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;189 Lott Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comtent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jacobssweeney@comtent.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Advance&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;752&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">752</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14039</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jerry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rush&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;632 Dank Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ebidco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jerryrush@ebidco.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geyserville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;757&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">757</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34628</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mccullough&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moore&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;304 Hastings Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nikuda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mcculloughmoore@nikuda.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Charco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;764&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">764</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3728</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Noemi&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gill&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;427 Chester Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Avit&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;noemigill@avit.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chesterfield&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;769&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">769</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15362</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Francis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Beck&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;454 Livingston Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Furnafix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;francisbeck@furnafix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dunnavant&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;771&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">771</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32784</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jocelyn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Boone&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;513 Division Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Collaire&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jocelynboone@collaire.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lisco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;776&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">776</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29177</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Duke&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Atkinson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;520 Doscher Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tripsch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dukeatkinson@tripsch.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lafferty&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;783&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">783</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11911</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Faith&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cooper&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;539 Rapelye Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Insuron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;faithcooper@insuron.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jennings&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;788&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">788</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12473</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marianne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aguilar&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;213 Holly Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marqet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;marianneaguilar@marqet.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alfarata&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;790&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">790</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29912</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ellis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sullivan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;877 Coyle Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Enersave&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ellissullivan@enersave.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Canby&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;795&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">795</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31450</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bruce&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Avila&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;865 Newkirk Placez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Plasmosis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bruceavila@plasmosis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ada&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;803&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">803</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49567</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marissa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Spears&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;963 Highland Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Centregy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;marissaspears@centregy.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bloomington&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;808&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">808</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11251</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nola&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quinn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;863 Wythe Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Iplax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;nolaquinn@iplax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cuylerville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;810&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">810</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10563</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alyssa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ortega&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;977 Clymer Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eventage&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;alyssaortega@eventage.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Convent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;815&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">815</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19336</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Guthrie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Morse&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;685 Vandalia Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gronk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;guthriemorse@gronk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fowlerville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;822&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">822</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13024</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hicks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Farrell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;468 Middleton Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zolarex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hicksfarrell@zolarex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Columbus&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;827&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">827</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">37536</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Naomi&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ball&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;319 Stewart Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isotronic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;naomiball@isotronic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Trona&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NM&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;834&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">834</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38049</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sybil&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carrillo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;359 Baughman Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Phuel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sybilcarrillo@phuel.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kohatk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;839&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">839</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38292</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Langley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Neal&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;565 Newton Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Liquidoc&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;langleyneal@liquidoc.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Osage&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;841&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">841</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28291</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dalton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Waters&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;859 Grand Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Malathion&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;daltonwaters@malathion.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tonopah&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AZ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;846&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">846</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35099</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maureen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Glass&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;140 Amherst Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stelaecor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;maureenglass@stelaecor.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cucumber&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;853&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">853</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38353</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Travis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Parks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;930 Bay Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pyramax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;travisparks@pyramax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gadsden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;858&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">858</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23194</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Small&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hatfield&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;593 Tennis Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Letpro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;smallhatfield@letpro.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Haena&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;860&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">860</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23613</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clark&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Boyd&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;501 Rock Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Deepends&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;clarkboyd@deepends.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Whitewater&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;865&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">865</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10574</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cook&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kelley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;865 Lincoln Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quizmo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cookkelley@quizmo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kansas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;872&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">872</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26314</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Greer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;717 Hewes Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Newcube&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;janegreer@newcube.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Delshire&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;877&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">877</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42879</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tracey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ruiz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;141 Tompkins Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Waab&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;traceyruiz@waab.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zeba&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NM&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;884&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">884</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29316</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reva&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;784 Greene Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Urbanshee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;revarosa@urbanshee.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bakersville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;889&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">889</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26464</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fischer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Klein&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;948 Juliana Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comtext&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;fischerklein@comtext.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jackpot&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;891&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">891</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34829</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jacobson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clemons&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;507 Wilson Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quilm&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jacobsonclemons@quilm.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Muir&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;896&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">896</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31947</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Buckley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Peterson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;217 Beayer Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Earwax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;buckleypeterson@earwax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Franklin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;904&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">904</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27707</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mendez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcneil&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;431 Halsey Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Macronaut&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mendezmcneil@macronaut.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Troy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;909&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">909</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18421</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stark&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lewis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;409 Tilden Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frosnex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;starklewis@frosnex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Axis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;911&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">911</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42655</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Annie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lyons&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;518 Woods Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Enerforce&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;annielyons@enerforce.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stagecoach&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;916&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">916</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47887</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jarvis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alexander&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;406 Bergen Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Equitax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jarvisalexander@equitax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Haring&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;923&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">923</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48466</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mueller&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mckee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;298 Ruby Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Luxuria&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;muellermckee@luxuria.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coleville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;928&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">928</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19611</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hester&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Copeland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;425 Cropsey Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dymi&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hestercopeland@dymi.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wolcott&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;930&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">930</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47257</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kinney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lawson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;501 Raleigh Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Neptide&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kinneylawson@neptide.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Deltaville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;935&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">935</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4959</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Flowers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Robles&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;201 Hull Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xelegyl&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;flowersrobles@xelegyl.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rehrersburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;942&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">942</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21299</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hamilton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clayton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;413 Debevoise Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Architax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hamiltonclayton@architax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Terlingua&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NM&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;947&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">947</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22039</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Virgie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Garza&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;903 Matthews Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Plasmox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;virgiegarza@plasmox.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Somerset&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;954&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">954</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49404</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jenna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Martin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;688 Hart Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zinca&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jennamartin@zinca.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oasis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;959&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">959</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34743</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shaffer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cervantes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;931 Varick Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oceanica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;shaffercervantes@oceanica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bowie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;961&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">961</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43219</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Betsy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hyde&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;183 Junius Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tubalum&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;betsyhyde@tubalum.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Driftwood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;966&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">966</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20619</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Susanne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rodriguez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;255 Knickerbocker Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comtrek&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;susannerodriguez@comtrek.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Trinway&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;973&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">973</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45756</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rice&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Farmer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;476 Nassau Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Photobin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ricefarmer@photobin.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Suitland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;978&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">978</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21459</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Melanie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rojas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;991 Java Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kage&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;melanierojas@kage.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Greenock&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;980&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">980</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42436</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cash&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Collier&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;999 Sapphire Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ceprene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cashcollier@ceprene.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Glidden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;985&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">985</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20083</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Martin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gardner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;644 Fairview Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Golistic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;martingardner@golistic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Connerton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;992&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">992</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11413</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kristie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kennedy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;750 Hudson Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ludak&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kristiekennedy@ludak.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Warsaw&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;997&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">997</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">25311</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Combs&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frederick&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;586 Lloyd Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pathways&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;combsfrederick@pathways.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Williamson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;3&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">3</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44947</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Levine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Burks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;328 Wilson Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Amtap&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;levineburks@amtap.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cochranville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;8&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">8</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48868</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Burns&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;699 Visitation Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Glasstep&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;janburns@glasstep.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wakulla&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AZ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;10&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">10</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46170</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dominique&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Park&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;100 Gatling Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Conjurica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dominiquepark@conjurica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Omar&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;15&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">15</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43456</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bobbie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sexton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;232 Sedgwick Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zytrex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bobbiesexton@zytrex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hendersonville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;22&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40283</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barrera&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Terrell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;292 Orange Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Steelfab&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;barreraterrell@steelfab.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bynum&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;27&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6176</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Meyers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Williamson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;675 Henderson Walk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Plexia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;meyerswilliamson@plexia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Richmond&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AZ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;34&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35379</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ellison&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kim&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;986 Revere Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Signity&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ellisonkim@signity.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sehili&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;39&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38688</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bowers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mendez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;665 Bennet Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Farmage&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bowersmendez@farmage.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Duryea&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;41&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">41</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36060</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hancock&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holden&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;625 Gaylord Drive&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Poochies&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hancockholden@poochies.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alamo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;46&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">46</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12351</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Karla&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bowman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;554 Chapel Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Undertap&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;karlabowman@undertap.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sylvanite&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;53&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">53</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28101</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kathryn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Payne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;467 Louis Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Katakana&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kathrynpayne@katakana.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harviell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;58&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">58</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31697</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marva&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cannon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;993 Highland Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comcubine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;marvacannon@comcubine.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Orviston&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;60&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">60</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45955</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maude&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Casey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;566 Strauss Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quilch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;maudecasey@quilch.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Enlow&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;65&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">65</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23282</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leonor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pruitt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;974 Terrace Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Velos&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;leonorpruitt@velos.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Devon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;72&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">72</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9732</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barlow&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rhodes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;891 Clinton Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zialactic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;barlowrhodes@zialactic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Echo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;77&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">77</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5724</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Byrd&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Conley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;698 Belmont Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zidox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;byrdconley@zidox.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rockbridge&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;84&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">84</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3001</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hutchinson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Newton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;553 Locust Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zaggles&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hutchinsonnewton@zaggles.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Snyderville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;89&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">89</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13263</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcdowell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bradley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;960 Howard Alley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grok&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mcdowellbradley@grok.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Toftrees&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;91&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">91</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29799</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vonda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Galloway&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;988 Voorhies Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Illumity&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;vondagalloway@illumity.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Holcombe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;96&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">96</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15933</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shirley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Edwards&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;817 Caton Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Equitox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;shirleyedwards@equitox.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nelson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;104&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">104</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32619</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Casey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roth&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;963 Railroad Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hotcakes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;caseyroth@hotcakes.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Davenport&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;109&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">109</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">25812</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gretchen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dawson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;610 Bethel Loop&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tetak&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gretchendawson@tetak.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hailesboro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;111&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">111</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1481</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Traci&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Allison&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;922 Bryant Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Enjola&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;traciallison@enjola.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Robinette&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;116&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">116</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21335</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hobbs&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wright&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;965 Temple Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Netbook&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hobbswright@netbook.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Strong&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;123&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">123</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3079</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cleo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Beach&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;653 Haring Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Proxsoft&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cleobeach@proxsoft.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Greensburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;128&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">128</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3556</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mack&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bullock&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;462 Ingraham Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Terascape&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mackbullock@terascape.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eureka&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;130&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">130</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24171</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roxie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cantu&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;841 Catherine Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Skybold&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;roxiecantu@skybold.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Deputy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;135&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">135</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24885</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stevenson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Crosby&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;473 Boardwalk &quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Accel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;stevensoncrosby@accel.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Norris&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;142&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">142</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4544</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vang&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hughes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;357 Landis Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bolax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;vanghughes@bolax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Emerald&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;147&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">147</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35921</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Charmaine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Whitney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;484 Seton Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comveyer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;charmainewhitney@comveyer.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dexter&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;154&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">154</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40945</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Burns&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Solis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;274 Lorraine Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rodemco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;burnssolis@rodemco.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ballico&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;159&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">159</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1696</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alvarez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mack&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;897 Manor Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Snorus&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;alvarezmack@snorus.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosedale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;161&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">161</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4659</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Doreen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Randall&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;178 Court Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Calcula&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;doreenrandall@calcula.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Belmont&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;166&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">166</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33847</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rutledge&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rivas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;352 Verona Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Virxo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rutledgerivas@virxo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brandermill&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;173&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">173</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5989</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Whitley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blevins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;127 Brooklyn Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pawnagra&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;whitleyblevins@pawnagra.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rodanthe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;178&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">178</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36735</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clements&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Finley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;270 Story Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Imaginart&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;clementsfinley@imaginart.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lookingglass&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;180&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">180</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34236</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ursula&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Goodman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;414 Clinton Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Earthmark&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ursulagoodman@earthmark.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rote&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;185&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">185</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43532</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Laurel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cline&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;788 Fenimore Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Prismatic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;laurelcline@prismatic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frank&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;192&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">192</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23508</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ramsey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carr&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;209 Williamsburg Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Strezzo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ramseycarr@strezzo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Grapeview&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NM&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;197&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">197</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">17246</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sweet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sanders&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;712 Homecrest Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isosure&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sweetsanders@isosure.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sheatown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;200&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">200</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26210</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Teri&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hester&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;653 Abbey Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Electonic&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;terihester@electonic.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Martell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;205&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">205</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">45493</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Johnson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chang&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;331 John Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gleamink&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;johnsonchang@gleamink.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sultana&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;212&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">212</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10299</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marisol&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fischer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;362 Prince Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Autograte&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;marisolfischer@autograte.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;217&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">217</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33730</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sally&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mccoy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;854 Corbin Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Omnigog&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sallymccoy@omnigog.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Escondida&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;224&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">224</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42708</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Billie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nixon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;241 Kaufman Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xanide&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;billienixon@xanide.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chapin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;229&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">229</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">2740</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jana&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hensley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;176 Erasmus Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isotrack&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;janahensley@isotrack.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Caledonia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;231&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">231</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46180</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Essie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Clarke&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;308 Harbor Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pharmacon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;essieclarke@pharmacon.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fillmore&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;236&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">236</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41200</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Suzanne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bird&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;219 Luquer Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Imant&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;suzannebird@imant.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bainbridge&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;243&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">243</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29902</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Evangelina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Perez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;787 Joval Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Keengen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;evangelinaperez@keengen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mulberry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;248&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">248</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49989</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;West&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;England&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;717 Hendrickson Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Obliq&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;westengland@obliq.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maury&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;250&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">250</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27893</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Earlene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ellis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;512 Bay Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Codact&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;earleneellis@codact.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sunwest&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;255&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">255</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49339</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Iva&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rivers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;470 Rost Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mantrix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ivarivers@mantrix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Disautel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;262&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">262</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">30289</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tameka&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Levine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;815 Atlantic Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Acium&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tamekalevine@acium.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Winchester&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;267&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">267</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42753</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Weeks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Castillo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;526 Holt Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Talendula&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;weekscastillo@talendula.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Washington&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;274&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">274</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12104</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frieda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;House&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;171 Banker Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quonk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;friedahouse@quonk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aberdeen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;279&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">279</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15904</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chapman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hart&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;902 Bliss Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kongene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;chapmanhart@kongene.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bradenville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;281&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">281</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39830</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bean&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aguirre&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;133 Pilling Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Amril&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;beanaguirre@amril.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Waterview&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;286&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">286</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39063</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosetta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Turner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;169 Jefferson Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Spacewax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rosettaturner@spacewax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stewart&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;293&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">293</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29867</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cruz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carver&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;465 Boerum Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vitricomp&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cruzcarver@vitricomp.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Crayne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;298&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">298</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34334</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bullock&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marsh&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;589 Virginia Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Renovize&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bullockmarsh@renovize.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coinjock&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;301&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">301</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16782</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Minerva&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Graham&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;532 Harrison Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sureplex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;minervagraham@sureplex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Belleview&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;GA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;306&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">306</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">2171</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hensley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hardin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;196 Maujer Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Neocent&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hensleyhardin@neocent.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reinerton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;313&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">313</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34108</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alston&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Henderson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;132 Prescott Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Prosure&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;alstonhenderson@prosure.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Worton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;318&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">318</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8512</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nichole&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pearson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;656 Lacon Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Yurture&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;nicholepearson@yurture.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Juarez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;320&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">320</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34521</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Patti&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brennan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;870 Degraw Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cognicode&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pattibrennan@cognicode.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Torboy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;325&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">325</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1956</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Magdalena&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Simmons&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;681 Townsend Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geekosis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;magdalenasimmons@geekosis.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sterling&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;332&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">332</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">37770</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shepherd&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Davenport&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;586 Montague Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ecraze&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;shepherddavenport@ecraze.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Accoville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NM&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;337&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">337</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43432</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Monroe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stafford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;183 Seigel Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Centuria&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;monroestafford@centuria.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Camino&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;344&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">344</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42654</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sasha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Baxter&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;700 Bedford Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Callflex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sashabaxter@callflex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Campo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;349&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">349</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24180</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Allison&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fitzpatrick&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;913 Arlington Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Veraq&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;allisonfitzpatrick@veraq.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marbury&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;351&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">351</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47089</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hendrix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stephens&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;181 Beaver Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Recrisys&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hendrixstephens@recrisys.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Denio&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;356&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">356</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34540</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lourdes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Valdez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;700 Anchorage Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Interloo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lourdesvaldez@interloo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Goldfield&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;363&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">363</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34007</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Peggy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bright&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;613 Engert Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Inventure&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;peggybright@inventure.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chautauqua&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;368&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">368</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23535</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hooper&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tyson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;892 Taaffe Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zaggle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hoopertyson@zaggle.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nutrioso&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;370&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">370</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28499</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oneill&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;773 Adelphi Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bedder&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;oneillcarney@bedder.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Yorklyn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;375&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">375</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23860</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Phoebe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Patton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;564 Hale Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xoggle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;phoebepatton@xoggle.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brule&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NM&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;382&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">382</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42061</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Finley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Singleton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;407 Clay Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quarex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;finleysingleton@quarex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bedias&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;387&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">387</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35916</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;April&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hill&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;818 Bayard Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kengen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;aprilhill@kengen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chloride&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;394&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">394</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6121</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lorrie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nunez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;221 Ralph Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bullzone&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lorrienunez@bullzone.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Longoria&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;399&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">399</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32587</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carmela&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Franks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;617 Dewey Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zensure&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;carmelafranks@zensure.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sanders&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;402&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">402</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1282</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pacheco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosales&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;538 Pershing Loop&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Circum&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pachecorosales@circum.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elbert&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;407&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">407</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36417</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gilda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jacobson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;883 Loring Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comveyor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gildajacobson@comveyor.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Topaz&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;414&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">414</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">17506</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Conway&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Daugherty&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;643 Kermit Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lyria&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;conwaydaugherty@lyria.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vaughn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;419&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">419</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">34847</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Helen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Montoya&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;736 Kingsland Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hairport&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;helenmontoya@hairport.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Edinburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NE&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;421&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">421</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46868</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tamika&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mccall&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;764 Bragg Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eventix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tamikamccall@eventix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tivoli&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;426&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">426</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4499</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Julie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Parsons&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;768 Keap Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Goko&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;julieparsons@goko.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coldiron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;433&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">433</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19266</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wilkinson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Flowers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;154 Douglass Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xsports&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wilkinsonflowers@xsports.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coultervillle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;438&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">438</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16367</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Walter&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Velez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;931 Farragut Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Virva&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;waltervelez@virva.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tyro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;440&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">440</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41590</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ray&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wiley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;102 Barwell Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Polaria&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;raywiley@polaria.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hardyville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;445&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">445</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41178</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rodriguez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Macias&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;164 Boerum Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xylar&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rodriguezmacias@xylar.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Riner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;452&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">452</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3589</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blackwell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Delaney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;443 Sackett Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Imkan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;blackwelldelaney@imkan.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gasquet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;457&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">457</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14057</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bush&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gordon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;975 Dakota Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Softmicro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bushgordon@softmicro.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chemung&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;PA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;464&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">464</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20504</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cobb&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Humphrey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;823 Sunnyside Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Apexia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cobbhumphrey@apexia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wintersburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;469&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">469</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26509</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marci&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shepherd&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;565 Hall Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shadease&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;marcishepherd@shadease.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Springhill&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;471&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">471</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">7629</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Juana&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Silva&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;249 Amity Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Artworlds&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;juanasilva@artworlds.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Norfolk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;476&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">476</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33386</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Silva&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;183 Eldert Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Medifax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;silvamarks@medifax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hachita&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;483&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">483</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6344</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kelley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harper&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;758 Preston Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xyqag&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kelleyharper@xyqag.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Healy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;488&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">488</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">6289</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wilma&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hopkins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;428 Lee Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Entality&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;wilmahopkins@entality.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Englevale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;490&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">490</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1447</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Strong&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hendrix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;134 Beach Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Duoflex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;stronghendrix@duoflex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Allentown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;495&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">495</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13478</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Abigail&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nichols&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;887 President Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Enquility&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;abigailnichols@enquility.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bagtown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NM&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;503&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">503</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42649</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leta&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stout&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;518 Bowery Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pivitol&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;letastout@pivitol.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Boonville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;508&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">508</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41300</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lawrence&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mathews&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;987 Rose Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Deviltoe&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lawrencemathews@deviltoe.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Woodburn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;510&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">510</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48504</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Petty&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sykes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;566 Village Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nebulean&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pettysykes@nebulean.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wedgewood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;515&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">515</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18531</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lott&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Keller&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;827 Miami Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Translink&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lottkeller@translink.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gila&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;522&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">522</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19879</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Faulkner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Garrett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;396 Grove Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pigzart&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;faulknergarrett@pigzart.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Felt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;527&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">527</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">2028</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carver&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Peters&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;816 Victor Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Housedown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;carverpeters@housedown.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Nadine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;534&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">534</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20470</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cristina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Russo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;500 Highlawn Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cyclonica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cristinarusso@cyclonica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gorst&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;539&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">539</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24560</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tami&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maddox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;741 Pineapple Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Accidency&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tamimaddox@accidency.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kennedyville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;541&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">541</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42915</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Logan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Burke&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;904 Clarendon Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Overplex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;loganburke@overplex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Johnsonburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;546&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">546</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43242</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bernice&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sims&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;382 Columbia Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Verbus&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bernicesims@verbus.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sena&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;553&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">553</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28390</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aimee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cohen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;396 Lafayette Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eplode&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;aimeecohen@eplode.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Thatcher&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;558&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">558</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8922</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Horne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Valenzuela&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;979 Kensington Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isoternia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hornevalenzuela@isoternia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Greenbush&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;560&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">560</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24514</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Felecia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Oneill&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;995 Autumn Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mediot&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;feleciaoneill@mediot.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Joppa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;565&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">565</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">15197</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Taylor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ingram&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;113 Will Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lyrichord&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tayloringram@lyrichord.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Collins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;572&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">572</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49355</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Therese&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Espinoza&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;994 Chester Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gonkle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;thereseespinoza@gonkle.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hayes&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;577&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">577</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21398</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gilbert&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Serrano&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;294 Troutman Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Senmao&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gilbertserrano@senmao.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Greer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;584&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">584</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">5346</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pearson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bryant&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;971 Heyward Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Anacho&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pearsonbryant@anacho.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bluffview&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;589&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">589</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">33260</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ericka&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cote&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;425 Bath Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Venoflex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;erickacote@venoflex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;591&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">591</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48997</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rivers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Macdonald&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;919 Johnson Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ziore&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;riversmacdonald@ziore.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Townsend&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;596&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">596</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4063</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Letitia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Walker&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;963 Vanderveer Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zizzle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;letitiawalker@zizzle.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rossmore&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;604&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">604</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10675</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isabel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gilliam&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;854 Broadway &quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zenthall&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;isabelgilliam@zenthall.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ventress&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;609&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">609</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28586</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Montgomery&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Washington&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;169 Schroeders Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kongle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;montgomerywashington@kongle.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Croom&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AZ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;611&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">611</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">17528</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Katherine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Prince&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;705 Elm Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zillacon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;katherineprince@zillacon.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rew&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;616&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">616</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">25276</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jessie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mayer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;683 Chester Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Emtrak&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jessiemayer@emtrak.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Marysville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;HI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;623&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">623</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">20514</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rose&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Combs&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;312 Grimes Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aquamate&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rosecombs@aquamate.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fostoria&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;628&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">628</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">42736</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Buckner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;863 Rugby Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jamnation&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bucknerchen@jamnation.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Camas&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;630&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">630</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">46060</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leanne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jones&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;451 Bayview Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wazzu&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;leannejones@wazzu.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kylertown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;635&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">635</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44705</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Norman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gilmore&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;330 Gates Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comfirm&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;normangilmore@comfirm.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Riceville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;642&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">642</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32852</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reyna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harris&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;305 Powell Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bedlam&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;reynaharris@bedlam.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Florence&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;647&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">647</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10147</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Annabelle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Velazquez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;299 Kensington Walk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sealoud&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;annabellevelazquez@sealoud.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Soudan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;654&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">654</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38695</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Armstrong&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Frazier&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;899 Seeley Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zensor&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;armstrongfrazier@zensor.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cherokee&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;659&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">659</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29648</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dorsey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sosa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;270 Aberdeen Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Daycore&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;dorseysosa@daycore.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chamberino&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;661&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">661</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3679</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Joanne&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Spencer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;910 Montauk Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Visalia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;joannespencer@visalia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Valmy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NH&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;666&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">666</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13880</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcguire&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lloyd&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;658 Just Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Centrexin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mcguirelloyd@centrexin.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Warren&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;673&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">673</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11303</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcdaniel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Harrell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;565 Montgomery Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eyeris&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mcdanielharrell@eyeris.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Garnet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;678&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">678</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43663</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ruby&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shaffer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">28</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;350 Clark Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comtrail&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rubyshaffer@comtrail.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Aurora&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;680&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">680</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31561</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Melton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Camacho&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;771 Montana Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Insuresys&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;meltoncamacho@insuresys.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sparkill&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;685&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">685</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22249</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Yesenia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rowland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;193 Dekalb Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coriander&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;yeseniarowland@coriander.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lupton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;692&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">692</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10435</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Haney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barlow&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;267 Lenox Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Egypto&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;haneybarlow@egypto.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Detroit&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;697&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">697</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">48745</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mallory&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Emerson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;318 Dunne Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exoplode&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;malloryemerson@exoplode.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Montura&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;700&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">700</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19164</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Patel&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Durham&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;440 King Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Icology&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pateldurham@icology.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mammoth&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;705&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">705</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28415</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Krystal&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cross&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;604 Drew Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tubesys&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;krystalcross@tubesys.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dalton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;712&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">712</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12459</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Butler&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alston&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;486 Hemlock Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quordate&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;butleralston@quordate.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Verdi&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;717&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">717</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29270</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Erickson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcdonald&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;873 Franklin Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exotechno&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ericksonmcdonald@exotechno.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jessie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;724&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">724</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12548</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hopper&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Peck&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;849 Hendrickson Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Uxmox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hopperpeck@uxmox.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Faxon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;UT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;729&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">729</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">41812</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Katy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rivera&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;791 Olive Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blurrybus&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;katyrivera@blurrybus.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Innsbrook&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;731&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">731</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">4994</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lorene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Weiss&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;990 Ocean Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Comvoy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;loreneweiss@comvoy.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lavalette&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;736&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">736</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">28677</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rogers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcmahon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;423 Cameron Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brainclip&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;rogersmcmahon@brainclip.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Saddlebrooke&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;FL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;743&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">743</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14077</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Susana&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Moody&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;842 Fountain Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bitrex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;susanamoody@bitrex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Temperanceville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;748&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">748</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">38060</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Branch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;926 Cypress Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Buzzness&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;fordbranch@buzzness.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Beason&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;DC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;750&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">750</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40481</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cherie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brooks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;601 Woodhull Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kaggle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;cheriebrooks@kaggle.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Groton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;755&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">755</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43878</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bartlett&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Conway&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;453 Times Placez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Konnect&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;bartlettconway@konnect.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Belva&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;762&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">762</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10291</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Amanda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Head&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;990 Ocean Parkway&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zentury&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;amandahead@zentury.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hegins&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;767&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">767</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26220</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Anthony&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sutton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;179 Fayette Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Xiix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;anthonysutton@xiix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Iberia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;774&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">774</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">35287</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lynnette&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alvarez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;991 Brightwater Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gink&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lynnettealvarez@gink.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leola&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;779&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">779</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">40983</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maggie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;104 Harbor Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bulljuice&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;maggiepace@bulljuice.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Floris&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;781&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">781</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">29961</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sanford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mullen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;879 Dover Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zanity&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sanfordmullen@zanity.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Martinez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;786&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">786</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3024</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rene&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vang&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;506 Randolph Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Isopop&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;renevang@isopop.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vienna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;793&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">793</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16911</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Compton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;186 Veronica Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zyple&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;alfordcompton@zyple.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sugartown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;798&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">798</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">3165</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Catherine&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ward&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;325 Burnett Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dreamia&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;catherineward@dreamia.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Glenbrook&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;801&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">801</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14954</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Molly&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Maldonado&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">37</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;518 Maple Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Straloy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mollymaldonado@straloy.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hebron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;806&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">806</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">36492</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Riddle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;984 Lois Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Terrago&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;carsonriddle@terrago.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Leland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;813&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">813</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">30833</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ebony&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bishop&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">20</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;487 Ridge Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Optique&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ebonybishop@optique.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fairmount&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;818&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">818</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">24433</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Espinoza&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Petersen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;641 Glenwood Road&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Futurity&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;espinozapetersen@futurity.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Floriston&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;820&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">820</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1011</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shepard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ramsey&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;806 Village Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mantro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;shepardramsey@mantro.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tibbie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;825&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">825</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49000</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Terra&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Witt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;590 Conway Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Insectus&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;terrawitt@insectus.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Forbestown&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AR&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;832&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">832</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">8582</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Laura&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gibbs&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;511 Osborn Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Corepan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lauragibbs@corepan.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Worcester&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;KS&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;837&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">837</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">14485</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Amy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Villarreal&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;381 Stillwell Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fleetmix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;amyvillarreal@fleetmix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sanford&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;844&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">844</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26840</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jill&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;David&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;346 Legion Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zytrax&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;jilldavid@zytrax.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Saticoy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;SC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;849&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">849</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">16200</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Chapman&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;931 Dekoven Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Darwinium&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;barrychapman@darwinium.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Whitestone&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;851&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">851</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22026</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Henderson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Price&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;530 Hausman Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Plutorque&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hendersonprice@plutorque.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brutus&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;RI&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;856&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">856</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27583</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Alissa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Knox&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;258 Empire Boulevard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geologix&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;alissaknox@geologix.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hartsville/Hartley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;863&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">863</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23165</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Melendez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fernandez&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;661 Johnson Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Vixo&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;melendezfernandez@vixo.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Farmers&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;868&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">868</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">27624</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Polly&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">22</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;129 Frank Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geofarm&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;pollybarron@geofarm.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Loyalhanna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ND&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;870&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">870</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">43882</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Goff&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Phelps&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;164 Montague Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Digigen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;goffphelps@digigen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Weedville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;875&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">875</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">19655</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mercer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pratt&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;608 Perry Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Twiggery&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mercerpratt@twiggery.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eggertsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;882&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">882</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">10895</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mari&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Landry&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">39</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;963 Gerald Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kenegy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;marilandry@kenegy.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lithium&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NC&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;887&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">887</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31772</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eunice&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Watts&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;707 Stuyvesant Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Memora&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;eunicewatts@memora.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Westwood&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;894&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">894</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">1031</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tyler&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Fitzgerald&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;787 Meserole Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jetsilk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tylerfitzgerald@jetsilk.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Woodlands&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;899&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">899</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">32953</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Carney&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Callahan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;724 Kimball Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mangelica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;carneycallahan@mangelica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tecolotito&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;902&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">902</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">13345</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hallie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Jarvis&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">23</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;237 Duryea Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Anixang&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;halliejarvis@anixang.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Boykin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;IN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;907&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">907</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">12961</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Ingram&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;William&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">36</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;826 Overbaugh Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Genmex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;ingramwilliam@genmex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kimmell&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;914&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">914</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">7120</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Esther&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Bean&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;583 Macon Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Applica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;estherbean@applica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Homeworth&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MN&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;919&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">919</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">39655</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Shauna&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hanson&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">27</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;557 Hart Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exospace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;shaunahanson@exospace.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Outlook&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;LA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;921&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">921</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49119</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Barbara&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wade&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;687 Hoyts Lane&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roughies&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;barbarawade@roughies.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sattley&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;CO&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;926&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">926</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">49433</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Welch&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mcgowan&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;833 Quincy Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Atomica&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;welchmcgowan@atomica.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hampstead&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;933&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">933</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">18071</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tabitha&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Cole&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">21</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;916 Rogers Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eclipto&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;tabithacole@eclipto.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lawrence&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;TX&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;938&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">938</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">9597</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Sharron&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Santos&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">40</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;215 Matthews Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Zenco&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;sharronsantos@zenco.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Wattsville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VT&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;940&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">940</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23285</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Melinda&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mendoza&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">38</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;806 Kossuth Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kneedles&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;melindamendoza@kneedles.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Coaldale&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;OK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;945&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">945</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">23085</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hansen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Hebert&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;287 Conduit Boulevard&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Capscreen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;hansenhebert@capscreen.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Taycheedah&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AK&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;952&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">952</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21430</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Angelique&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Weeks&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">33</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;659 Reeve Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Exodoc&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;angeliqueweeks@exodoc.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Turpin&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MD&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;957&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">957</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">11373</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Michael&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Giles&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">31</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;668 Court Square&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Yogasm&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;michaelgiles@yogasm.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Rosburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;WV&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;964&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">964</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">26154</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Elena&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Waller&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;618 Crystal Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Insurety&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;elenawaller@insurety.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gallina&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NY&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;969&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">969</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22214</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Briggs&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lynn&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">30</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;952 Lester Court&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Quinex&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;briggslynn@quinex.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Roland&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;971&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">971</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">22772</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Gabrielle&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Reilly&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">32</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;964 Tudor Terrace&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Blanet&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;gabriellereilly@blanet.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Falmouth&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;AL&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;976&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">976</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">31707</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mullen&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Tanner&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">26</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;711 Whitney Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pulze&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mullentanner@pulze.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mooresburg&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;MA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;983&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">983</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">47205</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mattie&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eaton&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">24</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;418 Allen Avenue&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Trasola&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;mattieeaton@trasola.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Dupuyer&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;NJ&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;988&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">988</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">17803</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Lucy&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Castro&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">34</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;F&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;425 Fleet Walk&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Geekfarm&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;lucycastro@geekfarm.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Mulino&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;VA&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;990&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">990</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">44456</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Kelly&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Steele&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">35</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;809 Hoyt Street&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Eschoir&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;kellysteele@eschoir.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Stewartville&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ID&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;_id&quot;</span><span class="punctuation">:</span><span class="string">&quot;995&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#123;</span><span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span><span class="number">995</span><span class="punctuation">,</span><span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="number">21153</span><span class="punctuation">,</span><span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Phelps&quot;</span><span class="punctuation">,</span><span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span><span class="string">&quot;Parrish&quot;</span><span class="punctuation">,</span><span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="number">25</span><span class="punctuation">,</span><span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span><span class="string">&quot;M&quot;</span><span class="punctuation">,</span><span class="attr">&quot;address&quot;</span><span class="punctuation">:</span><span class="string">&quot;666 Miller Place&quot;</span><span class="punctuation">,</span><span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span><span class="string">&quot;Pearlessa&quot;</span><span class="punctuation">,</span><span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="string">&quot;phelpsparrish@pearlessa.com&quot;</span><span class="punctuation">,</span><span class="attr">&quot;city&quot;</span><span class="punctuation">:</span><span class="string">&quot;Brecon&quot;</span><span class="punctuation">,</span><span class="attr">&quot;state&quot;</span><span class="punctuation">:</span><span class="string">&quot;ME&quot;</span><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230701155812781.png" alt="image-20230701155812781"></p>
<h1 id="四-进阶检索"><a href="#四-进阶检索" class="headerlink" title="四.进阶检索"></a>四.进阶检索</h1><h2 id="1-SearchAPI"><a href="#1-SearchAPI" class="headerlink" title="1.SearchAPI"></a>1.SearchAPI</h2><p>ES支持两种基本的方式检索:</p>
<ul>
<li>一个是通过使用REST request URI 发送搜索参数(uri+检索参数)</li>
<li>另一个是通过使用 REST request body来发送它们(uri+请求体)</li>
</ul>
<h3 id="1-1-检索信息"><a href="#1-1-检索信息" class="headerlink" title="1.1 检索信息"></a>1.1 检索信息</h3><p><strong>一切检索从_search开始</strong></p>
<h4 id="1-1-1-使用uri-检索参数的方式进行检索"><a href="#1-1-1-使用uri-检索参数的方式进行检索" class="headerlink" title="1.1.1 使用uri+检索参数的方式进行检索"></a>1.1.1 使用uri+检索参数的方式进行检索</h4><figure class="highlight json"><table><tr><td class="code"><pre><span class="line">GET bank/_search <span class="comment">//检索bank下所有信息,包含type和docs</span></span><br><span class="line">GET bank/_search?q=*&amp;sort=account_number<span class="punctuation">:</span>asc <span class="comment">//请求参数方式检索</span></span><br><span class="line"><span class="comment">//q=*表示查询所有</span></span><br><span class="line"><span class="comment">//sort=account_number:asc 按照account_number进行升序排序</span></span><br><span class="line"><span class="comment">//相应的结果解析</span></span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;took&quot;</span><span class="punctuation">:</span><span class="number">29</span><span class="punctuation">,</span><span class="comment">//执行搜索的时间</span></span><br><span class="line"> <span class="attr">&quot;time_out&quot;</span><span class="punctuation">:</span><span class="literal"><span class="keyword">false</span></span><span class="punctuation">,</span> <span class="comment">//搜索是否超时</span></span><br><span class="line"> <span class="attr">&quot;_shards&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span>.....<span class="punctuation">&#125;</span><span class="punctuation">,</span><span class="comment">//有多少个分片被搜索了,以及统计成功/失败的搜索分片</span></span><br><span class="line"> <span class="attr">&quot;hits&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span>.......<span class="punctuation">&#125;</span><span class="comment">//搜索的结果</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230701162247192.png" alt="image-20230701162247192"></p>
<p>完整的响应结果</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;took&quot;</span> <span class="punctuation">:</span> <span class="number">29</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;timed_out&quot;</span> <span class="punctuation">:</span> <span class="literal"><span class="keyword">false</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_shards&quot;</span> <span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;total&quot;</span> <span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;successful&quot;</span> <span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skipped&quot;</span> <span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;failed&quot;</span> <span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;hits&quot;</span> <span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;total&quot;</span> <span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;value&quot;</span> <span class="punctuation">:</span> <span class="number">1000</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;relation&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;eq&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;max_score&quot;</span> <span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;hits&quot;</span> <span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;_index&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;bank&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_type&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;account&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_id&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;0&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_score&quot;</span> <span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_source&quot;</span> <span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;account_number&quot;</span> <span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;balance&quot;</span> <span class="punctuation">:</span> <span class="number">16623</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;firstname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Bradshaw&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;lastname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Mckenzie&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span> <span class="punctuation">:</span> <span class="number">29</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;gender&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;F&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;244 Columbus Place&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;employer&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Euron&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;email&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;bradshawmckenzie@euron.com&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;city&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Hobucken&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;state&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;CO&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span> <span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;_index&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;bank&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_type&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;account&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_id&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;1&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_score&quot;</span> <span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_source&quot;</span> <span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;account_number&quot;</span> <span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;balance&quot;</span> <span class="punctuation">:</span> <span class="number">39225</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;firstname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Amber&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;lastname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Duke&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span> <span class="punctuation">:</span> <span class="number">32</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;gender&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;M&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;880 Holmes Lane&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;employer&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Pyrami&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;email&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;amberduke@pyrami.com&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;city&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Brogan&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;state&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;IL&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span> <span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="number">1</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;_index&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;bank&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_type&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;account&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_id&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;2&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_score&quot;</span> <span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_source&quot;</span> <span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;account_number&quot;</span> <span class="punctuation">:</span> <span class="number">2</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;balance&quot;</span> <span class="punctuation">:</span> <span class="number">28838</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;firstname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Roberta&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;lastname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Bender&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span> <span class="punctuation">:</span> <span class="number">22</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;gender&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;F&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;560 Kingsway Place&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;employer&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Chillium&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;email&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;robertabender@chillium.com&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;city&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Bennett&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;state&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;LA&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span> <span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="number">2</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;_index&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;bank&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_type&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;account&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_id&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;3&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_score&quot;</span> <span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_source&quot;</span> <span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;account_number&quot;</span> <span class="punctuation">:</span> <span class="number">3</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;balance&quot;</span> <span class="punctuation">:</span> <span class="number">44947</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;firstname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Levine&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;lastname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Burks&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span> <span class="punctuation">:</span> <span class="number">26</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;gender&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;F&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;328 Wilson Avenue&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;employer&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Amtap&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;email&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;levineburks@amtap.com&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;city&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Cochranville&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;state&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;HI&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span> <span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="number">3</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;_index&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;bank&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_type&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;account&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_id&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;4&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_score&quot;</span> <span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_source&quot;</span> <span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;account_number&quot;</span> <span class="punctuation">:</span> <span class="number">4</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;balance&quot;</span> <span class="punctuation">:</span> <span class="number">27658</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;firstname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Rodriquez&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;lastname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Flores&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span> <span class="punctuation">:</span> <span class="number">31</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;gender&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;F&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;986 Wyckoff Avenue&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;employer&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Tourmania&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;email&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;rodriquezflores@tourmania.com&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;city&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Eastvale&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;state&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;HI&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span> <span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="number">4</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;_index&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;bank&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_type&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;account&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_id&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;5&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_score&quot;</span> <span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_source&quot;</span> <span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;account_number&quot;</span> <span class="punctuation">:</span> <span class="number">5</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;balance&quot;</span> <span class="punctuation">:</span> <span class="number">29342</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;firstname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Leola&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;lastname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Stewart&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span> <span class="punctuation">:</span> <span class="number">30</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;gender&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;F&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;311 Elm Place&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;employer&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Diginetic&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;email&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;leolastewart@diginetic.com&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;city&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Fairview&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;state&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;NJ&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span> <span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="number">5</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;_index&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;bank&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_type&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;account&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_id&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;6&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_score&quot;</span> <span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_source&quot;</span> <span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;account_number&quot;</span> <span class="punctuation">:</span> <span class="number">6</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;balance&quot;</span> <span class="punctuation">:</span> <span class="number">5686</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;firstname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Hattie&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;lastname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Bond&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span> <span class="punctuation">:</span> <span class="number">36</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;gender&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;M&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;671 Bristol Street&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;employer&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Netagy&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;email&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;hattiebond@netagy.com&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;city&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Dante&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;state&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;TN&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span> <span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="number">6</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;_index&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;bank&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_type&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;account&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_id&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;7&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_score&quot;</span> <span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_source&quot;</span> <span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;account_number&quot;</span> <span class="punctuation">:</span> <span class="number">7</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;balance&quot;</span> <span class="punctuation">:</span> <span class="number">39121</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;firstname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Levy&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;lastname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Richard&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span> <span class="punctuation">:</span> <span class="number">22</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;gender&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;M&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;820 Logan Street&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;employer&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Teraprene&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;email&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;levyrichard@teraprene.com&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;city&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Shrewsbury&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;state&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;MO&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span> <span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="number">7</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;_index&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;bank&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_type&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;account&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_id&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;8&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_score&quot;</span> <span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_source&quot;</span> <span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;account_number&quot;</span> <span class="punctuation">:</span> <span class="number">8</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;balance&quot;</span> <span class="punctuation">:</span> <span class="number">48868</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;firstname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Jan&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;lastname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Burns&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span> <span class="punctuation">:</span> <span class="number">35</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;gender&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;M&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;699 Visitation Place&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;employer&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Glasstep&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;email&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;janburns@glasstep.com&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;city&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Wakulla&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;state&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;AZ&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span> <span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="number">8</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;_index&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;bank&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_type&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;account&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_id&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;9&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_score&quot;</span> <span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;_source&quot;</span> <span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;account_number&quot;</span> <span class="punctuation">:</span> <span class="number">9</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;balance&quot;</span> <span class="punctuation">:</span> <span class="number">24776</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;firstname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Opal&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;lastname&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Meadows&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span> <span class="punctuation">:</span> <span class="number">39</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;gender&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;M&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;963 Neptune Avenue&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;employer&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Cedward&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;email&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;opalmeadows@cedward.com&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;city&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;Olney&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;state&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;OH&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span> <span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="number">9</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<h4 id="1-1-2-使用uri-请求体的方式进行检索"><a href="#1-1-2-使用uri-请求体的方式进行检索" class="headerlink" title="1.1.2 使用uri+请求体的方式进行检索"></a>1.1.2 使用uri+请求体的方式进行检索</h4><figure class="highlight json"><table><tr><td class="code"><pre><span class="line">GET /bank/_search </span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span> </span><br><span class="line"> <span class="attr">&quot;match_all&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span><span class="punctuation">&#125;</span> <span class="comment">//查询所有(匹配条件)</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="comment">//排序规则</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span> <span class="string">&quot;asc&quot;</span><span class="comment">//根据account_number升序</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span> </span><br><span class="line"> <span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span><span class="string">&quot;desc&quot;</span> <span class="comment">//根据balance降序</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230701163210869.png" alt="image-20230701163210869"></p>
<h2 id="2-Query-DSL"><a href="#2-Query-DSL" class="headerlink" title="2.Query DSL"></a>2.Query DSL</h2><h3 id="2-1-基本的语法"><a href="#2-1-基本的语法" class="headerlink" title="2.1 基本的语法"></a>2.1 基本的语法</h3><figure class="highlight json"><table><tr><td class="code"><pre><span class="line">GET /bank/_search</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span> <span class="comment">//查询操作</span></span><br><span class="line"> <span class="attr">&quot;match_all&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span><span class="punctuation">&#125;</span> <span class="comment">//查询的条件 </span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span> <span class="comment">//排序的条件(数组,可以指定多个排序规则)</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span> <span class="comment">//排序的字段</span></span><br><span class="line"> <span class="attr">&quot;order&quot;</span><span class="punctuation">:</span> <span class="string">&quot;desc&quot;</span> <span class="comment">//排序的规则(升序或者降序)</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;from&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span><span class="comment">//分页字段,从第几页开始</span></span><br><span class="line"> <span class="attr">&quot;size&quot;</span><span class="punctuation">:</span> <span class="number">5</span><span class="punctuation">,</span><span class="comment">//每页的记录数</span></span><br><span class="line"> <span class="attr">&quot;_source&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="string">&quot;balance&quot;</span><span class="punctuation">,</span><span class="string">&quot;firstname&quot;</span><span class="punctuation">]</span> <span class="comment">//返回指定的字段</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-2-match查询-匹配查询"><a href="#2-2-match查询-匹配查询" class="headerlink" title="2.2 match查询[匹配查询]"></a>2.2 match查询[匹配查询]</h3><p><strong>根据某个字段的值进行匹配查询</strong></p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="comment">//查询account_number是20的数据</span></span><br><span class="line">GET /bank/_search</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;match&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span> <span class="comment">//查询account_number是20的数据</span></span><br><span class="line"> <span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span> <span class="string">&quot;20&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><strong>模糊匹配</strong></p>
<p>对检索的条件进行分词匹配,按照评分的进行排序</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="comment">//查询地址中包含mill或者lane或者mill lane的数据</span></span><br><span class="line">GET /bank/_search</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;match&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span><span class="punctuation">:</span> <span class="string">&quot;Mill lane&quot;</span> <span class="comment">//查询地址中包含Mill或者lane中一个或者多个的数据,然后按照命中的评分排序</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-3-match-phrase-短语匹配"><a href="#2-3-match-phrase-短语匹配" class="headerlink" title="2.3 match_phrase[短语匹配]"></a>2.3 match_phrase[短语匹配]</h3><p>匹配的短语不分割进行匹配,一整个进行匹配</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="comment">//查询地址中包含Mill lane短语的数据</span></span><br><span class="line">GET /bank/_search</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;match_phrase&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span><span class="punctuation">:</span> <span class="string">&quot;Mill lane&quot;</span> <span class="comment">//查询包含整个Mill lane的数据</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-4-multi-match-多字段匹配"><a href="#2-4-multi-match-多字段匹配" class="headerlink" title="2.4 multi_match[多字段匹配]"></a>2.4 multi_match[多字段匹配]</h3><figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="comment">//查询state和address中包含mill的数据</span></span><br><span class="line">GET /bank/_search</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;multi_match&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span> <span class="comment">//查询在state或者在address字段中包含mill的数据</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="string">&quot;mill&quot;</span><span class="punctuation">,</span><span class="comment">//多字段匹配在查询的时候也会分词进行匹配</span></span><br><span class="line"> <span class="attr">&quot;fields&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="string">&quot;state&quot;</span><span class="punctuation">,</span><span class="string">&quot;address&quot;</span><span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-5-bool-复合查询"><a href="#2-5-bool-复合查询" class="headerlink" title="2.5 bool[复合查询]"></a>2.5 bool[复合查询]</h3><figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="comment">//查询性别是M和地址中包含mill并且年龄不是28lastname最好是Hines的数据</span></span><br><span class="line">GET /bank/_search</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;bool&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span> <span class="comment">//多条件复合查询</span></span><br><span class="line"> <span class="attr">&quot;must&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span> <span class="comment">//必须符合的条件</span></span><br><span class="line"> <span class="punctuation">&#123;</span><span class="attr">&quot;match&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span> <span class="string">&quot;M&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span><span class="attr">&quot;match&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span><span class="punctuation">:</span> <span class="string">&quot;mill&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;must_not&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="comment">//必须不符合的条件</span></span><br><span class="line"> <span class="punctuation">&#123;</span><span class="attr">&quot;match&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span><span class="punctuation">:</span> <span class="string">&quot;38&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;should&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="punctuation">&#123;</span><span class="attr">&quot;match&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span> <span class="string">&quot;Hines&quot;</span> <span class="comment">//最好lastname是Hines,满足这个条件的得分会高一些</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-6-Filter-结果过滤"><a href="#2-6-Filter-结果过滤" class="headerlink" title="2.6 Filter[结果过滤]"></a>2.6 Filter[结果过滤]</h3><p><strong>使用Filter进行检索相比上面的检索不会影响过滤结果的得分</strong>上面的检索都可以通过Filter实现</p>
<p>举例:未使用filter的查询:</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="comment">//查询年龄在18-20之间的所有数据</span></span><br><span class="line">GET /bank/_search</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;bool&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;must&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="punctuation">&#123;</span><span class="attr">&quot;range&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;gte&quot;</span><span class="punctuation">:</span> <span class="number">18</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;lte&quot;</span><span class="punctuation">:</span> <span class="number">30</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p>有得分的变化</p>
<p><img src="/pictures/image-20230702111451660.png" alt="image-20230702111451660"></p>
<p>使用了Filter的查询:</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line">GET /bank/_search</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;bool&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;filter&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;range&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;gte&quot;</span><span class="punctuation">:</span> <span class="number">18</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;lte&quot;</span><span class="punctuation">:</span> <span class="number">30</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p>没有得分的变化</p>
<p><img src="/pictures/image-20230702111554667.png" alt="image-20230702111554667"></p>
<p><strong>Filter可以和上面的检索条件一起使用</strong></p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line">GET /bank/_search</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> </span><br><span class="line"> <span class="attr">&quot;bool&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> </span><br><span class="line"> <span class="attr">&quot;must&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="punctuation">&#123;</span><span class="attr">&quot;match&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span> <span class="string">&quot;M&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#123;</span><span class="attr">&quot;match&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span><span class="punctuation">:</span> <span class="string">&quot;mill&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> </span><br><span class="line"> <span class="attr">&quot;must_not&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="punctuation">&#123;</span><span class="attr">&quot;match&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span><span class="punctuation">:</span> <span class="string">&quot;18&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> </span><br><span class="line"> <span class="attr">&quot;should&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="punctuation">&#123;</span><span class="attr">&quot;match&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span> <span class="string">&quot;Wallace&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> </span><br><span class="line"> <span class="attr">&quot;filter&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="punctuation">&#123;</span><span class="attr">&quot;range&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;gte&quot;</span><span class="punctuation">:</span> <span class="number">18</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;lte&quot;</span><span class="punctuation">:</span> <span class="number">30</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-7-term"><a href="#2-7-term" class="headerlink" title="2.7 term"></a>2.7 term</h3><p>和match一样匹配某个属性的值。全文检索字段用match其他非text字段匹配用term(精确性字段推荐使用term例如年龄,数量等)</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line">GET /bank/_search</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;term&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span><span class="comment">//精确的使用term全文检索字段用match</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span><span class="punctuation">:</span> <span class="string">&quot;28&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-8-aggregations-执行聚合"><a href="#2-8-aggregations-执行聚合" class="headerlink" title="2.8 aggregations[执行聚合]"></a>2.8 aggregations[执行聚合]</h3><p>聚合提供了从数据中分组和提取数据的能力.类似于MySql中的Group by函数</p>
<p><strong>搜索address中包含mill的所有人的年龄分布以及平均年龄</strong></p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="comment">//搜索address中包含mill的所有人的年龄分布以及平均年龄</span></span><br><span class="line">GET /bank/_search</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;match&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span><span class="punctuation">:</span> <span class="string">&quot;mill&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;aggs&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;ageAgg&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;terms&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span><span class="comment">//查看年龄的分布情况</span></span><br><span class="line"> <span class="attr">&quot;field&quot;</span><span class="punctuation">:</span> <span class="string">&quot;age&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;size&quot;</span><span class="punctuation">:</span> <span class="number">10</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;ageAvg&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="comment">//年龄平均值</span></span><br><span class="line"> <span class="attr">&quot;avg&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;field&quot;</span><span class="punctuation">:</span> <span class="string">&quot;age&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;balanceAvg&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="comment">//工资的平均值</span></span><br><span class="line"> <span class="attr">&quot;avg&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;field&quot;</span><span class="punctuation">:</span> <span class="string">&quot;balance&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230703101958163.png" alt="image-20230703101958163"></p>
<p><strong>按照年龄聚合,并且获取这些年龄段的这些人的平均薪资[子聚合]</strong></p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="comment">//按照年龄聚合,并且获取这些年龄段的这些人的平均薪资</span></span><br><span class="line">GET /bank/_search</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;match_all&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span><span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;aggs&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;ageAgg&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span><span class="comment">//年龄段的聚合</span></span><br><span class="line"> <span class="attr">&quot;terms&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;field&quot;</span><span class="punctuation">:</span> <span class="string">&quot;age&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;size&quot;</span><span class="punctuation">:</span> <span class="number">100</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;aggs&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;ageAvg&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span><span class="comment">//年龄段的聚合里面嵌套一个求年龄平均值的聚合</span></span><br><span class="line"> <span class="attr">&quot;avg&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;field&quot;</span><span class="punctuation">:</span> <span class="string">&quot;balance&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230703102805047.png" alt="image-20230703102805047"></p>
<p><strong>查询所有年龄分布,并且这些年龄段中男的平均工资和女的平均工资以及这个年龄段的总体平均薪资</strong></p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line">GET /bank/_search</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;query&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;match_all&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span><span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;aggs&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;avgAgg&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;terms&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span><span class="comment">//根据年龄进行分段</span></span><br><span class="line"> <span class="attr">&quot;field&quot;</span><span class="punctuation">:</span> <span class="string">&quot;age&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;size&quot;</span><span class="punctuation">:</span> <span class="number">100</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;aggs&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;genderAgg&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;terms&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span><span class="comment">//根据性别进行分段</span></span><br><span class="line"> <span class="attr">&quot;field&quot;</span><span class="punctuation">:</span> <span class="string">&quot;gender.keyword&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;aggs&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;balanceAvg&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;avg&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span><span class="comment">//求出每个年龄段对应的不同性别的平均工资</span></span><br><span class="line"> <span class="attr">&quot;field&quot;</span><span class="punctuation">:</span> <span class="string">&quot;balance&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;ageBalanceAvg&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span><span class="comment">//计算每个年龄段对应的平均工资</span></span><br><span class="line"> <span class="attr">&quot;avg&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;field&quot;</span><span class="punctuation">:</span> <span class="string">&quot;balance&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230703105247964.png" alt="image-20230703105247964"></p>
<h2 id="3-Mapping"><a href="#3-Mapping" class="headerlink" title="3.Mapping"></a>3.Mapping</h2><p><strong>指定ES中数据的数据类型</strong></p>
<h3 id="3-1-创建映射"><a href="#3-1-创建映射" class="headerlink" title="3.1 创建映射"></a>3.1 创建映射</h3><p>在创建索引的时候我们可以指定属性名的数据类型</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line">##创建一个新的索引<span class="punctuation">,</span>指定索引下字段的映射关系</span><br><span class="line">PUT /my_index</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;mappings&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;properties&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;integer&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;email&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span><span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span><span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;text&quot;</span><span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230703112342368.png" alt="image-20230703112342368"></p>
<h3 id="3-2-添加新的映射"><a href="#3-2-添加新的映射" class="headerlink" title="3.2 添加新的映射"></a>3.2 添加新的映射</h3><figure class="highlight json"><table><tr><td class="code"><pre><span class="line">##添加一个映射</span><br><span class="line">PUT /my_index/_mapping</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;properties&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;employee-id&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;index&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">false</span></span> <span class="comment">//表示这个字段不参与检索</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230703113121234.png" alt="image-20230703113121234"></p>
<h3 id="3-3-更新映射"><a href="#3-3-更新映射" class="headerlink" title="3.3 更新映射"></a>3.3 更新映射</h3><p>对于已经存在的映射字段,我们不能更新,更新必须创建新的索引进行数据迁移</p>
<h3 id="3-4-数据迁移"><a href="#3-4-数据迁移" class="headerlink" title="3.4 数据迁移"></a>3.4 数据迁移</h3><p>1.创建一个新的索引并指定映射</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line">PUT /new_bank</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;mappings&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;properties&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;account_number&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;long&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;address&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;text&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;age&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;integer&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;balance&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;long&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;city&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;email&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;employer&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;firstname&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;text&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;gender&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;lastname&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;state&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p>2.数据迁移</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="comment">//新版本的写法6.0以后)</span></span><br><span class="line">POST _reindex</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;source&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="string">&quot;twitter&quot;</span> <span class="comment">//老的索引</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;dest&quot;</span><span class="punctuation">:</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;index&quot;</span><span class="punctuation">:</span><span class="string">&quot;new_twitter&quot;</span> <span class="comment">//新的索引</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br><span class="line"><span class="comment">//旧版本需要指定数据类型</span></span><br><span class="line">#数据迁移</span><br><span class="line">POST _reindex</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;source&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;index&quot;</span><span class="punctuation">:</span> <span class="string">&quot;bank&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;account&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;dest&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;index&quot;</span><span class="punctuation">:</span> <span class="string">&quot;new_bank&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230703115140810.png" alt="image-20230703115140810"></p>
<h2 id="4-分词"><a href="#4-分词" class="headerlink" title="4.分词"></a>4.分词</h2><h3 id="4-1-安装分词器"><a href="#4-1-安装分词器" class="headerlink" title="4.1 安装分词器"></a>4.1 安装分词器</h3><p>安装地址: <a href="https://github.com/medcl/elasticsearch-analysis-ik">https://github.com/medcl/elasticsearch-analysis-ik</a></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">切换到es挂载在注解的plugins目录</span></span><br><span class="line">cd /mydata/elasticsearch/plugins/</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">安装wget</span></span><br><span class="line">yum install wget </span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">下载ik分词器的压缩包(下载的速度不是很快(5分钟左右),建议本地下载好了之后,上传上去)</span></span><br><span class="line">wget https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.4.2/elasticsearch-analysis-ik-7.4.2.zip</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">进入容器内部查看一下文件是否同步到了容器的内部</span></span><br><span class="line">docker exec -it 容器Id /bin/bash</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">切换到plugins目录中去,这时目录中也存在elasticsearch-analysis-ik-7.4.2.zip这个压缩包</span></span><br><span class="line">cd plugins/ #使用ls查看一下</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">退出容器</span></span><br><span class="line">exit</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">在主机下解压elasticsearch-analysis-ik-7.4.2.zip这个压缩包</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">zip的解压需要使用unzip解压命令 这里我们直接在本地解压一下 上传到plugins目录解压的文件名为ik</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">安装unzip</span></span><br><span class="line">yum install -y unzip</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看ik分词器是否安装成功</span></span><br><span class="line">docker exec -it 容器Id /bin/bash</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">切换到bin目录</span></span><br><span class="line">cd bin/</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">执行下面的命令有ik显示即为安装成功</span></span><br><span class="line">elasticsearch-plugin list</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">退出容器,重启一下</span></span><br><span class="line">docker restart elasticsearch</span><br></pre></td></tr></table></figure>
<p>测试使用</p>
<p><img src="/pictures/image-20230703152110823.png" alt="image-20230703152110823"></p>
<h3 id="4-2-自定义词库"><a href="#4-2-自定义词库" class="headerlink" title="4.2 自定义词库"></a>4.2 自定义词库</h3><p>1.安装nginx用作设置ik的远程分词库</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">创建nginx容器挂载的目录</span></span><br><span class="line">mkdir /mydata/nginx/conf</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">拉取nginx的镜像</span></span><br><span class="line">docker pull nginx:1.10</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">随便启动一个nginx实例为了复制其配置</span></span><br><span class="line">docker run -p 80:80 --name nginx -d nginx:1.10</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">将容器内的配置文件拷贝到conf目录(注意这里有个点和空格)</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">注意在nginx的目录下操作,(成功之后/mydata/nginx/conf目录下会有相应的配置文件和目录)</span></span><br><span class="line">docker container cp nginx:/etc/nginx /mydata/nginx/conf</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">停掉并删除之前的启动的nginx</span></span><br><span class="line">docker stop nginx</span><br><span class="line">docker rm nginx</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">正式的启动容器</span></span><br><span class="line">docker run -p 80:80 --name nginx \</span><br><span class="line">-v /mydata/nginx/html:/usr/share/nginx/html \</span><br><span class="line">-v /mydata/nginx/logs:/var/log/nginx \</span><br><span class="line">-v /mydata/nginx/conf:/etc/nginx \</span><br><span class="line">-d nginx:1.10</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">设置开机自启</span></span><br><span class="line">docker update nginx --restart=always</span><br></pre></td></tr></table></figure>
<p>2.配置自定义的词库</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">在nginx外部挂载的html目录下创建相应的目录</span></span><br><span class="line">mkdir es</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">创建分词需要使用的文本文件</span></span><br><span class="line">vim fenci.txt</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">在这个文本文件中加入我们需要添加的新词</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">例如:奥里给 老铁之类的</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">在浏览器上可以通过http://192.168.195.100/es/fenci.txt访问到里面的内容</span></span><br></pre></td></tr></table></figure>
<p>3.配置es远程词库的地址</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">切换到ik分词器配置文件所在的目录</span></span><br><span class="line">cd elasticsearch/plugins/ik/config/</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">修改配置文件,设置远程分词库的地址</span></span><br><span class="line">vim IKAnalyzer.cfg.xml</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230703170719714.png" alt="image-20230703170719714"></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">重启es</span></span><br><span class="line">docker restart elasticsearch</span><br></pre></td></tr></table></figure>
<p>4.测试一下(这时我们使用网络中新颖的词就可以识别成一个词语)</p>
<p><img src="/pictures/image-20230703171420471.png" alt="image-20230703171420471"></p>
<h1 id="五-Elasticsearch-Rest-Client"><a href="#五-Elasticsearch-Rest-Client" class="headerlink" title="五.Elasticsearch-Rest-Client"></a>五.Elasticsearch-Rest-Client</h1><h2 id="1-环境配置"><a href="#1-环境配置" class="headerlink" title="1.环境配置"></a>1.环境配置</h2><p><strong>1.导入依赖</strong></p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--指定版本--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">properties</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">elasticsearch.version</span>&gt;</span>7.4.2<span class="tag">&lt;/<span class="name">elasticsearch.version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">properties</span>&gt;</span></span><br><span class="line"><span class="comment">&lt;!--ES的依赖--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.elasticsearch.client<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>elasticsearch-rest-high-level-client<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>7.4.2<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><strong>2.编写配置文件</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.apache.http.HttpHost;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.HttpResponse;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.nio.protocol.HttpAsyncResponseConsumer;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.client.HttpAsyncResponseConsumerFactory;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.client.RequestOptions;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.client.RestClient;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.client.RestHighLevelClient;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Bean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/7/3</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> ES的配置文件</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ElasticSearchConfig</span> &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">//通用设置项</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> RequestOptions COMMON_OPTIONS;</span><br><span class="line"> <span class="keyword">static</span> &#123;</span><br><span class="line"> RequestOptions.<span class="type">Builder</span> <span class="variable">builder</span> <span class="operator">=</span> RequestOptions.DEFAULT.toBuilder();</span><br><span class="line"></span><br><span class="line"> COMMON_OPTIONS = builder.build();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> RestHighLevelClient <span class="title function_">esRestClient</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">RestHighLevelClient</span> <span class="variable">client</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">RestHighLevelClient</span>(</span><br><span class="line"> RestClient.builder(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">HttpHost</span>(<span class="string">&quot;192.168.195.100&quot;</span>, <span class="number">9200</span>, <span class="string">&quot;http&quot;</span>)</span><br><span class="line"> )</span><br><span class="line"> );</span><br><span class="line"> <span class="keyword">return</span> client;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>3.测试使用</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.search;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.client.RestHighLevelClient;</span><br><span class="line"><span class="keyword">import</span> org.junit.jupiter.api.AfterAll;</span><br><span class="line"><span class="keyword">import</span> org.junit.jupiter.api.Test;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.test.context.SpringBootTest;</span><br><span class="line"></span><br><span class="line"><span class="meta">@SpringBootTest</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">GulimallSearchApplicationTests</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> RestHighLevelClient client;</span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">contextLoads</span><span class="params">()</span> &#123;</span><br><span class="line"> System.out.println(client);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="2-代码操作ES"><a href="#2-代码操作ES" class="headerlink" title="2.代码操作ES"></a>2.代码操作ES</h2><h3 id="2-1-创建索引"><a href="#2-1-创建索引" class="headerlink" title="2.1 创建索引"></a><strong>2.1 创建索引</strong></h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 创建一个索引</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">void</span> <span class="title function_">testCreateIndex</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">CreateIndexRequest</span> <span class="variable">request</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">CreateIndexRequest</span>(<span class="string">&quot;test_create&quot;</span>);</span><br><span class="line"> <span class="type">CreateIndexResponse</span> <span class="variable">createIndexResponse</span> <span class="operator">=</span> client.indices().create(request, RequestOptions.DEFAULT);</span><br><span class="line"> log.info(<span class="string">&quot;创建一个索引:&#123;&#125;&quot;</span>,createIndexResponse);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-2-判断索引是否存在"><a href="#2-2-判断索引是否存在" class="headerlink" title="2.2 判断索引是否存在"></a><strong>2.2 判断索引是否存在</strong></h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断索引是否存在</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testExistIndex</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">GetIndexRequest</span> <span class="variable">request</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">GetIndexRequest</span>(<span class="string">&quot;users&quot;</span>);</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">exists</span> <span class="operator">=</span> client.indices().exists(request, RequestOptions.DEFAULT);</span><br><span class="line"> log.info(<span class="string">&quot;索引是否存在:&#123;&#125;&quot;</span>,exists);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-3-删除索引"><a href="#2-3-删除索引" class="headerlink" title="2.3 删除索引"></a><strong>2.3 删除索引</strong></h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 删除索引</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testDeleteIndex</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">DeleteIndexRequest</span> <span class="variable">request</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">DeleteIndexRequest</span>(<span class="string">&quot;test_create&quot;</span>);</span><br><span class="line"> <span class="type">AcknowledgedResponse</span> <span class="variable">delete</span> <span class="operator">=</span> client.indices().delete(request, RequestOptions.DEFAULT);</span><br><span class="line"> System.out.println(delete.isAcknowledged());</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-4-保存文档"><a href="#2-4-保存文档" class="headerlink" title="2.4 保存文档"></a><strong>2.4 保存文档</strong></h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 测试向es中存储数据</span></span><br><span class="line"><span class="comment"> * 保存和修改的操作</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">void</span> <span class="title function_">indexData</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="comment">//在users索引下存储数据</span></span><br><span class="line"> <span class="type">IndexRequest</span> <span class="variable">indexRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">IndexRequest</span>(<span class="string">&quot;users&quot;</span>);</span><br><span class="line"> <span class="comment">//存储的数据的id</span></span><br><span class="line"> indexRequest.id(<span class="string">&quot;1&quot;</span>);</span><br><span class="line"> <span class="comment">//第一种方式</span></span><br><span class="line"> <span class="comment">//indexRequest.source(&quot;userName&quot;,&quot;zhangSan&quot;,&quot;age&quot;,18,&quot;gender&quot;,&quot;男&quot;);</span></span><br><span class="line"> <span class="comment">//第二种方式</span></span><br><span class="line"> <span class="type">User</span> <span class="variable">user</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;tom&quot;</span>,<span class="string">&quot;男&quot;</span>,<span class="number">22</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">jsonString</span> <span class="operator">=</span> JSON.toJSONString(user);</span><br><span class="line"> indexRequest.source(jsonString, XContentType.JSON);</span><br><span class="line"> <span class="comment">//执行真正的保存操作</span></span><br><span class="line"> <span class="comment">//下面方法的第二个参数也可以使用这个参数GulimallElasticSearchConfig.COMMON_OPTIONS</span></span><br><span class="line"> <span class="type">IndexResponse</span> <span class="variable">index</span> <span class="operator">=</span> client.index(indexRequest, RequestOptions.DEFAULT);</span><br><span class="line"> log.info(<span class="string">&quot;保存之后响应的数据:&#123;&#125;&quot;</span>,index);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-5-判断文档是否存在"><a href="#2-5-判断文档是否存在" class="headerlink" title="2.5 判断文档是否存在"></a><strong>2.5 判断文档是否存在</strong></h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断文档是否存在</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">void</span> <span class="title function_">testIsExists</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">GetRequest</span> <span class="variable">getRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">GetRequest</span>(<span class="string">&quot;users&quot;</span>, <span class="string">&quot;1&quot;</span>);</span><br><span class="line"> getRequest.fetchSourceContext(<span class="keyword">new</span> <span class="title class_">FetchSourceContext</span>(<span class="literal">false</span>));</span><br><span class="line"> getRequest.storedFields(<span class="string">&quot;_none_&quot;</span>);</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">exists</span> <span class="operator">=</span> client.exists(getRequest, RequestOptions.DEFAULT);</span><br><span class="line"> System.out.println(exists);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-6-获取文档信息"><a href="#2-6-获取文档信息" class="headerlink" title="2.6 获取文档信息"></a><strong>2.6 获取文档信息</strong></h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 获取文档的信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">void</span> <span class="title function_">testGetDocument</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">GetRequest</span> <span class="variable">getRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">GetRequest</span>(<span class="string">&quot;users&quot;</span>, <span class="string">&quot;1&quot;</span>);</span><br><span class="line"> <span class="type">GetResponse</span> <span class="variable">getResponse</span> <span class="operator">=</span> client.get(getRequest, RequestOptions.DEFAULT);</span><br><span class="line"> System.out.println(getResponse.getSourceAsString());</span><br><span class="line"> System.out.println(getResponse);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-7-修改文档信息"><a href="#2-7-修改文档信息" class="headerlink" title="2.7 修改文档信息"></a><strong>2.7 修改文档信息</strong></h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 更新文档的信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">void</span> <span class="title function_">testUpdateRequest</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">UpdateRequest</span> <span class="variable">updateRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">UpdateRequest</span>(<span class="string">&quot;users&quot;</span>, <span class="string">&quot;1&quot;</span>);</span><br><span class="line"> updateRequest.timeout(<span class="string">&quot;1s&quot;</span>);</span><br><span class="line"> <span class="type">User</span> <span class="variable">user</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;修改之后的用户名&quot;</span>, <span class="string">&quot;男&quot;</span>,<span class="number">23</span>);</span><br><span class="line"> updateRequest.doc(JSON.toJSONString(user), XContentType.JSON);</span><br><span class="line"> <span class="type">UpdateResponse</span> <span class="variable">updateResponse</span> <span class="operator">=</span> client.update(updateRequest, RequestOptions.DEFAULT);</span><br><span class="line"> System.out.println(updateResponse.status());</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-8-删除文档记录"><a href="#2-8-删除文档记录" class="headerlink" title="2.8 删除文档记录"></a><strong>2.8 删除文档记录</strong></h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 删除文档记录</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">void</span> <span class="title function_">testDeleteRequest</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">DeleteRequest</span> <span class="variable">request</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">DeleteRequest</span>(<span class="string">&quot;users&quot;</span>, <span class="string">&quot;1&quot;</span>);</span><br><span class="line"> request.timeout(<span class="string">&quot;1s&quot;</span>);</span><br><span class="line"> <span class="type">DeleteResponse</span> <span class="variable">deleteResponse</span> <span class="operator">=</span> client.delete(request, RequestOptions.DEFAULT);</span><br><span class="line"> System.out.println(deleteResponse.status());</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-9-批量添加"><a href="#2-9-批量添加" class="headerlink" title="2.9 批量添加"></a><strong>2.9 批量添加</strong></h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 批量添加文档</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">void</span> <span class="title function_">testBulkRequest</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">BulkRequest</span> <span class="variable">bulkRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">BulkRequest</span>();</span><br><span class="line"> bulkRequest.timeout(<span class="string">&quot;10s&quot;</span>);</span><br><span class="line"> ArrayList&lt;User&gt; userList = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> userList.add(<span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;A&quot;</span>, <span class="string">&quot;男&quot;</span>,<span class="number">23</span>));</span><br><span class="line"> userList.add(<span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;B&quot;</span>, <span class="string">&quot;男&quot;</span>,<span class="number">32</span>));</span><br><span class="line"> userList.add(<span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;C&quot;</span>, <span class="string">&quot;女&quot;</span>,<span class="number">34</span>));</span><br><span class="line"> userList.add(<span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;D&quot;</span>, <span class="string">&quot;女&quot;</span>,<span class="number">56</span>));</span><br><span class="line"> userList.add(<span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;E&quot;</span>, <span class="string">&quot;男&quot;</span>,<span class="number">34</span>));</span><br><span class="line"> userList.add(<span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;F&quot;</span>, <span class="string">&quot;女&quot;</span>,<span class="number">65</span>));</span><br><span class="line"> <span class="comment">// 批处理请求</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; userList.size(); i++) &#123;</span><br><span class="line"> <span class="comment">// 批量更新和批量删除,就在这里修改对应的请求就可以了</span></span><br><span class="line"> bulkRequest.add(<span class="keyword">new</span> <span class="title class_">IndexRequest</span>(<span class="string">&quot;users&quot;</span>).id(<span class="string">&quot;&quot;</span> + (i + <span class="number">1</span>))</span><br><span class="line"> .source(JSON.toJSONString(userList.get(i)), XContentType.JSON));</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">BulkResponse</span> <span class="variable">bulkResponse</span> <span class="operator">=</span> client.bulk(bulkRequest, RequestOptions.DEFAULT);</span><br><span class="line"> System.out.println(<span class="string">&quot;是否批量添加成功:&quot;</span>+!bulkResponse.hasFailures());</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-10-条件查询"><a href="#2-10-条件查询" class="headerlink" title="2.10 条件查询"></a><strong>2.10 条件查询</strong></h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 检索的方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">void</span> <span class="title function_">testSearchRequest</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="comment">//1.创建一个检索请求</span></span><br><span class="line"> <span class="type">SearchRequest</span> <span class="variable">searchRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SearchRequest</span>();</span><br><span class="line"> <span class="comment">//设置检索的索引</span></span><br><span class="line"> searchRequest.indices(<span class="string">&quot;bank&quot;</span>);</span><br><span class="line"> <span class="comment">//指定DSL,检索条件</span></span><br><span class="line"> <span class="type">SearchSourceBuilder</span> <span class="variable">sourceBuilder</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SearchSourceBuilder</span>();</span><br><span class="line"> sourceBuilder.query(QueryBuilders.matchQuery(<span class="string">&quot;address&quot;</span>, <span class="string">&quot;mill&quot;</span>));<span class="comment">//查询地址中包含mill的数据</span></span><br><span class="line"> sourceBuilder.aggregation(AggregationBuilders.terms(<span class="string">&quot;ageAgg&quot;</span>).field(<span class="string">&quot;age&quot;</span>).size(<span class="number">10</span>));<span class="comment">//聚合名ageAgg根据age字段聚合,只取10条</span></span><br><span class="line"> sourceBuilder.aggregation(AggregationBuilders.avg(<span class="string">&quot;balanceAvg&quot;</span>).field(<span class="string">&quot;balance&quot;</span>));<span class="comment">//求平均工资</span></span><br><span class="line"> System.out.println(<span class="string">&quot;检索的条件:&quot;</span> + sourceBuilder);</span><br><span class="line"> searchRequest.source(sourceBuilder);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//2.执行检索</span></span><br><span class="line"> <span class="type">SearchResponse</span> <span class="variable">searchResponse</span> <span class="operator">=</span> client.search(searchRequest, RequestOptions.DEFAULT);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//3.分析检索的结果</span></span><br><span class="line"> System.out.println(<span class="string">&quot;查询到的数据:&quot;</span> + searchResponse.toString());</span><br><span class="line"> <span class="comment">//Map map = JSON.parseObject(searchResponse.toString(), Map.class);//可以转换成一个map</span></span><br><span class="line"> <span class="type">SearchHits</span> <span class="variable">hits</span> <span class="operator">=</span> searchResponse.getHits();<span class="comment">//拿到命中的记录</span></span><br><span class="line"> <span class="keyword">for</span> (SearchHit hit : hits) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">index</span> <span class="operator">=</span> hit.getIndex();<span class="comment">//获取索引信息</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">type</span> <span class="operator">=</span> hit.getType();<span class="comment">//类型信息</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">id</span> <span class="operator">=</span> hit.getId();<span class="comment">//id信息</span></span><br><span class="line"> <span class="type">float</span> <span class="variable">score</span> <span class="operator">=</span> hit.getScore();<span class="comment">//得分信息</span></span><br><span class="line"> <span class="type">TimeValue</span> <span class="variable">took</span> <span class="operator">=</span> searchResponse.getTook();</span><br><span class="line"> <span class="type">String</span> <span class="variable">sourceAsString</span> <span class="operator">=</span> hit.getSourceAsString();<span class="comment">//直接转化成对应的java对象</span></span><br><span class="line"> <span class="comment">//转换成Account对象</span></span><br><span class="line"> <span class="type">Account</span> <span class="variable">account</span> <span class="operator">=</span> JSON.parseObject(sourceAsString, Account.class);</span><br><span class="line"> System.out.println(<span class="string">&quot;Account:&quot;</span> + account);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//获取聚合分析的信息</span></span><br><span class="line"> <span class="comment">//获取年龄的分段信息</span></span><br><span class="line"> <span class="type">Aggregations</span> <span class="variable">aggregations</span> <span class="operator">=</span> searchResponse.getAggregations();</span><br><span class="line"> <span class="type">Terms</span> <span class="variable">ageAgg</span> <span class="operator">=</span> aggregations.get(<span class="string">&quot;ageAgg&quot;</span>);</span><br><span class="line"> <span class="keyword">for</span> (Terms.Bucket bucket : ageAgg.getBuckets()) &#123;</span><br><span class="line"></span><br><span class="line"> System.out.println(<span class="string">&quot;年龄:&quot;</span> + bucket.getKeyAsString() + <span class="string">&quot;有&quot;</span> + bucket.getDocCount() + <span class="string">&quot;人&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//获取薪资的平均值</span></span><br><span class="line"> <span class="type">Avg</span> <span class="variable">balanceAvg</span> <span class="operator">=</span> aggregations.get(<span class="string">&quot;balanceAvg&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;平均薪资:&quot;</span> + balanceAvg.getValue());</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>示例的完整代码</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.search;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.fastjson.JSON;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.gulimall.search.config.GulimallElasticSearchConfig;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"><span class="keyword">import</span> lombok.ToString;</span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.action.bulk.BulkRequest;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.action.bulk.BulkResponse;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.action.delete.DeleteRequest;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.action.delete.DeleteResponse;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.action.get.GetRequest;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.action.get.GetResponse;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.action.index.IndexRequest;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.action.index.IndexResponse;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.action.search.SearchRequest;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.action.search.SearchResponse;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.action.support.master.AcknowledgedResponse;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.action.update.UpdateRequest;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.action.update.UpdateResponse;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.client.RequestOptions;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.client.RestHighLevelClient;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.client.indices.CreateIndexRequest;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.client.indices.CreateIndexResponse;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.client.indices.GetIndexRequest;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.common.unit.TimeValue;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.common.xcontent.XContentType;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.index.query.QueryBuilders;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.search.SearchHit;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.search.SearchHits;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.search.aggregations.Aggregation;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.search.aggregations.AggregationBuilder;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.search.aggregations.AggregationBuilders;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.search.aggregations.Aggregations;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.search.aggregations.bucket.terms.Terms;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.search.aggregations.metrics.Avg;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.search.builder.SearchSourceBuilder;</span><br><span class="line"><span class="keyword">import</span> org.elasticsearch.search.fetch.subphase.FetchSourceContext;</span><br><span class="line"><span class="keyword">import</span> org.junit.jupiter.api.Test;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.test.context.SpringBootTest;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.util.ArrayList;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@SpringBootTest</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">GulimallSearchApplicationTests</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> RestHighLevelClient client;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">contextLoads</span><span class="params">()</span> &#123;</span><br><span class="line"> System.out.println(client);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 测试向es中存储数据</span></span><br><span class="line"><span class="comment"> * 保存和修改的操作</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">indexData</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="comment">//在users索引下存储数据</span></span><br><span class="line"> <span class="type">IndexRequest</span> <span class="variable">indexRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">IndexRequest</span>(<span class="string">&quot;users&quot;</span>);</span><br><span class="line"> <span class="comment">//存储的数据的id</span></span><br><span class="line"> indexRequest.id(<span class="string">&quot;1&quot;</span>);</span><br><span class="line"> <span class="comment">//第一种方式</span></span><br><span class="line"> <span class="comment">//indexRequest.source(&quot;userName&quot;,&quot;zhangSan&quot;,&quot;age&quot;,18,&quot;gender&quot;,&quot;男&quot;);</span></span><br><span class="line"> <span class="comment">//第二种方式</span></span><br><span class="line"> <span class="type">User</span> <span class="variable">user</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;tom&quot;</span>, <span class="string">&quot;男&quot;</span>, <span class="number">22</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">jsonString</span> <span class="operator">=</span> JSON.toJSONString(user);</span><br><span class="line"> indexRequest.source(jsonString, XContentType.JSON);</span><br><span class="line"> <span class="comment">//执行真正的保存操作</span></span><br><span class="line"> <span class="comment">//下面方法的第二个参数也可以使用这个参数GulimallElasticSearchConfig.COMMON_OPTIONS</span></span><br><span class="line"> <span class="type">IndexResponse</span> <span class="variable">index</span> <span class="operator">=</span> client.index(indexRequest, RequestOptions.DEFAULT);</span><br><span class="line"> log.info(<span class="string">&quot;保存之后响应的数据:&#123;&#125;&quot;</span>, index);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断索引是否存在</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testExistIndex</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">GetIndexRequest</span> <span class="variable">request</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">GetIndexRequest</span>(<span class="string">&quot;users&quot;</span>);</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">exists</span> <span class="operator">=</span> client.indices().exists(request, RequestOptions.DEFAULT);</span><br><span class="line"> log.info(<span class="string">&quot;索引是否存在:&#123;&#125;&quot;</span>, exists);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 创建一个索引</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testCreateIndex</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">CreateIndexRequest</span> <span class="variable">request</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">CreateIndexRequest</span>(<span class="string">&quot;test_create&quot;</span>);</span><br><span class="line"> <span class="type">CreateIndexResponse</span> <span class="variable">createIndexResponse</span> <span class="operator">=</span> client.indices().create(request, RequestOptions.DEFAULT);</span><br><span class="line"> log.info(<span class="string">&quot;创建一个索引:&#123;&#125;&quot;</span>, createIndexResponse);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 删除索引</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testDeleteIndex</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">DeleteIndexRequest</span> <span class="variable">request</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">DeleteIndexRequest</span>(<span class="string">&quot;users&quot;</span>);</span><br><span class="line"> <span class="type">AcknowledgedResponse</span> <span class="variable">delete</span> <span class="operator">=</span> client.indices().delete(request, RequestOptions.DEFAULT);</span><br><span class="line"> System.out.println(delete.isAcknowledged());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断文档是否存在</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testIsExists</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">GetRequest</span> <span class="variable">getRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">GetRequest</span>(<span class="string">&quot;users&quot;</span>, <span class="string">&quot;1&quot;</span>);</span><br><span class="line"> getRequest.fetchSourceContext(<span class="keyword">new</span> <span class="title class_">FetchSourceContext</span>(<span class="literal">false</span>));</span><br><span class="line"> getRequest.storedFields(<span class="string">&quot;_none_&quot;</span>);</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">exists</span> <span class="operator">=</span> client.exists(getRequest, RequestOptions.DEFAULT);</span><br><span class="line"> System.out.println(exists);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 获取文档的信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testGetDocument</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">GetRequest</span> <span class="variable">getRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">GetRequest</span>(<span class="string">&quot;users&quot;</span>, <span class="string">&quot;1&quot;</span>);</span><br><span class="line"> <span class="type">GetResponse</span> <span class="variable">getResponse</span> <span class="operator">=</span> client.get(getRequest, RequestOptions.DEFAULT);</span><br><span class="line"> System.out.println(getResponse.getSourceAsString());</span><br><span class="line"> System.out.println(getResponse);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 更新文档的信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testUpdateRequest</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">UpdateRequest</span> <span class="variable">updateRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">UpdateRequest</span>(<span class="string">&quot;users&quot;</span>, <span class="string">&quot;1&quot;</span>);</span><br><span class="line"> updateRequest.timeout(<span class="string">&quot;1s&quot;</span>);</span><br><span class="line"> <span class="type">User</span> <span class="variable">user</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;修改之后的用户名&quot;</span>, <span class="string">&quot;男&quot;</span>, <span class="number">23</span>);</span><br><span class="line"> updateRequest.doc(JSON.toJSONString(user), XContentType.JSON);</span><br><span class="line"> <span class="type">UpdateResponse</span> <span class="variable">updateResponse</span> <span class="operator">=</span> client.update(updateRequest, RequestOptions.DEFAULT);</span><br><span class="line"> System.out.println(updateResponse.status());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 删除文档记录</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testDeleteRequest</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">DeleteRequest</span> <span class="variable">request</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">DeleteRequest</span>(<span class="string">&quot;users&quot;</span>, <span class="string">&quot;1&quot;</span>);</span><br><span class="line"> request.timeout(<span class="string">&quot;1s&quot;</span>);</span><br><span class="line"> <span class="type">DeleteResponse</span> <span class="variable">deleteResponse</span> <span class="operator">=</span> client.delete(request, RequestOptions.DEFAULT);</span><br><span class="line"> System.out.println(deleteResponse.status());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 批量添加文档</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testBulkRequest</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="type">BulkRequest</span> <span class="variable">bulkRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">BulkRequest</span>();</span><br><span class="line"> bulkRequest.timeout(<span class="string">&quot;10s&quot;</span>);</span><br><span class="line"> ArrayList&lt;User&gt; userList = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> userList.add(<span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;A&quot;</span>, <span class="string">&quot;男&quot;</span>, <span class="number">23</span>));</span><br><span class="line"> userList.add(<span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;B&quot;</span>, <span class="string">&quot;男&quot;</span>, <span class="number">32</span>));</span><br><span class="line"> userList.add(<span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;C&quot;</span>, <span class="string">&quot;女&quot;</span>, <span class="number">34</span>));</span><br><span class="line"> userList.add(<span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;D&quot;</span>, <span class="string">&quot;女&quot;</span>, <span class="number">56</span>));</span><br><span class="line"> userList.add(<span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;E&quot;</span>, <span class="string">&quot;男&quot;</span>, <span class="number">34</span>));</span><br><span class="line"> userList.add(<span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;F&quot;</span>, <span class="string">&quot;女&quot;</span>, <span class="number">65</span>));</span><br><span class="line"> <span class="comment">// 批处理请求</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; userList.size(); i++) &#123;</span><br><span class="line"> <span class="comment">// 批量更新和批量删除,就在这里修改对应的请求就可以了</span></span><br><span class="line"> bulkRequest.add(<span class="keyword">new</span> <span class="title class_">IndexRequest</span>(<span class="string">&quot;users&quot;</span>).id(<span class="string">&quot;&quot;</span> + (i + <span class="number">1</span>))</span><br><span class="line"> .source(JSON.toJSONString(userList.get(i)), XContentType.JSON));</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">BulkResponse</span> <span class="variable">bulkResponse</span> <span class="operator">=</span> client.bulk(bulkRequest, RequestOptions.DEFAULT);</span><br><span class="line"> System.out.println(<span class="string">&quot;是否批量添加成功:&quot;</span> + !bulkResponse.hasFailures());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 检索的方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testSearchRequest</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="comment">//1.创建一个检索请求</span></span><br><span class="line"> <span class="type">SearchRequest</span> <span class="variable">searchRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SearchRequest</span>();</span><br><span class="line"> <span class="comment">//设置检索的索引</span></span><br><span class="line"> searchRequest.indices(<span class="string">&quot;bank&quot;</span>);</span><br><span class="line"> <span class="comment">//指定DSL,检索条件</span></span><br><span class="line"> <span class="type">SearchSourceBuilder</span> <span class="variable">sourceBuilder</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SearchSourceBuilder</span>();</span><br><span class="line"> sourceBuilder.query(QueryBuilders.matchQuery(<span class="string">&quot;address&quot;</span>, <span class="string">&quot;mill&quot;</span>));<span class="comment">//查询地址中包含mill的数据</span></span><br><span class="line"> sourceBuilder.aggregation(AggregationBuilders.terms(<span class="string">&quot;ageAgg&quot;</span>).field(<span class="string">&quot;age&quot;</span>).size(<span class="number">10</span>));<span class="comment">//聚合名ageAgg根据age字段聚合,只取10条</span></span><br><span class="line"> sourceBuilder.aggregation(AggregationBuilders.avg(<span class="string">&quot;balanceAvg&quot;</span>).field(<span class="string">&quot;balance&quot;</span>));<span class="comment">//求平均工资</span></span><br><span class="line"> System.out.println(<span class="string">&quot;检索的条件:&quot;</span> + sourceBuilder);</span><br><span class="line"> searchRequest.source(sourceBuilder);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//2.执行检索</span></span><br><span class="line"> <span class="type">SearchResponse</span> <span class="variable">searchResponse</span> <span class="operator">=</span> client.search(searchRequest, RequestOptions.DEFAULT);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//3.分析检索的结果</span></span><br><span class="line"> System.out.println(<span class="string">&quot;查询到的数据:&quot;</span> + searchResponse.toString());</span><br><span class="line"> <span class="comment">//Map map = JSON.parseObject(searchResponse.toString(), Map.class);//可以转换成一个map</span></span><br><span class="line"> <span class="type">SearchHits</span> <span class="variable">hits</span> <span class="operator">=</span> searchResponse.getHits();<span class="comment">//拿到命中的记录</span></span><br><span class="line"> <span class="keyword">for</span> (SearchHit hit : hits) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">index</span> <span class="operator">=</span> hit.getIndex();<span class="comment">//获取索引信息</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">type</span> <span class="operator">=</span> hit.getType();<span class="comment">//类型信息</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">id</span> <span class="operator">=</span> hit.getId();<span class="comment">//id信息</span></span><br><span class="line"> <span class="type">float</span> <span class="variable">score</span> <span class="operator">=</span> hit.getScore();<span class="comment">//得分信息</span></span><br><span class="line"> <span class="type">TimeValue</span> <span class="variable">took</span> <span class="operator">=</span> searchResponse.getTook();</span><br><span class="line"> <span class="type">String</span> <span class="variable">sourceAsString</span> <span class="operator">=</span> hit.getSourceAsString();<span class="comment">//直接转化成对应的java对象</span></span><br><span class="line"> <span class="comment">//转换成Account对象</span></span><br><span class="line"> <span class="type">Account</span> <span class="variable">account</span> <span class="operator">=</span> JSON.parseObject(sourceAsString, Account.class);</span><br><span class="line"> System.out.println(<span class="string">&quot;Account:&quot;</span> + account);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//获取聚合分析的信息</span></span><br><span class="line"> <span class="comment">//获取年龄的分段信息</span></span><br><span class="line"> <span class="type">Aggregations</span> <span class="variable">aggregations</span> <span class="operator">=</span> searchResponse.getAggregations();</span><br><span class="line"> <span class="type">Terms</span> <span class="variable">ageAgg</span> <span class="operator">=</span> aggregations.get(<span class="string">&quot;ageAgg&quot;</span>);</span><br><span class="line"> <span class="keyword">for</span> (Terms.Bucket bucket : ageAgg.getBuckets()) &#123;</span><br><span class="line"></span><br><span class="line"> System.out.println(<span class="string">&quot;年龄:&quot;</span> + bucket.getKeyAsString() + <span class="string">&quot;有&quot;</span> + bucket.getDocCount() + <span class="string">&quot;人&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//获取薪资的平均值</span></span><br><span class="line"> <span class="type">Avg</span> <span class="variable">balanceAvg</span> <span class="operator">=</span> aggregations.get(<span class="string">&quot;balanceAvg&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;平均薪资:&quot;</span> + balanceAvg.getValue());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@ToString</span></span><br><span class="line"> <span class="meta">@Data</span></span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">class</span> <span class="title class_">Account</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> account_number;</span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> balance;</span><br><span class="line"> <span class="keyword">private</span> String firstname;</span><br><span class="line"> <span class="keyword">private</span> String lastname;</span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> age;</span><br><span class="line"> <span class="keyword">private</span> String gender;</span><br><span class="line"> <span class="keyword">private</span> String address;</span><br><span class="line"> <span class="keyword">private</span> String employer;</span><br><span class="line"> <span class="keyword">private</span> String email;</span><br><span class="line"> <span class="keyword">private</span> String city;</span><br><span class="line"> <span class="keyword">private</span> String state;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="meta">@Data</span></span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">class</span> <span class="title class_">User</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> String userName;</span><br><span class="line"> <span class="keyword">private</span> String gender;</span><br><span class="line"> <span class="keyword">private</span> Integer age;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">User</span><span class="params">(String userName, String gender, Integer age)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.userName = userName;</span><br><span class="line"> <span class="built_in">this</span>.gender = gender;</span><br><span class="line"> <span class="built_in">this</span>.age = age;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>ElasticSearch</tag>
</tags>
</entry>
<entry>
<title>MySQL5.7安装教程</title>
<url>/posts/17259.html</url>
<content><![CDATA[<h2 id="1-下载的地址"><a href="#1-下载的地址" class="headerlink" title="1.下载的地址"></a>1.下载的地址</h2><p>下载之后直接解压使用下载之前看电脑上有没有mysql的服务,如果有先删除),解压的文件路径最好不要有中文</p>
<p>查看的方式</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">Win + R 输入 services.msc 回车打开 找是否有一个名为mysqld的服务</span><br></pre></td></tr></table></figure>
<p>删除的指令</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">sc delete mysql</span><br></pre></td></tr></table></figure>
<p>Mysql5.7地址:<a href="https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.19-winx64.zip">https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.19-winx64.zip</a></p>
<h2 id="2-配置环境变量"><a href="#2-配置环境变量" class="headerlink" title="2.配置环境变量"></a>2.配置环境变量</h2><p>添加环境变量 : 电脑-属性-高级系统设置-环境变量在Path 环境变量增加mysql的安装目录\bin目录</p>
<h2 id="3-在mysql的安装目录下创建my-ini文件"><a href="#3-在mysql的安装目录下创建my-ini文件" class="headerlink" title="3.在mysql的安装目录下创建my.ini文件"></a>3.在mysql的安装目录下创建my.ini文件</h2><p><img src="/pictures/image-20230312152323079.png" alt="image-20230312152323079"></p>
<p>my.ini</p>
<figure class="highlight ini"><table><tr><td class="code"><pre><span class="line"><span class="section">[client]</span></span><br><span class="line"><span class="attr">port</span>=<span class="number">3306</span></span><br><span class="line"><span class="attr">default-character-set</span>=utf8</span><br><span class="line"><span class="section">[mysqld]</span></span><br><span class="line"><span class="comment"># 设置为自己MYSQL的安装目录</span></span><br><span class="line"><span class="attr">basedir</span>=C:\mysql\mysql-<span class="number">5.7</span>.<span class="number">19</span>-winx64\</span><br><span class="line"><span class="comment"># 设置为MYSQL的数据目录,这个目录系统帮我们创建</span></span><br><span class="line"><span class="attr">datadir</span>=C:\mysql\mysql-<span class="number">5.7</span>.<span class="number">19</span>-winx64\data\</span><br><span class="line"><span class="attr">port</span>=<span class="number">3306</span></span><br><span class="line"><span class="attr">character_set_server</span>=utf8</span><br><span class="line"><span class="comment">#跳过安全检查,注释后需要输入正确的用户名和密码才能登录</span></span><br><span class="line"><span class="comment">#第一登录不要注释掉,第一次进入没有设置密码,就可以不用输入密码了</span></span><br><span class="line"><span class="comment">#skip-grant-tables</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="4-下载服务和初始化数据库"><a href="#4-下载服务和初始化数据库" class="headerlink" title="4.下载服务和初始化数据库"></a>4.下载服务和初始化数据库</h2><p>1.下载mysql的服务</p>
<p> 使用<strong>管理员身份</strong>打开 cmd , 并切换到mysql-5.7.19-winx64\bin 目录下, 执行 mysqld -install</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">cd **/**/**/mysql-5.7.19-winx64\bin</span><br><span class="line">mysqld -install</span><br></pre></td></tr></table></figure>
<p>2.初始化数据 </p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">mysqld --initialize-insecure --user=mysql</span><br></pre></td></tr></table></figure>
<h2 id="5-启动和停止mysql的服务"><a href="#5-启动和停止mysql的服务" class="headerlink" title="5.启动和停止mysql的服务"></a>5.启动和停止mysql的服务</h2><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">#开启mysql的服务</span><br><span class="line">net start mysql</span><br><span class="line">#停止mysql的服务</span><br><span class="line">net stop mysql</span><br></pre></td></tr></table></figure>
<h2 id="6-修改账户和密码"><a href="#6-修改账户和密码" class="headerlink" title="6.修改账户和密码"></a>6.修改账户和密码</h2><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">#9. 进入mysql 管理终端: 初次登录没有密码,直接按两下回车键进入</span><br><span class="line">mysql -u root -p</span><br><span class="line">进入之后执行:</span><br><span class="line">use mysql;</span><br><span class="line">update user set authentication_string=password(&#x27;123456&#x27;) where user=&#x27;root&#x27; and Host=&#x27;localhost&#x27;;</span><br><span class="line">flush privileges; #刷新权限</span><br><span class="line">quit #退出</span><br></pre></td></tr></table></figure>
<p>注释掉my.ini中的跳过权限检查 #skip-grant-tables </p>
<h2 id="7-重启mysql的服务"><a href="#7-重启mysql的服务" class="headerlink" title="7.重启mysql的服务"></a>7.重启mysql的服务</h2><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">net stop mysql</span><br><span class="line">net start mysql</span><br><span class="line">mysql -u root -p #输入刚才设置的密码进入mysql服务</span><br></pre></td></tr></table></figure>
<p>安装失败,删除服务,重新安装</p>
<h2 id="8-可视化工具"><a href="#8-可视化工具" class="headerlink" title="8.可视化工具"></a>8.可视化工具</h2><p>推荐SQLyog Navicat </p>
<p><a href="https://wwvc.lanzouy.com/iJTRn0wwz9fe">网盘地址</a></p>
<h2 id="PDF版本的教程-来源于韩顺平教育-转载注明出处"><a href="#PDF版本的教程-来源于韩顺平教育-转载注明出处" class="headerlink" title="PDF版本的教程(来源于韩顺平教育,转载注明出处)"></a>PDF版本的教程(来源于韩顺平教育,转载注明出处)</h2>
<div class="row">
<embed src="/pdf/MySQL5.7.19安装.pdf" width="100%" height="550" type="application/pdf">
</div>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>Mysql</tag>
</tags>
</entry>
<entry>
<title>Linux设置静态IP</title>
<url>/posts/21883.html</url>
<content><![CDATA[<h2 id="1-查看IP的状态"><a href="#1-查看IP的状态" class="headerlink" title="1.查看IP的状态"></a>1.查看IP的状态</h2><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看是否为静态ip</span></span><br><span class="line">ip addr</span><br></pre></td></tr></table></figure>
<p>如图所示的是动态IP我们要配置静态IP</p>
<p><img src="/pictures/image-20230511230406172.png" alt="image-20230511230406172"></p>
<h2 id="2-设置网络"><a href="#2-设置网络" class="headerlink" title="2.设置网络"></a>2.设置网络</h2><h3 id="2-1-进入配置文件对网络进行配置"><a href="#2-1-进入配置文件对网络进行配置" class="headerlink" title="2.1 进入配置文件对网络进行配置"></a>2.1 进入配置文件对网络进行配置</h3><p>1.修改配置文件中的配置</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">进入配置文件的命令</span></span><br><span class="line">vim /etc/sysconfig/network-scripts/ifcfg-ens33</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230511233324998.png" alt="image-20230511233324998"></p>
<p>2.重启网络</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">重启网络的配置</span></span><br><span class="line">systemctl restart network</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看设置的IP情况</span></span><br><span class="line">ifconfig</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230511233838595.png" alt="image-20230511233838595"></p>
<p>在主机上使用ping命令ping 刚才的设置的静态IP也可以ping通</p>
<p><img src="/pictures/image-20230511234154523.png" alt="image-20230511234154523"></p>
<p>虚拟机ping外部也可以ping通</p>
<p><img src="/pictures/image-20230511235621228.png" alt="image-20230511235621228"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>Linux</tag>
</tags>
</entry>
<entry>
<title>MybatisX插件的使用</title>
<url>/posts/24606.html</url>
<content><![CDATA[<p>代码生成器 根据数据库表生成Mapper接口Mapper配置文件service </p>
<p>注解 mybatisPlus提供的注解</p>
<p>公共字段的自动填充 逻辑删除 乐观锁 雪花算法生成主键</p>
<p><img src="/pictures/image-20230321181437910.png" alt="image-20230321181437910"></p>
<p><img src="/pictures/image-20230321181452909.png" alt="image-20230321181452909"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>插件</tag>
</tags>
</entry>
<entry>
<title>Mybatis-Plus的使用教程</title>
<url>/posts/53306.html</url>
<content><![CDATA[<p><strong>官方文档:<a href="https://www.baomidou.com/">MyBatis-Plus</a></strong></p>
<h1 id="常用插件"><a href="#常用插件" class="headerlink" title="常用插件"></a>常用插件</h1><h2 id="1-公共字段填充"><a href="#1-公共字段填充" class="headerlink" title="1.公共字段填充"></a>1.公共字段填充</h2><p> <strong>对于每个实体类共有的属性字段例如创建时间、修改时间、创建人、修改人我们可以使用公共字段填充来统一填充这些字段这样我们在创建这些实体类的对象的时候就不需要set这些属性实现丝滑开发</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@TableField(fill = FieldFill.INSERT)</span> <span class="comment">//插入的时候填充</span></span><br><span class="line"><span class="keyword">private</span> String gmtCreate;</span><br><span class="line"><span class="meta">@TableField(fill = FieldFill.INSERT_UPDATE)</span><span class="comment">//插入和修改的时候填充</span></span><br><span class="line"><span class="keyword">private</span> String gmtModified;</span><br></pre></td></tr></table></figure>
<p>第一种配置的方法</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.itheima.config;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;</span><br><span class="line"><span class="keyword">import</span> org.apache.ibatis.reflection.MetaObject;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Component;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.time.LocalDateTime;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/25</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 公共字段填充的配置</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MyMetaObjectHandler</span> <span class="keyword">implements</span> <span class="title class_">MetaObjectHandler</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 插入时的字段填充</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> metaObject 元对象</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">insertFill</span><span class="params">(MetaObject metaObject)</span> &#123;</span><br><span class="line"> <span class="comment">//创建时间的字段填充</span></span><br><span class="line"> metaObject.setValue(<span class="string">&quot;gmtCreate&quot;</span>, LocalDateTime.now());</span><br><span class="line"> <span class="comment">//修改时间的字段填充</span></span><br><span class="line"> metaObject.setValue(<span class="string">&quot;gmtModified&quot;</span>, LocalDateTime.now());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 修改时的字段填充</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> metaObject 元对象</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">updateFill</span><span class="params">(MetaObject metaObject)</span> &#123;</span><br><span class="line"> <span class="comment">//修改时间的字段填充</span></span><br><span class="line"> metaObject.setValue(<span class="string">&quot;gmtModified&quot;</span>, LocalDateTime.now());</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>第二种配置的方法</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MyMetaObjectHandler</span> <span class="keyword">implements</span> <span class="title class_">MetaObjectHandler</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">insertFill</span><span class="params">(MetaObject metaObject)</span> &#123;</span><br><span class="line"> <span class="comment">// 起始版本 3.3.0(推荐使用)</span></span><br><span class="line"> <span class="built_in">this</span>.strictInsertFill(metaObject, <span class="string">&quot;createTime&quot;</span>, LocalDateTime.class, LocalDateTime.now()); </span><br><span class="line"> <span class="comment">// 或者</span></span><br><span class="line"> <span class="built_in">this</span>.strictInsertFill(metaObject, <span class="string">&quot;createTime&quot;</span>, () -&gt; LocalDateTime.now(), LocalDateTime.class); <span class="comment">// 起始版本 3.3.3(推荐)</span></span><br><span class="line"> <span class="comment">// 或者</span></span><br><span class="line"> <span class="comment">// 也可以使用(3.3.0 该方法有bug)</span></span><br><span class="line"> <span class="built_in">this</span>.fillStrategy(metaObject, <span class="string">&quot;createTime&quot;</span>, LocalDateTime.now()); </span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">updateFill</span><span class="params">(MetaObject metaObject)</span> &#123;</span><br><span class="line"> <span class="comment">// 起始版本 3.3.0(推荐)</span></span><br><span class="line"> <span class="built_in">this</span>.strictUpdateFill(metaObject, <span class="string">&quot;updateTime&quot;</span>, LocalDateTime.class, LocalDateTime.now());</span><br><span class="line"> <span class="comment">// 或者</span></span><br><span class="line"> <span class="built_in">this</span>.strictUpdateFill(metaObject, <span class="string">&quot;updateTime&quot;</span>, () -&gt; LocalDateTime.now(), LocalDateTime.class); <span class="comment">// 起始版本 3.3.3(推荐)</span></span><br><span class="line"> <span class="comment">// 或者</span></span><br><span class="line"> <span class="comment">// 也可以使用(3.3.0 该方法有bug)</span></span><br><span class="line"> <span class="built_in">this</span>.fillStrategy(metaObject, <span class="string">&quot;updateTime&quot;</span>, LocalDateTime.now()); </span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="2-逻辑删除"><a href="#2-逻辑删除" class="headerlink" title="2.逻辑删除"></a>2.逻辑删除</h2><p><strong>1.配置全局的配置文件(可以省略)</strong></p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">mybatis-plus:</span></span><br><span class="line"> <span class="attr">global-config:</span></span><br><span class="line"> <span class="attr">db-config:</span></span><br><span class="line"> <span class="attr">logic-delete-value:</span> <span class="number">1</span> <span class="comment"># 逻辑已删除值(默认为 1)</span></span><br><span class="line"> <span class="attr">logic-not-delete-value:</span> <span class="number">0</span> <span class="comment"># 逻辑未删除值(默认为 0)</span></span><br></pre></td></tr></table></figure>
<p><strong>2.配置逻辑删除的组件(3.1.1版本之后不需要这一步,可以省略)</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.core.injector.ISqlInjector;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Bean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MyBatisPlusConfiguration</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> ISqlInjector <span class="title function_">sqlInjector</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">LogicSqlInjector</span>();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>3.在实体类上逻辑删除的字段上加上逻辑删除的注解</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//value:表示不删除对应的值</span></span><br><span class="line"><span class="comment">//delval:表示删除对应的值</span></span><br><span class="line"><span class="comment">//正常的情况下1代表删除0代表未删除这里我们没有使用这个规则下面设置的是自己的规则</span></span><br><span class="line"><span class="meta">@TableLogic(value = &quot;1&quot;,delval = &quot;0&quot;)</span></span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>SSM</tag>
</tags>
</entry>
<entry>
<title>SSM框架基础知识及整合</title>
<url>/posts/56742.html</url>
<content><![CDATA[<p>PDF版本的笔记</p>
<p>Mybatis</p>
<div class="row">
<embed src="/pdf/MyBatis.pdf" width="100%" height="550" type="application/pdf">
</div>
<p>Spring SpringMVC MyBatis</p>
<div class="row">
<embed src="/pdf/SSM整合.pdf" width="100%" height="550" type="application/pdf">
</div>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>SSM</tag>
</tags>
</entry>
<entry>
<title>SpringBoot中使用定时任务</title>
<url>/posts/73.html</url>
<content><![CDATA[<h2 id="1-在启动类上添加-EnableScheduling注解"><a href="#1-在启动类上添加-EnableScheduling注解" class="headerlink" title="1.在启动类上添加@EnableScheduling注解"></a>1.在启动类上添加@EnableScheduling注解</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@EnableScheduling</span></span><br></pre></td></tr></table></figure>
<h2 id="2-创建定时任务类设置cron表达式"><a href="#2-创建定时任务类设置cron表达式" class="headerlink" title="2.创建定时任务类设置cron表达式"></a>2.创建定时任务类设置cron表达式</h2><p>定时任务可以单独建立一个包 package com.atguigu.schedule</p>
<p>加上@Component注解交给spring管理启动这个模块定时任务就开启了</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.schedule;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.scheduling.annotation.Scheduled;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Component;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/3/29</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 定时任务</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ScheduledTask</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//每隔五秒执行这个方法</span></span><br><span class="line"> <span class="comment">//&quot;0/5 * * * * ?&quot; 是corn表达式</span></span><br><span class="line"> <span class="meta">@Scheduled(cron = &quot;0/5 * * * * ?&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">tesSchedule</span><span class="params">()</span>&#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;定时任务执行了....&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230329184540977.png" alt="image-20230329184540977"></p>
<h2 id="3-Corn表达式-七子-七域-表达式-生成工具"><a href="#3-Corn表达式-七子-七域-表达式-生成工具" class="headerlink" title="3.Corn表达式(七子[七域]表达式)生成工具"></a>3.Corn表达式(七子[七域]表达式)生成工具</h2><p>网址: <a href="https://cron.qqe2.com/">https://cron.qqe2.com/</a></p>
<p><img src="/pictures/image-20230329184618098.png" alt="image-20230329184618098"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>SpringBoot</tag>
</tags>
</entry>
<entry>
<title>SpringBoot中整合Swagger2</title>
<url>/posts/32246.html</url>
<content><![CDATA[<h2 id="1-Swagger2的介绍"><a href="#1-Swagger2的介绍" class="headerlink" title="1.Swagger2的介绍"></a>1.Swagger2的介绍</h2><p>什么是swagger2</p>
<p>编写和维护接口文档是每个程序员的职责根据Swagger2可以快速帮助我们编写最新的API接口文档再也不用担心开会前仍忙于整理各种资料了间接提升了团队开发的沟通效率。</p>
<p>常用注解</p>
<p>swagger通过注解表明该接口会生成文档包括接口名、请求方法、参数、返回信息等等</p>
<p> @Api修饰整个类描述Controller的作用</p>
<p> @ApiOperation描述一个类的一个方法或者说一个接口</p>
<p> @ApiParam单个参数描述</p>
<p> @ApiModel用对象来接收参数</p>
<p> @ApiModelProperty用对象接收参数时描述对象的一个字段</p>
<p> @ApiImplicitParam一个请求参数</p>
<p> @ApiImplicitParams多个请求参数</p>
<h2 id="2-SpringBoot中使用Swagger"><a href="#2-SpringBoot中使用Swagger" class="headerlink" title="2.SpringBoot中使用Swagger"></a>2.SpringBoot中使用Swagger</h2><h3 id="2-1导入相关的依赖"><a href="#2-1导入相关的依赖" class="headerlink" title="2.1导入相关的依赖"></a>2.1导入相关的依赖</h3><p>注意Swagger2和SpringBoot存在版本兼容的问题选择的时候要根据SpringBoot的版本进行选择</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>io.springfox<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>springfox-swagger2<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.7.0<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>io.springfox<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>springfox-swagger-ui<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.7.0<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-2创建配置类"><a href="#2-2创建配置类" class="headerlink" title="2.2创建配置类"></a>2.2创建配置类</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="meta">@EnableSwagger2</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Swagger2</span> &#123;</span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> Docket <span class="title function_">adminApiConfig</span><span class="params">()</span>&#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">Docket</span>(DocumentationType.SWAGGER_2)</span><br><span class="line"> .groupName(<span class="string">&quot;adminApi&quot;</span>)</span><br><span class="line"> .apiInfo(apiInfo())</span><br><span class="line"> .select()</span><br><span class="line"> <span class="comment">//只显示admin路径下的页面</span></span><br><span class="line"> .paths(Predicates.and(PathSelectors.regex(<span class="string">&quot;/admin/.*&quot;</span>)))<span class="comment">// .paths(PathSelectors.any())表示所有</span></span><br><span class="line"> .build();</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> ApiInfo <span class="title function_">apiInfo</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">ApiInfoBuilder</span>()</span><br><span class="line"> .title(<span class="string">&quot;后台管理系统-API文档&quot;</span>)</span><br><span class="line"> .description(<span class="string">&quot;本文档描述了后台管理系统微服务接口定义&quot;</span>)</span><br><span class="line"> .version(<span class="string">&quot;1.0&quot;</span>)</span><br><span class="line"> .contact(<span class="keyword">new</span> <span class="title class_">Contact</span>(<span class="string">&quot;GongChangjiang&quot;</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;2602183349@qq.com&quot;</span>))</span><br><span class="line"> .build();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-3配置包扫描的规则"><a href="#2-3配置包扫描的规则" class="headerlink" title="2.3配置包扫描的规则"></a>2.3配置包扫描的规则</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//在项目的启动类加上该注解,swagger就会扫描如下包下的controller方法,生成接口文档</span></span><br><span class="line"><span class="meta">@ComponentScan(basePackages = &quot;com.xxxx&quot;)</span></span><br></pre></td></tr></table></figure>
<h3 id="2-4使用接口文档"><a href="#2-4使用接口文档" class="headerlink" title="2.4使用接口文档"></a>2.4使用接口文档</h3><figure class="highlight tex"><table><tr><td class="code"><pre><span class="line">//浏览器访问该网址</span><br><span class="line">//这里的端口号是要生成接口文档端口的端口号</span><br><span class="line">http://localhost:8080/swagger-ui.html</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230412141010237.png" alt="image-20230412141010237"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>SpringBoot</tag>
</tags>
</entry>
<entry>
<title>MySql进阶教程</title>
<url>/posts/39654.html</url>
<content><![CDATA[<p><strong>全部的PDF笔记:</strong> <a href="https://qingling.icu/posts/50465.html">https://qingling.icu/posts/50465.html</a></p>
<p><strong>原视频地址:</strong> <a href="https://www.bilibili.com/video/BV1Kr4y1i7ru/?share_source=copy_web&vd_source=aee5e475191b69e6c781059ab6662584">黑马程序员 MySQL数据库入门到精通从mysql安装到mysql高级、mysql优化全囊括</a></p>
<h1 id="一-Mysql入门"><a href="#一-Mysql入门" class="headerlink" title="一.Mysql入门"></a>一.Mysql入门</h1><h2 id="1-SQL"><a href="#1-SQL" class="headerlink" title="1.SQL"></a>1.SQL</h2><p>全称 Structured Query Language结构化查询语言。操作关系型数据库的编程语言定义了一套操作关系型数据库统一标准 。</p>
<h3 id="1-1-SQL通用语法"><a href="#1-1-SQL通用语法" class="headerlink" title="1.1 SQL通用语法"></a>1.1 SQL通用语法</h3><p><img src="/pictures/image-20230926220120609.png" alt="image-20230926220120609"></p>
<h3 id="1-2-SQL分类"><a href="#1-2-SQL分类" class="headerlink" title="1.2 SQL分类"></a>1.2 SQL分类</h3><p><img src="/pictures/image-20230926215941275.png" alt="image-20230926215941275"></p>
<h3 id="1-3-DDL-数据定义语言"><a href="#1-3-DDL-数据定义语言" class="headerlink" title="1.3 DDL-数据定义语言"></a>1.3 DDL-数据定义语言</h3><p><strong>连接本地mysql的命令</strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">mysql -u root -p</span><br></pre></td></tr></table></figure>
<p><strong>常用的DDL操作</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- ------------------------------------------------------数据库的操作------------------------------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 展示所有的数据库</span></span><br><span class="line"><span class="keyword">show</span> databases ;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询当前的数据库</span></span><br><span class="line"><span class="keyword">select</span> database();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建数据库</span></span><br><span class="line"><span class="keyword">create</span> database if <span class="keyword">not</span> <span class="keyword">exists</span> itcast;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除数据库</span></span><br><span class="line"><span class="keyword">drop</span> database if <span class="keyword">exists</span> itcast;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 使用数据库</span></span><br><span class="line">use itcast;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- ----------------------------------------------------------表的操作--------------------------------------------------------------------</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建用户表</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> tb_user(id <span class="type">int</span> comment <span class="string">&#x27;编号&#x27;</span>, name <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;姓名&#x27;</span>, age <span class="type">int</span> comment <span class="string">&#x27;年龄&#x27;</span>,gender <span class="type">varchar</span>(<span class="number">1</span>) comment <span class="string">&#x27;性别&#x27;</span> ) comment <span class="string">&#x27;用户表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 显示创建表的结构</span></span><br><span class="line"><span class="keyword">desc</span> tb_user;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 显示创建表的语句</span></span><br><span class="line"><span class="keyword">show</span> <span class="keyword">create</span> <span class="keyword">table</span> tb_user;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除表</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">table</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改表的操作</span></span><br><span class="line"><span class="comment">-- 举例:现有一张员工表</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> emp(</span><br><span class="line"> id <span class="type">int</span> comment <span class="string">&#x27;编号&#x27;</span>,</span><br><span class="line"> workno <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;工号&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> gender <span class="type">char</span>(<span class="number">1</span>) comment <span class="string">&#x27;性别&#x27;</span>,</span><br><span class="line"> age tinyint unsigned comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> idcard <span class="type">char</span>(<span class="number">18</span>) comment <span class="string">&#x27;身份证号&#x27;</span>,</span><br><span class="line"> entrydate <span class="type">date</span> comment <span class="string">&#x27;入职时间&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;员工表&#x27;</span>;</span><br><span class="line"><span class="comment">-- 查看表结构</span></span><br><span class="line"><span class="keyword">desc</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改表结构(向emp表中添加昵称字段)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp <span class="keyword">add</span> nickname <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;昵称&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改相应字段的数据类型(把age的数据类型从int改回tinyint)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp modify age tinyint;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改字段名和字段的类型(把nicknem字段改为username,并修改数据类型)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp change nickname username <span class="type">varchar</span>(<span class="number">30</span>) comment <span class="string">&#x27;用户名&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除字段(删除username字段)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp <span class="keyword">drop</span> username;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改表名(将表名字从emo修改为employee)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp rename <span class="keyword">to</span> employee;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除表</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">table</span> if <span class="keyword">exists</span> employee;</span><br><span class="line"><span class="comment">-- 删除指定表,并重新创建该表(相当于删除表中的全部数据)</span></span><br><span class="line"><span class="keyword">truncate</span> <span class="keyword">table</span> employee;</span><br></pre></td></tr></table></figure>
<p><strong>Mysql的数据类型</strong></p>
<p>数值数据类型</p>
<p><img src="/pictures/image-20230926224723586.png" alt="image-20230926224723586"></p>
<p> 字符串数据类型</p>
<p> <img src="/pictures/image-20230926224755542.png" alt="image-20230926224755542"></p>
<p>日期时间类型</p>
<p> <img src="/pictures/image-20230926224539052.png" alt="image-20230926224539052"></p>
<h3 id="1-4-DML-数据操作语言"><a href="#1-4-DML-数据操作语言" class="headerlink" title="1.4 DML-数据操作语言"></a>1.4 DML-数据操作语言</h3><figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- ------------------------------------------------DML-增删改操作---------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 添加数据</span></span><br><span class="line"><span class="keyword">select</span> database();</span><br><span class="line"><span class="keyword">show</span> tables;</span><br><span class="line"><span class="comment">-- 该指定的字段添加数据</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> employee(id, workno, name, gender, age, idcard, entrydate) <span class="keyword">value</span> (<span class="number">1</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;小华&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;123456789123456789&#x27;</span>, <span class="string">&#x27;2001-01-01&#x27;</span>);</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> employee;</span><br><span class="line"><span class="comment">-- 给全部的字段添加数据</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> employee <span class="keyword">value</span> (<span class="number">2</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;小刚&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;123456784124456789&#x27;</span>, <span class="string">&#x27;2008-01-01&#x27;</span>);</span><br><span class="line"><span class="comment">-- 批量添加数据</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> employee</span><br><span class="line"><span class="keyword">values</span> (<span class="number">3</span>, <span class="string">&#x27;3&#x27;</span>, <span class="string">&#x27;小李&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;123456784124456789&#x27;</span>, <span class="string">&#x27;2008-01-01&#x27;</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;4&#x27;</span>, <span class="string">&#x27;小黄&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;123456784124456789&#x27;</span>, <span class="string">&#x27;2008-01-01&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改数据(不带条件修改所有)</span></span><br><span class="line"><span class="keyword">update</span> employee <span class="keyword">set</span> name <span class="operator">=</span> <span class="string">&#x27;张三&#x27;</span> <span class="keyword">where</span> id <span class="operator">=</span> <span class="number">1</span>;</span><br><span class="line"><span class="keyword">update</span> employee <span class="keyword">set</span> name <span class="operator">=</span> <span class="string">&#x27;李四&#x27;</span>, gender<span class="operator">=</span> <span class="string">&#x27;女&#x27;</span> <span class="keyword">where</span> id <span class="operator">=</span> <span class="number">1</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除数据(删除id为4的数据不带添加删除所有</span></span><br><span class="line"><span class="keyword">delete</span> <span class="keyword">from</span> employee <span class="keyword">where</span> id <span class="operator">=</span> <span class="number">4</span>;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h3 id="1-5-DQL-数据查询语言"><a href="#1-5-DQL-数据查询语言" class="headerlink" title="1.5 DQL-数据查询语言"></a>1.5 DQL-数据查询语言</h3><p><img src="/pictures/image-20230930222149036.png" alt="image-20230930222149036"></p>
<ul>
<li>基本查询(不带任何条件)</li>
<li>条件查询WHERE</li>
<li>聚合函数count、max、min、avg、sum</li>
<li>分组查询group by</li>
<li>排序查询order by</li>
<li>分页查询limit</li>
</ul>
<p><strong>测试数据准备</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 数据准备</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> emp(</span><br><span class="line"> id <span class="type">int</span> comment <span class="string">&#x27;编号&#x27;</span>,</span><br><span class="line"> workno <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;工号&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> gender <span class="type">char</span>(<span class="number">1</span>) comment <span class="string">&#x27;性别&#x27;</span>,</span><br><span class="line"> age tinyint unsigned comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> idcard <span class="type">char</span>(<span class="number">18</span>) comment <span class="string">&#x27;身份证号&#x27;</span>,</span><br><span class="line"> workaddress <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;工作地址&#x27;</span>,</span><br><span class="line"> entrydate <span class="type">date</span> comment <span class="string">&#x27;入职时间&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;员工表&#x27;</span>;</span><br><span class="line"><span class="comment">-- 插入数据</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> emp(id, workno, name, gender, age, idcard, workaddress,entrydate)</span><br><span class="line"><span class="keyword">values</span> (<span class="number">1</span>,<span class="string">&#x27;1&#x27;</span>,<span class="string">&#x27;柳岩&#x27;</span>,<span class="string">&#x27;女&#x27;</span>,<span class="number">20</span>,<span class="string">&#x27;12345678912345678&#x27;</span>,<span class="string">&#x27;北京&#x27;</span>,<span class="string">&#x27;2001-01-01&#x27;</span>),</span><br><span class="line"> (<span class="number">2</span>,<span class="string">&#x27;2&#x27;</span>,<span class="string">&#x27;张无忌&#x27;</span>,<span class="string">&#x27;男&#x27;</span>,<span class="number">18</span>,<span class="string">&#x27;123456789012345670&#x27;</span>,<span class="string">&#x27;北京&#x27;</span>,<span class="string">&#x27;2005-09-01&#x27;</span>),</span><br><span class="line"> (<span class="number">3</span>,<span class="string">&#x27;3&#x27;</span>,<span class="string">&#x27;韦一笑&#x27;</span>,<span class="string">&#x27;男&#x27;</span>,<span class="number">38</span>,<span class="string">&#x27;12345678972345670&#x27;</span>,<span class="string">&#x27;上海&#x27;</span>,<span class="string">&#x27;2005-08-01&#x27;</span>),</span><br><span class="line"> (<span class="number">4</span>,<span class="string">&#x27;4&#x27;</span>,<span class="string">&#x27;赵敏&#x27;</span>,<span class="string">&#x27;女&#x27;</span>,<span class="number">18</span>,<span class="string">&#x27;12345675712345670&#x27;</span>,<span class="string">&#x27;北京&#x27;</span>,<span class="string">&#x27;2009-12-01&#x27;</span>),</span><br><span class="line"> (<span class="number">5</span>,<span class="string">&#x27;5&#x27;</span>,<span class="string">&#x27;小昭&#x27;</span>,<span class="string">&#x27;女&#x27;</span>,<span class="number">16</span>,<span class="string">&#x27;123456769012345678&#x27;</span>,<span class="string">&#x27;上海&#x27;</span>,<span class="string">&#x27;2007-07-01&#x27;</span>),</span><br><span class="line"> (<span class="number">6</span>,<span class="string">&#x27;6&#x27;</span>,<span class="string">&#x27;杨逍&#x27;</span>,<span class="string">&#x27;男&#x27;</span>,<span class="number">28</span>,<span class="string">&#x27;1234567893123456X&#x27;</span>,<span class="string">&#x27;北京&#x27;</span>,<span class="string">&#x27;2006-01-01&#x27;</span>),</span><br><span class="line"> (<span class="number">7</span>,<span class="string">&#x27;7&#x27;</span>,<span class="string">&#x27;范瑶&#x27;</span>,<span class="string">&#x27;男&#x27;</span>,<span class="number">40</span>,<span class="string">&#x27;123456789212345670&#x27;</span>,<span class="string">&#x27;北京&#x27;</span>,<span class="string">&#x27;2005-05-01&#x27;</span>),</span><br><span class="line"> (<span class="number">8</span>,<span class="string">&#x27;8&#x27;</span>,<span class="string">&#x27;黛绮丝&#x27;</span>,<span class="string">&#x27;女&#x27;</span>,<span class="number">38</span>,<span class="string">&#x27;123456157123645670&#x27;</span>,<span class="string">&#x27;天津&#x27;</span>,<span class="string">&#x27;2015-05-01&#x27;</span>),</span><br><span class="line"> (<span class="number">9</span>,<span class="string">&#x27;9&#x27;</span>,<span class="string">&#x27;范凉凉&#x27;</span>,<span class="string">&#x27;女&#x27;</span>,<span class="number">45</span>,<span class="string">&#x27;123156789012345678&#x27;</span>,<span class="string">&#x27;北京&#x27;</span>,<span class="string">&#x27;2010-04-01&#x27;</span>),</span><br><span class="line"> (<span class="number">10</span>,<span class="string">&#x27;10&#x27;</span>,<span class="string">&#x27;陈友谅&#x27;</span>,<span class="string">&#x27;男&#x27;</span>,<span class="number">53</span>,<span class="string">&#x27;123456789012345670&#x27;</span>,<span class="string">&#x27;上海&#x27;</span>,<span class="string">&#x27;2011-01-01&#x27;</span>),</span><br><span class="line"> (<span class="number">11</span>,<span class="string">&#x27;11&#x27;</span>,<span class="string">&#x27;张士诚&#x27;</span>,<span class="string">&#x27;男&#x27;</span>,<span class="number">55</span>,<span class="string">&#x27;12356789712345670&#x27;</span>,<span class="string">&#x27;江苏&#x27;</span>,<span class="string">&#x27;2015-05-01&#x27;</span>),</span><br><span class="line"> (<span class="number">12</span>,<span class="string">&#x27;12&#x27;</span>,<span class="string">&#x27;常遇春&#x27;</span>,<span class="string">&#x27;男&#x27;</span>,<span class="number">32</span>,<span class="string">&#x27;123446757152345670&#x27;</span>,<span class="string">&#x27;北京&#x27;</span>,<span class="string">&#x27;2004-02-01&#x27;</span>),</span><br><span class="line"> (<span class="number">13</span>,<span class="string">&#x27;13&#x27;</span>,<span class="string">&#x27;张三丰&#x27;</span>,<span class="string">&#x27;男&#x27;</span>,<span class="number">88</span>,<span class="string">&#x27;123656789012345678&#x27;</span>,<span class="string">&#x27;江苏&#x27;</span>,<span class="string">&#x27;2020-11-01&#x27;</span>),</span><br><span class="line"> (<span class="number">14</span>,<span class="string">&#x27;14&#x27;</span>,<span class="string">&#x27;灭绝&#x27;</span>,<span class="string">&#x27;女&#x27;</span>,<span class="number">65</span>,<span class="string">&#x27;123456719012345670&#x27;</span>,<span class="string">&#x27;西安&#x27;</span>,<span class="string">&#x27;2019-05-01&#x27;</span>),</span><br><span class="line"> (<span class="number">15</span>,<span class="string">&#x27;15&#x27;</span>,<span class="string">&#x27;胡青年&#x27;</span>,<span class="string">&#x27;男&#x27;</span>,<span class="number">70</span>,<span class="string">&#x27;12345674971234567X&#x27;</span>,<span class="string">&#x27;西安&#x27;</span>,<span class="string">&#x27;2018-04-01&#x27;</span>),</span><br><span class="line"> (<span class="number">16</span>,<span class="string">&#x27;16&#x27;</span>,<span class="string">&#x27;周芷若&#x27;</span>,<span class="string">&#x27;女&#x27;</span>,<span class="number">18</span>,<span class="keyword">null</span>,<span class="string">&#x27;北京&#x27;</span>,<span class="string">&#x27;2012-06-01&#x27;</span>);</span><br></pre></td></tr></table></figure>
<h4 id="1-5-1-基础查询"><a href="#1-5-1-基础查询" class="headerlink" title="1.5.1 基础查询"></a>1.5.1 基础查询</h4><figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 查看插入的数据</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询指定字段 name workno age 返回</span></span><br><span class="line"><span class="keyword">select</span> name, workno, age</span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询所有字段返回</span></span><br><span class="line"><span class="keyword">select</span> id,</span><br><span class="line"> workno,</span><br><span class="line"> name,</span><br><span class="line"> gender,</span><br><span class="line"> age,</span><br><span class="line"> idcard,</span><br><span class="line"> workaddress,</span><br><span class="line"> entrydate</span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- distinct去重关键字</span></span><br><span class="line"><span class="comment">-- 查询所有员工的工作地址(不要重复的地址)</span></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">distinct</span> workaddress <span class="string">&#x27;工作地址&#x27;</span></span><br><span class="line"><span class="keyword">from</span> emp;</span><br></pre></td></tr></table></figure>
<h4 id="1-5-2-条件查询"><a href="#1-5-2-条件查询" class="headerlink" title="1.5.2 条件查询"></a>1.5.2 条件查询</h4><p>语法: <code>SELECT 字段列表 FROM 表名 WHERE 条件列表 ;</code></p>
<p><img src="/pictures/image-20231001154822524.png" alt="image-20231001154822524"></p>
<p><img src="/pictures/image-20231001154903121.png" alt="image-20231001154903121"></p>
<p><strong>举例</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 条件查询</span></span><br><span class="line"><span class="comment">-- 查询年龄等于 88 的员工</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">=</span> <span class="number">88</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄小于20的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&lt;</span> <span class="number">20</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄小于等于20的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&lt;=</span> <span class="number">20</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询没有身份证号的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> idcard <span class="keyword">is</span> <span class="keyword">null</span> ;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄不等于88的员工信息(&lt;&gt;也表示不等于)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">!=</span> <span class="number">88</span>;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&lt;&gt;</span> <span class="number">88</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄在15~20(包含)之间的员工信息(三种实现方式)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&gt;=</span> <span class="number">15</span> <span class="operator">&amp;&amp;</span> age <span class="operator">&lt;=</span> <span class="number">20</span>;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&gt;=</span> <span class="number">15</span> <span class="keyword">and</span> age <span class="operator">&lt;=</span> <span class="number">20</span>;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="keyword">between</span> <span class="number">15</span> <span class="keyword">and</span> <span class="number">20</span>; #包含了<span class="number">15</span>和<span class="number">20</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询性别为女 且年龄小于25岁的员工</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> gender <span class="operator">=</span> <span class="string">&#x27;女&#x27;</span> <span class="keyword">and</span> age <span class="operator">&lt;</span> <span class="number">25</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄等于18 或 20 或 48 的员工</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">=</span> <span class="number">18</span> <span class="keyword">or</span> age <span class="operator">=</span> <span class="number">20</span> <span class="keyword">or</span> age <span class="operator">=</span> <span class="number">48</span>;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="keyword">in</span> (<span class="number">18</span>,<span class="number">20</span>,<span class="number">48</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询姓名为两个字的员工(模糊匹配(_匹配单个字符, %匹配任意个字符))</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> name <span class="keyword">like</span> <span class="string">&#x27;__&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询身份证号最后一位是X的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> idcard <span class="keyword">like</span> <span class="string">&#x27;%X&#x27;</span>;</span><br></pre></td></tr></table></figure>
<h4 id="1-5-3-聚合函数"><a href="#1-5-3-聚合函数" class="headerlink" title="1.5.3 聚合函数"></a>1.5.3 聚合函数</h4><p>语法: <code>SELECT 聚合函数(字段列表) FROM 表名 ;</code></p>
<blockquote>
<p>注意 : NULL值是不参与所有聚合函数运算的</p>
</blockquote>
<p><img src="/pictures/image-20231001160812611.png" alt="image-20231001160812611"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 聚合函数</span></span><br><span class="line"><span class="comment">-- 统计该企业员工数量(空值是不参与统计的)</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">count</span>(<span class="operator">*</span>) <span class="keyword">from</span> emp;</span><br><span class="line"><span class="keyword">select</span> <span class="built_in">count</span>(idcard) <span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计该企业员工的平均年龄</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">avg</span>(age) <span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计该企业员工的最大年龄</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">max</span>(age) <span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计该企业员工的最小年龄</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">min</span>(age) <span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计西安地区员工的年龄之和</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">sum</span>(age) <span class="keyword">from</span> emp <span class="keyword">where</span> workaddress <span class="operator">=</span> <span class="string">&#x27;西安&#x27;</span>;</span><br></pre></td></tr></table></figure>
<h4 id="1-5-4-分组查询"><a href="#1-5-4-分组查询" class="headerlink" title="1.5.4 分组查询"></a>1.5.4 分组查询</h4><p>语法: <code>SELECT 字段列表 FROM 表名 [ WHERE 条件 ] GROUP BY 分组字段名 [ HAVING 分组 后过滤条件 ];</code></p>
<p><strong>where与having区别</strong></p>
<ul>
<li>执行时机不同where是分组之前进行过滤不满足where条件不参与分组而having是分组之后对结果进行过滤</li>
<li>判断条件不同where不能对聚合函数进行判断而having可以</li>
</ul>
<blockquote>
<p>注意事项:<br>• 分组之后,查询的字段一般为聚合函数和分组字段,查询其他字段无任何意义。<br>• 执行顺序: where &gt; 聚合函数 &gt; having 。<br>• 支持多字段分组, 具体语法为 : group by columnA,columnB</p>
</blockquote>
<p><img src="/pictures/image-20231001163315161.png" alt="image-20231001163315161"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 分组查询</span></span><br><span class="line"><span class="comment">-- 根据性别分组,统计男性员工和女性员工的数量</span></span><br><span class="line"><span class="keyword">select</span> gender, <span class="built_in">count</span>(<span class="operator">*</span>) <span class="keyword">from</span> emp <span class="keyword">group</span> <span class="keyword">by</span> gender;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 根据性别进行分组,统计男性员工和女性员工的平均年龄</span></span><br><span class="line"><span class="keyword">select</span> gender, <span class="built_in">avg</span>(age) <span class="keyword">from</span> emp <span class="keyword">group</span> <span class="keyword">by</span> gender;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄小于45岁的员工并根据工作地址分组获取员工数量大于等于3的工作地址(可以使用别名也可以不使用别名)</span></span><br><span class="line"><span class="keyword">select</span> workaddress,<span class="built_in">count</span>(<span class="operator">*</span>) address_count <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&lt;</span> <span class="number">45</span> <span class="keyword">group</span> <span class="keyword">by</span> workaddress <span class="keyword">having</span> address_count <span class="operator">&gt;=</span> <span class="number">3</span>;</span><br></pre></td></tr></table></figure>
<h4 id="1-5-5-排序查询"><a href="#1-5-5-排序查询" class="headerlink" title="1.5.5 排序查询"></a>1.5.5 排序查询</h4><p>语法: <code>SELECT 字段列表 FROM 表名 ORDER BY 字段1 排序方式1 , 字段2 排序方式2 ;</code></p>
<blockquote>
<p>注意事项:<br>• 如果是升序, 可以不指定排序方式ASC因为升序ASC是默认值 ;<br>• 如果是多字段排序,当第一个字段值相同时,才会根据第二个字段进行排序 ;</p>
</blockquote>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 排序查询</span></span><br><span class="line"><span class="comment">-- 根据年龄对公司的员工进行升序排序(asc可以省略)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">order</span> <span class="keyword">by</span> age ;</span><br><span class="line"><span class="comment">-- 降序排序</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">order</span> <span class="keyword">by</span> age <span class="keyword">desc</span> ;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 根据员工的入职时间降序排序</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">order</span> <span class="keyword">by</span> entrydate <span class="keyword">desc</span> ;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 根据员工的年龄升序排序,年龄相同,再按照入职时间进行降序排序</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">order</span> <span class="keyword">by</span> age <span class="keyword">asc</span> ,entrydate <span class="keyword">desc</span> ;</span><br></pre></td></tr></table></figure>
<h4 id="1-5-6-分页查询"><a href="#1-5-6-分页查询" class="headerlink" title="1.5.6 分页查询"></a>1.5.6 分页查询</h4><p>语法: <code>SELECT 字段列表 FROM 表名 LIMIT 起始索引, 查询记录数 ;</code></p>
<blockquote>
<p>注意事项:<br>• 起始索引从0开始起始索引 &#x3D; (查询页码 - 1* 每页显示记录数。<br>• 分页查询是数据库的方言不同的数据库有不同的实现MySQL中是LIMIT。<br>• 如果查询的是第一页数据,起始索引可以省略,直接简写为 limit 10。</p>
</blockquote>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 分页查询</span></span><br><span class="line"><span class="comment">-- 查询第一页的员工数据每页显示10条记录</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp limit <span class="number">0</span>,<span class="number">10</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询第二页数据,每页展示十条数据(起始索引 = (查询页码 - 1* 每页显示记录数)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp limit <span class="number">10</span>,<span class="number">10</span>;</span><br></pre></td></tr></table></figure>
<h4 id="1-5-7-DQL语句案例"><a href="#1-5-7-DQL语句案例" class="headerlink" title="1.5.7 DQL语句案例"></a>1.5.7 DQL语句案例</h4><figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- DQL语句案例</span></span><br><span class="line"><span class="comment">-- 查询年龄在20,21,22,23岁的女性员工的信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> gender <span class="operator">=</span> <span class="string">&#x27;女&#x27;</span> <span class="keyword">and</span> age <span class="keyword">in</span> (<span class="number">20</span>,<span class="number">21</span>,<span class="number">22</span>,<span class="number">23</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询性别为男并且年龄再20~40岁(含)以内的姓名为三个字的员工</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> gender <span class="operator">=</span> <span class="string">&#x27;男&#x27;</span> <span class="keyword">and</span> (age <span class="keyword">between</span> <span class="number">20</span> <span class="keyword">and</span> <span class="number">40</span>) <span class="keyword">and</span> name <span class="keyword">like</span> <span class="string">&#x27;___&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计员工表中年龄小于60岁的男性员工和女性员工的人数</span></span><br><span class="line"><span class="keyword">select</span> gender,<span class="built_in">count</span>(<span class="operator">*</span>) <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&lt;</span> <span class="number">60</span> <span class="keyword">group</span> <span class="keyword">by</span> gender;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询所有年龄小于等于35岁员工的姓名和年龄并对查询结果按年龄升序排序如果年龄相同按照入职时间降序排序</span></span><br><span class="line"><span class="keyword">select</span> name,age <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&lt;=</span> <span class="number">35</span> <span class="keyword">order</span> <span class="keyword">by</span> age <span class="keyword">asc</span> ,entrydate <span class="keyword">desc</span> ;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询性别为男,且年龄在20·40岁(含)以内的前五个员工信息,并对查询结果按年龄升序排序,如果年龄相同按照入职时间升序排序</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> gender <span class="operator">=</span> <span class="string">&#x27;男&#x27;</span> <span class="keyword">and</span> age <span class="keyword">between</span> <span class="number">20</span> <span class="keyword">and</span> <span class="number">40</span> <span class="keyword">order</span> <span class="keyword">by</span> age,entrydate limit <span class="number">5</span>;</span><br></pre></td></tr></table></figure>
<h4 id="1-5-8-执行顺序"><a href="#1-5-8-执行顺序" class="headerlink" title="1.5.8 执行顺序"></a>1.5.8 执行顺序</h4><p><img src="/pictures/image-20231001171425562.png" alt="image-20231001171425562"></p>
<p><img src="/pictures/image-20231001172032063.png" alt="image-20231001172032063"></p>
<p><strong>总结</strong></p>
<p> <img src="/pictures/image-20231001172211635.png" alt="image-20231001172211635"></p>
<h3 id="1-6-DCL-数据控制语言"><a href="#1-6-DCL-数据控制语言" class="headerlink" title="1.6 DCL-数据控制语言"></a>1.6 DCL-数据控制语言</h3><h4 id="1-6-1-管理用户"><a href="#1-6-1-管理用户" class="headerlink" title="1.6.1 管理用户"></a>1.6.1 管理用户</h4><p>查询用户: <code>select * from mysql.user;</code></p>
<p>创建用户:<code>CREATE USER &#39;用户名&#39;@&#39;主机名&#39; IDENTIFIED BY &#39;密码&#39;;</code></p>
<p>修改用户密码: <code>ALTER USER &#39;用户名&#39;@&#39;主机名&#39; IDENTIFIED WITH mysql_native_password BY &#39;新密码&#39; ;</code></p>
<p>删除用户:<code>DROP USER &#39;用户名&#39;@&#39;主机名&#39; ;</code></p>
<p><img src="/pictures/image-20231001172731731.png" alt="image-20231001172731731"></p>
<blockquote>
<p>注意事项:<br>• 在MySQL中需要通过用户名@主机名的方式,来唯一标识一个用户</p>
<p>• 主机名可以使用 % 通配</p>
<p>• 这类SQL开发人员操作的比较少主要是DBA Database Administrator 数据库管理员)使用</p>
</blockquote>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 切换到系统中自带的mysql数据库</span></span><br><span class="line">use mysql;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询所有的用户</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> mysql.user;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建用户itcast, 只能够在当前主机localhost访问, 密码123456;</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">user</span> <span class="string">&#x27;itcast&#x27;</span>@<span class="string">&#x27;localhost&#x27;</span> identified <span class="keyword">by</span> <span class="string">&#x27;123456&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建用户heima, 可以在任意主机访问该数据库, 密码123456;</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">user</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span> identified <span class="keyword">by</span> <span class="string">&#x27;123456&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改用户heima的访问密码为1234;</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">user</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span> identified <span class="keyword">with</span> mysql_native_password <span class="keyword">by</span> <span class="string">&#x27;1234&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除 itcast@localhost 用户</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">user</span> <span class="string">&#x27;itcast&#x27;</span>@<span class="string">&#x27;localhost&#x27;</span>;</span><br></pre></td></tr></table></figure>
<h4 id="1-6-2-权限控制"><a href="#1-6-2-权限控制" class="headerlink" title="1.6.2 权限控制"></a>1.6.2 权限控制</h4><p>查询权限: <code>SHOW GRANTS FOR &#39;用户名&#39;@&#39;主机名&#39; ;</code></p>
<p>授予权限: <code>GRANT 权限列表 ON 数据库名.表名 TO &#39;用户名&#39;@&#39;主机名&#39;;</code></p>
<p>撤销权限: <code>REVOKE 权限列表 ON 数据库名.表名 FROM &#39;用户名&#39;@&#39;主机名&#39;;</code></p>
<blockquote>
<p>注意事项:<br>• 多个权限之间,使用逗号分隔<br>• 授权时, 数据库名和表名可以使用 * 进行通配,代表所有</p>
</blockquote>
<p><img src="/pictures/image-20231001174406029.png" alt="image-20231001174406029"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 权限控制</span></span><br><span class="line"><span class="comment">-- 查询权限(查询heima用户的所有权限)</span></span><br><span class="line"><span class="keyword">show</span> grants <span class="keyword">for</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 授予权限(授予heima用户对数据库itcast的所有权限)</span></span><br><span class="line"><span class="keyword">grant</span> <span class="keyword">all</span> <span class="keyword">on</span> itcast.<span class="operator">*</span> <span class="keyword">to</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 授予用户所有数据库所有表的所有权限(相当于超级管理员)</span></span><br><span class="line"><span class="keyword">grant</span> <span class="keyword">all</span> <span class="keyword">on</span> <span class="operator">*</span>.<span class="operator">*</span> <span class="keyword">to</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 撤销权限(撤销heima用户在itcast数据库上的所有权限)</span></span><br><span class="line"><span class="keyword">revoke</span> <span class="keyword">all</span> <span class="keyword">on</span> itcast.<span class="operator">*</span> <span class="keyword">from</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span>;</span><br></pre></td></tr></table></figure>
<p><strong>总结</strong></p>
<p> <img src="/pictures/image-20231001213059144.png" alt="image-20231001213059144"></p>
<p><strong>全部的SQL</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- ------------------------------------------------------数据库的操作------------------------------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 展示所有的数据库</span></span><br><span class="line"><span class="keyword">show</span> databases;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询当前的数据库</span></span><br><span class="line"><span class="keyword">select</span> database();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建数据库</span></span><br><span class="line"><span class="keyword">create</span> database if <span class="keyword">not</span> <span class="keyword">exists</span> itcast;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除数据库</span></span><br><span class="line"><span class="keyword">drop</span> database if <span class="keyword">exists</span> itcast;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 使用数据库</span></span><br><span class="line">use itcast;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- ----------------------------------------------------------表的操作--------------------------------------------------------------------</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建用户表</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> tb_user</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> comment <span class="string">&#x27;编号&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> gender <span class="type">varchar</span>(<span class="number">1</span>) comment <span class="string">&#x27;性别&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;用户表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 显示创建表的结构</span></span><br><span class="line"><span class="keyword">desc</span> tb_user;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 显示创建表的语句</span></span><br><span class="line"><span class="keyword">show</span> <span class="keyword">create</span> <span class="keyword">table</span> tb_user;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除表</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">table</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改表的操作</span></span><br><span class="line"><span class="comment">-- 举例:现有一张员工表</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> emp</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> comment <span class="string">&#x27;编号&#x27;</span>,</span><br><span class="line"> workno <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;工号&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> gender <span class="type">char</span>(<span class="number">1</span>) comment <span class="string">&#x27;性别&#x27;</span>,</span><br><span class="line"> age tinyint unsigned comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> idcard <span class="type">char</span>(<span class="number">18</span>) comment <span class="string">&#x27;身份证号&#x27;</span>,</span><br><span class="line"> entrydate <span class="type">date</span> comment <span class="string">&#x27;入职时间&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;员工表&#x27;</span>;</span><br><span class="line"><span class="comment">-- 查看表结构</span></span><br><span class="line"><span class="keyword">desc</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改表结构(向emp表中添加昵称字段)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp</span><br><span class="line"> <span class="keyword">add</span> nickname <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;昵称&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改相应字段的数据类型(把age的数据类型从int改回tinyint)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp</span><br><span class="line"> modify age tinyint;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改字段名和字段的类型(把nickname字段改为username,并修改数据类型)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp</span><br><span class="line"> change nickname username <span class="type">varchar</span>(<span class="number">30</span>) comment <span class="string">&#x27;用户名&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除字段(删除username字段)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp</span><br><span class="line"> <span class="keyword">drop</span> username;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改表名(将表名字从emo修改为employee)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp rename <span class="keyword">to</span> employee;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除表</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">table</span> if <span class="keyword">exists</span> employee;</span><br><span class="line"><span class="comment">-- 删除指定表,并重新创建该表(相当于删除表中的全部数据)</span></span><br><span class="line"><span class="keyword">truncate</span> <span class="keyword">table</span> employee;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- ------------------------------------------------DML-增删改操作---------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 添加数据</span></span><br><span class="line"><span class="keyword">select</span> database();</span><br><span class="line"><span class="keyword">show</span> tables;</span><br><span class="line"><span class="comment">-- 该指定的字段添加数据</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> employee(id, workno, name, gender, age, idcard, entrydate) <span class="keyword">value</span> (<span class="number">1</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;小华&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;123456789123456789&#x27;</span>, <span class="string">&#x27;2001-01-01&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> employee;</span><br><span class="line"><span class="comment">-- 给全部的字段添加数据</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> employee <span class="keyword">value</span> (<span class="number">2</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;小刚&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;123456784124456789&#x27;</span>, <span class="string">&#x27;2008-01-01&#x27;</span>);</span><br><span class="line"><span class="comment">-- 批量添加数据</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> employee</span><br><span class="line"><span class="keyword">values</span> (<span class="number">3</span>, <span class="string">&#x27;3&#x27;</span>, <span class="string">&#x27;小李&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;123456784124456789&#x27;</span>, <span class="string">&#x27;2008-01-01&#x27;</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;4&#x27;</span>, <span class="string">&#x27;小黄&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;123456784124456789&#x27;</span>, <span class="string">&#x27;2008-01-01&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改数据(不带条件修改所有)</span></span><br><span class="line"><span class="keyword">update</span> employee</span><br><span class="line"><span class="keyword">set</span> name <span class="operator">=</span> <span class="string">&#x27;张三&#x27;</span></span><br><span class="line"><span class="keyword">where</span> id <span class="operator">=</span> <span class="number">1</span>;</span><br><span class="line"><span class="keyword">update</span> employee</span><br><span class="line"><span class="keyword">set</span> name <span class="operator">=</span> <span class="string">&#x27;李四&#x27;</span>,</span><br><span class="line"> gender<span class="operator">=</span> <span class="string">&#x27;女&#x27;</span></span><br><span class="line"><span class="keyword">where</span> id <span class="operator">=</span> <span class="number">1</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除数据(删除id为4的数据不带添加删除所有</span></span><br><span class="line"><span class="keyword">delete</span></span><br><span class="line"><span class="keyword">from</span> employee</span><br><span class="line"><span class="keyword">where</span> id <span class="operator">=</span> <span class="number">4</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- --------------------------------------------------------DQL数据查询语言--------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 数据准备</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> emp</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> comment <span class="string">&#x27;编号&#x27;</span>,</span><br><span class="line"> workno <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;工号&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> gender <span class="type">char</span>(<span class="number">1</span>) comment <span class="string">&#x27;性别&#x27;</span>,</span><br><span class="line"> age tinyint unsigned comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> idcard <span class="type">char</span>(<span class="number">18</span>) comment <span class="string">&#x27;身份证号&#x27;</span>,</span><br><span class="line"> workaddress <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;工作地址&#x27;</span>,</span><br><span class="line"> entrydate <span class="type">date</span> comment <span class="string">&#x27;入职时间&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;员工表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 插入数据</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> emp(id, workno, name, gender, age, idcard, workaddress, entrydate)</span><br><span class="line"><span class="keyword">values</span> (<span class="number">1</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;柳岩&#x27;</span>, <span class="string">&#x27;女&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;12345678912345678&#x27;</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2001-01-01&#x27;</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;张无忌&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">18</span>, <span class="string">&#x27;123456789012345670&#x27;</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2005-09-01&#x27;</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;3&#x27;</span>, <span class="string">&#x27;韦一笑&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">38</span>, <span class="string">&#x27;12345678972345670&#x27;</span>, <span class="string">&#x27;上海&#x27;</span>, <span class="string">&#x27;2005-08-01&#x27;</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;4&#x27;</span>, <span class="string">&#x27;赵敏&#x27;</span>, <span class="string">&#x27;女&#x27;</span>, <span class="number">18</span>, <span class="string">&#x27;12345675712345670&#x27;</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2009-12-01&#x27;</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;5&#x27;</span>, <span class="string">&#x27;小昭&#x27;</span>, <span class="string">&#x27;女&#x27;</span>, <span class="number">16</span>, <span class="string">&#x27;123456769012345678&#x27;</span>, <span class="string">&#x27;上海&#x27;</span>, <span class="string">&#x27;2007-07-01&#x27;</span>),</span><br><span class="line"> (<span class="number">6</span>, <span class="string">&#x27;6&#x27;</span>, <span class="string">&#x27;杨逍&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">28</span>, <span class="string">&#x27;1234567893123456X&#x27;</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2006-01-01&#x27;</span>),</span><br><span class="line"> (<span class="number">7</span>, <span class="string">&#x27;7&#x27;</span>, <span class="string">&#x27;范瑶&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">40</span>, <span class="string">&#x27;123456789212345670&#x27;</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2005-05-01&#x27;</span>),</span><br><span class="line"> (<span class="number">8</span>, <span class="string">&#x27;8&#x27;</span>, <span class="string">&#x27;黛绮丝&#x27;</span>, <span class="string">&#x27;女&#x27;</span>, <span class="number">38</span>, <span class="string">&#x27;123456157123645670&#x27;</span>, <span class="string">&#x27;天津&#x27;</span>, <span class="string">&#x27;2015-05-01&#x27;</span>),</span><br><span class="line"> (<span class="number">9</span>, <span class="string">&#x27;9&#x27;</span>, <span class="string">&#x27;范凉凉&#x27;</span>, <span class="string">&#x27;女&#x27;</span>, <span class="number">45</span>, <span class="string">&#x27;123156789012345678&#x27;</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2010-04-01&#x27;</span>),</span><br><span class="line"> (<span class="number">10</span>, <span class="string">&#x27;10&#x27;</span>, <span class="string">&#x27;陈友谅&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">53</span>, <span class="string">&#x27;123456789012345670&#x27;</span>, <span class="string">&#x27;上海&#x27;</span>, <span class="string">&#x27;2011-01-01&#x27;</span>),</span><br><span class="line"> (<span class="number">11</span>, <span class="string">&#x27;11&#x27;</span>, <span class="string">&#x27;张士诚&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">55</span>, <span class="string">&#x27;12356789712345670&#x27;</span>, <span class="string">&#x27;江苏&#x27;</span>, <span class="string">&#x27;2015-05-01&#x27;</span>),</span><br><span class="line"> (<span class="number">12</span>, <span class="string">&#x27;12&#x27;</span>, <span class="string">&#x27;常遇春&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">32</span>, <span class="string">&#x27;123446757152345670&#x27;</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2004-02-01&#x27;</span>),</span><br><span class="line"> (<span class="number">13</span>, <span class="string">&#x27;13&#x27;</span>, <span class="string">&#x27;张三丰&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">88</span>, <span class="string">&#x27;123656789012345678&#x27;</span>, <span class="string">&#x27;江苏&#x27;</span>, <span class="string">&#x27;2020-11-01&#x27;</span>),</span><br><span class="line"> (<span class="number">14</span>, <span class="string">&#x27;14&#x27;</span>, <span class="string">&#x27;灭绝&#x27;</span>, <span class="string">&#x27;女&#x27;</span>, <span class="number">65</span>, <span class="string">&#x27;123456719012345670&#x27;</span>, <span class="string">&#x27;西安&#x27;</span>, <span class="string">&#x27;2019-05-01&#x27;</span>),</span><br><span class="line"> (<span class="number">15</span>, <span class="string">&#x27;15&#x27;</span>, <span class="string">&#x27;胡青年&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">70</span>, <span class="string">&#x27;12345674971234567X&#x27;</span>, <span class="string">&#x27;西安&#x27;</span>, <span class="string">&#x27;2018-04-01&#x27;</span>),</span><br><span class="line"> (<span class="number">16</span>, <span class="string">&#x27;16&#x27;</span>, <span class="string">&#x27;周芷若&#x27;</span>, <span class="string">&#x27;女&#x27;</span>, <span class="number">18</span>, <span class="keyword">null</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2012-06-01&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 基础查询</span></span><br><span class="line"><span class="comment">-- 查看插入的数据</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询指定字段 name workno age 返回</span></span><br><span class="line"><span class="keyword">select</span> name, workno, age</span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询所有字段返回</span></span><br><span class="line"><span class="keyword">select</span> id,</span><br><span class="line"> workno,</span><br><span class="line"> name,</span><br><span class="line"> gender,</span><br><span class="line"> age,</span><br><span class="line"> idcard,</span><br><span class="line"> workaddress,</span><br><span class="line"> entrydate</span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- distinct去重关键字</span></span><br><span class="line"><span class="comment">-- 查询所有员工的工作地址(不要重复的地址)</span></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">distinct</span> workaddress <span class="string">&#x27;工作地址&#x27;</span></span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 条件查询</span></span><br><span class="line"><span class="comment">-- 查询年龄等于 88 的员工</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">=</span> <span class="number">88</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄小于20的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&lt;</span> <span class="number">20</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄小于等于20的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&lt;=</span> <span class="number">20</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询没有身份证号的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> idcard <span class="keyword">is</span> <span class="keyword">null</span> ;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄不等于88的员工信息(&lt;&gt;也表示不等于)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">!=</span> <span class="number">88</span>;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&lt;&gt;</span> <span class="number">88</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄在15~20(包含)之间的员工信息(三种实现方式)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&gt;=</span> <span class="number">15</span> <span class="operator">&amp;&amp;</span> age <span class="operator">&lt;=</span> <span class="number">20</span>;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&gt;=</span> <span class="number">15</span> <span class="keyword">and</span> age <span class="operator">&lt;=</span> <span class="number">20</span>;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="keyword">between</span> <span class="number">15</span> <span class="keyword">and</span> <span class="number">20</span>; #包含了<span class="number">15</span>和<span class="number">20</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询性别为女 且年龄小于25岁的员工</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> gender <span class="operator">=</span> <span class="string">&#x27;女&#x27;</span> <span class="keyword">and</span> age <span class="operator">&lt;</span> <span class="number">25</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄等于18 或 20 或 48 的员工</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">=</span> <span class="number">18</span> <span class="keyword">or</span> age <span class="operator">=</span> <span class="number">20</span> <span class="keyword">or</span> age <span class="operator">=</span> <span class="number">48</span>;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="keyword">in</span> (<span class="number">18</span>,<span class="number">20</span>,<span class="number">48</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询姓名为两个字的员工(模糊匹配(_匹配单个字符, %匹配任意个字符))</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> name <span class="keyword">like</span> <span class="string">&#x27;__&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询身份证号最后一位是X的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> idcard <span class="keyword">like</span> <span class="string">&#x27;%X&#x27;</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 聚合函数</span></span><br><span class="line"><span class="comment">-- 统计该企业员工数量(空值是不参与统计的)</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">count</span>(<span class="operator">*</span>) <span class="keyword">from</span> emp;</span><br><span class="line"><span class="keyword">select</span> <span class="built_in">count</span>(idcard) <span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计该企业员工的平均年龄</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">avg</span>(age) <span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计该企业员工的最大年龄</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">max</span>(age) <span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计该企业员工的最小年龄</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">min</span>(age) <span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计西安地区员工的年龄之和</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">sum</span>(age) <span class="keyword">from</span> emp <span class="keyword">where</span> workaddress <span class="operator">=</span> <span class="string">&#x27;西安&#x27;</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 分组查询</span></span><br><span class="line"><span class="comment">-- 根据性别分组,统计男性员工和女性员工的数量</span></span><br><span class="line"><span class="keyword">select</span> gender, <span class="built_in">count</span>(<span class="operator">*</span>) <span class="keyword">from</span> emp <span class="keyword">group</span> <span class="keyword">by</span> gender;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 根据性别进行分组,统计男性员工和女性员工的平均年龄</span></span><br><span class="line"><span class="keyword">select</span> gender, <span class="built_in">avg</span>(age) <span class="keyword">from</span> emp <span class="keyword">group</span> <span class="keyword">by</span> gender;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄小于45岁的员工并根据工作地址分组获取员工数量大于等于3的工作地址(可以使用别名也可以不使用别名)</span></span><br><span class="line"><span class="keyword">select</span> workaddress,<span class="built_in">count</span>(<span class="operator">*</span>) address_count <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&lt;</span> <span class="number">45</span> <span class="keyword">group</span> <span class="keyword">by</span> workaddress <span class="keyword">having</span> address_count <span class="operator">&gt;=</span> <span class="number">3</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 排序查询</span></span><br><span class="line"><span class="comment">-- 根据年龄对公司的员工进行升序排序(asc可以省略)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">order</span> <span class="keyword">by</span> age ;</span><br><span class="line"><span class="comment">-- 降序排序</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">order</span> <span class="keyword">by</span> age <span class="keyword">desc</span> ;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 根据员工的入职时间降序排序</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">order</span> <span class="keyword">by</span> entrydate <span class="keyword">desc</span> ;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 根据员工的年龄升序排序,年龄相同,再按照入职时间进行降序排序</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">order</span> <span class="keyword">by</span> age <span class="keyword">asc</span> ,entrydate <span class="keyword">desc</span> ;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 分页查询</span></span><br><span class="line"><span class="comment">-- 查询第一页的员工数据每页显示10条记录</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp limit <span class="number">0</span>,<span class="number">10</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询第二页数据,每页展示十条数据(起始索引 = (查询页码 - 1* 每页显示记录数)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp limit <span class="number">10</span>,<span class="number">10</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- DQL语句案例</span></span><br><span class="line"><span class="comment">-- 查询年龄在20,21,22,23岁的女性员工的信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> gender <span class="operator">=</span> <span class="string">&#x27;女&#x27;</span> <span class="keyword">and</span> age <span class="keyword">in</span> (<span class="number">20</span>,<span class="number">21</span>,<span class="number">22</span>,<span class="number">23</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询性别为男并且年龄再20~40岁(含)以内的姓名为三个字的员工</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> gender <span class="operator">=</span> <span class="string">&#x27;男&#x27;</span> <span class="keyword">and</span> (age <span class="keyword">between</span> <span class="number">20</span> <span class="keyword">and</span> <span class="number">40</span>) <span class="keyword">and</span> name <span class="keyword">like</span> <span class="string">&#x27;___&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计员工表中年龄小于60岁的男性员工和女性员工的人数</span></span><br><span class="line"><span class="keyword">select</span> gender,<span class="built_in">count</span>(<span class="operator">*</span>) <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&lt;</span> <span class="number">60</span> <span class="keyword">group</span> <span class="keyword">by</span> gender;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询所有年龄小于等于35岁员工的姓名和年龄并对查询结果按年龄升序排序如果年龄相同按照入职时间降序排序</span></span><br><span class="line"><span class="keyword">select</span> name,age <span class="keyword">from</span> emp <span class="keyword">where</span> age <span class="operator">&lt;=</span> <span class="number">35</span> <span class="keyword">order</span> <span class="keyword">by</span> age <span class="keyword">asc</span> ,entrydate <span class="keyword">desc</span> ;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询性别为男,且年龄在20·40岁(含)以内的前五个员工信息,并对查询结果按年龄升序排序,如果年龄相同按照入职时间升序排序</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> gender <span class="operator">=</span> <span class="string">&#x27;男&#x27;</span> <span class="keyword">and</span> age <span class="keyword">between</span> <span class="number">20</span> <span class="keyword">and</span> <span class="number">40</span> <span class="keyword">order</span> <span class="keyword">by</span> age,entrydate limit <span class="number">5</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- ---------------------------------------------------DCL--------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 用户管理</span></span><br><span class="line"><span class="comment">-- mysql数据库</span></span><br><span class="line">use mysql;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询所有的用户</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> mysql.user;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建用户itcast, 只能够在当前主机localhost访问, 密码123456;</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">user</span> <span class="string">&#x27;itcast&#x27;</span>@<span class="string">&#x27;localhost&#x27;</span> identified <span class="keyword">by</span> <span class="string">&#x27;123456&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建用户heima, 可以在任意主机访问该数据库, 密码123456;</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">user</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span> identified <span class="keyword">by</span> <span class="string">&#x27;123456&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改用户heima的访问密码为1234;</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">user</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span> identified <span class="keyword">with</span> mysql_native_password <span class="keyword">by</span> <span class="string">&#x27;1234&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除 itcast@localhost 用户</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">user</span> <span class="string">&#x27;itcast&#x27;</span>@<span class="string">&#x27;localhost&#x27;</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 权限控制</span></span><br><span class="line"><span class="comment">-- 查询权限(查询heima用户的所有权限)</span></span><br><span class="line"><span class="keyword">show</span> grants <span class="keyword">for</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 授予权限(授予heima用户对数据库itcast的所有权限)</span></span><br><span class="line"><span class="keyword">grant</span> <span class="keyword">all</span> <span class="keyword">on</span> itcast.<span class="operator">*</span> <span class="keyword">to</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 授予用户所有数据库所有表的所有权限</span></span><br><span class="line"><span class="keyword">grant</span> <span class="keyword">all</span> <span class="keyword">on</span> <span class="operator">*</span>.<span class="operator">*</span> <span class="keyword">to</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 撤销权限(撤销heima用户在itcast数据库上的所有权限)</span></span><br><span class="line"><span class="keyword">revoke</span> <span class="keyword">all</span> <span class="keyword">on</span> itcast.<span class="operator">*</span> <span class="keyword">from</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span>;</span><br></pre></td></tr></table></figure>
<h2 id="2-函数"><a href="#2-函数" class="headerlink" title="2.函数"></a>2.函数</h2><h3 id="2-1-字符串函数"><a href="#2-1-字符串函数" class="headerlink" title="2.1 字符串函数"></a>2.1 字符串函数</h3><p><img src="/pictures/image-20231001213558221.png" alt="image-20231001213558221"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- concat函数(字符串拼接)</span></span><br><span class="line"><span class="keyword">select</span> concat(<span class="string">&#x27;hello &#x27;</span>,<span class="string">&#x27;word&#x27;</span>); # hello word</span><br><span class="line"></span><br><span class="line"><span class="comment">-- lower(全部转化成小写)</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">lower</span>(<span class="string">&#x27;Hello&#x27;</span>); # hello</span><br><span class="line"></span><br><span class="line"><span class="comment">-- upper(全部转化成大写)</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">upper</span>(<span class="string">&#x27;Hello&#x27;</span>); # HELLO</span><br><span class="line"></span><br><span class="line"><span class="comment">-- lpad(左侧填充)</span></span><br><span class="line"><span class="keyword">select</span> lpad(<span class="string">&#x27;01&#x27;</span>,<span class="number">5</span>,<span class="string">&#x27;-&#x27;</span>); # <span class="comment">---01</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- rpad(右侧填充)</span></span><br><span class="line"><span class="keyword">select</span> rpad(<span class="string">&#x27;01&#x27;</span>,<span class="number">5</span>,<span class="string">&#x27;-&#x27;</span>) ;# <span class="number">01</span><span class="comment">---</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- trim 去除头部和尾部的空格</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">trim</span>(<span class="string">&#x27; Hello Mysql &#x27;</span>);# Hello Mysql</span><br><span class="line"></span><br><span class="line"><span class="comment">-- substring 字符串截取</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">substring</span>(<span class="string">&#x27;Hello Mysql&#x27;</span>,<span class="number">1</span>,<span class="number">5</span>);# Hello</span><br></pre></td></tr></table></figure>
<p><strong>案例</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 由于业务需求变更企业员工的工号统一为5位数目前不足5位数的全部在前面补0 比如:1号员工的工号应该为00001</span></span><br><span class="line"><span class="keyword">update</span> emp <span class="keyword">set</span> workno <span class="operator">=</span> lpad(workno,<span class="number">5</span>,<span class="string">&#x27;0&#x27;</span>);</span><br></pre></td></tr></table></figure>
<h3 id="2-2-数值函数"><a href="#2-2-数值函数" class="headerlink" title="2.2 数值函数"></a>2.2 数值函数</h3><p><img src="/pictures/image-20231001215546554.png" alt="image-20231001215546554"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 数值函数</span></span><br><span class="line"><span class="comment">-- ceil 向上取整</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">ceil</span>(<span class="number">1.5</span>); # <span class="number">2</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- floor 向下取整</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">floor</span>(<span class="number">1.1</span>); # <span class="number">1</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- mod 求模运算</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">mod</span>(<span class="number">7</span>,<span class="number">4</span>); # <span class="number">3</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- rand 随机数(0~1)</span></span><br><span class="line"><span class="keyword">select</span> rand();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- round 四舍五入</span></span><br><span class="line"><span class="keyword">select</span> round(<span class="number">2.345</span>,<span class="number">2</span>); # <span class="number">2.35</span></span><br></pre></td></tr></table></figure>
<p><strong>案例</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 通过数据库函数生成一个的随机的六位验证码</span></span><br><span class="line"><span class="comment">-- 思路是通过rand()*100生成xxxxxx.xxx的小数,然后通过round四舍五入掉小数位然后可能存在小于六位数的情况我们</span></span><br><span class="line"><span class="comment">-- 通过lpd函数补齐六位</span></span><br><span class="line"><span class="keyword">select</span> lpad(round(rand()<span class="operator">*</span><span class="number">1000000</span>,<span class="number">0</span>),<span class="number">6</span>,<span class="string">&#x27;0&#x27;</span>);</span><br></pre></td></tr></table></figure>
<h3 id="2-3-日期函数"><a href="#2-3-日期函数" class="headerlink" title="2.3 日期函数"></a>2.3 日期函数</h3><p><img src="/pictures/image-20231002114046980.png" alt="image-20231002114046980"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 日期函数</span></span><br><span class="line"><span class="comment">-- curdate当前日期</span></span><br><span class="line"><span class="keyword">select</span> curdate();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- curtime当前时间</span></span><br><span class="line"><span class="keyword">select</span> curtime();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- now当前日期和时间</span></span><br><span class="line"><span class="keyword">select</span> now();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- YEAR , MONTH , DAY当前年、月、日</span></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">year</span>(now());</span><br><span class="line"><span class="keyword">select</span> <span class="keyword">month</span>(now());</span><br><span class="line"><span class="keyword">select</span> <span class="keyword">day</span>(now());</span><br><span class="line"></span><br><span class="line"><span class="comment">-- date_add增加指定的时间间隔</span></span><br><span class="line"><span class="keyword">select</span> date_add(now(),<span class="type">INTERVAL</span> <span class="number">70</span> <span class="keyword">DAY</span> ); # 当前的时间往后推<span class="number">70</span>天</span><br><span class="line"><span class="keyword">select</span> date_add(now(),<span class="type">INTERVAL</span> <span class="number">2</span> <span class="keyword">MONTH</span> ); #向后推<span class="number">2</span>个月</span><br><span class="line"></span><br><span class="line"><span class="comment">-- datediff获取两个日期相差的天数</span></span><br><span class="line"><span class="keyword">select</span> datediff(<span class="string">&#x27;2021-12-01&#x27;</span>,<span class="string">&#x27;2021-10-01&#x27;</span>); # 查询两个时间之间的差值,第一个时间减去第二个时间</span><br></pre></td></tr></table></figure>
<p><strong>案例</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 查询所有员工的入职天数,并根据入职天数倒叙排序</span></span><br><span class="line"><span class="keyword">select</span> name,datediff(curdate(),entrydate) <span class="string">&#x27;entrydays&#x27;</span> <span class="keyword">from</span> emp <span class="keyword">order</span> <span class="keyword">by</span> entrydays <span class="keyword">desc</span> ;</span><br></pre></td></tr></table></figure>
<h3 id="2-4-流程函数"><a href="#2-4-流程函数" class="headerlink" title="2.4 流程函数"></a>2.4 流程函数</h3><p><img src="/pictures/image-20231004124942068.png" alt="image-20231004124942068"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 流程控制函数</span></span><br><span class="line"><span class="comment">-- if 相当java中的三元运算符</span></span><br><span class="line"><span class="keyword">select</span> if(<span class="literal">true</span>, <span class="string">&#x27;OK&#x27;</span>, <span class="string">&#x27;ERROR&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- ifnull 第一个字符串不为空就返回第一个,第一个为空就返回第二个</span></span><br><span class="line"><span class="keyword">select</span> ifnull(<span class="string">&#x27;OK&#x27;</span>, <span class="string">&#x27;DEFAULT&#x27;</span>);</span><br><span class="line"><span class="keyword">select</span> ifnull(<span class="keyword">null</span>, <span class="string">&#x27;DEFAULT&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- case when then else end</span></span><br><span class="line"><span class="comment">-- 需求: 查询emp表的员工姓名和工作地址 (北京/上海 ----&gt; 一线城市 , 其他 ----&gt; 二线城市)</span></span><br><span class="line"><span class="keyword">select</span> name,</span><br><span class="line"> (<span class="keyword">case</span> workaddress</span><br><span class="line"> <span class="keyword">when</span> <span class="string">&#x27;北京&#x27;</span> <span class="keyword">then</span> <span class="string">&#x27;一线城市&#x27;</span></span><br><span class="line"> <span class="keyword">when</span> <span class="string">&#x27;上海&#x27;</span> <span class="keyword">then</span> <span class="string">&#x27;一线城市&#x27;</span></span><br><span class="line"> <span class="keyword">else</span></span><br><span class="line"> <span class="string">&#x27;二线城市&#x27;</span> <span class="keyword">end</span>) <span class="keyword">as</span> <span class="string">&#x27;工作地址&#x27;</span></span><br><span class="line"><span class="keyword">from</span> emp;</span><br></pre></td></tr></table></figure>
<p><strong>案例</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 案例:统计班级各个学员的成绩,展示规则如下:</span></span><br><span class="line"><span class="comment">-- &gt;= 85 展示优秀</span></span><br><span class="line"><span class="comment">-- &gt;= 60 展示及格</span></span><br><span class="line"><span class="comment">-- 否则展示不及格</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 建表数据</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> score</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> comment <span class="string">&#x27;ID&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> math <span class="type">int</span> comment <span class="string">&#x27;数学&#x27;</span>,</span><br><span class="line"> english <span class="type">int</span> comment <span class="string">&#x27;英语&#x27;</span>,</span><br><span class="line"> chinese <span class="type">int</span> comment <span class="string">&#x27;语文&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;学员成绩表&#x27;</span>;</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> score(id, name, math, english, chinese)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;Tom&#x27;</span>, <span class="number">67</span>, <span class="number">88</span>, <span class="number">95</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;Rose&#x27;</span>, <span class="number">23</span>, <span class="number">66</span>, <span class="number">90</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;Jack&#x27;</span>, <span class="number">56</span>, <span class="number">98</span>, <span class="number">76</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> score;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 案例sql实现</span></span><br><span class="line"><span class="keyword">select</span> id,</span><br><span class="line"> name,</span><br><span class="line"> (<span class="keyword">case</span> <span class="keyword">when</span> math <span class="operator">&gt;=</span> <span class="number">85</span> <span class="keyword">then</span> <span class="string">&#x27;优秀&#x27;</span> <span class="keyword">when</span> math <span class="operator">&gt;=</span> <span class="number">60</span> <span class="keyword">then</span> <span class="string">&#x27;及格&#x27;</span> <span class="keyword">else</span> <span class="string">&#x27;不及格&#x27;</span> <span class="keyword">end</span>)</span><br><span class="line"> <span class="string">&#x27;数学&#x27;</span>,</span><br><span class="line"> (<span class="keyword">case</span></span><br><span class="line"> <span class="keyword">when</span> english <span class="operator">&gt;=</span> <span class="number">85</span> <span class="keyword">then</span> <span class="string">&#x27;优秀&#x27;</span></span><br><span class="line"> <span class="keyword">when</span> english <span class="operator">&gt;=</span> <span class="number">60</span> <span class="keyword">then</span> <span class="string">&#x27;及格&#x27;</span></span><br><span class="line"> <span class="keyword">else</span> <span class="string">&#x27;不及格&#x27;</span></span><br><span class="line"> <span class="keyword">end</span>) <span class="string">&#x27;英语&#x27;</span>,</span><br><span class="line"> (<span class="keyword">case</span></span><br><span class="line"> <span class="keyword">when</span> chinese <span class="operator">&gt;=</span> <span class="number">85</span> <span class="keyword">then</span> <span class="string">&#x27;优秀&#x27;</span></span><br><span class="line"> <span class="keyword">when</span> chinese <span class="operator">&gt;=</span> <span class="number">60</span> <span class="keyword">then</span> <span class="string">&#x27;及格&#x27;</span></span><br><span class="line"> <span class="keyword">else</span> <span class="string">&#x27;不及格&#x27;</span></span><br><span class="line"> <span class="keyword">end</span>) <span class="string">&#x27;语文&#x27;</span></span><br><span class="line"><span class="keyword">from</span> score;</span><br></pre></td></tr></table></figure>
<p><strong>函数相关的全部sql</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- ----------------------------------------------------------函数--------------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 字符串函数</span></span><br><span class="line"><span class="comment">-- concat函数(字符串拼接)</span></span><br><span class="line"><span class="keyword">select</span> concat(<span class="string">&#x27;hello &#x27;</span>, <span class="string">&#x27;word&#x27;</span>);</span><br><span class="line"># hello word</span><br><span class="line"></span><br><span class="line"><span class="comment">-- lower(全部转化成小写)</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">lower</span>(<span class="string">&#x27;Hello&#x27;</span>);</span><br><span class="line"># hello</span><br><span class="line"></span><br><span class="line"><span class="comment">-- upper(全部转化成大写)</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">upper</span>(<span class="string">&#x27;Hello&#x27;</span>);</span><br><span class="line"># HELLO</span><br><span class="line"></span><br><span class="line"><span class="comment">-- lpad(左侧填充)</span></span><br><span class="line"><span class="keyword">select</span> lpad(<span class="string">&#x27;01&#x27;</span>, <span class="number">5</span>, <span class="string">&#x27;-&#x27;</span>);</span><br><span class="line"># <span class="comment">---01</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- rpad(右侧填充)</span></span><br><span class="line"><span class="keyword">select</span> rpad(<span class="string">&#x27;01&#x27;</span>, <span class="number">5</span>, <span class="string">&#x27;-&#x27;</span>);</span><br><span class="line"># <span class="number">01</span><span class="comment">---</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- trim 去除头部和尾部的空格</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">trim</span>(<span class="string">&#x27; Hello Mysql &#x27;</span>);</span><br><span class="line"># Hello Mysql</span><br><span class="line"></span><br><span class="line"><span class="comment">-- substring 字符串截取</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">substring</span>(<span class="string">&#x27;Hello Mysql&#x27;</span>, <span class="number">1</span>, <span class="number">5</span>);</span><br><span class="line"># Hello</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 由于业务需求变更企业员工的工号统一为5位数目前不足5位数的全部在前面补0 比如:1号员工的工号应该为00001</span></span><br><span class="line"><span class="keyword">update</span> emp</span><br><span class="line"><span class="keyword">set</span> workno <span class="operator">=</span> lpad(workno, <span class="number">5</span>, <span class="string">&#x27;0&#x27;</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 数值函数</span></span><br><span class="line"><span class="comment">-- ceil 向上取整</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">ceil</span>(<span class="number">1.5</span>);</span><br><span class="line"># <span class="number">2</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- floor 向下取整</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">floor</span>(<span class="number">1.1</span>);</span><br><span class="line"># <span class="number">1</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- mod 求模运算</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">mod</span>(<span class="number">7</span>, <span class="number">4</span>);</span><br><span class="line"># <span class="number">3</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- rand 随机数(0~1)</span></span><br><span class="line"><span class="keyword">select</span> rand();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- round 四舍五入</span></span><br><span class="line"><span class="keyword">select</span> round(<span class="number">2.345</span>, <span class="number">2</span>);</span><br><span class="line"># <span class="number">2.35</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 通过数据库函数生成一个的随机的六位验证码</span></span><br><span class="line"><span class="keyword">select</span> lpad(round(rand() <span class="operator">*</span> <span class="number">1000000</span>, <span class="number">0</span>), <span class="number">6</span>, <span class="string">&#x27;0&#x27;</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 日期函数</span></span><br><span class="line"><span class="comment">-- curdate当前日期</span></span><br><span class="line"><span class="keyword">select</span> curdate();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- curtime当前时间</span></span><br><span class="line"><span class="keyword">select</span> curtime();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- now当前日期和时间</span></span><br><span class="line"><span class="keyword">select</span> now();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- YEAR , MONTH , DAY当前年、月、日</span></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">year</span>(now());</span><br><span class="line"><span class="keyword">select</span> <span class="keyword">month</span>(now());</span><br><span class="line"><span class="keyword">select</span> <span class="keyword">day</span>(now());</span><br><span class="line"></span><br><span class="line"><span class="comment">-- date_add增加指定的时间间隔</span></span><br><span class="line"><span class="keyword">select</span> date_add(now(), <span class="type">INTERVAL</span> <span class="number">70</span> <span class="keyword">DAY</span>); # 当前的时间往后推<span class="number">70</span>天</span><br><span class="line"><span class="keyword">select</span> date_add(now(), <span class="type">INTERVAL</span> <span class="number">2</span> <span class="keyword">MONTH</span>);</span><br><span class="line">#向后推<span class="number">2</span>个月</span><br><span class="line"></span><br><span class="line"><span class="comment">-- datediff获取两个日期相差的天数</span></span><br><span class="line"><span class="keyword">select</span> datediff(<span class="string">&#x27;2021-12-01&#x27;</span>, <span class="string">&#x27;2021-10-01&#x27;</span>);</span><br><span class="line"># 查询两个时间之间的差值,第一个时间减去第二个时间</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询所有员工的入职天数,并根据入职天数倒叙排序</span></span><br><span class="line"><span class="keyword">select</span> name, datediff(curdate(), entrydate) <span class="string">&#x27;entrydays&#x27;</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">order</span> <span class="keyword">by</span> entrydays <span class="keyword">desc</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 流程控制函数</span></span><br><span class="line"><span class="comment">-- if 相当java中的三元运算符</span></span><br><span class="line"><span class="keyword">select</span> if(<span class="literal">true</span>, <span class="string">&#x27;OK&#x27;</span>, <span class="string">&#x27;ERROR&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- ifnull 第一个字符串不为空就返回第一个,第一个为空就返回第二个</span></span><br><span class="line"><span class="keyword">select</span> ifnull(<span class="string">&#x27;OK&#x27;</span>, <span class="string">&#x27;DEFAULT&#x27;</span>);</span><br><span class="line"><span class="keyword">select</span> ifnull(<span class="keyword">null</span>, <span class="string">&#x27;DEFAULT&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- case when then else end</span></span><br><span class="line"><span class="comment">-- 需求: 查询emp表的员工姓名和工作地址 (北京/上海 ----&gt; 一线城市 , 其他 ----&gt; 二线城市)</span></span><br><span class="line"><span class="keyword">select</span> name,</span><br><span class="line"> (<span class="keyword">case</span> workaddress</span><br><span class="line"> <span class="keyword">when</span> <span class="string">&#x27;北京&#x27;</span> <span class="keyword">then</span> <span class="string">&#x27;一线城市&#x27;</span></span><br><span class="line"> <span class="keyword">when</span> <span class="string">&#x27;上海&#x27;</span> <span class="keyword">then</span> <span class="string">&#x27;一线城市&#x27;</span></span><br><span class="line"> <span class="keyword">else</span></span><br><span class="line"> <span class="string">&#x27;二线城市&#x27;</span> <span class="keyword">end</span>) <span class="keyword">as</span> <span class="string">&#x27;工作地址&#x27;</span></span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 案例:统计班级各个学员的成绩,展示规则如下:</span></span><br><span class="line"><span class="comment">-- &gt;= 85 展示优秀</span></span><br><span class="line"><span class="comment">-- &gt;= 60 展示及格</span></span><br><span class="line"><span class="comment">-- 否则展示不及格</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 建表数据</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> score</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> comment <span class="string">&#x27;ID&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> math <span class="type">int</span> comment <span class="string">&#x27;数学&#x27;</span>,</span><br><span class="line"> english <span class="type">int</span> comment <span class="string">&#x27;英语&#x27;</span>,</span><br><span class="line"> chinese <span class="type">int</span> comment <span class="string">&#x27;语文&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;学员成绩表&#x27;</span>;</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> score(id, name, math, english, chinese)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;Tom&#x27;</span>, <span class="number">67</span>, <span class="number">88</span>, <span class="number">95</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;Rose&#x27;</span>, <span class="number">23</span>, <span class="number">66</span>, <span class="number">90</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;Jack&#x27;</span>, <span class="number">56</span>, <span class="number">98</span>, <span class="number">76</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> score;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 案例sql实现</span></span><br><span class="line"><span class="keyword">select</span> id,</span><br><span class="line"> name,</span><br><span class="line"> (<span class="keyword">case</span> <span class="keyword">when</span> math <span class="operator">&gt;=</span> <span class="number">85</span> <span class="keyword">then</span> <span class="string">&#x27;优秀&#x27;</span> <span class="keyword">when</span> math <span class="operator">&gt;=</span> <span class="number">60</span> <span class="keyword">then</span> <span class="string">&#x27;及格&#x27;</span> <span class="keyword">else</span> <span class="string">&#x27;不及格&#x27;</span> <span class="keyword">end</span>)</span><br><span class="line"> <span class="string">&#x27;数学&#x27;</span>,</span><br><span class="line"> (<span class="keyword">case</span></span><br><span class="line"> <span class="keyword">when</span> english <span class="operator">&gt;=</span> <span class="number">85</span> <span class="keyword">then</span> <span class="string">&#x27;优秀&#x27;</span></span><br><span class="line"> <span class="keyword">when</span> english <span class="operator">&gt;=</span> <span class="number">60</span> <span class="keyword">then</span> <span class="string">&#x27;及格&#x27;</span></span><br><span class="line"> <span class="keyword">else</span> <span class="string">&#x27;不及格&#x27;</span></span><br><span class="line"> <span class="keyword">end</span>) <span class="string">&#x27;英语&#x27;</span>,</span><br><span class="line"> (<span class="keyword">case</span></span><br><span class="line"> <span class="keyword">when</span> chinese <span class="operator">&gt;=</span> <span class="number">85</span> <span class="keyword">then</span> <span class="string">&#x27;优秀&#x27;</span></span><br><span class="line"> <span class="keyword">when</span> chinese <span class="operator">&gt;=</span> <span class="number">60</span> <span class="keyword">then</span> <span class="string">&#x27;及格&#x27;</span></span><br><span class="line"> <span class="keyword">else</span> <span class="string">&#x27;不及格&#x27;</span></span><br><span class="line"> <span class="keyword">end</span>) <span class="string">&#x27;语文&#x27;</span></span><br><span class="line"><span class="keyword">from</span> score;</span><br></pre></td></tr></table></figure>
<h2 id="3-约束"><a href="#3-约束" class="headerlink" title="3.约束"></a>3.约束</h2><h3 id="3-1-概述"><a href="#3-1-概述" class="headerlink" title="3.1 概述"></a>3.1 概述</h3><p><strong>概念</strong>:约束是作用于表中字段上的规则,用于限制存储在表中的数据。</p>
<p><strong>目的</strong>:保证数据库中数据的正确、有效性和完整性。</p>
<p><strong>分类</strong> :</p>
<p><img src="/pictures/image-20231004130826351.png" alt="image-20231004130826351"></p>
<h3 id="3-2-约束演示"><a href="#3-2-约束演示" class="headerlink" title="3.2 约束演示"></a>3.2 约束演示</h3><p><strong>案例需求: 根据需求,完成表结构的创建,需求如下:</strong></p>
<p><img src="/pictures/image-20231004160744943.png" alt="image-20231004160744943"></p>
<p>对应的建表语句为:</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> tb_user(</span><br><span class="line"> id <span class="type">int</span> AUTO_INCREMENT <span class="keyword">PRIMARY</span> KEY COMMENT <span class="string">&#x27;ID唯一标识&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) <span class="keyword">NOT</span> <span class="keyword">NULL</span> <span class="keyword">UNIQUE</span> COMMENT <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> <span class="keyword">check</span> (age <span class="operator">&gt;</span> <span class="number">0</span> <span class="operator">&amp;&amp;</span> age <span class="operator">&lt;=</span> <span class="number">120</span>) COMMENT <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> status <span class="type">char</span>(<span class="number">1</span>) <span class="keyword">default</span> <span class="string">&#x27;1&#x27;</span> COMMENT <span class="string">&#x27;状态&#x27;</span>,</span><br><span class="line"> gender <span class="type">char</span>(<span class="number">1</span>) COMMENT <span class="string">&#x27;性别&#x27;</span></span><br><span class="line">);</span><br></pre></td></tr></table></figure>
<h3 id="3-3-外键约束"><a href="#3-3-外键约束" class="headerlink" title="3.3 外键约束"></a>3.3 外键约束</h3><h4 id="3-3-1-介绍"><a href="#3-3-1-介绍" class="headerlink" title="3.3.1 介绍"></a>3.3.1 介绍</h4><p><img src="/pictures/image-20231004162616775.png" alt="image-20231004162616775"></p>
<h4 id="3-3-2-语法"><a href="#3-3-2-语法" class="headerlink" title="3.3.2 语法"></a>3.3.2 语法</h4><p><strong>建立外键</strong>: <code>ALTER TABLE 表名 ADD CONSTRAINT 外键名称 FOREIGN KEY (外键字段名) REFERENCES 主表 (主表列名) ;</code></p>
<p><strong>删除外键</strong>: <code>ALTER TABLE 表名 DROP FOREIGN KEY 外键名称;</code></p>
<p><img src="/pictures/image-20231004163021062.png" alt="image-20231004163021062"></p>
<p>举例</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 外键约束</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> dept</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;ID&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;部门名称&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;部门表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> dept (id, name)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;研发部&#x27;</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;市场部&#x27;</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;财务部&#x27;</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;销售部&#x27;</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;总经办&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> employee</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;ID&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> job <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;职位&#x27;</span>,</span><br><span class="line"> salary <span class="type">int</span> comment <span class="string">&#x27;薪资&#x27;</span>,</span><br><span class="line"> entrydate <span class="type">date</span> comment <span class="string">&#x27;入职时间&#x27;</span>,</span><br><span class="line"> managerid <span class="type">int</span> comment <span class="string">&#x27;直属领导ID&#x27;</span>,</span><br><span class="line"> dept_id <span class="type">int</span> comment <span class="string">&#x27;部门ID&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;员工表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> employee (id, name, age, job, salary, entrydate, managerid, dept_id)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;金庸&#x27;</span>, <span class="number">66</span>, <span class="string">&#x27;总裁&#x27;</span>, <span class="number">20000</span>, <span class="string">&#x27;2000-01-01&#x27;</span>, <span class="keyword">null</span>, <span class="number">5</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;张无忌&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;项目经理&#x27;</span>, <span class="number">12500</span>, <span class="string">&#x27;2005-12-05&#x27;</span>, <span class="number">1</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;杨逍&#x27;</span>, <span class="number">33</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">8400</span>, <span class="string">&#x27;2000-11-03&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;韦一笑&#x27;</span>, <span class="number">48</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">11000</span>, <span class="string">&#x27;2002-02-05&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;常遇春&#x27;</span>, <span class="number">43</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">10500</span>, <span class="string">&#x27;2004-09-07&#x27;</span>, <span class="number">3</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">6</span>, <span class="string">&#x27;小昭&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;程序员鼓励师&#x27;</span>, <span class="number">6600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> dept;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> employee;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 添加外键 员工表employee的部门id字段关联到部门表的id字段以建立外键约束</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> employee</span><br><span class="line"> <span class="keyword">add</span> <span class="keyword">constraint</span> fk_emp_dept <span class="keyword">foreign</span> key (dept_id) <span class="keyword">references</span> dept (id);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除外键</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> employee <span class="keyword">drop</span> <span class="keyword">foreign</span> key fk_emp_dept;</span><br></pre></td></tr></table></figure>
<h4 id="3-3-3-删除-更新行为"><a href="#3-3-3-删除-更新行为" class="headerlink" title="3.3.3 删除&#x2F;更新行为"></a>3.3.3 删除&#x2F;更新行为</h4><p>详细介绍见PDF文件 <a href="https://qingling.icu/posts/50465.html">https://qingling.icu/posts/50465.html</a></p>
<p><strong>添加了外键之后,再删除父表数据时产生的约束行为,我们就称为删除&#x2F;更新行为。具体的删除&#x2F;更新行为有以下几种:</strong></p>
<p><img src="/pictures/image-20231004164211535.png" alt="image-20231004164211535"></p>
<p>具体语法为:</p>
<p><code>ALTER TABLE 表名 ADD CONSTRAINT 外键名称 FOREIGN KEY (外键字段) REFERENCES 主表名 (主表字段名) ON UPDATE CASCADE ON DELETE CASCADE;</code></p>
<p><strong>约束相关的sql</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- ---------------------------------------------------约束演示------------------------------------------------------------</span></span><br><span class="line"><span class="comment">-- id 主键,并且自动增长</span></span><br><span class="line"><span class="comment">-- name 不为空,并且唯一</span></span><br><span class="line"><span class="comment">-- age 大于零并且小于等于1208.0以上的数据库才支持age int check (age &gt; 0 &amp;&amp; age &lt;= 120) COMMENT &#x27;年龄&#x27;</span></span><br><span class="line"><span class="comment">-- status 如果没有指定该值默认为1</span></span><br><span class="line"><span class="comment">-- gender 无约束</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">table</span> if <span class="keyword">exists</span> <span class="keyword">user</span>;</span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> <span class="keyword">user</span></span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> AUTO_INCREMENT <span class="keyword">PRIMARY</span> KEY COMMENT <span class="string">&#x27;ID唯一标识&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) <span class="keyword">NOT</span> <span class="keyword">NULL</span> <span class="keyword">UNIQUE</span> COMMENT <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> COMMENT <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> status <span class="type">char</span>(<span class="number">1</span>) <span class="keyword">default</span> <span class="string">&#x27;1&#x27;</span> COMMENT <span class="string">&#x27;状态&#x27;</span>,</span><br><span class="line"> gender <span class="type">char</span>(<span class="number">1</span>) COMMENT <span class="string">&#x27;性别&#x27;</span></span><br><span class="line">);</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> <span class="keyword">user</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 插入数据</span></span><br><span class="line"><span class="comment">-- name的值不能重复,status的值没有填写的话将使用的是默认的值</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> <span class="keyword">user</span>(name, age, status, gender)</span><br><span class="line"><span class="keyword">values</span> (<span class="string">&#x27;Tom1&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;男&#x27;</span>),</span><br><span class="line"> (<span class="string">&#x27;Tom2&#x27;</span>, <span class="number">29</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;男&#x27;</span>),</span><br><span class="line"> (<span class="string">&#x27;Tom3&#x27;</span>, <span class="number">14</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;男&#x27;</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 外键约束</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> dept</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;ID&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;部门名称&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;部门表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> dept (id, name)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;研发部&#x27;</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;市场部&#x27;</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;财务部&#x27;</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;销售部&#x27;</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;总经办&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> employee</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;ID&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> job <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;职位&#x27;</span>,</span><br><span class="line"> salary <span class="type">int</span> comment <span class="string">&#x27;薪资&#x27;</span>,</span><br><span class="line"> entrydate <span class="type">date</span> comment <span class="string">&#x27;入职时间&#x27;</span>,</span><br><span class="line"> managerid <span class="type">int</span> comment <span class="string">&#x27;直属领导ID&#x27;</span>,</span><br><span class="line"> dept_id <span class="type">int</span> comment <span class="string">&#x27;部门ID&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;员工表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> employee (id, name, age, job, salary, entrydate, managerid, dept_id)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;金庸&#x27;</span>, <span class="number">66</span>, <span class="string">&#x27;总裁&#x27;</span>, <span class="number">20000</span>, <span class="string">&#x27;2000-01-01&#x27;</span>, <span class="keyword">null</span>, <span class="number">5</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;张无忌&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;项目经理&#x27;</span>, <span class="number">12500</span>, <span class="string">&#x27;2005-12-05&#x27;</span>, <span class="number">1</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;杨逍&#x27;</span>, <span class="number">33</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">8400</span>, <span class="string">&#x27;2000-11-03&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;韦一笑&#x27;</span>, <span class="number">48</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">11000</span>, <span class="string">&#x27;2002-02-05&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;常遇春&#x27;</span>, <span class="number">43</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">10500</span>, <span class="string">&#x27;2004-09-07&#x27;</span>, <span class="number">3</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">6</span>, <span class="string">&#x27;小昭&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;程序员鼓励师&#x27;</span>, <span class="number">6600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> dept;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> employee;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 添加外键 员工表employee的部门id字段关联到部门表的id字段以建立外键约束</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> employee</span><br><span class="line"> <span class="keyword">add</span> <span class="keyword">constraint</span> fk_emp_dept <span class="keyword">foreign</span> key (dept_id) <span class="keyword">references</span> dept (id);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除外键</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> employee <span class="keyword">drop</span> <span class="keyword">foreign</span> key fk_emp_dept;</span><br></pre></td></tr></table></figure>
<h2 id="4-多表查询"><a href="#4-多表查询" class="headerlink" title="4.多表查询"></a>4.多表查询</h2><h3 id="4-1-多表关系"><a href="#4-1-多表关系" class="headerlink" title="4.1 多表关系"></a>4.1 多表关系</h3><p><strong>一对多</strong></p>
<p><img src="/pictures/image-20231004165257714.png" alt="image-20231004165257714"></p>
<p><strong>多对多</strong></p>
<p><img src="/pictures/image-20231004165425089.png" alt="image-20231004165425089"></p>
<p><strong>一对一</strong></p>
<p><img src="/pictures/image-20231004170148951.png" alt="image-20231004170148951"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 多表关系</span></span><br><span class="line"><span class="comment">-- 演示多对多的关系</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> student</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment <span class="keyword">primary</span> key comment <span class="string">&#x27;主键ID&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> <span class="keyword">no</span> <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;学号&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;学生表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> student</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="string">&#x27;黛绮丝&#x27;</span>, <span class="string">&#x27;2000100101&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;谢逊&#x27;</span>,</span><br><span class="line"> <span class="string">&#x27;2000100102&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;殷天正&#x27;</span>, <span class="string">&#x27;2000100103&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;韦一笑&#x27;</span>, <span class="string">&#x27;2000100104&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> course</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment <span class="keyword">primary</span> key comment <span class="string">&#x27;主键ID&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;课程名称&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;课程表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> course</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="string">&#x27;Java&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;PHP&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;MySQL&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;Hadoop&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> student_course</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;主键&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> studentid <span class="type">int</span> <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;学生ID&#x27;</span>,</span><br><span class="line"> courseid <span class="type">int</span> <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;课程ID&#x27;</span>,</span><br><span class="line"> <span class="keyword">constraint</span> fk_courseid <span class="keyword">foreign</span> key (courseid) <span class="keyword">references</span> course (id),</span><br><span class="line"> <span class="keyword">constraint</span> fk_studentid <span class="keyword">foreign</span> key (studentid) <span class="keyword">references</span> student (id)</span><br><span class="line">) comment <span class="string">&#x27;学生课程中间表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> student_course</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="number">1</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">1</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">1</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">2</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">2</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">3</span>, <span class="number">4</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 演示一对一的关系</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> tb_user</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment <span class="keyword">primary</span> key comment <span class="string">&#x27;主键ID&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> gender <span class="type">char</span>(<span class="number">1</span>) comment <span class="string">&#x27;1: 男 , 2: 女&#x27;</span>,</span><br><span class="line"> phone <span class="type">char</span>(<span class="number">11</span>) comment <span class="string">&#x27;手机号&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;用户基本信息表&#x27;</span>;</span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> tb_user_edu</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment <span class="keyword">primary</span> key comment <span class="string">&#x27;主键ID&#x27;</span>,</span><br><span class="line"> degree <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;学历&#x27;</span>,</span><br><span class="line"> major <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;专业&#x27;</span>,</span><br><span class="line"> primaryschool <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;小学&#x27;</span>,</span><br><span class="line"> middleschool <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;中学&#x27;</span>,</span><br><span class="line"> university <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;大学&#x27;</span>,</span><br><span class="line"> userid <span class="type">int</span> <span class="keyword">unique</span> comment <span class="string">&#x27;用户ID&#x27;</span>,</span><br><span class="line"> <span class="keyword">constraint</span> fk_userid <span class="keyword">foreign</span> key (userid) <span class="keyword">references</span> tb_user (id)</span><br><span class="line">) comment <span class="string">&#x27;用户教育信息表&#x27;</span>;</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> tb_user(id, name, age, gender, phone)</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="string">&#x27;黄渤&#x27;</span>, <span class="number">45</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;18800001111&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;冰冰&#x27;</span>, <span class="number">35</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;18800002222&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;码云&#x27;</span>, <span class="number">55</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;18800008888&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;李彦宏&#x27;</span>, <span class="number">50</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;18800009999&#x27;</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> tb_user_edu(id, degree, major, primaryschool, middleschool,</span><br><span class="line"> university, userid)</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="string">&#x27;本科&#x27;</span>, <span class="string">&#x27;舞蹈&#x27;</span>, <span class="string">&#x27;静安区第一小学&#x27;</span>, <span class="string">&#x27;静安区第一中学&#x27;</span>, <span class="string">&#x27;北京舞蹈学院&#x27;</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;硕士&#x27;</span>, <span class="string">&#x27;表演&#x27;</span>, <span class="string">&#x27;朝阳区第一小学&#x27;</span>, <span class="string">&#x27;朝阳区第一中学&#x27;</span>, <span class="string">&#x27;北京电影学院&#x27;</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;本科&#x27;</span>, <span class="string">&#x27;英语&#x27;</span>, <span class="string">&#x27;杭州市第一小学&#x27;</span>, <span class="string">&#x27;杭州市第一中学&#x27;</span>, <span class="string">&#x27;杭州师范大学&#x27;</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;本科&#x27;</span>, <span class="string">&#x27;应用数学&#x27;</span>, <span class="string">&#x27;阳泉第一小学&#x27;</span>, <span class="string">&#x27;阳泉区第一中学&#x27;</span>, <span class="string">&#x27;清华大学&#x27;</span>, <span class="number">4</span>);</span><br></pre></td></tr></table></figure>
<h3 id="4-2-多表查询概述"><a href="#4-2-多表查询概述" class="headerlink" title="4.2 多表查询概述"></a>4.2 多表查询概述</h3><h4 id="4-2-1-数据准备"><a href="#4-2-1-数据准备" class="headerlink" title="4.2.1 数据准备"></a>4.2.1 数据准备</h4><figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 数据准备</span></span><br><span class="line"><span class="comment">-- 创建dept表并插入数据</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> dept</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;ID&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;部门名称&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;部门表&#x27;</span>;</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> dept (id, name)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;研发部&#x27;</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;市场部&#x27;</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;财务部&#x27;</span>),</span><br><span class="line"> (<span class="number">4</span>,</span><br><span class="line"> <span class="string">&#x27;销售部&#x27;</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;总经办&#x27;</span>),</span><br><span class="line"> (<span class="number">6</span>, <span class="string">&#x27;人事部&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建emp表并插入数据</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> emp</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;ID&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> job <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;职位&#x27;</span>,</span><br><span class="line"> salary <span class="type">int</span> comment <span class="string">&#x27;薪资&#x27;</span>,</span><br><span class="line"> entrydate <span class="type">date</span> comment <span class="string">&#x27;入职时间&#x27;</span>,</span><br><span class="line"> managerid <span class="type">int</span> comment <span class="string">&#x27;直属领导ID&#x27;</span>,</span><br><span class="line"> dept_id <span class="type">int</span> comment <span class="string">&#x27;部门ID&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;员工表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 添加外键</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp</span><br><span class="line"> <span class="keyword">add</span> <span class="keyword">constraint</span> fk_emp_dept_id <span class="keyword">foreign</span> key (dept_id) <span class="keyword">references</span></span><br><span class="line"> dept (id);</span><br><span class="line"></span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> emp (id, name, age, job, salary, entrydate, managerid, dept_id)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;金庸&#x27;</span>, <span class="number">66</span>, <span class="string">&#x27;总裁&#x27;</span>, <span class="number">20000</span>, <span class="string">&#x27;2000-01-01&#x27;</span>, <span class="keyword">null</span>, <span class="number">5</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;张无忌&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;项目经理&#x27;</span>, <span class="number">12500</span>, <span class="string">&#x27;2005-12-05&#x27;</span>, <span class="number">1</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;杨逍&#x27;</span>, <span class="number">33</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">8400</span>, <span class="string">&#x27;2000-11-03&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;韦一笑&#x27;</span>, <span class="number">48</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">11000</span>, <span class="string">&#x27;2002-02-05&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;常遇春&#x27;</span>, <span class="number">43</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">10500</span>, <span class="string">&#x27;2004-09-07&#x27;</span>, <span class="number">3</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">6</span>, <span class="string">&#x27;小昭&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;程序员鼓励师&#x27;</span>, <span class="number">6600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">7</span>, <span class="string">&#x27;灭绝&#x27;</span>, <span class="number">60</span>, <span class="string">&#x27;财务总监&#x27;</span>, <span class="number">8500</span>, <span class="string">&#x27;2002-09-12&#x27;</span>, <span class="number">1</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="number">8</span>, <span class="string">&#x27;周芷若&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;会计&#x27;</span>, <span class="number">4800</span>, <span class="string">&#x27;2006-06-02&#x27;</span>, <span class="number">7</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="number">9</span>, <span class="string">&#x27;丁敏君&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;出纳&#x27;</span>, <span class="number">5250</span>, <span class="string">&#x27;2009-05-13&#x27;</span>, <span class="number">7</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="number">10</span>, <span class="string">&#x27;赵敏&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;市场部总监&#x27;</span>, <span class="number">12500</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">1</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">11</span>, <span class="string">&#x27;鹿杖客&#x27;</span>, <span class="number">56</span>, <span class="string">&#x27;职员&#x27;</span>, <span class="number">3750</span>, <span class="string">&#x27;2006-10-03&#x27;</span>, <span class="number">10</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">12</span>, <span class="string">&#x27;鹤笔翁&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;职员&#x27;</span>, <span class="number">3750</span>, <span class="string">&#x27;2007-05-09&#x27;</span>, <span class="number">10</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">13</span>, <span class="string">&#x27;方东白&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;职员&#x27;</span>, <span class="number">5500</span>, <span class="string">&#x27;2009-02-12&#x27;</span>, <span class="number">10</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">14</span>, <span class="string">&#x27;张三丰&#x27;</span>, <span class="number">88</span>, <span class="string">&#x27;销售总监&#x27;</span>, <span class="number">14000</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">1</span>, <span class="number">4</span>),</span><br><span class="line"> (<span class="number">15</span>, <span class="string">&#x27;俞莲舟&#x27;</span>, <span class="number">38</span>, <span class="string">&#x27;销售&#x27;</span>, <span class="number">4600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">14</span>, <span class="number">4</span>),</span><br><span class="line"> (<span class="number">16</span>, <span class="string">&#x27;宋远桥&#x27;</span>, <span class="number">40</span>, <span class="string">&#x27;销售&#x27;</span>, <span class="number">4600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">14</span>, <span class="number">4</span>),</span><br><span class="line"> (<span class="number">17</span>, <span class="string">&#x27;陈友谅&#x27;</span>, <span class="number">42</span>, <span class="keyword">null</span>, <span class="number">2000</span>, <span class="string">&#x27;2011-10-12&#x27;</span>, <span class="number">1</span>, <span class="keyword">null</span>);</span><br></pre></td></tr></table></figure>
<h4 id="4-2-2-概述"><a href="#4-2-2-概述" class="headerlink" title="4.2.2 概述"></a>4.2.2 概述</h4><p><img src="/pictures/image-20231004200243641.png" alt="image-20231004200243641"></p>
<h4 id="4-2-3-分类"><a href="#4-2-3-分类" class="headerlink" title="4.2.3 分类"></a>4.2.3 分类</h4><p><img src="/pictures/image-20231004200624090.png" alt="image-20231004200624090"></p>
<h3 id="4-3-内连接"><a href="#4-3-内连接" class="headerlink" title="4.3 内连接"></a>4.3 内连接</h3><p><img src="/pictures/image-20231004200731770.png" alt="image-20231004200731770"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 内连接演示</span></span><br><span class="line"><span class="comment">-- 案例</span></span><br><span class="line"><span class="comment">-- 查询每一个员工的姓名 , 及关联的部门的名称 (隐式内连接实现)</span></span><br><span class="line"><span class="comment">-- 表结构: emp , dept</span></span><br><span class="line"><span class="comment">-- 连接条件: emp.dept_id = dept.id</span></span><br><span class="line"><span class="keyword">select</span> e.name, d.name <span class="keyword">from</span> emp e, dept d <span class="keyword">where</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询每一个员工的姓名 , 及关联的部门的名称 (显式内连接实现) --- INNER JOIN ...ON ...</span></span><br><span class="line"><span class="comment">-- 表结构: emp , dept</span></span><br><span class="line"><span class="comment">-- 连接条件: emp.dept_id = dept.id</span></span><br><span class="line"><span class="keyword">select</span> e.name ,d.name <span class="keyword">from</span> emp e <span class="keyword">inner</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id;</span><br></pre></td></tr></table></figure>
<blockquote>
<p>一旦为表起了别名,就不能再使用表名来指定对应的字段了,此时只能够使用别名来指定字段。</p>
</blockquote>
<h3 id="4-4-外连接"><a href="#4-4-外连接" class="headerlink" title="4.4 外连接"></a>4.4 外连接</h3><p><img src="/pictures/image-20231004201445881.png" alt="image-20231004201445881"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 外连接</span></span><br><span class="line"><span class="comment">-- 查询emp表的所有数据, 和对应的部门信息</span></span><br><span class="line"><span class="comment">-- 由于需求中提到要查询emp的所有数据所以是不能内连接查询的需要考虑使用外连接查询。</span></span><br><span class="line"><span class="comment">-- 表结构: emp, dept</span></span><br><span class="line"><span class="comment">-- 连接条件: emp.dept_id = dept.id</span></span><br><span class="line"><span class="keyword">select</span> e.name,d.name <span class="keyword">from</span> emp e <span class="keyword">left</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询dept表的所有数据, 和对应的员工信息(右外连接)</span></span><br><span class="line"><span class="comment">-- 由于需求中提到要查询dept表的所有数据所以是不能内连接查询的需要考虑使用外连接查询</span></span><br><span class="line"><span class="comment">-- 表结构: emp, dept</span></span><br><span class="line"><span class="comment">-- 连接条件: emp.dept_id = dept.id</span></span><br><span class="line"><span class="keyword">select</span> e.name,d.name <span class="keyword">from</span> emp e <span class="keyword">right</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id;</span><br></pre></td></tr></table></figure>
<blockquote>
<p>注意事项左外连接和右外连接是可以相互替换的只需要调整在连接查询时SQL中表结构的先后顺序就可以了。而我们在日常开发使用时更偏向于左外连接。</p>
</blockquote>
<h3 id="4-5-自连接"><a href="#4-5-自连接" class="headerlink" title="4.5 自连接"></a>4.5 自连接</h3><p><img src="/pictures/image-20231004202219787.png" alt="image-20231004202219787"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 自连接</span></span><br><span class="line"><span class="comment">-- 查询员工 及其 所属领导的名字</span></span><br><span class="line"><span class="comment">-- 表结构: emp</span></span><br><span class="line"><span class="comment">-- 技巧:查询的时候看作是两张表</span></span><br><span class="line"><span class="keyword">select</span> e1.name <span class="string">&#x27;员工&#x27;</span> ,e2.name <span class="string">&#x27;领导&#x27;</span> <span class="keyword">from</span> emp e1,emp e2 <span class="keyword">where</span> e1.managerid <span class="operator">=</span> e2.id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询所有员工 emp 及其领导的名字 emp , 如果员工没有领导, 也需要查询出来</span></span><br><span class="line"><span class="comment">-- 表结构: emp a , emp b</span></span><br><span class="line"><span class="keyword">select</span> e1.name <span class="string">&#x27;员工&#x27;</span> ,e2.name <span class="string">&#x27;领导&#x27;</span> <span class="keyword">from</span> emp e1 <span class="keyword">left</span> <span class="keyword">join</span> emp e2 <span class="keyword">on</span> e1.managerid <span class="operator">=</span> e2.id;</span><br></pre></td></tr></table></figure>
<h3 id="4-6-联合查询"><a href="#4-6-联合查询" class="headerlink" title="4.6 联合查询"></a>4.6 联合查询</h3><p><img src="/pictures/image-20231004203207924.png" alt="image-20231004203207924"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 联合查询</span></span><br><span class="line"><span class="comment">-- 将薪资低于 5000 的员工 , 和 年龄大于 50 岁的员工全部查询出来.</span></span><br><span class="line"><span class="comment">-- 当前对于这个需求,我们可以直接使用多条件查询,使用逻辑运算符 or 连接即可,也可以通过union/union all来联合查询</span></span><br><span class="line"><span class="comment">-- 相当于把下面的两条sql的结果拼接在一起(去掉all就可以实现去重)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e <span class="keyword">where</span> e.salary <span class="operator">&lt;</span> <span class="number">5000</span></span><br><span class="line"><span class="keyword">union</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e <span class="keyword">where</span> e.age <span class="operator">&gt;</span> <span class="number">50</span>;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20231004203724124.png" alt="image-20231004203724124"></p>
<blockquote>
<p>union all查询出来的结果仅仅进行简单的合并并未去重</p>
<p>union 联合查询,会对查询出来的结果进行去重处理</p>
</blockquote>
<h3 id="4-7-子查询"><a href="#4-7-子查询" class="headerlink" title="4.7 子查询"></a>4.7 子查询</h3><p><img src="/pictures/image-20231004204033345.png" alt="image-20231004204033345"></p>
<p><strong>标量子查询</strong></p>
<p>子查询返回的结果是单个值(数字、字符串、日期等),最简单的形式,这种子查询称为标量子查询。常用的操作符:&#x3D; &lt;&gt; &gt; &gt;&#x3D; &lt; &lt;&#x3D;</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 标量子查询</span></span><br><span class="line"><span class="comment">-- 1.查询 &quot;销售部&quot; 的所有员工信息</span></span><br><span class="line"><span class="comment">-- 1.1 查询销售部的部门id</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e <span class="keyword">where</span> e.dept_id <span class="operator">=</span> (<span class="keyword">select</span> id <span class="keyword">from</span> dept d <span class="keyword">where</span> d.name <span class="operator">=</span> <span class="string">&#x27;销售部&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询在 &quot;方东白&quot; 入职之后的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e1 <span class="keyword">where</span> e1.entrydate <span class="operator">&gt;</span> (<span class="keyword">select</span> e2.entrydate <span class="keyword">from</span> emp e2 <span class="keyword">where</span> e2.name <span class="operator">=</span> <span class="string">&#x27;方东白&#x27;</span>);</span><br></pre></td></tr></table></figure>
<p><strong>列子查询</strong></p>
<p>子查询返回的结果是一列可以是多行这种子查询称为列子查询。常用的操作符IN 、NOT IN 、 ANY 、SOME 、 ALL</p>
<p><img src="/pictures/image-20231004205225188.png" alt="image-20231004205225188"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 列子查询</span></span><br><span class="line"><span class="comment">-- 查询 &quot;销售部&quot; 和 &quot;市场部&quot; 的所有员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e <span class="keyword">where</span> e.dept_id <span class="keyword">in</span> (<span class="keyword">select</span> id <span class="keyword">from</span> dept <span class="keyword">where</span> dept.name <span class="operator">=</span> <span class="string">&#x27;销售部&#x27;</span> <span class="keyword">or</span> dept.name <span class="operator">=</span> <span class="string">&#x27;市场部&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询比财务部所有人工资都高的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e <span class="keyword">where</span> e.salary <span class="operator">&gt;</span> <span class="keyword">all</span> (<span class="keyword">select</span> e2.salary <span class="keyword">from</span> emp e2 <span class="keyword">where</span> e2.dept_id <span class="operator">=</span> (<span class="keyword">select</span> id <span class="keyword">from</span> dept <span class="keyword">where</span> dept.name <span class="operator">=</span> <span class="string">&#x27;财务部&#x27;</span>));</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询比研发部其中任意一人工资高的员工信息(使用any或者some均可)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e <span class="keyword">where</span> e.salary <span class="operator">&gt;</span> <span class="keyword">any</span> (<span class="keyword">select</span> e2.salary <span class="keyword">from</span> emp e2 <span class="keyword">where</span> e2.dept_id <span class="operator">=</span> (<span class="keyword">select</span> id <span class="keyword">from</span> dept <span class="keyword">where</span> dept.name <span class="operator">=</span> <span class="string">&#x27;研发部&#x27;</span>));</span><br></pre></td></tr></table></figure>
<p><strong>行子查询</strong></p>
<p>子查询返回的结果是一行(可以是多列),这种子查询称为行子查询。常用的操作符:&#x3D; 、&lt;&gt; 、IN 、NOT IN</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 行子查询</span></span><br><span class="line"><span class="comment">-- 查询与&quot;张无忌&quot;的薪资及与其直属领导相同的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e2 <span class="keyword">where</span> (e2.salary,e2.managerid) <span class="operator">=</span> (<span class="keyword">select</span> e.salary,e.managerid <span class="keyword">from</span> emp e <span class="keyword">where</span> e.name <span class="operator">=</span> <span class="string">&#x27;张无忌&#x27;</span>);</span><br></pre></td></tr></table></figure>
<p><strong>表子查询</strong></p>
<p>子查询返回的结果是多行多列这种子查询称为表子查询。常用的操作符IN</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 表子查询</span></span><br><span class="line"><span class="comment">-- 查询与 &quot;鹿杖客&quot; , &quot;宋远桥&quot; 的职位和薪资相同的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e2 <span class="keyword">where</span> (e2.job,e2.salary) <span class="keyword">in</span> (<span class="keyword">select</span> e.job, e.salary <span class="keyword">from</span> emp e <span class="keyword">where</span> e.name <span class="operator">=</span> <span class="string">&#x27;鹿杖客&#x27;</span> <span class="keyword">or</span> name <span class="operator">=</span> <span class="string">&#x27;宋远桥&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询入职日期是 &quot;2006-01-01&quot; 之后的员工信息 , 及其部门信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> (<span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> entrydate <span class="operator">&gt;</span> <span class="string">&#x27;2006-01-01&#x27;</span>) e <span class="keyword">left</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id;</span><br></pre></td></tr></table></figure>
<p><strong>多表查询相关的sql语句</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- ---------------------------------------------多表查询--------------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 多表关系</span></span><br><span class="line"><span class="comment">-- 演示多对多的关系</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> student</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment <span class="keyword">primary</span> key comment <span class="string">&#x27;主键ID&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> <span class="keyword">no</span> <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;学号&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;学生表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> student</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="string">&#x27;黛绮丝&#x27;</span>, <span class="string">&#x27;2000100101&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;谢逊&#x27;</span>,</span><br><span class="line"> <span class="string">&#x27;2000100102&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;殷天正&#x27;</span>, <span class="string">&#x27;2000100103&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;韦一笑&#x27;</span>, <span class="string">&#x27;2000100104&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> course</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment <span class="keyword">primary</span> key comment <span class="string">&#x27;主键ID&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;课程名称&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;课程表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> course</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="string">&#x27;Java&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;PHP&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;MySQL&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;Hadoop&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> student_course</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;主键&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> studentid <span class="type">int</span> <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;学生ID&#x27;</span>,</span><br><span class="line"> courseid <span class="type">int</span> <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;课程ID&#x27;</span>,</span><br><span class="line"> <span class="keyword">constraint</span> fk_courseid <span class="keyword">foreign</span> key (courseid) <span class="keyword">references</span> course (id),</span><br><span class="line"> <span class="keyword">constraint</span> fk_studentid <span class="keyword">foreign</span> key (studentid) <span class="keyword">references</span> student (id)</span><br><span class="line">) comment <span class="string">&#x27;学生课程中间表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> student_course</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="number">1</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">1</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">1</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">2</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">2</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">3</span>, <span class="number">4</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 演示一对一的关系</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> tb_user</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment <span class="keyword">primary</span> key comment <span class="string">&#x27;主键ID&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> gender <span class="type">char</span>(<span class="number">1</span>) comment <span class="string">&#x27;1: 男 , 2: 女&#x27;</span>,</span><br><span class="line"> phone <span class="type">char</span>(<span class="number">11</span>) comment <span class="string">&#x27;手机号&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;用户基本信息表&#x27;</span>;</span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> tb_user_edu</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment <span class="keyword">primary</span> key comment <span class="string">&#x27;主键ID&#x27;</span>,</span><br><span class="line"> degree <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;学历&#x27;</span>,</span><br><span class="line"> major <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;专业&#x27;</span>,</span><br><span class="line"> primaryschool <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;小学&#x27;</span>,</span><br><span class="line"> middleschool <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;中学&#x27;</span>,</span><br><span class="line"> university <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;大学&#x27;</span>,</span><br><span class="line"> userid <span class="type">int</span> <span class="keyword">unique</span> comment <span class="string">&#x27;用户ID&#x27;</span>,</span><br><span class="line"> <span class="keyword">constraint</span> fk_userid <span class="keyword">foreign</span> key (userid) <span class="keyword">references</span> tb_user (id)</span><br><span class="line">) comment <span class="string">&#x27;用户教育信息表&#x27;</span>;</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> tb_user(id, name, age, gender, phone)</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="string">&#x27;黄渤&#x27;</span>, <span class="number">45</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;18800001111&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;冰冰&#x27;</span>, <span class="number">35</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;18800002222&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;码云&#x27;</span>, <span class="number">55</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;18800008888&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;李彦宏&#x27;</span>, <span class="number">50</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;18800009999&#x27;</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> tb_user_edu(id, degree, major, primaryschool, middleschool,</span><br><span class="line"> university, userid)</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="string">&#x27;本科&#x27;</span>, <span class="string">&#x27;舞蹈&#x27;</span>, <span class="string">&#x27;静安区第一小学&#x27;</span>, <span class="string">&#x27;静安区第一中学&#x27;</span>, <span class="string">&#x27;北京舞蹈学院&#x27;</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;硕士&#x27;</span>, <span class="string">&#x27;表演&#x27;</span>, <span class="string">&#x27;朝阳区第一小学&#x27;</span>, <span class="string">&#x27;朝阳区第一中学&#x27;</span>, <span class="string">&#x27;北京电影学院&#x27;</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;本科&#x27;</span>, <span class="string">&#x27;英语&#x27;</span>, <span class="string">&#x27;杭州市第一小学&#x27;</span>, <span class="string">&#x27;杭州市第一中学&#x27;</span>, <span class="string">&#x27;杭州师范大学&#x27;</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;本科&#x27;</span>, <span class="string">&#x27;应用数学&#x27;</span>, <span class="string">&#x27;阳泉第一小学&#x27;</span>, <span class="string">&#x27;阳泉区第一中学&#x27;</span>, <span class="string">&#x27;清华大学&#x27;</span>, <span class="number">4</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 演示多表查询</span></span><br><span class="line"><span class="comment">-- 数据准备</span></span><br><span class="line"><span class="comment">-- 创建dept表并插入数据</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> dept</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;ID&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;部门名称&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;部门表&#x27;</span>;</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> dept (id, name)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;研发部&#x27;</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;市场部&#x27;</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;财务部&#x27;</span>),</span><br><span class="line"> (<span class="number">4</span>,</span><br><span class="line"> <span class="string">&#x27;销售部&#x27;</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;总经办&#x27;</span>),</span><br><span class="line"> (<span class="number">6</span>, <span class="string">&#x27;人事部&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建emp表并插入数据</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> emp</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;ID&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> job <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;职位&#x27;</span>,</span><br><span class="line"> salary <span class="type">int</span> comment <span class="string">&#x27;薪资&#x27;</span>,</span><br><span class="line"> entrydate <span class="type">date</span> comment <span class="string">&#x27;入职时间&#x27;</span>,</span><br><span class="line"> managerid <span class="type">int</span> comment <span class="string">&#x27;直属领导ID&#x27;</span>,</span><br><span class="line"> dept_id <span class="type">int</span> comment <span class="string">&#x27;部门ID&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;员工表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 添加外键</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp</span><br><span class="line"> <span class="keyword">add</span> <span class="keyword">constraint</span> fk_emp_dept_id <span class="keyword">foreign</span> key (dept_id) <span class="keyword">references</span></span><br><span class="line"> dept (id);</span><br><span class="line"></span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> emp (id, name, age, job, salary, entrydate, managerid, dept_id)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;金庸&#x27;</span>, <span class="number">66</span>, <span class="string">&#x27;总裁&#x27;</span>, <span class="number">20000</span>, <span class="string">&#x27;2000-01-01&#x27;</span>, <span class="keyword">null</span>, <span class="number">5</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;张无忌&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;项目经理&#x27;</span>, <span class="number">12500</span>, <span class="string">&#x27;2005-12-05&#x27;</span>, <span class="number">1</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;杨逍&#x27;</span>, <span class="number">33</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">8400</span>, <span class="string">&#x27;2000-11-03&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;韦一笑&#x27;</span>, <span class="number">48</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">11000</span>, <span class="string">&#x27;2002-02-05&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;常遇春&#x27;</span>, <span class="number">43</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">10500</span>, <span class="string">&#x27;2004-09-07&#x27;</span>, <span class="number">3</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">6</span>, <span class="string">&#x27;小昭&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;程序员鼓励师&#x27;</span>, <span class="number">6600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">7</span>, <span class="string">&#x27;灭绝&#x27;</span>, <span class="number">60</span>, <span class="string">&#x27;财务总监&#x27;</span>, <span class="number">8500</span>, <span class="string">&#x27;2002-09-12&#x27;</span>, <span class="number">1</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="number">8</span>, <span class="string">&#x27;周芷若&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;会计&#x27;</span>, <span class="number">48000</span>, <span class="string">&#x27;2006-06-02&#x27;</span>, <span class="number">7</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="number">9</span>, <span class="string">&#x27;丁敏君&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;出纳&#x27;</span>, <span class="number">5250</span>, <span class="string">&#x27;2009-05-13&#x27;</span>, <span class="number">7</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="number">10</span>, <span class="string">&#x27;赵敏&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;市场部总监&#x27;</span>, <span class="number">12500</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">1</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">11</span>, <span class="string">&#x27;鹿杖客&#x27;</span>, <span class="number">56</span>, <span class="string">&#x27;职员&#x27;</span>, <span class="number">3750</span>, <span class="string">&#x27;2006-10-03&#x27;</span>, <span class="number">10</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">12</span>, <span class="string">&#x27;鹤笔翁&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;职员&#x27;</span>, <span class="number">3750</span>, <span class="string">&#x27;2007-05-09&#x27;</span>, <span class="number">10</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">13</span>, <span class="string">&#x27;方东白&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;职员&#x27;</span>, <span class="number">5500</span>, <span class="string">&#x27;2009-02-12&#x27;</span>, <span class="number">10</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">14</span>, <span class="string">&#x27;张三丰&#x27;</span>, <span class="number">88</span>, <span class="string">&#x27;销售总监&#x27;</span>, <span class="number">14000</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">1</span>, <span class="number">4</span>),</span><br><span class="line"> (<span class="number">15</span>, <span class="string">&#x27;俞莲舟&#x27;</span>, <span class="number">38</span>, <span class="string">&#x27;销售&#x27;</span>, <span class="number">4600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">14</span>, <span class="number">4</span>),</span><br><span class="line"> (<span class="number">16</span>, <span class="string">&#x27;宋远桥&#x27;</span>, <span class="number">40</span>, <span class="string">&#x27;销售&#x27;</span>, <span class="number">4600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">14</span>, <span class="number">4</span>),</span><br><span class="line"> (<span class="number">17</span>, <span class="string">&#x27;陈友谅&#x27;</span>, <span class="number">42</span>, <span class="keyword">null</span>, <span class="number">2000</span>, <span class="string">&#x27;2011-10-12&#x27;</span>, <span class="number">1</span>, <span class="keyword">null</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 多表查询</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp,</span><br><span class="line"> dept</span><br><span class="line"><span class="keyword">where</span> emp.dept_id <span class="operator">=</span> dept.id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 内连接演示</span></span><br><span class="line"><span class="comment">-- 案例</span></span><br><span class="line"><span class="comment">-- 查询每一个员工的姓名 , 及关联的部门的名称 (隐式内连接实现)</span></span><br><span class="line"><span class="comment">-- 表结构: emp , dept</span></span><br><span class="line"><span class="comment">-- 连接条件: emp.dept_id = dept.id</span></span><br><span class="line"><span class="keyword">select</span> e.name, d.name <span class="keyword">from</span> emp e, dept d <span class="keyword">where</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询每一个员工的姓名 , 及关联的部门的名称 (显式内连接实现) --- INNER JOIN ...ON ...</span></span><br><span class="line"><span class="comment">-- 表结构: emp , dept</span></span><br><span class="line"><span class="comment">-- 连接条件: emp.dept_id = dept.id</span></span><br><span class="line"><span class="keyword">select</span> e.name ,d.name <span class="keyword">from</span> emp e <span class="keyword">inner</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 外连接</span></span><br><span class="line"><span class="comment">-- 查询emp表的所有数据, 和对应的部门信息</span></span><br><span class="line"><span class="comment">-- 由于需求中提到要查询emp的所有数据所以是不能内连接查询的需要考虑使用外连接查询。</span></span><br><span class="line"><span class="comment">-- 表结构: emp, dept</span></span><br><span class="line"><span class="comment">-- 连接条件: emp.dept_id = dept.id</span></span><br><span class="line"><span class="keyword">select</span> e.name,d.name <span class="keyword">from</span> emp e <span class="keyword">left</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询dept表的所有数据, 和对应的员工信息(右外连接)</span></span><br><span class="line"><span class="comment">-- 由于需求中提到要查询dept表的所有数据所以是不能内连接查询的需要考虑使用外连接查询</span></span><br><span class="line"><span class="comment">-- 表结构: emp, dept</span></span><br><span class="line"><span class="comment">-- 连接条件: emp.dept_id = dept.id</span></span><br><span class="line"><span class="keyword">select</span> e.name,d.name <span class="keyword">from</span> emp e <span class="keyword">right</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 自连接</span></span><br><span class="line"><span class="comment">-- 查询员工 及其 所属领导的名字</span></span><br><span class="line"><span class="comment">-- 表结构: emp</span></span><br><span class="line"><span class="comment">-- 技巧:查询的时候看作是两张表</span></span><br><span class="line"><span class="keyword">select</span> e1.name <span class="string">&#x27;员工&#x27;</span> ,e2.name <span class="string">&#x27;领导&#x27;</span> <span class="keyword">from</span> emp e1,emp e2 <span class="keyword">where</span> e1.managerid <span class="operator">=</span> e2.id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询所有员工 emp 及其领导的名字 emp , 如果员工没有领导, 也需要查询出来</span></span><br><span class="line"><span class="comment">-- 表结构: emp a , emp b</span></span><br><span class="line"><span class="keyword">select</span> e1.name <span class="string">&#x27;员工&#x27;</span> ,e2.name <span class="string">&#x27;领导&#x27;</span> <span class="keyword">from</span> emp e1 <span class="keyword">left</span> <span class="keyword">join</span> emp e2 <span class="keyword">on</span> e1.managerid <span class="operator">=</span> e2.id;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 联合查询</span></span><br><span class="line"><span class="comment">-- 将薪资低于 5000 的员工 , 和 年龄大于 50 岁的员工全部查询出来.</span></span><br><span class="line"><span class="comment">-- 当前对于这个需求,我们可以直接使用多条件查询,使用逻辑运算符 or 连接即可,也可以通过union/union all来联合查询</span></span><br><span class="line"><span class="comment">-- 相当于把下面的两条sql的结果拼接在一起(去掉all就可以实现去重)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e <span class="keyword">where</span> e.salary <span class="operator">&lt;</span> <span class="number">5000</span></span><br><span class="line"><span class="keyword">union</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e <span class="keyword">where</span> e.age <span class="operator">&gt;</span> <span class="number">50</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 子查询</span></span><br><span class="line"><span class="comment">-- 标量子查询</span></span><br><span class="line"><span class="comment">-- 1.查询 &quot;销售部&quot; 的所有员工信息</span></span><br><span class="line"><span class="comment">-- 1.1 查询销售部的部门id</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e <span class="keyword">where</span> e.dept_id <span class="operator">=</span> (<span class="keyword">select</span> id <span class="keyword">from</span> dept d <span class="keyword">where</span> d.name <span class="operator">=</span> <span class="string">&#x27;销售部&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询在 &quot;方东白&quot; 入职之后的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e1 <span class="keyword">where</span> e1.entrydate <span class="operator">&gt;</span> (<span class="keyword">select</span> e2.entrydate <span class="keyword">from</span> emp e2 <span class="keyword">where</span> e2.name <span class="operator">=</span> <span class="string">&#x27;方东白&#x27;</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 列子查询</span></span><br><span class="line"><span class="comment">-- 查询 &quot;销售部&quot; 和 &quot;市场部&quot; 的所有员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e <span class="keyword">where</span> e.dept_id <span class="keyword">in</span> (<span class="keyword">select</span> id <span class="keyword">from</span> dept <span class="keyword">where</span> dept.name <span class="operator">=</span> <span class="string">&#x27;销售部&#x27;</span> <span class="keyword">or</span> dept.name <span class="operator">=</span> <span class="string">&#x27;市场部&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询比财务部所有人工资都高的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e <span class="keyword">where</span> e.salary <span class="operator">&gt;</span> <span class="keyword">all</span> (<span class="keyword">select</span> e2.salary <span class="keyword">from</span> emp e2 <span class="keyword">where</span> e2.dept_id <span class="operator">=</span> (<span class="keyword">select</span> id <span class="keyword">from</span> dept <span class="keyword">where</span> dept.name <span class="operator">=</span> <span class="string">&#x27;财务部&#x27;</span>));</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询比研发部其中任意一人工资高的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e <span class="keyword">where</span> e.salary <span class="operator">&gt;</span> <span class="keyword">any</span> (<span class="keyword">select</span> e2.salary <span class="keyword">from</span> emp e2 <span class="keyword">where</span> e2.dept_id <span class="operator">=</span> (<span class="keyword">select</span> id <span class="keyword">from</span> dept <span class="keyword">where</span> dept.name <span class="operator">=</span> <span class="string">&#x27;研发部&#x27;</span>));</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 行子查询</span></span><br><span class="line"><span class="comment">-- 查询与&quot;张无忌&quot;的薪资及与其直属领导相同的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e2 <span class="keyword">where</span> (e2.salary,e2.managerid) <span class="operator">=</span> (<span class="keyword">select</span> e.salary,e.managerid <span class="keyword">from</span> emp e <span class="keyword">where</span> e.name <span class="operator">=</span> <span class="string">&#x27;张无忌&#x27;</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 表子查询</span></span><br><span class="line"><span class="comment">-- 查询与 &quot;鹿杖客&quot; , &quot;宋远桥&quot; 的职位和薪资相同的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp e2 <span class="keyword">where</span> (e2.job,e2.salary) <span class="keyword">in</span> (<span class="keyword">select</span> e.job, e.salary <span class="keyword">from</span> emp e <span class="keyword">where</span> e.name <span class="operator">=</span> <span class="string">&#x27;鹿杖客&#x27;</span> <span class="keyword">or</span> name <span class="operator">=</span> <span class="string">&#x27;宋远桥&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询入职日期是 &quot;2006-01-01&quot; 之后的员工信息 , 及其部门信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> (<span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> entrydate <span class="operator">&gt;</span> <span class="string">&#x27;2006-01-01&#x27;</span>) e <span class="keyword">left</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id;</span><br></pre></td></tr></table></figure>
<h3 id="4-8-多表查询案例"><a href="#4-8-多表查询案例" class="headerlink" title="4.8 多表查询案例"></a>4.8 多表查询案例</h3><p><strong>题目</strong></p>
<p><img src="/pictures/image-20231004212719134.png" alt="image-20231004212719134"></p>
<p><strong>数据准备</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 数据准备</span></span><br><span class="line"><span class="comment">-- 创建dept表并插入数据</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> dept</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;ID&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;部门名称&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;部门表&#x27;</span>;</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> dept (id, name)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;研发部&#x27;</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;市场部&#x27;</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;财务部&#x27;</span>),</span><br><span class="line"> (<span class="number">4</span>,</span><br><span class="line"> <span class="string">&#x27;销售部&#x27;</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;总经办&#x27;</span>),</span><br><span class="line"> (<span class="number">6</span>, <span class="string">&#x27;人事部&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建emp表并插入数据</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> emp</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;ID&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> job <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;职位&#x27;</span>,</span><br><span class="line"> salary <span class="type">int</span> comment <span class="string">&#x27;薪资&#x27;</span>,</span><br><span class="line"> entrydate <span class="type">date</span> comment <span class="string">&#x27;入职时间&#x27;</span>,</span><br><span class="line"> managerid <span class="type">int</span> comment <span class="string">&#x27;直属领导ID&#x27;</span>,</span><br><span class="line"> dept_id <span class="type">int</span> comment <span class="string">&#x27;部门ID&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;员工表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 添加外键</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp</span><br><span class="line"> <span class="keyword">add</span> <span class="keyword">constraint</span> fk_emp_dept_id <span class="keyword">foreign</span> key (dept_id) <span class="keyword">references</span></span><br><span class="line"> dept (id);</span><br><span class="line"></span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> emp (id, name, age, job, salary, entrydate, managerid, dept_id)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;金庸&#x27;</span>, <span class="number">66</span>, <span class="string">&#x27;总裁&#x27;</span>, <span class="number">20000</span>, <span class="string">&#x27;2000-01-01&#x27;</span>, <span class="keyword">null</span>, <span class="number">5</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;张无忌&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;项目经理&#x27;</span>, <span class="number">12500</span>, <span class="string">&#x27;2005-12-05&#x27;</span>, <span class="number">1</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;杨逍&#x27;</span>, <span class="number">33</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">8400</span>, <span class="string">&#x27;2000-11-03&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;韦一笑&#x27;</span>, <span class="number">48</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">11000</span>, <span class="string">&#x27;2002-02-05&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;常遇春&#x27;</span>, <span class="number">43</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">10500</span>, <span class="string">&#x27;2004-09-07&#x27;</span>, <span class="number">3</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">6</span>, <span class="string">&#x27;小昭&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;程序员鼓励师&#x27;</span>, <span class="number">6600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">7</span>, <span class="string">&#x27;灭绝&#x27;</span>, <span class="number">60</span>, <span class="string">&#x27;财务总监&#x27;</span>, <span class="number">8500</span>, <span class="string">&#x27;2002-09-12&#x27;</span>, <span class="number">1</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="number">8</span>, <span class="string">&#x27;周芷若&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;会计&#x27;</span>, <span class="number">4800</span>, <span class="string">&#x27;2006-06-02&#x27;</span>, <span class="number">7</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="number">9</span>, <span class="string">&#x27;丁敏君&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;出纳&#x27;</span>, <span class="number">5250</span>, <span class="string">&#x27;2009-05-13&#x27;</span>, <span class="number">7</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="number">10</span>, <span class="string">&#x27;赵敏&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;市场部总监&#x27;</span>, <span class="number">12500</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">1</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">11</span>, <span class="string">&#x27;鹿杖客&#x27;</span>, <span class="number">56</span>, <span class="string">&#x27;职员&#x27;</span>, <span class="number">3750</span>, <span class="string">&#x27;2006-10-03&#x27;</span>, <span class="number">10</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">12</span>, <span class="string">&#x27;鹤笔翁&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;职员&#x27;</span>, <span class="number">3750</span>, <span class="string">&#x27;2007-05-09&#x27;</span>, <span class="number">10</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">13</span>, <span class="string">&#x27;方东白&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;职员&#x27;</span>, <span class="number">5500</span>, <span class="string">&#x27;2009-02-12&#x27;</span>, <span class="number">10</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">14</span>, <span class="string">&#x27;张三丰&#x27;</span>, <span class="number">88</span>, <span class="string">&#x27;销售总监&#x27;</span>, <span class="number">14000</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">1</span>, <span class="number">4</span>),</span><br><span class="line"> (<span class="number">15</span>, <span class="string">&#x27;俞莲舟&#x27;</span>, <span class="number">38</span>, <span class="string">&#x27;销售&#x27;</span>, <span class="number">4600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">14</span>, <span class="number">4</span>),</span><br><span class="line"> (<span class="number">16</span>, <span class="string">&#x27;宋远桥&#x27;</span>, <span class="number">40</span>, <span class="string">&#x27;销售&#x27;</span>, <span class="number">4600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">14</span>, <span class="number">4</span>),</span><br><span class="line"> (<span class="number">17</span>, <span class="string">&#x27;陈友谅&#x27;</span>, <span class="number">42</span>, <span class="keyword">null</span>, <span class="number">2000</span>, <span class="string">&#x27;2011-10-12&#x27;</span>, <span class="number">1</span>, <span class="keyword">null</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建salgrade并插入数据</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> salgrade</span><br><span class="line">(</span><br><span class="line"> grade <span class="type">int</span>,</span><br><span class="line"> losal <span class="type">int</span>,</span><br><span class="line"> hisal <span class="type">int</span></span><br><span class="line">) comment <span class="string">&#x27;薪资等级表&#x27;</span>;</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">1</span>, <span class="number">0</span>, <span class="number">3000</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">2</span>, <span class="number">3001</span>, <span class="number">5000</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">3</span>, <span class="number">5001</span>, <span class="number">8000</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">4</span>, <span class="number">8001</span>, <span class="number">10000</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">5</span>, <span class="number">10001</span>, <span class="number">15000</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">6</span>, <span class="number">15001</span>, <span class="number">20000</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">7</span>, <span class="number">20001</span>, <span class="number">25000</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">8</span>, <span class="number">25001</span>, <span class="number">30000</span>);</span><br></pre></td></tr></table></figure>
<p><strong>题解</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 题解</span></span><br><span class="line"><span class="comment">-- 1.查询员工的姓名、年龄、职位、部门信息(隐式内连接)</span></span><br><span class="line"><span class="keyword">select</span> e.name, e.age, e.job, d.name</span><br><span class="line"><span class="keyword">from</span> emp e,</span><br><span class="line"> dept d</span><br><span class="line"><span class="keyword">where</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 2.查询年龄小于30岁的员工的姓名、年龄、职位、部门信息显式内连接</span></span><br><span class="line"><span class="keyword">select</span> e.name, e.age, e.job, d.name</span><br><span class="line"><span class="keyword">from</span> emp e</span><br><span class="line"> <span class="keyword">inner</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id</span><br><span class="line"><span class="keyword">where</span> e.age <span class="operator">&lt;</span> <span class="number">30</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 3.查询拥有员工的部门id、部门名称</span></span><br><span class="line"><span class="comment">-- 方法一</span></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">distinct</span> d.id, d.name</span><br><span class="line"><span class="keyword">from</span> emp e,</span><br><span class="line"> dept d</span><br><span class="line"><span class="keyword">where</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"><span class="comment">-- 方法二</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> dept</span><br><span class="line"><span class="keyword">where</span> dept.id <span class="keyword">in</span> (<span class="keyword">select</span> e.dept_id <span class="keyword">from</span> emp e);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 4.查询所有年龄大于40岁的员工及其归属的部门名称如果没有员工分配部门也需要展示出来</span></span><br><span class="line"><span class="keyword">select</span> e.<span class="operator">*</span>, d.name</span><br><span class="line"><span class="keyword">from</span> emp e</span><br><span class="line"> <span class="keyword">left</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id</span><br><span class="line"><span class="keyword">where</span> age <span class="operator">&gt;</span> <span class="number">40</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 5.查询所有员工的工资等级</span></span><br><span class="line"><span class="keyword">select</span> e.name <span class="string">&#x27;姓名&#x27;</span>, s.grade <span class="string">&#x27;工资等级&#x27;</span></span><br><span class="line"><span class="keyword">from</span> emp e,</span><br><span class="line"> salgrade s</span><br><span class="line"><span class="keyword">where</span> e.salary <span class="keyword">between</span> s.losal <span class="keyword">and</span> s.hisal;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 6.查询研发部所有员工的信息已经工资等级</span></span><br><span class="line"><span class="comment">-- 方法一</span></span><br><span class="line"><span class="keyword">select</span> e.<span class="operator">*</span>, s.grade</span><br><span class="line"><span class="keyword">from</span> emp e,</span><br><span class="line"> dept d,</span><br><span class="line"> salgrade s</span><br><span class="line"><span class="keyword">where</span> e.dept_id <span class="operator">=</span> d.id</span><br><span class="line"> <span class="keyword">and</span> (e.salary <span class="keyword">between</span> s.losal <span class="keyword">and</span> s.hisal)</span><br><span class="line"> <span class="keyword">and</span> d.name <span class="operator">=</span> <span class="string">&#x27;研发部&#x27;</span>;</span><br><span class="line"><span class="comment">-- 方法二</span></span><br><span class="line"><span class="keyword">select</span> e.<span class="operator">*</span>, s.grade</span><br><span class="line"><span class="keyword">from</span> (<span class="keyword">select</span> emp.<span class="operator">*</span></span><br><span class="line"> <span class="keyword">from</span> emp,</span><br><span class="line"> dept</span><br><span class="line"> <span class="keyword">where</span> emp.dept_id <span class="operator">=</span> dept.id</span><br><span class="line"> <span class="keyword">and</span> dept.name <span class="operator">=</span> <span class="string">&#x27;研发部&#x27;</span>) e,</span><br><span class="line"> salgrade s</span><br><span class="line"><span class="keyword">where</span> e.salary <span class="keyword">between</span> s.losal <span class="keyword">and</span> s.hisal;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 7.查询研发部的平均工资</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">avg</span>(e.salary)</span><br><span class="line"><span class="keyword">from</span> emp e,</span><br><span class="line"> dept d</span><br><span class="line"><span class="keyword">where</span> e.dept_id <span class="operator">=</span> d.id</span><br><span class="line"> <span class="keyword">and</span> d.name <span class="operator">=</span> <span class="string">&#x27;研发部&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 8.查询工资比灭绝高的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> salary <span class="operator">&gt;</span> (<span class="keyword">select</span> salary <span class="keyword">from</span> emp <span class="keyword">where</span> name <span class="operator">=</span> <span class="string">&#x27;灭绝&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 9.查询比平均工资高的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> salary <span class="operator">&gt;</span> (<span class="keyword">select</span> <span class="built_in">avg</span>(salary) <span class="keyword">from</span> emp);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 10.查询低于本部门平均工资的员工</span></span><br><span class="line"><span class="comment">-- 方法一</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp e2</span><br><span class="line"><span class="keyword">where</span> e2.salary <span class="operator">&lt;</span> (<span class="keyword">select</span> <span class="built_in">avg</span>(e1.salary) <span class="keyword">from</span> emp e1 <span class="keyword">where</span> e1.dept_id <span class="operator">=</span> e2.dept_id);</span><br><span class="line"><span class="comment">-- 方法二</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp e,</span><br><span class="line"> (<span class="keyword">select</span> dept_id, <span class="built_in">avg</span>(salary) <span class="string">&#x27;salavg&#x27;</span> <span class="keyword">from</span> emp <span class="keyword">group</span> <span class="keyword">by</span> dept_id) eavg</span><br><span class="line"><span class="keyword">where</span> eavg.dept_id <span class="operator">=</span> e.dept_id</span><br><span class="line"> <span class="keyword">and</span> e.salary <span class="operator">&lt;</span> eavg.salavg;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 11.查询所有的部门信息,并统计部门的员工人数</span></span><br><span class="line"><span class="comment">-- 方法一</span></span><br><span class="line"><span class="keyword">select</span> d.id, d.name, (<span class="keyword">select</span> <span class="built_in">count</span>(<span class="operator">*</span>) <span class="keyword">from</span> emp e <span class="keyword">where</span> e.dept_id <span class="operator">=</span> d.id) <span class="string">&#x27;人数&#x27;</span></span><br><span class="line"><span class="keyword">from</span> dept d;</span><br><span class="line"><span class="comment">-- 方法二</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> dept d,</span><br><span class="line"> (<span class="keyword">select</span> e.dept_id, <span class="built_in">count</span>(<span class="operator">*</span>) <span class="string">&#x27;人数&#x27;</span> <span class="keyword">from</span> emp e <span class="keyword">group</span> <span class="keyword">by</span> e.dept_id) ecount</span><br><span class="line"><span class="keyword">where</span> d.id <span class="operator">=</span> ecount.dept_id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 12.查询所有学生的选课情况,展示出学生名称,学号,课程名称</span></span><br><span class="line"><span class="keyword">select</span> s.name, s.no, c.name</span><br><span class="line"><span class="keyword">from</span> course c,</span><br><span class="line"> student s,</span><br><span class="line"> student_course sc</span><br><span class="line"><span class="keyword">where</span> c.id <span class="operator">=</span> sc.courseid</span><br><span class="line"> <span class="keyword">and</span> s.id <span class="operator">=</span> sc.studentid;</span><br></pre></td></tr></table></figure>
<p><strong>总结</strong></p>
<p> <img src="/pictures/image-20231005133456395.png" alt="image-20231005133456395"></p>
<h2 id="5-事务"><a href="#5-事务" class="headerlink" title="5.事务"></a>5.事务</h2><h3 id="5-1-事务介绍"><a href="#5-1-事务介绍" class="headerlink" title="5.1 事务介绍"></a>5.1 事务介绍</h3><p> 事务 是一组操作的集合,它是一个不可分割的工作单位,事务会把所有的操作作为一个整体一起向系统提交或撤销操作请求,即这些操作要么同时成功,要么同时失败。就比如: 张三给李四转账1000块钱张三银行账户的钱减少1000而李四银行账户的钱要增加1000。 这一组操作就必须在一个事务的范围内,要么都成功,要么都失败。</p>
<blockquote>
<p>注意: 默认MySQL的事务是自动提交的也就是说当执行完一条DML语句时MySQL会立即隐式的提交事务。</p>
</blockquote>
<h3 id="5-2-事务操作"><a href="#5-2-事务操作" class="headerlink" title="5.2 事务操作"></a>5.2 事务操作</h3><p><strong>数据准备</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 数据准备</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">table</span> if <span class="keyword">exists</span> account;</span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> account</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> <span class="keyword">primary</span> key AUTO_INCREMENT comment <span class="string">&#x27;ID&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> money <span class="keyword">double</span>(<span class="number">10</span>, <span class="number">2</span>) comment <span class="string">&#x27;余额&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;账户表&#x27;</span>;</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> account(name, money)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="string">&#x27;张三&#x27;</span>, <span class="number">2000</span>),</span><br><span class="line"> (<span class="string">&#x27;李四&#x27;</span>, <span class="number">2000</span>);</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> account;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 转账操作张三转1000给李四</span></span><br><span class="line"><span class="comment">-- 1. 查询张三余额</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> account <span class="keyword">where</span> name <span class="operator">=</span> <span class="string">&#x27;张三&#x27;</span>;</span><br><span class="line"><span class="comment">-- 2. 张三的余额减少1000</span></span><br><span class="line"><span class="keyword">update</span> account <span class="keyword">set</span> money <span class="operator">=</span> money <span class="operator">-</span> <span class="number">1000</span> <span class="keyword">where</span> name <span class="operator">=</span> <span class="string">&#x27;张三&#x27;</span>;</span><br><span class="line"><span class="comment">-- 3. 李四的余额增加1000</span></span><br><span class="line"><span class="keyword">update</span> account <span class="keyword">set</span> money <span class="operator">=</span> money <span class="operator">+</span> <span class="number">1000</span> <span class="keyword">where</span> name <span class="operator">=</span> <span class="string">&#x27;李四&#x27;</span>;</span><br></pre></td></tr></table></figure>
<p><strong>控制事务一</strong></p>
<p><img src="/pictures/image-20231005134601982.png" alt="image-20231005134601982"></p>
<p><strong>控制事务二</strong></p>
<p><img src="/pictures/image-20231005134750027.png" alt="image-20231005134750027"></p>
<p><img src="/pictures/image-20231005134835921.png" alt="image-20231005134835921"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 开启事务</span></span><br><span class="line"><span class="keyword">start</span> transaction;</span><br><span class="line"><span class="comment">-- 1. 查询张三余额</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> account <span class="keyword">where</span> name <span class="operator">=</span> <span class="string">&#x27;张三&#x27;</span>;</span><br><span class="line"><span class="comment">-- 2. 张三的余额减少1000</span></span><br><span class="line"><span class="keyword">update</span> account <span class="keyword">set</span> money <span class="operator">=</span> money <span class="operator">-</span> <span class="number">1000</span> <span class="keyword">where</span> name <span class="operator">=</span> <span class="string">&#x27;张三&#x27;</span>;</span><br><span class="line"><span class="comment">-- 3. 李四的余额增加1000</span></span><br><span class="line"><span class="keyword">update</span> account <span class="keyword">set</span> money <span class="operator">=</span> money <span class="operator">+</span> <span class="number">1000</span> <span class="keyword">where</span> name <span class="operator">=</span> <span class="string">&#x27;李四&#x27;</span>;</span><br><span class="line"><span class="comment">-- 如果正常执行完毕, 则提交事务</span></span><br><span class="line"><span class="keyword">commit</span>;</span><br><span class="line"><span class="comment">-- 如果执行过程中报错, 则回滚事务</span></span><br><span class="line"><span class="comment">-- rollback;</span></span><br></pre></td></tr></table></figure>
<h3 id="5-3-事务四大特性"><a href="#5-3-事务四大特性" class="headerlink" title="5.3 事务四大特性"></a>5.3 事务四大特性</h3><p><img src="/pictures/image-20231005135637347.png" alt="image-20231005135637347"></p>
<h3 id="5-4-并发事务问题"><a href="#5-4-并发事务问题" class="headerlink" title="5.4 并发事务问题"></a>5.4 并发事务问题</h3><p><img src="/pictures/image-20231005135741486.png" alt="image-20231005135741486"></p>
<p><img src="/pictures/image-20231005135811745.png" alt="image-20231005135811745"></p>
<h3 id="5-5-事务隔离级别"><a href="#5-5-事务隔离级别" class="headerlink" title="5.5 事务隔离级别"></a>5.5 事务隔离级别</h3><p><strong>为了解决并发事务所引发的问题,在数据库中引入了事务隔离级别,主要有以下几种:</strong></p>
<p> “X” 表示不会出现</p>
<p> <img src="/pictures/image-20231005140255060.png" alt="image-20231005140255060"></p>
<p><img src="/pictures/image-20231005140322039.png" alt="image-20231005140322039"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 查看事务隔离级别</span></span><br><span class="line"><span class="keyword">SELECT</span> @<span class="variable">@TRANSACTION_ISOLATION</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 设置事务的隔离级别</span></span><br><span class="line"><span class="keyword">SET</span> [ SESSION <span class="operator">|</span> <span class="keyword">GLOBAL</span> ] TRANSACTION ISOLATION LEVEL &#123; READ UNCOMMITTED <span class="operator">|</span> READ COMMITTED <span class="operator">|</span> REPEATABLE READ <span class="operator">|</span> SERIALIZABLE &#125;</span><br></pre></td></tr></table></figure>
<p><strong>小结</strong></p>
<p> <img src="/pictures/image-20231005142056902.png" alt="image-20231005142056902"></p>
<p><strong>基础篇全部的Sql</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- ------------------------------------------------------数据库的操作------------------------------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 展示所有的数据库</span></span><br><span class="line"><span class="keyword">show</span> databases;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询当前的数据库</span></span><br><span class="line"><span class="keyword">select</span> database();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建数据库</span></span><br><span class="line"><span class="keyword">create</span> database if <span class="keyword">not</span> <span class="keyword">exists</span> itcast;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除数据库</span></span><br><span class="line"><span class="keyword">drop</span> database if <span class="keyword">exists</span> itcast;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 使用数据库</span></span><br><span class="line">use itcast;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- ----------------------------------------------------------表的操作--------------------------------------------------------------------</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建用户表</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> tb_user</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> comment <span class="string">&#x27;编号&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> gender <span class="type">varchar</span>(<span class="number">1</span>) comment <span class="string">&#x27;性别&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;用户表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 显示创建表的结构</span></span><br><span class="line"><span class="keyword">desc</span> tb_user;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 显示创建表的语句</span></span><br><span class="line"><span class="keyword">show</span> <span class="keyword">create</span> <span class="keyword">table</span> tb_user;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除表</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">table</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改表的操作</span></span><br><span class="line"><span class="comment">-- 举例:现有一张员工表</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> emp</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> comment <span class="string">&#x27;编号&#x27;</span>,</span><br><span class="line"> workno <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;工号&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> gender <span class="type">char</span>(<span class="number">1</span>) comment <span class="string">&#x27;性别&#x27;</span>,</span><br><span class="line"> age tinyint unsigned comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> idcard <span class="type">char</span>(<span class="number">18</span>) comment <span class="string">&#x27;身份证号&#x27;</span>,</span><br><span class="line"> entrydate <span class="type">date</span> comment <span class="string">&#x27;入职时间&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;员工表&#x27;</span>;</span><br><span class="line"><span class="comment">-- 查看表结构</span></span><br><span class="line"><span class="keyword">desc</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改表结构(向emp表中添加昵称字段)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp</span><br><span class="line"> <span class="keyword">add</span> nickname <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;昵称&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改相应字段的数据类型(把age的数据类型从int改回tinyint)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp</span><br><span class="line"> modify age tinyint;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改字段名和字段的类型(把nickname字段改为username,并修改数据类型)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp</span><br><span class="line"> change nickname username <span class="type">varchar</span>(<span class="number">30</span>) comment <span class="string">&#x27;用户名&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除字段(删除username字段)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp</span><br><span class="line"> <span class="keyword">drop</span> username;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改表名(将表名字从emo修改为employee)</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp rename <span class="keyword">to</span> employee;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除表</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">table</span> if <span class="keyword">exists</span> employee;</span><br><span class="line"><span class="comment">-- 删除指定表,并重新创建该表(相当于删除表中的全部数据)</span></span><br><span class="line"><span class="keyword">truncate</span> <span class="keyword">table</span> employee;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- ------------------------------------------------DML-增删改操作---------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 添加数据</span></span><br><span class="line"><span class="keyword">select</span> database();</span><br><span class="line"><span class="keyword">show</span> tables;</span><br><span class="line"><span class="comment">-- 该指定的字段添加数据</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> employee(id, workno, name, gender, age, idcard, entrydate) <span class="keyword">value</span> (<span class="number">1</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;小华&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;123456789123456789&#x27;</span>, <span class="string">&#x27;2001-01-01&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> employee;</span><br><span class="line"><span class="comment">-- 给全部的字段添加数据</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> employee <span class="keyword">value</span> (<span class="number">2</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;小刚&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;123456784124456789&#x27;</span>, <span class="string">&#x27;2008-01-01&#x27;</span>);</span><br><span class="line"><span class="comment">-- 批量添加数据</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> employee</span><br><span class="line"><span class="keyword">values</span> (<span class="number">3</span>, <span class="string">&#x27;3&#x27;</span>, <span class="string">&#x27;小李&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;123456784124456789&#x27;</span>, <span class="string">&#x27;2008-01-01&#x27;</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;4&#x27;</span>, <span class="string">&#x27;小黄&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;123456784124456789&#x27;</span>, <span class="string">&#x27;2008-01-01&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改数据(不带条件修改所有)</span></span><br><span class="line"><span class="keyword">update</span> employee</span><br><span class="line"><span class="keyword">set</span> name <span class="operator">=</span> <span class="string">&#x27;张三&#x27;</span></span><br><span class="line"><span class="keyword">where</span> id <span class="operator">=</span> <span class="number">1</span>;</span><br><span class="line"><span class="keyword">update</span> employee</span><br><span class="line"><span class="keyword">set</span> name <span class="operator">=</span> <span class="string">&#x27;李四&#x27;</span>,</span><br><span class="line"> gender<span class="operator">=</span> <span class="string">&#x27;女&#x27;</span></span><br><span class="line"><span class="keyword">where</span> id <span class="operator">=</span> <span class="number">1</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除数据(删除id为4的数据不带添加删除所有</span></span><br><span class="line"><span class="keyword">delete</span></span><br><span class="line"><span class="keyword">from</span> employee</span><br><span class="line"><span class="keyword">where</span> id <span class="operator">=</span> <span class="number">4</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- --------------------------------------------------------DQL数据查询语言--------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 数据准备</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> emp</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> comment <span class="string">&#x27;编号&#x27;</span>,</span><br><span class="line"> workno <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;工号&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> gender <span class="type">char</span>(<span class="number">1</span>) comment <span class="string">&#x27;性别&#x27;</span>,</span><br><span class="line"> age tinyint unsigned comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> idcard <span class="type">char</span>(<span class="number">18</span>) comment <span class="string">&#x27;身份证号&#x27;</span>,</span><br><span class="line"> workaddress <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;工作地址&#x27;</span>,</span><br><span class="line"> entrydate <span class="type">date</span> comment <span class="string">&#x27;入职时间&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;员工表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 插入数据</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> emp(id, workno, name, gender, age, idcard, workaddress, entrydate)</span><br><span class="line"><span class="keyword">values</span> (<span class="number">1</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;柳岩&#x27;</span>, <span class="string">&#x27;女&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;12345678912345678&#x27;</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2001-01-01&#x27;</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;张无忌&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">18</span>, <span class="string">&#x27;123456789012345670&#x27;</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2005-09-01&#x27;</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;3&#x27;</span>, <span class="string">&#x27;韦一笑&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">38</span>, <span class="string">&#x27;12345678972345670&#x27;</span>, <span class="string">&#x27;上海&#x27;</span>, <span class="string">&#x27;2005-08-01&#x27;</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;4&#x27;</span>, <span class="string">&#x27;赵敏&#x27;</span>, <span class="string">&#x27;女&#x27;</span>, <span class="number">18</span>, <span class="string">&#x27;12345675712345670&#x27;</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2009-12-01&#x27;</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;5&#x27;</span>, <span class="string">&#x27;小昭&#x27;</span>, <span class="string">&#x27;女&#x27;</span>, <span class="number">16</span>, <span class="string">&#x27;123456769012345678&#x27;</span>, <span class="string">&#x27;上海&#x27;</span>, <span class="string">&#x27;2007-07-01&#x27;</span>),</span><br><span class="line"> (<span class="number">6</span>, <span class="string">&#x27;6&#x27;</span>, <span class="string">&#x27;杨逍&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">28</span>, <span class="string">&#x27;1234567893123456X&#x27;</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2006-01-01&#x27;</span>),</span><br><span class="line"> (<span class="number">7</span>, <span class="string">&#x27;7&#x27;</span>, <span class="string">&#x27;范瑶&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">40</span>, <span class="string">&#x27;123456789212345670&#x27;</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2005-05-01&#x27;</span>),</span><br><span class="line"> (<span class="number">8</span>, <span class="string">&#x27;8&#x27;</span>, <span class="string">&#x27;黛绮丝&#x27;</span>, <span class="string">&#x27;女&#x27;</span>, <span class="number">38</span>, <span class="string">&#x27;123456157123645670&#x27;</span>, <span class="string">&#x27;天津&#x27;</span>, <span class="string">&#x27;2015-05-01&#x27;</span>),</span><br><span class="line"> (<span class="number">9</span>, <span class="string">&#x27;9&#x27;</span>, <span class="string">&#x27;范凉凉&#x27;</span>, <span class="string">&#x27;女&#x27;</span>, <span class="number">45</span>, <span class="string">&#x27;123156789012345678&#x27;</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2010-04-01&#x27;</span>),</span><br><span class="line"> (<span class="number">10</span>, <span class="string">&#x27;10&#x27;</span>, <span class="string">&#x27;陈友谅&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">53</span>, <span class="string">&#x27;123456789012345670&#x27;</span>, <span class="string">&#x27;上海&#x27;</span>, <span class="string">&#x27;2011-01-01&#x27;</span>),</span><br><span class="line"> (<span class="number">11</span>, <span class="string">&#x27;11&#x27;</span>, <span class="string">&#x27;张士诚&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">55</span>, <span class="string">&#x27;12356789712345670&#x27;</span>, <span class="string">&#x27;江苏&#x27;</span>, <span class="string">&#x27;2015-05-01&#x27;</span>),</span><br><span class="line"> (<span class="number">12</span>, <span class="string">&#x27;12&#x27;</span>, <span class="string">&#x27;常遇春&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">32</span>, <span class="string">&#x27;123446757152345670&#x27;</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2004-02-01&#x27;</span>),</span><br><span class="line"> (<span class="number">13</span>, <span class="string">&#x27;13&#x27;</span>, <span class="string">&#x27;张三丰&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">88</span>, <span class="string">&#x27;123656789012345678&#x27;</span>, <span class="string">&#x27;江苏&#x27;</span>, <span class="string">&#x27;2020-11-01&#x27;</span>),</span><br><span class="line"> (<span class="number">14</span>, <span class="string">&#x27;14&#x27;</span>, <span class="string">&#x27;灭绝&#x27;</span>, <span class="string">&#x27;女&#x27;</span>, <span class="number">65</span>, <span class="string">&#x27;123456719012345670&#x27;</span>, <span class="string">&#x27;西安&#x27;</span>, <span class="string">&#x27;2019-05-01&#x27;</span>),</span><br><span class="line"> (<span class="number">15</span>, <span class="string">&#x27;15&#x27;</span>, <span class="string">&#x27;胡青年&#x27;</span>, <span class="string">&#x27;男&#x27;</span>, <span class="number">70</span>, <span class="string">&#x27;12345674971234567X&#x27;</span>, <span class="string">&#x27;西安&#x27;</span>, <span class="string">&#x27;2018-04-01&#x27;</span>),</span><br><span class="line"> (<span class="number">16</span>, <span class="string">&#x27;16&#x27;</span>, <span class="string">&#x27;周芷若&#x27;</span>, <span class="string">&#x27;女&#x27;</span>, <span class="number">18</span>, <span class="keyword">null</span>, <span class="string">&#x27;北京&#x27;</span>, <span class="string">&#x27;2012-06-01&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 基础查询</span></span><br><span class="line"><span class="comment">-- 查看插入的数据</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询指定字段 name workno age 返回</span></span><br><span class="line"><span class="keyword">select</span> name, workno, age</span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询所有字段返回</span></span><br><span class="line"><span class="keyword">select</span> id,</span><br><span class="line"> workno,</span><br><span class="line"> name,</span><br><span class="line"> gender,</span><br><span class="line"> age,</span><br><span class="line"> idcard,</span><br><span class="line"> workaddress,</span><br><span class="line"> entrydate</span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- distinct去重关键字</span></span><br><span class="line"><span class="comment">-- 查询所有员工的工作地址(不要重复的地址)</span></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">distinct</span> workaddress <span class="string">&#x27;工作地址&#x27;</span></span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 条件查询</span></span><br><span class="line"><span class="comment">-- 查询年龄等于 88 的员工</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> age <span class="operator">=</span> <span class="number">88</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄小于20的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> age <span class="operator">&lt;</span> <span class="number">20</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄小于等于20的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> age <span class="operator">&lt;=</span> <span class="number">20</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询没有身份证号的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> idcard <span class="keyword">is</span> <span class="keyword">null</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄不等于88的员工信息(&lt;&gt;也表示不等于)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> age <span class="operator">!=</span> <span class="number">88</span>;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> age <span class="operator">&lt;&gt;</span> <span class="number">88</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄在15~20(包含)之间的员工信息(三种实现方式)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> age <span class="operator">&gt;=</span> <span class="number">15</span> <span class="operator">&amp;&amp;</span> age <span class="operator">&lt;=</span> <span class="number">20</span>;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> age <span class="operator">&gt;=</span> <span class="number">15</span></span><br><span class="line"> <span class="keyword">and</span> age <span class="operator">&lt;=</span> <span class="number">20</span>;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> age <span class="keyword">between</span> <span class="number">15</span> <span class="keyword">and</span> <span class="number">20</span>;</span><br><span class="line">#包含了<span class="number">15</span>和<span class="number">20</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询性别为女 且年龄小于25岁的员工</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> gender <span class="operator">=</span> <span class="string">&#x27;女&#x27;</span></span><br><span class="line"> <span class="keyword">and</span> age <span class="operator">&lt;</span> <span class="number">25</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄等于18 或 20 或 48 的员工</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> age <span class="operator">=</span> <span class="number">18</span></span><br><span class="line"> <span class="keyword">or</span> age <span class="operator">=</span> <span class="number">20</span></span><br><span class="line"> <span class="keyword">or</span> age <span class="operator">=</span> <span class="number">48</span>;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> age <span class="keyword">in</span> (<span class="number">18</span>, <span class="number">20</span>, <span class="number">48</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询姓名为两个字的员工(模糊匹配(_匹配单个字符, %匹配任意个字符))</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> name <span class="keyword">like</span> <span class="string">&#x27;__&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询身份证号最后一位是X的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> idcard <span class="keyword">like</span> <span class="string">&#x27;%X&#x27;</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 聚合函数</span></span><br><span class="line"><span class="comment">-- 统计该企业员工数量(空值是不参与统计的)</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">count</span>(<span class="operator">*</span>)</span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"><span class="keyword">select</span> <span class="built_in">count</span>(idcard)</span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计该企业员工的平均年龄</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">avg</span>(age)</span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计该企业员工的最大年龄</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">max</span>(age)</span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计该企业员工的最小年龄</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">min</span>(age)</span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计西安地区员工的年龄之和</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">sum</span>(age)</span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> workaddress <span class="operator">=</span> <span class="string">&#x27;西安&#x27;</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 分组查询</span></span><br><span class="line"><span class="comment">-- 根据性别分组,统计男性员工和女性员工的数量</span></span><br><span class="line"><span class="keyword">select</span> gender, <span class="built_in">count</span>(<span class="operator">*</span>)</span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">group</span> <span class="keyword">by</span> gender;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 根据性别进行分组,统计男性员工和女性员工的平均年龄</span></span><br><span class="line"><span class="keyword">select</span> gender, <span class="built_in">avg</span>(age)</span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">group</span> <span class="keyword">by</span> gender;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询年龄小于45岁的员工并根据工作地址分组获取员工数量大于等于3的工作地址(可以使用别名也可以不使用别名)</span></span><br><span class="line"><span class="keyword">select</span> workaddress, <span class="built_in">count</span>(<span class="operator">*</span>) address_count</span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> age <span class="operator">&lt;</span> <span class="number">45</span></span><br><span class="line"><span class="keyword">group</span> <span class="keyword">by</span> workaddress</span><br><span class="line"><span class="keyword">having</span> address_count <span class="operator">&gt;=</span> <span class="number">3</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 排序查询</span></span><br><span class="line"><span class="comment">-- 根据年龄对公司的员工进行升序排序(asc可以省略)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">order</span> <span class="keyword">by</span> age;</span><br><span class="line"><span class="comment">-- 降序排序</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">order</span> <span class="keyword">by</span> age <span class="keyword">desc</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 根据员工的入职时间降序排序</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">order</span> <span class="keyword">by</span> entrydate <span class="keyword">desc</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 根据员工的年龄升序排序,年龄相同,再按照入职时间进行降序排序</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">order</span> <span class="keyword">by</span> age <span class="keyword">asc</span>, entrydate <span class="keyword">desc</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 分页查询</span></span><br><span class="line"><span class="comment">-- 查询第一页的员工数据每页显示10条记录</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line">limit <span class="number">0</span>,<span class="number">10</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询第二页数据,每页展示十条数据(起始索引 = (查询页码 - 1* 每页显示记录数)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line">limit <span class="number">10</span>,<span class="number">10</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- DQL语句案例</span></span><br><span class="line"><span class="comment">-- 查询年龄在20,21,22,23岁的女性员工的信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> gender <span class="operator">=</span> <span class="string">&#x27;女&#x27;</span></span><br><span class="line"> <span class="keyword">and</span> age <span class="keyword">in</span> (<span class="number">20</span>, <span class="number">21</span>, <span class="number">22</span>, <span class="number">23</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询性别为男并且年龄再20~40岁(含)以内的姓名为三个字的员工</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> gender <span class="operator">=</span> <span class="string">&#x27;男&#x27;</span></span><br><span class="line"> <span class="keyword">and</span> (age <span class="keyword">between</span> <span class="number">20</span> <span class="keyword">and</span> <span class="number">40</span>)</span><br><span class="line"> <span class="keyword">and</span> name <span class="keyword">like</span> <span class="string">&#x27;___&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 统计员工表中年龄小于60岁的男性员工和女性员工的人数</span></span><br><span class="line"><span class="keyword">select</span> gender, <span class="built_in">count</span>(<span class="operator">*</span>)</span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> age <span class="operator">&lt;</span> <span class="number">60</span></span><br><span class="line"><span class="keyword">group</span> <span class="keyword">by</span> gender;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询所有年龄小于等于35岁员工的姓名和年龄并对查询结果按年龄升序排序如果年龄相同按照入职时间降序排序</span></span><br><span class="line"><span class="keyword">select</span> name, age</span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> age <span class="operator">&lt;=</span> <span class="number">35</span></span><br><span class="line"><span class="keyword">order</span> <span class="keyword">by</span> age <span class="keyword">asc</span>, entrydate <span class="keyword">desc</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询性别为男,且年龄在20·40岁(含)以内的前五个员工信息,并对查询结果按年龄升序排序,如果年龄相同按照入职时间升序排序</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> gender <span class="operator">=</span> <span class="string">&#x27;男&#x27;</span></span><br><span class="line"> <span class="keyword">and</span> age <span class="keyword">between</span> <span class="number">20</span> <span class="keyword">and</span> <span class="number">40</span></span><br><span class="line"><span class="keyword">order</span> <span class="keyword">by</span> age, entrydate</span><br><span class="line">limit <span class="number">5</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- ---------------------------------------------------DCL--------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 用户管理</span></span><br><span class="line"><span class="comment">-- mysql数据库</span></span><br><span class="line">use mysql;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询所有的用户</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> mysql.user;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建用户itcast, 只能够在当前主机localhost访问, 密码123456;</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">user</span> <span class="string">&#x27;itcast&#x27;</span>@<span class="string">&#x27;localhost&#x27;</span> identified <span class="keyword">by</span> <span class="string">&#x27;123456&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建用户heima, 可以在任意主机访问该数据库, 密码123456;</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">user</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span> identified <span class="keyword">by</span> <span class="string">&#x27;123456&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改用户heima的访问密码为1234;</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">user</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span> identified <span class="keyword">with</span> mysql_native_password <span class="keyword">by</span> <span class="string">&#x27;1234&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除 itcast@localhost 用户</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">user</span> <span class="string">&#x27;itcast&#x27;</span>@<span class="string">&#x27;localhost&#x27;</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 权限控制</span></span><br><span class="line"><span class="comment">-- 查询权限(查询heima用户的所有权限)</span></span><br><span class="line"><span class="keyword">show</span> grants <span class="keyword">for</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 授予权限(授予heima用户对数据库itcast的所有权限)</span></span><br><span class="line"><span class="keyword">grant</span> <span class="keyword">all</span> <span class="keyword">on</span> itcast.<span class="operator">*</span> <span class="keyword">to</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 授予用户所有数据库所有表的所有权限</span></span><br><span class="line"><span class="keyword">grant</span> <span class="keyword">all</span> <span class="keyword">on</span> <span class="operator">*</span>.<span class="operator">*</span> <span class="keyword">to</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 撤销权限(撤销heima用户在itcast数据库上的所有权限)</span></span><br><span class="line"><span class="keyword">revoke</span> <span class="keyword">all</span> <span class="keyword">on</span> itcast.<span class="operator">*</span> <span class="keyword">from</span> <span class="string">&#x27;heima&#x27;</span>@<span class="string">&#x27;%&#x27;</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- ----------------------------------------------------------函数--------------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 字符串函数</span></span><br><span class="line"><span class="comment">-- concat函数(字符串拼接)</span></span><br><span class="line"><span class="keyword">select</span> concat(<span class="string">&#x27;hello &#x27;</span>, <span class="string">&#x27;word&#x27;</span>);</span><br><span class="line"># hello word</span><br><span class="line"></span><br><span class="line"><span class="comment">-- lower(全部转化成小写)</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">lower</span>(<span class="string">&#x27;Hello&#x27;</span>);</span><br><span class="line"># hello</span><br><span class="line"></span><br><span class="line"><span class="comment">-- upper(全部转化成大写)</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">upper</span>(<span class="string">&#x27;Hello&#x27;</span>);</span><br><span class="line"># HELLO</span><br><span class="line"></span><br><span class="line"><span class="comment">-- lpad(左侧填充)</span></span><br><span class="line"><span class="keyword">select</span> lpad(<span class="string">&#x27;01&#x27;</span>, <span class="number">5</span>, <span class="string">&#x27;-&#x27;</span>);</span><br><span class="line"># <span class="comment">---01</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- rpad(右侧填充)</span></span><br><span class="line"><span class="keyword">select</span> rpad(<span class="string">&#x27;01&#x27;</span>, <span class="number">5</span>, <span class="string">&#x27;-&#x27;</span>);</span><br><span class="line"># <span class="number">01</span><span class="comment">---</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- trim 去除头部和尾部的空格</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">trim</span>(<span class="string">&#x27; Hello Mysql &#x27;</span>);</span><br><span class="line"># Hello Mysql</span><br><span class="line"></span><br><span class="line"><span class="comment">-- substring 字符串截取</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">substring</span>(<span class="string">&#x27;Hello Mysql&#x27;</span>, <span class="number">1</span>, <span class="number">5</span>);</span><br><span class="line"># Hello</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 由于业务需求变更企业员工的工号统一为5位数目前不足5位数的全部在前面补0 比如:1号员工的工号应该为00001</span></span><br><span class="line"><span class="keyword">update</span> emp</span><br><span class="line"><span class="keyword">set</span> workno <span class="operator">=</span> lpad(workno, <span class="number">5</span>, <span class="string">&#x27;0&#x27;</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 数值函数</span></span><br><span class="line"><span class="comment">-- ceil 向上取整</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">ceil</span>(<span class="number">1.5</span>);</span><br><span class="line"># <span class="number">2</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- floor 向下取整</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">floor</span>(<span class="number">1.1</span>);</span><br><span class="line"># <span class="number">1</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- mod 求模运算</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">mod</span>(<span class="number">7</span>, <span class="number">4</span>);</span><br><span class="line"># <span class="number">3</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- rand 随机数(0~1)</span></span><br><span class="line"><span class="keyword">select</span> rand();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- round 四舍五入</span></span><br><span class="line"><span class="keyword">select</span> round(<span class="number">2.345</span>, <span class="number">2</span>);</span><br><span class="line"># <span class="number">2.35</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 通过数据库函数生成一个的随机的六位验证码</span></span><br><span class="line"><span class="keyword">select</span> lpad(round(rand() <span class="operator">*</span> <span class="number">1000000</span>, <span class="number">0</span>), <span class="number">6</span>, <span class="string">&#x27;0&#x27;</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 日期函数</span></span><br><span class="line"><span class="comment">-- curdate当前日期</span></span><br><span class="line"><span class="keyword">select</span> curdate();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- curtime当前时间</span></span><br><span class="line"><span class="keyword">select</span> curtime();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- now当前日期和时间</span></span><br><span class="line"><span class="keyword">select</span> now();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- YEAR , MONTH , DAY当前年、月、日</span></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">year</span>(now());</span><br><span class="line"><span class="keyword">select</span> <span class="keyword">month</span>(now());</span><br><span class="line"><span class="keyword">select</span> <span class="keyword">day</span>(now());</span><br><span class="line"></span><br><span class="line"><span class="comment">-- date_add增加指定的时间间隔</span></span><br><span class="line"><span class="keyword">select</span> date_add(now(), <span class="type">INTERVAL</span> <span class="number">70</span> <span class="keyword">DAY</span>); # 当前的时间往后推<span class="number">70</span>天</span><br><span class="line"><span class="keyword">select</span> date_add(now(), <span class="type">INTERVAL</span> <span class="number">2</span> <span class="keyword">MONTH</span>);</span><br><span class="line">#向后推<span class="number">2</span>个月</span><br><span class="line"></span><br><span class="line"><span class="comment">-- datediff获取两个日期相差的天数</span></span><br><span class="line"><span class="keyword">select</span> datediff(<span class="string">&#x27;2021-12-01&#x27;</span>, <span class="string">&#x27;2021-10-01&#x27;</span>);</span><br><span class="line"># 查询两个时间之间的差值,第一个时间减去第二个时间</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询所有员工的入职天数,并根据入职天数倒叙排序</span></span><br><span class="line"><span class="keyword">select</span> name, datediff(curdate(), entrydate) <span class="string">&#x27;entrydays&#x27;</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">order</span> <span class="keyword">by</span> entrydays <span class="keyword">desc</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 流程控制函数</span></span><br><span class="line"><span class="comment">-- if 相当java中的三元运算符</span></span><br><span class="line"><span class="keyword">select</span> if(<span class="literal">true</span>, <span class="string">&#x27;OK&#x27;</span>, <span class="string">&#x27;ERROR&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- ifnull 第一个字符串不为空就返回第一个,第一个为空就返回第二个</span></span><br><span class="line"><span class="keyword">select</span> ifnull(<span class="string">&#x27;OK&#x27;</span>, <span class="string">&#x27;DEFAULT&#x27;</span>);</span><br><span class="line"><span class="keyword">select</span> ifnull(<span class="keyword">null</span>, <span class="string">&#x27;DEFAULT&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- case when then else end</span></span><br><span class="line"><span class="comment">-- 需求: 查询emp表的员工姓名和工作地址 (北京/上海 ----&gt; 一线城市 , 其他 ----&gt; 二线城市)</span></span><br><span class="line"><span class="keyword">select</span> name,</span><br><span class="line"> (<span class="keyword">case</span> workaddress</span><br><span class="line"> <span class="keyword">when</span> <span class="string">&#x27;北京&#x27;</span> <span class="keyword">then</span> <span class="string">&#x27;一线城市&#x27;</span></span><br><span class="line"> <span class="keyword">when</span> <span class="string">&#x27;上海&#x27;</span> <span class="keyword">then</span> <span class="string">&#x27;一线城市&#x27;</span></span><br><span class="line"> <span class="keyword">else</span></span><br><span class="line"> <span class="string">&#x27;二线城市&#x27;</span> <span class="keyword">end</span>) <span class="keyword">as</span> <span class="string">&#x27;工作地址&#x27;</span></span><br><span class="line"><span class="keyword">from</span> emp;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 案例:统计班级各个学员的成绩,展示规则如下:</span></span><br><span class="line"><span class="comment">-- &gt;= 85 展示优秀</span></span><br><span class="line"><span class="comment">-- &gt;= 60 展示及格</span></span><br><span class="line"><span class="comment">-- 否则展示不及格</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 建表数据</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> score</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> comment <span class="string">&#x27;ID&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> math <span class="type">int</span> comment <span class="string">&#x27;数学&#x27;</span>,</span><br><span class="line"> english <span class="type">int</span> comment <span class="string">&#x27;英语&#x27;</span>,</span><br><span class="line"> chinese <span class="type">int</span> comment <span class="string">&#x27;语文&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;学员成绩表&#x27;</span>;</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> score(id, name, math, english, chinese)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;Tom&#x27;</span>, <span class="number">67</span>, <span class="number">88</span>, <span class="number">95</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;Rose&#x27;</span>, <span class="number">23</span>, <span class="number">66</span>, <span class="number">90</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;Jack&#x27;</span>, <span class="number">56</span>, <span class="number">98</span>, <span class="number">76</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> score;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 案例sql实现</span></span><br><span class="line"><span class="keyword">select</span> id,</span><br><span class="line"> name,</span><br><span class="line"> (<span class="keyword">case</span> <span class="keyword">when</span> math <span class="operator">&gt;=</span> <span class="number">85</span> <span class="keyword">then</span> <span class="string">&#x27;优秀&#x27;</span> <span class="keyword">when</span> math <span class="operator">&gt;=</span> <span class="number">60</span> <span class="keyword">then</span> <span class="string">&#x27;及格&#x27;</span> <span class="keyword">else</span> <span class="string">&#x27;不及格&#x27;</span> <span class="keyword">end</span>)</span><br><span class="line"> <span class="string">&#x27;数学&#x27;</span>,</span><br><span class="line"> (<span class="keyword">case</span></span><br><span class="line"> <span class="keyword">when</span> english <span class="operator">&gt;=</span> <span class="number">85</span> <span class="keyword">then</span> <span class="string">&#x27;优秀&#x27;</span></span><br><span class="line"> <span class="keyword">when</span> english <span class="operator">&gt;=</span> <span class="number">60</span> <span class="keyword">then</span> <span class="string">&#x27;及格&#x27;</span></span><br><span class="line"> <span class="keyword">else</span> <span class="string">&#x27;不及格&#x27;</span></span><br><span class="line"> <span class="keyword">end</span>) <span class="string">&#x27;英语&#x27;</span>,</span><br><span class="line"> (<span class="keyword">case</span></span><br><span class="line"> <span class="keyword">when</span> chinese <span class="operator">&gt;=</span> <span class="number">85</span> <span class="keyword">then</span> <span class="string">&#x27;优秀&#x27;</span></span><br><span class="line"> <span class="keyword">when</span> chinese <span class="operator">&gt;=</span> <span class="number">60</span> <span class="keyword">then</span> <span class="string">&#x27;及格&#x27;</span></span><br><span class="line"> <span class="keyword">else</span> <span class="string">&#x27;不及格&#x27;</span></span><br><span class="line"> <span class="keyword">end</span>) <span class="string">&#x27;语文&#x27;</span></span><br><span class="line"><span class="keyword">from</span> score;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- ---------------------------------------------------约束演示------------------------------------------------------------</span></span><br><span class="line"><span class="comment">-- id 主键,并且自动增长</span></span><br><span class="line"><span class="comment">-- name 不为空,并且唯一</span></span><br><span class="line"><span class="comment">-- age 大于零并且小于等于1208.0以上的数据库才支持age int check (age &gt; 0 &amp;&amp; age &lt;= 120) COMMENT &#x27;年龄&#x27;</span></span><br><span class="line"><span class="comment">-- status 如果没有指定该值默认为1</span></span><br><span class="line"><span class="comment">-- gender 无约束</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">table</span> if <span class="keyword">exists</span> <span class="keyword">user</span>;</span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> <span class="keyword">user</span></span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> AUTO_INCREMENT <span class="keyword">PRIMARY</span> KEY COMMENT <span class="string">&#x27;ID唯一标识&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) <span class="keyword">NOT</span> <span class="keyword">NULL</span> <span class="keyword">UNIQUE</span> COMMENT <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> COMMENT <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> status <span class="type">char</span>(<span class="number">1</span>) <span class="keyword">default</span> <span class="string">&#x27;1&#x27;</span> COMMENT <span class="string">&#x27;状态&#x27;</span>,</span><br><span class="line"> gender <span class="type">char</span>(<span class="number">1</span>) COMMENT <span class="string">&#x27;性别&#x27;</span></span><br><span class="line">);</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> <span class="keyword">user</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 插入数据</span></span><br><span class="line"><span class="comment">-- name的值不能重复,status的值没有填写的话将使用的是默认的值</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> <span class="keyword">user</span>(name, age, status, gender)</span><br><span class="line"><span class="keyword">values</span> (<span class="string">&#x27;Tom1&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;男&#x27;</span>),</span><br><span class="line"> (<span class="string">&#x27;Tom2&#x27;</span>, <span class="number">29</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;男&#x27;</span>),</span><br><span class="line"> (<span class="string">&#x27;Tom3&#x27;</span>, <span class="number">14</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;男&#x27;</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 外键约束</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> dept</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;ID&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;部门名称&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;部门表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> dept (id, name)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;研发部&#x27;</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;市场部&#x27;</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;财务部&#x27;</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;销售部&#x27;</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;总经办&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> employee</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;ID&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> job <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;职位&#x27;</span>,</span><br><span class="line"> salary <span class="type">int</span> comment <span class="string">&#x27;薪资&#x27;</span>,</span><br><span class="line"> entrydate <span class="type">date</span> comment <span class="string">&#x27;入职时间&#x27;</span>,</span><br><span class="line"> managerid <span class="type">int</span> comment <span class="string">&#x27;直属领导ID&#x27;</span>,</span><br><span class="line"> dept_id <span class="type">int</span> comment <span class="string">&#x27;部门ID&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;员工表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> employee (id, name, age, job, salary, entrydate, managerid, dept_id)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;金庸&#x27;</span>, <span class="number">66</span>, <span class="string">&#x27;总裁&#x27;</span>, <span class="number">20000</span>, <span class="string">&#x27;2000-01-01&#x27;</span>, <span class="keyword">null</span>, <span class="number">5</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;张无忌&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;项目经理&#x27;</span>, <span class="number">12500</span>, <span class="string">&#x27;2005-12-05&#x27;</span>, <span class="number">1</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;杨逍&#x27;</span>, <span class="number">33</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">8400</span>, <span class="string">&#x27;2000-11-03&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;韦一笑&#x27;</span>, <span class="number">48</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">11000</span>, <span class="string">&#x27;2002-02-05&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;常遇春&#x27;</span>, <span class="number">43</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">10500</span>, <span class="string">&#x27;2004-09-07&#x27;</span>, <span class="number">3</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">6</span>, <span class="string">&#x27;小昭&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;程序员鼓励师&#x27;</span>, <span class="number">6600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> dept;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> employee;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 添加外键 员工表employee的部门id字段关联到部门表的id字段以建立外键约束</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> employee</span><br><span class="line"> <span class="keyword">add</span> <span class="keyword">constraint</span> fk_emp_dept <span class="keyword">foreign</span> key (dept_id) <span class="keyword">references</span> dept (id);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除外键</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> employee</span><br><span class="line"> <span class="keyword">drop</span> <span class="keyword">foreign</span> key fk_emp_dept;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- ---------------------------------------------多表查询--------------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 多表关系</span></span><br><span class="line"><span class="comment">-- 演示多对多的关系</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> student</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment <span class="keyword">primary</span> key comment <span class="string">&#x27;主键ID&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> <span class="keyword">no</span> <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;学号&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;学生表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> student</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="string">&#x27;黛绮丝&#x27;</span>, <span class="string">&#x27;2000100101&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;谢逊&#x27;</span>,</span><br><span class="line"> <span class="string">&#x27;2000100102&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;殷天正&#x27;</span>, <span class="string">&#x27;2000100103&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;韦一笑&#x27;</span>, <span class="string">&#x27;2000100104&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> course</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment <span class="keyword">primary</span> key comment <span class="string">&#x27;主键ID&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;课程名称&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;课程表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> course</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="string">&#x27;Java&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;PHP&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;MySQL&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;Hadoop&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> student_course</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;主键&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> studentid <span class="type">int</span> <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;学生ID&#x27;</span>,</span><br><span class="line"> courseid <span class="type">int</span> <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;课程ID&#x27;</span>,</span><br><span class="line"> <span class="keyword">constraint</span> fk_courseid <span class="keyword">foreign</span> key (courseid) <span class="keyword">references</span> course (id),</span><br><span class="line"> <span class="keyword">constraint</span> fk_studentid <span class="keyword">foreign</span> key (studentid) <span class="keyword">references</span> student (id)</span><br><span class="line">) comment <span class="string">&#x27;学生课程中间表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> student_course</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="number">1</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">1</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">1</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">2</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">2</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="number">3</span>, <span class="number">4</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 演示一对一的关系</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> tb_user</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment <span class="keyword">primary</span> key comment <span class="string">&#x27;主键ID&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> gender <span class="type">char</span>(<span class="number">1</span>) comment <span class="string">&#x27;1: 男 , 2: 女&#x27;</span>,</span><br><span class="line"> phone <span class="type">char</span>(<span class="number">11</span>) comment <span class="string">&#x27;手机号&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;用户基本信息表&#x27;</span>;</span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> tb_user_edu</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment <span class="keyword">primary</span> key comment <span class="string">&#x27;主键ID&#x27;</span>,</span><br><span class="line"> degree <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;学历&#x27;</span>,</span><br><span class="line"> major <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;专业&#x27;</span>,</span><br><span class="line"> primaryschool <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;小学&#x27;</span>,</span><br><span class="line"> middleschool <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;中学&#x27;</span>,</span><br><span class="line"> university <span class="type">varchar</span>(<span class="number">50</span>) comment <span class="string">&#x27;大学&#x27;</span>,</span><br><span class="line"> userid <span class="type">int</span> <span class="keyword">unique</span> comment <span class="string">&#x27;用户ID&#x27;</span>,</span><br><span class="line"> <span class="keyword">constraint</span> fk_userid <span class="keyword">foreign</span> key (userid) <span class="keyword">references</span> tb_user (id)</span><br><span class="line">) comment <span class="string">&#x27;用户教育信息表&#x27;</span>;</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> tb_user(id, name, age, gender, phone)</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="string">&#x27;黄渤&#x27;</span>, <span class="number">45</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;18800001111&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;冰冰&#x27;</span>, <span class="number">35</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;18800002222&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;码云&#x27;</span>, <span class="number">55</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;18800008888&#x27;</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;李彦宏&#x27;</span>, <span class="number">50</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;18800009999&#x27;</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> tb_user_edu(id, degree, major, primaryschool, middleschool,</span><br><span class="line"> university, userid)</span><br><span class="line"><span class="keyword">values</span> (<span class="keyword">null</span>, <span class="string">&#x27;本科&#x27;</span>, <span class="string">&#x27;舞蹈&#x27;</span>, <span class="string">&#x27;静安区第一小学&#x27;</span>, <span class="string">&#x27;静安区第一中学&#x27;</span>, <span class="string">&#x27;北京舞蹈学院&#x27;</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;硕士&#x27;</span>, <span class="string">&#x27;表演&#x27;</span>, <span class="string">&#x27;朝阳区第一小学&#x27;</span>, <span class="string">&#x27;朝阳区第一中学&#x27;</span>, <span class="string">&#x27;北京电影学院&#x27;</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;本科&#x27;</span>, <span class="string">&#x27;英语&#x27;</span>, <span class="string">&#x27;杭州市第一小学&#x27;</span>, <span class="string">&#x27;杭州市第一中学&#x27;</span>, <span class="string">&#x27;杭州师范大学&#x27;</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="keyword">null</span>, <span class="string">&#x27;本科&#x27;</span>, <span class="string">&#x27;应用数学&#x27;</span>, <span class="string">&#x27;阳泉第一小学&#x27;</span>, <span class="string">&#x27;阳泉区第一中学&#x27;</span>, <span class="string">&#x27;清华大学&#x27;</span>, <span class="number">4</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 演示多表查询</span></span><br><span class="line"><span class="comment">-- 数据准备</span></span><br><span class="line"><span class="comment">-- 创建dept表并插入数据</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> dept</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;ID&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;部门名称&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;部门表&#x27;</span>;</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> dept (id, name)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;研发部&#x27;</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;市场部&#x27;</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;财务部&#x27;</span>),</span><br><span class="line"> (<span class="number">4</span>,</span><br><span class="line"> <span class="string">&#x27;销售部&#x27;</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;总经办&#x27;</span>),</span><br><span class="line"> (<span class="number">6</span>, <span class="string">&#x27;人事部&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 创建emp表并插入数据</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> emp</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> auto_increment comment <span class="string">&#x27;ID&#x27;</span> <span class="keyword">primary</span> key,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> age <span class="type">int</span> comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> job <span class="type">varchar</span>(<span class="number">20</span>) comment <span class="string">&#x27;职位&#x27;</span>,</span><br><span class="line"> salary <span class="type">int</span> comment <span class="string">&#x27;薪资&#x27;</span>,</span><br><span class="line"> entrydate <span class="type">date</span> comment <span class="string">&#x27;入职时间&#x27;</span>,</span><br><span class="line"> managerid <span class="type">int</span> comment <span class="string">&#x27;直属领导ID&#x27;</span>,</span><br><span class="line"> dept_id <span class="type">int</span> comment <span class="string">&#x27;部门ID&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;员工表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 添加外键</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">table</span> emp</span><br><span class="line"> <span class="keyword">add</span> <span class="keyword">constraint</span> fk_emp_dept_id <span class="keyword">foreign</span> key (dept_id) <span class="keyword">references</span></span><br><span class="line"> dept (id);</span><br><span class="line"></span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> emp (id, name, age, job, salary, entrydate, managerid, dept_id)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="number">1</span>, <span class="string">&#x27;金庸&#x27;</span>, <span class="number">66</span>, <span class="string">&#x27;总裁&#x27;</span>, <span class="number">20000</span>, <span class="string">&#x27;2000-01-01&#x27;</span>, <span class="keyword">null</span>, <span class="number">5</span>),</span><br><span class="line"> (<span class="number">2</span>, <span class="string">&#x27;张无忌&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;项目经理&#x27;</span>, <span class="number">12500</span>, <span class="string">&#x27;2005-12-05&#x27;</span>, <span class="number">1</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">3</span>, <span class="string">&#x27;杨逍&#x27;</span>, <span class="number">33</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">8400</span>, <span class="string">&#x27;2000-11-03&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">4</span>, <span class="string">&#x27;韦一笑&#x27;</span>, <span class="number">48</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">11000</span>, <span class="string">&#x27;2002-02-05&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">5</span>, <span class="string">&#x27;常遇春&#x27;</span>, <span class="number">43</span>, <span class="string">&#x27;开发&#x27;</span>, <span class="number">10500</span>, <span class="string">&#x27;2004-09-07&#x27;</span>, <span class="number">3</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">6</span>, <span class="string">&#x27;小昭&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;程序员鼓励师&#x27;</span>, <span class="number">6600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">2</span>, <span class="number">1</span>),</span><br><span class="line"> (<span class="number">7</span>, <span class="string">&#x27;灭绝&#x27;</span>, <span class="number">60</span>, <span class="string">&#x27;财务总监&#x27;</span>, <span class="number">8500</span>, <span class="string">&#x27;2002-09-12&#x27;</span>, <span class="number">1</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="number">8</span>, <span class="string">&#x27;周芷若&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;会计&#x27;</span>, <span class="number">48000</span>, <span class="string">&#x27;2006-06-02&#x27;</span>, <span class="number">7</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="number">9</span>, <span class="string">&#x27;丁敏君&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;出纳&#x27;</span>, <span class="number">5250</span>, <span class="string">&#x27;2009-05-13&#x27;</span>, <span class="number">7</span>, <span class="number">3</span>),</span><br><span class="line"> (<span class="number">10</span>, <span class="string">&#x27;赵敏&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;市场部总监&#x27;</span>, <span class="number">12500</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">1</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">11</span>, <span class="string">&#x27;鹿杖客&#x27;</span>, <span class="number">56</span>, <span class="string">&#x27;职员&#x27;</span>, <span class="number">3750</span>, <span class="string">&#x27;2006-10-03&#x27;</span>, <span class="number">10</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">12</span>, <span class="string">&#x27;鹤笔翁&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;职员&#x27;</span>, <span class="number">3750</span>, <span class="string">&#x27;2007-05-09&#x27;</span>, <span class="number">10</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">13</span>, <span class="string">&#x27;方东白&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;职员&#x27;</span>, <span class="number">5500</span>, <span class="string">&#x27;2009-02-12&#x27;</span>, <span class="number">10</span>, <span class="number">2</span>),</span><br><span class="line"> (<span class="number">14</span>, <span class="string">&#x27;张三丰&#x27;</span>, <span class="number">88</span>, <span class="string">&#x27;销售总监&#x27;</span>, <span class="number">14000</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">1</span>, <span class="number">4</span>),</span><br><span class="line"> (<span class="number">15</span>, <span class="string">&#x27;俞莲舟&#x27;</span>, <span class="number">38</span>, <span class="string">&#x27;销售&#x27;</span>, <span class="number">4600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">14</span>, <span class="number">4</span>),</span><br><span class="line"> (<span class="number">16</span>, <span class="string">&#x27;宋远桥&#x27;</span>, <span class="number">40</span>, <span class="string">&#x27;销售&#x27;</span>, <span class="number">4600</span>, <span class="string">&#x27;2004-10-12&#x27;</span>, <span class="number">14</span>, <span class="number">4</span>),</span><br><span class="line"> (<span class="number">17</span>, <span class="string">&#x27;陈友谅&#x27;</span>, <span class="number">42</span>, <span class="keyword">null</span>, <span class="number">2000</span>, <span class="string">&#x27;2011-10-12&#x27;</span>, <span class="number">1</span>, <span class="keyword">null</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 多表查询</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp,</span><br><span class="line"> dept</span><br><span class="line"><span class="keyword">where</span> emp.dept_id <span class="operator">=</span> dept.id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 内连接演示</span></span><br><span class="line"><span class="comment">-- 案例</span></span><br><span class="line"><span class="comment">-- 查询每一个员工的姓名 , 及关联的部门的名称 (隐式内连接实现)</span></span><br><span class="line"><span class="comment">-- 表结构: emp , dept</span></span><br><span class="line"><span class="comment">-- 连接条件: emp.dept_id = dept.id</span></span><br><span class="line"><span class="keyword">select</span> e.name, d.name</span><br><span class="line"><span class="keyword">from</span> emp e,</span><br><span class="line"> dept d</span><br><span class="line"><span class="keyword">where</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询每一个员工的姓名 , 及关联的部门的名称 (显式内连接实现) --- INNER JOIN ...ON ...</span></span><br><span class="line"><span class="comment">-- 表结构: emp , dept</span></span><br><span class="line"><span class="comment">-- 连接条件: emp.dept_id = dept.id</span></span><br><span class="line"><span class="keyword">select</span> e.name, d.name</span><br><span class="line"><span class="keyword">from</span> emp e</span><br><span class="line"> <span class="keyword">inner</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 外连接</span></span><br><span class="line"><span class="comment">-- 查询emp表的所有数据, 和对应的部门信息</span></span><br><span class="line"><span class="comment">-- 由于需求中提到要查询emp的所有数据所以是不能内连接查询的需要考虑使用外连接查询。</span></span><br><span class="line"><span class="comment">-- 表结构: emp, dept</span></span><br><span class="line"><span class="comment">-- 连接条件: emp.dept_id = dept.id</span></span><br><span class="line"><span class="keyword">select</span> e.name, d.name</span><br><span class="line"><span class="keyword">from</span> emp e</span><br><span class="line"> <span class="keyword">left</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询dept表的所有数据, 和对应的员工信息(右外连接)</span></span><br><span class="line"><span class="comment">-- 由于需求中提到要查询dept表的所有数据所以是不能内连接查询的需要考虑使用外连接查询</span></span><br><span class="line"><span class="comment">-- 表结构: emp, dept</span></span><br><span class="line"><span class="comment">-- 连接条件: emp.dept_id = dept.id</span></span><br><span class="line"><span class="keyword">select</span> e.name, d.name</span><br><span class="line"><span class="keyword">from</span> emp e</span><br><span class="line"> <span class="keyword">right</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 自连接</span></span><br><span class="line"><span class="comment">-- 查询员工 及其 所属领导的名字</span></span><br><span class="line"><span class="comment">-- 表结构: emp</span></span><br><span class="line"><span class="comment">-- 技巧:查询的时候看作是两张表</span></span><br><span class="line"><span class="keyword">select</span> e1.name <span class="string">&#x27;员工&#x27;</span>, e2.name <span class="string">&#x27;领导&#x27;</span></span><br><span class="line"><span class="keyword">from</span> emp e1,</span><br><span class="line"> emp e2</span><br><span class="line"><span class="keyword">where</span> e1.managerid <span class="operator">=</span> e2.id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询所有员工 emp 及其领导的名字 emp , 如果员工没有领导, 也需要查询出来</span></span><br><span class="line"><span class="comment">-- 表结构: emp a , emp b</span></span><br><span class="line"><span class="keyword">select</span> e1.name <span class="string">&#x27;员工&#x27;</span>, e2.name <span class="string">&#x27;领导&#x27;</span></span><br><span class="line"><span class="keyword">from</span> emp e1</span><br><span class="line"> <span class="keyword">left</span> <span class="keyword">join</span> emp e2 <span class="keyword">on</span> e1.managerid <span class="operator">=</span> e2.id;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 联合查询</span></span><br><span class="line"><span class="comment">-- 将薪资低于 5000 的员工 , 和 年龄大于 50 岁的员工全部查询出来.</span></span><br><span class="line"><span class="comment">-- 当前对于这个需求,我们可以直接使用多条件查询,使用逻辑运算符 or 连接即可,也可以通过union/union all来联合查询</span></span><br><span class="line"><span class="comment">-- 相当于把下面的两条sql的结果拼接在一起(去掉all就可以实现去重)</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp e</span><br><span class="line"><span class="keyword">where</span> e.salary <span class="operator">&lt;</span> <span class="number">5000</span></span><br><span class="line"><span class="keyword">union</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp e</span><br><span class="line"><span class="keyword">where</span> e.age <span class="operator">&gt;</span> <span class="number">50</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 子查询</span></span><br><span class="line"><span class="comment">-- 标量子查询</span></span><br><span class="line"><span class="comment">-- 1.查询 &quot;销售部&quot; 的所有员工信息</span></span><br><span class="line"><span class="comment">-- 1.1 查询销售部的部门id</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp e</span><br><span class="line"><span class="keyword">where</span> e.dept_id <span class="operator">=</span> (<span class="keyword">select</span> id <span class="keyword">from</span> dept d <span class="keyword">where</span> d.name <span class="operator">=</span> <span class="string">&#x27;销售部&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询在 &quot;方东白&quot; 入职之后的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp e1</span><br><span class="line"><span class="keyword">where</span> e1.entrydate <span class="operator">&gt;</span> (<span class="keyword">select</span> e2.entrydate <span class="keyword">from</span> emp e2 <span class="keyword">where</span> e2.name <span class="operator">=</span> <span class="string">&#x27;方东白&#x27;</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 列子查询</span></span><br><span class="line"><span class="comment">-- 查询 &quot;销售部&quot; 和 &quot;市场部&quot; 的所有员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp e</span><br><span class="line"><span class="keyword">where</span> e.dept_id <span class="keyword">in</span> (<span class="keyword">select</span> id <span class="keyword">from</span> dept <span class="keyword">where</span> dept.name <span class="operator">=</span> <span class="string">&#x27;销售部&#x27;</span> <span class="keyword">or</span> dept.name <span class="operator">=</span> <span class="string">&#x27;市场部&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询比财务部所有人工资都高的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp e</span><br><span class="line"><span class="keyword">where</span> e.salary <span class="operator">&gt;</span> <span class="keyword">all</span> (<span class="keyword">select</span> e2.salary <span class="keyword">from</span> emp e2 <span class="keyword">where</span> e2.dept_id <span class="operator">=</span> (<span class="keyword">select</span> id <span class="keyword">from</span> dept <span class="keyword">where</span> dept.name <span class="operator">=</span> <span class="string">&#x27;财务部&#x27;</span>));</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询比研发部其中任意一人工资高的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp e</span><br><span class="line"><span class="keyword">where</span> e.salary <span class="operator">&gt;</span> <span class="keyword">any</span> (<span class="keyword">select</span> e2.salary <span class="keyword">from</span> emp e2 <span class="keyword">where</span> e2.dept_id <span class="operator">=</span> (<span class="keyword">select</span> id <span class="keyword">from</span> dept <span class="keyword">where</span> dept.name <span class="operator">=</span> <span class="string">&#x27;研发部&#x27;</span>));</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 行子查询</span></span><br><span class="line"><span class="comment">-- 查询与&quot;张无忌&quot;的薪资及与其直属领导相同的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp e2</span><br><span class="line"><span class="keyword">where</span> (e2.salary, e2.managerid) <span class="operator">=</span> (<span class="keyword">select</span> e.salary, e.managerid <span class="keyword">from</span> emp e <span class="keyword">where</span> e.name <span class="operator">=</span> <span class="string">&#x27;张无忌&#x27;</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 表子查询</span></span><br><span class="line"><span class="comment">-- 查询与 &quot;鹿杖客&quot; , &quot;宋远桥&quot; 的职位和薪资相同的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp e2</span><br><span class="line"><span class="keyword">where</span> (e2.job, e2.salary) <span class="keyword">in</span> (<span class="keyword">select</span> e.job, e.salary <span class="keyword">from</span> emp e <span class="keyword">where</span> e.name <span class="operator">=</span> <span class="string">&#x27;鹿杖客&#x27;</span> <span class="keyword">or</span> name <span class="operator">=</span> <span class="string">&#x27;宋远桥&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询入职日期是 &quot;2006-01-01&quot; 之后的员工信息 , 及其部门信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> (<span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> emp <span class="keyword">where</span> entrydate <span class="operator">&gt;</span> <span class="string">&#x27;2006-01-01&#x27;</span>) e</span><br><span class="line"> <span class="keyword">left</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 多表查询案例</span></span><br><span class="line"><span class="comment">-- 数据准备</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> salgrade</span><br><span class="line">(</span><br><span class="line"> grade <span class="type">int</span>,</span><br><span class="line"> losal <span class="type">int</span>,</span><br><span class="line"> hisal <span class="type">int</span></span><br><span class="line">) comment <span class="string">&#x27;薪资等级表&#x27;</span>;</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">1</span>, <span class="number">0</span>, <span class="number">3000</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">2</span>, <span class="number">3001</span>, <span class="number">5000</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">3</span>, <span class="number">5001</span>, <span class="number">8000</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">4</span>, <span class="number">8001</span>, <span class="number">10000</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">5</span>, <span class="number">10001</span>, <span class="number">15000</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">6</span>, <span class="number">15001</span>, <span class="number">20000</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">7</span>, <span class="number">20001</span>, <span class="number">25000</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> salgrade</span><br><span class="line"><span class="keyword">values</span> (<span class="number">8</span>, <span class="number">25001</span>, <span class="number">30000</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 题解</span></span><br><span class="line"><span class="comment">-- 1.查询员工的姓名、年龄、职位、部门信息(隐式内连接)</span></span><br><span class="line"><span class="keyword">select</span> e.name, e.age, e.job, d.name</span><br><span class="line"><span class="keyword">from</span> emp e,</span><br><span class="line"> dept d</span><br><span class="line"><span class="keyword">where</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 2.查询年龄小于30岁的员工的姓名、年龄、职位、部门信息显式内连接</span></span><br><span class="line"><span class="keyword">select</span> e.name, e.age, e.job, d.name</span><br><span class="line"><span class="keyword">from</span> emp e</span><br><span class="line"> <span class="keyword">inner</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id</span><br><span class="line"><span class="keyword">where</span> e.age <span class="operator">&lt;</span> <span class="number">30</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 3.查询拥有员工的部门id、部门名称</span></span><br><span class="line"><span class="comment">-- 方法一</span></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">distinct</span> d.id, d.name</span><br><span class="line"><span class="keyword">from</span> emp e,</span><br><span class="line"> dept d</span><br><span class="line"><span class="keyword">where</span> e.dept_id <span class="operator">=</span> d.id;</span><br><span class="line"><span class="comment">-- 方法二</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> dept</span><br><span class="line"><span class="keyword">where</span> dept.id <span class="keyword">in</span> (<span class="keyword">select</span> e.dept_id <span class="keyword">from</span> emp e);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 4.查询所有年龄大于40岁的员工及其归属的部门名称如果没有员工分配部门也需要展示出来</span></span><br><span class="line"><span class="keyword">select</span> e.<span class="operator">*</span>, d.name</span><br><span class="line"><span class="keyword">from</span> emp e</span><br><span class="line"> <span class="keyword">left</span> <span class="keyword">join</span> dept d <span class="keyword">on</span> e.dept_id <span class="operator">=</span> d.id</span><br><span class="line"><span class="keyword">where</span> age <span class="operator">&gt;</span> <span class="number">40</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 5.查询所有员工的工资等级</span></span><br><span class="line"><span class="keyword">select</span> e.name <span class="string">&#x27;姓名&#x27;</span>, s.grade <span class="string">&#x27;工资等级&#x27;</span></span><br><span class="line"><span class="keyword">from</span> emp e,</span><br><span class="line"> salgrade s</span><br><span class="line"><span class="keyword">where</span> e.salary <span class="keyword">between</span> s.losal <span class="keyword">and</span> s.hisal;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 6.查询研发部所有员工的信息已经工资等级</span></span><br><span class="line"><span class="comment">-- 方法一</span></span><br><span class="line"><span class="keyword">select</span> e.<span class="operator">*</span>, s.grade</span><br><span class="line"><span class="keyword">from</span> emp e,</span><br><span class="line"> dept d,</span><br><span class="line"> salgrade s</span><br><span class="line"><span class="keyword">where</span> e.dept_id <span class="operator">=</span> d.id</span><br><span class="line"> <span class="keyword">and</span> (e.salary <span class="keyword">between</span> s.losal <span class="keyword">and</span> s.hisal)</span><br><span class="line"> <span class="keyword">and</span> d.name <span class="operator">=</span> <span class="string">&#x27;研发部&#x27;</span>;</span><br><span class="line"><span class="comment">-- 方法二</span></span><br><span class="line"><span class="keyword">select</span> e.<span class="operator">*</span>, s.grade</span><br><span class="line"><span class="keyword">from</span> (<span class="keyword">select</span> emp.<span class="operator">*</span></span><br><span class="line"> <span class="keyword">from</span> emp,</span><br><span class="line"> dept</span><br><span class="line"> <span class="keyword">where</span> emp.dept_id <span class="operator">=</span> dept.id</span><br><span class="line"> <span class="keyword">and</span> dept.name <span class="operator">=</span> <span class="string">&#x27;研发部&#x27;</span>) e,</span><br><span class="line"> salgrade s</span><br><span class="line"><span class="keyword">where</span> e.salary <span class="keyword">between</span> s.losal <span class="keyword">and</span> s.hisal;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 7.查询研发部的平均工资</span></span><br><span class="line"><span class="keyword">select</span> <span class="built_in">avg</span>(e.salary)</span><br><span class="line"><span class="keyword">from</span> emp e,</span><br><span class="line"> dept d</span><br><span class="line"><span class="keyword">where</span> e.dept_id <span class="operator">=</span> d.id</span><br><span class="line"> <span class="keyword">and</span> d.name <span class="operator">=</span> <span class="string">&#x27;研发部&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 8.查询工资比灭绝高的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> salary <span class="operator">&gt;</span> (<span class="keyword">select</span> salary <span class="keyword">from</span> emp <span class="keyword">where</span> name <span class="operator">=</span> <span class="string">&#x27;灭绝&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 9.查询比平均工资高的员工信息</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp</span><br><span class="line"><span class="keyword">where</span> salary <span class="operator">&gt;</span> (<span class="keyword">select</span> <span class="built_in">avg</span>(salary) <span class="keyword">from</span> emp);</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 10.查询低于本部门平均工资的员工</span></span><br><span class="line"><span class="comment">-- 方法一</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp e2</span><br><span class="line"><span class="keyword">where</span> e2.salary <span class="operator">&lt;</span> (<span class="keyword">select</span> <span class="built_in">avg</span>(e1.salary) <span class="keyword">from</span> emp e1 <span class="keyword">where</span> e1.dept_id <span class="operator">=</span> e2.dept_id);</span><br><span class="line"><span class="comment">-- 方法二</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> emp e,</span><br><span class="line"> (<span class="keyword">select</span> dept_id, <span class="built_in">avg</span>(salary) <span class="string">&#x27;salavg&#x27;</span> <span class="keyword">from</span> emp <span class="keyword">group</span> <span class="keyword">by</span> dept_id) eavg</span><br><span class="line"><span class="keyword">where</span> eavg.dept_id <span class="operator">=</span> e.dept_id</span><br><span class="line"> <span class="keyword">and</span> e.salary <span class="operator">&lt;</span> eavg.salavg;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 11.查询所有的部门信息,并统计部门的员工人数</span></span><br><span class="line"><span class="comment">-- 方法一</span></span><br><span class="line"><span class="keyword">select</span> d.id, d.name, (<span class="keyword">select</span> <span class="built_in">count</span>(<span class="operator">*</span>) <span class="keyword">from</span> emp e <span class="keyword">where</span> e.dept_id <span class="operator">=</span> d.id) <span class="string">&#x27;人数&#x27;</span></span><br><span class="line"><span class="keyword">from</span> dept d;</span><br><span class="line"><span class="comment">-- 方法二</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span></span><br><span class="line"><span class="keyword">from</span> dept d,</span><br><span class="line"> (<span class="keyword">select</span> e.dept_id, <span class="built_in">count</span>(<span class="operator">*</span>) <span class="string">&#x27;人数&#x27;</span> <span class="keyword">from</span> emp e <span class="keyword">group</span> <span class="keyword">by</span> e.dept_id) ecount</span><br><span class="line"><span class="keyword">where</span> d.id <span class="operator">=</span> ecount.dept_id;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 12.查询所有学生的选课情况,展示出学生名称,学号,课程名称</span></span><br><span class="line"><span class="keyword">select</span> s.name, s.no, c.name</span><br><span class="line"><span class="keyword">from</span> course c,</span><br><span class="line"> student s,</span><br><span class="line"> student_course sc</span><br><span class="line"><span class="keyword">where</span> c.id <span class="operator">=</span> sc.courseid</span><br><span class="line"> <span class="keyword">and</span> s.id <span class="operator">=</span> sc.studentid;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- ----------------------------------------------------------事务--------------------------------------------------------------------</span></span><br><span class="line"><span class="comment">-- 数据准备</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">table</span> if <span class="keyword">exists</span> account;</span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> account</span><br><span class="line">(</span><br><span class="line"> id <span class="type">int</span> <span class="keyword">primary</span> key AUTO_INCREMENT comment <span class="string">&#x27;ID&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">10</span>) comment <span class="string">&#x27;姓名&#x27;</span>,</span><br><span class="line"> money <span class="keyword">double</span>(<span class="number">10</span>, <span class="number">2</span>) comment <span class="string">&#x27;余额&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;账户表&#x27;</span>;</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> account(name, money)</span><br><span class="line"><span class="keyword">VALUES</span> (<span class="string">&#x27;张三&#x27;</span>, <span class="number">2000</span>),</span><br><span class="line"> (<span class="string">&#x27;李四&#x27;</span>, <span class="number">2000</span>);</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> account;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 转账操作张三转1000给李四</span></span><br><span class="line"><span class="comment">-- 1. 查询张三余额</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> account <span class="keyword">where</span> name <span class="operator">=</span> <span class="string">&#x27;张三&#x27;</span>;</span><br><span class="line"><span class="comment">-- 2. 张三的余额减少1000</span></span><br><span class="line"><span class="keyword">update</span> account <span class="keyword">set</span> money <span class="operator">=</span> money <span class="operator">-</span> <span class="number">1000</span> <span class="keyword">where</span> name <span class="operator">=</span> <span class="string">&#x27;张三&#x27;</span>;</span><br><span class="line"><span class="comment">-- 3. 李四的余额增加1000</span></span><br><span class="line"><span class="keyword">update</span> account <span class="keyword">set</span> money <span class="operator">=</span> money <span class="operator">+</span> <span class="number">1000</span> <span class="keyword">where</span> name <span class="operator">=</span> <span class="string">&#x27;李四&#x27;</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 开启事务</span></span><br><span class="line"><span class="keyword">start</span> transaction;</span><br><span class="line"><span class="comment">-- 1. 查询张三余额</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> account <span class="keyword">where</span> name <span class="operator">=</span> <span class="string">&#x27;张三&#x27;</span>;</span><br><span class="line"><span class="comment">-- 2. 张三的余额减少1000</span></span><br><span class="line"><span class="keyword">update</span> account <span class="keyword">set</span> money <span class="operator">=</span> money <span class="operator">-</span> <span class="number">1000</span> <span class="keyword">where</span> name <span class="operator">=</span> <span class="string">&#x27;张三&#x27;</span>;</span><br><span class="line"><span class="comment">-- 3. 李四的余额增加1000</span></span><br><span class="line"><span class="keyword">update</span> account <span class="keyword">set</span> money <span class="operator">=</span> money <span class="operator">+</span> <span class="number">1000</span> <span class="keyword">where</span> name <span class="operator">=</span> <span class="string">&#x27;李四&#x27;</span>;</span><br><span class="line"><span class="comment">-- 如果正常执行完毕, 则提交事务</span></span><br><span class="line"><span class="keyword">commit</span>;</span><br><span class="line"><span class="comment">-- 如果执行过程中报错, 则回滚事务</span></span><br><span class="line"><span class="comment">-- rollback;</span></span><br></pre></td></tr></table></figure>
<h1 id="二-MySql进阶"><a href="#二-MySql进阶" class="headerlink" title="二.MySql进阶"></a>二.MySql进阶</h1><h2 id="1-存储引擎"><a href="#1-存储引擎" class="headerlink" title="1.存储引擎"></a>1.存储引擎</h2><h3 id="1-1-MySql的体系结构"><a href="#1-1-MySql的体系结构" class="headerlink" title="1.1 MySql的体系结构"></a>1.1 MySql的体系结构</h3><p><img src="/pictures/image-20230916152706301.png" alt="image-20230916152706301"></p>
<p><img src="/pictures/image-20230916152828704.png" alt="image-20230916152828704"></p>
<h3 id="1-2-存储引擎简介"><a href="#1-2-存储引擎简介" class="headerlink" title="1.2 存储引擎简介"></a>1.2 存储引擎简介</h3><p><strong>简介</strong></p>
<p> 存储引擎就是存储数据、建立索引、更新&#x2F;查询数据等技术的实现方式 。存储引擎是基于表的,而不是 基于库的,所以存储引擎也可被称为表类型。我们可以在创建表的时候,来指定选择的存储引擎,如果 没有指定将自动选择默认的存储引擎。</p>
<p><strong>查询一张数据库表的建表语句</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 查询建表语句</span></span><br><span class="line"><span class="keyword">show</span> <span class="keyword">create</span> <span class="keyword">table</span> book_info;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230916153448893.png" alt="image-20230916153448893"></p>
<p><strong>建表的时候指定存储引擎的语句</strong></p>
<p><img src="/pictures/image-20230916153931010.png" alt="image-20230916153931010"></p>
<h3 id="1-3-存储引擎特点"><a href="#1-3-存储引擎特点" class="headerlink" title="1.3 存储引擎特点"></a>1.3 存储引擎特点</h3><p><img src="/pictures/image-20230916154915533.png" alt="image-20230916154915533"></p>
<p><img src="/pictures/image-20230916155113863.png" alt="image-20230916155113863"></p>
<p><img src="/pictures/image-20230916155356755.png" alt="image-20230916155356755"></p>
<p><img src="/pictures/image-20230916155525548.png" alt="image-20230916155525548"></p>
<p> <strong>存储引擎的区别</strong></p>
<p><img src="/pictures/image-20230916155637133.png" alt="image-20230916155637133"></p>
<h3 id="1-4-存储引擎的选择"><a href="#1-4-存储引擎的选择" class="headerlink" title="1.4 存储引擎的选择"></a>1.4 存储引擎的选择</h3><p> 在选择存储引擎时,应该根据应用系统的特点选择合适的存储引擎。对于复杂的应用系统,还可以根据 实际情况选择多种存储引擎进行组合。 </p>
<ul>
<li>InnoDB: 是Mysql的默认存储引擎支持事务、外键。如果应用对事务的完整性有比较高的要 求,在并发条件下要求数据的一致性,数据操作除了插入和查询之外,还包含很多的更新、删除操 作那么InnoDB存储引擎是比较合适的选择。 </li>
<li>MyISAM 如果应用是以读操作和插入操作为主,只有很少的更新和删除操作,并且对事务的完 整性、并发性要求不是很高,那么选择这个存储引擎是非常合适的。(例如评论的数据、日志相关的数据、电商中足迹相关的数据)</li>
<li>MEMORY将所有数据保存在内存中访问速度快通常用于临时表及缓存。MEMORY的缺陷就是 对表的大小有限制,太大的表无法缓存在内存中,而且无法保障数据的安全性。</li>
</ul>
<p>一句话项目中绝大多数的时候使用的都是InnoDB</p>
<h2 id="2-索引"><a href="#2-索引" class="headerlink" title="2.索引"></a>2.索引</h2><h3 id="2-1-索引概述"><a href="#2-1-索引概述" class="headerlink" title="2.1 索引概述"></a>2.1 索引概述</h3><h4 id="2-1-1-介绍"><a href="#2-1-1-介绍" class="headerlink" title="2.1.1 介绍"></a>2.1.1 介绍</h4><p> 索引index是帮助MySQL高效获取数据的数据结构(有序)。在数据之外,数据库系统还维护着满足特定查找算法的数据结构,这些数据结构以某种方式引用(指向)数据, 这样就可以在这些数据结构上实现高级查找算法,这种数据结构就是索引。</p>
<h4 id="2-1-2-演示"><a href="#2-1-2-演示" class="headerlink" title="2.1.2 演示"></a>2.1.2 演示</h4><p>注:下面的二叉树并不是一个真实的索引结构,而是一个举例</p>
<p><img src="/pictures/image-20230916150211012.png" alt="image-20230916150211012"></p>
<h4 id="2-1-3-优缺点"><a href="#2-1-3-优缺点" class="headerlink" title="2.1.3 优缺点"></a>2.1.3 优缺点</h4><p><img src="/pictures/image-20230916150430708.png" alt="image-20230916150430708"></p>
<h3 id="2-2-索引结构"><a href="#2-2-索引结构" class="headerlink" title="2.2 索引结构"></a>2.2 索引结构</h3><h4 id="2-2-1-索引的数据结构有哪些"><a href="#2-2-1-索引的数据结构有哪些" class="headerlink" title="2.2.1 索引的数据结构有哪些"></a>2.2.1 索引的数据结构有哪些</h4><p>默认的索引结构是B+树索引结构</p>
<p><img src="/pictures/image-20230916161524219.png" alt="image-20230916161524219"></p>
<p><strong>不同类型的存储引擎对不同的索引结构的支持情况</strong></p>
<p><img src="/pictures/image-20230916161623546.png" alt="image-20230916161623546"></p>
<h4 id="2-2-2-B-树的索引数据结构"><a href="#2-2-2-B-树的索引数据结构" class="headerlink" title="2.2.2 B+树的索引数据结构"></a>2.2.2 B+树的索引数据结构</h4><p><strong>二叉树和红黑树的不足</strong></p>
<p><img src="/pictures/image-20230916162305576.png" alt="image-20230916162305576"></p>
<p><strong>B树</strong></p>
<p><img src="/pictures/image-20230916163234103.png" alt="image-20230916163234103"></p>
<p><strong>B+树</strong></p>
<p><img src="/pictures/image-20230916164042303.png" alt="image-20230916164042303"></p>
<p><img src="/pictures/image-20230916164314700.png" alt="image-20230916164314700"></p>
<p><strong>MySql中的B+树结构</strong></p>
<p><img src="/pictures/image-20230916164500444.png" alt="image-20230916164500444"></p>
<h4 id="2-2-3-hash的索引数据结构"><a href="#2-2-3-hash的索引数据结构" class="headerlink" title="2.2.3 hash的索引数据结构"></a>2.2.3 hash的索引数据结构</h4><p><img src="/pictures/image-20230916164903702.png" alt="image-20230916164903702"></p>
<p><img src="/pictures/image-20230916165007465.png" alt="image-20230916165007465"></p>
<h4 id="2-3-4-思考题"><a href="#2-3-4-思考题" class="headerlink" title="2.3.4 思考题"></a>2.3.4 思考题</h4><h4 id=""><a href="#" class="headerlink" title=""></a><img src="/pictures/image-20230916165329434.png" alt="image-20230916165329434"></h4><h3 id="2-3-索引分类"><a href="#2-3-索引分类" class="headerlink" title="2.3 索引分类"></a>2.3 索引分类</h3><p><img src="/pictures/image-20230916165516779.png" alt="image-20230916165516779"></p>
<p><img src="/pictures/image-20230916165647255.png" alt="image-20230916165647255"></p>
<p><img src="/pictures/image-20230916170012664.png" alt="image-20230916170012664"></p>
<p>当我们要查询name值是Arm的数据的时候会先通过二级索引查询然后通过聚集索引查询这一行的信息回表查询</p>
<p><img src="/pictures/image-20230916170421435.png" alt="image-20230916170421435"></p>
<p><strong>思考题</strong></p>
<p><img src="/pictures/image-20230916170537693.png" alt="image-20230916170537693"></p>
<p>第一条的执行效率高第二条要回表查询先查询name所在行对应的主键id,然后通过主键id查询这一行的数据</p>
<h3 id="2-4-索引语法"><a href="#2-4-索引语法" class="headerlink" title="2.4 索引语法"></a>2.4 索引语法</h3><p><strong>创建|查看|删除语法</strong></p>
<p><img src="/pictures/image-20230917091746406.png" alt="image-20230917091746406"></p>
<p><strong>举例</strong></p>
<p><img src="/pictures/image-20230917093020287.png" alt="image-20230917093020287"></p>
<h3 id="2-5-SQL性能分析"><a href="#2-5-SQL性能分析" class="headerlink" title="2.5 SQL性能分析"></a>2.5 SQL性能分析</h3><h4 id="2-5-1-SQL执行频率"><a href="#2-5-1-SQL执行频率" class="headerlink" title="2.5.1 SQL执行频率"></a>2.5.1 SQL执行频率</h4><p><img src="/pictures/image-20230917093634100.png" alt="image-20230917093634100"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 查看系统的状态信息</span></span><br><span class="line"><span class="keyword">show</span> <span class="keyword">global</span> status <span class="keyword">like</span> <span class="string">&#x27;Com_______&#x27;</span>;</span><br></pre></td></tr></table></figure>
<h4 id="2-5-2-慢查询日志"><a href="#2-5-2-慢查询日志" class="headerlink" title="2.5.2 慢查询日志"></a>2.5.2 慢查询日志</h4><p><img src="/pictures/image-20230917094314803.png" alt="image-20230917094314803"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 查询慢查询日志是否开启</span></span><br><span class="line"><span class="keyword">show</span> variables <span class="keyword">like</span> <span class="string">&#x27;slow_query_log&#x27;</span>;</span><br></pre></td></tr></table></figure>
<h4 id="2-5-3-profile详情"><a href="#2-5-3-profile详情" class="headerlink" title="2.5.3 profile详情"></a>2.5.3 profile详情</h4><p><img src="/pictures/image-20230917095232011.png" alt="image-20230917095232011"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 是否支持profile详情功能</span></span><br><span class="line"><span class="keyword">select</span> @<span class="variable">@have_profiling</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查看是否开启该功能</span></span><br><span class="line"><span class="keyword">select</span> @<span class="variable">@profiling</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 开启profile</span></span><br><span class="line"><span class="keyword">set</span> profiling <span class="operator">=</span> <span class="number">1</span>;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230917095320953.png" alt="image-20230917095320953"></p>
<h4 id="2-5-4-explain执行计划"><a href="#2-5-4-explain执行计划" class="headerlink" title="2.5.4 explain执行计划"></a>2.5.4 explain执行计划</h4><p><img src="/pictures/image-20230917095911304.png" alt="image-20230917095911304"></p>
<p><img src="/pictures/image-20230917101205097.png" alt="image-20230917101205097"></p>
<p><img src="/pictures/image-20230917101337147.png" alt="image-20230917101337147"></p>
<h3 id="2-6-索引使用"><a href="#2-6-索引使用" class="headerlink" title="2.6 索引使用"></a>2.6 索引使用</h3><h4 id="2-6-1-验证索引效率"><a href="#2-6-1-验证索引效率" class="headerlink" title="2.6.1 验证索引效率"></a>2.6.1 验证索引效率</h4><p><img src="/pictures/image-20230917141334774.png" alt="image-20230917141334774"></p>
<p>现在有一个有着10000000数据的表tb_sku我们根据sn这一字段查询某一条具体的数据没有建立索引之前的查询耗费的时间是20多秒建立索引耗费大约90秒为sn字段建立索引之后查询耗费时间大概是零点几秒。</p>
<h4 id="2-6-2-最左前缀法则"><a href="#2-6-2-最左前缀法则" class="headerlink" title="2.6.2 最左前缀法则"></a>2.6.2 最左前缀法则</h4><p><img src="/pictures/image-20230917142410276.png" alt="image-20230917142410276"></p>
<p><img src="/pictures/image-20230917142707646.png" alt="image-20230917142707646"></p>
<h4 id="2-6-3-索引失效的情况"><a href="#2-6-3-索引失效的情况" class="headerlink" title="2.6.3 索引失效的情况"></a>2.6.3 索引失效的情况</h4><p><img src="/pictures/image-20230917142948227.png" alt="image-20230917142948227"></p>
<p><img src="/pictures/image-20230917143143047.png" alt="image-20230917143143047"></p>
<p><img src="/pictures/image-20230917143421975.png" alt="image-20230917143421975"></p>
<p><img src="/pictures/image-20230917143842497.png" alt="image-20230917143842497"></p>
<p><img src="/pictures/image-20230917144459567.png" alt="image-20230917144459567"></p>
<h4 id="2-6-4-SQL提示"><a href="#2-6-4-SQL提示" class="headerlink" title="2.6.4 SQL提示"></a>2.6.4 SQL提示</h4><p><img src="/pictures/image-20230917145046280.png" alt="image-20230917145046280"></p>
<h4 id="2-6-5-覆盖索引"><a href="#2-6-5-覆盖索引" class="headerlink" title="2.6.5 覆盖索引"></a>2.6.5 覆盖索引</h4><p><img src="/pictures/image-20230917145643194.png" alt="image-20230917145643194"></p>
<h4 id="2-6-6-前缀索引"><a href="#2-6-6-前缀索引" class="headerlink" title="2.6.6 前缀索引"></a>2.6.6 前缀索引</h4><p><img src="/pictures/image-20230917153757773.png" alt="image-20230917153757773"></p>
<p><img src="/pictures/image-20230917154300147.png" alt="image-20230917154300147"></p>
<h4 id="2-6-7-单例索引与联合索引的选择问题"><a href="#2-6-7-单例索引与联合索引的选择问题" class="headerlink" title="2.6.7 单例索引与联合索引的选择问题"></a>2.6.7 单例索引与联合索引的选择问题</h4><p><img src="/pictures/image-20230917155017641.png" alt="image-20230917155017641"></p>
<p><img src="/pictures/image-20230917155223679.png" alt="image-20230917155223679"></p>
<h3 id="2-7-索引设计原则"><a href="#2-7-索引设计原则" class="headerlink" title="2.7 索引设计原则"></a>2.7 索引设计原则</h3><p><img src="/pictures/image-20230917155748055.png" alt="image-20230917155748055"></p>
<h2 id="3-SQL优化"><a href="#3-SQL优化" class="headerlink" title="3.SQL优化"></a>3.SQL优化</h2><h3 id="3-1-插入数据的优化"><a href="#3-1-插入数据的优化" class="headerlink" title="3.1 插入数据的优化"></a>3.1 插入数据的优化</h3><p><img src="/pictures/image-20230917181618942.png" alt="image-20230917181618942"></p>
<p><img src="/pictures/image-20230917181842030.png" alt="image-20230917181842030"></p>
<p>100万的数据如果使用insert插入的话需要10分钟左右如果使用文件的方式导入只需要10多秒。</p>
<h3 id="3-2-主键优化"><a href="#3-2-主键优化" class="headerlink" title="3.2 主键优化"></a>3.2 主键优化</h3><p><img src="/pictures/image-20230917205500523.png" alt="image-20230917205500523"></p>
<p><img src="/pictures/image-20230917205636137.png" alt="image-20230917205636137"></p>
<p><img src="/pictures/image-20230917205833596.png" alt="image-20230917205833596"></p>
<p><img src="/pictures/image-20230917210112389.png" alt="image-20230917210112389"></p>
<p><img src="/pictures/image-20230917210303469.png" alt="image-20230917210303469"></p>
<h3 id="3-3-order-by优化"><a href="#3-3-order-by优化" class="headerlink" title="3.3 order by优化"></a>3.3 order by优化</h3><p><img src="/pictures/image-20230917210730392.png" alt="image-20230917210730392"></p>
<p><img src="/pictures/image-20230917211254167.png" alt="image-20230917211254167"></p>
<p><img src="/pictures/image-20230917210616858.png" alt="image-20230917210616858"></p>
<p><img src="/pictures/image-20230917211543109.png" alt="image-20230917211543109"></p>
<h3 id="3-4-group-by优化"><a href="#3-4-group-by优化" class="headerlink" title="3.4 group by优化"></a>3.4 group by优化</h3><p><img src="/pictures/image-20230917212026101.png" alt="image-20230917212026101"></p>
<h3 id="3-5-limit优化"><a href="#3-5-limit优化" class="headerlink" title="3.5 limit优化"></a>3.5 limit优化</h3><p><img src="/pictures/image-20230917212530539.png" alt="image-20230917212530539"></p>
<h3 id="3-6-count优化"><a href="#3-6-count优化" class="headerlink" title="3.6 count优化"></a>3.6 count优化</h3><p><img src="/pictures/image-20230917212709489.png" alt="image-20230917212709489"></p>
<p><img src="/pictures/image-20230917213029734.png" alt="image-20230917213029734"></p>
<p><img src="/pictures/image-20230917213316193.png" alt="image-20230917213316193"></p>
<h3 id="3-7-update优化"><a href="#3-7-update优化" class="headerlink" title="3.7 update优化"></a>3.7 update优化</h3><p><img src="/pictures/image-20230917213859581.png" alt="image-20230917213859581"></p>
<h3 id="3-8-总结"><a href="#3-8-总结" class="headerlink" title="3.8 总结"></a>3.8 总结</h3><p><img src="/pictures/image-20230917214424722.png" alt="image-20230917214424722"></p>
<h2 id="4-视图-存储过程-触发器"><a href="#4-视图-存储过程-触发器" class="headerlink" title="4.视图&#x2F;存储过程&#x2F;触发器"></a>4.视图&#x2F;存储过程&#x2F;触发器</h2><h3 id="4-1-视图"><a href="#4-1-视图" class="headerlink" title="4.1 视图"></a>4.1 视图</h3><h4 id="4-1-1-视图介绍"><a href="#4-1-1-视图介绍" class="headerlink" title="4.1.1 视图介绍"></a>4.1.1 视图介绍</h4><p> 视图View是一种虚拟存在的表。视图中的数据并不在数据库中实际存在行和列数据来自定义视图的查询中使用的表并且是在使用视图时动态生成的。通俗的讲视图只保存了查询的SQL逻辑不保存查询结果。所以我们在创建视图的时候主要的工作就落在创建这条SQL查询语句上。</p>
<h4 id="4-1-2-语法"><a href="#4-1-2-语法" class="headerlink" title="4.1.2 语法"></a>4.1.2 语法</h4><p><strong>创建</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">CREATE</span> [<span class="keyword">OR</span> REPLACE] <span class="keyword">VIEW</span> 视图名称[(列名列表)] <span class="keyword">AS</span> <span class="keyword">SELECT</span>语句 [ <span class="keyword">WITH</span> [<span class="keyword">CASCADED</span> <span class="operator">|</span> <span class="keyword">LOCAL</span> ] <span class="keyword">CHECK</span> OPTION ]</span><br></pre></td></tr></table></figure>
<p><strong>查询</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line">查看创建视图语句:<span class="keyword">SHOW</span> <span class="keyword">CREATE</span> <span class="keyword">VIEW</span> 视图名称;</span><br><span class="line">查看视图数据:<span class="keyword">SELECT</span> <span class="operator">*</span> <span class="keyword">FROM</span> 视图名称 ...... ;</span><br></pre></td></tr></table></figure>
<p><strong>修改</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line">方式一:<span class="keyword">CREATE</span> [<span class="keyword">OR</span> REPLACE] <span class="keyword">VIEW</span> 视图名称[(列名列表)] <span class="keyword">AS</span> <span class="keyword">SELECT</span>语句 [ <span class="keyword">WITH</span> [ <span class="keyword">CASCADED</span> <span class="operator">|</span> <span class="keyword">LOCAL</span> ] <span class="keyword">CHECK</span> OPTION ]</span><br><span class="line">方式二:<span class="keyword">ALTER</span> <span class="keyword">VIEW</span> 视图名称[(列名列表)] <span class="keyword">AS</span> <span class="keyword">SELECT</span>语句 [ <span class="keyword">WITH</span> [ <span class="keyword">CASCADED</span> <span class="operator">|</span> <span class="keyword">LOCAL</span> ] <span class="keyword">CHECK</span> OPTION ]</span><br></pre></td></tr></table></figure>
<p><strong>删除</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">DROP</span> <span class="keyword">VIEW</span> [IF <span class="keyword">EXISTS</span>] 视图名称 [,视图名称] ...</span><br></pre></td></tr></table></figure>
<p><strong>演示示例</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 视图</span></span><br><span class="line"><span class="comment">-- 创建视图</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">or</span> replace <span class="keyword">view</span> stu_v_1 <span class="keyword">as</span> <span class="keyword">select</span> id, name <span class="keyword">from</span> student <span class="keyword">where</span> id <span class="operator">&lt;=</span> <span class="number">10</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查看创建视图的语句</span></span><br><span class="line"><span class="keyword">show</span> <span class="keyword">create</span> <span class="keyword">view</span> stu_v_1;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查看视图数据</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> stu_v_1;</span><br><span class="line"><span class="comment">-- 也可以加上条件</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> stu_v_1 <span class="keyword">where</span> id <span class="operator">=</span> <span class="number">1</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 修改视图的方式(or replace可以实现修改效果)</span></span><br><span class="line"><span class="comment">-- 方式一</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">or</span> replace <span class="keyword">view</span> stu_v_1 <span class="keyword">as</span> <span class="keyword">select</span> id, name, <span class="keyword">no</span> <span class="keyword">from</span> student <span class="keyword">where</span> id <span class="operator">&lt;=</span> <span class="number">10</span>;</span><br><span class="line"><span class="comment">-- 方式二</span></span><br><span class="line"><span class="keyword">alter</span> <span class="keyword">view</span> stu_v_1 <span class="keyword">as</span> <span class="keyword">select</span> id, name <span class="keyword">from</span> student <span class="keyword">where</span> id <span class="operator">&lt;=</span> <span class="number">10</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除视图</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">view</span> if <span class="keyword">exists</span> stu_v_1;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 通过视图实现插入操作</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">or</span> replace <span class="keyword">view</span> stu_v_1 <span class="keyword">as</span> <span class="keyword">select</span> id, name <span class="keyword">from</span> student <span class="keyword">where</span> id <span class="operator">&lt;=</span> <span class="number">20</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 向视图中添加数据(实际上插入的数据插入到原table表中)</span></span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> stu_v_1 <span class="keyword">values</span>(<span class="number">6</span>,<span class="string">&#x27;Tom&#x27;</span>);</span><br></pre></td></tr></table></figure>
<h4 id="4-1-3-检查选项"><a href="#4-1-3-检查选项" class="headerlink" title="4.1.3 检查选项"></a>4.1.3 检查选项</h4><p> 当使用WITH CHECK OPTION子句创建视图时MySQL会通过视图检查正在更改的每个行例如 插入更新删除以使其符合视图的定义。MySQL允许基于另一个视图创建视图它还会检查依赖视图中的规则以保持一致性。为了确定检查的范围mysql提供了两个选项 CASCADED 和 LOCAL默认值为 CASCADED 。</p>
<p><strong>1.CASCADED</strong> 级联</p>
<p> 比如v2视图是基于v1视图的如果在v2视图创建的时候指定了检查选项为 cascaded但是v1视图创建时未指定检查选项。 则在执行检查时不仅会检查v2还会级联检查v2的关联视图v1。</p>
<p> <img src="/pictures/image-20231006182938266.png" alt="image-20231006182938266"></p>
<p><strong>2.LOCAL</strong> 本地</p>
<p> 比如v2视图是基于v1视图的如果在v2视图创建的时候指定了检查选项为 local 但是v1视图创建时未指定检查选项。 则在执行检查时知会检查v2不会检查v2的关联视图v1。</p>
<p> <img src="/pictures/image-20231006183051143.png" alt="image-20231006183051143"></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 检查选项</span></span><br><span class="line"><span class="comment">-- 添加了检查选项,在插入数据的时候会检查插入的数据是否满足视图创建的条件(创建语句为create or replace view stu_v_1 as select id, name from student where id &lt;= 20;此时插入的数据id要&lt;=20,否则报错)</span></span><br><span class="line"><span class="comment">-- cascaded:插入时会检查是否满足当前视图和依赖的视图的条件</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">or</span> replace <span class="keyword">view</span> stu_v_1 <span class="keyword">as</span> <span class="keyword">select</span> id, name <span class="keyword">from</span> student <span class="keyword">where</span> id <span class="operator">&lt;=</span> <span class="number">20</span> <span class="keyword">with</span> <span class="keyword">cascaded</span> <span class="keyword">check</span> option ;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- local:插入时会检查是否满足当前视图和依赖的视图(定义了检查选项的视图)的条件</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">or</span> replace <span class="keyword">view</span> stu_v_1 <span class="keyword">as</span> <span class="keyword">select</span> id, name <span class="keyword">from</span> student <span class="keyword">where</span> id <span class="operator">&lt;=</span> <span class="number">20</span> <span class="keyword">with</span> <span class="keyword">local</span> <span class="keyword">check</span> option ;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- local和cascaded的区别:</span></span><br><span class="line"><span class="comment">-- local:v2依赖了v1,只有v1也加上了with local check option检查选项,在v2插入数据的时候才会检查v1的条件</span></span><br><span class="line"><span class="comment">-- cascaded:v2依赖了v1,不管v1有没有加上检查选项,在v2插入数据时都会检查v1的条件</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 重点</span></span><br><span class="line"><span class="comment">-- 1.加不加检查选项的区别</span></span><br><span class="line"><span class="comment">-- 2.with cascaded check option和with local check option的区别</span></span><br></pre></td></tr></table></figure>
<h4 id="4-1-4-视图更新"><a href="#4-1-4-视图更新" class="headerlink" title="4.1.4 视图更新"></a>4.1.4 视图更新</h4><p>要使视图可更新,视图中的行与基础表中的行之间必须存在一对一的关系。如果视图包含以下任何一项,则该视图不可更新:</p>
<p>A. 聚合函数或窗口函数SUM()、 MIN()、 MAX()、 COUNT()等)</p>
<p>B. DISTINCT</p>
<p>C. GROUP BY</p>
<p>D. HAVING</p>
<p>E. UNION 或者 UNION ALL</p>
<p> <img src="/pictures/image-20231006184725321.png" alt="image-20231006184725321"></p>
<h4 id="4-1-5-视图作用"><a href="#4-1-5-视图作用" class="headerlink" title="4.1.5 视图作用"></a>4.1.5 视图作用</h4><p><img src="/pictures/image-20231006185121986.png" alt="image-20231006185121986"></p>
<h4 id="4-1-6-视图案例"><a href="#4-1-6-视图案例" class="headerlink" title="4.1.6 视图案例"></a>4.1.6 视图案例</h4><p>tb_user表结构以及sql语句</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> tb_user(</span><br><span class="line"> id <span class="type">int</span> <span class="keyword">primary</span> key auto_increment comment <span class="string">&#x27;主键&#x27;</span>,</span><br><span class="line"> name <span class="type">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;用户名&#x27;</span>,</span><br><span class="line"> phone <span class="type">varchar</span>(<span class="number">11</span>) <span class="keyword">not</span> <span class="keyword">null</span> comment <span class="string">&#x27;手机号&#x27;</span>,</span><br><span class="line"> email <span class="type">varchar</span>(<span class="number">100</span>) comment <span class="string">&#x27;邮箱&#x27;</span>,</span><br><span class="line"> profession <span class="type">varchar</span>(<span class="number">11</span>) comment <span class="string">&#x27;专业&#x27;</span>,</span><br><span class="line"> age tinyint unsigned comment <span class="string">&#x27;年龄&#x27;</span>,</span><br><span class="line"> gender <span class="type">char</span>(<span class="number">1</span>) comment <span class="string">&#x27;性别 , 1: 男, 2: 女&#x27;</span>,</span><br><span class="line"> status <span class="type">char</span>(<span class="number">1</span>) comment <span class="string">&#x27;状态&#x27;</span>,</span><br><span class="line"> createtime datetime comment <span class="string">&#x27;创建时间&#x27;</span></span><br><span class="line">) comment <span class="string">&#x27;系统用户表&#x27;</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;吕布&#x27;</span>, <span class="string">&#x27;17799990000&#x27;</span>, <span class="string">&#x27;lvbu666@163.com&#x27;</span>, <span class="string">&#x27;软件工程&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;6&#x27;</span>, <span class="string">&#x27;2001-02-02 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;曹操&#x27;</span>, <span class="string">&#x27;17799990001&#x27;</span>, <span class="string">&#x27;caocao666@qq.com&#x27;</span>, <span class="string">&#x27;通讯工程&#x27;</span>, <span class="number">33</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;0&#x27;</span>, <span class="string">&#x27;2001-03-05 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;赵云&#x27;</span>, <span class="string">&#x27;17799990002&#x27;</span>, <span class="string">&#x27;17799990@139.com&#x27;</span>, <span class="string">&#x27;英语&#x27;</span>, <span class="number">34</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;2002-03-02 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;孙悟空&#x27;</span>, <span class="string">&#x27;17799990003&#x27;</span>, <span class="string">&#x27;17799990@sina.com&#x27;</span>, <span class="string">&#x27;工程造价&#x27;</span>, <span class="number">54</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;0&#x27;</span>, <span class="string">&#x27;2001-07-02 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;花木兰&#x27;</span>, <span class="string">&#x27;17799990004&#x27;</span>, <span class="string">&#x27;19980729@sina.com&#x27;</span>, <span class="string">&#x27;软件工程&#x27;</span>, <span class="number">23</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;2001-04-22 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;大乔&#x27;</span>, <span class="string">&#x27;17799990005&#x27;</span>, <span class="string">&#x27;daqiao666@sina.com&#x27;</span>, <span class="string">&#x27;舞蹈&#x27;</span>, <span class="number">22</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;0&#x27;</span>, <span class="string">&#x27;2001-02-07 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;露娜&#x27;</span>, <span class="string">&#x27;17799990006&#x27;</span>, <span class="string">&#x27;luna_love@sina.com&#x27;</span>, <span class="string">&#x27;应用数学&#x27;</span>, <span class="number">24</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;0&#x27;</span>, <span class="string">&#x27;2001-02-08 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;程咬金&#x27;</span>, <span class="string">&#x27;17799990007&#x27;</span>, <span class="string">&#x27;chengyaojin@163.com&#x27;</span>, <span class="string">&#x27;化工&#x27;</span>, <span class="number">38</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;5&#x27;</span>, <span class="string">&#x27;2001-05-23 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;项羽&#x27;</span>, <span class="string">&#x27;17799990008&#x27;</span>, <span class="string">&#x27;xiaoyu666@qq.com&#x27;</span>, <span class="string">&#x27;金属材料&#x27;</span>, <span class="number">43</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;0&#x27;</span>, <span class="string">&#x27;2001-09-18 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;白起&#x27;</span>, <span class="string">&#x27;17799990009&#x27;</span>, <span class="string">&#x27;baiqi666@sina.com&#x27;</span>, <span class="string">&#x27;机械工程及其自动化&#x27;</span>, <span class="number">27</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;2001-08-16 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;韩信&#x27;</span>, <span class="string">&#x27;17799990010&#x27;</span>, <span class="string">&#x27;hanxin520@163.com&#x27;</span>, <span class="string">&#x27;无机非金属材料工程&#x27;</span>, <span class="number">27</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;0&#x27;</span>, <span class="string">&#x27;2001-06-12 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;荆轲&#x27;</span>, <span class="string">&#x27;17799990011&#x27;</span>, <span class="string">&#x27;jingke123@163.com&#x27;</span>, <span class="string">&#x27;会计&#x27;</span>, <span class="number">29</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;0&#x27;</span>, <span class="string">&#x27;2001-05-11 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;兰陵王&#x27;</span>, <span class="string">&#x27;17799990012&#x27;</span>, <span class="string">&#x27;lanlinwang666@126.com&#x27;</span>, <span class="string">&#x27;工程造价&#x27;</span>, <span class="number">44</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;2001-04-09 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;狂铁&#x27;</span>, <span class="string">&#x27;17799990013&#x27;</span>, <span class="string">&#x27;kuangtie@sina.com&#x27;</span>, <span class="string">&#x27;应用数学&#x27;</span>, <span class="number">43</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;2001-04-10 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;貂蝉&#x27;</span>, <span class="string">&#x27;17799990014&#x27;</span>, <span class="string">&#x27;84958948374@qq.com&#x27;</span>, <span class="string">&#x27;软件工程&#x27;</span>, <span class="number">40</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;3&#x27;</span>, <span class="string">&#x27;2001-02-12 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;妲己&#x27;</span>, <span class="string">&#x27;17799990015&#x27;</span>, <span class="string">&#x27;2783238293@qq.com&#x27;</span>, <span class="string">&#x27;软件工程&#x27;</span>, <span class="number">31</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;0&#x27;</span>, <span class="string">&#x27;2001-01-30 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;芈月&#x27;</span>, <span class="string">&#x27;17799990016&#x27;</span>, <span class="string">&#x27;xiaomin2001@sina.com&#x27;</span>, <span class="string">&#x27;工业经济&#x27;</span>, <span class="number">35</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;0&#x27;</span>, <span class="string">&#x27;2000-05-03 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;嬴政&#x27;</span>, <span class="string">&#x27;17799990017&#x27;</span>, <span class="string">&#x27;8839434342@qq.com&#x27;</span>, <span class="string">&#x27;化工&#x27;</span>, <span class="number">38</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;2001-08-08 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;狄仁杰&#x27;</span>, <span class="string">&#x27;17799990018&#x27;</span>, <span class="string">&#x27;jujiamlm8166@163.com&#x27;</span>, <span class="string">&#x27;国际贸易&#x27;</span>, <span class="number">30</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;0&#x27;</span>, <span class="string">&#x27;2007-03-12 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;安琪拉&#x27;</span>, <span class="string">&#x27;17799990019&#x27;</span>, <span class="string">&#x27;jdodm1h@126.com&#x27;</span>, <span class="string">&#x27;城市规划&#x27;</span>, <span class="number">51</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;0&#x27;</span>, <span class="string">&#x27;2001-08-15 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;典韦&#x27;</span>, <span class="string">&#x27;17799990020&#x27;</span>, <span class="string">&#x27;ycaunanjian@163.com&#x27;</span>, <span class="string">&#x27;城市规划&#x27;</span>, <span class="number">52</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;2&#x27;</span>, <span class="string">&#x27;2000-04-12 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;廉颇&#x27;</span>, <span class="string">&#x27;17799990021&#x27;</span>, <span class="string">&#x27;lianpo321@126.com&#x27;</span>, <span class="string">&#x27;土木工程&#x27;</span>, <span class="number">19</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;3&#x27;</span>, <span class="string">&#x27;2002-07-18 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;后羿&#x27;</span>, <span class="string">&#x27;17799990022&#x27;</span>, <span class="string">&#x27;altycj2000@139.com&#x27;</span>, <span class="string">&#x27;城市园林&#x27;</span>, <span class="number">20</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;0&#x27;</span>, <span class="string">&#x27;2002-03-10 00:00:00&#x27;</span>);</span><br><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> itcast.tb_user (name, phone, email, profession, age, gender, status, createtime) <span class="keyword">VALUES</span> (<span class="string">&#x27;姜子牙&#x27;</span>, <span class="string">&#x27;17799990023&#x27;</span>, <span class="string">&#x27;37483844@qq.com&#x27;</span>, <span class="string">&#x27;工程造价&#x27;</span>, <span class="number">29</span>, <span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;4&#x27;</span>, <span class="string">&#x27;2003-05-26 00:00:00&#x27;</span>);</span><br></pre></td></tr></table></figure>
<p>案例</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 视图案例</span></span><br><span class="line"><span class="comment">-- 为了保证数据库表的安全性开发人员在操作tb_user表时只能看到的用户的基本字段屏蔽手机号和邮箱两个字段</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">view</span> tb_user_view <span class="keyword">as</span> <span class="keyword">select</span> id, name, profession, age, gender, status, createtime <span class="keyword">from</span> tb_user;</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> tb_user_view;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查询每个学生所选修的课程(三张表联查),这个功能在很多的业务中都有使用到,为了简化操作,定义一个视图</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">view</span> tb_stu_course_view <span class="keyword">as</span> <span class="keyword">select</span> s.name student_name,s.no,c.name course_name <span class="keyword">from</span> student s, course c, student_course sc <span class="keyword">where</span> s.id <span class="operator">=</span> sc.studentid <span class="keyword">and</span> c.id <span class="operator">=</span> sc.courseid;</span><br></pre></td></tr></table></figure>
<h3 id="4-2-存储过程"><a href="#4-2-存储过程" class="headerlink" title="4.2 存储过程"></a>4.2 存储过程</h3><h4 id="4-2-1-介绍"><a href="#4-2-1-介绍" class="headerlink" title="4.2.1 介绍"></a>4.2.1 介绍</h4><p> <img src="/pictures/image-20231006190705216.png" alt="image-20231006190705216"></p>
<p> <img src="/pictures/image-20231006190743209.png" alt="image-20231006190743209"></p>
<h4 id="4-2-2-基本语法"><a href="#4-2-2-基本语法" class="headerlink" title="4.2.2 基本语法"></a>4.2.2 基本语法</h4><p><strong>创建</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">CREATE</span> <span class="keyword">PROCEDURE</span> 存储过程名称 ([ 参数列表 ])</span><br><span class="line"><span class="keyword">BEGIN</span></span><br><span class="line"> <span class="comment">-- SQL语句</span></span><br><span class="line"><span class="keyword">END</span> ;</span><br></pre></td></tr></table></figure>
<p><strong>调用</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">CALL</span> 名称 ([ 参数 ]);</span><br></pre></td></tr></table></figure>
<p><strong>查看</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">SELECT</span> <span class="operator">*</span> <span class="keyword">FROM</span> INFORMATION_SCHEMA.ROUTINES <span class="keyword">WHERE</span> ROUTINE_SCHEMA <span class="operator">=</span> <span class="string">&#x27;xxx&#x27;</span>; <span class="comment">-- 查询指定数据库的存储过程及状态信息</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">SHOW</span> <span class="keyword">CREATE</span> <span class="keyword">PROCEDURE</span> 存储过程名称 ; <span class="comment">-- 查询某个存储过程的定义</span></span><br></pre></td></tr></table></figure>
<p><strong>删除</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">DROP</span> <span class="keyword">PROCEDURE</span> [ IF <span class="keyword">EXISTS</span> ] 存储过程名称 </span><br></pre></td></tr></table></figure>
<blockquote>
<p>注意:<br>在命令行中执行创建存储过程的SQL时需要通过关键字 delimiter 指定SQL语句的结束符</p>
</blockquote>
<p><strong>演示示例</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 存储过程</span></span><br><span class="line"><span class="comment">-- 创建存储过程</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">procedure</span> p1()</span><br><span class="line"><span class="keyword">begin</span></span><br><span class="line"> <span class="keyword">select</span> <span class="built_in">count</span>(<span class="operator">*</span>) <span class="keyword">from</span> student;</span><br><span class="line"><span class="keyword">end</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 调用</span></span><br><span class="line"><span class="keyword">call</span> p1();</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 查看</span></span><br><span class="line"><span class="comment">-- 查询指定数据库的存储过程及状态信息</span></span><br><span class="line"><span class="comment">-- 查询itcast数据库中定义的存储过程</span></span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> information_schema.ROUTINES <span class="keyword">where</span> ROUTINE_SCHEMA <span class="operator">=</span> <span class="string">&#x27;itcast&#x27;</span>;</span><br><span class="line"><span class="comment">-- 查询某个存储过程的定义</span></span><br><span class="line"><span class="keyword">SHOW</span> <span class="keyword">CREATE</span> <span class="keyword">PROCEDURE</span> p1 ;</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 删除</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">procedure</span> if <span class="keyword">exists</span> p1;</span><br></pre></td></tr></table></figure>
<h4 id="4-2-3-变量"><a href="#4-2-3-变量" class="headerlink" title="4.2.3 变量"></a>4.2.3 变量</h4><p>在MySQL中变量分为三种类型: 系统变量、用户定义变量、局部变量</p>
<h5 id="4-2-3-1-系统变量"><a href="#4-2-3-1-系统变量" class="headerlink" title="4.2.3.1 系统变量"></a>4.2.3.1 系统变量</h5><p>系统变量 是MySQL服务器提供不是用户定义的属于服务器层面。分为全局变量GLOBAL、会话 变量SESSION</p>
<p>1.查看系统变量</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">SHOW</span> [ SESSION <span class="operator">|</span> <span class="keyword">GLOBAL</span> ] VARIABLES ; <span class="comment">-- 查看所有系统变量</span></span><br><span class="line"><span class="keyword">SHOW</span> [ SESSION <span class="operator">|</span> <span class="keyword">GLOBAL</span> ] VARIABLES <span class="keyword">LIKE</span> <span class="string">&#x27;......&#x27;</span>; <span class="comment">-- 可以通过LIKE模糊匹配方式查找变量</span></span><br><span class="line"><span class="keyword">SELECT</span> @@[SESSION <span class="operator">|</span> <span class="keyword">GLOBAL</span>] 系统变量名; <span class="comment">-- 查看指定变量的值</span></span><br></pre></td></tr></table></figure>
<p>2.设置系统变量</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">SET</span> [ SESSION <span class="operator">|</span> <span class="keyword">GLOBAL</span> ] 系统变量名 <span class="operator">=</span> 值 ;</span><br><span class="line"><span class="keyword">SET</span> @@[SESSION <span class="operator">|</span> <span class="keyword">GLOBAL</span>]系统变量名 <span class="operator">=</span> 值 ;</span><br></pre></td></tr></table></figure>
<blockquote>
<p><strong>注意</strong>:</p>
<pre><code>如果没有指定SESSION/GLOBAL默认是SESSION会话变量
</code></pre>
<blockquote>
<p>1 mysql服务重新启动之后所设置的全局参数会失效要想不失效可以在 &#x2F;etc&#x2F;my.cnf 中配置</p>
</blockquote>
<p> A. 全局变量(GLOBAL): 全局变量针对于所有的会话</p>
<p> B. 会话变量(SESSION): 会话变量针对于单个会话,在另外一个会话窗口就不生效了</p>
</blockquote>
<p><strong>演示示例</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 系统变量</span></span><br><span class="line"><span class="comment">-- 查看所有系统变量</span></span><br><span class="line"><span class="keyword">show</span> session variables ; #查看会话的系统变量</span><br><span class="line"><span class="keyword">show</span> <span class="keyword">global</span> variables ; #查看全局的系统变量</span><br><span class="line"><span class="comment">-- 查看以auto开头的系统变量</span></span><br><span class="line"><span class="keyword">show</span> variables <span class="keyword">like</span> <span class="string">&#x27;auto%&#x27;</span>;</span><br><span class="line"><span class="comment">-- 查看某一个具体的环境变量值以autocommit为例</span></span><br><span class="line"><span class="keyword">select</span> @<span class="variable">@autocommit</span>; #会话的</span><br><span class="line"><span class="keyword">select</span> @<span class="variable">@global</span>.autocommit; #全局的</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 设置系统变量以autocommit为例</span></span><br><span class="line"><span class="keyword">set</span> session autocommit <span class="operator">=</span> <span class="number">1</span>; #会话级别的</span><br><span class="line"><span class="keyword">set</span> <span class="keyword">global</span> autocommit <span class="operator">=</span> <span class="number">1</span>; #全局级别的</span><br><span class="line"><span class="comment">-- 或者</span></span><br><span class="line"><span class="keyword">set</span> @<span class="variable">@autocommit</span> <span class="operator">=</span> <span class="number">1</span>;</span><br><span class="line"><span class="keyword">set</span> @<span class="variable">@global</span>.autocommit <span class="operator">=</span> <span class="number">1</span>;</span><br></pre></td></tr></table></figure>
<h5 id="4-2-3-2-用户定义变量"><a href="#4-2-3-2-用户定义变量" class="headerlink" title="4.2.3.2 用户定义变量"></a>4.2.3.2 用户定义变量</h5><p>用户定义变量 是用户根据需要自己定义的变量,用户变量不用提前声明,在用的时候直接用 “@变量 名” 使用就可以。其作用域为当前连接</p>
<p><strong>1.赋值</strong></p>
<p>方式一:</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">SET</span> <span class="variable">@var_name</span> <span class="operator">=</span> expr [, <span class="variable">@var_name</span> <span class="operator">=</span> expr] ... ;</span><br><span class="line"><span class="keyword">SET</span> <span class="variable">@var_name</span> :<span class="operator">=</span> expr [, <span class="variable">@var_name</span> :<span class="operator">=</span> expr] ... ;</span><br></pre></td></tr></table></figure>
<p>赋值时,可以使用 &#x3D; ,也可以使用 :&#x3D; </p>
<p>方式二:</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">SELECT</span> <span class="variable">@var_name</span> :<span class="operator">=</span> expr [, <span class="variable">@var_name</span> :<span class="operator">=</span> expr] ... ;</span><br><span class="line"><span class="keyword">SELECT</span> 字段名 <span class="keyword">INTO</span> <span class="variable">@var_name</span> <span class="keyword">FROM</span> 表名;</span><br></pre></td></tr></table></figure>
<p><strong>2.使用</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">SELECT</span> <span class="variable">@var_name</span> ;</span><br></pre></td></tr></table></figure>
<blockquote>
<p>注意: 用户定义的变量无需对其进行声明或初始化只不过获取到的值为NULL</p>
</blockquote>
<p><strong>演示示例</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 用户定义变量</span></span><br><span class="line"><span class="comment">-- 赋值</span></span><br><span class="line"><span class="comment">-- 方式一</span></span><br><span class="line"><span class="keyword">set</span> <span class="variable">@myname</span> <span class="operator">=</span> <span class="string">&#x27;itcast&#x27;</span>;</span><br><span class="line"><span class="keyword">set</span> <span class="variable">@myage</span> :<span class="operator">=</span> <span class="number">10</span>;</span><br><span class="line"><span class="keyword">set</span> <span class="variable">@mygender</span> :<span class="operator">=</span> <span class="string">&#x27;男&#x27;</span>,<span class="variable">@myhobby</span> <span class="operator">=</span> <span class="string">&#x27;java&#x27;</span>;</span><br><span class="line"><span class="comment">-- 方式二</span></span><br><span class="line"><span class="keyword">select</span> <span class="variable">@mycolor</span> :<span class="operator">=</span> <span class="string">&#x27;red&#x27;</span>;</span><br><span class="line"><span class="keyword">select</span> <span class="built_in">count</span>(<span class="operator">*</span>) <span class="keyword">into</span> <span class="variable">@mycount</span> <span class="keyword">from</span> tb_user; #将tb_user表中的总记录数赋值给<span class="variable">@mycount</span></span><br><span class="line"></span><br><span class="line"><span class="comment">-- 使用</span></span><br><span class="line"><span class="keyword">select</span> <span class="variable">@myname</span>,<span class="variable">@myage</span>,<span class="variable">@mygender</span>,<span class="variable">@myhobby</span>,<span class="variable">@mycolor</span>,<span class="variable">@mycount</span>;</span><br></pre></td></tr></table></figure>
<h5 id="4-2-3-3-局部变量"><a href="#4-2-3-3-局部变量" class="headerlink" title="4.2.3.3 局部变量"></a>4.2.3.3 局部变量</h5><p>局部变量 是根据需要定义的在局部生效的变量访问之前需要DECLARE声明。可用作存储过程内的 局部变量和输入参数局部变量的范围是在其内声明的BEGIN … END块</p>
<p>1**.声明**</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">DECLARE</span> 变量名 变量类型 [<span class="keyword">DEFAULT</span> ... ] ;</span><br></pre></td></tr></table></figure>
<p>变量类型就是数据库字段类型INT、BIGINT、CHAR、VARCHAR、DATE、TIME等</p>
<p><strong>2.赋值</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">SET</span> 变量名 <span class="operator">=</span> 值 ;</span><br><span class="line"><span class="keyword">SET</span> 变量名 :<span class="operator">=</span> 值 ;</span><br><span class="line"><span class="keyword">SELECT</span> 字段名 <span class="keyword">INTO</span> 变量名 <span class="keyword">FROM</span> 表名 ... ;</span><br></pre></td></tr></table></figure>
<p><strong>演示示例</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 局部变量</span></span><br><span class="line"><span class="comment">-- 创建存储过程</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">procedure</span> p2()</span><br><span class="line"><span class="keyword">begin</span></span><br><span class="line"> # 定义一个<span class="type">int</span>类型的局部变量,默认值是<span class="number">0</span></span><br><span class="line"> <span class="keyword">declare</span> stu_count <span class="type">int</span> <span class="keyword">default</span> <span class="number">0</span>;</span><br><span class="line"> # 给stu_count赋值</span><br><span class="line"> <span class="comment">-- set stu_count = 100;</span></span><br><span class="line"> <span class="keyword">select</span> <span class="built_in">count</span>(<span class="operator">*</span>) <span class="keyword">into</span> stu_count <span class="keyword">from</span> tb_user;</span><br><span class="line"> #输出</span><br><span class="line"> <span class="keyword">select</span> stu_count;</span><br><span class="line"><span class="keyword">end</span>;</span><br><span class="line"><span class="comment">-- 调用函数</span></span><br><span class="line"><span class="keyword">call</span> p2();</span><br></pre></td></tr></table></figure>
<h4 id="4-2-4-if判断"><a href="#4-2-4-if判断" class="headerlink" title="4.2.4 if判断"></a>4.2.4 if判断</h4><p><strong>介绍</strong></p>
<p>if 用于做条件判断,具体的语法结构为:</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line">IF 条件<span class="number">1</span> <span class="keyword">THEN</span></span><br><span class="line"> .....</span><br><span class="line">ELSEIF 条件<span class="number">2</span> <span class="keyword">THEN</span> <span class="comment">-- 可选</span></span><br><span class="line"> .....</span><br><span class="line"><span class="keyword">ELSE</span> <span class="comment">-- 可选</span></span><br><span class="line"> .....</span><br><span class="line"><span class="keyword">END</span> IF;</span><br></pre></td></tr></table></figure>
<p>在if条件判断的结构中ELSE IF 结构可以有多个,也可以没有. ELSE结构可以有也可以没有.</p>
<p><strong>案例</strong></p>
<p>根据定义的分数score变量判定当前分数对应的分数等级</p>
<ul>
<li><p>score &gt;&#x3D; 85分等级为优秀</p>
</li>
<li><p>score &gt;&#x3D; 60分 且 score &lt; 85分等级为及格</p>
</li>
<li><p>score &lt; 60分等级为不及格</p>
</li>
</ul>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- if判断</span></span><br><span class="line"><span class="comment">-- 根据定义的分数score变量判定当前分数对应的分数等级</span></span><br><span class="line"><span class="comment">-- score &gt;= 85分等级为优秀</span></span><br><span class="line"><span class="comment">-- score &gt;= 60分 且 score &lt; 85分等级为及格</span></span><br><span class="line"><span class="comment">-- score &lt; 60分等级为不及格</span></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">procedure</span> p3;</span><br><span class="line"><span class="keyword">create</span> <span class="keyword">procedure</span> p3()</span><br><span class="line"><span class="keyword">begin</span></span><br><span class="line"> # 先给一个默认值 <span class="number">58</span></span><br><span class="line"> <span class="keyword">declare</span> score <span class="type">int</span> <span class="keyword">default</span> <span class="number">58</span>;</span><br><span class="line"> <span class="keyword">declare</span> <span class="keyword">result</span> <span class="type">varchar</span>(<span class="number">10</span>);</span><br><span class="line"> if score <span class="operator">&gt;=</span> <span class="number">85</span> <span class="keyword">then</span></span><br><span class="line"> <span class="keyword">set</span> <span class="keyword">result</span> :<span class="operator">=</span> <span class="string">&#x27;优秀&#x27;</span>;</span><br><span class="line"> elseif score <span class="operator">&gt;=</span> <span class="number">60</span> <span class="keyword">then</span></span><br><span class="line"> <span class="keyword">set</span> <span class="keyword">result</span> :<span class="operator">=</span> <span class="string">&#x27;及格&#x27;</span>;</span><br><span class="line"> <span class="keyword">else</span></span><br><span class="line"> <span class="keyword">set</span> <span class="keyword">result</span> :<span class="operator">=</span> <span class="string">&#x27;不及格&#x27;</span>;</span><br><span class="line"> <span class="keyword">end</span> if;</span><br><span class="line"> #输出</span><br><span class="line"> <span class="keyword">select</span> <span class="keyword">result</span>;</span><br><span class="line"><span class="keyword">end</span> ;</span><br><span class="line"><span class="comment">-- 调用</span></span><br><span class="line"><span class="keyword">call</span> p3();</span><br></pre></td></tr></table></figure>
<h4 id="4-2-5-参数"><a href="#4-2-5-参数" class="headerlink" title="4.2.5 参数"></a>4.2.5 参数</h4><p><strong>介绍</strong></p>
<p>参数的类型主要分为以下三种IN、OUT、INOUT. 具体的含义如下:</p>
<p><img src="/pictures/image-20231006213944694.png" alt="image-20231006213944694"></p>
<p>语法</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">CREATE</span> <span class="keyword">PROCEDURE</span> 存储过程名称 ([ <span class="keyword">IN</span><span class="operator">/</span><span class="keyword">OUT</span><span class="operator">/</span><span class="keyword">INOUT</span> 参数名 参数类型 ])</span><br><span class="line"><span class="keyword">BEGIN</span></span><br><span class="line"> <span class="comment">-- SQL语句</span></span><br><span class="line"><span class="keyword">END</span> ;</span><br></pre></td></tr></table></figure>
<p><strong>案例</strong></p>
<p>1.根据传入的分数score变量判定当前分数对应的分数等级并返回</p>
<ul>
<li><p>score &gt;&#x3D; 85分等级为优秀</p>
</li>
<li><p>score &gt;&#x3D; 60分 且 score &lt; 85分等级为及格</p>
</li>
<li><p>score &lt; 60分等级为不及格</p>
</li>
</ul>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 参数</span></span><br><span class="line"><span class="comment">-- 1.根据传入的分数score变量判定当前分数对应的分数等级并返回</span></span><br><span class="line"><span class="comment">-- score &gt;= 85分等级为优秀</span></span><br><span class="line"><span class="comment">-- score &gt;= 60分 且 score &lt; 85分等级为及格</span></span><br><span class="line"><span class="comment">-- score &lt; 60分等级为不及格</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">procedure</span> p4(<span class="keyword">in</span> score <span class="type">int</span>, <span class="keyword">out</span> <span class="keyword">result</span> <span class="type">varchar</span>(<span class="number">10</span>))</span><br><span class="line"><span class="keyword">begin</span></span><br><span class="line"> if score <span class="operator">&gt;=</span> <span class="number">85</span> <span class="keyword">then</span></span><br><span class="line"> <span class="keyword">set</span> <span class="keyword">result</span> :<span class="operator">=</span> <span class="string">&#x27;优秀&#x27;</span>;</span><br><span class="line"> elseif score <span class="operator">&gt;=</span> <span class="number">60</span> <span class="keyword">then</span></span><br><span class="line"> <span class="keyword">set</span> <span class="keyword">result</span> :<span class="operator">=</span> <span class="string">&#x27;及格&#x27;</span>;</span><br><span class="line"> <span class="keyword">else</span></span><br><span class="line"> <span class="keyword">set</span> <span class="keyword">result</span> :<span class="operator">=</span> <span class="string">&#x27;不及格&#x27;</span>;</span><br><span class="line"> <span class="keyword">end</span> if;</span><br><span class="line"><span class="keyword">end</span> ;</span><br><span class="line"><span class="comment">-- 调用</span></span><br><span class="line"><span class="keyword">call</span> p4(<span class="number">88</span>,<span class="variable">@result</span>);</span><br><span class="line"><span class="comment">-- 查看结果</span></span><br><span class="line"><span class="keyword">select</span> <span class="variable">@result</span>;</span><br></pre></td></tr></table></figure>
<p>2.将传入的200分制的分数进行换算换成百分制然后返回</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="comment">-- 2.将传入的200分制的分数进行换算换成百分制然后返回</span></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">procedure</span> p5(<span class="keyword">inout</span> score <span class="keyword">double</span>)</span><br><span class="line"><span class="keyword">begin</span></span><br><span class="line"> <span class="keyword">set</span> score :<span class="operator">=</span> score <span class="operator">*</span> <span class="number">0.5</span>;</span><br><span class="line"><span class="keyword">end</span>;</span><br><span class="line"><span class="comment">-- 调用(score既是输入又是输出)</span></span><br><span class="line"><span class="keyword">set</span> <span class="variable">@score</span> <span class="operator">=</span> <span class="number">78</span>;</span><br><span class="line"><span class="keyword">call</span> p5(<span class="variable">@score</span>);</span><br><span class="line"><span class="keyword">select</span> <span class="variable">@score</span>;</span><br></pre></td></tr></table></figure>
<h4 id="4-2-6-case"><a href="#4-2-6-case" class="headerlink" title="4.2.6 case"></a>4.2.6 case</h4>]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>Mysql</tag>
</tags>
</entry>
<entry>
<title>OCR-图片文字识别</title>
<url>/posts/58456.html</url>
<content><![CDATA[<h2 id="一-什么是OCR"><a href="#一-什么是OCR" class="headerlink" title="一.什么是OCR"></a>一.什么是OCR</h2><p>OCR Optical Character Recognition光学字符识别是指电子设备例如扫描仪或数码相机检查纸上打印的字符通过检测暗、亮的模式确定其形状然后用字符识别方法将形状翻译成计算机文字的过程</p>
<table>
<thead>
<tr>
<th><strong>方案</strong></th>
<th><strong>说明</strong></th>
</tr>
</thead>
<tbody><tr>
<td>百度OCR</td>
<td>收费</td>
</tr>
<tr>
<td>Tesseract-OCR</td>
<td>Google维护的开源OCR引擎支持JavaPython等语言调用</td>
</tr>
<tr>
<td>Tess4J</td>
<td>封装了Tesseract-OCR 支持Java调用</td>
</tr>
</tbody></table>
<h2 id="二-Tesseract-OCR-的特点"><a href="#二-Tesseract-OCR-的特点" class="headerlink" title="二.Tesseract-OCR 的特点"></a>二.Tesseract-OCR 的特点</h2><ul>
<li><p>Tesseract支持UTF-8编码格式并且可以“开箱即用”地识别100多种语言</p>
</li>
<li><p>Tesseract支持多种输出格式纯文本hOCRHTMLPDF等</p>
</li>
<li><p>官方建议为了获得更好的OCR结果最好提供给高质量的图像</p>
</li>
<li><p>Tesseract进行识别其他语言的训练具体的训练方式请参考官方提供的文档<a href="https://tesseract-ocr.github.io/tessdoc/">https://tesseract-ocr.github.io/tessdoc/</a></p>
</li>
</ul>
<h2 id="三-使用案例"><a href="#三-使用案例" class="headerlink" title="三.使用案例"></a>三.使用案例</h2><h3 id="1-导入相关的依赖"><a href="#1-导入相关的依赖" class="headerlink" title="1.导入相关的依赖"></a>1.导入相关的依赖</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>net.sourceforge.tess4j<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>tess4j<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>4.1.1<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-导入中文字体库"><a href="#2-导入中文字体库" class="headerlink" title="2.导入中文字体库"></a>2.导入中文字体库</h3><p>地址: <a href="https://wwvc.lanzouj.com/iuPhc1h7j46f">https://wwvc.lanzouj.com/iuPhc1h7j46f</a></p>
<blockquote>
<p>chi_sim.traineddata</p>
</blockquote>
<p><img src="/pictures/image-20231208212352206.png" alt="image-20231208212352206"></p>
<h3 id="3-编写测试类进行测试"><a href="#3-编写测试类进行测试" class="headerlink" title="3.编写测试类进行测试"></a>3.编写测试类进行测试</h3><p><strong>待识别的图片</strong></p>
<p><img src="/pictures/image-20231208205943762.png" alt="image-20231208205943762"></p>
<p><strong>测试程序</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> net.sourceforge.tess4j.Tesseract;</span><br><span class="line"><span class="keyword">import</span> net.sourceforge.tess4j.TesseractException;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.File;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/12/8</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Main</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 识别图片中的文字</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> args</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> <span class="keyword">throws</span> TesseractException &#123;</span><br><span class="line"> <span class="comment">//创建实例</span></span><br><span class="line"> <span class="type">Tesseract</span> <span class="variable">tesseract</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Tesseract</span>();</span><br><span class="line"> <span class="comment">//设置字体库的路径</span></span><br><span class="line"> tesseract.setDatapath(<span class="string">&quot;C:\\Gong\\data\\tess4j&quot;</span>);</span><br><span class="line"> <span class="comment">//设置语言</span></span><br><span class="line"> <span class="comment">//字体库为chi_sim.traineddata,语言取.前面的内容,即文件名</span></span><br><span class="line"> <span class="comment">//简体中文</span></span><br><span class="line"> tesseract.setLanguage(<span class="string">&quot;chi_sim&quot;</span>);</span><br><span class="line"> <span class="comment">//识别图片</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">ocr</span> <span class="operator">=</span> tesseract.doOCR(<span class="keyword">new</span> <span class="title class_">File</span>(<span class="string">&quot;C:\\Gong\\data\\tess4j\\tess4j.png&quot;</span>));</span><br><span class="line"> <span class="comment">//打印识别的结果</span></span><br><span class="line"> <span class="comment">//打印的时候可以去除回车和tab空格</span></span><br><span class="line"> <span class="comment">//System.out.println(ocr.replaceAll(&quot;\\n|\\r&quot;,&quot;-&quot;));</span></span><br><span class="line"> System.out.println(ocr);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>识别的结果</strong></p>
<p><img src="/pictures/image-20231208211200859.png" alt="image-20231208211200859"></p>
<h2 id="四-封装成工具类使用"><a href="#四-封装成工具类使用" class="headerlink" title="四.封装成工具类使用"></a>四.封装成工具类使用</h2><h3 id="1-创建工具类"><a href="#1-创建工具类" class="headerlink" title="1.创建工具类"></a>1.创建工具类</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.common.tess4j;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.Getter;</span><br><span class="line"><span class="keyword">import</span> lombok.Setter;</span><br><span class="line"><span class="keyword">import</span> net.sourceforge.tess4j.ITesseract;</span><br><span class="line"><span class="keyword">import</span> net.sourceforge.tess4j.Tesseract;</span><br><span class="line"><span class="keyword">import</span> net.sourceforge.tess4j.TesseractException;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.context.properties.ConfigurationProperties;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Component;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.awt.image.BufferedImage;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Getter</span></span><br><span class="line"><span class="meta">@Setter</span></span><br><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="meta">@ConfigurationProperties(prefix = &quot;tess4j&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Tess4jClient</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String dataPath;</span><br><span class="line"> <span class="keyword">private</span> String language;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">doOCR</span><span class="params">(BufferedImage image)</span> <span class="keyword">throws</span> TesseractException &#123;</span><br><span class="line"> <span class="comment">//创建Tesseract对象</span></span><br><span class="line"> <span class="type">ITesseract</span> <span class="variable">tesseract</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Tesseract</span>();</span><br><span class="line"> <span class="comment">//设置字体库路径</span></span><br><span class="line"> tesseract.setDatapath(dataPath);</span><br><span class="line"> <span class="comment">//中文识别</span></span><br><span class="line"> tesseract.setLanguage(language);</span><br><span class="line"> <span class="comment">//执行ocr识别</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">result</span> <span class="operator">=</span> tesseract.doOCR(image);</span><br><span class="line"> <span class="comment">//替换回车和tal键 使结果为一行</span></span><br><span class="line"> result = result.replaceAll(<span class="string">&quot;\\r|\\n&quot;</span>, <span class="string">&quot;-&quot;</span>).replaceAll(<span class="string">&quot; &quot;</span>, <span class="string">&quot;&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span> result;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-配置文件中添加配置"><a href="#2-配置文件中添加配置" class="headerlink" title="2.配置文件中添加配置"></a>2.配置文件中添加配置</h3><figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">tess4j:</span></span><br><span class="line"> <span class="attr">data-path:</span> <span class="string">C:\workspace\tessdata</span> <span class="comment"># 字体库的路径</span></span><br><span class="line"> <span class="attr">language:</span> <span class="string">chi_sim</span> <span class="comment"># 识别的字体d</span></span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>OCR</tag>
</tags>
</entry>
<entry>
<title>SpringBoot整合EasyExcel</title>
<url>/posts/38823.html</url>
<content><![CDATA[<h2 id="1-EasyExcel介绍"><a href="#1-EasyExcel介绍" class="headerlink" title="1.EasyExcel介绍"></a>1.EasyExcel介绍</h2><p> Java解析、生成Excel比较有名的框架有Apache poi、jxl。但他们都存在一个严重的问题就是非常的耗内存poi有一套SAX模式的API可以一定程度的解决一些内存溢出的问题但POI还是有一些缺陷比如07版Excel解压缩以及解压后存储都是在内存中完成的内存消耗依然很大。easyexcel重写了poi对07版Excel的解析一个3M的excel用POI sax解析依然需要100M左右内存改用easyexcel可以降低到几M并且再大的excel也不会出现内存溢出03版依赖POI的sax模式在上层做了模型转换的封装让使用者更加简单方便</p>
<p>官网地址:<a href="https://easyexcel.opensource.alibaba.com/">https://easyexcel.opensource.alibaba.com/</a></p>
<h2 id="2-入门"><a href="#2-入门" class="headerlink" title="2.入门"></a>2.入门</h2><h3 id="2-1-引入依赖"><a href="#2-1-引入依赖" class="headerlink" title="2.1 引入依赖"></a>2.1 引入依赖</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!-- https://mvnrepository.com/artifact/com.alibaba/easyexcel --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.alibaba<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>easyexcel<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.1.1<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-2-创建与Excel表格对应的实体类并在属性上加上注解"><a href="#2-2-创建与Excel表格对应的实体类并在属性上加上注解" class="headerlink" title="2.2 创建与Excel表格对应的实体类并在属性上加上注解"></a>2.2 创建与Excel表格对应的实体类并在属性上加上注解</h3><p>不用自己设置excel表中的表头信息,easyexcel会帮我们设置</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> test;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.excel.annotation.ExcelProperty;</span><br><span class="line"><span class="keyword">import</span> lombok.AllArgsConstructor;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"><span class="keyword">import</span> lombok.NoArgsConstructor;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/14</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 与Excel表格对应的实体类</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@AllArgsConstructor</span></span><br><span class="line"><span class="meta">@NoArgsConstructor</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">UserData</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 注解中value 设置的是表头的信息</span></span><br><span class="line"><span class="comment"> * index 设置的是这个属性在excel表格中的索引位置 列索引</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"> <span class="meta">@ExcelProperty(value = &quot;用户编号&quot;, index = 0)</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> uid;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@ExcelProperty(value = &quot;用户名称&quot;, index = 1)</span></span><br><span class="line"> <span class="keyword">private</span> String username;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-3-读写操作"><a href="#2-3-读写操作" class="headerlink" title="2.3 读写操作"></a>2.3 读写操作</h3><h4 id="1-写操作"><a href="#1-写操作" class="headerlink" title="1.写操作"></a>1.写操作</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> test;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.excel.EasyExcel;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.ArrayList;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/14</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 测试对excel的操作</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">TestEasyExcel</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//设置excel文件的路径和名称</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">filename</span> <span class="operator">=</span> <span class="string">&quot;C:\\AlYun\\user.xlsx&quot;</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//构建一个数据的list集合,存放要保存在excel表中的数据</span></span><br><span class="line"> List&lt;UserData&gt; userDataList = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> userDataList.add(<span class="keyword">new</span> <span class="title class_">UserData</span>(<span class="number">1</span>,<span class="string">&quot;张三&quot;</span>));</span><br><span class="line"> userDataList.add(<span class="keyword">new</span> <span class="title class_">UserData</span>(<span class="number">2</span>,<span class="string">&quot;李四&quot;</span>));</span><br><span class="line"> userDataList.add(<span class="keyword">new</span> <span class="title class_">UserData</span>(<span class="number">3</span>,<span class="string">&quot;王五&quot;</span>));</span><br><span class="line"> userDataList.add(<span class="keyword">new</span> <span class="title class_">UserData</span>(<span class="number">4</span>,<span class="string">&quot;赵六&quot;</span>));</span><br><span class="line"></span><br><span class="line"> <span class="comment">//调用方法实现写的操作</span></span><br><span class="line"> EasyExcel.write(filename,UserData.class)</span><br><span class="line"> .sheet(<span class="string">&quot;用户信息&quot;</span>)</span><br><span class="line"> .doWrite(userDataList);</span><br><span class="line"> </span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>执行之后,空的excel表中会添加如下的数据</p>
<p><img src="/pictures/image-20230414131020923.png" alt="image-20230414131020923"></p>
<h4 id="2-读操作"><a href="#2-读操作" class="headerlink" title="2.读操作"></a>2.读操作</h4><h5 id="1-创建一个读操作的监听器"><a href="#1-创建一个读操作的监听器" class="headerlink" title="1 .创建一个读操作的监听器"></a>1 .创建一个读操作的监听器</h5><p>继承AnalysisEventListener<T> T表示实体类</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> test;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.excel.context.AnalysisContext;</span><br><span class="line"><span class="keyword">import</span> com.alibaba.excel.event.AnalysisEventListener;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/14</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 读操作的监听器</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ExcelLister</span> <span class="keyword">extends</span> <span class="title class_">AnalysisEventListener</span>&lt;UserData&gt; &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 一行一行的读取 从第二行开始读取</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">invoke</span><span class="params">(UserData data, AnalysisContext context)</span> &#123;</span><br><span class="line"> <span class="comment">//打印输出读取到的数据</span></span><br><span class="line"> System.out.println(data);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 读取之后执行</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">doAfterAllAnalysed</span><span class="params">(AnalysisContext context)</span> &#123;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 非必须实现的方法</span></span><br><span class="line"><span class="comment"> * 此方法可以读取表头的信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">invokeHeadMap</span><span class="params">(Map&lt;Integer, String&gt; headMap, AnalysisContext context)</span> &#123;</span><br><span class="line"> <span class="comment">//打印读取到的表头信息</span></span><br><span class="line"> System.out.println(<span class="string">&quot;表头信息:&quot;</span>+headMap);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h5 id="5-编写方法测试"><a href="#5-编写方法测试" class="headerlink" title="5.编写方法测试"></a>5.编写方法测试</h5><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> test;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.excel.EasyExcel;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/14</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">TestReadExcel</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//设置excel文件的路径和名称</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">filename</span> <span class="operator">=</span> <span class="string">&quot;C:\\AlYun\\user.xlsx&quot;</span>;</span><br><span class="line"> <span class="comment">//调用方法实现读取操作</span></span><br><span class="line"> <span class="comment">//new ExcelLister()自己创建的监听器</span></span><br><span class="line"> EasyExcel.read(filename,UserData.class,<span class="keyword">new</span> <span class="title class_">ExcelLister</span>())</span><br><span class="line"> .sheet()</span><br><span class="line"> .doRead();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="3-监听器中实现对数据库的操作"><a href="#3-监听器中实现对数据库的操作" class="headerlink" title="3.监听器中实现对数据库的操作"></a>3.监听器中实现对数据库的操作</h2><p>解决listener中无法操作数据库的问题</p>
<h3 id="3-1-通过构造器注入的方式"><a href="#3-1-通过构造器注入的方式" class="headerlink" title="3.1 通过构造器注入的方式"></a>3.1 通过构造器注入的方式</h3><p>在进行读操作创建Listener的时候,注入mapper</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.yygh.cmn.listener;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.excel.context.AnalysisContext;</span><br><span class="line"><span class="keyword">import</span> com.alibaba.excel.event.AnalysisEventListener;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.yygh.cmn.mapper.DictMapper;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.yygh.model.cmn.Dict;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.yygh.vo.cmn.DictEeVo;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.BeanUtils;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/14</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">DictListener</span> <span class="keyword">extends</span> <span class="title class_">AnalysisEventListener</span>&lt;DictEeVo&gt; &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> DictMapper dictMapper;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">DictListener</span><span class="params">(DictMapper dictMapper)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.dictMapper = dictMapper;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">invoke</span><span class="params">(DictEeVo data, AnalysisContext context)</span> &#123;</span><br><span class="line"> <span class="comment">//调用mapper 添加数据</span></span><br><span class="line"> <span class="type">Dict</span> <span class="variable">dict</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Dict</span>();</span><br><span class="line"> BeanUtils.copyProperties(data,dict);</span><br><span class="line"> dictMapper.insert(dict);</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">doAfterAllAnalysed</span><span class="params">(AnalysisContext context)</span> &#123;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h3 id="3-2-使用注解加属性注入的方式"><a href="#3-2-使用注解加属性注入的方式" class="headerlink" title="3.2 使用注解加属性注入的方式"></a>3.2 使用注解加属性注入的方式</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Component</span></span><br><span class="line"> +</span><br><span class="line"><span class="meta">@Autowired</span></span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>SpringBoot</tag>
</tags>
</entry>
<entry>
<title>SpringBoot整合Knife4j</title>
<url>/posts/855.html</url>
<content><![CDATA[<h2 id="1-介绍"><a href="#1-介绍" class="headerlink" title="1.介绍"></a>1.介绍</h2><p>一句话介绍Knife4j: Swagger的增强版界面更好看功能更加的丰富</p>
<p>文档地址:<a href="https://doc.xiaominfo.com/">https://doc.xiaominfo.com/</a></p>
<p><img src="/pictures/image-20230505222154471.png" alt="image-20230505222154471"></p>
<p><img src="/pictures/image-20230505223651097.png" alt="image-20230505223651097"></p>
<h2 id="2-使用教程"><a href="#2-使用教程" class="headerlink" title="2.使用教程"></a>2.使用教程</h2><h3 id="2-1-引入依赖"><a href="#2-1-引入依赖" class="headerlink" title="2.1 引入依赖"></a>2.1 引入依赖</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--引入Knife4j的官方start包,该指南选择Spring Boot版本&lt;3.0,开发者需要注意--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.github.xiaoymin<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>knife4j-openapi2-spring-boot-starter<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>4.0.0<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-2-编写配置类"><a href="#2-2-编写配置类" class="headerlink" title="2.2 编写配置类"></a>2.2 编写配置类</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.common.config.knife4j;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Bean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"><span class="keyword">import</span> springfox.documentation.builders.ApiInfoBuilder;</span><br><span class="line"><span class="keyword">import</span> springfox.documentation.builders.ParameterBuilder;</span><br><span class="line"><span class="keyword">import</span> springfox.documentation.builders.PathSelectors;</span><br><span class="line"><span class="keyword">import</span> springfox.documentation.builders.RequestHandlerSelectors;</span><br><span class="line"><span class="keyword">import</span> springfox.documentation.schema.ModelRef;</span><br><span class="line"><span class="keyword">import</span> springfox.documentation.service.ApiInfo;</span><br><span class="line"><span class="keyword">import</span> springfox.documentation.service.Contact;</span><br><span class="line"><span class="keyword">import</span> springfox.documentation.service.Parameter;</span><br><span class="line"><span class="keyword">import</span> springfox.documentation.spi.DocumentationType;</span><br><span class="line"><span class="keyword">import</span> springfox.documentation.spring.web.plugins.Docket;</span><br><span class="line"><span class="keyword">import</span> springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.ArrayList;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/5</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> knife4j配置信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="meta">@EnableSwagger2WebMvc</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Knife4jConfig</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> Docket <span class="title function_">adminApiConfig</span><span class="params">()</span>&#123;</span><br><span class="line"> List&lt;Parameter&gt; pars = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> <span class="type">ParameterBuilder</span> <span class="variable">tokenPar</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ParameterBuilder</span>();</span><br><span class="line"> tokenPar.name(<span class="string">&quot;token&quot;</span>)</span><br><span class="line"> .description(<span class="string">&quot;用户token&quot;</span>)</span><br><span class="line"> .defaultValue(<span class="string">&quot;&quot;</span>)</span><br><span class="line"> .modelRef(<span class="keyword">new</span> <span class="title class_">ModelRef</span>(<span class="string">&quot;string&quot;</span>))</span><br><span class="line"> .parameterType(<span class="string">&quot;header&quot;</span>)</span><br><span class="line"> .required(<span class="literal">false</span>)</span><br><span class="line"> .build();</span><br><span class="line"> pars.add(tokenPar.build());</span><br><span class="line"> <span class="comment">//添加head参数end</span></span><br><span class="line"></span><br><span class="line"> <span class="type">Docket</span> <span class="variable">adminApi</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Docket</span>(DocumentationType.SWAGGER_2)</span><br><span class="line"> .groupName(<span class="string">&quot;adminApi&quot;</span>)</span><br><span class="line"> .apiInfo(adminApiInfo())</span><br><span class="line"> .select()</span><br><span class="line"> <span class="comment">//只显示admin路径下的页面</span></span><br><span class="line"> .apis(RequestHandlerSelectors.basePackage(<span class="string">&quot;com.atguigu&quot;</span>))</span><br><span class="line"> .paths(PathSelectors.regex(<span class="string">&quot;/admin/.*&quot;</span>))</span><br><span class="line"> .build()</span><br><span class="line"> .globalOperationParameters(pars);</span><br><span class="line"> <span class="keyword">return</span> adminApi;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> ApiInfo <span class="title function_">adminApiInfo</span><span class="params">()</span>&#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">ApiInfoBuilder</span>()</span><br><span class="line"> .title(<span class="string">&quot;后台管理系统-API文档&quot;</span>)</span><br><span class="line"> .description(<span class="string">&quot;本文档描述了后台管理系统微服务接口定义&quot;</span>)</span><br><span class="line"> .version(<span class="string">&quot;1.0&quot;</span>)</span><br><span class="line"> .contact(<span class="keyword">new</span> <span class="title class_">Contact</span>(<span class="string">&quot;JasonGong&quot;</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;2602183349@qq.com&quot;</span>))</span><br><span class="line"> .build();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-3-使用"><a href="#2-3-使用" class="headerlink" title="2.3 使用"></a>2.3 使用</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.auth.controller;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.atguigu.auth.service.SysRoleService;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.common.result.Result;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.model.system.SysRole;</span><br><span class="line"><span class="keyword">import</span> io.swagger.annotations.Api;</span><br><span class="line"><span class="keyword">import</span> io.swagger.annotations.ApiOperation;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.CrossOrigin;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.GetMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RestController;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/5</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 角色的控制器方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Api(tags = &quot;角色管理的接口&quot;)</span></span><br><span class="line"><span class="meta">@RestController</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/admin/system/sysRole&quot;)</span></span><br><span class="line"><span class="meta">@CrossOrigin</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">SysRoleController</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> SysRoleService sysRoleService;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查询所有的方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@ApiOperation(&quot;查询所有角色的接口&quot;)</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/findAll&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> Result&lt;List&lt;SysRole&gt;&gt; <span class="title function_">findAll</span><span class="params">()</span>&#123;</span><br><span class="line"> List&lt;SysRole&gt; sysRoles = sysRoleService.list();</span><br><span class="line"> <span class="keyword">return</span> Result.ok(sysRoles);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-4接口文档的访问地址"><a href="#2-4接口文档的访问地址" class="headerlink" title="2.4接口文档的访问地址"></a>2.4接口文档的访问地址</h3><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line"># 端口号根据项目的端口号进行改变</span><br><span class="line">http://localhost:8080/doc.html </span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230505223433369.png" alt="image-20230505223433369"></p>
<p><img src="/pictures/image-20230505223331221.png"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>SpringBoot</tag>
</tags>
</entry>
<entry>
<title>SpringBoot整合MongoDB</title>
<url>/posts/12929.html</url>
<content><![CDATA[<h2 id="1-介绍"><a href="#1-介绍" class="headerlink" title="1.介绍"></a>1.介绍</h2><p> MongoDB是一个基于分布式文件存储的数据库。由C++语言编写。旨在为WEB应用提供可扩展的高性能数据存储解决方案。<br>MongoDB是一个介于关系数据库和非关系数据库之间的产品是非关系数据库当中功能最丰富最像关系数据库的。它支持的数据结构非常松散是类似json的bson格式因此可以存储比较复杂的数据类型。Mongo最大的特点是它支持的查询语言非常强大其语法有点类似于面向对象的查询语言几乎可以实现类似关系数据库单表查询的绝大部分功能而且还支持对数据建立索引。</p>
<p><strong>适用场景</strong><br>1、网站数据Mongo非常适合实时的插入更新与查询并具备网站实时数据存储所需的复制及高度伸缩性。<br>2、缓存由于性能很高Mongo也适合作为信息基础设施的缓存层。在系统重启之后由M ongo搭建的持久化缓存层可以避免下层的数据源过载。<br>3、大尺寸低价值的数据使用传统的关系型数据库存储一些数据时可能会比较昂贵 在此之前,很多时候程序员往往会选择传统的文件进行存储。<br>4、高伸缩性的场景Mongo非常适合由数十或数百台服务器组成的数据库。Mongo的路线图中已经包含对Map Reduce弓摩的内置支持。<br>5、用于对象及 JSON数据的存储Mongo的BSON数据格式非常适合文档化格式的存储 及查询。<br><strong>不适用场合</strong><br>1、高度事务性的系统例如银行或会计系统。传统的关系型数据库目前还是更适用于需要大量原子性复杂事务的应用程序。<br>2、传统的商业智能应用针对特定问题的BI数据库会对产生高度优化的查询方式。对于此类应用数据仓库可能是更合适的选择。 </p>
<p>中文文档:<a href="https://docs.mongoing.com/">https://docs.mongoing.com/</a></p>
<h2 id="2-入门"><a href="#2-入门" class="headerlink" title="2.入门"></a>2.入门</h2><p> spring-data-mongodb提供了MongoTemplate与MongoRepository两种方式访问mongodbMongoRepository操作简单MongoTemplate操作灵活我们在项目中可以灵活适用这两种方式操作mongodbMongoRepository的缺点是不够灵活MongoTemplate正好可以弥补不足</p>
<h3 id="2-1引入依赖"><a href="#2-1引入依赖" class="headerlink" title="2.1引入依赖"></a>2.1引入依赖</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-data-mongodb<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-2-配置文件中添加MongoDB的配置"><a href="#2-2-配置文件中添加MongoDB的配置" class="headerlink" title="2.2 配置文件中添加MongoDB的配置"></a>2.2 配置文件中添加MongoDB的配置</h3><figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring.data.mongodb.uri</span>=<span class="string">mongodb://localhost:27017/test</span></span><br></pre></td></tr></table></figure>
<h3 id="2-3-创建对应的实体类"><a href="#2-3-创建对应的实体类" class="headerlink" title="2.3 创建对应的实体类"></a>2.3 创建对应的实体类</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@Document(&quot;User&quot;)</span> <span class="comment">//指定实体类对应的MongoDB集合的名称</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">User</span> &#123;</span><br><span class="line"> <span class="meta">@Id</span> <span class="comment">//自动生成的主键ID</span></span><br><span class="line"> <span class="keyword">private</span> String id;</span><br><span class="line"> <span class="keyword">private</span> String name;</span><br><span class="line"> <span class="keyword">private</span> Integer age;</span><br><span class="line"> <span class="keyword">private</span> String email;</span><br><span class="line"> <span class="keyword">private</span> String createDate;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-4-常用的方法"><a href="#2-4-常用的方法" class="headerlink" title="2.4 常用的方法"></a>2.4 常用的方法</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//常用方法</span></span><br><span class="line">mongoTemplate.findAll(User.class); <span class="comment">//查询User文档的全部数据</span></span><br><span class="line">mongoTemplate.findById(&lt;id&gt;, User.class); <span class="comment">//查询User文档id为id的数据</span></span><br><span class="line">mongoTemplate.find(query, User.class); <span class="comment">//根据query内的查询条件查询</span></span><br><span class="line">mongoTemplate.upsert(query, update, User.class);<span class="comment">// 修改</span></span><br><span class="line">mongoTemplate.remove(query, User.class);<span class="comment">// 删除</span></span><br><span class="line">mongoTemplate.insert(User);<span class="comment">//新增</span></span><br></pre></td></tr></table></figure>
<figure class="highlight markdown"><table><tr><td class="code"><pre><span class="line">Query对象</span><br><span class="line">1、创建一个query对象用来封装所有条件对象)再创建一个criteria对象用来构建条件</span><br><span class="line"></span><br><span class="line">2、精准条件criteria.and(“key”).is(“条件”)</span><br><span class="line"> 模糊条件criteria.and(“key”).regex(“条件”)</span><br><span class="line"> </span><br><span class="line">3、封装条件query.addCriteria(criteria)</span><br><span class="line"></span><br><span class="line">4、大于创建新的criteriaCriteria gt = Criteria.where(“key”).gt“条件”</span><br><span class="line"> 小于创建新的criteriaCriteria lt = Criteria.where(“key”).lt“条件”</span><br><span class="line"> </span><br><span class="line">5、Query.addCriteria(new Criteria().andOperator(gt,lt));</span><br><span class="line"></span><br><span class="line">6、一个query中只能有一个andOperator() 其参数也可以是Criteria数组</span><br><span class="line"></span><br><span class="line">7、排序 query.withnew Sort(Sort.Direction.ASC, &quot;age&quot;). and(new Sort(Sort.Direction.DESC, &quot;date&quot;)))</span><br></pre></td></tr></table></figure>
<figure class="highlight markdown"><table><tr><td class="code"><pre><span class="line">主要注解:</span><br><span class="line"></span><br><span class="line">@Document文档是 MongoDB 中最基本的数据单元,由键值对组成,类似于 JSON 格式,可以存储不同字段,字段的值可以包括其他文档,数组和文档数组。</span><br><span class="line"></span><br><span class="line">@Id主键用来将成员变量的值映射为文档的<span class="emphasis">_id的值</span></span><br><span class="line"><span class="emphasis"></span></span><br><span class="line"><span class="emphasis">@Indexed索引 索引是一种特殊的数据结构存储在一个易于遍历读取的数据集合中能够对数据库文档中的数据进行排序。索引能极大提高文档查询效率如果没有设置索引MongoDB 会遍历集合中的整个文档,选取符合查询条件的文档记录。这种查询效率是非常低的。</span></span><br><span class="line"><span class="emphasis"></span></span><br><span class="line"><span class="emphasis">@Field字段 文档中的字段,类似于 MySql 中的列。</span></span><br><span class="line"><span class="emphasis"></span></span><br><span class="line"><span class="emphasis">@Aggregation聚合 聚合主要用于数据处理,例如统计平均值、求和等。</span></span><br></pre></td></tr></table></figure>
<p>示例代码</p>
<h4 id="2-4-1-使用MongoTemplate的方式访问MongoDB"><a href="#2-4-1-使用MongoTemplate的方式访问MongoDB" class="headerlink" title="2.4.1 使用MongoTemplate的方式访问MongoDB"></a>2.4.1 使用MongoTemplate的方式访问MongoDB</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@SpringBootTest</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">DemomogoApplicationTests</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> MongoTemplate mongoTemplate;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//添加</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">createUser</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">User</span> <span class="variable">user</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">User</span>();</span><br><span class="line"> user.setAge(<span class="number">20</span>);</span><br><span class="line"> user.setName(<span class="string">&quot;test&quot;</span>);</span><br><span class="line"> user.setEmail(<span class="string">&quot;4932200@qq.com&quot;</span>);</span><br><span class="line"> <span class="type">User</span> <span class="variable">user1</span> <span class="operator">=</span> mongoTemplate.insert(user);</span><br><span class="line"> System.out.println(user1);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//查询所有</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">findUser</span><span class="params">()</span> &#123;</span><br><span class="line"> List&lt;User&gt; userList = mongoTemplate.findAll(User.class);</span><br><span class="line"> System.out.println(userList);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//根据id查询</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">getById</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">User</span> <span class="variable">user</span> <span class="operator">=</span> </span><br><span class="line">mongoTemplate.findById(<span class="string">&quot;5ffbfa2ac290f356edf9b5aa&quot;</span>, User.class);</span><br><span class="line"> System.out.println(user);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//条件查询</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">findUserList</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">Query</span> <span class="variable">query</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Query</span>(Criteria</span><br><span class="line"> .where(<span class="string">&quot;name&quot;</span>).is(<span class="string">&quot;test&quot;</span>)</span><br><span class="line"> .and(<span class="string">&quot;age&quot;</span>).is(<span class="number">20</span>));</span><br><span class="line"> List&lt;User&gt; userList = mongoTemplate.find(query, User.class);</span><br><span class="line"> System.out.println(userList);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//模糊查询</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">findUsersLikeName</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">name</span> <span class="operator">=</span> <span class="string">&quot;est&quot;</span>;</span><br><span class="line"> <span class="type">String</span> <span class="variable">regex</span> <span class="operator">=</span> String.format(<span class="string">&quot;%s%s%s&quot;</span>, <span class="string">&quot;^.*&quot;</span>, name, <span class="string">&quot;.*$&quot;</span>);</span><br><span class="line"> <span class="type">Pattern</span> <span class="variable">pattern</span> <span class="operator">=</span> Pattern.compile(regex, Pattern.CASE_INSENSITIVE);</span><br><span class="line"> <span class="type">Query</span> <span class="variable">query</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Query</span>(Criteria.where(<span class="string">&quot;name&quot;</span>).regex(pattern));</span><br><span class="line"> List&lt;User&gt; userList = mongoTemplate.find(query, User.class);</span><br><span class="line"> System.out.println(userList);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//分页查询</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">findUsersPage</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">name</span> <span class="operator">=</span> <span class="string">&quot;est&quot;</span>;</span><br><span class="line"> <span class="type">int</span> <span class="variable">pageNo</span> <span class="operator">=</span> <span class="number">1</span>;</span><br><span class="line"> <span class="type">int</span> <span class="variable">pageSize</span> <span class="operator">=</span> <span class="number">10</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//分页查询的条件</span></span><br><span class="line"> <span class="type">Query</span> <span class="variable">query</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Query</span>();</span><br><span class="line"> <span class="type">String</span> <span class="variable">regex</span> <span class="operator">=</span> String.format(<span class="string">&quot;%s%s%s&quot;</span>, <span class="string">&quot;^.*&quot;</span>, name, <span class="string">&quot;.*$&quot;</span>);</span><br><span class="line"> <span class="type">Pattern</span> <span class="variable">pattern</span> <span class="operator">=</span> Pattern.compile(regex, Pattern.CASE_INSENSITIVE);</span><br><span class="line"> query.addCriteria(Criteria.where(<span class="string">&quot;name&quot;</span>).regex(pattern));</span><br><span class="line"> <span class="comment">//总记录数</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">totalCount</span> <span class="operator">=</span> (<span class="type">int</span>) mongoTemplate.count(query, User.class);</span><br><span class="line"> <span class="comment">//分页查询</span></span><br><span class="line"> List&lt;User&gt; userList = mongoTemplate.find(query.skip((pageNo - <span class="number">1</span>) * pageSize).limit(pageSize), User.class);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//将分页的总记录数和分页数据封装在一个map集合中</span></span><br><span class="line"> Map&lt;String, Object&gt; pageMap = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> pageMap.put(<span class="string">&quot;list&quot;</span>, userList);</span><br><span class="line"> pageMap.put(<span class="string">&quot;totalCount&quot;</span>,totalCount);</span><br><span class="line"> System.out.println(pageMap);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//修改</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">updateUser</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">User</span> <span class="variable">user</span> <span class="operator">=</span> mongoTemplate.findById(<span class="string">&quot;5ffbfa2ac290f356edf9b5aa&quot;</span>, User.class);</span><br><span class="line"> user.setName(<span class="string">&quot;test_1&quot;</span>);</span><br><span class="line"> user.setAge(<span class="number">25</span>);</span><br><span class="line"> user.setEmail(<span class="string">&quot;493220990@qq.com&quot;</span>);</span><br><span class="line"> <span class="type">Query</span> <span class="variable">query</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Query</span>(Criteria.where(<span class="string">&quot;_id&quot;</span>).is(user.getId()));</span><br><span class="line"> <span class="type">Update</span> <span class="variable">update</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Update</span>();</span><br><span class="line"> update.set(<span class="string">&quot;name&quot;</span>, user.getName());</span><br><span class="line"> update.set(<span class="string">&quot;age&quot;</span>, user.getAge());</span><br><span class="line"> update.set(<span class="string">&quot;email&quot;</span>, user.getEmail());</span><br><span class="line"> <span class="type">UpdateResult</span> <span class="variable">result</span> <span class="operator">=</span> mongoTemplate.upsert(query, update, User.class);</span><br><span class="line"> <span class="comment">//影响的行数</span></span><br><span class="line"> <span class="type">long</span> <span class="variable">count</span> <span class="operator">=</span> result.getModifiedCount();</span><br><span class="line"> System.out.println(count);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//删除操作</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">delete</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">Query</span> <span class="variable">query</span> <span class="operator">=</span> </span><br><span class="line"><span class="keyword">new</span> <span class="title class_">Query</span>(Criteria.where(<span class="string">&quot;_id&quot;</span>).is(<span class="string">&quot;5ffbfa2ac290f356edf9b5aa&quot;</span>));</span><br><span class="line"> <span class="type">DeleteResult</span> <span class="variable">result</span> <span class="operator">=</span> mongoTemplate.remove(query, User.class);</span><br><span class="line"> <span class="type">long</span> <span class="variable">count</span> <span class="operator">=</span> result.getDeletedCount();</span><br><span class="line"> System.out.println(count);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="2-4-2-使用MongoRepository的方式访问MongoDB"><a href="#2-4-2-使用MongoRepository的方式访问MongoDB" class="headerlink" title="2.4.2 使用MongoRepository的方式访问MongoDB"></a>2.4.2 使用MongoRepository的方式访问MongoDB</h4><h5 id="a-创建UserRepository类"><a href="#a-创建UserRepository类" class="headerlink" title="a.创建UserRepository类"></a>a.创建UserRepository类</h5><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.mongodb.repository;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.atguigu.mongodb.entity.User;</span><br><span class="line"><span class="keyword">import</span> org.springframework.data.mongodb.repository.MongoRepository;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Repository;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Repository</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">interface</span> <span class="title class_">UserRepository</span> <span class="keyword">extends</span> <span class="title class_">MongoRepository</span>&lt;User, String&gt; &#123;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h5 id="b-测试使用"><a href="#b-测试使用" class="headerlink" title="b.测试使用"></a>b.测试使用</h5><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@SpringBootTest</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">DemomogoApplicationTests1</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> UserRepository userRepository;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//添加</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">createUser</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">User</span> <span class="variable">user</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">User</span>();</span><br><span class="line"> user.setAge(<span class="number">20</span>);</span><br><span class="line"> user.setName(<span class="string">&quot;张三&quot;</span>);</span><br><span class="line"> user.setEmail(<span class="string">&quot;3332200@qq.com&quot;</span>);</span><br><span class="line"> <span class="type">User</span> <span class="variable">user1</span> <span class="operator">=</span> userRepository.save(user);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//查询所有</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">findUser</span><span class="params">()</span> &#123;</span><br><span class="line"> List&lt;User&gt; userList = userRepository.findAll();</span><br><span class="line"> System.out.println(userList);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//id查询</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">getById</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">User</span> <span class="variable">user</span> <span class="operator">=</span> userRepository.findById(<span class="string">&quot;5ffbfe8197f24a07007bd6ce&quot;</span>).get();</span><br><span class="line"> System.out.println(user);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//条件查询</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">findUserList</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//查询条件 名字是张三 年龄是20</span></span><br><span class="line"> <span class="type">User</span> <span class="variable">user</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">User</span>();</span><br><span class="line"> user.setName(<span class="string">&quot;张三&quot;</span>);</span><br><span class="line"> user.setAge(<span class="number">20</span>);</span><br><span class="line"> Example&lt;User&gt; userExample = Example.of(user);</span><br><span class="line"> List&lt;User&gt; userList = userRepository.findAll(userExample);</span><br><span class="line"> System.out.println(userList);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//模糊查询</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">findUsersLikeName</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//创建匹配器,即如何使用查询条件</span></span><br><span class="line"> <span class="type">ExampleMatcher</span> <span class="variable">matcher</span> <span class="operator">=</span> ExampleMatcher.matching() <span class="comment">//构建对象</span></span><br><span class="line"> .withStringMatcher(ExampleMatcher.StringMatcher.CONTAINING) <span class="comment">//改变默认字符串匹配方式:模糊查询</span></span><br><span class="line"> .withIgnoreCase(<span class="literal">true</span>); <span class="comment">//改变默认大小写忽略方式:忽略大小写</span></span><br><span class="line"> <span class="type">User</span> <span class="variable">user</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">User</span>();</span><br><span class="line"> user.setName(<span class="string">&quot;三&quot;</span>);</span><br><span class="line"> Example&lt;User&gt; userExample = Example.of(user, matcher);</span><br><span class="line"> List&lt;User&gt; userList = userRepository.findAll(userExample);</span><br><span class="line"> System.out.println(userList);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//分页查询</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">findUsersPage</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//根据年龄降序</span></span><br><span class="line"> <span class="type">Sort</span> <span class="variable">sort</span> <span class="operator">=</span> Sort.by(Sort.Direction.DESC, <span class="string">&quot;age&quot;</span>);</span><br><span class="line"> <span class="comment">//0为第一页</span></span><br><span class="line"> <span class="type">Pageable</span> <span class="variable">pageable</span> <span class="operator">=</span> PageRequest.of(<span class="number">0</span>, <span class="number">10</span>, sort);</span><br><span class="line"> <span class="comment">//创建匹配器,即如何使用查询条件</span></span><br><span class="line"> <span class="type">ExampleMatcher</span> <span class="variable">matcher</span> <span class="operator">=</span> ExampleMatcher.matching() <span class="comment">//构建对象</span></span><br><span class="line"> .withStringMatcher(ExampleMatcher.StringMatcher.CONTAINING) <span class="comment">//改变默认字符串匹配方式:模糊查询</span></span><br><span class="line"> .withIgnoreCase(<span class="literal">true</span>); <span class="comment">//改变默认大小写忽略方式:忽略大小写</span></span><br><span class="line"> <span class="type">User</span> <span class="variable">user</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">User</span>();</span><br><span class="line"> user.setName(<span class="string">&quot;三&quot;</span>);<span class="comment">//查询名字中包含 &#x27;三&#x27; 的数据</span></span><br><span class="line"> Example&lt;User&gt; userExample = Example.of(user, matcher);</span><br><span class="line"> <span class="comment">//创建实例</span></span><br><span class="line"> Example&lt;User&gt; example = Example.of(user, matcher);</span><br><span class="line"> Page&lt;User&gt; pages = userRepository.findAll(example, pageable);</span><br><span class="line"> System.out.println(pages);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//修改</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">updateUser</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">User</span> <span class="variable">user</span> <span class="operator">=</span> userRepository.findById(<span class="string">&quot;5ffbfe8197f24a07007bd6ce&quot;</span>).get();</span><br><span class="line"> user.setName(<span class="string">&quot;张三_1&quot;</span>);</span><br><span class="line"> user.setAge(<span class="number">25</span>);</span><br><span class="line"> user.setEmail(<span class="string">&quot;883220990@qq.com&quot;</span>);</span><br><span class="line"> <span class="type">User</span> <span class="variable">save</span> <span class="operator">=</span> userRepository.save(user);<span class="comment">//有id值就是修改 m</span></span><br><span class="line"> System.out.println(save);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//删除</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">delete</span><span class="params">()</span> &#123;</span><br><span class="line"> userRepository.deleteById(<span class="string">&quot;5ffbfe8197f24a07007bd6ce&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>SpringBoot</tag>
</tags>
</entry>
<entry>
<title>SpringBoot整合Logback日志</title>
<url>/posts/64205.html</url>
<content><![CDATA[<h2 id="1-创建一个SpringBoot的工程"><a href="#1-创建一个SpringBoot的工程" class="headerlink" title="1.创建一个SpringBoot的工程"></a>1.创建一个SpringBoot的工程</h2><h2 id="2-在resources目录下创建logback-spring-xml的配置文件"><a href="#2-在resources目录下创建logback-spring-xml的配置文件" class="headerlink" title="2.在resources目录下创建logback-spring.xml的配置文件"></a>2.在resources目录下创建logback-spring.xml的配置文件</h2><p>创建的时候要修改日志输出的路径</p>
<p>日志的级别根据需要自己修改</p>
<p>级别OFF、FATAL、ERROR、WARN、INFO、DEBUG、ALL</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;?xml version=<span class="string">&quot;1.0&quot;</span> encoding=<span class="string">&quot;UTF-8&quot;</span>?&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">configuration</span> <span class="attr">scan</span>=<span class="string">&quot;true&quot;</span> <span class="attr">scanPeriod</span>=<span class="string">&quot;10 seconds&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 日志级别从低到高分为TRACE &lt; DEBUG &lt; INFO &lt; WARN &lt; ERROR &lt; FATAL如果设置为WARN则低于WARN的信息都不会输出 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- scan:当此属性设置为true时配置文件如果发生改变将会被重新加载默认值为true --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- scanPeriod:设置监测配置文件是否有修改的时间间隔如果没有给出时间单位默认单位是毫秒。当scan为true时此属性生效。默认的时间间隔为1分钟。 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- de<span class="doctag">bug:</span>当此属性设置为true时将打印出logback内部日志信息实时查看logback运行状态。默认值为false。 --&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">contextName</span>&gt;</span>logback<span class="tag">&lt;/<span class="name">contextName</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- name的值是变量的名称value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后可以使“$&#123;&#125;”来使用变量。 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">property</span> <span class="attr">name</span>=<span class="string">&quot;log.path&quot;</span> <span class="attr">value</span>=<span class="string">&quot;C:/AlYun/log&quot;</span> /&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- 彩色日志 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 配置格式变量CONSOLE_LOG_PATTERN 彩色日志格式 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- magenta:洋红 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- boldMagenta:粗红--&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- cyan:青色 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- white:白色 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- magenta:洋红 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">property</span> <span class="attr">name</span>=<span class="string">&quot;CONSOLE_LOG_PATTERN&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">value</span>=<span class="string">&quot;%yellow(%date&#123;yyyy-MM-dd HH:mm:ss&#125;) |%highlight(%-5level) |%blue(%thread) |%blue(%file:%line) |%green(%logger) |%cyan(%msg%n)&quot;</span>/&gt;</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!--输出到控制台--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender</span> <span class="attr">name</span>=<span class="string">&quot;CONSOLE&quot;</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.ConsoleAppender&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--此日志appender是为开发使用只配置最底级别控制台输出的日志级别是大于或等于此级别的日志信息--&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 例如如果此处配置了INFO级别则后面其他位置即使配置了DEBUG级别的日志也不会被输出 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">filter</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.classic.filter.ThresholdFilter&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">level</span>&gt;</span>INFO<span class="tag">&lt;/<span class="name">level</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">filter</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">encoder</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">Pattern</span>&gt;</span>$&#123;CONSOLE_LOG_PATTERN&#125;<span class="tag">&lt;/<span class="name">Pattern</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 设置字符集 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">charset</span>&gt;</span>UTF-8<span class="tag">&lt;/<span class="name">charset</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">encoder</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">appender</span>&gt;</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!--输出到文件--&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- 时间滚动输出 level为 INFO 日志 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender</span> <span class="attr">name</span>=<span class="string">&quot;INFO_FILE&quot;</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.rolling.RollingFileAppender&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 正在记录的日志文件的路径及文件名 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">file</span>&gt;</span>$&#123;log.path&#125;/log_info.log<span class="tag">&lt;/<span class="name">file</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--日志文件输出格式--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">encoder</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">pattern</span>&gt;</span>%d&#123;yyyy-MM-dd HH:mm:ss.SSS&#125; [%thread] %-5level %logger&#123;50&#125; - %msg%n<span class="tag">&lt;/<span class="name">pattern</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">charset</span>&gt;</span>UTF-8<span class="tag">&lt;/<span class="name">charset</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">encoder</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 日志记录器的滚动策略,按日期,按大小记录 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">rollingPolicy</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.rolling.TimeBasedRollingPolicy&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 每天日志归档路径以及格式 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">fileNamePattern</span>&gt;</span>$&#123;log.path&#125;/info/log-info-%d&#123;yyyy-MM-dd&#125;.%i.log<span class="tag">&lt;/<span class="name">fileNamePattern</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">timeBasedFileNamingAndTriggeringPolicy</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">maxFileSize</span>&gt;</span>100MB<span class="tag">&lt;/<span class="name">maxFileSize</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">timeBasedFileNamingAndTriggeringPolicy</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--日志文件保留天数--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">maxHistory</span>&gt;</span>15<span class="tag">&lt;/<span class="name">maxHistory</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">rollingPolicy</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 此日志文件只记录info级别的 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">filter</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.classic.filter.LevelFilter&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">level</span>&gt;</span>INFO<span class="tag">&lt;/<span class="name">level</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">onMatch</span>&gt;</span>ACCEPT<span class="tag">&lt;/<span class="name">onMatch</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">onMismatch</span>&gt;</span>DENY<span class="tag">&lt;/<span class="name">onMismatch</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">filter</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">appender</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- 时间滚动输出 level为 WARN 日志 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender</span> <span class="attr">name</span>=<span class="string">&quot;WARN_FILE&quot;</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.rolling.RollingFileAppender&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 正在记录的日志文件的路径及文件名 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">file</span>&gt;</span>$&#123;log.path&#125;/log_warn.log<span class="tag">&lt;/<span class="name">file</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--日志文件输出格式--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">encoder</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">pattern</span>&gt;</span>%d&#123;yyyy-MM-dd HH:mm:ss.SSS&#125; [%thread] %-5level %logger&#123;50&#125; - %msg%n<span class="tag">&lt;/<span class="name">pattern</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">charset</span>&gt;</span>UTF-8<span class="tag">&lt;/<span class="name">charset</span>&gt;</span> <span class="comment">&lt;!-- 此处设置字符集 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">encoder</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 日志记录器的滚动策略,按日期,按大小记录 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">rollingPolicy</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.rolling.TimeBasedRollingPolicy&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">fileNamePattern</span>&gt;</span>$&#123;log.path&#125;/warn/log-warn-%d&#123;yyyy-MM-dd&#125;.%i.log<span class="tag">&lt;/<span class="name">fileNamePattern</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">timeBasedFileNamingAndTriggeringPolicy</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">maxFileSize</span>&gt;</span>100MB<span class="tag">&lt;/<span class="name">maxFileSize</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">timeBasedFileNamingAndTriggeringPolicy</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--日志文件保留天数--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">maxHistory</span>&gt;</span>15<span class="tag">&lt;/<span class="name">maxHistory</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">rollingPolicy</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 此日志文件只记录warn级别的 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">filter</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.classic.filter.LevelFilter&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">level</span>&gt;</span>warn<span class="tag">&lt;/<span class="name">level</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">onMatch</span>&gt;</span>ACCEPT<span class="tag">&lt;/<span class="name">onMatch</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">onMismatch</span>&gt;</span>DENY<span class="tag">&lt;/<span class="name">onMismatch</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">filter</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">appender</span>&gt;</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- 时间滚动输出 level为 ERROR 日志 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender</span> <span class="attr">name</span>=<span class="string">&quot;ERROR_FILE&quot;</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.rolling.RollingFileAppender&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 正在记录的日志文件的路径及文件名 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">file</span>&gt;</span>$&#123;log.path&#125;/log_error.log<span class="tag">&lt;/<span class="name">file</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--日志文件输出格式--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">encoder</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">pattern</span>&gt;</span>%d&#123;yyyy-MM-dd HH:mm:ss.SSS&#125; [%thread] %-5level %logger&#123;50&#125; - %msg%n<span class="tag">&lt;/<span class="name">pattern</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">charset</span>&gt;</span>UTF-8<span class="tag">&lt;/<span class="name">charset</span>&gt;</span> <span class="comment">&lt;!-- 此处设置字符集 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">encoder</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 日志记录器的滚动策略,按日期,按大小记录 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">rollingPolicy</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.rolling.TimeBasedRollingPolicy&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">fileNamePattern</span>&gt;</span>$&#123;log.path&#125;/error/log-error-%d&#123;yyyy-MM-dd&#125;.%i.log<span class="tag">&lt;/<span class="name">fileNamePattern</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">timeBasedFileNamingAndTriggeringPolicy</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">maxFileSize</span>&gt;</span>100MB<span class="tag">&lt;/<span class="name">maxFileSize</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">timeBasedFileNamingAndTriggeringPolicy</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--日志文件保留天数--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">maxHistory</span>&gt;</span>15<span class="tag">&lt;/<span class="name">maxHistory</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">rollingPolicy</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 此日志文件只记录ERROR级别的 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">filter</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.classic.filter.LevelFilter&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">level</span>&gt;</span>ERROR<span class="tag">&lt;/<span class="name">level</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">onMatch</span>&gt;</span>ACCEPT<span class="tag">&lt;/<span class="name">onMatch</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">onMismatch</span>&gt;</span>DENY<span class="tag">&lt;/<span class="name">onMismatch</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">filter</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">appender</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment"> &lt;logger&gt;用来设置某一个包或者具体的某一个类的日志打印级别、以及指定&lt;appender&gt;。</span></span><br><span class="line"><span class="comment"> &lt;logger&gt;仅有一个name属性</span></span><br><span class="line"><span class="comment"> 一个可选的level和一个可选的addtivity属性。</span></span><br><span class="line"><span class="comment"> name:用来指定受此logger约束的某一个包或者具体的某一个类。</span></span><br><span class="line"><span class="comment"> level:用来设置打印级别大小写无关TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF</span></span><br><span class="line"><span class="comment"> 如果未设置此属性那么当前logger将会继承上级的级别。</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment"> 使用mybatis的时候sql语句是debug下才会打印而这里我们只配置了info所以想要查看sql语句的话有以下两种操作</span></span><br><span class="line"><span class="comment"> 第一种把&lt;root level=&quot;INFO&quot;&gt;改成&lt;root level=&quot;DEBUG&quot;&gt;这样就会打印sql不过这样日志那边会出现很多其他消息</span></span><br><span class="line"><span class="comment"> 第二种就是单独给mapper下目录配置DEBUG模式代码如下这样配置sql语句会打印其他还是正常DEBUG级别</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--开发环境:打印控制台--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">springProfile</span> <span class="attr">name</span>=<span class="string">&quot;dev&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--可以输出项目中的debug日志包括mybatis的sql日志--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">logger</span> <span class="attr">name</span>=<span class="string">&quot;com.guli&quot;</span> <span class="attr">level</span>=<span class="string">&quot;INFO&quot;</span> /&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment"> root节点是必选节点用来指定最基础的日志输出级别只有一个level属性</span></span><br><span class="line"><span class="comment"> level:用来设置打印级别大小写无关TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF默认是DEBUG</span></span><br><span class="line"><span class="comment"> 可以包含零个或多个appender元素。</span></span><br><span class="line"><span class="comment"> --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">root</span> <span class="attr">level</span>=<span class="string">&quot;INFO&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;CONSOLE&quot;</span> /&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;INFO_FILE&quot;</span> /&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;WARN_FILE&quot;</span> /&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;ERROR_FILE&quot;</span> /&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">root</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">springProfile</span>&gt;</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!--生产环境:输出到文件--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">springProfile</span> <span class="attr">name</span>=<span class="string">&quot;pro&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">root</span> <span class="attr">level</span>=<span class="string">&quot;INFO&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;CONSOLE&quot;</span> /&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;DEBUG_FILE&quot;</span> /&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;INFO_FILE&quot;</span> /&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;ERROR_FILE&quot;</span> /&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;WARN_FILE&quot;</span> /&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">root</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">springProfile</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">configuration</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h2 id="3-日志的样式如下图所示"><a href="#3-日志的样式如下图所示" class="headerlink" title="3.日志的样式如下图所示"></a>3.日志的样式如下图所示</h2><p><img src="/pictures/image-20230412171350769.png" alt="image-20230412171350769"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>SpringBoot</tag>
</tags>
</entry>
<entry>
<title>SpringCloud相关资料</title>
<url>/posts/62429.html</url>
<content><![CDATA[<h1 id="SpringCloud相关资料"><a href="#SpringCloud相关资料" class="headerlink" title="SpringCloud相关资料"></a>SpringCloud相关资料</h1><h2 id="一-Eureka注册中心、Ribbon负载均衡、Nacos注册中心"><a href="#一-Eureka注册中心、Ribbon负载均衡、Nacos注册中心" class="headerlink" title="一.Eureka注册中心、Ribbon负载均衡、Nacos注册中心"></a>一.Eureka注册中心、Ribbon负载均衡、Nacos注册中心</h2>
<div class="row">
<embed src="/pdf/SpringCloud01.pdf" width="100%" height="550" type="application/pdf">
</div>
<h2 id="二-Nacos配置中心、Feign远程调用、Gateway服务网关"><a href="#二-Nacos配置中心、Feign远程调用、Gateway服务网关" class="headerlink" title="二.Nacos配置中心、Feign远程调用、Gateway服务网关"></a>二.Nacos配置中心、Feign远程调用、Gateway服务网关</h2>
<div class="row">
<embed src="/pdf/SpringCloud02.pdf" width="100%" height="550" type="application/pdf">
</div>
<h2 id="三-Docker容器化技术"><a href="#三-Docker容器化技术" class="headerlink" title="三.Docker容器化技术"></a>三.Docker容器化技术</h2>
<div class="row">
<embed src="/pdf/Docker实用篇.pdf" width="100%" height="550" type="application/pdf">
</div>
<h2 id="四-RabbitMQ"><a href="#四-RabbitMQ" class="headerlink" title="四.RabbitMQ"></a>四.RabbitMQ</h2>
<div class="row">
<embed src="/pdf/RabbitMQ.pdf" width="100%" height="550" type="application/pdf">
</div>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>SpringCloud</tag>
</tags>
</entry>
<entry>
<title>SpringBoot整合Redis</title>
<url>/posts/13813.html</url>
<content><![CDATA[<h2 id="1-Redis的介绍"><a href="#1-Redis的介绍" class="headerlink" title="1.Redis的介绍"></a>1.Redis的介绍</h2><p> Redis是一个开源BSD许可内存存储的数据结构服务器可用作数据库高速缓存和消息队列代理。它支持字符串、哈希表、列表、集合、有序集合位图hyperloglogs等数据类型。内置复制、Lua脚本、LRU收回、事务以及不同级别磁盘持久化功能同时通过Redis Sentinel提供高可用通过Redis Cluster提供自动分区。</p>
<p>中文文档:<a href="https://www.redis.net.cn/">https://www.redis.net.cn/</a></p>
<h2 id="2-入门"><a href="#2-入门" class="headerlink" title="2.入门"></a>2.入门</h2><h3 id="2-1-引入依赖"><a href="#2-1-引入依赖" class="headerlink" title="2.1 引入依赖"></a>2.1 引入依赖</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!-- redis --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-data-redis<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">&lt;!-- spring2.X集成redis所需common-pool2--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.apache.commons<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>commons-pool2<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.6.0<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span> </span><br></pre></td></tr></table></figure>
<h3 id="2-2-添加配置类"><a href="#2-2-添加配置类" class="headerlink" title="2.2 添加配置类"></a>2.2 添加配置类</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.yygh.common.config;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.fasterxml.jackson.annotation.JsonAutoDetect;</span><br><span class="line"><span class="keyword">import</span> com.fasterxml.jackson.annotation.PropertyAccessor;</span><br><span class="line"><span class="keyword">import</span> com.fasterxml.jackson.databind.ObjectMapper;</span><br><span class="line"><span class="keyword">import</span> org.springframework.cache.CacheManager;</span><br><span class="line"><span class="keyword">import</span> org.springframework.cache.annotation.EnableCaching;</span><br><span class="line"><span class="keyword">import</span> org.springframework.cache.interceptor.KeyGenerator;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Bean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"><span class="keyword">import</span> org.springframework.data.redis.cache.RedisCacheConfiguration;</span><br><span class="line"><span class="keyword">import</span> org.springframework.data.redis.cache.RedisCacheManager;</span><br><span class="line"><span class="keyword">import</span> org.springframework.data.redis.connection.RedisConnectionFactory;</span><br><span class="line"><span class="keyword">import</span> org.springframework.data.redis.core.RedisTemplate;</span><br><span class="line"><span class="keyword">import</span> org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;</span><br><span class="line"><span class="keyword">import</span> org.springframework.data.redis.serializer.RedisSerializationContext;</span><br><span class="line"><span class="keyword">import</span> org.springframework.data.redis.serializer.RedisSerializer;</span><br><span class="line"><span class="keyword">import</span> org.springframework.data.redis.serializer.StringRedisSerializer;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.lang.reflect.Method;</span><br><span class="line"><span class="keyword">import</span> java.time.Duration;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/14</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="meta">@EnableCaching</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">RedisConfig</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 自定义key规则</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> KeyGenerator <span class="title function_">keyGenerator</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">KeyGenerator</span>() &#123;</span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> Object <span class="title function_">generate</span><span class="params">(Object target, Method method, Object... params)</span> &#123;</span><br><span class="line"> <span class="type">StringBuilder</span> <span class="variable">sb</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">StringBuilder</span>();</span><br><span class="line"> sb.append(target.getClass().getName());</span><br><span class="line"> sb.append(method.getName());</span><br><span class="line"> <span class="keyword">for</span> (Object obj : params) &#123;</span><br><span class="line"> sb.append(obj.toString());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> sb.toString();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 设置RedisTemplate规则</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> RedisTemplate&lt;Object, Object&gt; <span class="title function_">redisTemplate</span><span class="params">(RedisConnectionFactory redisConnectionFactory)</span> &#123;</span><br><span class="line"> RedisTemplate&lt;Object, Object&gt; redisTemplate = <span class="keyword">new</span> <span class="title class_">RedisTemplate</span>&lt;&gt;();</span><br><span class="line"> redisTemplate.setConnectionFactory(redisConnectionFactory);</span><br><span class="line"> <span class="type">Jackson2JsonRedisSerializer</span> <span class="variable">jackson2JsonRedisSerializer</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Jackson2JsonRedisSerializer</span>(Object.class);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//解决查询缓存转换异常的问题</span></span><br><span class="line"> <span class="type">ObjectMapper</span> <span class="variable">om</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ObjectMapper</span>();</span><br><span class="line"> <span class="comment">// 指定要序列化的域field,get和set,以及修饰符范围ANY是都有包括private和public</span></span><br><span class="line"> om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);</span><br><span class="line"> <span class="comment">// 指定序列化输入的类型类必须是非final修饰的final修饰的类比如String,Integer等会跑出异常</span></span><br><span class="line"> om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);</span><br><span class="line"> jackson2JsonRedisSerializer.setObjectMapper(om);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//序列号key value</span></span><br><span class="line"> redisTemplate.setKeySerializer(<span class="keyword">new</span> <span class="title class_">StringRedisSerializer</span>());</span><br><span class="line"> redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);</span><br><span class="line"> redisTemplate.setHashKeySerializer(<span class="keyword">new</span> <span class="title class_">StringRedisSerializer</span>());</span><br><span class="line"> redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer);</span><br><span class="line"></span><br><span class="line"> redisTemplate.afterPropertiesSet();</span><br><span class="line"> <span class="keyword">return</span> redisTemplate;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 设置CacheManager缓存规则</span></span><br><span class="line"><span class="comment"> * 缓存的时间</span></span><br><span class="line"><span class="comment"> * 乱码的处理</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> CacheManager <span class="title function_">cacheManager</span><span class="params">(RedisConnectionFactory factory)</span> &#123;</span><br><span class="line"> RedisSerializer&lt;String&gt; redisSerializer = <span class="keyword">new</span> <span class="title class_">StringRedisSerializer</span>();</span><br><span class="line"> <span class="type">Jackson2JsonRedisSerializer</span> <span class="variable">jackson2JsonRedisSerializer</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Jackson2JsonRedisSerializer</span>(Object.class);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//解决查询缓存转换异常的问题</span></span><br><span class="line"> <span class="type">ObjectMapper</span> <span class="variable">om</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ObjectMapper</span>();</span><br><span class="line"> om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);</span><br><span class="line"> om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);</span><br><span class="line"> jackson2JsonRedisSerializer.setObjectMapper(om);</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 配置序列化(解决乱码的问题),过期时间600秒</span></span><br><span class="line"> <span class="type">RedisCacheConfiguration</span> <span class="variable">config</span> <span class="operator">=</span> RedisCacheConfiguration.defaultCacheConfig()</span><br><span class="line"> .entryTtl(Duration.ofSeconds(<span class="number">600</span>))</span><br><span class="line"> .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer))</span><br><span class="line"> .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(jackson2JsonRedisSerializer))</span><br><span class="line"> .disableCachingNullValues();</span><br><span class="line"></span><br><span class="line"> <span class="type">RedisCacheManager</span> <span class="variable">cacheManager</span> <span class="operator">=</span> RedisCacheManager.builder(factory)</span><br><span class="line"> .cacheDefaults(config)</span><br><span class="line"> .build();</span><br><span class="line"> <span class="keyword">return</span> cacheManager;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>说明:<br> @EnableCaching标记注解 @EnableCaching开启缓存并配置Redis缓存管理器。@EnableCaching 注释触发后置处理器, 检查每一个Spring bean 的 public 方法是否存在缓存注解。如果找到这样的一个注释, 自动创建一个代理拦截方法调用和处理相应的缓存行为。</p>
<h3 id="2-3-配置文件中加入redis的配置"><a href="#2-3-配置文件中加入redis的配置" class="headerlink" title="2.3 配置文件中加入redis的配置"></a>2.3 配置文件中加入redis的配置</h3><p>application.properties</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring.redis.host</span>=<span class="string">localhost</span></span><br><span class="line"><span class="attr">spring.redis.port</span>=<span class="string">6379</span></span><br><span class="line"><span class="attr">spring.redis.database</span>= <span class="string">0</span></span><br><span class="line"><span class="attr">spring.redis.timeout</span>=<span class="string">1800000</span></span><br><span class="line"></span><br><span class="line"><span class="attr">spring.redis.lettuce.pool.max-active</span>=<span class="string">20</span></span><br><span class="line"><span class="attr">spring.redis.lettuce.pool.max-wait</span>=<span class="string">-1</span></span><br><span class="line"><span class="comment">#最大阻塞等待时间(负数表示没限制)</span></span><br><span class="line"><span class="attr">spring.redis.lettuce.pool.max-idle</span>=<span class="string">5</span></span><br><span class="line"><span class="attr">spring.redis.lettuce.pool.min-idle</span>=<span class="string">0</span></span><br></pre></td></tr></table></figure>
<h3 id="2-4-使用Spring-Cache-Redis执行缓存操作"><a href="#2-4-使用Spring-Cache-Redis执行缓存操作" class="headerlink" title="2.4 使用Spring Cache + Redis执行缓存操作"></a>2.4 使用Spring Cache + Redis执行缓存操作</h3><h4 id="2-1-2-Cacheable"><a href="#2-1-2-Cacheable" class="headerlink" title="2.1.2 @Cacheable"></a>2.1.2 @Cacheable</h4><p> 根据方法对其返回结果进行缓存,下次请求时,如果缓存存在,则直接读取缓存数据返回;如果缓存不存在,则执行方法,并把返回的结果存入缓存中。一般用在查询方法上。</p>
<table>
<thead>
<tr>
<th>属性&#x2F;方法名</th>
<th>解释</th>
</tr>
</thead>
<tbody><tr>
<td>value</td>
<td>缓存名,必填,它指定了你的缓存存放在哪块命名空间</td>
</tr>
<tr>
<td>cacheNames</td>
<td>与 value 差不多,二选一即可</td>
</tr>
<tr>
<td>key</td>
<td>可选属性,可以使用 SpEL 标签自定义缓存的key</td>
</tr>
</tbody></table>
<h4 id="2-1-2-CachePut"><a href="#2-1-2-CachePut" class="headerlink" title="2.1.2 @CachePut"></a>2.1.2 @CachePut</h4><p> 使用该注解标志的方法,每次都会执行,并将结果存入指定的缓存中。其他方法可以直接从响应的缓存中读取缓存数据,而不需要再去查询数据库。一般用在新增方法上。</p>
<table>
<thead>
<tr>
<th>属性&#x2F;方法名</th>
<th>解释</th>
</tr>
</thead>
<tbody><tr>
<td>value</td>
<td>缓存名,必填,它指定了你的缓存存放在哪块命名空间</td>
</tr>
<tr>
<td>cacheNames</td>
<td>与 value 差不多,二选一即可</td>
</tr>
<tr>
<td>key</td>
<td>可选属性,可以使用 SpEL 标签自定义缓存的key</td>
</tr>
</tbody></table>
<h4 id="2-1-3-CacheEvict"><a href="#2-1-3-CacheEvict" class="headerlink" title="2.1.3 @CacheEvict"></a>2.1.3 @CacheEvict</h4><p> 使用该注解标志的方法,会清空指定的缓存。一般用在更新或者删除方法上</p>
<table>
<thead>
<tr>
<th>属性&#x2F;方法名</th>
<th>解释</th>
</tr>
</thead>
<tbody><tr>
<td>value</td>
<td>缓存名,必填,它指定了你的缓存存放在哪块命名空间</td>
</tr>
<tr>
<td>cacheNames</td>
<td>与 value 差不多,二选一即可</td>
</tr>
<tr>
<td>key</td>
<td>可选属性,可以使用 SpEL 标签自定义缓存的key</td>
</tr>
<tr>
<td>allEntries</td>
<td>是否清空所有缓存,默认为 false。如果指定为 true则方法调用后将立即清空所有的缓存</td>
</tr>
<tr>
<td>beforeInvocation</td>
<td>是否在方法执行前就清空,默认为 false。如果指定为 true则在方法执行前就会清空缓存</td>
</tr>
</tbody></table>
<h2 id="3-示例"><a href="#3-示例" class="headerlink" title="3.示例"></a>3.示例</h2><p>下面的第一个方法是查询数据位list集合</p>
<p> @Cacheable(value &#x3D; “dict”,keyGenerator &#x3D; “keyGenerator”) 对方法的结果进行缓存</p>
<p> value属性表示key的前缀 </p>
<p> keyGenerator表示key的生成规则生成规则在配置文件中配置这里我们使用的是方法的全类名作为key的后缀</p>
<p>第二个方法是添加数据 添加数据会造成数据库中数据的变化 我们要清除缓存</p>
<p> @CacheEvict(value &#x3D; “dict”,allEntries &#x3D; true) 清空指定的缓存</p>
<p> value属性表示清空以dict为前缀的所有缓存</p>
<p> allEntries 属性表示是否清空所有缓存,默认为 false。如果指定为 true则方法调用后将立即清空所有的缓存 </p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="meta">@Cacheable(value = &quot;dict&quot;,keyGenerator = &quot;keyGenerator&quot;)</span></span><br><span class="line"><span class="keyword">public</span> List&lt;Dict&gt; <span class="title function_">findByParentId</span><span class="params">(Long parentId)</span> &#123;</span><br><span class="line"> LambdaQueryWrapper&lt;Dict&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> queryWrapper.eq(Dict::getParentId, parentId);</span><br><span class="line"> List&lt;Dict&gt; dictList = dictMapper.selectList(queryWrapper);</span><br><span class="line"> <span class="keyword">for</span> (Dict dict : dictList) &#123;</span><br><span class="line"> dict.setHasChildren(<span class="built_in">this</span>.isHasChildren(dict.getId()));</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> dictList;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="meta">@CacheEvict(value = &quot;dict&quot;,allEntries = true)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">importDictData</span><span class="params">(MultipartFile file)</span> &#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> EasyExcel.read(file.getInputStream(),DictEeVo.class,<span class="keyword">new</span> <span class="title class_">DictListener</span>(dictMapper)).sheet().doRead();</span><br><span class="line"> &#125; <span class="keyword">catch</span> (IOException e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>key的生成规则如下图:</p>
<p><img src="/pictures/image-20230414152035347.png" alt="image-20230414152035347"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>SpringBoot</tag>
</tags>
</entry>
<entry>
<title>Thymeleaf教程</title>
<url>/posts/54835.html</url>
<content><![CDATA[<p>Thymeleaf 是一个服务器端 Java 模板引擎,能够处理 HTML、XML、CSS、JAVASCRIPT 等模板文件。Thymeleaf 模板可以直接当作静态原型来使用,它主要目标是为开发者的开发工作流程带来优雅的自然模板,也是 Java 服务器端 HTML5 开发的理想选择。</p>
<p><img src="/pictures/image-20230706152329777.png" alt="image-20230706152329777"></p>
<p>教程: <a href="https://www.thymeleaf.org/">https://www.thymeleaf.org</a></p>
<h1 id="项目集成Thymeleaf"><a href="#项目集成Thymeleaf" class="headerlink" title="项目集成Thymeleaf"></a>项目集成Thymeleaf</h1><p><strong>1.导入依赖</strong></p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!-- thymeleaf--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-thymeleaf<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><strong>2.添加配置</strong></p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring.thymeleaf.cache</span>=<span class="string">false #关闭缓存后面使用devtools进行热更新也要关闭缓存</span></span><br></pre></td></tr></table></figure>
<p><strong>3.在HTML文件中引入名称空间</strong></p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">xmlns:th</span>=<span class="string">&quot;http://www.thymeleaf.org&quot;</span>&gt;</span></span><br></pre></td></tr></table></figure>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">xmlns:th</span>=<span class="string">&quot;http://www.thymeleaf.org&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>标题<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;Content-Type&quot;</span> <span class="attr">content</span>=<span class="string">&quot;text/html; charset=UTF-8&quot;</span> /&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">p</span> <span class="attr">th:text</span>=<span class="string">&quot;#&#123;home.welcome&#125;&quot;</span>&gt;</span>Welcome to our grocery store!<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h1 id="Thymeleaf"><a href="#Thymeleaf" class="headerlink" title="Thymeleaf"></a>Thymeleaf</h1><h2 id="devtools热部署"><a href="#devtools热部署" class="headerlink" title="devtools热部署"></a><strong>devtools热部署</strong></h2><p>Tips:在使用Thymeleaf的时候修改页面我们要频繁的重启项目,非常浪费时间,这时我们可以导入devtools进行热部署</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--devtools--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-devtools<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">optional</span>&gt;</span>true<span class="tag">&lt;/<span class="name">optional</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>导入之后重启项目,会显示如下的标识</p>
<p><img src="/pictures/image-20230706154112026.png" alt="image-20230706154112026"></p>
<p>每次修改页面之后我们只需要在当前文件下重新build一下(Ctrl+Shift+F9),就可以实现热更新</p>
<p><img src="/pictures/image-20230706161401528.png" alt="image-20230706161401528"></p>
<h2 id="使用文档"><a href="#使用文档" class="headerlink" title="使用文档"></a>使用文档</h2><p>英文文档: <a href="https://www.thymeleaf.org/doc/tutorials/3.1/usingthymeleaf.html">https://www.thymeleaf.org/doc/tutorials/3.1/usingthymeleaf.html</a></p>
<p>博客文章: <a href="https://fanlychie.github.io/post/thymeleaf.html">https://fanlychie.github.io/post/thymeleaf.html</a></p>
<p><strong>中文PDF文档</strong></p>
<div class="row">
<embed src="/pdf/Thymeleaf中文参考文档.pdf" width="100%" height="550" type="application/pdf">
</div>
]]></content>
<categories>
<category>前端</category>
</categories>
<tags>
<tag>Thymeleaf</tag>
</tags>
</entry>
<entry>
<title>VMWare虚拟机安装Linux教程</title>
<url>/posts/47407.html</url>
<content><![CDATA[<h2 id="1-下载CentOs镜像文件"><a href="#1-下载CentOs镜像文件" class="headerlink" title="1.下载CentOs镜像文件"></a>1.下载CentOs镜像文件</h2><p>这里下载的是7版本的 如果有其他的需要 自行安装其他的版本</p>
<p>下载完成之后 记录好安装的位置</p>
<p>阿里镜像下载地址:<a href="https://mirrors.aliyun.com/centos/7/isos/x86_64/?spm=a2c6h.25603864.0.0.4eab4511uQRsgc">https://mirrors.aliyun.com/centos/7/isos/x86_64/?spm=a2c6h.25603864.0.0.4eab4511uQRsgc</a></p>
<p><img src="/pictures/image-20230510224239950.png" alt="image-20230510224239950"></p>
<h2 id="2-下载VMWare-虚拟机"><a href="#2-下载VMWare-虚拟机" class="headerlink" title="2.下载VMWare 虚拟机"></a>2.下载VMWare 虚拟机</h2><p>这里下载的是17版本的VMWare ,可以免费试用30天需要许可证的可自行百度搜索</p>
<p>官网下载地址: <a href="https://download3.vmware.com/software/WKST-1701-WIN/VMware-workstation-full-17.0.1-21139696.exe">https://download3.vmware.com/software/WKST-1701-WIN/VMware-workstation-full-17.0.1-21139696.exe</a></p>
<p>安装步骤:</p>
<p><img src="/pictures/image-20230510222210848.png" alt="image-20230510222210848"></p>
<h2 id="3-配置虚拟机-以CentOs为例"><a href="#3-配置虚拟机-以CentOs为例" class="headerlink" title="3.配置虚拟机 (以CentOs为例)"></a>3.配置虚拟机 (以CentOs为例)</h2><p>CentOs的不同版本在VmWare上面的配置略有不同</p>
<h4 id="CentOs-7-6版本的配置教程"><a href="#CentOs-7-6版本的配置教程" class="headerlink" title="CentOs 7.6版本的配置教程"></a>CentOs 7.6版本的配置教程</h4>
<div class="row">
<embed src="/pdf/韩顺平教育安装CentOS7.6.pdf" width="100%" height="550" type="application/pdf">
</div>
<h4 id="CentOs-8-1版本的配置教程"><a href="#CentOs-8-1版本的配置教程" class="headerlink" title="CentOs 8.1版本的配置教程"></a>CentOs 8.1版本的配置教程</h4>
<div class="row">
<embed src="/pdf/韩顺平教育安装CentOS8.1.pdf" width="100%" height="550" type="application/pdf">
</div>
<h2 id="连接Linux-的远程工具"><a href="#连接Linux-的远程工具" class="headerlink" title="连接Linux 的远程工具"></a>连接Linux 的远程工具</h2><p><strong>其实本地安装Linux大可不必安装远程控制工具 直接进入Linux里面控制即可</strong></p>
<p><img src="/pictures/image-20230510225825430.png" alt="image-20230510225825430"></p>
<h3 id="XShell6的安装和配置"><a href="#XShell6的安装和配置" class="headerlink" title="XShell6的安装和配置"></a>XShell6的安装和配置</h3><h4 id="1-安装"><a href="#1-安装" class="headerlink" title="1.安装"></a>1.安装</h4><p>下载地址: <a href="https://wwvc.lanzouy.com/ipF2w0v6np8j">https://wwvc.lanzouy.com/ipF2w0v6np8j</a></p>
<p>下载解压之后双击.exe文件 点击下一步安装 直到安装完成</p>
<h4 id="2-配置"><a href="#2-配置" class="headerlink" title="2.配置"></a>2.配置</h4><p>1.获取Linux的ip地址信息 并记录ip的信息 </p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">命令</span> </span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">注意这里没有写错 就是ifconfig 不是ipconfig,ipconfig是windows系统的查看ip的命令</span></span><br><span class="line">ifconfig</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230510230114550.png" alt="image-20230510230114550"></p>
<p>2.打开xShell工具</p>
<p>2.1创建会话</p>
<p><img src="/pictures/image-20230510230758405.png" alt="image-20230510230758405"></p>
<p>2.2 选择会话并连接</p>
<p><img src="/pictures/image-20230510230937843.png" alt="image-20230510230937843"></p>
<p><img src="/pictures/image-20230510231329208.png" alt="image-20230510231329208"></p>
<p><img src="/pictures/image-20230510231432103.png" alt="image-20230510231432103"></p>
<p>2.3 用户名和密码正确之后就连接成功</p>
<p>连接成功如下图</p>
<p><img src="/pictures/image-20230510231607314.png" alt="image-20230510231607314"></p>
<p><strong>完整的配置过程</strong></p>
<p><img src="/pictures/image-20230510232029231.png" alt="image-20230510232029231"></p>
<h3 id="FinalShell的下载地址"><a href="#FinalShell的下载地址" class="headerlink" title="FinalShell的下载地址"></a>FinalShell的下载地址</h3><p>下载地址: <a href="http://www.hostbuf.com/downloads/finalshell_install.exe">http://www.hostbuf.com/downloads/finalshell_install.exe</a></p>
<p>Tips</p>
<p> 这里我们没有设置Linux的静态IP,电脑每次网络变化之后,IP地址会发生变化,这时我们需要获取最新的IP地址重新执行以上的连接步骤。如果想要IP地址固定,我们可以设置静态IP设置静态的IP的方法如下:</p>
<p><strong><a href="https://qingling.icu/posts/21883.html">Linux设置静态IP | The Blog (qingling.icu)</a></strong></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>VMWare</tag>
</tags>
</entry>
<entry>
<title>代码注释模板</title>
<url>/posts/1727.html</url>
<content><![CDATA[<p>完整的模板大全:<a href="https://github.com/OBKoro1/koro1FileHeader/wiki/%E4%BD%9B%E7%A5%96%E4%BF%9D%E4%BD%91%E6%B0%B8%E6%97%A0BUG%E3%80%81%E7%A5%9E%E5%85%BD%E6%8A%A4%E4%BD%93%E3%80%81%E6%B3%A8%E9%87%8A%E5%9B%BE%E6%A1%88">佛祖保佑永无BUG、神兽护体、注释图案 · OBKoro1&#x2F;koro1FileHeader Wiki (github.com)</a></p>
<p>在线生成代码注释模板:<a href="http://patorjk.com/software/taag/">http://patorjk.com/software/taag/</a></p>
<p><img src="/pictures/image-20240113150435680.png" alt="image-20240113150435680"></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line"></span><br><span class="line"> ██╗ █████╗ ███████╗ ██████╗ ███╗ ██╗███████╗ ██████╗ ██████╗ ███╗ ██╗ ██████╗ ██████╗ ██╗████████╗███████╗███████╗ ██╗ ██████╗ </span><br><span class="line"> ██║██╔══██╗██╔════╝██╔═══██╗████╗ ██║██╔════╝██╔════╝ ██╔═══██╗████╗ ██║██╔════╝ ██╔════╝ ██║╚══██╔══╝██╔════╝██╔════╝ ██║██╔═══██╗</span><br><span class="line"> ██║███████║███████╗██║ ██║██╔██╗ ██║███████╗██║ ███╗██║ ██║██╔██╗ ██║██║ ███╗ ██║ ███╗██║ ██║ █████╗ █████╗ ██║██║ ██║</span><br><span class="line">██ ██║██╔══██║╚════██║██║ ██║██║╚██╗██║╚════██║██║ ██║██║ ██║██║╚██╗██║██║ ██║ ██║ ██║██║ ██║ ██╔══╝ ██╔══╝ ██║██║ ██║</span><br><span class="line">╚█████╔╝██║ ██║███████║╚██████╔╝██║ ╚████║███████║╚██████╔╝╚██████╔╝██║ ╚████║╚██████╔╝██╗╚██████╔╝██║ ██║ ███████╗███████╗██╗██║╚██████╔╝</span><br><span class="line"> ╚════╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚═╝╚═╝ ╚═════╝ </span><br></pre></td></tr></table></figure>
<p>VScode插件推荐<strong>koroFileHeader</strong> (用于生成文件头部注释和函数注释的插件)</p>
<p><img src="/pictures/image-20230912105041466.png" alt="image-20230912105041466"></p>
<h2 id="佛祖保佑一"><a href="#佛祖保佑一" class="headerlink" title="佛祖保佑一"></a>佛祖保佑一</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"></span><br><span class="line"><span class="comment">////////////////////////////////////////////////////////////////////</span></span><br><span class="line"><span class="comment">// _ooOoo_ //</span></span><br><span class="line"><span class="comment">// o8888888o //</span></span><br><span class="line"><span class="comment">// 88&quot; . &quot;88 //</span></span><br><span class="line"><span class="comment">// (| ^_^ |) //</span></span><br><span class="line"><span class="comment">// O\ = /O //</span></span><br><span class="line"><span class="comment">// ____/`---&#x27;\____ //</span></span><br><span class="line"><span class="comment">// .&#x27; \\| |// `. //</span></span><br><span class="line"><span class="comment">// / \\||| : |||// \ //</span></span><br><span class="line"><span class="comment">// / _||||| -:- |||||- \ //</span></span><br><span class="line"><span class="comment">// | | \\\ - /// | | //</span></span><br><span class="line"><span class="comment">// | \_| &#x27;&#x27;\---/&#x27;&#x27; | | //</span></span><br><span class="line"><span class="comment">// \ .-\__ `-` ___/-. / //</span></span><br><span class="line"><span class="comment">// ___`. .&#x27; /--.--\ `. . ___ //</span></span><br><span class="line"><span class="comment">// .&quot;&quot; &#x27;&lt; `.___\_&lt;|&gt;_/___.&#x27; &gt;&#x27;&quot;&quot;. //</span></span><br><span class="line"><span class="comment">// | | : `- \`.;`\ _ /`;.`/ - ` : | | //</span></span><br><span class="line"><span class="comment">// \ \ `-. \_ __\ /__ _/ .-` / / //</span></span><br><span class="line"><span class="comment">// ========`-.____`-.___\_____/___.-`____.-&#x27;======== //</span></span><br><span class="line"><span class="comment">// `=---=&#x27; //</span></span><br><span class="line"><span class="comment">// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //</span></span><br><span class="line"><span class="comment">// 佛祖保佑 永无BUG 永不修改 //</span></span><br><span class="line"><span class="comment">////////////////////////////////////////////////////////////////////</span></span><br></pre></td></tr></table></figure>
<h2 id="佛祖保佑一-1"><a href="#佛祖保佑一-1" class="headerlink" title="佛祖保佑一"></a>佛祖保佑一</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * _ooOoo_</span></span><br><span class="line"><span class="comment"> * o8888888o</span></span><br><span class="line"><span class="comment"> * 88&quot; . &quot;88</span></span><br><span class="line"><span class="comment"> * (| -_- |)</span></span><br><span class="line"><span class="comment"> * O\ = /O</span></span><br><span class="line"><span class="comment"> * ____/`---&#x27;\____</span></span><br><span class="line"><span class="comment"> * .&#x27; \\| |// `.</span></span><br><span class="line"><span class="comment"> * / \\||| : |||// \</span></span><br><span class="line"><span class="comment"> * / _||||| -:- |||||- \</span></span><br><span class="line"><span class="comment"> * | | \\\ - /// | |</span></span><br><span class="line"><span class="comment"> * | \_| &#x27;&#x27;\---/&#x27;&#x27; | |</span></span><br><span class="line"><span class="comment"> * \ .-\__ `-` ___/-. /</span></span><br><span class="line"><span class="comment"> * ___`. .&#x27; /--.--\ `. . __</span></span><br><span class="line"><span class="comment"> * .&quot;&quot; &#x27;&lt; `.___\_&lt;|&gt;_/___.&#x27; &gt;&#x27;&quot;&quot;.</span></span><br><span class="line"><span class="comment"> * | | : `- \`.;`\ _ /`;.`/ - ` : | |</span></span><br><span class="line"><span class="comment"> * \ \ `-. \_ __\ /__ _/ .-` / /</span></span><br><span class="line"><span class="comment"> * ======`-.____`-.___\_____/___.-`____.-&#x27;======</span></span><br><span class="line"><span class="comment"> * `=---=&#x27;</span></span><br><span class="line"><span class="comment"> * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</span></span><br><span class="line"><span class="comment"> * 佛祖保佑 永无BUG</span></span><br><span class="line"><span class="comment"> * 佛曰:</span></span><br><span class="line"><span class="comment"> * 写字楼里写字间,写字间里程序员;</span></span><br><span class="line"><span class="comment"> * 程序人员写程序,又拿程序换酒钱。</span></span><br><span class="line"><span class="comment"> * 酒醒只在网上坐,酒醉还来网下眠;</span></span><br><span class="line"><span class="comment"> * 酒醉酒醒日复日,网上网下年复年。</span></span><br><span class="line"><span class="comment"> * 但愿老死电脑间,不愿鞠躬老板前;</span></span><br><span class="line"><span class="comment"> * 奔驰宝马贵者趣,公交自行程序员。</span></span><br><span class="line"><span class="comment"> * 别人笑我忒疯癫,我笑自己命太贱;</span></span><br><span class="line"><span class="comment"> * 不见满街漂亮妹,哪个归得程序员?</span></span><br><span class="line"><span class="comment">*/</span></span><br></pre></td></tr></table></figure>
<h2 id="草泥马一"><a href="#草泥马一" class="headerlink" title="草泥马一"></a>草泥马一</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * </span></span><br><span class="line"><span class="comment"> *   ┏┓   ┏┓+ +</span></span><br><span class="line"><span class="comment"> *  ┏┛┻━━━┛┻┓ + +</span></span><br><span class="line"><span class="comment"> *  ┃       ┃  </span></span><br><span class="line"><span class="comment"> *  ┃   ━   ┃ ++ + + +</span></span><br><span class="line"><span class="comment"> * ████━████ ┃+</span></span><br><span class="line"><span class="comment"> *  ┃       ┃ +</span></span><br><span class="line"><span class="comment"> *  ┃   ┻   ┃</span></span><br><span class="line"><span class="comment"> *  ┃       ┃ + +</span></span><br><span class="line"><span class="comment"> *  ┗━┓   ┏━┛</span></span><br><span class="line"><span class="comment"> *    ┃   ┃           </span></span><br><span class="line"><span class="comment"> *    ┃   ┃ + + + +</span></span><br><span class="line"><span class="comment"> *    ┃   ┃</span></span><br><span class="line"><span class="comment"> *    ┃   ┃ + 神兽保佑</span></span><br><span class="line"><span class="comment"> *    ┃   ┃ 代码无bug  </span></span><br><span class="line"><span class="comment"> *    ┃   ┃  +         </span></span><br><span class="line"><span class="comment"> *    ┃    ┗━━━┓ + +</span></span><br><span class="line"><span class="comment"> *    ┃        ┣┓</span></span><br><span class="line"><span class="comment"> *    ┃        ┏┛</span></span><br><span class="line"><span class="comment"> *    ┗┓┓┏━┳┓┏┛ + + + +</span></span><br><span class="line"><span class="comment"> *     ┃┫┫ ┃┫┫</span></span><br><span class="line"><span class="comment"> *     ┗┻┛ ┗┻┛+ + + +</span></span><br><span class="line"><span class="comment"> * </span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure>
<h2 id="草泥马二"><a href="#草泥马二" class="headerlink" title="草泥马二"></a>草泥马二</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * </span></span><br><span class="line"><span class="comment"> * ┏┓   ┏┓</span></span><br><span class="line"><span class="comment"> * ┏┛┻━━━┛┻┓</span></span><br><span class="line"><span class="comment"> * ┃       ┃</span></span><br><span class="line"><span class="comment"> * ┃   ━   ┃</span></span><br><span class="line"><span class="comment"> * ┃ >   < ┃</span></span><br><span class="line"><span class="comment"> * ┃       ┃</span></span><br><span class="line"><span class="comment"> * ┃... ⌒ ... ┃</span></span><br><span class="line"><span class="comment"> * ┃       ┃</span></span><br><span class="line"><span class="comment"> * ┗━┓   ┏━┛</span></span><br><span class="line"><span class="comment"> * ┃   ┃ </span></span><br><span class="line"><span class="comment"> * ┃   ┃</span></span><br><span class="line"><span class="comment"> * ┃   ┃</span></span><br><span class="line"><span class="comment"> * ┃   ┃ 神兽保佑</span></span><br><span class="line"><span class="comment"> * ┃   ┃ 代码无bug  </span></span><br><span class="line"><span class="comment"> * ┃   ┃</span></span><br><span class="line"><span class="comment"> * ┃   ┗━━━┓</span></span><br><span class="line"><span class="comment"> * ┃       ┣┓</span></span><br><span class="line"><span class="comment"> * ┃       ┏┛</span></span><br><span class="line"><span class="comment"> * ┗┓┓┏━┳┓┏┛</span></span><br><span class="line"><span class="comment"> * ┃┫┫ ┃┫┫</span></span><br><span class="line"><span class="comment"> * ┗┻┛ ┗┻┛</span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure>
<h2 id="全键盘"><a href="#全键盘" class="headerlink" title="全键盘"></a>全键盘</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐</span></span><br><span class="line"><span class="comment"> * │Esc│ │ F1│ F2│ F3│ F4│ │ F5│ F6│ F7│ F8│ │ F9│F10│F11│F12│ │P/S│S L│P/B│ ┌┐ ┌┐ ┌┐</span></span><br><span class="line"><span class="comment"> * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ └┘ └┘ └┘</span></span><br><span class="line"><span class="comment"> * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐</span></span><br><span class="line"><span class="comment"> * │~ `│! 1│@ 2│# 3│$ 4│% 5│^ 6│&amp; 7│* 8│( 9│) 0│_ -│+ =│ BacSp │ │Ins│Hom│PUp│ │N L│ / │ * │ - │</span></span><br><span class="line"><span class="comment"> * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤</span></span><br><span class="line"><span class="comment"> * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │&#123; [│&#125; ]│ | \ │ │Del│End│PDn│ │ 7 │ 8 │ 9 │ │</span></span><br><span class="line"><span class="comment"> * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ + │</span></span><br><span class="line"><span class="comment"> * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│&quot; &#x27;│ Enter │ │ 4 │ 5 │ 6 │ │</span></span><br><span class="line"><span class="comment"> * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ ├───┼───┼───┼───┤</span></span><br><span class="line"><span class="comment"> * │ Shift │ Z │ X │ C │ V │ B │ N │ M │&lt; ,│&gt; .│? /│ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │</span></span><br><span class="line"><span class="comment"> * ├─────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ E││</span></span><br><span class="line"><span class="comment"> * │ Ctrl│ │Alt │ Space │ Alt│ │ │Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │←─┘│</span></span><br><span class="line"><span class="comment"> * └─────┴────┴────┴───────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘</span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure>
<h2 id="小键盘"><a href="#小键盘" class="headerlink" title="小键盘"></a>小键盘</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * ┌─────────────────────────────────────────────────────────────┐</span></span><br><span class="line"><span class="comment"> * │┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐│</span></span><br><span class="line"><span class="comment"> * ││Esc│!1 │@2 │#3 │$4 │%5 │^6 │&amp;7 │*8 │(9 │)0 │_- │+= │|\ │`~ ││</span></span><br><span class="line"><span class="comment"> * │├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤│</span></span><br><span class="line"><span class="comment"> * ││ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │&#123;[ │&#125;] │ BS ││</span></span><br><span class="line"><span class="comment"> * │├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤│</span></span><br><span class="line"><span class="comment"> * ││ Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│&quot; &#x27;│ Enter ││</span></span><br><span class="line"><span class="comment"> * │├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤│</span></span><br><span class="line"><span class="comment"> * ││ Shift │ Z │ X │ C │ V │ B │ N │ M │&lt; ,│&gt; .│? /│Shift │Fn ││</span></span><br><span class="line"><span class="comment"> * │└─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴┬─────┴───┘│</span></span><br><span class="line"><span class="comment"> * │ │Fn │ Alt │ Space │ Alt │Win│ HHKB │</span></span><br><span class="line"><span class="comment"> * │ └───┴─────┴───────────────────────┴─────┴───┘ │</span></span><br><span class="line"><span class="comment"> * └─────────────────────────────────────────────────────────────┘</span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure>
<p><strong>耶稣</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * |~~~~~~~|</span></span><br><span class="line"><span class="comment"> * | |</span></span><br><span class="line"><span class="comment"> * | |</span></span><br><span class="line"><span class="comment"> * | |</span></span><br><span class="line"><span class="comment"> * | |</span></span><br><span class="line"><span class="comment"> * | |</span></span><br><span class="line"><span class="comment"> * |~.\\\_\~~~~~~~~~~~~~~xx~~~ ~~~~~~~~~~~~~~~~~~~~~/_//;~|</span></span><br><span class="line"><span class="comment"> * | \ o \_ ,XXXXX), _..-~ o / |</span></span><br><span class="line"><span class="comment"> * | ~~\ ~-. XXXXX`)))), _.--~~ .-~~~ |</span></span><br><span class="line"><span class="comment"> * ~~~~~~~`\ ~\~~~XXX&#x27; _/ &#x27;;)) |~~~~~~..-~ _.-~ ~~~~~~~</span></span><br><span class="line"><span class="comment"> * `\ ~~--`_\~\, ;;;\)__.---.~~~ _.-~</span></span><br><span class="line"><span class="comment"> * ~-. `:;;/;; \ _..-~~</span></span><br><span class="line"><span class="comment"> * ~-._ `&#x27;&#x27; /-~-~</span></span><br><span class="line"><span class="comment"> * `\ / /</span></span><br><span class="line"><span class="comment"> * | , | |</span></span><br><span class="line"><span class="comment"> * | &#x27; / |</span></span><br><span class="line"><span class="comment"> * \/; |</span></span><br><span class="line"><span class="comment"> * ;; |</span></span><br><span class="line"><span class="comment"> * `; . |</span></span><br><span class="line"><span class="comment"> * |~~~-----.....|</span></span><br><span class="line"><span class="comment"> * | \ \</span></span><br><span class="line"><span class="comment"> * | /\~~--...__ |</span></span><br><span class="line"><span class="comment"> * (| `\ __-\|</span></span><br><span class="line"><span class="comment"> * || \_ /~ |</span></span><br><span class="line"><span class="comment"> * |) \~-&#x27; |</span></span><br><span class="line"><span class="comment"> * | | \ &#x27;</span></span><br><span class="line"><span class="comment"> * | | \ :</span></span><br><span class="line"><span class="comment"> * \ | | |</span></span><br><span class="line"><span class="comment"> * | ) ( )</span></span><br><span class="line"><span class="comment"> * \ /; /\ |</span></span><br><span class="line"><span class="comment"> * | |/ |</span></span><br><span class="line"><span class="comment"> * | | |</span></span><br><span class="line"><span class="comment"> * \ .&#x27; ||</span></span><br><span class="line"><span class="comment"> * | | | |</span></span><br><span class="line"><span class="comment"> * ( | | |</span></span><br><span class="line"><span class="comment"> * | \ \ |</span></span><br><span class="line"><span class="comment"> * || o `.)|</span></span><br><span class="line"><span class="comment"> * |`\\) |</span></span><br><span class="line"><span class="comment"> * | |</span></span><br><span class="line"><span class="comment"> * | |</span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure>
<h2 id="美女"><a href="#美女" class="headerlink" title="美女"></a>美女</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * .::::.</span></span><br><span class="line"><span class="comment"> * .::::::::.</span></span><br><span class="line"><span class="comment"> * :::::::::::</span></span><br><span class="line"><span class="comment"> * ..:::::::::::&#x27;</span></span><br><span class="line"><span class="comment"> * &#x27;::::::::::::&#x27;</span></span><br><span class="line"><span class="comment"> * .::::::::::</span></span><br><span class="line"><span class="comment"> * &#x27;::::::::::::::..</span></span><br><span class="line"><span class="comment"> * ..::::::::::::.</span></span><br><span class="line"><span class="comment"> * ``::::::::::::::::</span></span><br><span class="line"><span class="comment"> * ::::``:::::::::&#x27; .:::.</span></span><br><span class="line"><span class="comment"> * ::::&#x27; &#x27;:::::&#x27; .::::::::.</span></span><br><span class="line"><span class="comment"> * .::::&#x27; :::: .:::::::&#x27;::::.</span></span><br><span class="line"><span class="comment"> * .:::&#x27; ::::: .:::::::::&#x27; &#x27;:::::.</span></span><br><span class="line"><span class="comment"> * .::&#x27; :::::.:::::::::&#x27; &#x27;:::::.</span></span><br><span class="line"><span class="comment"> * .::&#x27; ::::::::::::::&#x27; ``::::.</span></span><br><span class="line"><span class="comment"> * ...::: ::::::::::::&#x27; ``::.</span></span><br><span class="line"><span class="comment"> * ````&#x27;:. &#x27;:::::::::&#x27; ::::..</span></span><br><span class="line"><span class="comment"> * &#x27;.:::::&#x27; &#x27;:&#x27;````..</span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure>
<h2 id="程序员之歌"><a href="#程序员之歌" class="headerlink" title="程序员之歌"></a>程序员之歌</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * 江城子 . 程序员之歌</span></span><br><span class="line"><span class="comment"> * </span></span><br><span class="line"><span class="comment"> * 十年生死两茫茫,写程序,到天亮。</span></span><br><span class="line"><span class="comment"> * 千行代码Bug何处藏。</span></span><br><span class="line"><span class="comment"> * 纵使上线又怎样,朝令改,夕断肠。</span></span><br><span class="line"><span class="comment"> * </span></span><br><span class="line"><span class="comment"> * 领导每天新想法,天天改,日日忙。</span></span><br><span class="line"><span class="comment"> * 相顾无言,惟有泪千行。</span></span><br><span class="line"><span class="comment"> * 每晚灯火阑珊处,夜难寐,加班狂。</span></span><br><span class="line"><span class="comment"> * </span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure>
<h2 id="龙图腾"><a href="#龙图腾" class="headerlink" title="龙图腾"></a>龙图腾</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * ......................................&amp;&amp;.........................</span></span><br><span class="line"><span class="comment"> * ....................................&amp;&amp;&amp;..........................</span></span><br><span class="line"><span class="comment"> * .................................&amp;&amp;&amp;&amp;............................</span></span><br><span class="line"><span class="comment"> * ...............................&amp;&amp;&amp;&amp;..............................</span></span><br><span class="line"><span class="comment"> * .............................&amp;&amp;&amp;&amp;&amp;&amp;..............................</span></span><br><span class="line"><span class="comment"> * ...........................&amp;&amp;&amp;&amp;&amp;&amp;....&amp;&amp;&amp;..&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;........</span></span><br><span class="line"><span class="comment"> * ..................&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;..............</span></span><br><span class="line"><span class="comment"> * ................&amp;...&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.................</span></span><br><span class="line"><span class="comment"> * .......................&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.........</span></span><br><span class="line"><span class="comment"> * ...................&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;...............</span></span><br><span class="line"><span class="comment"> * ..................&amp;&amp;&amp; &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;............</span></span><br><span class="line"><span class="comment"> * ...............&amp;&amp;&amp;&amp;&amp;@ &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;..&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;...........</span></span><br><span class="line"><span class="comment"> * ..............&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.&amp;&amp;....&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;..&amp;&amp;&amp;&amp;&amp;.........</span></span><br><span class="line"><span class="comment"> * ..........&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;...&amp;.....&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;...&amp;&amp;&amp;&amp;........</span></span><br><span class="line"><span class="comment"> * ........&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.........&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;....&amp;&amp;&amp;.......</span></span><br><span class="line"><span class="comment"> * .......&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.....................&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.....&amp;&amp;......</span></span><br><span class="line"><span class="comment"> * ........&amp;&amp;&amp;&amp;&amp;.....................&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.............</span></span><br><span class="line"><span class="comment"> * ..........&amp;...................&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;............</span></span><br><span class="line"><span class="comment"> * ................&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;............</span></span><br><span class="line"><span class="comment"> * ..................&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;..&amp;&amp;&amp;&amp;&amp;............</span></span><br><span class="line"><span class="comment"> * ..............&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;....&amp;&amp;&amp;&amp;&amp;............</span></span><br><span class="line"><span class="comment"> * ...........&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;......&amp;&amp;&amp;&amp;............</span></span><br><span class="line"><span class="comment"> * .........&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.........&amp;&amp;&amp;&amp;............</span></span><br><span class="line"><span class="comment"> * .......&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;...........&amp;&amp;&amp;&amp;............</span></span><br><span class="line"><span class="comment"> * ......&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;...&amp;&amp;&amp;&amp;&amp;&amp;...............&amp;&amp;&amp;.............</span></span><br><span class="line"><span class="comment"> * .....&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;............................&amp;&amp;..............</span></span><br><span class="line"><span class="comment"> * ....&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.................&amp;&amp;...........................</span></span><br><span class="line"><span class="comment"> * ...&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.....................&amp;&amp;&amp;&amp;......................</span></span><br><span class="line"><span class="comment"> * ...&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.&amp;&amp;&amp;........................&amp;&amp;&amp;&amp;&amp;...................</span></span><br><span class="line"><span class="comment"> * ..&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;..&amp;&amp;..........................&amp;&amp;&amp;&amp;&amp;&amp;&amp;...............</span></span><br><span class="line"><span class="comment"> * ..&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;...&amp;............&amp;&amp;&amp;.....&amp;&amp;&amp;&amp;...&amp;&amp;&amp;&amp;&amp;&amp;&amp;.............</span></span><br><span class="line"><span class="comment"> * ..&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.................&amp;&amp;&amp;.....&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;...........</span></span><br><span class="line"><span class="comment"> * ..&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;..............&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.........</span></span><br><span class="line"><span class="comment"> * ..&amp;&amp;.&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.........&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.......</span></span><br><span class="line"><span class="comment"> * ...&amp;&amp;..&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.........&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;...&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;......</span></span><br><span class="line"><span class="comment"> * ....&amp;..&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;...........&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.....</span></span><br><span class="line"><span class="comment"> * .......&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;..............&amp;&amp;&amp;&amp;&amp;&amp;&amp;....</span></span><br><span class="line"><span class="comment"> * .......&amp;&amp;&amp;&amp;&amp;.&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;..&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;...&amp;..........&amp;&amp;&amp;&amp;&amp;&amp;....</span></span><br><span class="line"><span class="comment"> * ........&amp;&amp;&amp;.....&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.....&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;...........&amp;..&amp;&amp;&amp;&amp;...</span></span><br><span class="line"><span class="comment"> * .......&amp;&amp;&amp;........&amp;&amp;&amp;.&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;.....&amp;&amp;&amp;&amp;&amp;.................&amp;&amp;&amp;&amp;...</span></span><br><span class="line"><span class="comment"> * .......&amp;&amp;&amp;...............&amp;&amp;&amp;&amp;&amp;&amp;&amp;.......&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;............&amp;&amp;&amp;...</span></span><br><span class="line"><span class="comment"> * ........&amp;&amp;...................&amp;&amp;&amp;&amp;&amp;&amp;.........................&amp;&amp;&amp;..</span></span><br><span class="line"><span class="comment"> * .........&amp;.....................&amp;&amp;&amp;&amp;........................&amp;&amp;....</span></span><br><span class="line"><span class="comment"> * ...............................&amp;&amp;&amp;.......................&amp;&amp;......</span></span><br><span class="line"><span class="comment"> * ................................&amp;&amp;......................&amp;&amp;.......</span></span><br><span class="line"><span class="comment"> * .................................&amp;&amp;..............................</span></span><br><span class="line"><span class="comment"> * ..................................&amp;..............................</span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure>
<h2 id="蝙蝠"><a href="#蝙蝠" class="headerlink" title="蝙蝠"></a>蝙蝠</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * ___====-_ _-====___</span></span><br><span class="line"><span class="comment"> * _--^^^#####// \\#####^^^--_</span></span><br><span class="line"><span class="comment"> * _-^##########// ( ) \\##########^-_</span></span><br><span class="line"><span class="comment"> * -############// |\^^/| \\############-</span></span><br><span class="line"><span class="comment"> * _/############// (@::@) \############\_</span></span><br><span class="line"><span class="comment"> * /#############(( \\// ))#############\</span></span><br><span class="line"><span class="comment"> * -###############\\ (oo) //###############-</span></span><br><span class="line"><span class="comment"> * -#################\\ / VV \ //#################-</span></span><br><span class="line"><span class="comment"> * -###################\\/ \//###################-</span></span><br><span class="line"><span class="comment"> * _#/|##########/\######( /\ )######/\##########|\#_</span></span><br><span class="line"><span class="comment"> * |/ |#/\#/\#/\/ \#/\##\ | | /##/\#/ \/\#/\#/\#| \|</span></span><br><span class="line"><span class="comment"> * ` |/ V V ` V \#\| | | |/#/ V &#x27; V V \| &#x27;</span></span><br><span class="line"><span class="comment"> * ` ` ` ` / | | | | \ &#x27; &#x27; &#x27; &#x27;</span></span><br><span class="line"><span class="comment"> * ( | | | | )</span></span><br><span class="line"><span class="comment"> * __\ | | | | /__</span></span><br><span class="line"><span class="comment"> * (vvv(VVV)(VVV)vvv)</span></span><br><span class="line"><span class="comment"> * </span></span><br><span class="line"><span class="comment"> * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span></span><br><span class="line"><span class="comment"> * </span></span><br><span class="line"><span class="comment"> * 神兽保佑 永无BUG</span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure>
<h2 id="喷火龙"><a href="#喷火龙" class="headerlink" title="喷火龙"></a>喷火龙</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * __----~~~~~~~~~~~------___</span></span><br><span class="line"><span class="comment"> * . . ~~//====...... __--~ ~~</span></span><br><span class="line"><span class="comment"> * -. \_|// |||\\ ~~~~~~::::... /~</span></span><br><span class="line"><span class="comment"> * ___-==_ _-~o~ \/ ||| \\ _/~~-</span></span><br><span class="line"><span class="comment"> * __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~</span></span><br><span class="line"><span class="comment"> * _-~~ .=~ | \\-_ &#x27;-~7 /- / || \ /</span></span><br><span class="line"><span class="comment"> * .~ .~ | \\ -_ / /- / || \ /</span></span><br><span class="line"><span class="comment"> * / ____ / | \\ ~-_/ /|- _/ .|| \ /</span></span><br><span class="line"><span class="comment"> * |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\</span></span><br><span class="line"><span class="comment"> * &#x27; ~-| /| |-~\~~ __--~~</span></span><br><span class="line"><span class="comment"> * |-~~-_/ | | ~\_ _-~ /\</span></span><br><span class="line"><span class="comment"> * / \ \__ \/~ \__</span></span><br><span class="line"><span class="comment"> * _--~ _/ | .-~~____--~-/ ~~==.</span></span><br><span class="line"><span class="comment"> * ((-&gt;/~ &#x27;.|||&#x27; -_| ~~-/ , . _||</span></span><br><span class="line"><span class="comment"> * -_ ~\ ~~---l__i__i__i--~~_/</span></span><br><span class="line"><span class="comment"> * _-~-__ ~) \--______________--~~</span></span><br><span class="line"><span class="comment"> * //.-~~~-~_--~- |-------~~~~~~~~</span></span><br><span class="line"><span class="comment"> * //.-~~~--\</span></span><br><span class="line"><span class="comment"> * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span></span><br><span class="line"><span class="comment"> * </span></span><br><span class="line"><span class="comment"> * 神兽保佑 永无BUG</span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>个人</category>
</categories>
<tags>
<tag>注释模板</tag>
</tags>
</entry>
<entry>
<title>使用Robot类编写自动化脚本</title>
<url>/posts/30127.html</url>
<content><![CDATA[<h2 id="一-概述"><a href="#一-概述" class="headerlink" title="一.概述"></a>一.概述</h2><p> Java中Robot类位于java.awt.Robot该类用于为测试自动化自运行演示程序和其他需要控制鼠标和键盘的应用程序生成本机系统输入事件Robot类的主要目的是便于Java平台实现自动测试</p>
<h2 id="二-基本API"><a href="#二-基本API" class="headerlink" title="二.基本API"></a>二.基本API</h2><table>
<thead>
<tr>
<th>方法名</th>
<th>使用说明</th>
</tr>
</thead>
<tbody><tr>
<td>delay(n)</td>
<td>延迟电脑操作n毫秒类似于Thread.sleep()</td>
</tr>
<tr>
<td>keyPress()</td>
<td>模拟手动按下电脑键盘上的某个键</td>
</tr>
<tr>
<td>keyRelease()</td>
<td>模拟手动松开电脑键盘上的某个键与keyPress()对应,按下一个键必须松开这个键)</td>
</tr>
<tr>
<td>mouseMove(x,y)</td>
<td>将鼠标移动到指定的x,y位置</td>
</tr>
<tr>
<td>mousePress()</td>
<td>按下鼠标上的某个键</td>
</tr>
<tr>
<td>mouseRelease()</td>
<td>松开鼠标上的某个键</td>
</tr>
<tr>
<td>getPixelColor(x,y)</td>
<td>获取指定坐标处的像素颜色</td>
</tr>
<tr>
<td>mouseWheel(int wheelAmt)</td>
<td>鼠标滚动参数小于0表示向上滚动参数大于0表示向下滚动</td>
</tr>
</tbody></table>
<h2 id="三-基本使用"><a href="#三-基本使用" class="headerlink" title="三.基本使用"></a>三.基本使用</h2><h3 id="1-模拟按键"><a href="#1-模拟按键" class="headerlink" title="1.模拟按键"></a>1.模拟按键</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> java.awt.*;</span><br><span class="line"><span class="keyword">import</span> java.awt.event.KeyEvent;</span><br><span class="line"><span class="keyword">import</span> java.util.Random;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Test</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> <span class="keyword">throws</span> AWTException &#123;</span><br><span class="line"> <span class="type">Robot</span> <span class="variable">robot</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Robot</span>();</span><br><span class="line"> <span class="comment">//延时函数,延时5秒</span></span><br><span class="line"> robot.delay(<span class="number">5000</span>);</span><br><span class="line"> <span class="comment">//模拟按一下K键</span></span><br><span class="line"> robot.keyPress(KeyEvent.VK_K);</span><br><span class="line"> <span class="comment">//产生一个随机的时间(0.2 ~ 0.4秒之间)</span></span><br><span class="line"> <span class="type">Random</span> <span class="variable">random</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Random</span>();</span><br><span class="line"> <span class="type">double</span> <span class="variable">randomValue</span> <span class="operator">=</span> random.nextDouble() * <span class="number">0.2</span> + <span class="number">0.2</span>;</span><br><span class="line"> robot.delay((<span class="type">int</span>)randomValue * <span class="number">1000</span>);</span><br><span class="line"> <span class="comment">//释放k键</span></span><br><span class="line"> robot.keyRelease(KeyEvent.VK_K);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-模拟鼠标"><a href="#2-模拟鼠标" class="headerlink" title="2.模拟鼠标"></a>2.模拟鼠标</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> java.awt.*;</span><br><span class="line"><span class="keyword">import</span> java.awt.event.InputEvent;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Test</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> <span class="keyword">throws</span> AWTException &#123;</span><br><span class="line"> <span class="type">Robot</span> <span class="variable">robot</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Robot</span>();</span><br><span class="line"> <span class="comment">//鼠标的移动</span></span><br><span class="line"> robot.mouseMove(<span class="number">800</span>, <span class="number">200</span>);</span><br><span class="line"> <span class="comment">//按下左键</span></span><br><span class="line"> robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);</span><br><span class="line"> <span class="comment">//弹起左键</span></span><br><span class="line"> robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);</span><br><span class="line"> <span class="comment">//鼠标滚轮(大于1 向上滚动)</span></span><br><span class="line"> robot.mouseWheel(<span class="number">1</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="3-获取颜色"><a href="#3-获取颜色" class="headerlink" title="3.获取颜色"></a>3.获取颜色</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> java.awt.*;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Test</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> <span class="keyword">throws</span> AWTException &#123;</span><br><span class="line"> <span class="type">Robot</span> <span class="variable">robot</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Robot</span>();</span><br><span class="line"> <span class="type">Color</span> <span class="variable">color</span> <span class="operator">=</span> robot.getPixelColor(<span class="number">520</span>, <span class="number">70</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>脚本</tag>
</tags>
</entry>
<entry>
<title>免费好用的PDF工具</title>
<url>/posts/40733.html</url>
<content><![CDATA[<h1 id="一-PDFgear"><a href="#一-PDFgear" class="headerlink" title="一.PDFgear"></a>一.PDFgear</h1><blockquote>
<p>免费、无需登录注册、支持编辑和PDF与格式文件的相互转换</p>
</blockquote>
<h2 id="1-下载地址"><a href="#1-下载地址" class="headerlink" title="1.下载地址"></a>1.下载地址</h2><p>官网地址:<a href="https://www.pdfgear.com/zh/">https://www.pdfgear.com/zh/</a></p>
<p><img src="/pictures/image-20240113151450334.png" alt="image-20240113151450334"></p>
<h2 id="2-介绍"><a href="#2-介绍" class="headerlink" title="2.介绍"></a>2.介绍</h2><p>无需登录无需付费、支持PDF与其他格式的文件的相互转化、拆分合并PDF、压缩PDF、OCR文字识别</p>
<p><img src="/pictures/image-20240113151556929.png" alt="image-20240113151556929"></p>
<p><img src="/pictures/image-20240113151834234.png" alt="image-20240113151834234"></p>
<h1 id="二-stiring-pdf"><a href="#二-stiring-pdf" class="headerlink" title="二.stiring-pdf"></a>二.stiring-pdf</h1><blockquote>
<p>github开源需要自己使用Docker部署!</p>
</blockquote>
<p>github仓库地址<a href="https://github.com/Stirling-Tools/Stirling-PDF">https://github.com/Stirling-Tools/Stirling-PDF</a></p>
<p><img src="/pictures/stirling-home.png" alt="stirling-home.png"></p>
<p>部署命令</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker run -d \</span><br><span class="line"> -p 8080:8080 \</span><br><span class="line"> -v /location/of/trainingData:/usr/share/tesseract-ocr/5/tessdata \</span><br><span class="line"> -v /location/of/extraConfigs:/configs \</span><br><span class="line"> -v /location/of/logs:/logs \</span><br><span class="line"> -e DOCKER_ENABLE_SECURITY=false \</span><br><span class="line"> --name stirling-pdf \</span><br><span class="line"> frooodle/s-pdf:latest</span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>常用工具</category>
</categories>
<tags>
<tag>PDF</tag>
</tags>
</entry>
<entry>
<title>内网穿透</title>
<url>/posts/6932.html</url>
<content><![CDATA[<h2 id="第一步-官网下载"><a href="#第一步-官网下载" class="headerlink" title="第一步 官网下载"></a>第一步 官网下载</h2><p>客户端下载 &gt; windows 64位 &gt;解压后得到.exe文件</p>
<p><img src="/pictures/image-20230409221503708.png" alt="image-20230409221503708"></p>
<h2 id="第二步-官网注册并登录进入后台"><a href="#第二步-官网注册并登录进入后台" class="headerlink" title="第二步 官网注册并登录进入后台"></a>第二步 官网注册并登录进入后台</h2><p>官网注册登录 &gt; 购买免费隧道 &gt;获取authtoken</p>
<p><img src="/pictures/image-20230409221827414.png" alt="image-20230409221827414"></p>
<p><img src="/pictures/image-20230409221954792.png" alt="image-20230409221954792"></p>
<h2 id="第三步-双击下载的-exe文件进入命令行页面输入命令"><a href="#第三步-双击下载的-exe文件进入命令行页面输入命令" class="headerlink" title="第三步 双击下载的.exe文件进入命令行页面输入命令"></a>第三步 双击下载的.exe文件进入命令行页面输入命令</h2><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">natapp -authtoken=刚刚你申请的authtoken</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230409222457135.png" alt="image-20230409222457135"></p>
<p><img src="/pictures/image-20230409222628425.png" alt="image-20230409222628425"></p>
<h2 id="第四步-根据生成的域名访问服务"><a href="#第四步-根据生成的域名访问服务" class="headerlink" title="第四步 根据生成的域名访问服务"></a>第四步 根据生成的域名访问服务</h2><p><img src="/pictures/image-20230409222923480.png" alt="image-20230409222923480"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>网络</tag>
</tags>
</entry>
<entry>
<title>免费域名注册教程</title>
<url>/posts/5727.html</url>
<content><![CDATA[<h1 id="一-域名注册"><a href="#一-域名注册" class="headerlink" title="一.域名注册"></a>一.域名注册</h1><p><strong>免费域名注册网址:<a href="https://nic.eu.org/">https://nic.eu.org</a></strong></p>
<p><img src="/pictures/image-20230913123344514.png" alt="image-20230913123344514"></p>
<h2 id="1-注册账号"><a href="#1-注册账号" class="headerlink" title="1.注册账号"></a>1.注册账号</h2><p>第一步:点击: here</p>
<p><img src="/pictures/image-20230913123704246.png" alt="image-20230913123704246"></p>
<p>第二步: 点击Register</p>
<p><img src="/pictures/image-20230913123809940.png" alt="image-20230913123809940"></p>
<p>第三步:填写相关的信息</p>
<p>地址信息填写英国的地址,可以使用在线地址生成器生成:<a href="https://www.meiguodizhi.com/uk-address">https://www.meiguodizhi.com/uk-address</a></p>
<p><img src="/pictures/image-20230913124042655.png" alt="image-20230913124042655"></p>
<p>填写地址相关的信息其余的信息根据自己的情况填写fax可不填</p>
<p><img src="/pictures/image-20230913124616244.png" alt="image-20230913124616244"></p>
<p>显示下面的提示就是注册成功了</p>
<p><img src="/pictures/image-20230913124842536.png" alt="image-20230913124842536"></p>
<p>这时在系统会给刚才注册的邮箱发送一个激活链接,点击激活</p>
<p><img src="/pictures/image-20230913125129535.png" alt="image-20230913125129535"></p>
<p>打开链接之后点击的按钮<strong>Validate</strong>验证,验证之后显示如下页面表示成功</p>
<p><img src="/pictures/image-20230913125324974.png" alt="image-20230913125324974"></p>
<h2 id="2-登录"><a href="#2-登录" class="headerlink" title="2.登录"></a>2.登录</h2><p>登录的账号就在刚才发送的邮件里面,密码就是注册时设置的密码</p>
<p><img src="/pictures/image-20230913125539561.png" alt="image-20230913125539561"></p>
<h2 id="3-申请域名"><a href="#3-申请域名" class="headerlink" title="3.申请域名"></a>3.申请域名</h2><p>输入你要注册的域名,域名的格式是 xxxx.eu.org</p>
<p><img src="/pictures/image-20230913132602702.png" alt="image-20230913132602702"></p>
<p>域名验证</p>
<p><img src="/pictures/image-20230913132742999.png" alt="image-20230913132742999"></p>
<p>点击Submit按钮之后显示如下的内容表示这个免费的域名是可以申请到的然后等待人工审核通过</p>
<p><img src="/pictures/image-20230913132918535.png" alt="image-20230913132918535"></p>
<p>审核通过之后,你注册时使用的邮箱就会收到信息</p>
]]></content>
<categories>
<category>个人</category>
</categories>
<tags>
<tag>域名注册</tag>
</tags>
</entry>
<entry>
<title>SpringBoot入门教程</title>
<url>/posts/60684.html</url>
<content><![CDATA[<p>尚硅谷雷丰阳的SpringBoot零基础入门教程</p>
<p><strong>本视频笔记地址:</strong><a href="https://yuque.com/atguigu/springboot">https://yuque.com/atguigu/springboot</a></p>
<p><strong>本视频源码地址:</strong><a href="https://gitee.com/leifengyang/springboot2">https://gitee.com/leifengyang/springboot2</a></p>
<p><strong>Spring官网:</strong> <a href="https://spring.io/">https://spring.io/</a></p>
<p>SpringBoot2的环境要求</p>
<p><img src="/pictures/image-20230620092919922.png" alt="image-20230620092919922"></p>
<h1 id="一-SpringBoot2核心技术-基础入门"><a href="#一-SpringBoot2核心技术-基础入门" class="headerlink" title="一.SpringBoot2核心技术-基础入门"></a>一.SpringBoot2核心技术-基础入门</h1><h2 id="1-Spring能做什么"><a href="#1-Spring能做什么" class="headerlink" title="1.Spring能做什么"></a>1.Spring能做什么</h2><p>这里的Spring指的是整个Spring生态</p>
<p><img src="/pictures/image-20230620093420150.png" alt="image-20230620093420150"></p>
<p><strong>微服务 响应式编程 分布式 WEB开发 无服务开发 事件驱动 批处理</strong></p>
<h2 id="2-SpringBoot"><a href="#2-SpringBoot" class="headerlink" title="2.SpringBoot"></a>2.SpringBoot</h2><p>Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can “just run”.</p>
<p>能快速创建出生产级别的Spring应用</p>
<p>SpringBoot是整合Spring技术栈的一站式框架</p>
<p>SpringBoot是简化Spring技术栈的快速开发脚手架</p>
<h3 id="2-1-SpringBoot的优点"><a href="#2-1-SpringBoot的优点" class="headerlink" title="2.1 SpringBoot的优点"></a>2.1 SpringBoot的优点</h3><p>● Create stand-alone Spring applications<br> ○ 创建独立Spring应用<br>● Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)<br> ○ 内嵌web服务器<br>● Provide opinionated starter dependencies to simplify your build configuration<br> ○ 自动starter依赖简化构建配置<br>● Automatically configure Spring and 3rd party libraries whenever possible<br> ○ 自动配置Spring以及第三方功能<br>● Provide production-ready features such as metrics, health checks, and externalized configuration<br> ○ 提供生产级别的监控、健康检查及外部化配置<br>● Absolutely no code generation and no requirement for XML configuration<br> ○ 无代码生成、无需编写XML</p>
<h3 id="2-2、SpringBoot缺点"><a href="#2-2、SpringBoot缺点" class="headerlink" title="2.2、SpringBoot缺点"></a>2.2、SpringBoot缺点</h3><ul>
<li>人称版本帝,迭代快,需要时刻关注变化(说明社区活跃,也是个优点)</li>
<li>封装太深,内部原理复杂,不容易精通</li>
</ul>
<h3 id="2-3-官方文档"><a href="#2-3-官方文档" class="headerlink" title="2.3 官方文档"></a>2.3 官方文档</h3><p>进入官网 找到SpringBoot 点击Reference Doc进入官方文档</p>
<p><img src="/pictures/image-20230620101533445.png" alt="image-20230620101533445"></p>
<h2 id="3-SpringBoot入门"><a href="#3-SpringBoot入门" class="headerlink" title="3.SpringBoot入门"></a>3.SpringBoot入门</h2><h3 id="1-系统的要求"><a href="#1-系统的要求" class="headerlink" title="1.系统的要求"></a>1.系统的要求</h3><ul>
<li><a href="https://www.java.com/">Java 8</a> &amp; 兼容java14 .</li>
<li>Maven 3.3+</li>
<li>idea 2019.1.2</li>
</ul>
<p>**Maven的配置教程: **</p>
<p><a href="https://qingling.icu/posts/26768.html">Maven配置文件settings.xml | The Blog (qingling.icu)</a></p>
<p><a href="https://qingling.icu/posts/63333.html">开发环境的搭建 | The Blog (qingling.icu)</a></p>
<h3 id="2-HelloWorld"><a href="#2-HelloWorld" class="headerlink" title="2.HelloWorld"></a>2.HelloWorld</h3><p><strong>需求:浏览发送&#x2F;hello请求响应 HelloSpring Boot 2</strong> </p>
<p>1创建maven工程</p>
<p><img src="/pictures/image-20230725160846882.png" alt="image-20230725160846882"></p>
<p>2.引入依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">parent</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-parent<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.3.4.RELEASE<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">parent</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- WEB场景的启动器 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependencies</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-web<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependencies</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>3.创建主程序</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.SpringApplication;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.autoconfigure.SpringBootApplication;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/7/25</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@SpringBootApplication</span> <span class="comment">//标注这是一个SpringBoot应用</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MainApplication</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> SpringApplication.run(MainApplication.class,args);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>4.编写Controller</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot.controller;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RestController;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/7/25</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RestController</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">HelloController</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@RequestMapping</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">handle01</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;Hello,Spring Boot2&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<img src="/pictures/image-20230725162201612.png" alt="image-20230725162201612" style="zoom:150%;" />
<h3 id="3-简化配置"><a href="#3-简化配置" class="headerlink" title="3.简化配置"></a>3.简化配置</h3><p>官网地址:<a href="https://docs.spring.io/spring-boot/docs/2.7.14/reference/html/application-properties.html#appendix.application-properties">https://docs.spring.io/spring-boot/docs/2.7.14/reference/html/application-properties.html#appendix.application-properties</a></p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="attr">server.port</span>=<span class="string">8888</span></span><br></pre></td></tr></table></figure>
<h3 id="4-简化部署"><a href="#4-简化部署" class="headerlink" title="4.简化部署"></a>4.简化部署</h3><p>通过在pom.xml文件中插入这个插件,可以直接将项目打成jar包简化部署</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"> <span class="tag">&lt;<span class="name">build</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">plugins</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">plugin</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-maven-plugin<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">plugin</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">plugins</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">build</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230725163026091.png" alt="image-20230725163026091"></p>
<p>可以直接使用cmd切换到target目录下使用<code>java -jar </code>命令运行jar包</p>
<p><img src="/pictures/image-20230725163212347.png" alt="image-20230725163212347"></p>
<p><strong>注意点</strong></p>
<p>去掉cmd的快速编辑模式不去掉启动的时候点击屏幕会停止</p>
<p><img src="/pictures/image-20230725164124574.png" alt="image-20230725164124574"></p>
<h2 id="4-了解自动装配原理"><a href="#4-了解自动装配原理" class="headerlink" title="4.了解自动装配原理"></a>4.了解自动装配原理</h2><h3 id="4-1-依赖管理"><a href="#4-1-依赖管理" class="headerlink" title="4.1 依赖管理"></a>4.1 依赖管理</h3><h4 id="1-SpringBoot的自动版本仲裁机制"><a href="#1-SpringBoot的自动版本仲裁机制" class="headerlink" title="1.SpringBoot的自动版本仲裁机制"></a><strong>1.SpringBoot的自动版本仲裁机制</strong></h4><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 项目的继承的父项目--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">parent</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-parent<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.3.4.RELEASE<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">parent</span>&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- 父项目继承的父项目--&gt;</span></span><br><span class="line"><span class="comment">&lt;!--几乎声明了开发中常用依赖的版本号--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">parent</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-dependencies<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.3.4.RELEASE<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">parent</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230725165414051.png" alt="image-20230725165414051"></p>
<p><strong>自定义mysql版本驱动</strong></p>
<p>在父依赖中mysql是8版本的</p>
<p><img src="/pictures/image-20230725170329032.png" alt="image-20230725170329032"></p>
<p>可以在pom.xml中通过自定义properties修改版本</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">properties</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--重写mysql的版本号--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">mysql.version</span>&gt;</span>5.1.43<span class="tag">&lt;/<span class="name">mysql.version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">properties</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230725170257030.png" alt="image-20230725170257030"></p>
<h4 id="2-Starters场景启动器"><a href="#2-Starters场景启动器" class="headerlink" title="2.Starters场景启动器"></a>2.Starters场景启动器</h4><p>官网: <a href="https://docs.spring.io/spring-boot/docs/2.7.14/reference/html/using.html#using.build-systems.starters">https://docs.spring.io/spring-boot/docs/2.7.14/reference/html/using.html#using.build-systems.starters</a></p>
<p><strong>以<code>spring-boot-starter-*</code>起头的starter为官方提供的starter<code>*-spring-boot-starter</code>为第三方提供的starter</strong></p>
<p>常见的Starter</p>
<p><img src="/pictures/image-20230725171130925.png" alt="image-20230725171130925"></p>
<p>以引入<code>spring-boot-starter-web</code>为例引入该starter它会帮我们引入以下的其它依赖</p>
<p><img src="/pictures/image-20230725171550618.png" alt="image-20230725171550618"></p>
<h3 id="4-2-自动配置"><a href="#4-2-自动配置" class="headerlink" title="4.2 自动配置"></a>4.2 自动配置</h3><ul>
<li><p><strong>自动配置Tomcat</strong></p>
<ol>
<li><p>引入依赖</p>
<p><img src="/pictures/image-20230725172719608.png" alt="image-20230725172719608"></p>
</li>
<li><p>配置Tomcat</p>
</li>
</ol>
</li>
<li><p><strong>自动配置SpringMvc</strong></p>
<ol>
<li><p>引入springMvc全套组件</p>
</li>
<li><p>自动配置好springMvc的常用组件字符编码文件上传解析器dispatcherServlet等</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@SpringBootApplication</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MainApplication</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//返回ioc容器</span></span><br><span class="line"> <span class="type">ConfigurableApplicationContext</span> <span class="variable">run</span> <span class="operator">=</span> SpringApplication.run(MainApplication.class, args);</span><br><span class="line"> <span class="comment">//获取容器里面组件的名字</span></span><br><span class="line"> String[] beanDefinitionNames = run.getBeanDefinitionNames();</span><br><span class="line"> <span class="keyword">for</span> (String beanDefinitionName : beanDefinitionNames) &#123;</span><br><span class="line"> <span class="comment">//打印容器内的组件</span></span><br><span class="line"> System.out.println(beanDefinitionName);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230725172834666.png" alt="image-20230725172834666"></p>
</li>
</ol>
</li>
<li><p><strong>默认的包结构</strong></p>
<p>主程序所在的包以及其的子包都可以被扫描到,无需配置包扫描</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">com</span><br><span class="line"> +- example</span><br><span class="line"> +- myapplication</span><br><span class="line"> +- MyApplication.java #主程序</span><br><span class="line"> |</span><br><span class="line"> +- customer</span><br><span class="line"> | +- Customer.java</span><br><span class="line"> | +- CustomerController.java</span><br><span class="line"> | +- CustomerService.java</span><br><span class="line"> | +- CustomerRepository.java</span><br><span class="line"> |</span><br><span class="line"> +- order</span><br><span class="line"> +- Order.java</span><br><span class="line"> +- OrderController.java</span><br><span class="line"> +- OrderService.java</span><br><span class="line"> +- OrderRepository.java</span><br></pre></td></tr></table></figure>
<p>如果需要扫描的文件在主程序的上级目录,我们也想扫描到它,我们需要扩大一下包的扫描范围</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@SpringBootApplication(scanBasePackages = &quot;com.atguigu&quot;)</span></span><br><span class="line">或者</span><br><span class="line"><span class="meta">@ComponentScan(&quot;com.atguigu&quot;)</span></span><br></pre></td></tr></table></figure>
</li>
<li><p><strong>各种配置拥有默认值</strong></p>
<p><img src="/pictures/image-20230725174350129.png" alt="image-20230725174350129"></p>
</li>
<li><p><strong>按需加载所有的自动配置项</strong></p>
<p>spingboot的所有配置存在于下面的这个依赖中</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-autoconfigure<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.3.4.RELEASE<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">scope</span>&gt;</span>compile<span class="tag">&lt;/<span class="name">scope</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230725175010683.png" alt="image-20230725175010683"></p>
</li>
</ul>
<h3 id="4-3-容器功能"><a href="#4-3-容器功能" class="headerlink" title="4.3 容器功能"></a>4.3 容器功能</h3><h4 id="1-组件添加"><a href="#1-组件添加" class="headerlink" title="1.组件添加"></a>1.组件添加</h4><h5 id="1-1-Configuration"><a href="#1-1-Configuration" class="headerlink" title="1.1 @Configuration"></a>1.1 @Configuration</h5><ul>
<li><p>基本使用</p>
</li>
<li><p><strong>Full模式与Lite模式</strong></p>
</li>
<li><ul>
<li>示例</li>
<li>最佳实战</li>
</ul>
</li>
<li><ul>
<li><ul>
<li>配置 类组件之间无依赖关系用Lite模式加速容器启动过程减少判断</li>
<li>配置类组件之间有依赖关系方法会被调用得到之前单实例组件用Full模式</li>
</ul>
</li>
</ul>
</li>
</ul>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 1、配置类里面使用<span class="doctag">@Bean</span>标注在方法上给容器注册组件,默认也是单实例的</span></span><br><span class="line"><span class="comment"> * 2、配置类本身也是组件</span></span><br><span class="line"><span class="comment"> * 3、proxyBeanMethods代理bean的方法</span></span><br><span class="line"><span class="comment"> * Full(proxyBeanMethods = true)、【保证每个<span class="doctag">@Bean</span>方法被调用多少次返回的组件都是单实例的】</span></span><br><span class="line"><span class="comment"> * Lite(proxyBeanMethods = false)【每个<span class="doctag">@Bean</span>方法被调用多少次返回的组件都是新创建的】</span></span><br><span class="line"><span class="comment"> * 组件依赖必须使用Full模式默认。其他默认是否Lite模式</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Configuration(proxyBeanMethods = false)</span> <span class="comment">//告诉SpringBoot这是一个配置类 == 配置文件</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MyConfig</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Full:外部无论对配置类中的这个组件注册方法调用多少次获取的都是之前注册容器中的单实例对象</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Bean</span> <span class="comment">//给容器中添加组件。以方法名作为组件的id。返回类型就是组件类型。返回的值就是组件在容器中的实例</span></span><br><span class="line"> <span class="keyword">public</span> User <span class="title function_">user01</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="type">User</span> <span class="variable">zhangsan</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;zhangsan&quot;</span>, <span class="number">18</span>);</span><br><span class="line"> <span class="comment">//user组件依赖了Pet组件</span></span><br><span class="line"> zhangsan.setPet(tomcatPet());</span><br><span class="line"> <span class="keyword">return</span> zhangsan;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Bean(&quot;tom&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> Pet <span class="title function_">tomcatPet</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">Pet</span>(<span class="string">&quot;tomcat&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@SpringBootConfiguration</span></span><br><span class="line"><span class="meta">@EnableAutoConfiguration</span></span><br><span class="line"><span class="meta">@ComponentScan(&quot;com.atguigu.boot&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MainApplication</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//1、返回我们IOC容器</span></span><br><span class="line"> <span class="type">ConfigurableApplicationContext</span> <span class="variable">run</span> <span class="operator">=</span> SpringApplication.run(MainApplication.class, args);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//2、查看容器里面的组件</span></span><br><span class="line"> String[] names = run.getBeanDefinitionNames();</span><br><span class="line"> <span class="keyword">for</span> (String name : names) &#123;</span><br><span class="line"> System.out.println(name);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//3、从容器中获取组件</span></span><br><span class="line"></span><br><span class="line"> <span class="type">Pet</span> <span class="variable">tom01</span> <span class="operator">=</span> run.getBean(<span class="string">&quot;tom&quot;</span>, Pet.class);</span><br><span class="line"></span><br><span class="line"> <span class="type">Pet</span> <span class="variable">tom02</span> <span class="operator">=</span> run.getBean(<span class="string">&quot;tom&quot;</span>, Pet.class);</span><br><span class="line"></span><br><span class="line"> System.out.println(<span class="string">&quot;组件:&quot;</span>+(tom01 == tom02));</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">//4、com.atguigu.boot.config.MyConfig$$EnhancerBySpringCGLIB$$51f1e1ca@1654a892</span></span><br><span class="line"> <span class="type">MyConfig</span> <span class="variable">bean</span> <span class="operator">=</span> run.getBean(MyConfig.class);</span><br><span class="line"> System.out.println(bean);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//如果@Configuration(proxyBeanMethods = true)代理对象调用方法。SpringBoot总会检查这个组件是否在容器中有。</span></span><br><span class="line"> <span class="comment">//保持组件单实例</span></span><br><span class="line"> <span class="type">User</span> <span class="variable">user</span> <span class="operator">=</span> bean.user01();</span><br><span class="line"> <span class="type">User</span> <span class="variable">user1</span> <span class="operator">=</span> bean.user01();</span><br><span class="line"> System.out.println(user == user1);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="type">User</span> <span class="variable">user01</span> <span class="operator">=</span> run.getBean(<span class="string">&quot;user01&quot;</span>, User.class);</span><br><span class="line"> <span class="type">Pet</span> <span class="variable">tom</span> <span class="operator">=</span> run.getBean(<span class="string">&quot;tom&quot;</span>, Pet.class);</span><br><span class="line"></span><br><span class="line"> System.out.println(<span class="string">&quot;用户的宠物:&quot;</span>+(user01.getPet() == tom));</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h5 id="1-2-Bean-Component-Controller-Service-Repository"><a href="#1-2-Bean-Component-Controller-Service-Repository" class="headerlink" title="1.2 @Bean @Component @Controller @Service @Repository"></a>1.2 @Bean @Component @Controller @Service @Repository</h5><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//默认是单实例的</span></span><br><span class="line"><span class="meta">@Bean</span><span class="comment">//给容器中添加组件以方法名作为组件的id(组件名),返回类型就是组件类型,返回的值,就是组件在容器中的实例,@Bean(&quot;user&quot;) 是自定义组件名为user</span></span><br><span class="line"><span class="keyword">public</span> User <span class="title function_">user01</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">User</span>(<span class="string">&quot;Tom&quot;</span>,<span class="number">100</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h5 id="1-3-ComponentScan-Import"><a href="#1-3-ComponentScan-Import" class="headerlink" title="1.3 @ComponentScan @Import"></a>1.3 @ComponentScan @Import</h5><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * @Import(&#123;User.class, DBHelper.class&#125;) 给容器中自动创建出这两个类型的组件、默认组件的名字就是全类名</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Import(&#123;User.class, DBHelper.class&#125;)</span></span><br><span class="line"><span class="meta">@Configuration(proxyBeanMethods = false)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MyConfig</span> &#123;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h5 id="1-4-Conditional-条件装配满足Conditional指定的条件则进行组件注入"><a href="#1-4-Conditional-条件装配满足Conditional指定的条件则进行组件注入" class="headerlink" title="1.4 @Conditional 条件装配满足Conditional指定的条件则进行组件注入"></a>1.4 @Conditional 条件装配满足Conditional指定的条件则进行组件注入</h5><p><img src="/pictures/image-20230802141422751.png" alt="image-20230802141422751"></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//放在类上面,条件成立,这个类下面的所有配置生效,放在方法上面,条件成立,这个方法下的配置才会成立</span></span><br><span class="line"><span class="meta">@ConditionalOnBean(name = &quot;tom&quot;)</span> <span class="comment">//存在一个id为tom的组件的时候才会生效</span></span><br><span class="line"><span class="meta">@ConditionalOnMissingBean(name = &quot;tom&quot;)</span></span><br></pre></td></tr></table></figure>
<h4 id="2-原生配置文件的引入"><a href="#2-原生配置文件的引入" class="headerlink" title="2.原生配置文件的引入"></a>2.原生配置文件的引入</h4><h5 id="2-1、-ImportResource"><a href="#2-1、-ImportResource" class="headerlink" title="2.1、@ImportResource"></a>2.1、@ImportResource</h5><p>beans.xml*</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;?xml version=<span class="string">&quot;1.0&quot;</span> encoding=<span class="string">&quot;UTF-8&quot;</span>?&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">beans</span> <span class="attr">xmlns</span>=<span class="string">&quot;http://www.springframework.org/schema/beans&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">xmlns:xsi</span>=<span class="string">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">xmlns:context</span>=<span class="string">&quot;http://www.springframework.org/schema/context&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">xsi:schemaLocation</span>=<span class="string">&quot;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">bean</span> <span class="attr">id</span>=<span class="string">&quot;haha&quot;</span> <span class="attr">class</span>=<span class="string">&quot;com.atguigu.boot.bean.User&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">property</span> <span class="attr">name</span>=<span class="string">&quot;name&quot;</span> <span class="attr">value</span>=<span class="string">&quot;zhangsan&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">property</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">property</span> <span class="attr">name</span>=<span class="string">&quot;age&quot;</span> <span class="attr">value</span>=<span class="string">&quot;18&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">property</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">bean</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">bean</span> <span class="attr">id</span>=<span class="string">&quot;hehe&quot;</span> <span class="attr">class</span>=<span class="string">&quot;com.atguigu.boot.bean.Pet&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">property</span> <span class="attr">name</span>=<span class="string">&quot;name&quot;</span> <span class="attr">value</span>=<span class="string">&quot;tomcat&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">property</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">bean</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">beans</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>在java类中红使用@ImportResource(“classpath:beans.xml”)导入上面的配置文件</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@ImportResource(&quot;classpath:beans.xml&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MyConfig</span> &#123;&#125;</span><br></pre></td></tr></table></figure>
<h4 id="3-配置绑定"><a href="#3-配置绑定" class="headerlink" title="3.配置绑定"></a>3.配置绑定</h4><h5 id="3-1-ConfigurationProperties"><a href="#3-1-ConfigurationProperties" class="headerlink" title="3.1 @ConfigurationProperties"></a>3.1 @ConfigurationProperties</h5><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 只有在容器中的组件才会拥有SpringBoot提供的强大功能</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Component</span> <span class="comment">//或者在配置类上添加@EnableConfigurationProperties(Car.class)注解,不使用@Component</span></span><br><span class="line"><span class="meta">@ConfigurationProperties(prefix = &quot;mycar&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Car</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String brand;</span><br><span class="line"> <span class="keyword">private</span> Integer price;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">getBrand</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> brand;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">setBrand</span><span class="params">(String brand)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.brand = brand;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> Integer <span class="title function_">getPrice</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> price;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">setPrice</span><span class="params">(Integer price)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.price = price;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">toString</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;Car&#123;&quot;</span> +</span><br><span class="line"> <span class="string">&quot;brand=&#x27;&quot;</span> + brand + <span class="string">&#x27;\&#x27;&#x27;</span> +</span><br><span class="line"> <span class="string">&quot;, price=&quot;</span> + price +</span><br><span class="line"> <span class="string">&#x27;&#125;&#x27;</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>配置文件中的值</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="attr">mycar.brand</span>=<span class="string">BYD</span></span><br><span class="line"><span class="attr">mycar.price</span>=<span class="string">120000</span></span><br></pre></td></tr></table></figure>
<p>编写测试的controller</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Autowired</span></span><br><span class="line"><span class="keyword">private</span> Car car;</span><br><span class="line"><span class="meta">@RequestMapping(&quot;/car&quot;)</span></span><br><span class="line"><span class="keyword">public</span> Car <span class="title function_">ggetCar</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> car;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<img src="/pictures/image-20230802153951542.png" alt="image-20230802153951542" style="zoom: 150%;" />
<h3 id="4-4-自动配置原理入门"><a href="#4-4-自动配置原理入门" class="headerlink" title="4.4 自动配置原理入门"></a>4.4 自动配置原理入门</h3><h4 id="1-引导加载自动配置类"><a href="#1-引导加载自动配置类" class="headerlink" title="1.引导加载自动配置类"></a>1.引导加载自动配置类</h4><p><strong>@SpringBootApplication</strong></p>
<p><img src="/pictures/image-20230802155222746.png" alt="image-20230802155222746"></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@SpringBootConfiguration</span> <span class="comment">//代表当前是一个配置类</span></span><br><span class="line"><span class="meta">@EnableAutoConfiguration</span> </span><br><span class="line"><span class="meta">@ComponentScan(excludeFilters = &#123; @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class),</span></span><br><span class="line"><span class="meta"> @Filter(type = FilterType.CUSTOM, classes = AutoConfigurationExcludeFilter.class) &#125;)</span><span class="comment">//指定扫描那些spring注解</span></span><br><span class="line"><span class="keyword">public</span> <span class="meta">@interface</span> SpringBootApplication&#123;&#125;</span><br></pre></td></tr></table></figure>
<p><strong>@EnableAutoConfiguration</strong> </p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@AutoConfigurationPackage</span></span><br><span class="line"><span class="meta">@Import(AutoConfigurationImportSelector.class)</span></span><br><span class="line"><span class="keyword">public</span> <span class="meta">@interface</span> EnableAutoConfiguration &#123;&#125;</span><br></pre></td></tr></table></figure>
<p><strong>@AutoConfigurationPackage</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Import(AutoConfigurationPackages.Registrar.class)</span></span><br><span class="line"><span class="keyword">public</span> <span class="meta">@interface</span> AutoConfigurationPackage &#123;&#125;</span><br></pre></td></tr></table></figure>
<p><strong>Registrar.class</strong></p>
<p><img src="/pictures/image-20230802160618158.png" alt="image-20230802160618158"></p>
<p><strong>利用Registrar给容器中导入com.atguigu.boot主程序所在的包包下的一系列组件</strong></p>
<p><img src="/pictures/image-20230802161004735.png" alt="image-20230802161004735"></p>
<p><strong>@Import(AutoConfigurationImportSelector.class)</strong> </p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="number">1</span>、利用getAutoConfigurationEntry(annotationMetadata);给容器中批量导入一些组件</span><br><span class="line"><span class="number">2</span>、调用List&lt;String&gt; configurations = getCandidateConfigurations(annotationMetadata, attributes)获取到所有需要导入到容器中的配置类</span><br><span class="line"><span class="number">3</span>、利用工厂加载 Map&lt;String, List&lt;String&gt;&gt; <span class="title function_">loadSpringFactories</span><span class="params">(<span class="meta">@Nullable</span> ClassLoader classLoader)</span>;得到所有的组件</span><br><span class="line"><span class="number">4</span>、从META-INF/spring.factories位置来加载一个文件。</span><br><span class="line"> 默认扫描我们当前系统里面所有META-INF/spring.factories位置的文件</span><br><span class="line"> spring-boot-autoconfigure-<span class="number">2.3</span><span class="number">.4</span>.RELEASE.jar包里面也有META-INF/spring.factories</span><br></pre></td></tr></table></figure>
<p><strong>AutoConfigurationImportSelector.java</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="keyword">public</span> String[] selectImports(AnnotationMetadata annotationMetadata) &#123;</span><br><span class="line"> <span class="keyword">if</span> (!isEnabled(annotationMetadata)) &#123;</span><br><span class="line"> <span class="keyword">return</span> NO_IMPORTS;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">AutoConfigurationEntry</span> <span class="variable">autoConfigurationEntry</span> <span class="operator">=</span> getAutoConfigurationEntry(annotationMetadata);</span><br><span class="line"> <span class="keyword">return</span> StringUtils.toStringArray(autoConfigurationEntry.getConfigurations());</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>getAutoConfigurationEntry()方法</strong></p>
<p>利用getAutoConfigurationEntry(annotationMetadata);给容器中批量导入一些组件</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">protected</span> AutoConfigurationEntry <span class="title function_">getAutoConfigurationEntry</span><span class="params">(AnnotationMetadata annotationMetadata)</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (!isEnabled(annotationMetadata)) &#123;</span><br><span class="line"> <span class="keyword">return</span> EMPTY_ENTRY;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">AnnotationAttributes</span> <span class="variable">attributes</span> <span class="operator">=</span> getAttributes(annotationMetadata);</span><br><span class="line"> List&lt;String&gt; configurations = getCandidateConfigurations(annotationMetadata, attributes);</span><br><span class="line"> configurations = removeDuplicates(configurations);</span><br><span class="line"> Set&lt;String&gt; exclusions = getExclusions(annotationMetadata, attributes);</span><br><span class="line"> checkExcludedClasses(configurations, exclusions);</span><br><span class="line"> configurations.removeAll(exclusions);</span><br><span class="line"> configurations = getConfigurationClassFilter().filter(configurations);</span><br><span class="line"> fireAutoConfigurationImportEvents(configurations, exclusions);</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">AutoConfigurationEntry</span>(configurations, exclusions);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>**getCandidateConfigurations()**获取所有候选的配置</p>
<p>调用List<String> configurations &#x3D; getCandidateConfigurations(annotationMetadata, attributes)获取到所有需要导入到容器中的配置类</p>
<p><img src="/pictures/image-20230802162236987.png" alt="image-20230802162236987"></p>
<p><strong>loadSpringFactories()</strong></p>
<p>利用工厂加载 Map&lt;String, List<String>&gt; loadSpringFactories(@Nullable ClassLoader classLoader);得到所有的组件</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">private</span> <span class="keyword">static</span> Map&lt;String, List&lt;String&gt;&gt; <span class="title function_">loadSpringFactories</span><span class="params">(<span class="meta">@Nullable</span> ClassLoader classLoader)</span> &#123;</span><br><span class="line"> MultiValueMap&lt;String, String&gt; result = (MultiValueMap)cache.get(classLoader);</span><br><span class="line"> <span class="keyword">if</span> (result != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> result;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> Enumeration&lt;URL&gt; urls = classLoader != <span class="literal">null</span> ? classLoader.getResources(<span class="string">&quot;META-INF/spring.factories&quot;</span>) : ClassLoader.getSystemResources(<span class="string">&quot;META-INF/spring.factories&quot;</span>);</span><br><span class="line"> MultiValueMap&lt;String, String&gt; result = <span class="keyword">new</span> <span class="title class_">LinkedMultiValueMap</span>();</span><br><span class="line"></span><br><span class="line"> <span class="keyword">while</span>(urls.hasMoreElements()) &#123;</span><br><span class="line"> <span class="type">URL</span> <span class="variable">url</span> <span class="operator">=</span> (URL)urls.nextElement();</span><br><span class="line"> <span class="type">UrlResource</span> <span class="variable">resource</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">UrlResource</span>(url);</span><br><span class="line"> <span class="type">Properties</span> <span class="variable">properties</span> <span class="operator">=</span> PropertiesLoaderUtils.loadProperties(resource);</span><br><span class="line"> <span class="type">Iterator</span> <span class="variable">var6</span> <span class="operator">=</span> properties.entrySet().iterator();</span><br><span class="line"></span><br><span class="line"> <span class="keyword">while</span>(var6.hasNext()) &#123;</span><br><span class="line"> Map.Entry&lt;?, ?&gt; entry = (Map.Entry)var6.next();</span><br><span class="line"> <span class="type">String</span> <span class="variable">factoryTypeName</span> <span class="operator">=</span> ((String)entry.getKey()).trim();</span><br><span class="line"> String[] var9 = StringUtils.commaDelimitedListToStringArray((String)entry.getValue());</span><br><span class="line"> <span class="type">int</span> <span class="variable">var10</span> <span class="operator">=</span> var9.length;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">for</span>(<span class="type">int</span> <span class="variable">var11</span> <span class="operator">=</span> <span class="number">0</span>; var11 &lt; var10; ++var11) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">factoryImplementationName</span> <span class="operator">=</span> var9[var11];</span><br><span class="line"> result.add(factoryTypeName, factoryImplementationName.trim());</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> cache.put(classLoader, result);</span><br><span class="line"> <span class="keyword">return</span> result;</span><br><span class="line"> &#125; <span class="keyword">catch</span> (IOException var13) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">IllegalArgumentException</span>(<span class="string">&quot;Unable to load factories from location [META-INF/spring.factories]&quot;</span>, var13);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>从META-INF&#x2F;spring.factories位置来加载一个文件。默认扫描我们当前系统里面所有META-INF&#x2F;spring.factories位置的文件,spring-boot-autoconfigure-2.3.4.RELEASE.jar包里面也有META-INF&#x2F;spring.factories</strong></p>
<p><img src="/pictures/image-20230802163429366.png" alt="image-20230802163429366"></p>
<p><strong>在spring.factories这个配置文件中写死了springBoot一启动就要给容器加载的所有配置类一共127个</strong></p>
<p><img src="/pictures/image-20230802163708198.png" alt="image-20230802163708198"></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line"># Initializers</span><br><span class="line">org.springframework.context.ApplicationContextInitializer=\</span><br><span class="line">org.springframework.boot.autoconfigure.SharedMetadataReaderFactoryContextInitializer,\</span><br><span class="line">org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener</span><br><span class="line"></span><br><span class="line"># Application Listeners</span><br><span class="line">org.springframework.context.ApplicationListener=\</span><br><span class="line">org.springframework.boot.autoconfigure.BackgroundPreinitializer</span><br><span class="line"></span><br><span class="line"># Auto Configuration Import Listeners</span><br><span class="line">org.springframework.boot.autoconfigure.AutoConfigurationImportListener=\</span><br><span class="line">org.springframework.boot.autoconfigure.condition.ConditionEvaluationReportAutoConfigurationImportListener</span><br><span class="line"></span><br><span class="line"># Auto Configuration Import Filters</span><br><span class="line">org.springframework.boot.autoconfigure.AutoConfigurationImportFilter=\</span><br><span class="line">org.springframework.boot.autoconfigure.condition.OnBeanCondition,\</span><br><span class="line">org.springframework.boot.autoconfigure.condition.OnClassCondition,\</span><br><span class="line">org.springframework.boot.autoconfigure.condition.OnWebApplicationCondition</span><br><span class="line"></span><br><span class="line"># Auto Configure</span><br><span class="line">org.springframework.boot.autoconfigure.EnableAutoConfiguration=\</span><br><span class="line">org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.aop.AopAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.context.LifecycleAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.cassandra.CassandraReactiveDataAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.cassandra.CassandraReactiveRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.cassandra.CassandraRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.couchbase.CouchbaseDataAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveDataAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.couchbase.CouchbaseRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.elasticsearch.ReactiveElasticsearchRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.elasticsearch.ReactiveElasticsearchRestClientAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.jdbc.JdbcRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.ldap.LdapRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.mongo.MongoReactiveDataAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.mongo.MongoReactiveRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.mongo.MongoRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.solr.SolrRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.r2dbc.R2dbcDataAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.r2dbc.R2dbcRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.r2dbc.R2dbcTransactionManagerAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.hateoas.HypermediaAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.hazelcast.HazelcastJpaDependencyAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.http.codec.CodecsAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.influx.InfluxDbAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.jdbc.XADataSourceAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.jms.JndiConnectionFactoryAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.jooq.JooqAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.jsonb.JsonbAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.availability.ApplicationAvailabilityAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.mail.MailSenderAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.mail.MailSenderValidatorAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.r2dbc.R2dbcAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.rsocket.RSocketRequesterAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.rsocket.RSocketServerAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.rsocket.RSocketStrategiesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.security.rsocket.RSocketSecurityAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.security.saml2.Saml2RelyingPartyAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.sendgrid.SendGridAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.session.SessionAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.security.oauth2.client.reactive.ReactiveOAuth2ClientAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.security.oauth2.resource.reactive.ReactiveOAuth2ResourceServerAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.embedded.EmbeddedWebServerFactoryCustomizerAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.reactive.ReactiveWebServerFactoryAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.reactive.function.client.ClientHttpConnectorAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.websocket.reactive.WebSocketReactiveAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.websocket.servlet.WebSocketServletAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.websocket.servlet.WebSocketMessagingAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.webservices.WebServicesAutoConfiguration,\</span><br><span class="line">org.springframework.boot.autoconfigure.webservices.client.WebServiceTemplateAutoConfiguration</span><br><span class="line"></span><br><span class="line"># Failure analyzers</span><br><span class="line">org.springframework.boot.diagnostics.FailureAnalyzer=\</span><br><span class="line">org.springframework.boot.autoconfigure.data.redis.RedisUrlSyntaxFailureAnalyzer,\</span><br><span class="line">org.springframework.boot.autoconfigure.diagnostics.analyzer.NoSuchBeanDefinitionFailureAnalyzer,\</span><br><span class="line">org.springframework.boot.autoconfigure.flyway.FlywayMigrationScriptMissingFailureAnalyzer,\</span><br><span class="line">org.springframework.boot.autoconfigure.jdbc.DataSourceBeanCreationFailureAnalyzer,\</span><br><span class="line">org.springframework.boot.autoconfigure.jdbc.HikariDriverConfigurationFailureAnalyzer,\</span><br><span class="line">org.springframework.boot.autoconfigure.r2dbc.ConnectionFactoryBeanCreationFailureAnalyzer,\</span><br><span class="line">org.springframework.boot.autoconfigure.session.NonUniqueSessionRepositoryFailureAnalyzer</span><br><span class="line"></span><br><span class="line"># Template availability providers</span><br><span class="line">org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider=\</span><br><span class="line">org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider,\</span><br><span class="line">org.springframework.boot.autoconfigure.mustache.MustacheTemplateAvailabilityProvider,\</span><br><span class="line">org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAvailabilityProvider,\</span><br><span class="line">org.springframework.boot.autoconfigure.thymeleaf.ThymeleafTemplateAvailabilityProvider,\</span><br><span class="line">org.springframework.boot.autoconfigure.web.servlet.JspTemplateAvailabilityProvider</span><br></pre></td></tr></table></figure>
<h4 id="2-按需开启自动配置项"><a href="#2-按需开启自动配置项" class="headerlink" title="2.按需开启自动配置项"></a>2.按需开启自动配置项</h4><p> 虽然我们127个场景的所有自动配置启动的时候默认全部加载。xxxxAutoConfiguration,按照条件装配规则(@Conditional),最终会按需配置,比如下面的配置是否生效还要通过@Conditional的条件判断。</p>
<p><strong>简单的一句话:启动的时候加载所有,使用的时候按照条件(@Conditional)进行装配</strong></p>
<p><img src="/pictures/image-20230802164424689.png" alt="image-20230802164424689"></p>
<h4 id="3-修改默认配置"><a href="#3-修改默认配置" class="headerlink" title="3.修改默认配置"></a>3.修改默认配置</h4><p> 相当于当我们在容器中注入了类型为MultipartResolver但是id不为multipartResolver的组件的时候会帮我们规范一下命名命名为multipartResolver。</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Bean</span></span><br><span class="line"><span class="meta">@ConditionalOnBean(MultipartResolver.class)</span> <span class="comment">//存在MultipartResolver类型的组件</span></span><br><span class="line"><span class="meta">@ConditionalOnMissingBean(name = DispatcherServlet.MULTIPART_RESOLVER_BEAN_NAME)</span><span class="comment">//不存在以multipartResolver为id的组件</span></span><br><span class="line"><span class="keyword">public</span> MultipartResolver <span class="title function_">multipartResolver</span><span class="params">(MultipartResolver resolver)</span> &#123;</span><br><span class="line"> <span class="comment">// Detect if the user has created a MultipartResolver but named it incorrectly</span></span><br><span class="line"> <span class="keyword">return</span> resolver;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>SpringBoot默认会在底层配好所有的组件。但是如果用户自己配置了以用户的优先</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Bean</span></span><br><span class="line"><span class="meta">@ConditionalOnMissingBean</span> <span class="comment">//没有的话就将这个配置注入到容器中</span></span><br><span class="line"><span class="keyword">public</span> CharacterEncodingFilter <span class="title function_">characterEncodingFilter</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">CharacterEncodingFilter</span> <span class="variable">filter</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">OrderedCharacterEncodingFilter</span>();</span><br><span class="line"> filter.setEncoding(<span class="built_in">this</span>.properties.getCharset().name());</span><br><span class="line"> filter.setForceRequestEncoding(<span class="built_in">this</span>.properties.shouldForce(Encoding.Type.REQUEST));</span><br><span class="line"> filter.setForceResponseEncoding(<span class="built_in">this</span>.properties.shouldForce(Encoding.Type.RESPONSE));</span><br><span class="line"> <span class="keyword">return</span> filter;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>总结:</p>
<ul>
<li><p>SpringBoot先加载所有的自动配置类 xxxxxAutoConfiguration</p>
</li>
<li><p>每个自动配置类按照条件进行生效默认都会绑定配置文件指定的值。xxxxProperties里面拿。xxxProperties和配置文件进行了绑定</p>
</li>
<li><p>生效的配置类就会给容器中装配很多组件</p>
</li>
<li><p>只要容器中有这些组件,相当于这些功能就有了</p>
</li>
<li><p>定制化配置</p>
</li>
<li><ul>
<li>用户直接自己@Bean替换底层的组件</li>
<li>用户去看这个组件是获取的配置文件什么值就去修改。</li>
</ul>
</li>
</ul>
<p>xxxxxAutoConfiguration —&gt; 组件 —&gt; xxxxProperties取值 —-&gt; application.properties</p>
<h4 id="3-4-最佳实践"><a href="#3-4-最佳实践" class="headerlink" title="3.4.最佳实践"></a>3.4.最佳实践</h4><ul>
<li><p>引入场景依赖</p>
</li>
<li><ul>
<li><a href="https://docs.spring.io/spring-boot/docs/current/reference/html/using-spring-boot.html#using-boot-starter">https://docs.spring.io/spring-boot/docs/current/reference/html/using-spring-boot.html#using-boot-starter</a></li>
</ul>
</li>
<li><p>查看自动配置了哪些(选做)</p>
</li>
<li><ul>
<li>自己分析,引入场景对应的自动配置一般都生效了</li>
<li>配置文件中<strong>debug&#x3D;true开启自动配置报告</strong>。Negative不生效\Positive生效</li>
</ul>
</li>
<li><p>是否需要修改</p>
</li>
<li><ul>
<li>参照文档修改配置项</li>
</ul>
</li>
<li><ul>
<li><ul>
<li><a href="https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-application-properties.html#common-application-properties">https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-application-properties.html#common-application-properties</a></li>
<li>自己分析。xxxxProperties绑定了配置文件的哪些。</li>
</ul>
</li>
</ul>
</li>
<li><ul>
<li>自定义加入或者替换组件</li>
</ul>
</li>
<li><ul>
<li><ul>
<li>@Bean、@Component。。。</li>
</ul>
</li>
</ul>
</li>
<li><ul>
<li>自定义器 <strong>XXXXXCustomizer</strong></li>
</ul>
</li>
</ul>
<h3 id="4-5-简化开发"><a href="#4-5-简化开发" class="headerlink" title="4.5 简化开发"></a>4.5 简化开发</h3><h4 id="1-Lombok"><a href="#1-Lombok" class="headerlink" title="1.Lombok"></a>1.Lombok</h4><p>引入依赖(使用前需要安装插件)</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.projectlombok<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>lombok<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>注解</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@NoArgsConstructor</span> <span class="comment">//无参构造器</span></span><br><span class="line"><span class="meta">@AllArgsConstructor</span> <span class="comment">//有参构造器</span></span><br><span class="line"><span class="meta">@Data</span> <span class="comment">//getter和setter方法</span></span><br><span class="line"><span class="meta">@ToString</span> </span><br><span class="line"><span class="meta">@EqualsAndHashCode</span></span><br></pre></td></tr></table></figure>
<h4 id="2-简化日志开发"><a href="#2-简化日志开发" class="headerlink" title="2.简化日志开发"></a>2.简化日志开发</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Slf4j</span></span><br></pre></td></tr></table></figure>
<h3 id="3-dev-tools"><a href="#3-dev-tools" class="headerlink" title="3.dev-tools"></a>3.dev-tools</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-devtools<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">optional</span>&gt;</span>true<span class="tag">&lt;/<span class="name">optional</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>项目或者页面修改以后Ctrl+F9</p>
<h3 id="4-Spring-Initailizr项目初始化向导"><a href="#4-Spring-Initailizr项目初始化向导" class="headerlink" title="4.Spring Initailizr项目初始化向导"></a>4.Spring Initailizr项目初始化向导</h3><p><img src="/pictures/image-20230803103657995.png" alt="image-20230803103657995"></p>
<p><img src="/pictures/image-20230803104032505.png" alt="image-20230803104032505"></p>
<p><img src="/pictures/image-20230803104655578.png" alt="image-20230803104655578"></p>
<h1 id=""><a href="#" class="headerlink" title=""></a></h1><h1 id="二-SpringBoot2核心技术-核心功能"><a href="#二-SpringBoot2核心技术-核心功能" class="headerlink" title="二.SpringBoot2核心技术-核心功能"></a>二.SpringBoot2核心技术-核心功能</h1><p><img src="/pictures/image-20230803104919434.png" alt="image-20230803104919434"></p>
<h2 id="一-配置文件"><a href="#一-配置文件" class="headerlink" title="一.配置文件"></a>一.配置文件</h2><h3 id="1、文件类型"><a href="#1、文件类型" class="headerlink" title="1、文件类型"></a>1、文件类型</h3><h4 id="1-1、properties"><a href="#1-1、properties" class="headerlink" title="1.1、properties"></a>1.1、properties</h4><p>同以前的properties用法</p>
<h4 id="1-2、yaml"><a href="#1-2、yaml" class="headerlink" title="1.2、yaml"></a>1.2、yaml</h4><h5 id="1-2-1、简介"><a href="#1-2-1、简介" class="headerlink" title="1.2.1、简介"></a>1.2.1、简介</h5><p>YAML 是 “YAML Aint Markup Language”YAML 不是一种标记语言的递归缩写。在开发的这种语言时YAML 的意思其实是”Yet Another Markup Language”仍是一种标记语言。 </p>
<p>非常适合用来做以数据为中心的配置文件</p>
<h5 id="1-2-2、基本语法"><a href="#1-2-2、基本语法" class="headerlink" title="1.2.2、基本语法"></a>1.2.2、基本语法</h5><ul>
<li>key: valuekv之间有空格</li>
<li>大小写敏感</li>
<li>使用缩进表示层级关系</li>
<li>缩进不允许使用tab只允许空格</li>
<li>缩进的空格数不重要,只要相同层级的元素左对齐即可</li>
<li>#’表示注释</li>
<li>字符串无需加引号,如果要加,’’与””表示字符串内容 会被 转义&#x2F;不转义</li>
</ul>
<h5 id="1-2-3、数据类型"><a href="#1-2-3、数据类型" class="headerlink" title="1.2.3、数据类型"></a>1.2.3、数据类型</h5><ul>
<li>字面量单个的、不可再分的值。date、boolean、string、number、null</li>
</ul>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">k:</span> <span class="string">v</span></span><br></pre></td></tr></table></figure>
<ul>
<li>对象键值对的集合。map、hash、set、object</li>
</ul>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="string">行内写法:</span> <span class="attr">k:</span> &#123;<span class="string">k1:v1</span>,<span class="string">k2:v2</span>,<span class="string">k3:v3</span>&#125;</span><br><span class="line"><span class="comment">#或</span></span><br><span class="line"><span class="attr">k:</span> </span><br><span class="line"> <span class="attr">k1:</span> <span class="string">v1</span></span><br><span class="line"> <span class="attr">k2:</span> <span class="string">v2</span></span><br><span class="line"> <span class="attr">k3:</span> <span class="string">v3</span></span><br></pre></td></tr></table></figure>
<ul>
<li>数组一组按次序排列的值。array、list、queue</li>
</ul>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="string">行内写法:</span> <span class="attr">k:</span> [<span class="string">v1</span>,<span class="string">v2</span>,<span class="string">v3</span>]</span><br><span class="line"><span class="comment">#或者</span></span><br><span class="line"><span class="attr">k:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">v1</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">v2</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">v3</span></span><br></pre></td></tr></table></figure>
<h5 id="1-2-4、示例"><a href="#1-2-4、示例" class="headerlink" title="1.2.4、示例"></a>1.2.4、示例</h5><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@ConfigurationProperties(prefix=&quot;person&quot;)</span><span class="comment">//和以person开头的配置文件绑定</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Person</span> &#123;</span><br><span class="line"> </span><br><span class="line"> <span class="keyword">private</span> String userName;</span><br><span class="line"> <span class="keyword">private</span> Boolean boss;</span><br><span class="line"> <span class="keyword">private</span> Date birth;</span><br><span class="line"> <span class="keyword">private</span> Integer age;</span><br><span class="line"> <span class="keyword">private</span> Pet pet;</span><br><span class="line"> <span class="keyword">private</span> String[] interests;</span><br><span class="line"> <span class="keyword">private</span> List&lt;String&gt; animal;</span><br><span class="line"> <span class="keyword">private</span> Map&lt;String, Object&gt; score;</span><br><span class="line"> <span class="keyword">private</span> Set&lt;Double&gt; salarys;</span><br><span class="line"> <span class="keyword">private</span> Map&lt;String, List&lt;Pet&gt;&gt; allPets;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Pet</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> String name;</span><br><span class="line"> <span class="keyword">private</span> Double weight;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="comment"># yaml表示以上对象</span></span><br><span class="line"><span class="attr">person:</span></span><br><span class="line"><span class="comment"># 单引号会将 \n作为字符串输出 双引号会将\n 作为换行输出</span></span><br><span class="line"><span class="comment"># 双引号不会转义,单引号会转义</span></span><br><span class="line"> <span class="attr">userName:</span> <span class="string">zhangsan</span></span><br><span class="line"> <span class="attr">boss:</span> <span class="literal">false</span></span><br><span class="line"> <span class="attr">birth:</span> <span class="number">2019</span><span class="string">/12/12</span> <span class="number">20</span><span class="string">:12:33</span></span><br><span class="line"> <span class="attr">age:</span> <span class="number">18</span></span><br><span class="line"> <span class="attr">pet:</span> </span><br><span class="line"> <span class="attr">name:</span> <span class="string">tomcat</span></span><br><span class="line"> <span class="attr">weight:</span> <span class="number">23.4</span></span><br><span class="line"> <span class="attr">interests:</span> [<span class="string">篮球</span>,<span class="string">游泳</span>]</span><br><span class="line"> <span class="attr">animal:</span> </span><br><span class="line"> <span class="bullet">-</span> <span class="string">jerry</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">mario</span></span><br><span class="line"> <span class="attr">score:</span></span><br><span class="line"> <span class="attr">english:</span> </span><br><span class="line"> <span class="attr">first:</span> <span class="number">30</span></span><br><span class="line"> <span class="attr">second:</span> <span class="number">40</span></span><br><span class="line"> <span class="attr">third:</span> <span class="number">50</span></span><br><span class="line"> <span class="attr">math:</span> [<span class="number">131</span>,<span class="number">140</span>,<span class="number">148</span>]</span><br><span class="line"> <span class="attr">chinese:</span> &#123;<span class="attr">first:</span> <span class="number">128</span>,<span class="attr">second:</span> <span class="number">136</span>&#125;</span><br><span class="line"> <span class="attr">salarys:</span> [<span class="number">3999</span>,<span class="number">4999.98</span>,<span class="number">5999.99</span>]</span><br><span class="line"> <span class="attr">allPets:</span></span><br><span class="line"> <span class="attr">sick:</span></span><br><span class="line"> <span class="bullet">-</span> &#123;<span class="attr">name:</span> <span class="string">tom</span>&#125;</span><br><span class="line"> <span class="bullet">-</span> &#123;<span class="attr">name:</span> <span class="string">jerry</span>,<span class="attr">weight:</span> <span class="number">47</span>&#125;</span><br><span class="line"> <span class="attr">health:</span> [&#123;<span class="attr">name:</span> <span class="string">mario</span>,<span class="attr">weight:</span> <span class="number">47</span>&#125;]</span><br></pre></td></tr></table></figure>
<h3 id="2、配置提示"><a href="#2、配置提示" class="headerlink" title="2、配置提示"></a>2、配置提示</h3><p>自定义的类和配置文件绑定一般没有提示</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-configuration-processor<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">optional</span>&gt;</span>true<span class="tag">&lt;/<span class="name">optional</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">&lt;!--打包的时候去除这个配置提示器--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">build</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">plugins</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">plugin</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-maven-plugin<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">configuration</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">excludes</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">exclude</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-configuration-processor<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">exclude</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">excludes</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">configuration</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">plugin</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">plugins</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">build</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h2 id="二-Web开发"><a href="#二-Web开发" class="headerlink" title="二.Web开发"></a>二.Web开发</h2><p><img src="/pictures/image-20230803134143859.png" alt="image-20230803134143859"></p>
<h3 id="1-简单的功能分析"><a href="#1-简单的功能分析" class="headerlink" title="1.简单的功能分析"></a>1.简单的功能分析</h3><h4 id="1-1-静态资源访问"><a href="#1-1-静态资源访问" class="headerlink" title="1.1 静态资源访问"></a>1.1 静态资源访问</h4><h5 id="1-静态资源目录"><a href="#1-静态资源目录" class="headerlink" title="1.静态资源目录"></a>1.静态资源目录</h5><p>只要静态资源放在类路径下: <code>/static</code> (or <code>/public</code> or <code>/resources</code> or <code>/META-INF/resources</code></p>
<p>访问 当前项目根路径&#x2F; + 静态资源名 </p>
<p>原理: 静态映射&#x2F;**</p>
<p>请求进来先去找Controller看能不能处理不能处理的所有请求又都交给<strong>静态资源处理器</strong>,静态资源也找不到则响应<strong>404页面</strong></p>
<p><strong>改变默认的静态资源路径</strong></p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">resources:</span></span><br><span class="line"> <span class="attr">static-locations:</span> [<span class="string">classpath:/haha/</span>] <span class="comment">#静态资源的目录</span></span><br></pre></td></tr></table></figure>
<h5 id="2-静态资源访问前缀"><a href="#2-静态资源访问前缀" class="headerlink" title="2.静态资源访问前缀"></a>2.静态资源访问前缀</h5><p>默认无前缀</p>
<p>默认的访问路径: <code>localhost:8080/xxx.png</code></p>
<p>设置访问前缀之后: <code>localhost:8080/res/xxx.png</code> (文件在目录中的位置没有改变只是访问的时候加上了res这一层路径)</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">mvc:</span></span><br><span class="line"> <span class="attr">static-path-pattern:</span> <span class="string">/res/**</span></span><br></pre></td></tr></table></figure>
<p>当前项目 + static-path-pattern + 静态资源名 &#x3D; 静态资源文件夹下找</p>
<h5 id="3-webjar"><a href="#3-webjar" class="headerlink" title="3.webjar"></a>3.webjar</h5><p>自动映射 &#x2F;<a href="http://localhost:8080/webjars/jquery/3.5.1/jquery.js">webjars</a>&#x2F;**</p>
<p><a href="https://www.webjars.org/">https://www.webjars.org/</a></p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.webjars<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>jquery<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>3.5.1<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>访问地址:<a href="http://localhost:8080/webjars/jquery/3.5.1/jquery.js">http://localhost:8080/webjars/jquery/3.5.1/jquery.js</a> 后面地址要按照依赖里面的包路径</p>
<h4 id="1-2-欢迎页支持"><a href="#1-2-欢迎页支持" class="headerlink" title="1.2 欢迎页支持"></a>1.2 欢迎页支持</h4><ul>
<li><p>静态资源路径下 index.html</p>
</li>
<li><ul>
<li>可以配置静态资源路径</li>
<li>但是不可以配置静态资源的访问前缀。否则导致 index.html不能被默认访问</li>
</ul>
</li>
</ul>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"><span class="comment"># mvc:</span></span><br><span class="line"><span class="comment"># static-path-pattern: /res/** 这个会导致welcome page功能失效</span></span><br><span class="line"></span><br><span class="line"> <span class="attr">resources:</span></span><br><span class="line"> <span class="attr">static-locations:</span> [<span class="string">classpath:/haha/</span>]</span><br></pre></td></tr></table></figure>
<ul>
<li>controller能处理&#x2F;index</li>
</ul>
<h4 id="1-3-自定义-Favicon"><a href="#1-3-自定义-Favicon" class="headerlink" title="1.3 自定义 Favicon"></a>1.3 自定义 <code>Favicon</code></h4><p>favicon.ico 放在静态资源目录下即可(名称为favicon.ico)</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"><span class="comment"># mvc:</span></span><br><span class="line"><span class="comment"># static-path-pattern: /res/** 这个会导致 Favicon 功能失效</span></span><br></pre></td></tr></table></figure>
<h4 id="1-4-静态资源配置原理"><a href="#1-4-静态资源配置原理" class="headerlink" title="1.4 静态资源配置原理"></a>1.4 静态资源配置原理</h4><p><strong>1.SpringMvc的自动配置类WebMvcAutoConfiguration</strong></p>
<p><img src="/pictures/image-20230803165113057.png" alt="image-20230803165113057"></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Configuration(proxyBeanMethods = false)</span></span><br><span class="line"><span class="meta">@ConditionalOnWebApplication(type = Type.SERVLET)</span></span><br><span class="line"><span class="meta">@ConditionalOnClass(&#123; Servlet.class, DispatcherServlet.class, WebMvcConfigurer.class &#125;)</span></span><br><span class="line"><span class="meta">@ConditionalOnMissingBean(WebMvcConfigurationSupport.class)</span></span><br><span class="line"><span class="meta">@AutoConfigureOrder(Ordered.HIGHEST_PRECEDENCE + 10)</span></span><br><span class="line"><span class="meta">@AutoConfigureAfter(&#123; DispatcherServletAutoConfiguration.class, TaskExecutionAutoConfiguration.class,</span></span><br><span class="line"><span class="meta"> ValidationAutoConfiguration.class &#125;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WebMvcAutoConfiguration</span> &#123;&#125;</span><br></pre></td></tr></table></figure>
<p><strong>2.SpringMvc给容器中配置的组件</strong></p>
<p><img src="/pictures/image-20230803180257123.png" alt="image-20230803180257123"></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Configuration(proxyBeanMethods = false)</span></span><br><span class="line"><span class="meta">@Import(EnableWebMvcConfiguration.class)</span></span><br><span class="line"><span class="meta">@EnableConfigurationProperties(&#123; WebMvcProperties.class, ResourceProperties.class &#125;)</span></span><br><span class="line"><span class="meta">@Order(0)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">class</span> <span class="title class_">WebMvcAutoConfigurationAdapter</span> <span class="keyword">implements</span> <span class="title class_">WebMvcConfigurer</span> &#123;&#125;</span><br></pre></td></tr></table></figure>
<p><strong>3.绑定的配置</strong></p>
<p><strong>@EnableConfigurationProperties({ WebMvcProperties.class, ResourceProperties.class })</strong></p>
<p>WebMvcProperties.class</p>
<p><img src="/pictures/image-20230803180600438.png" alt="image-20230803180600438"></p>
<p>ResourceProperties.class </p>
<p><img src="/pictures/image-20230803180633611.png" alt="image-20230803180633611"></p>
<h3 id="2-请求参数处理与数据响应"><a href="#2-请求参数处理与数据响应" class="headerlink" title="2.请求参数处理与数据响应"></a>2.请求参数处理与数据响应</h3><h4 id="2-1、请求映射"><a href="#2-1、请求映射" class="headerlink" title="2.1、请求映射"></a>2.1、请求映射</h4><h5 id="1、rest使用与原理"><a href="#1、rest使用与原理" class="headerlink" title="1、rest使用与原理"></a>1、rest使用与原理</h5><ul>
<li><p>@xxxMapping</p>
</li>
<li><p>Rest风格支持<em>使用<strong>HTTP</strong>请求方式动词来表示对资源的操作</em></p>
</li>
<li><ul>
<li>以前:&#x2F;getUser 获取用户 &#x2F;deleteUser 删除用户 &#x2F;editUser 修改用户 &#x2F;saveUser 保存用户</li>
<li>现在: &#x2F;user GET-获取用户 DELETE-删除用户 PUT-修改用户 POST-保存用户</li>
<li>核心FilterHiddenHttpMethodFilter</li>
</ul>
</li>
<li><ul>
<li><ul>
<li>用法: 表单method&#x3D;post隐藏域 _method&#x3D;put</li>
<li>SpringBoot中手动开启</li>
</ul>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="comment">#开启使用rest风格的注解</span></span><br><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">mvc:</span></span><br><span class="line"> <span class="attr">hiddenmethod:</span></span><br><span class="line"> <span class="attr">filter:</span></span><br><span class="line"> <span class="attr">enabled:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--发送put或者delete请求--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">form</span> <span class="attr">action</span>=<span class="string">&quot;/user&quot;</span> <span class="attr">method</span>=<span class="string">&quot;post&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">name</span>=<span class="string">&quot;_method&quot;</span> <span class="attr">type</span>=<span class="string">&quot;hidden&quot;</span> <span class="attr">value</span>=<span class="string">&quot;delete&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">name</span>=<span class="string">&quot;_m&quot;</span> <span class="attr">type</span>=<span class="string">&quot;hidden&quot;</span> <span class="attr">value</span>=<span class="string">&quot;delete&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">value</span>=<span class="string">&quot;REST-DELETE 提交&quot;</span> <span class="attr">type</span>=<span class="string">&quot;submit&quot;</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">form</span> <span class="attr">action</span>=<span class="string">&quot;/user&quot;</span> <span class="attr">method</span>=<span class="string">&quot;post&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">name</span>=<span class="string">&quot;_method&quot;</span> <span class="attr">type</span>=<span class="string">&quot;hidden&quot;</span> <span class="attr">value</span>=<span class="string">&quot;PUT&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">value</span>=<span class="string">&quot;REST-PUT 提交&quot;</span> <span class="attr">type</span>=<span class="string">&quot;submit&quot;</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br></pre></td></tr></table></figure></li>
</ul>
</li>
<li><ul>
<li>扩展如何把_method 这个名字换成我们自己喜欢的。</li>
</ul>
</li>
</ul>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@RequestMapping(value = &quot;/user&quot;,method = RequestMethod.GET)</span></span><br><span class="line"><span class="keyword">public</span> String <span class="title function_">getUser</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;GET-张三&quot;</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="meta">@RequestMapping(value = &quot;/user&quot;,method = RequestMethod.POST)</span></span><br><span class="line"><span class="keyword">public</span> String <span class="title function_">saveUser</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;POST-张三&quot;</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="meta">@RequestMapping(value = &quot;/user&quot;,method = RequestMethod.PUT)</span></span><br><span class="line"><span class="keyword">public</span> String <span class="title function_">putUser</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;PUT-张三&quot;</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="meta">@RequestMapping(value = &quot;/user&quot;,method = RequestMethod.DELETE)</span></span><br><span class="line"><span class="keyword">public</span> String <span class="title function_">deleteUser</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;DELETE-张三&quot;</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">//自定义filter</span></span><br><span class="line"><span class="meta">@Bean</span></span><br><span class="line"><span class="keyword">public</span> HiddenHttpMethodFilter <span class="title function_">hiddenHttpMethodFilter</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="type">HiddenHttpMethodFilter</span> <span class="variable">methodFilter</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HiddenHttpMethodFilter</span>();</span><br><span class="line"> methodFilter.setMethodParam(<span class="string">&quot;_m&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span> methodFilter;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>Rest原理表单提交要使用REST的时候</p>
<ul>
<li><p>表单提交会带上_method&#x3D;PUT</p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--发送put或者delete请求--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">form</span> <span class="attr">action</span>=<span class="string">&quot;/user&quot;</span> <span class="attr">method</span>=<span class="string">&quot;post&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">name</span>=<span class="string">&quot;_method&quot;</span> <span class="attr">type</span>=<span class="string">&quot;hidden&quot;</span> <span class="attr">value</span>=<span class="string">&quot;delete&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">name</span>=<span class="string">&quot;_m&quot;</span> <span class="attr">type</span>=<span class="string">&quot;hidden&quot;</span> <span class="attr">value</span>=<span class="string">&quot;delete&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">value</span>=<span class="string">&quot;REST-DELETE 提交&quot;</span> <span class="attr">type</span>=<span class="string">&quot;submit&quot;</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">form</span> <span class="attr">action</span>=<span class="string">&quot;/user&quot;</span> <span class="attr">method</span>=<span class="string">&quot;post&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">name</span>=<span class="string">&quot;_method&quot;</span> <span class="attr">type</span>=<span class="string">&quot;hidden&quot;</span> <span class="attr">value</span>=<span class="string">&quot;PUT&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">value</span>=<span class="string">&quot;REST-PUT 提交&quot;</span> <span class="attr">type</span>=<span class="string">&quot;submit&quot;</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>请求过来被HiddenHttpMethodFilter拦截</p>
<p>WebMvcAutoConfiguration</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Bean</span></span><br><span class="line"><span class="meta">@ConditionalOnMissingBean(HiddenHttpMethodFilter.class)</span></span><br><span class="line"><span class="meta">@ConditionalOnProperty(prefix = &quot;spring.mvc.hiddenmethod.filter&quot;, name = &quot;enabled&quot;, matchIfMissing = false)</span></span><br><span class="line"><span class="keyword">public</span> OrderedHiddenHttpMethodFilter <span class="title function_">hiddenHttpMethodFilter</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">OrderedHiddenHttpMethodFilter</span>();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><ul>
<li>请求是否正常并且是POST</li>
</ul>
</li>
<li><ul>
<li><ul>
<li><p>获取到_method的值。</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="keyword">protected</span> <span class="keyword">void</span> <span class="title function_">doFilterInternal</span><span class="params">(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)</span></span><br><span class="line"> <span class="keyword">throws</span> ServletException, IOException &#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">HttpServletRequest</span> <span class="variable">requestToUse</span> <span class="operator">=</span> request;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (<span class="string">&quot;POST&quot;</span>.equals(request.getMethod()) &amp;&amp; request.getAttribute(WebUtils.ERROR_EXCEPTION_ATTRIBUTE) == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">paramValue</span> <span class="operator">=</span> request.getParameter(<span class="built_in">this</span>.methodParam);</span><br><span class="line"> <span class="keyword">if</span> (StringUtils.hasLength(paramValue)) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">method</span> <span class="operator">=</span> paramValue.toUpperCase(Locale.ENGLISH);</span><br><span class="line"> <span class="keyword">if</span> (ALLOWED_METHODS.contains(method)) &#123;</span><br><span class="line"> requestToUse = <span class="keyword">new</span> <span class="title class_">HttpMethodRequestWrapper</span>(request, method);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> filterChain.doFilter(requestToUse, response);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>兼容以下请求PUT.DELETE.PATCH</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> List&lt;String&gt; ALLOWED_METHODS =</span><br><span class="line"> Collections.unmodifiableList(Arrays.asList(HttpMethod.PUT.name(),</span><br><span class="line"> HttpMethod.DELETE.name(), HttpMethod.PATCH.name()));</span><br></pre></td></tr></table></figure>
</li>
<li><p>原生requestpost包装模式requesWrapper重写了getMethod方法返回的是传入的值</p>
</li>
<li><p>过滤器链放行的时候用wrapper,以后的方法调用getMethod是调用requesWrapper的</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p><strong>Tips</strong>:</p>
<p>Rest使用客户端工具如PostMan直接发送put、delete等方式请求无需Filter,不需要转换</p>
<p><strong>扩展点:</strong></p>
<p>如何将<code>&lt;input name=&quot;_method&quot; type=&quot;hidden&quot; value=&quot;delete&quot;/&gt;</code>中的name值_method改为自定义的值?</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Configuration(proxyBeanMethods = false)</span> <span class="comment">//组件中没有依赖关系设置成false直接放</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WebConfig</span>&#123;</span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> HiddenHttpMethodFilter <span class="title function_">hiddenHttpMethodFilter</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="type">HiddenHttpMethodFilter</span> <span class="variable">methodFilter</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HiddenHttpMethodFilter</span>();</span><br><span class="line"> methodFilter.setMethodParam(<span class="string">&quot;_m&quot;</span>); <span class="comment">//将name=&quot;_method&quot;改成name=&quot;_m&quot;</span></span><br><span class="line"> <span class="keyword">return</span> methodFilter;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h5 id="2、请求映射原理"><a href="#2、请求映射原理" class="headerlink" title="2、请求映射原理"></a>2、请求映射原理</h5><p><strong>DispatcherServlet 继承 FrameworkServlet</strong> </p>
<p><strong>FrameworkServlet 继承 HttpServletBean</strong></p>
<p><strong>FrameworkServlet 重写了doGet和doPost方法</strong></p>
<p><img src="/pictures/image-20230809133846464.png" alt="image-20230809133846464"></p>
<p><strong>DispatcherServlet的doDispatch方法</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">protected</span> <span class="keyword">void</span> <span class="title function_">doDispatch</span><span class="params">(HttpServletRequest request, HttpServletResponse response)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="type">HttpServletRequest</span> <span class="variable">processedRequest</span> <span class="operator">=</span> request;</span><br><span class="line"> <span class="type">HandlerExecutionChain</span> <span class="variable">mappedHandler</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">multipartRequestParsed</span> <span class="operator">=</span> <span class="literal">false</span>;</span><br><span class="line"></span><br><span class="line"> <span class="type">WebAsyncManager</span> <span class="variable">asyncManager</span> <span class="operator">=</span> WebAsyncUtils.getAsyncManager(request);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">ModelAndView</span> <span class="variable">mv</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="type">Exception</span> <span class="variable">dispatchException</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> processedRequest = checkMultipart(request);</span><br><span class="line"> multipartRequestParsed = (processedRequest != request);</span><br><span class="line"></span><br><span class="line"> <span class="comment">// Determine handler for the current request.</span></span><br><span class="line"> <span class="comment">//找到请求使用那个hander(contrller)处理</span></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * getHandler()方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> mappedHandler = getHandler(processedRequest);</span><br><span class="line"> <span class="keyword">if</span> (mappedHandler == <span class="literal">null</span>) &#123;</span><br><span class="line"> noHandlerFound(processedRequest, response);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// Determine handler adapter for the current request.</span></span><br><span class="line"> <span class="type">HandlerAdapter</span> <span class="variable">ha</span> <span class="operator">=</span> getHandlerAdapter(mappedHandler.getHandler());</span><br><span class="line"></span><br><span class="line"> <span class="comment">// Process last-modified header, if supported by the handler.</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">method</span> <span class="operator">=</span> request.getMethod();</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isGet</span> <span class="operator">=</span> <span class="string">&quot;GET&quot;</span>.equals(method);</span><br><span class="line"> <span class="keyword">if</span> (isGet || <span class="string">&quot;HEAD&quot;</span>.equals(method)) &#123;</span><br><span class="line"> <span class="type">long</span> <span class="variable">lastModified</span> <span class="operator">=</span> ha.getLastModified(request, mappedHandler.getHandler());</span><br><span class="line"> <span class="keyword">if</span> (<span class="keyword">new</span> <span class="title class_">ServletWebRequest</span>(request, response).checkNotModified(lastModified) &amp;&amp; isGet) &#123;</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (!mappedHandler.applyPreHandle(processedRequest, response)) &#123;</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// Actually invoke the handler.</span></span><br><span class="line"> mv = ha.handle(processedRequest, response, mappedHandler.getHandler());</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (asyncManager.isConcurrentHandlingStarted()) &#123;</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> applyDefaultViewName(processedRequest, mv);</span><br><span class="line"> mappedHandler.applyPostHandle(processedRequest, response, mv);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">catch</span> (Exception ex) &#123;</span><br><span class="line"> dispatchException = ex;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">catch</span> (Throwable err) &#123;</span><br><span class="line"> <span class="comment">// As of 4.3, we&#x27;re processing Errors thrown from handler methods as well,</span></span><br><span class="line"> <span class="comment">// making them available for @ExceptionHandler methods and other scenarios.</span></span><br><span class="line"> dispatchException = <span class="keyword">new</span> <span class="title class_">NestedServletException</span>(<span class="string">&quot;Handler dispatch failed&quot;</span>, err);</span><br><span class="line"> &#125;</span><br><span class="line"> processDispatchResult(processedRequest, response, mappedHandler, mv, dispatchException);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">catch</span> (Exception ex) &#123;</span><br><span class="line"> triggerAfterCompletion(processedRequest, response, mappedHandler, ex);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">catch</span> (Throwable err) &#123;</span><br><span class="line"> triggerAfterCompletion(processedRequest, response, mappedHandler,</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">NestedServletException</span>(<span class="string">&quot;Handler processing failed&quot;</span>, err));</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">finally</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (asyncManager.isConcurrentHandlingStarted()) &#123;</span><br><span class="line"> <span class="comment">// Instead of postHandle and afterCompletion</span></span><br><span class="line"> <span class="keyword">if</span> (mappedHandler != <span class="literal">null</span>) &#123;</span><br><span class="line"> mappedHandler.applyAfterConcurrentHandlingStarted(processedRequest, response);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">// Clean up any resources used by a multipart request.</span></span><br><span class="line"> <span class="keyword">if</span> (multipartRequestParsed) &#123;</span><br><span class="line"> cleanupMultipart(processedRequest);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>getHandler()方法</strong> 遍历查找可以处理请求的方法</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Nullable</span></span><br><span class="line"><span class="keyword">protected</span> HandlerExecutionChain <span class="title function_">getHandler</span><span class="params">(HttpServletRequest request)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="keyword">if</span> (<span class="built_in">this</span>.handlerMappings != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">for</span> (HandlerMapping mapping : <span class="built_in">this</span>.handlerMappings) &#123;</span><br><span class="line"> <span class="type">HandlerExecutionChain</span> <span class="variable">handler</span> <span class="operator">=</span> mapping.getHandler(request);</span><br><span class="line"> <span class="keyword">if</span> (handler != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> handler;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>**HandlerMapping ** 处理器映射</p>
<p>默认有5个HandlerMapping</p>
<p><img src="/pictures/image-20230809150915450.png" alt="image-20230809150915450"></p>
<p><strong>RequestMappingHandlerMapping</strong>:保存了所有@RequestMapping 和handler的映射规则</p>
<p><img src="/pictures/image-20230809151427867.png" alt="image-20230809151427867"></p>
<p>所有的请求映射都在HandlerMapping中</p>
<ul>
<li><p>SpringBoot自动配置欢迎页的 WelcomePageHandlerMapping 访问 &#x2F;能访问到index.html</p>
</li>
<li><p>SpringBoot自动配置了默认的 RequestMappingHandlerMapping</p>
</li>
<li><p>请求进来挨个尝试所有的HandlerMapping看是否有请求信息</p>
</li>
<li><ul>
<li>如果有就找到这个请求对应的handler</li>
<li>如果没有就是下一个 HandlerMapping</li>
</ul>
</li>
<li><p>我们需要一些自定义的映射处理,我们也可以自己给容器中放<strong>HandlerMapping</strong> 自定义 <strong>HandlerMapping</strong></p>
</li>
</ul>
<h4 id="2-2、普通参数与基本注解"><a href="#2-2、普通参数与基本注解" class="headerlink" title="2.2、普通参数与基本注解"></a>2.2、普通参数与基本注解</h4><h5 id="1-注解"><a href="#1-注解" class="headerlink" title="1.注解"></a>1.注解</h5><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@PathVariable</span> <span class="comment">//获取路径中的参数信息(restful风格)</span></span><br><span class="line"><span class="meta">@RequestHeader</span> <span class="comment">//获取请求头的信息</span></span><br><span class="line"><span class="meta">@RequestAttribute</span> <span class="comment">//获取请求域中的数据</span></span><br><span class="line"><span class="meta">@RequestParam</span> <span class="comment">//获取路径中拼接的请求参数(/info?age=12&amp;name=lisi</span></span><br><span class="line"><span class="meta">@MatrixVariable</span> <span class="comment">//矩阵变量 /cars/sell;low=34;brand=byd,audi,yd </span></span><br><span class="line"><span class="meta">@CookieValue</span> <span class="comment">//获取cookie的值</span></span><br><span class="line"><span class="meta">@RequestBody</span> <span class="comment">//获取请求体的值(Post请求)</span></span><br></pre></td></tr></table></figure>
<p><strong>@PathVariable</strong></p>
<p>接受路径中的参数也可以使用map集合接受但是map集合必须是Map&lt;String, String&gt;的形式</p>
<p><img src="/pictures/image-20230809155753715.png" alt="image-20230809155753715"></p>
<p><strong>@RequestHeader</strong></p>
<p>获取指定的请求头或者所有的请求头信息</p>
<p><img src="/pictures/image-20230809160406516.png" alt="image-20230809160406516"></p>
<p><img src="/pictures/image-20230809160846527.png" alt="image-20230809160846527"></p>
<p><strong>@RequestParam</strong></p>
<p>可以使用map接受所有的请求参数</p>
<p><img src="/pictures/image-20230809161533834.png" alt="image-20230809161533834"></p>
<p><strong>@CookieValue</strong></p>
<p>获取cookie的值可以直接获取字符串的值也可以封装成cookie的对象</p>
<p><img src="/pictures/image-20230809164101374.png" alt="image-20230809164101374"></p>
<p><strong>@RequestBody</strong></p>
<p>这里用一个字符串接收表单数据和平时使用的不一样,开发中使用一个对象接受表单的数据</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * ·<span class="doctag">@RequestBody</span>注解</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@PostMapping(&quot;/save&quot;)</span></span><br><span class="line"><span class="keyword">public</span> Map <span class="title function_">postMethod</span><span class="params">(<span class="meta">@RequestBody</span> String content)</span>&#123;</span><br><span class="line"> Map&lt;String,Object&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> map.put(<span class="string">&quot;content&quot;</span>,content);</span><br><span class="line"> <span class="keyword">return</span> map;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230809165149278.png" alt="image-20230809165149278"></p>
<p><strong>@RequestAttribute</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot.controller;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Controller;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.GetMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestAttribute;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.ResponseBody;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletRequest;</span><br><span class="line"><span class="keyword">import</span> java.util.HashMap;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/11</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">RequestController</span> &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/goto&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">goToPage</span><span class="params">(HttpServletRequest request)</span>&#123;</span><br><span class="line"></span><br><span class="line"> request.setAttribute(<span class="string">&quot;msg&quot;</span>,<span class="string">&quot;获取请求域中的数据成功&quot;</span>);</span><br><span class="line"> request.setAttribute(<span class="string">&quot;code&quot;</span>,<span class="number">200</span>);</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;forward:/success&quot;</span>; <span class="comment">//转发到下面的/success请求</span></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@ResponseBody</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/success&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> Map <span class="title function_">success</span><span class="params">(<span class="meta">@RequestAttribute(value = &quot;msg&quot;,required = false)</span> String msg,</span></span><br><span class="line"><span class="params"> <span class="meta">@RequestAttribute(value = &quot;code&quot;,required = false)</span>Integer code,//通过注解的方式获取上面请求域的值</span></span><br><span class="line"><span class="params"> HttpServletRequest request)</span>&#123;<span class="comment">//通过原生的request获取</span></span><br><span class="line"> <span class="comment">//Object msg1 = request.getAttribute(&quot;msg&quot;);</span></span><br><span class="line"> Map&lt;String,Object&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> map.put(<span class="string">&quot;msg&quot;</span>,msg);</span><br><span class="line"> map.put(<span class="string">&quot;code&quot;</span>,code);</span><br><span class="line"> <span class="keyword">return</span> map;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230811092618793.png" alt="image-20230811092618793"></p>
<p><strong>@MatrixVariable</strong></p>
<p>开启SpringBoot的矩阵变量功能</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Bean</span></span><br><span class="line"><span class="keyword">public</span> WebMvcConfigurer <span class="title function_">webMvcConfigurer</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">WebMvcConfigurer</span>() &#123;</span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">configurePathMatch</span><span class="params">(PathMatchConfigurer configurer)</span> &#123;</span><br><span class="line"> <span class="type">UrlPathHelper</span> <span class="variable">urlPathHelper</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">UrlPathHelper</span>();</span><br><span class="line"> <span class="comment">// 不移除 后面的内容 矩阵变量功能就可以生效</span></span><br><span class="line"> urlPathHelper.setRemoveSemicolonContent(<span class="literal">false</span>);</span><br><span class="line"> configurer.setUrlPathHelper(urlPathHelper);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>测试</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//1、语法 请求路径:/cars/sell;low=34;brand=byd,audi,yd</span></span><br><span class="line"><span class="comment">//2、SpringBoot默认是禁用了矩阵变量的功能</span></span><br><span class="line"><span class="comment">// 手动开启原理。对于路径的处理。UrlPathHelper进行解析。</span></span><br><span class="line"><span class="comment">// removeSemicolonContent移除分号内容支持矩阵变量的</span></span><br><span class="line"><span class="comment">//3、矩阵变量必须有url路径变量才能被解析</span></span><br><span class="line"><span class="meta">@GetMapping(&quot;/cars/&#123;path&#125;&quot;)</span></span><br><span class="line"><span class="keyword">public</span> Map <span class="title function_">carsSell</span><span class="params">(<span class="meta">@MatrixVariable(&quot;low&quot;)</span> Integer low,</span></span><br><span class="line"><span class="params"> <span class="meta">@MatrixVariable(&quot;brand&quot;)</span> List&lt;String&gt; brand,</span></span><br><span class="line"><span class="params"> <span class="meta">@PathVariable(&quot;path&quot;)</span> String path)</span>&#123;</span><br><span class="line"> Map&lt;String,Object&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"></span><br><span class="line"> map.put(<span class="string">&quot;low&quot;</span>,low);</span><br><span class="line"> map.put(<span class="string">&quot;brand&quot;</span>,brand);</span><br><span class="line"> map.put(<span class="string">&quot;path&quot;</span>,path);</span><br><span class="line"> <span class="keyword">return</span> map;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// /boss/1;age=20/2;age=10</span></span><br><span class="line"><span class="meta">@GetMapping(&quot;/boss/&#123;bossId&#125;/&#123;empId&#125;&quot;)</span></span><br><span class="line"><span class="keyword">public</span> Map <span class="title function_">boss</span><span class="params">(<span class="meta">@MatrixVariable(value = &quot;age&quot;,pathVar = &quot;bossId&quot;)</span> Integer bossAge,</span></span><br><span class="line"><span class="params"> <span class="meta">@MatrixVariable(value = &quot;age&quot;,pathVar = &quot;empId&quot;)</span> Integer empAge)</span>&#123;</span><br><span class="line"> Map&lt;String,Object&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> map.put(<span class="string">&quot;bossAge&quot;</span>,bossAge);</span><br><span class="line"> map.put(<span class="string">&quot;empAge&quot;</span>,empAge);</span><br><span class="line"> <span class="keyword">return</span> map;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230811095858532.png" alt="image-20230811095858532"></p>
<p><img src="/pictures/image-20230811095834803.png" alt="image-20230811095834803"></p>
<h5 id="2-Servlet-API"><a href="#2-Servlet-API" class="headerlink" title="2.Servlet API"></a>2.Servlet API</h5><p>WebRequest、ServletRequest、MultipartRequest、 HttpSession、javax.servlet.http.PushBuilder、Principal、InputStream、Reader、HttpMethod、Locale、TimeZone、ZoneId</p>
<p>ServletRequestMethodArgumentResolver 以上的部分参数</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">supportsParameter</span><span class="params">(MethodParameter parameter)</span> &#123;</span><br><span class="line"> Class&lt;?&gt; paramType = parameter.getParameterType();</span><br><span class="line"> <span class="keyword">return</span> (WebRequest.class.isAssignableFrom(paramType) ||</span><br><span class="line"> ServletRequest.class.isAssignableFrom(paramType) ||</span><br><span class="line"> MultipartRequest.class.isAssignableFrom(paramType) ||</span><br><span class="line"> HttpSession.class.isAssignableFrom(paramType) ||</span><br><span class="line"> (pushBuilder != <span class="literal">null</span> &amp;&amp; pushBuilder.isAssignableFrom(paramType)) ||</span><br><span class="line"> Principal.class.isAssignableFrom(paramType) ||</span><br><span class="line"> InputStream.class.isAssignableFrom(paramType) ||</span><br><span class="line"> Reader.class.isAssignableFrom(paramType) ||</span><br><span class="line"> HttpMethod.class == paramType ||</span><br><span class="line"> Locale.class == paramType ||</span><br><span class="line"> TimeZone.class == paramType ||</span><br><span class="line"> ZoneId.class == paramType);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h5 id="3-复杂参数:"><a href="#3-复杂参数:" class="headerlink" title="3.复杂参数:"></a>3.复杂参数:</h5><p>Map、Modelmap、model里面的数据会被放在request的请求域 request.setAttribute、Errors&#x2F;BindingResult、RedirectAttributes 重定向携带数据、ServletResponseresponse、SessionStatus、UriComponentsBuilder、ServletUriComponentsBuilder</p>
<p>向请求域中共享数据</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * ra数据通过 map model HttpServletRequest HttpServletResponse 等方式共享到请求域中在success页面中取出来</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@GetMapping(&quot;/params&quot;)</span></span><br><span class="line"><span class="keyword">public</span> String <span class="title function_">testParam</span><span class="params">(Map&lt;String,Object&gt; map,</span></span><br><span class="line"><span class="params"> Model model,</span></span><br><span class="line"><span class="params"> HttpServletRequest request,</span></span><br><span class="line"><span class="params"> HttpServletResponse response)</span>&#123;</span><br><span class="line"> map.put(<span class="string">&quot;hello&quot;</span>,<span class="string">&quot;world666&quot;</span>);</span><br><span class="line"> model.addAttribute(<span class="string">&quot;world&quot;</span>,<span class="string">&quot;hello666&quot;</span>);</span><br><span class="line"> request.setAttribute(<span class="string">&quot;message&quot;</span>,<span class="string">&quot;HelloWorld&quot;</span>);</span><br><span class="line"></span><br><span class="line"> <span class="type">Cookie</span> <span class="variable">cookie</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Cookie</span>(<span class="string">&quot;c1&quot;</span>,<span class="string">&quot;v1&quot;</span>);</span><br><span class="line"> response.addCookie(cookie);</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;forward:/success&quot;</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h5 id="4-自定义对象参数"><a href="#4-自定义对象参数" class="headerlink" title="4.自定义对象参数"></a>4.自定义对象参数</h5><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 姓名: &lt;input name=&quot;userName&quot;/&gt; &lt;br/&gt;</span></span><br><span class="line"><span class="comment"> * 年龄: &lt;input name=&quot;age&quot;/&gt; &lt;br/&gt;</span></span><br><span class="line"><span class="comment"> * 生日: &lt;input name=&quot;birth&quot;/&gt; &lt;br/&gt;</span></span><br><span class="line"><span class="comment"> * 宠物姓名:&lt;input name=&quot;pet.name&quot;/&gt;&lt;br/&gt;</span></span><br><span class="line"><span class="comment"> * 宠物年龄:&lt;input name=&quot;pet.age&quot;/&gt;</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Person</span> &#123;</span><br><span class="line"> </span><br><span class="line"> <span class="keyword">private</span> String userName;</span><br><span class="line"> <span class="keyword">private</span> Integer age;</span><br><span class="line"> <span class="keyword">private</span> Date birth;</span><br><span class="line"> <span class="keyword">private</span> Pet pet;</span><br><span class="line"> </span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Pet</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String name;</span><br><span class="line"> <span class="keyword">private</span> String age;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>页面测试代码</strong></p>
<p>index.html</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line">&lt;!DOCTYPE html&gt;</span><br><span class="line">&lt;html lang=<span class="string">&quot;en&quot;</span>&gt;</span><br><span class="line">&lt;head&gt;</span><br><span class="line"> &lt;meta charset=<span class="string">&quot;UTF-8&quot;</span>&gt;</span><br><span class="line"> &lt;title&gt;Title&lt;/title&gt;</span><br><span class="line">&lt;/head&gt;</span><br><span class="line">&lt;body&gt;</span><br><span class="line">&lt;h1&gt;atguigu欢迎您&lt;/h1&gt;</span><br><span class="line">测试REST风格</span><br><span class="line">&lt;form action=<span class="string">&quot;/user&quot;</span> method=<span class="string">&quot;get&quot;</span>&gt;</span><br><span class="line"> &lt;input value=<span class="string">&quot;REST-GET 提交&quot;</span> type=<span class="string">&quot;submit&quot;</span>/&gt;</span><br><span class="line">&lt;/form&gt;</span><br><span class="line">&lt;form action=<span class="string">&quot;/user&quot;</span> method=<span class="string">&quot;post&quot;</span>&gt;</span><br><span class="line"> &lt;input value=<span class="string">&quot;REST-POST 提交&quot;</span> type=<span class="string">&quot;submit&quot;</span>/&gt;</span><br><span class="line">&lt;/form&gt;</span><br><span class="line">&lt;form action=<span class="string">&quot;/user&quot;</span> method=<span class="string">&quot;post&quot;</span>&gt;</span><br><span class="line"> &lt;input name=<span class="string">&quot;_method&quot;</span> type=<span class="string">&quot;hidden&quot;</span> value=<span class="string">&quot;delete&quot;</span>/&gt;</span><br><span class="line"> &lt;input name=<span class="string">&quot;_m&quot;</span> type=<span class="string">&quot;hidden&quot;</span> value=<span class="string">&quot;delete&quot;</span>/&gt;</span><br><span class="line"> &lt;input value=<span class="string">&quot;REST-DELETE 提交&quot;</span> type=<span class="string">&quot;submit&quot;</span>/&gt;</span><br><span class="line">&lt;/form&gt;</span><br><span class="line">&lt;form action=<span class="string">&quot;/user&quot;</span> method=<span class="string">&quot;post&quot;</span>&gt;</span><br><span class="line"> &lt;input name=<span class="string">&quot;_method&quot;</span> type=<span class="string">&quot;hidden&quot;</span> value=<span class="string">&quot;PUT&quot;</span>/&gt;</span><br><span class="line"> &lt;input value=<span class="string">&quot;REST-PUT 提交&quot;</span> type=<span class="string">&quot;submit&quot;</span>/&gt;</span><br><span class="line">&lt;/form&gt;</span><br><span class="line">&lt;hr/&gt;</span><br><span class="line">测试基本注解:</span><br><span class="line">&lt;ul&gt;</span><br><span class="line"> &lt;a href=<span class="string">&quot;car/3/owner/lisi?age=18&amp;inters=basketball&amp;inters=game&quot;</span>&gt;car/&#123;id&#125;/owner/&#123;username&#125;&lt;/a&gt;</span><br><span class="line"> &lt;li&gt;<span class="meta">@PathVariable</span>(路径变量)&lt;/li&gt;</span><br><span class="line"> &lt;li&gt;<span class="meta">@RequestHeader</span>(获取请求头)&lt;/li&gt;</span><br><span class="line"> &lt;li&gt;<span class="meta">@RequestParam</span>(获取请求参数)&lt;/li&gt;</span><br><span class="line"> &lt;li&gt;<span class="meta">@CookieValue</span>获取cookie值&lt;/li&gt;</span><br><span class="line"> &lt;li&gt;<span class="meta">@RequestBody</span>(获取请求体[POST]&lt;/li&gt;</span><br><span class="line"></span><br><span class="line"> &lt;li&gt;<span class="meta">@RequestAttribute</span>获取request域属性&lt;/li&gt;</span><br><span class="line"> &lt;li&gt;<span class="meta">@MatrixVariable</span>(矩阵变量)&lt;/li&gt;</span><br><span class="line">&lt;/ul&gt;</span><br><span class="line"></span><br><span class="line">/cars/&#123;path&#125;?xxx=xxx&amp;aaa=ccc queryString 查询字符串。<span class="meta">@RequestParam</span>&lt;br/&gt;</span><br><span class="line">/cars/sell;low=<span class="number">34</span>;brand=byd,audi,yd ;矩阵变量 &lt;br/&gt;</span><br><span class="line">页面开发cookie禁用了session里面的内容怎么使用</span><br><span class="line">session.set(a,b)---&gt; jsessionid ---&gt; cookie ----&gt; 每次发请求携带。</span><br><span class="line">url重写/abc;jsesssionid=xxxx 把cookie的值使用矩阵变量的方式进行传递.</span><br><span class="line"></span><br><span class="line">/boss/<span class="number">1</span>/<span class="number">2</span></span><br><span class="line"></span><br><span class="line">/boss/<span class="number">1</span>;age=<span class="number">20</span>/<span class="number">2</span>;age=<span class="number">20</span></span><br><span class="line"></span><br><span class="line">&lt;a href=<span class="string">&quot;/cars/sell;low=34;brand=byd,audi,yd&quot;</span>&gt;<span class="meta">@MatrixVariable</span>(矩阵变量)&lt;/a&gt;</span><br><span class="line">&lt;a href=<span class="string">&quot;/cars/sell;low=34;brand=byd;brand=audi;brand=yd&quot;</span>&gt;<span class="meta">@MatrixVariable</span>(矩阵变量)&lt;/a&gt;</span><br><span class="line">&lt;a href=<span class="string">&quot;/boss/1;age=20/2;age=10&quot;</span>&gt;<span class="meta">@MatrixVariable</span>(矩阵变量)/boss/&#123;bossId&#125;/&#123;empId&#125;&lt;/a&gt;</span><br><span class="line">&lt;br/&gt;</span><br><span class="line">&lt;form action=<span class="string">&quot;/save&quot;</span> method=<span class="string">&quot;post&quot;</span>&gt;</span><br><span class="line"> 测试<span class="meta">@RequestBody</span>获取数据 &lt;br/&gt;</span><br><span class="line"> 用户名:&lt;input name=<span class="string">&quot;userName&quot;</span>/&gt; &lt;br&gt;</span><br><span class="line"> 邮箱:&lt;input name=<span class="string">&quot;email&quot;</span>/&gt;</span><br><span class="line"> &lt;input type=<span class="string">&quot;submit&quot;</span> value=<span class="string">&quot;提交&quot;</span>/&gt;</span><br><span class="line">&lt;/form&gt;</span><br><span class="line">&lt;ol&gt;</span><br><span class="line"> &lt;li&gt;矩阵变量需要在SpringBoot中手动开启&lt;/li&gt;</span><br><span class="line"> &lt;li&gt;根据RFC3986的规范矩阵变量应当绑定在路径变量中&lt;/li&gt;</span><br><span class="line"> &lt;li&gt;若是有多个矩阵变量,应当使用英文符号;进行分隔。&lt;/li&gt;</span><br><span class="line"> &lt;li&gt;若是一个矩阵变量有多个值,应当使用英文符号,进行分隔或之命名多个重复的key即可。&lt;/li&gt;</span><br><span class="line"> &lt;li&gt;如:/cars/sell;low=<span class="number">34</span>;brand=byd,audi,yd&lt;/li&gt;</span><br><span class="line">&lt;/ol&gt;</span><br><span class="line">&lt;hr/&gt;</span><br><span class="line">测试原生API</span><br><span class="line">&lt;a href=<span class="string">&quot;/testapi&quot;</span>&gt;测试原生API&lt;/a&gt;</span><br><span class="line">&lt;hr/&gt;</span><br><span class="line">测试复杂类型:&lt;hr/&gt;</span><br><span class="line">测试封装POJO</span><br><span class="line">&lt;form action=<span class="string">&quot;/saveuser&quot;</span> method=<span class="string">&quot;post&quot;</span>&gt;</span><br><span class="line"> 姓名: &lt;input name=<span class="string">&quot;userName&quot;</span> value=<span class="string">&quot;zhangsan&quot;</span>/&gt; &lt;br/&gt;</span><br><span class="line"> 年龄: &lt;input name=<span class="string">&quot;age&quot;</span> value=<span class="string">&quot;18&quot;</span>/&gt; &lt;br/&gt;</span><br><span class="line"> 生日: &lt;input name=<span class="string">&quot;birth&quot;</span> value=<span class="string">&quot;2019/12/10&quot;</span>/&gt; &lt;br/&gt;</span><br><span class="line">&lt;!-- 宠物姓名:&lt;input name=<span class="string">&quot;pet.name&quot;</span> value=<span class="string">&quot;阿猫&quot;</span>/&gt;&lt;br/&gt;--&gt;</span><br><span class="line">&lt;!-- 宠物年龄:&lt;input name=<span class="string">&quot;pet.age&quot;</span> value=<span class="string">&quot;5&quot;</span>/&gt;--&gt;</span><br><span class="line"> 宠物: &lt;input name=<span class="string">&quot;pet&quot;</span> value=<span class="string">&quot;小猫&quot;</span>/&gt;</span><br><span class="line"> &lt;input type=<span class="string">&quot;submit&quot;</span> value=<span class="string">&quot;保存&quot;</span>/&gt;</span><br><span class="line">&lt;/form&gt;</span><br><span class="line">&lt;br&gt;</span><br><span class="line">&lt;/body&gt;</span><br><span class="line">&lt;/html&gt;</span><br></pre></td></tr></table></figure>
<h4 id="2-3-参数处理原理"><a href="#2-3-参数处理原理" class="headerlink" title="2.3 参数处理原理"></a>2.3 参数处理原理</h4><p><strong>1.页面发送请求</strong></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">http://localhost:8080/car/3/owner/lisi </span><br></pre></td></tr></table></figure>
<p><strong>2.进入DispatcherServlet的doDispatch( )方法</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">protected</span> <span class="keyword">void</span> <span class="title function_">doDispatch</span><span class="params">(HttpServletRequest request, HttpServletResponse response)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="type">HttpServletRequest</span> <span class="variable">processedRequest</span> <span class="operator">=</span> request;</span><br><span class="line"> <span class="type">HandlerExecutionChain</span> <span class="variable">mappedHandler</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">multipartRequestParsed</span> <span class="operator">=</span> <span class="literal">false</span>;</span><br><span class="line"></span><br><span class="line"> <span class="type">WebAsyncManager</span> <span class="variable">asyncManager</span> <span class="operator">=</span> WebAsyncUtils.getAsyncManager(request);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">ModelAndView</span> <span class="variable">mv</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="type">Exception</span> <span class="variable">dispatchException</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> processedRequest = checkMultipart(request);</span><br><span class="line"> multipartRequestParsed = (processedRequest != request);</span><br><span class="line"></span><br><span class="line"> <span class="comment">// Determine handler for the current request.</span></span><br><span class="line"> mappedHandler = getHandler(processedRequest);</span><br><span class="line"> <span class="keyword">if</span> (mappedHandler == <span class="literal">null</span>) &#123;</span><br><span class="line"> noHandlerFound(processedRequest, response);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// Determine handler adapter for the current request.</span></span><br><span class="line"> <span class="type">HandlerAdapter</span> <span class="variable">ha</span> <span class="operator">=</span> getHandlerAdapter(mappedHandler.getHandler());</span><br><span class="line"></span><br><span class="line"> <span class="comment">// Process last-modified header, if supported by the handler.</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">method</span> <span class="operator">=</span> request.getMethod();</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isGet</span> <span class="operator">=</span> <span class="string">&quot;GET&quot;</span>.equals(method);</span><br><span class="line"> <span class="keyword">if</span> (isGet || <span class="string">&quot;HEAD&quot;</span>.equals(method)) &#123;</span><br><span class="line"> <span class="type">long</span> <span class="variable">lastModified</span> <span class="operator">=</span> ha.getLastModified(request, mappedHandler.getHandler());</span><br><span class="line"> <span class="keyword">if</span> (<span class="keyword">new</span> <span class="title class_">ServletWebRequest</span>(request, response).checkNotModified(lastModified) &amp;&amp; isGet) &#123;</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (!mappedHandler.applyPreHandle(processedRequest, response)) &#123;</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// Actually invoke the handler.</span></span><br><span class="line"> mv = ha.handle(processedRequest, response, mappedHandler.getHandler());</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (asyncManager.isConcurrentHandlingStarted()) &#123;</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> applyDefaultViewName(processedRequest, mv);</span><br><span class="line"> mappedHandler.applyPostHandle(processedRequest, response, mv);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">catch</span> (Exception ex) &#123;</span><br><span class="line"> dispatchException = ex;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">catch</span> (Throwable err) &#123;</span><br><span class="line"> <span class="comment">// As of 4.3, we&#x27;re processing Errors thrown from handler methods as well,</span></span><br><span class="line"> <span class="comment">// making them available for @ExceptionHandler methods and other scenarios.</span></span><br><span class="line"> dispatchException = <span class="keyword">new</span> <span class="title class_">NestedServletException</span>(<span class="string">&quot;Handler dispatch failed&quot;</span>, err);</span><br><span class="line"> &#125;</span><br><span class="line"> processDispatchResult(processedRequest, response, mappedHandler, mv, dispatchException);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">catch</span> (Exception ex) &#123;</span><br><span class="line"> triggerAfterCompletion(processedRequest, response, mappedHandler, ex);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">catch</span> (Throwable err) &#123;</span><br><span class="line"> triggerAfterCompletion(processedRequest, response, mappedHandler,</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">NestedServletException</span>(<span class="string">&quot;Handler processing failed&quot;</span>, err));</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">finally</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (asyncManager.isConcurrentHandlingStarted()) &#123;</span><br><span class="line"> <span class="comment">// Instead of postHandle and afterCompletion</span></span><br><span class="line"> <span class="keyword">if</span> (mappedHandler != <span class="literal">null</span>) &#123;</span><br><span class="line"> mappedHandler.applyAfterConcurrentHandlingStarted(processedRequest, response);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">// Clean up any resources used by a multipart request.</span></span><br><span class="line"> <span class="keyword">if</span> (multipartRequestParsed) &#123;</span><br><span class="line"> cleanupMultipart(processedRequest);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>3.封装一个方法获取对应的处理器适配器</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//方法的调用</span></span><br><span class="line"><span class="type">HandlerAdapter</span> <span class="variable">ha</span> <span class="operator">=</span> getHandlerAdapter(mappedHandler.getHandler());</span><br></pre></td></tr></table></figure>
<p><strong>4.遍历所有的处理器适配器(一共有四种,如下图)找到支持的适配器</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">protected</span> HandlerAdapter <span class="title function_">getHandlerAdapter</span><span class="params">(Object handler)</span> <span class="keyword">throws</span> ServletException &#123;</span><br><span class="line"> <span class="keyword">if</span> (<span class="built_in">this</span>.handlerAdapters != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">for</span> (HandlerAdapter adapter : <span class="built_in">this</span>.handlerAdapters) &#123;</span><br><span class="line"> <span class="keyword">if</span> (adapter.supports(handler)) &#123;</span><br><span class="line"> <span class="keyword">return</span> adapter;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">ServletException</span>(<span class="string">&quot;No adapter for handler [&quot;</span> + handler +</span><br><span class="line"> <span class="string">&quot;]: The DispatcherServlet configuration needs to include a HandlerAdapter that supports this handler&quot;</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230812091950114.png" alt="image-20230812091950114"></p>
<p>上图中四个处理器适配器中前两个是常用的处理器适配器: 0 - 支持方法上标注@RequestMapping 1 - 支持函数式编程的</p>
<p><strong>5.查看当前的处理器适配器是否支持的方法</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">final</span> <span class="type">boolean</span> <span class="title function_">supports</span><span class="params">(Object handler)</span> &#123;</span><br><span class="line"> <span class="comment">//条件一 handler instanceof HandlerMethod</span></span><br><span class="line"> <span class="comment">//条件二 supportsInternal((HandlerMethod) handler)</span></span><br><span class="line"> <span class="keyword">return</span> (handler <span class="keyword">instanceof</span> HandlerMethod &amp;&amp; supportsInternal((HandlerMethod) handler));</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>遍历查找之后返回的适配器是RequestMappingHandlerAdapter</p>
<p><img src="/pictures/image-20230812092825385.png" alt="image-20230812092825385"></p>
<p><strong>6.回到DispatcherServlet执行下面的方法</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//根据上面获取到的处理器适配器真正的执行处理器方法</span></span><br><span class="line"><span class="comment">// Actually invoke the handler.</span></span><br><span class="line">mv = ha.handle(processedRequest, response, mappedHandler.getHandler());</span><br></pre></td></tr></table></figure>
<p><strong>7.内部的处理过程</strong></p>
<p>handle( )方法</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="meta">@Nullable</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">final</span> ModelAndView <span class="title function_">handle</span><span class="params">(HttpServletRequest request, HttpServletResponse response, Object handler)</span></span><br><span class="line"><span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="keyword">return</span> handleInternal(request, response, (HandlerMethod) handler);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>进入当前处理器适配器的handleInternal( )方法</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="keyword">protected</span> ModelAndView <span class="title function_">handleInternal</span><span class="params">(HttpServletRequest request,</span></span><br><span class="line"><span class="params"> HttpServletResponse response, HandlerMethod handlerMethod)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"></span><br><span class="line"> ModelAndView mav;</span><br><span class="line"> checkRequest(request);</span><br><span class="line"></span><br><span class="line"> <span class="comment">// Execute invokeHandlerMethod in synchronized block if required.</span></span><br><span class="line"> <span class="keyword">if</span> (<span class="built_in">this</span>.synchronizeOnSession) &#123;</span><br><span class="line"> <span class="type">HttpSession</span> <span class="variable">session</span> <span class="operator">=</span> request.getSession(<span class="literal">false</span>);</span><br><span class="line"> <span class="keyword">if</span> (session != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="type">Object</span> <span class="variable">mutex</span> <span class="operator">=</span> WebUtils.getSessionMutex(session);</span><br><span class="line"> <span class="keyword">synchronized</span> (mutex) &#123;</span><br><span class="line"> mav = invokeHandlerMethod(request, response, handlerMethod);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">// No HttpSession available -&gt; no mutex necessary</span></span><br><span class="line"> mav = invokeHandlerMethod(request, response, handlerMethod);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">// No synchronization on session demanded at all...</span></span><br><span class="line"> mav = invokeHandlerMethod(request, response, handlerMethod);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (!response.containsHeader(HEADER_CACHE_CONTROL)) &#123;</span><br><span class="line"> <span class="keyword">if</span> (getSessionAttributesHandler(handlerMethod).hasSessionAttributes()) &#123;</span><br><span class="line"> applyCacheSeconds(response, <span class="built_in">this</span>.cacheSecondsForSessionAttributeHandlers);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">else</span> &#123;</span><br><span class="line"> prepareResponse(response);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> mav;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>执行invokeHandlerMethod( )方法</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line">mav = invokeHandlerMethod(request, response, handlerMethod);</span><br></pre></td></tr></table></figure>
<p>进入invokeHandlerMethod()方法</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Nullable</span></span><br><span class="line"><span class="keyword">protected</span> ModelAndView <span class="title function_">invokeHandlerMethod</span><span class="params">(HttpServletRequest request,</span></span><br><span class="line"><span class="params"> HttpServletResponse response, HandlerMethod handlerMethod)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">ServletWebRequest</span> <span class="variable">webRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ServletWebRequest</span>(request, response);</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">WebDataBinderFactory</span> <span class="variable">binderFactory</span> <span class="operator">=</span> getDataBinderFactory(handlerMethod);</span><br><span class="line"> <span class="type">ModelFactory</span> <span class="variable">modelFactory</span> <span class="operator">=</span> getModelFactory(handlerMethod, binderFactory);</span><br><span class="line"></span><br><span class="line"> <span class="type">ServletInvocableHandlerMethod</span> <span class="variable">invocableMethod</span> <span class="operator">=</span> createInvocableHandlerMethod(handlerMethod);</span><br><span class="line"> <span class="keyword">if</span> (<span class="built_in">this</span>.argumentResolvers != <span class="literal">null</span>) &#123;</span><br><span class="line"> invocableMethod.setHandlerMethodArgumentResolvers(<span class="built_in">this</span>.argumentResolvers);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (<span class="built_in">this</span>.returnValueHandlers != <span class="literal">null</span>) &#123;</span><br><span class="line"> invocableMethod.setHandlerMethodReturnValueHandlers(<span class="built_in">this</span>.returnValueHandlers);</span><br><span class="line"> &#125;</span><br><span class="line"> invocableMethod.setDataBinderFactory(binderFactory);</span><br><span class="line"> invocableMethod.setParameterNameDiscoverer(<span class="built_in">this</span>.parameterNameDiscoverer);</span><br><span class="line"></span><br><span class="line"> <span class="type">ModelAndViewContainer</span> <span class="variable">mavContainer</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ModelAndViewContainer</span>();</span><br><span class="line"> mavContainer.addAllAttributes(RequestContextUtils.getInputFlashMap(request));</span><br><span class="line"> modelFactory.initModel(webRequest, mavContainer, invocableMethod);</span><br><span class="line"> mavContainer.setIgnoreDefaultModelOnRedirect(<span class="built_in">this</span>.ignoreDefaultModelOnRedirect);</span><br><span class="line"></span><br><span class="line"> <span class="type">AsyncWebRequest</span> <span class="variable">asyncWebRequest</span> <span class="operator">=</span> WebAsyncUtils.createAsyncWebRequest(request, response);</span><br><span class="line"> asyncWebRequest.setTimeout(<span class="built_in">this</span>.asyncRequestTimeout);</span><br><span class="line"></span><br><span class="line"> <span class="type">WebAsyncManager</span> <span class="variable">asyncManager</span> <span class="operator">=</span> WebAsyncUtils.getAsyncManager(request);</span><br><span class="line"> asyncManager.setTaskExecutor(<span class="built_in">this</span>.taskExecutor);</span><br><span class="line"> asyncManager.setAsyncWebRequest(asyncWebRequest);</span><br><span class="line"> asyncManager.registerCallableInterceptors(<span class="built_in">this</span>.callableInterceptors);</span><br><span class="line"> asyncManager.registerDeferredResultInterceptors(<span class="built_in">this</span>.deferredResultInterceptors);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (asyncManager.hasConcurrentResult()) &#123;</span><br><span class="line"> <span class="type">Object</span> <span class="variable">result</span> <span class="operator">=</span> asyncManager.getConcurrentResult();</span><br><span class="line"> mavContainer = (ModelAndViewContainer) asyncManager.getConcurrentResultContext()[<span class="number">0</span>];</span><br><span class="line"> asyncManager.clearConcurrentResult();</span><br><span class="line"> LogFormatUtils.traceDebug(logger, traceOn -&gt; &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">formatted</span> <span class="operator">=</span> LogFormatUtils.formatValue(result, !traceOn);</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;Resume with async result [&quot;</span> + formatted + <span class="string">&quot;]&quot;</span>;</span><br><span class="line"> &#125;);</span><br><span class="line"> invocableMethod = invocableMethod.wrapConcurrentResult(result);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> invocableMethod.invokeAndHandle(webRequest, mavContainer);</span><br><span class="line"> <span class="keyword">if</span> (asyncManager.isConcurrentHandlingStarted()) &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> getModelAndView(mavContainer, modelFactory, webRequest);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">finally</span> &#123;</span><br><span class="line"> webRequest.requestCompleted();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>注意这里的26个参数解析器参数解析器的作用是确定将要执行的目标方法的每一个参数的值是什么</p>
<p>这里的每一个参数解析器都对应了我们标注在参数上的注解</p>
<p>SpringMVC目标方法能写多少种参数类型取决于参数解析器</p>
<p><img src="/pictures/image-20230812094224699.png" alt="image-20230812094224699"></p>
<p>参数解析器的接口设计</p>
<p><img src="/pictures/image-20230812094755583.png" alt="image-20230812094755583"></p>
<ul>
<li>当前解析器是否支持解析这种参数</li>
<li>支持就调用 resolveArgument</li>
</ul>
<p>返回值处理器</p>
<p>定义了controller返回值的类型</p>
<img src="/pictures/image-20230812095137195.png" alt="image-20230812095137195" style="zoom:150%;" />
<p>RequestMappingHandlerAdapter的invokeAndHandle( )方法真正的执行请求</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line">invocableMethod.invokeAndHandle(webRequest, mavContainer);</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">invokeAndHandle</span><span class="params">(ServletWebRequest webRequest, ModelAndViewContainer mavContainer,</span></span><br><span class="line"><span class="params"> Object... providedArgs)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">Object</span> <span class="variable">returnValue</span> <span class="operator">=</span> invokeForRequest(webRequest, mavContainer, providedArgs);</span><br><span class="line"> <span class="comment">//上面一行代码执行完毕之后会直接跳到controller方法然后执行下面的代码</span></span><br><span class="line"> setResponseStatus(webRequest);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (returnValue == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (isRequestNotModified(webRequest) || getResponseStatus() != <span class="literal">null</span> || mavContainer.isRequestHandled()) &#123;</span><br><span class="line"> disableContentCachingIfNecessary(webRequest);</span><br><span class="line"> mavContainer.setRequestHandled(<span class="literal">true</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">else</span> <span class="keyword">if</span> (StringUtils.hasText(getResponseStatusReason())) &#123;</span><br><span class="line"> mavContainer.setRequestHandled(<span class="literal">true</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> mavContainer.setRequestHandled(<span class="literal">false</span>);</span><br><span class="line"> Assert.state(<span class="built_in">this</span>.returnValueHandlers != <span class="literal">null</span>, <span class="string">&quot;No return value handlers&quot;</span>);</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.returnValueHandlers.handleReturnValue(</span><br><span class="line"> returnValue, getReturnValueType(returnValue), mavContainer, webRequest);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">catch</span> (Exception ex) &#123;</span><br><span class="line"> <span class="keyword">if</span> (logger.isTraceEnabled()) &#123;</span><br><span class="line"> logger.trace(formatErrorForReturnValue(returnValue), ex);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">throw</span> ex;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>执行的过程</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="type">Object</span> <span class="variable">returnValue</span> <span class="operator">=</span> invokeForRequest(webRequest, mavContainer, providedArgs);</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Nullable</span></span><br><span class="line"><span class="keyword">public</span> Object <span class="title function_">invokeForRequest</span><span class="params">(NativeWebRequest request, <span class="meta">@Nullable</span> ModelAndViewContainer mavContainer,</span></span><br><span class="line"><span class="params"> Object... providedArgs)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"></span><br><span class="line"> Object[] args = getMethodArgumentValues(request, mavContainer, providedArgs);</span><br><span class="line"> <span class="comment">//这个args就记录了方法上所有的参数</span></span><br><span class="line"> <span class="keyword">if</span> (logger.isTraceEnabled()) &#123;</span><br><span class="line"> logger.trace(<span class="string">&quot;Arguments: &quot;</span> + Arrays.toString(args));</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> doInvoke(args);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230812100059378.png" alt="image-20230812100059378"></p>
<p>获取方法参数值的过程</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line">Object[] args = getMethodArgumentValues(request, mavContainer, providedArgs);</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">protected</span> Object[] getMethodArgumentValues(NativeWebRequest request, <span class="meta">@Nullable</span> ModelAndViewContainer mavContainer,</span><br><span class="line"> Object... providedArgs) <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"></span><br><span class="line"> </span><br><span class="line"> <span class="comment">//获取所有参数的参数声明 参数类型 标注的注解 </span></span><br><span class="line"> MethodParameter[] parameters = getMethodParameters();</span><br><span class="line"> <span class="keyword">if</span> (ObjectUtils.isEmpty(parameters)) &#123;</span><br><span class="line"> <span class="keyword">return</span> EMPTY_ARGS;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> Object[] args = <span class="keyword">new</span> <span class="title class_">Object</span>[parameters.length];</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; parameters.length; i++) &#123;</span><br><span class="line"> <span class="type">MethodParameter</span> <span class="variable">parameter</span> <span class="operator">=</span> parameters[i];</span><br><span class="line"> parameter.initParameterNameDiscovery(<span class="built_in">this</span>.parameterNameDiscoverer);</span><br><span class="line"> args[i] = findProvidedArgument(parameter, providedArgs);</span><br><span class="line"> <span class="keyword">if</span> (args[i] != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">continue</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (!<span class="built_in">this</span>.resolvers.supportsParameter(parameter)) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">IllegalStateException</span>(formatArgumentError(parameter, <span class="string">&quot;No suitable resolver&quot;</span>));</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> args[i] = <span class="built_in">this</span>.resolvers.resolveArgument(parameter, mavContainer, request, <span class="built_in">this</span>.dataBinderFactory);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">catch</span> (Exception ex) &#123;</span><br><span class="line"> <span class="comment">// Leave stack trace for later, exception may actually be resolved and handled...</span></span><br><span class="line"> <span class="keyword">if</span> (logger.isDebugEnabled()) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">exMsg</span> <span class="operator">=</span> ex.getMessage();</span><br><span class="line"> <span class="keyword">if</span> (exMsg != <span class="literal">null</span> &amp;&amp; !exMsg.contains(parameter.getExecutable().toGenericString())) &#123;</span><br><span class="line"> logger.debug(formatArgumentError(parameter, exMsg));</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">throw</span> ex;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> args;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>遍历判断获取支持解析该参数的参数解析器</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Nullable</span></span><br><span class="line"><span class="keyword">private</span> HandlerMethodArgumentResolver <span class="title function_">getArgumentResolver</span><span class="params">(MethodParameter parameter)</span> &#123;</span><br><span class="line"> <span class="type">HandlerMethodArgumentResolver</span> <span class="variable">result</span> <span class="operator">=</span> <span class="built_in">this</span>.argumentResolverCache.get(parameter);</span><br><span class="line"> <span class="keyword">if</span> (result == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">for</span> (HandlerMethodArgumentResolver resolver : <span class="built_in">this</span>.argumentResolvers) &#123;</span><br><span class="line"> <span class="keyword">if</span> (resolver.supportsParameter(parameter)) &#123;</span><br><span class="line"> result = resolver;</span><br><span class="line"> <span class="built_in">this</span>.argumentResolverCache.put(parameter, result);</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> result;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>解析参数的值通过调用各自 HandlerMethodArgumentResolver 的 resolveArgument 方法</p>
<h4 id="2-4-数据响应与内容协商"><a href="#2-4-数据响应与内容协商" class="headerlink" title="2.4 数据响应与内容协商"></a>2.4 数据响应与内容协商</h4><p>返回值的处理逻辑</p>
<h5 id="2-4-1-相关依赖的引入"><a href="#2-4-1-相关依赖的引入" class="headerlink" title="2.4.1 相关依赖的引入"></a>2.4.1 相关依赖的引入</h5><p>创建springBoot项目的时候导入了spring-boot-starter-web依赖会自动的帮我们导入相关的json依赖便于json数据的前后端传递</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-web<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>自动的帮我们导入相关的json的starter</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-json<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.3.4.RELEASE<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">scope</span>&gt;</span>compile<span class="tag">&lt;/<span class="name">scope</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>在spring-boot-starter-json中引入了jackson相关的依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.fasterxml.jackson.core<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>jackson-databind<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.11.2<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">scope</span>&gt;</span>compile<span class="tag">&lt;/<span class="name">scope</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.fasterxml.jackson.datatype<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>jackson-datatype-jdk8<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.11.2<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">scope</span>&gt;</span>compile<span class="tag">&lt;/<span class="name">scope</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.fasterxml.jackson.datatype<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>jackson-datatype-jsr310<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.11.2<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">scope</span>&gt;</span>compile<span class="tag">&lt;/<span class="name">scope</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.fasterxml.jackson.module<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>jackson-module-parameter-names<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.11.2<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">scope</span>&gt;</span>compile<span class="tag">&lt;/<span class="name">scope</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><strong>返回值解析器的原理</strong></p>
<ul>
<li><p>1、返回值处理器判断是否支持这种类型返回值 supportsReturnType</p>
</li>
<li><p>2、返回值处理器调用 handleReturnValue 进行处理</p>
</li>
<li><p>3、RequestResponseBodyMethodProcessor 可以处理返回值标了@ResponseBody 注解的。</p>
</li>
<li><ul>
<li><ol>
<li>利用 MessageConverters 进行处理 将数据写为json</li>
</ol>
</li>
</ul>
</li>
<li><ul>
<li><ul>
<li>1、内容协商浏览器默认会以请求头的方式告诉服务器他能接受什么样的内容类型</li>
<li>2、服务器最终根据自己自身的能力决定服务器能生产出什么样内容类型的数据</li>
<li>3、SpringMVC会挨个遍历所有容器底层的 HttpMessageConverter ,看谁能处理?</li>
</ul>
</li>
</ul>
</li>
<li><ul>
<li><ul>
<li><ul>
<li>1、得到MappingJackson2HttpMessageConverter可以将对象写为json</li>
<li>2、利用MappingJackson2HttpMessageConverter将对象转为json再写出去。</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h5 id="2-4-2-内容协商原理"><a href="#2-4-2-内容协商原理" class="headerlink" title="2.4.2 内容协商原理"></a>2.4.2 内容协商原理</h5><p>引入jackson-dataformat-xml测试返回是xml格式的数据</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.fasterxml.jackson.dataformat<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>jackson-dataformat-xml<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>开启基于请求参数的内容协商功能</p>
<p>发请求: <a href="http://localhost:8080/test/person?format=json">http://localhost:8080/test/person?format=json</a> &#x2F;&#x2F;指定格式是json </p>
<p> <a href="http://localhost:8080/test/person?format=xml">http://localhost:8080/test/person?format=xml</a> &#x2F;&#x2F;指定格式是xml</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">contentnegotiation:</span></span><br><span class="line"> <span class="attr">favor-parameter:</span> <span class="literal">true</span> <span class="comment">#开启请求参数内容协商模式</span></span><br></pre></td></tr></table></figure>
<p>1、Parameter策略优先确定是要返回json数据获取请求头中的format的值</p>
<p>2、最终进行内容协商返回给客户端json即可</p>
<p>3、遍历循环所有当前系统的 MessageConverter看谁支持操作这个对象Person</p>
<p>4、找到支持操作Person的converter把converter支持的媒体类型统计出来。</p>
<p>5、客户端需要【application&#x2F;xml】。服务端能力【10种、json、xml】</p>
<p>6、进行内容协商的最佳匹配媒体类型</p>
<p>7、用 支持 将对象转为 最佳匹配媒体类型 的converter。调用它进行转化 。</p>
<h5 id="2-4-3-自定义MessageConverter"><a href="#2-4-3-自定义MessageConverter" class="headerlink" title="2.4.3 自定义MessageConverter"></a>2.4.3 自定义MessageConverter</h5><p>1、@ResponseBody 响应数据出去 调用 RequestResponseBodyMethodProcessor 处理</p>
<p>2、Processor 处理方法返回值。通过 MessageConverter 处理</p>
<p>3、所有 MessageConverter 合起来可以支持各种媒体类型数据的操作(读、写)</p>
<p>4、内容协商找到最终的 messageConverter</p>
<p> <strong>步骤:</strong><br>1、添加自定义的MessageConverter进系统底层</p>
<p>2、系统底层就会统计出所有MessageConverter能操作哪些类型</p>
<p>3、客户端内容协商 [guigu—&gt;guigu]</p>
<p>编写自定义的的converter</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot.converter;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.atguigu.boot.bean.Person;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.HttpInputMessage;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.HttpOutputMessage;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.MediaType;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.converter.HttpMessageConverter;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.converter.HttpMessageNotReadableException;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.converter.HttpMessageNotWritableException;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.io.OutputStream;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 自定义的Converter</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">GuiguMessageConverter</span> <span class="keyword">implements</span> <span class="title class_">HttpMessageConverter</span>&lt;Person&gt; &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">canRead</span><span class="params">(Class&lt;?&gt; clazz, MediaType mediaType)</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">canWrite</span><span class="params">(Class&lt;?&gt; clazz, MediaType mediaType)</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> clazz.isAssignableFrom(Person.class);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 服务器要统计所有MessageConverter都能写出哪些内容类型</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * application/x-guigu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> List&lt;MediaType&gt; <span class="title function_">getSupportedMediaTypes</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> MediaType.parseMediaTypes(<span class="string">&quot;application/x-guigu&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> Person <span class="title function_">read</span><span class="params">(Class&lt;? extends Person&gt; clazz, HttpInputMessage inputMessage)</span> <span class="keyword">throws</span> IOException, HttpMessageNotReadableException &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">write</span><span class="params">(Person person, MediaType contentType, HttpOutputMessage outputMessage)</span> <span class="keyword">throws</span> IOException, HttpMessageNotWritableException &#123;</span><br><span class="line"> <span class="comment">//自定义协议数据的写出</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">data</span> <span class="operator">=</span> person.getUserName()+<span class="string">&quot;;&quot;</span>+person.getAge()+<span class="string">&quot;;&quot;</span>+person.getBirth();</span><br><span class="line"> <span class="comment">//写出去</span></span><br><span class="line"> <span class="type">OutputStream</span> <span class="variable">body</span> <span class="operator">=</span> outputMessage.getBody();</span><br><span class="line"> body.write(data.getBytes());</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>在配置文件中加入自定义的converter</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot.config;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.atguigu.boot.bean.Person;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.boot.bean.Pet;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.boot.converter.GuiguMessageConverter;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Bean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"><span class="keyword">import</span> org.springframework.core.convert.converter.Converter;</span><br><span class="line"><span class="keyword">import</span> org.springframework.format.FormatterRegistry;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.HttpInputMessage;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.HttpOutputMessage;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.MediaType;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.converter.HttpMessageConverter;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.converter.HttpMessageNotReadableException;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.converter.HttpMessageNotWritableException;</span><br><span class="line"><span class="keyword">import</span> org.springframework.util.StringUtils;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.accept.HeaderContentNegotiationStrategy;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.accept.ParameterContentNegotiationStrategy;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.filter.HiddenHttpMethodFilter;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.servlet.config.annotation.PathMatchConfigurer;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.servlet.config.annotation.WebMvcConfigurer;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.util.UrlPathHelper;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.io.OutputStream;</span><br><span class="line"><span class="keyword">import</span> java.util.*;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Configuration(proxyBeanMethods = false)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WebConfig</span> &#123;</span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> WebMvcConfigurer <span class="title function_">webMvcConfigurer</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">WebMvcConfigurer</span>() &#123;</span><br><span class="line"> <span class="comment">//加入自定义的converter</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">extendMessageConverters</span><span class="params">(List&lt;HttpMessageConverter&lt;?&gt;&gt; converters)</span> &#123;</span><br><span class="line"> converters.add(<span class="keyword">new</span> <span class="title class_">GuiguMessageConverter</span>());</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>在浏览器url上拼接参数的形式实现内容协商</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot.config;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.atguigu.boot.bean.Person;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.boot.bean.Pet;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.boot.converter.GuiguMessageConverter;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Bean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"><span class="keyword">import</span> org.springframework.core.convert.converter.Converter;</span><br><span class="line"><span class="keyword">import</span> org.springframework.format.FormatterRegistry;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.HttpInputMessage;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.HttpOutputMessage;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.MediaType;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.converter.HttpMessageConverter;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.converter.HttpMessageNotReadableException;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.converter.HttpMessageNotWritableException;</span><br><span class="line"><span class="keyword">import</span> org.springframework.util.StringUtils;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.accept.HeaderContentNegotiationStrategy;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.accept.ParameterContentNegotiationStrategy;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.filter.HiddenHttpMethodFilter;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.servlet.config.annotation.PathMatchConfigurer;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.servlet.config.annotation.WebMvcConfigurer;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.util.UrlPathHelper;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.io.OutputStream;</span><br><span class="line"><span class="keyword">import</span> java.util.*;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Configuration(proxyBeanMethods = false)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WebConfig</span>&#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> WebMvcConfigurer <span class="title function_">webMvcConfigurer</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">WebMvcConfigurer</span>() &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 自定义内容协商策略</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> configurer</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">configureContentNegotiation</span><span class="params">(ContentNegotiationConfigurer configurer)</span> &#123;</span><br><span class="line"> Map&lt;String, MediaType&gt; mediaTypes = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> mediaTypes.put(<span class="string">&quot;json&quot;</span>,MediaType.APPLICATION_JSON);</span><br><span class="line"> mediaTypes.put(<span class="string">&quot;xml&quot;</span>,MediaType.APPLICATION_XML);</span><br><span class="line"> <span class="comment">//在浏览器url上拼接参数的形式实现内容协商</span></span><br><span class="line"> <span class="comment">//http://localhost:8080/test/person?format=gg</span></span><br><span class="line"> mediaTypes.put(<span class="string">&quot;gg&quot;</span>,MediaType.parseMediaType(<span class="string">&quot;application/x-guigu&quot;</span>));</span><br><span class="line"> <span class="comment">//指定支持解析哪些参数对应的哪些媒体类型</span></span><br><span class="line"> <span class="type">ParameterContentNegotiationStrategy</span> <span class="variable">parameterStrategy</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ParameterContentNegotiationStrategy</span>(mediaTypes);</span><br><span class="line"> <span class="comment">//parameterStrategy.setParameterName(&quot;ff&quot;);</span></span><br><span class="line"></span><br><span class="line"> <span class="type">HeaderContentNegotiationStrategy</span> <span class="variable">headeStrategy</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HeaderContentNegotiationStrategy</span>();</span><br><span class="line"></span><br><span class="line"> configurer.strategies(Arrays.asList(parameterStrategy,headeStrategy));</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//加入自定义的converter</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">extendMessageConverters</span><span class="params">(List&lt;HttpMessageConverter&lt;?&gt;&gt; converters)</span> &#123;</span><br><span class="line"> converters.add(<span class="keyword">new</span> <span class="title class_">GuiguMessageConverter</span>());</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="3-视图解析与模板引擎"><a href="#3-视图解析与模板引擎" class="headerlink" title="3.视图解析与模板引擎"></a>3.视图解析与模板引擎</h3><p>视图解析SpringBoot默认不支持 JSP需要引入第三方模板引擎技术实现页面渲染</p>
<h4 id="3-1-视图解析"><a href="#3-1-视图解析" class="headerlink" title="3.1 视图解析"></a>3.1 视图解析</h4><p><img src="/pictures/image-20230815091741019.png" alt="image-20230815091741019"></p>
<h4 id="3-2-模板引擎-Thymeleaf"><a href="#3-2-模板引擎-Thymeleaf" class="headerlink" title="3.2 模板引擎-Thymeleaf"></a>3.2 模板引擎-Thymeleaf</h4><p>详细的使用教程: <a href="https://qingling.icu/posts/54835.html">https://qingling.icu/posts/54835.html</a></p>
<h5 id="3-2-1-Thymeleaf的使用"><a href="#3-2-1-Thymeleaf的使用" class="headerlink" title="3.2.1 Thymeleaf的使用"></a>3.2.1 Thymeleaf的使用</h5><p>1.引入依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-thymeleaf<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>2.编写测试controller</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ViewTestController</span> &#123;</span><br><span class="line"> <span class="meta">@GetMapping(&quot;/view&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">hello</span><span class="params">(Model model)</span>&#123;</span><br><span class="line"> <span class="comment">//向请求域中共享数据</span></span><br><span class="line"> model.addAttribute(<span class="string">&quot;keys&quot;</span>,<span class="string">&quot;Thymeleaf&quot;</span>);</span><br><span class="line"> <span class="comment">//转发到success页面中</span></span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;success&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>3.页面上渲染</p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">xmlns:th</span>=<span class="string">&quot;http://www.thymeleaf.org&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>Title<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">h1</span> <span class="attr">th:text</span>=<span class="string">&quot;$&#123;keys&#125;&quot;</span>&gt;</span>Hello<span class="tag">&lt;/<span class="name">h1</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230815153318041.png" alt="image-20230815153318041"></p>
<h4 id="3-3-后台管理系统注意点"><a href="#3-3-后台管理系统注意点" class="headerlink" title="3.3 后台管理系统注意点"></a>3.3 后台管理系统注意点</h4><p><strong>templates目录的访问规则</strong></p>
<p>templates目录下的所有页面资源只能通过请求访问到</p>
<p><strong>表单重复提交的问题</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.admin.controller;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">IndexController</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 来登录页</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@GetMapping(value = &#123;&quot;/&quot;,&quot;/login&quot;&#125;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">loginPage</span><span class="params">()</span>&#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;login&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="meta">@PostMapping(&quot;/login&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">main</span><span class="params">(String username, String password)</span>&#123;</span><br><span class="line"> <span class="comment">//登录成功重定向到main.html; 重定向防止表单重复提交</span></span><br><span class="line"> <span class="comment">//这里如果直接写 return &quot;main&quot;的话页面在mian.html的情况下url路径还是localhost:8080/login,如果再次刷新页面会重复提交表单</span></span><br><span class="line"> <span class="comment">//使用下面这个写法,执行&quot;/login&quot;这个请求之后路径的url会变成localhost:8080/main.html</span></span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;redirect:/main.html&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 去main页面</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/main.html&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">mainPage</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;main&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="4-拦截器"><a href="#4-拦截器" class="headerlink" title="4.拦截器"></a>4.拦截器</h3><h4 id="1-HandlerInterceptor接口"><a href="#1-HandlerInterceptor接口" class="headerlink" title="1.HandlerInterceptor接口"></a>1.HandlerInterceptor接口</h4><p>自定义拦截器需要实现的接口,以及需要实现接口中的方法</p>
<p><img src="/pictures/image-20230821105529796.png" alt="image-20230821105529796"></p>
<h4 id="2-拦截器实现登录检查操作"><a href="#2-拦截器实现登录检查操作" class="headerlink" title="2.拦截器实现登录检查操作"></a>2.拦截器实现登录检查操作</h4><p><strong>登录检查的业务逻辑</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 登录检查</span></span><br><span class="line"><span class="comment"> * 1、配置好拦截器要拦截哪些请求</span></span><br><span class="line"><span class="comment"> * 2、把这些配置放在容器中</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">LoginInterceptor</span> <span class="keyword">implements</span> <span class="title class_">HandlerInterceptor</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 目标方法执行之前</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> request</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> response</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> handler</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> * <span class="doctag">@throws</span> Exception</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">preHandle</span><span class="params">(HttpServletRequest request, HttpServletResponse response, Object handler)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">String</span> <span class="variable">requestURI</span> <span class="operator">=</span> request.getRequestURI();</span><br><span class="line"> log.info(<span class="string">&quot;preHandle拦截的请求路径是&#123;&#125;&quot;</span>,requestURI);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//登录检查逻辑</span></span><br><span class="line"> <span class="type">HttpSession</span> <span class="variable">session</span> <span class="operator">=</span> request.getSession();</span><br><span class="line"></span><br><span class="line"> <span class="type">Object</span> <span class="variable">loginUser</span> <span class="operator">=</span> session.getAttribute(<span class="string">&quot;loginUser&quot;</span>);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span>(loginUser != <span class="literal">null</span>)&#123;</span><br><span class="line"> <span class="comment">//放行</span></span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//拦截住 未登录 跳转到登录页</span></span><br><span class="line"> request.setAttribute(<span class="string">&quot;msg&quot;</span>,<span class="string">&quot;请先登录&quot;</span>);</span><br><span class="line"> request.getRequestDispatcher(<span class="string">&quot;/&quot;</span>).forward(request,response);</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 目标方法执行完成以后</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> request</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> response</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> handler</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> modelAndView</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@throws</span> Exception</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">postHandle</span><span class="params">(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> log.info(<span class="string">&quot;postHandle执行&#123;&#125;&quot;</span>,modelAndView);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 页面渲染以后</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> request</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> response</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> handler</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> ex</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@throws</span> Exception</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">afterCompletion</span><span class="params">(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> log.info(<span class="string">&quot;afterCompletion执行异常&#123;&#125;&quot;</span>,ex);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>拦截器的配置</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 1、编写一个拦截器实现HandlerInterceptor接口</span></span><br><span class="line"><span class="comment"> * 2、拦截器注册到容器中实现WebMvcConfigurer的addInterceptors</span></span><br><span class="line"><span class="comment"> * 3、指定拦截规则[如果是拦截所有,静态资源也会被拦截]</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">AdminWebConfig</span> <span class="keyword">implements</span> <span class="title class_">WebMvcConfigurer</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">addInterceptors</span><span class="params">(InterceptorRegistry registry)</span> &#123;</span><br><span class="line"> registry.addInterceptor(<span class="keyword">new</span> <span class="title class_">LoginInterceptor</span>())</span><br><span class="line"> .addPathPatterns(<span class="string">&quot;/**&quot;</span>) <span class="comment">//所有请求都被拦截包括静态资源</span></span><br><span class="line"> .excludePathPatterns(<span class="string">&quot;/&quot;</span>,<span class="string">&quot;/login&quot;</span>,<span class="string">&quot;/css/**&quot;</span>,<span class="string">&quot;/fonts/**&quot;</span>,<span class="string">&quot;/images/**&quot;</span>,<span class="string">&quot;/js/**&quot;</span>); <span class="comment">//放行的请求</span></span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="3-拦截器原理"><a href="#3-拦截器原理" class="headerlink" title="3.拦截器原理"></a>3.拦截器原理</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * preHandle() :该方法在控制器方法之前执行如果返回false,说明拦截器不放行该请求,自己处理或者结束该请求</span></span><br><span class="line"><span class="comment"> * 如果返回true说明拦截器放该请求由其它匹配的拦截器或者控制器继续处理</span></span><br><span class="line"><span class="comment"> * postHandle():该方法在控制器方法调用之后,且解析视图之前执行,可以通过此方法对请求域中的模型和视图做出进一步的修改</span></span><br><span class="line"><span class="comment"> * afterCompletion() 该方法会在整个请求完成,即视图渲染结束之后执行,多用于资源的清理工作</span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure>
<p>1、根据当前请求找到HandlerExecutionChain[可以处理请求的handler以及handler的所有 拦截器]</p>
<p>2、先来顺序执行 所有拦截器的 preHandle方法</p>
<ul>
<li>1、如果当前拦截器prehandler返回为true,则执行下一个拦截器的preHandle</li>
<li>2、如果当前拦截器返回为false。直接倒序执行所有已经执行了的拦截器的afterCompletion方法</li>
</ul>
<p>3、如果任何一个拦截器返回false直接跳出不执行目标方法</p>
<p>4、所有拦截器都返回true,执行目标方法</p>
<p>5、倒序执行所有拦截器的postHandle方法</p>
<p>6、前面的步骤有任何异常都会直接倒序触发 afterCompletion</p>
<p>7、页面成功渲染完成以后也会倒序触发 afterCompletion</p>
<p><img src="/pictures/image-20230821112246355.png" alt="image-20230821112246355"></p>
<h3 id="5-文件上传"><a href="#5-文件上传" class="headerlink" title="5.文件上传"></a>5.文件上传</h3><h4 id="1-页面表单"><a href="#1-页面表单" class="headerlink" title="1.页面表单"></a>1.页面表单</h4><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">form</span> <span class="attr">method</span>=<span class="string">&quot;post&quot;</span> <span class="attr">action</span>=<span class="string">&quot;/upload&quot;</span> <span class="attr">enctype</span>=<span class="string">&quot;multipart/form-data&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;file&quot;</span> <span class="attr">name</span>=<span class="string">&quot;file&quot;</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;submit&quot;</span> <span class="attr">value</span>=<span class="string">&quot;提交&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="2-文件上传代码"><a href="#2-文件上传代码" class="headerlink" title="2.文件上传代码"></a>2.文件上传代码</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * MultipartFile 自动封装上传过来的文件</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@PostMapping(&quot;/upload&quot;)</span></span><br><span class="line"><span class="keyword">public</span> String <span class="title function_">upload</span><span class="params">(<span class="meta">@RequestParam(&quot;email&quot;)</span> String email,</span></span><br><span class="line"><span class="params"> <span class="meta">@RequestParam(&quot;username&quot;)</span> String username,</span></span><br><span class="line"><span class="params"> <span class="meta">@RequestPart(&quot;headerImg&quot;)</span> MultipartFile headerImg,//单个文件</span></span><br><span class="line"><span class="params"> <span class="meta">@RequestPart(&quot;photos&quot;)</span> MultipartFile[] photos)</span> <span class="keyword">throws</span> IOException &#123;<span class="comment">//多个文件</span></span><br><span class="line"></span><br><span class="line"> log.info(<span class="string">&quot;上传的信息email=&#123;&#125;username=&#123;&#125;headerImg=&#123;&#125;photos=&#123;&#125;&quot;</span>,</span><br><span class="line"> email, username, headerImg.getSize(), photos.length);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (!headerImg.isEmpty()) &#123;</span><br><span class="line"> <span class="comment">//保存到文件服务器OSS服务器</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">originalFilename</span> <span class="operator">=</span> headerImg.getOriginalFilename();</span><br><span class="line"> headerImg.transferTo(<span class="keyword">new</span> <span class="title class_">File</span>(<span class="string">&quot;H:\\cache\\&quot;</span> + originalFilename));</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (photos.length &gt; <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="keyword">for</span> (MultipartFile photo : photos) &#123;</span><br><span class="line"> <span class="keyword">if</span> (!photo.isEmpty()) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">originalFilename</span> <span class="operator">=</span> photo.getOriginalFilename();</span><br><span class="line"> photo.transferTo(<span class="keyword">new</span> <span class="title class_">File</span>(<span class="string">&quot;H:\\cache\\&quot;</span> + originalFilename));</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;main&quot;</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="3-MultipartAutoConfiguration"><a href="#3-MultipartAutoConfiguration" class="headerlink" title="3.MultipartAutoConfiguration"></a>3.MultipartAutoConfiguration</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Configuration(proxyBeanMethods = false)</span></span><br><span class="line"><span class="meta">@ConditionalOnClass(&#123; Servlet.class, StandardServletMultipartResolver.class, MultipartConfigElement.class &#125;)</span></span><br><span class="line"><span class="meta">@ConditionalOnProperty(prefix = &quot;spring.servlet.multipart&quot;, name = &quot;enabled&quot;, matchIfMissing = true)</span></span><br><span class="line"><span class="meta">@ConditionalOnWebApplication(type = Type.SERVLET)</span></span><br><span class="line"><span class="meta">@EnableConfigurationProperties(MultipartProperties.class)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MultipartAutoConfiguration</span> &#123;&#125;</span><br></pre></td></tr></table></figure>
<h3 id="6-异常处理"><a href="#6-异常处理" class="headerlink" title="6.异常处理"></a>6.异常处理</h3><p>开发中异常处理方法: <a href="https://qingling.icu/posts/31385.html">https://qingling.icu/posts/31385.html</a></p>
<h4 id="1-默认规则"><a href="#1-默认规则" class="headerlink" title="1.默认规则"></a>1.默认规则</h4><ul>
<li>默认情况下Spring Boot提供<code>/error</code>处理所有错误的映射</li>
<li>对于机器客户端它将生成JSON响应其中包含错误HTTP状态和异常消息的详细信息。对于浏览器客户端响应一个“ whitelabel”错误视图以HTML格式呈现相同的数据</li>
</ul>
<h4 id="2-自定义错误页面"><a href="#2-自定义错误页面" class="headerlink" title="2.自定义错误页面"></a>2.自定义错误页面</h4><p>templates&#x2F;error&#x2F;下的4xx5xx页面会被自动解析</p>
<h3 id="7-Web原生组件注入Servlet、Filter、Listener"><a href="#7-Web原生组件注入Servlet、Filter、Listener" class="headerlink" title="7.Web原生组件注入Servlet、Filter、Listener"></a>7.Web原生组件注入Servlet、Filter、Listener</h3><h4 id="7-1-使用Servlet-Api"><a href="#7-1-使用Servlet-Api" class="headerlink" title="7.1 使用Servlet Api"></a>7.1 使用Servlet Api</h4><h5 id="1-原生的Servlet的使用"><a href="#1-原生的Servlet的使用" class="headerlink" title="1.原生的Servlet的使用"></a>1.原生的Servlet的使用</h5><p>1.编写自定义的servlet继承HttpServlet</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot.servlet;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.servlet.ServletException;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.annotation.WebServlet;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServlet;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletRequest;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletResponse;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/26</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@WebServlet(urlPatterns = &quot;/my&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MyServlet</span> <span class="keyword">extends</span> <span class="title class_">HttpServlet</span> &#123;</span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">protected</span> <span class="keyword">void</span> <span class="title function_">doGet</span><span class="params">(HttpServletRequest req, HttpServletResponse resp)</span> <span class="keyword">throws</span> ServletException, IOException &#123;</span><br><span class="line"> resp.getWriter().write(<span class="string">&quot;6666&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>2.在启动类上添加自定义servlet的包扫描注解</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.SpringApplication;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.autoconfigure.SpringBootApplication;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.web.servlet.ServletComponentScan;</span><br><span class="line"></span><br><span class="line"><span class="meta">@ServletComponentScan(&quot;com.atguigu.boot&quot;)</span> <span class="comment">//指定原生的servlet的位置</span></span><br><span class="line"><span class="meta">@SpringBootApplication</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Boot05Web01Application</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> SpringApplication.run(Boot05Web01Application.class, args);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>3.启动程序测试</p>
<p><img src="/pictures/image-20230826211541424.png" alt="image-20230826211541424"></p>
<h5 id="2-原生的Filter的使用"><a href="#2-原生的Filter的使用" class="headerlink" title="2.原生的Filter的使用"></a>2.原生的Filter的使用</h5><p>1.编写自定义的Filter实现Filter接口</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot.servlet;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.servlet.*;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.annotation.WebFilter;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/26</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@WebFilter(urlPatterns=&#123;&quot;/css/*&quot;,&quot;/images/*&quot;,&quot;/my&quot;&#125;)</span> <span class="comment">//设置拦截的路径</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MyFilter</span> <span class="keyword">implements</span> <span class="title class_">Filter</span> &#123;</span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">init</span><span class="params">(FilterConfig filterConfig)</span> <span class="keyword">throws</span> ServletException &#123;</span><br><span class="line"> log.info(<span class="string">&quot;MyFilter初始化完成&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">doFilter</span><span class="params">(ServletRequest request, ServletResponse response, FilterChain chain)</span> <span class="keyword">throws</span> IOException, ServletException &#123;</span><br><span class="line"> log.info(<span class="string">&quot;MyFilter工作&quot;</span>);</span><br><span class="line"> chain.doFilter(request,response);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">destroy</span><span class="params">()</span> &#123;</span><br><span class="line"> log.info(<span class="string">&quot;MyFilter销毁&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>2.启动程序测试</p>
<p><img src="/pictures/image-20230826212400849.png" alt="image-20230826212400849"></p>
<h5 id="3-原生的Listener的使用"><a href="#3-原生的Listener的使用" class="headerlink" title="3.原生的Listener的使用"></a>3.原生的Listener的使用</h5><p>1.编写自定义的MyServletContextListener实现ServletContextListener</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot.servlet;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.servlet.ServletContextEvent;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.ServletContextListener;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.annotation.WebListener;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/26</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@WebListener</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MyServletContextListener</span> <span class="keyword">implements</span> <span class="title class_">ServletContextListener</span> &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">contextInitialized</span><span class="params">(ServletContextEvent sce)</span> &#123;</span><br><span class="line"> log.info(<span class="string">&quot;MyServletContextListener监听到项目初始化完成&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">contextDestroyed</span><span class="params">(ServletContextEvent sce)</span> &#123;</span><br><span class="line"> log.info(<span class="string">&quot;MyServletContextListener监听到项目销毁&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>2.启动程序测试</p>
<p><img src="/pictures/image-20230826213125490.png" alt="image-20230826213125490"></p>
<h4 id="7-2-使用RegistrationBean"><a href="#7-2-使用RegistrationBean" class="headerlink" title="7.2 使用RegistrationBean"></a>7.2 使用RegistrationBean</h4><p>不使用@WebServlet、@WebFilter、@WebListener注解的方式(注释掉自定义servlet、Filter、Listener上的注解)</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot.servlet;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.web.servlet.FilterRegistrationBean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.web.servlet.ServletListenerRegistrationBean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.web.servlet.ServletRegistrationBean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Bean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Arrays;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/26</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MyRegisterConfig</span> &#123;</span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> ServletRegistrationBean <span class="title function_">myServlet</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="type">MyServlet</span> <span class="variable">myServlet</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">MyServlet</span>();</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">ServletRegistrationBean</span>(myServlet,<span class="string">&quot;/my&quot;</span>,<span class="string">&quot;/my02&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> FilterRegistrationBean <span class="title function_">myFilter</span><span class="params">()</span>&#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">MyFilter</span> <span class="variable">myFilter</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">MyFilter</span>();</span><br><span class="line"> <span class="comment">//return new FilterRegistrationBean(myFilter,myServlet());</span></span><br><span class="line"> <span class="type">FilterRegistrationBean</span> <span class="variable">filterRegistrationBean</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">FilterRegistrationBean</span>(myFilter);</span><br><span class="line"> filterRegistrationBean.setUrlPatterns(Arrays.asList(<span class="string">&quot;/my&quot;</span>,<span class="string">&quot;/css/*&quot;</span>));</span><br><span class="line"> <span class="keyword">return</span> filterRegistrationBean;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> ServletListenerRegistrationBean <span class="title function_">myListener</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="type">MyServletContextListener</span> <span class="variable">mySwervletContextListener</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">MyServletContextListener</span>();</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">ServletListenerRegistrationBean</span>(mySwervletContextListener);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>重新启动项目我们可以看到依然生效</p>
<p><img src="/pictures/image-20230826214253187.png" alt="image-20230826214253187"></p>
<h3 id="8-嵌入式Servlet容器"><a href="#8-嵌入式Servlet容器" class="headerlink" title="8.嵌入式Servlet容器"></a>8.嵌入式Servlet容器</h3><h4 id="8-1-切换嵌入式Servlet容器"><a href="#8-1-切换嵌入式Servlet容器" class="headerlink" title="8.1 切换嵌入式Servlet容器"></a>8.1 切换嵌入式Servlet容器</h4><ul>
<li><p>默认支持的webServer</p>
</li>
<li><ul>
<li><code>Tomcat</code>, <code>Jetty</code>, or <code>Undertow</code></li>
<li><code>ServletWebServerApplicationContext 容器启动寻找ServletWebServerFactory 并引导创建服务器</code></li>
</ul>
</li>
<li><p>切换服务器</p>
<p>1.排除tomcat的依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-web<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">exclusions</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">exclusion</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-tomcat<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">exclusion</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">exclusions</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>2.引入需要的服务器场景</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-undertow<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>3.重启项目可以看到服务器由tomcat变成了undertow</p>
<p><img src="/pictures/image-20230826221229898.png" alt="image-20230826221229898"></p>
</li>
<li><p>原理</p>
</li>
<li><ul>
<li>SpringBoot应用启动发现当前是Web应用。web场景包-导入tomcat</li>
<li>web应用会创建一个web版的ioc容器 <code>ServletWebServerApplicationContext</code> </li>
<li><code>ServletWebServerApplicationContext</code> 启动的时候寻找 <code>**ServletWebServerFactory**``Servlet 的web服务器工厂---&gt; Servlet 的web服务器</code> </li>
<li>SpringBoot底层默认有很多的WebServer工厂<code>TomcatServletWebServerFactory</code>, <code>JettyServletWebServerFactory</code>, or <code>UndertowServletWebServerFactory</code></li>
<li><code>底层直接会有一个自动配置类ServletWebServerFactoryAutoConfiguration</code></li>
<li><code>ServletWebServerFactoryAutoConfiguration导入了ServletWebServerFactoryConfiguration配置类</code></li>
<li><code>ServletWebServerFactoryConfiguration 配置类 根据动态判断系统中到底导入了那个Web服务器的包默认是web-starter导入tomcat包容器中就有 TomcatServletWebServerFactory</code></li>
<li><code>TomcatServletWebServerFactory 创建出Tomcat服务器并启动TomcatWebServer 的构造器拥有初始化方法initialize---this.tomcat.start();</code></li>
<li><code>内嵌服务器就是手动把启动服务器的代码调用tomcat核心jar包存在</code></li>
</ul>
</li>
</ul>
<h4 id="8-2-定制Servlet容器"><a href="#8-2-定制Servlet容器" class="headerlink" title="8.2 定制Servlet容器"></a>8.2 定制Servlet容器</h4><p>修改配置文件中以server.xxx打头的属性信息</p>
<p><img src="/pictures/image-20230826222050817.png" alt="image-20230826222050817"></p>
<h2 id="三-数据访问"><a href="#三-数据访问" class="headerlink" title="三.数据访问"></a>三.数据访问</h2><h3 id="1-SQL"><a href="#1-SQL" class="headerlink" title="1.SQL"></a>1.SQL</h3><h4 id="1-1-JDBC的使用"><a href="#1-1-JDBC的使用" class="headerlink" title="1.1 JDBC的使用"></a>1.1 JDBC的使用</h4><p>1.导入JDBC的场景</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-data-jdbc<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>2.导入自己使用的数据库的驱动Mysql或者Oracle版本号不写也可以官方做了版本仲裁但是要与实际安装的版本对应</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line">想要修改版本</span><br><span class="line">1、直接依赖引入具体版本maven的就近依赖原则</span><br><span class="line">2、重新声明版本maven的属性的就近优先原则</span><br><span class="line"><span class="tag">&lt;<span class="name">properties</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">java.version</span>&gt;</span>1.8<span class="tag">&lt;/<span class="name">java.version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">mysql.version</span>&gt;</span>5.1.45<span class="tag">&lt;/<span class="name">mysql.version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">properties</span>&gt;</span></span><br><span class="line">或者</span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>mysql<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>mysql-connector-java<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>5.1.45<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>3.添加配置</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">datasource:</span></span><br><span class="line"> <span class="attr">url:</span> <span class="string">jdbc:mysql://localhost:3306/db_account</span></span><br><span class="line"> <span class="attr">username:</span> <span class="string">root</span></span><br><span class="line"> <span class="attr">password:</span> <span class="number">123456</span></span><br><span class="line"> <span class="attr">driver-class-name:</span> <span class="string">com.mysql.jdbc.Driver</span></span><br><span class="line"> <span class="comment"># type: com.zaxxer.hikari.HikariDataSource #配置数据源</span></span><br></pre></td></tr></table></figure>
<p>4.测试</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.junit.jupiter.api.Test;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.test.context.SpringBootTest;</span><br><span class="line"><span class="keyword">import</span> org.springframework.jdbc.core.JdbcTemplate;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@SpringBootTest</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">Boot05Web01ApplicationTests</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> JdbcTemplate jdbcTemplate;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">contextLoads</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">Long</span> <span class="variable">count</span> <span class="operator">=</span> jdbcTemplate.queryForObject(<span class="string">&quot;select count(*) from `role` &quot;</span>, Long.class);</span><br><span class="line"> log.info(<span class="string">&quot;记录数:&#123;&#125;&quot;</span>,count);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="1-2-分析自动配置"><a href="#1-2-分析自动配置" class="headerlink" title="1.2 分析自动配置"></a>1.2 分析自动配置</h4><p><strong>自动配置的类</strong></p>
<p><img src="/pictures/image-20230826224503510.png" alt="image-20230826224503510"></p>
<ul>
<li><p>DataSourceAutoConfiguration 数据源的自动配置</p>
</li>
<li><ul>
<li>修改数据源相关的配置spring.datasource</li>
<li>数据库连接池的配置是自己容器中没有DataSource才自动配置的</li>
<li>底层配置好的连接池是HikariDataSource</li>
</ul>
</li>
<li><p>DataSourceTransactionManagerAutoConfiguration 事务管理器的自动配置</p>
</li>
<li><p>JdbcTemplateAutoConfiguration JdbcTemplate的自动配置可以来对数据库进行crud</p>
</li>
<li><ul>
<li>可以修改这个配置项@ConfigurationProperties(prefix &#x3D; “spring.jdbc”) 来修改JdbcTemplate</li>
</ul>
</li>
<li><p>JndiDataSourceAutoConfiguration jndi的自动配置</p>
</li>
<li><p>XADataSourceAutoConfiguration 分布式事务相关的</p>
</li>
</ul>
<h2 id="四-单元测试"><a href="#四-单元测试" class="headerlink" title="四.单元测试"></a>四.单元测试</h2><h3 id="1-JUnit5的变化"><a href="#1-JUnit5的变化" class="headerlink" title="1.JUnit5的变化"></a>1.JUnit5的变化</h3><p><strong>Spring Boot 2.2.0 版本开始引入 JUnit 5 作为单元测试默认库</strong></p>
<p>作为最新版本的JUnit框架JUnit5与之前版本的Junit框架有很大的不同。由三个不同子项目的几个不同模块组成</p>
<p>JUnit 5 &#x3D; JUnit Platform + JUnit Jupiter + JUnit Vintage</p>
<p>JUnit Platform: Junit Platform是在JVM上启动测试框架的基础不仅支持Junit自制的测试引擎其他测试引擎也都可以接入</p>
<p>JUnit Jupiter: JUnit Jupiter提供了JUnit5的新的编程模型是JUnit5新特性的核心。内部 包含了一个测试引擎用于在Junit Platform上运行</p>
<p>JUnit Vintage: 由于JUint已经发展多年为了照顾老的项目JUnit Vintage提供了兼容JUnit4.x,Junit3.x的测试引擎</p>
<p><strong>注意:</strong></p>
<p>SpringBoot 2.4 以上版本移除了默认对 Vintage 的依赖。如果需要兼容junit4需要自行引入不能使用junit4的功能 @Test</p>
<p><strong>以前的版本</strong></p>
<p>兼容以前的版本(junit4)需要额外导入的依赖(SpringBoot 2.4 以上版本移除了默认对 Vintage 的依赖)</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-test<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">scope</span>&gt;</span>test<span class="tag">&lt;/<span class="name">scope</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.junit.vintage<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>junit-vintage-engine<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">scope</span>&gt;</span>test<span class="tag">&lt;/<span class="name">scope</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">exclusions</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">exclusion</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.hamcrest<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>hamcrest-core<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">exclusion</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">exclusions</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>标注的注解</p>
<p>@SpringBootTest + @RunWith(SpringRunner.class)+@Test(4版本的@Test)</p>
<p><strong>现在的版本</strong></p>
<p>需要导入的依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-test<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">scope</span>&gt;</span>test<span class="tag">&lt;/<span class="name">scope</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>标注的注解</p>
<p>@SpringBootTest + @Test</p>
<p><strong>两个不同版本的 @Test 注解</strong></p>
<p><img src="/pictures/image-20230827112742347.png" alt="image-20230827112742347"></p>
<h3 id="2-JUnit5常用注解"><a href="#2-JUnit5常用注解" class="headerlink" title="2.JUnit5常用注解"></a>2.JUnit5常用注解</h3><p>JUnit5的注解与JUnit4的注解有所变化</p>
<p><a href="https://junit.org/junit5/docs/current/user-guide/#writing-tests-annotations">https://junit.org/junit5/docs/current/user-guide/#writing-tests-annotations</a></p>
<ul>
<li>@Test :表示方法是测试方法。但是与JUnit4的@Test不同他的职责非常单一不能声明任何属性拓展的测试将会由Jupiter提供额外测试</li>
<li>@ParameterizedTest :表示方法是参数化测试,下方会有详细介绍</li>
<li>@RepeatedTest :表示方法可重复执行,下方会有详细介绍</li>
<li>@DisplayName :为测试类或者测试方法设置展示名称</li>
</ul>
<p><img src="/pictures/image-20230827114256749.png" alt="image-20230827114256749"></p>
<ul>
<li><p>@BeforeEach :表示在每个单元测试之前执行</p>
</li>
<li><p>@AfterEach :表示在每个单元测试之后执行</p>
</li>
<li><p>@BeforeAll :表示在所有单元测试之前执行</p>
</li>
<li><p>@AfterAll :表示在所有单元测试之后执行</p>
</li>
</ul>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.junit.jupiter.api.*;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.test.context.SpringBootTest;</span><br><span class="line"><span class="keyword">import</span> org.springframework.jdbc.core.JdbcTemplate;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/27</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 测试junit5的相关注解</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@DisplayName(&quot;Junit5Test测试类&quot;)</span></span><br><span class="line"><span class="meta">@SpringBootTest</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Junit5Test</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@DisplayName</span> 加在方法或者类上,为测试类或者测试方法设置展示名称</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Disabled</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;测试@DisplayName注解&quot;)</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testDisplayName</span><span class="params">()</span>&#123;</span><br><span class="line"> log.info(<span class="string">&quot;@DisplayName注解的测试&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 在执行的单元测试方法之前运行</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@BeforeEach</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testBeforeEach</span><span class="params">()</span>&#123;</span><br><span class="line"> log.info(<span class="string">&quot;执行了testBeforeEach()方法&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 在执行的单元测试方法之后运行</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@AfterEach</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testAfterEach</span><span class="params">()</span> &#123;</span><br><span class="line"> log.info(<span class="string">&quot;执行了testAfterEach()方法&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 在所有的单元测试执行之后执行</span></span><br><span class="line"><span class="comment"> * 注意是静态方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@BeforeAll</span></span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">testBeforeAll</span><span class="params">()</span> &#123;</span><br><span class="line"> log.info(<span class="string">&quot;执行了testBeforeAll()方法&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 在所有的单元测试执行之前执行</span></span><br><span class="line"><span class="comment"> * 注意是静态方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@AfterAll</span></span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">testAfterAll</span><span class="params">()</span> &#123;</span><br><span class="line"> log.info(<span class="string">&quot;执行了testAfterAll()方法&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<ul>
<li>@Tag :表示单元测试类别类似于JUnit4中的@Categories</li>
<li>@Disabled :表示测试类或测试方法不执行类似于JUnit4中的@Ignore</li>
</ul>
<p><img src="/pictures/image-20230827115900097.png" alt="image-20230827115900097"></p>
<ul>
<li>@Timeout :表示测试方法运行如果超过了指定时间将会返回错误</li>
</ul>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 规定方法超时时间 超出时间测试出异常</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Timeout(value = 500, unit = TimeUnit.MILLISECONDS)</span></span><br><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">void</span> <span class="title function_">testTimeout</span><span class="params">()</span> <span class="keyword">throws</span> InterruptedException &#123;</span><br><span class="line"> Thread.sleep(<span class="number">600</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<ul>
<li>@ExtendWith :为测试类或测试方法提供扩展类引用</li>
</ul>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 重复测试</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RepeatedTest(5)</span></span><br><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">void</span> <span class="title function_">testRepeatedTest</span><span class="params">()</span> &#123;</span><br><span class="line"> log.info(<span class="string">&quot;重复测试中&quot;</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230828095915653.png" alt="image-20230828095915653"></p>
<p><strong>全部的代码</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.junit.jupiter.api.*;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.test.context.SpringBootTest;</span><br><span class="line"><span class="keyword">import</span> org.springframework.jdbc.core.JdbcTemplate;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.concurrent.TimeUnit;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/27</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 测试junit5的相关注解</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@DisplayName(&quot;Junit5Test测试类&quot;)</span></span><br><span class="line"><span class="meta">@SpringBootTest</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Junit5Test</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@DisplayName</span> 加在方法或者类上,为测试类或者测试方法设置展示名称</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Disabled</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;测试@DisplayName注解&quot;)</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testDisplayName</span><span class="params">()</span>&#123;</span><br><span class="line"> log.info(<span class="string">&quot;@DisplayName注解的测试&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 在执行的单元测试方法之前运行</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@BeforeEach</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testBeforeEach</span><span class="params">()</span>&#123;</span><br><span class="line"> log.info(<span class="string">&quot;执行了testBeforeEach()方法&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 在执行的单元测试方法之后运行</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@AfterEach</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testAfterEach</span><span class="params">()</span> &#123;</span><br><span class="line"> log.info(<span class="string">&quot;执行了testAfterEach()方法&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 在所有的单元测试执行之后执行</span></span><br><span class="line"><span class="comment"> * 注意是静态方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@BeforeAll</span></span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">testBeforeAll</span><span class="params">()</span> &#123;</span><br><span class="line"> log.info(<span class="string">&quot;执行了testBeforeAll()方法&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 在所有的单元测试执行之前执行</span></span><br><span class="line"><span class="comment"> * 注意是静态方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@AfterAll</span></span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">testAfterAll</span><span class="params">()</span> &#123;</span><br><span class="line"> log.info(<span class="string">&quot;执行了testAfterAll()方法&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 规定方法超时时间 超出时间测试出异常</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Timeout(value = 500, unit = TimeUnit.MILLISECONDS)</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testTimeout</span><span class="params">()</span> <span class="keyword">throws</span> InterruptedException &#123;</span><br><span class="line"> Thread.sleep(<span class="number">600</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 重复测试</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@RepeatedTest(5)</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testRepeatedTest</span><span class="params">()</span> &#123;</span><br><span class="line"> log.info(<span class="string">&quot;重复测试中&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="3-断言"><a href="#3-断言" class="headerlink" title="3.断言"></a>3.断言</h3><p> 断言assertions是测试方法中的核心部分用来对测试需要满足的条件进行验证。这些断言方法都是 org.junit.jupiter.api.Assertions 的静态方法。检查业务逻辑返回的数据是否合理。所有的测试运行结束以后,会有一个详细的测试报告。</p>
<h4 id="3-1-简单断言"><a href="#3-1-简单断言" class="headerlink" title="3.1 简单断言"></a>3.1 简单断言</h4><p>用来对单个值进行简单的验证</p>
<table>
<thead>
<tr>
<th>方法</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>assertEquals</td>
<td>判断两个对象或两个原始类型是否相等</td>
</tr>
<tr>
<td>assertNotEquals</td>
<td>判断两个对象或两个原始类型是否不相等</td>
</tr>
<tr>
<td>assertSame</td>
<td>判断两个对象引用是否指向同一个对象</td>
</tr>
<tr>
<td>assertNotSame</td>
<td>判断两个对象引用是否指向不同的对象</td>
</tr>
<tr>
<td>assertTrue</td>
<td>判断给定的布尔值是否为 true</td>
</tr>
<tr>
<td>assertFalse</td>
<td>判断给定的布尔值是否为 false</td>
</tr>
<tr>
<td>assertNull</td>
<td>判断给定的对象引用是否为 null</td>
</tr>
<tr>
<td>assertNotNull</td>
<td>判断给定的对象引用是否不为 null</td>
</tr>
</tbody></table>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="meta">@DisplayName(&quot;简单断言&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">simple</span><span class="params">()</span> &#123;</span><br><span class="line"> assertEquals(<span class="number">3</span>, <span class="number">1</span> + <span class="number">2</span>, <span class="string">&quot;simple math&quot;</span>);</span><br><span class="line"> assertNotEquals(<span class="number">3</span>, <span class="number">1</span> + <span class="number">1</span>);</span><br><span class="line"></span><br><span class="line"> assertNotSame(<span class="keyword">new</span> <span class="title class_">Object</span>(), <span class="keyword">new</span> <span class="title class_">Object</span>());</span><br><span class="line"> <span class="type">Object</span> <span class="variable">obj</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Object</span>();</span><br><span class="line"> assertSame(obj, obj);</span><br><span class="line"></span><br><span class="line"> assertFalse(<span class="number">1</span> &gt; <span class="number">2</span>);</span><br><span class="line"> assertTrue(<span class="number">1</span> &lt; <span class="number">2</span>);</span><br><span class="line"></span><br><span class="line"> assertNull(<span class="literal">null</span>);</span><br><span class="line"> assertNotNull(<span class="keyword">new</span> <span class="title class_">Object</span>());</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="3-2-数组断言"><a href="#3-2-数组断言" class="headerlink" title="3.2 数组断言"></a>3.2 数组断言</h4><p>通过 assertArrayEquals 方法来判断两个对象或原始类型的数组是否相等</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="meta">@DisplayName(&quot;数组断言&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">array</span><span class="params">()</span> &#123;</span><br><span class="line"> assertArrayEquals(<span class="keyword">new</span> <span class="title class_">int</span>[]&#123;<span class="number">1</span>, <span class="number">2</span>&#125;, <span class="keyword">new</span> <span class="title class_">int</span>[] &#123;<span class="number">1</span>, <span class="number">2</span>&#125;);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="3-3-组合断言"><a href="#3-3-组合断言" class="headerlink" title="3.3 组合断言"></a>3.3 组合断言</h4><p>assertAll 方法接受多个 org.junit.jupiter.api.Executable 函数式接口的实例作为要验证的断言,可以通过 lambda 表达式很容易的提供这些断言</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="meta">@DisplayName(&quot;组合断言&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">all</span><span class="params">()</span> &#123;</span><br><span class="line"> assertAll(<span class="string">&quot;Math&quot;</span>,</span><br><span class="line"> () -&gt; assertEquals(<span class="number">2</span>, <span class="number">1</span> + <span class="number">1</span>),</span><br><span class="line"> () -&gt; assertTrue(<span class="number">1</span> &gt; <span class="number">0</span>)</span><br><span class="line"> );</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="3-4-异常断言"><a href="#3-4-异常断言" class="headerlink" title="3.4 异常断言"></a>3.4 异常断言</h4><p>在JUnit4时期想要测试方法的异常情况时需要用@Rule注解的ExpectedException变量还是比较麻烦的。而JUnit5提供了一种新的断言方式Assertions.assertThrows() ,配合函数式编程就可以进行使用。</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="meta">@DisplayName(&quot;异常测试&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">exceptionTest</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">ArithmeticException</span> <span class="variable">exception</span> <span class="operator">=</span> Assertions.assertThrows(</span><br><span class="line"> <span class="comment">//扔出断言异常</span></span><br><span class="line"> ArithmeticException.class, () -&gt; System.out.println(<span class="number">1</span> % <span class="number">0</span>));</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="3-5-超时断言"><a href="#3-5-超时断言" class="headerlink" title="3.5 超时断言"></a>3.5 超时断言</h4><p>Junit5还提供了Assertions.assertTimeout() 为测试方法设置了超时时间</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="meta">@DisplayName(&quot;超时测试&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">timeoutTest</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//如果测试方法时间超过1s将会异常</span></span><br><span class="line"> Assertions.assertTimeout(Duration.ofMillis(<span class="number">1000</span>), () -&gt; Thread.sleep(<span class="number">500</span>));</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="3-6-快速失败"><a href="#3-6-快速失败" class="headerlink" title="3.6 快速失败"></a>3.6 快速失败</h4><p>通过 fail 方法直接使得测试失败</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="meta">@DisplayName(&quot;快速失败&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">shouldFail</span><span class="params">()</span> &#123;</span><br><span class="line"> fail(<span class="string">&quot;This should fail&quot;</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>全部代码</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.admin;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.junit.jupiter.api.*;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.test.context.SpringBootTest;</span><br><span class="line"><span class="keyword">import</span> org.springframework.jdbc.core.JdbcTemplate;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.concurrent.TimeUnit;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> <span class="keyword">static</span> org.junit.jupiter.api.Assertions.*;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">/*@RunWith*/</span></span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@BootstrapWith</span>(SpringBootTestContextBootstrapper.class)</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@ExtendWith</span>(SpringExtension.class)</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="comment">//@SpringBootTest</span></span><br><span class="line"><span class="meta">@DisplayName(&quot;junit5功能测试类&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Junit5Test</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 断言:前面断言失败,后面的代码都不会执行</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;简单断言&quot;)</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testSimpleAssertions</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">cal</span> <span class="operator">=</span> cal(<span class="number">3</span>, <span class="number">2</span>);</span><br><span class="line"> <span class="comment">//相等</span></span><br><span class="line"> assertEquals(<span class="number">6</span>, cal, <span class="string">&quot;业务逻辑计算失败&quot;</span>);</span><br><span class="line"> <span class="type">Object</span> <span class="variable">obj1</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Object</span>();</span><br><span class="line"> <span class="type">Object</span> <span class="variable">obj2</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Object</span>();</span><br><span class="line"> assertSame(obj1, obj2, <span class="string">&quot;两个对象不一样&quot;</span>);</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;数组断言&quot;)</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">array</span><span class="params">()</span> &#123;</span><br><span class="line"> assertArrayEquals(<span class="keyword">new</span> <span class="title class_">int</span>[]&#123;<span class="number">1</span>, <span class="number">2</span>&#125;, <span class="keyword">new</span> <span class="title class_">int</span>[]&#123;<span class="number">1</span>, <span class="number">2</span>&#125;, <span class="string">&quot;数组内容不相等&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;组合断言&quot;)</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">all</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 所有断言全部需要成功</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> assertAll(<span class="string">&quot;test&quot;</span>,</span><br><span class="line"> () -&gt; assertTrue(<span class="literal">true</span> &amp;&amp; <span class="literal">true</span>, <span class="string">&quot;结果不为true&quot;</span>),</span><br><span class="line"> () -&gt; assertEquals(<span class="number">1</span>, <span class="number">2</span>, <span class="string">&quot;结果不是1&quot;</span>));</span><br><span class="line"></span><br><span class="line"> System.out.println(<span class="string">&quot;=====&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@DisplayName(&quot;异常断言&quot;)</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testException</span><span class="params">()</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//断定业务逻辑一定出现异常</span></span><br><span class="line"> assertThrows(ArithmeticException.class, () -&gt; &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">10</span> / <span class="number">2</span>;</span><br><span class="line"> &#125;, <span class="string">&quot;业务逻辑居然正常运行?&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@DisplayName(&quot;快速失败&quot;)</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">testFail</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">if</span>(<span class="number">1</span> == <span class="number">2</span>)&#123;</span><br><span class="line"> fail(<span class="string">&quot;测试失败&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"> </span><br><span class="line"> <span class="type">int</span> <span class="title function_">cal</span><span class="params">(<span class="type">int</span> i, <span class="type">int</span> j)</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> i + j;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="4-前置条件"><a href="#4-前置条件" class="headerlink" title="4.前置条件"></a>4.前置条件</h3><p> JUnit 5 中的前置条件assumptions[假设])类似于断言,不同之处在于不满足的断言会使得测试方法失败,而不满足的前置条件只会使得测试方法的执行终止。前置条件可以看成是测试方法执行的前提,当该前提不满足时,就没有继续执行的必要</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@DisplayName(&quot;前置条件&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">AssumptionsTest</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">final</span> <span class="type">String</span> <span class="variable">environment</span> <span class="operator">=</span> <span class="string">&quot;DEV&quot;</span>;</span><br><span class="line"> </span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;simple&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">simpleAssume</span><span class="params">()</span> &#123;</span><br><span class="line"> assumeTrue(Objects.equals(<span class="built_in">this</span>.environment, <span class="string">&quot;DEV&quot;</span>));</span><br><span class="line"> assumeFalse(() -&gt; Objects.equals(<span class="built_in">this</span>.environment, <span class="string">&quot;PROD&quot;</span>));</span><br><span class="line"> &#125;</span><br><span class="line"> </span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;assume then do&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">assumeThenDo</span><span class="params">()</span> &#123;</span><br><span class="line"> assumingThat(</span><br><span class="line"> Objects.equals(<span class="built_in">this</span>.environment, <span class="string">&quot;DEV&quot;</span>),</span><br><span class="line"> () -&gt; System.out.println(<span class="string">&quot;In DEV&quot;</span>)</span><br><span class="line"> );</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>assumeTrue 和 assumFalse 确保给定的条件为 true 或 false不满足条件会使得测试执行终止</p>
<p>assumingThat 的参数是表示条件的布尔值和对应的 Executable 接口的实现对象</p>
<p>只有条件满足时Executable 对象才会被执行;当条件不满足时,测试执行并不会终止</p>
<h3 id="5-嵌套测试"><a href="#5-嵌套测试" class="headerlink" title="5.嵌套测试"></a>5.嵌套测试</h3><p> JUnit 5 可以通过 Java 中的内部类和@Nested 注解实现嵌套测试,从而可以更好的把相关的测试方法组织在一起。在内部类中可以使用@BeforeEach 和@AfterEach 注解,而且嵌套的层次没有限制</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@DisplayName(&quot;A stack&quot;)</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">TestingAStackDemo</span> &#123;</span><br><span class="line"></span><br><span class="line"> Stack&lt;Object&gt; stack;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;is instantiated with new Stack()&quot;)</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">isInstantiatedWithNew</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">Stack</span>&lt;&gt;();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Nested</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;when new&quot;)</span></span><br><span class="line"> <span class="keyword">class</span> <span class="title class_">WhenNew</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@BeforeEach</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">createNewStack</span><span class="params">()</span> &#123;</span><br><span class="line"> stack = <span class="keyword">new</span> <span class="title class_">Stack</span>&lt;&gt;();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;is empty&quot;)</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">isEmpty</span><span class="params">()</span> &#123;</span><br><span class="line"> assertTrue(stack.isEmpty());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;throws EmptyStackException when popped&quot;)</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">throwsExceptionWhenPopped</span><span class="params">()</span> &#123;</span><br><span class="line"> assertThrows(EmptyStackException.class, stack::pop);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;throws EmptyStackException when peeked&quot;)</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">throwsExceptionWhenPeeked</span><span class="params">()</span> &#123;</span><br><span class="line"> assertThrows(EmptyStackException.class, stack::peek);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Nested</span><span class="comment">//b</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;after pushing an element&quot;)</span></span><br><span class="line"> <span class="keyword">class</span> <span class="title class_">AfterPushing</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">String</span> <span class="variable">anElement</span> <span class="operator">=</span> <span class="string">&quot;an element&quot;</span>;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@BeforeEach</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">pushAnElement</span><span class="params">()</span> &#123;</span><br><span class="line"> stack.push(anElement);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;it is no longer empty&quot;)</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">isNotEmpty</span><span class="params">()</span> &#123;</span><br><span class="line"> assertFalse(stack.isEmpty());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;returns the element when popped and is empty&quot;)</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">returnElementWhenPopped</span><span class="params">()</span> &#123;</span><br><span class="line"> assertEquals(anElement, stack.pop());</span><br><span class="line"> assertTrue(stack.isEmpty());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="meta">@DisplayName(&quot;returns the element when peeked but remains not empty&quot;)</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">returnElementWhenPeeked</span><span class="params">()</span> &#123;</span><br><span class="line"> assertEquals(anElement, stack.peek());</span><br><span class="line"> assertFalse(stack.isEmpty());</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="6-参数化测试"><a href="#6-参数化测试" class="headerlink" title="6.参数化测试"></a>6.参数化测试</h3><p>参数化测试是JUnit5很重要的一个新特性它使得用不同的参数多次运行测试成为了可能也为我们的单元测试带来许多便利</p>
<p>利用@ValueSource等注解指定入参我们将可以使用不同的参数进行多次单元测试而不需要每新增一个参数就新增一个单元测试省去了很多冗余代码</p>
<p>@ValueSource: 为参数化测试指定入参来源支持八大基础类以及String类型,Class类型</p>
<p>@NullSource: 表示为参数化测试提供一个null的入参</p>
<p>@EnumSource: 表示为参数化测试提供一个枚举入参</p>
<p>@CsvFileSource表示读取指定CSV文件内容作为参数化测试入参</p>
<p>@MethodSource表示读取指定方法的返回值作为参数化测试入参(注意方法返回需要是一个流)</p>
<p>当然如果参数化测试仅仅只能做到指定普通的入参还达不到让我觉得惊艳的地步。让我真正感到他的强大之处的地方在于他可以支持外部的各类入参。如:CSV,YML,JSON 文件甚至方法的返回值也可以作为入参。只需要去实现ArgumentsProvider接口任何外部文件都可以作为它的入参</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@ParameterizedTest</span></span><br><span class="line"><span class="meta">@ValueSource(strings = &#123;&quot;one&quot;, &quot;two&quot;, &quot;three&quot;&#125;)</span></span><br><span class="line"><span class="meta">@DisplayName(&quot;参数化测试&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">parameterizedTest</span><span class="params">(String string)</span> &#123;</span><br><span class="line"> System.out.println(string);</span><br><span class="line"> Assertions.assertTrue(StringUtils.isNotBlank(string));</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="meta">@ParameterizedTest</span></span><br><span class="line"><span class="meta">@MethodSource(&quot;method&quot;)</span> <span class="comment">//指定方法名</span></span><br><span class="line"><span class="meta">@DisplayName(&quot;方法来源参数&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">testWithExplicitLocalMethodSource</span><span class="params">(String name)</span> &#123;<span class="comment">//方法的参数来源于一个方法</span></span><br><span class="line"> System.out.println(name);</span><br><span class="line"> Assertions.assertNotNull(name);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">static</span> Stream&lt;String&gt; <span class="title function_">method</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> Stream.of(<span class="string">&quot;apple&quot;</span>, <span class="string">&quot;banana&quot;</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="7-迁移指南"><a href="#7-迁移指南" class="headerlink" title="7.迁移指南"></a>7.迁移指南</h3><p>在进行迁移Junit4迁移到Junit5的时候需要注意如下的变化</p>
<ul>
<li>注解在 org.junit.jupiter.api 包中,断言在 org.junit.jupiter.api.Assertions 类中,前置条件在 org.junit.jupiter.api.Assumptions 类中。</li>
<li>把@Before 和@After 替换成@BeforeEach 和@AfterEach。</li>
<li>把@BeforeClass 和@AfterClass 替换成@BeforeAll 和@AfterAll。</li>
<li>把@Ignore 替换成@Disabled。</li>
<li>把@Category 替换成@Tag。</li>
<li>把@RunWith、@Rule 和@ClassRule 替换成@ExtendWith。</li>
</ul>
<h2 id="五-指标监控"><a href="#五-指标监控" class="headerlink" title="五.指标监控"></a>五.指标监控</h2><h3 id="1-SpringBoot-Actuator"><a href="#1-SpringBoot-Actuator" class="headerlink" title="1.SpringBoot Actuator"></a>1.SpringBoot Actuator</h3><p> 未来每一个微服务在云上部署以后我们都需要对其进行监控、追踪、审计、控制等。SpringBoot就抽取了Actuator场景使得我们每个微服务快速引用即可获得生产级别的应用监控、审计等功能</p>
<h4 id="1-1-如何使用"><a href="#1-1-如何使用" class="headerlink" title="1.1 如何使用"></a>1.1 如何使用</h4><p>1.引入依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-actuator<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>2.测试访问 <a href="http://localhost:8080/actuator/">http://localhost:8080/actuator/</a> endpoint节点</p>
<p><img src="/pictures/image-20230828110908056.png" alt="image-20230828110908056"></p>
<p><img src="/pictures/image-20230828110928951.png" alt="image-20230828110928951"></p>
<p>3.设置以web的方式访问所有的端点</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">management:</span></span><br><span class="line"> <span class="attr">endpoints:</span></span><br><span class="line"> <span class="attr">enabled-by-default:</span> <span class="literal">true</span> <span class="comment">#暴露所有端点信息</span></span><br><span class="line"> <span class="attr">web:</span></span><br><span class="line"> <span class="attr">exposure:</span></span><br><span class="line"> <span class="attr">include:</span> <span class="string">&#x27;*&#x27;</span> <span class="comment">#以web方式暴露所有的端点</span></span><br></pre></td></tr></table></figure>
<p>设置之后就可以通过web访问 <a href="http://localhost:8080/actuator/beans%EF%BC%89%E7%9A%84%E6%96%B9%E5%BC%8F%E8%AE%BF%E9%97%AEbeans%E7%AB%AF%E7%82%B9%E4%BA%86">http://localhost:8080/actuator/beans的方式访问beans端点了</a></p>
<p><img src="/pictures/image-20230828113335033.png" alt="image-20230828113335033"></p>
<p><strong>支持的暴露方式</strong></p>
<ul>
<li>HTTP(web)默认只暴露health和info Endpoint,只能访问 <a href="http://localhost:8080/actuator/health%E5%92%8C">http://localhost:8080/actuator/health和</a> <a href="http://localhost:8080/actuator/info">http://localhost:8080/actuator/info</a></li>
<li>JMX如Jconsole默认暴露所有Endpoint,类似于cmd下打开jconsole可以访问下面所有的endPoints</li>
<li>除过health和info剩下的Endpoint都应该进行保护访问。如果引入SpringSecurity则会默认配置安全访问规则</li>
</ul>
<p><strong>是通过web还是jmx方式访问的端点一览表</strong></p>
<table>
<thead>
<tr>
<th>ID</th>
<th>JMX</th>
<th>Web</th>
</tr>
</thead>
<tbody><tr>
<td><code>auditevents</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>beans</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>caches</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>conditions</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>configprops</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>env</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>flyway</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>health</code></td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><code>heapdump</code></td>
<td>N&#x2F;A</td>
<td>No</td>
</tr>
<tr>
<td><code>httptrace</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>info</code></td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td><code>integrationgraph</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>jolokia</code></td>
<td>N&#x2F;A</td>
<td>No</td>
</tr>
<tr>
<td><code>logfile</code></td>
<td>N&#x2F;A</td>
<td>No</td>
</tr>
<tr>
<td><code>loggers</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>liquibase</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>metrics</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>mappings</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>prometheus</code></td>
<td>N&#x2F;A</td>
<td>No</td>
</tr>
<tr>
<td><code>scheduledtasks</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>sessions</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>shutdown</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>startup</code></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><code>threaddump</code></td>
<td>Yes</td>
<td>No</td>
</tr>
</tbody></table>
<h4 id="1-2-常用的EndPoints"><a href="#1-2-常用的EndPoints" class="headerlink" title="1.2 常用的EndPoints"></a>1.2 常用的EndPoints</h4><p><strong><code>http://localhost:8080/actuator/endPoint </code></strong></p>
<table>
<thead>
<tr>
<th>ID</th>
<th>描述</th>
</tr>
</thead>
<tbody><tr>
<td><code>auditevents</code></td>
<td>暴露当前应用程序的审核事件信息。需要一个<code>AuditEventRepository组件</code>。</td>
</tr>
<tr>
<td><code>beans</code></td>
<td>显示应用程序中所有Spring Bean的完整列表。</td>
</tr>
<tr>
<td><code>caches</code></td>
<td>暴露可用的缓存。</td>
</tr>
<tr>
<td><code>conditions</code></td>
<td>显示自动配置的所有条件信息,包括匹配或不匹配的原因。</td>
</tr>
<tr>
<td><code>configprops</code></td>
<td>显示所有<code>@ConfigurationProperties</code>。</td>
</tr>
<tr>
<td><code>env</code></td>
<td>暴露Spring的属性<code>ConfigurableEnvironment</code></td>
</tr>
<tr>
<td><code>flyway</code></td>
<td>显示已应用的所有Flyway数据库迁移。 需要一个或多个<code>Flyway</code>组件。</td>
</tr>
<tr>
<td><code>health</code></td>
<td>显示应用程序运行状况信息。</td>
</tr>
<tr>
<td><code>httptrace</code></td>
<td>显示HTTP跟踪信息默认情况下最近100个HTTP请求-响应)。需要一个<code>HttpTraceRepository</code>组件。</td>
</tr>
<tr>
<td><code>info</code></td>
<td>显示应用程序信息。</td>
</tr>
<tr>
<td><code>integrationgraph</code></td>
<td>显示Spring <code>integrationgraph</code> 。需要依赖<code>spring-integration-core</code>。</td>
</tr>
<tr>
<td><code>loggers</code></td>
<td>显示和修改应用程序中日志的配置。</td>
</tr>
<tr>
<td><code>liquibase</code></td>
<td>显示已应用的所有Liquibase数据库迁移。需要一个或多个<code>Liquibase</code>组件。</td>
</tr>
<tr>
<td><code>metrics</code></td>
<td>显示当前应用程序的“指标”信息。</td>
</tr>
<tr>
<td><code>mappings</code></td>
<td>显示所有<code>@RequestMapping</code>路径列表。</td>
</tr>
<tr>
<td><code>scheduledtasks</code></td>
<td>显示应用程序中的计划任务。</td>
</tr>
<tr>
<td><code>sessions</code></td>
<td>允许从Spring Session支持的会话存储中检索和删除用户会话。需要使用Spring Session的基于Servlet的Web应用程序。</td>
</tr>
<tr>
<td><code>shutdown</code></td>
<td>使应用程序正常关闭。默认禁用。</td>
</tr>
<tr>
<td><code>startup</code></td>
<td>显示由<code>ApplicationStartup</code>收集的启动步骤数据。需要使用<code>SpringApplication</code>进行配置<code>BufferingApplicationStartup</code>。</td>
</tr>
<tr>
<td><code>threaddump</code></td>
<td>执行线程转储。</td>
</tr>
</tbody></table>
<p>如果您的应用程序是Web应用程序Spring MVCSpring WebFlux或Jersey则可以使用以下附加端点</p>
<table>
<thead>
<tr>
<th>ID</th>
<th>描述</th>
</tr>
</thead>
<tbody><tr>
<td><code>heapdump</code></td>
<td>返回<code>hprof</code>堆转储文件。</td>
</tr>
<tr>
<td><code>jolokia</code></td>
<td>通过HTTP暴露JMX bean需要引入Jolokia不适用于WebFlux。需要引入依赖<code>jolokia-core</code>。</td>
</tr>
<tr>
<td><code>logfile</code></td>
<td>返回日志文件的内容(如果已设置<code>logging.file.name</code>或<code>logging.file.path</code>属性。支持使用HTTP<code>Range</code>标头来检索部分日志文件的内容。</td>
</tr>
<tr>
<td><code>prometheus</code></td>
<td>以Prometheus服务器可以抓取的格式公开指标。需要依赖<code>micrometer-registry-prometheus</code>。</td>
</tr>
</tbody></table>
<p><strong>最常用的Endpoint</strong></p>
<ul>
<li>Health监控状况</li>
<li>Metrics运行时指标</li>
<li>Loggers日志记录</li>
</ul>
<h4 id="1-3-Health-Endpoint"><a href="#1-3-Health-Endpoint" class="headerlink" title="1.3 Health Endpoint"></a>1.3 Health Endpoint</h4><p>健康检查端点我们一般用于在云平台平台会定时的检查应用的健康状况我们就需要Health Endpoint可以为平台返回当前应用的一系列组件健康状况的集合。</p>
<p>重要的几点:</p>
<ul>
<li>health endpoint返回的结果应该是一系列健康检查后的一个汇总报告</li>
<li>很多的健康检查默认已经自动配置好了比如数据库、redis等</li>
<li>可以很容易的添加自定义的健康检查机制</li>
</ul>
<p>设置显示health端点的详细信息</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">management:</span></span><br><span class="line"> <span class="attr">endpoint:</span></span><br><span class="line"> <span class="attr">health:</span></span><br><span class="line"> <span class="attr">show-details:</span> <span class="string">always</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230828142631189.png" alt="image-20230828142631189"></p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;status&quot;</span><span class="punctuation">:</span> <span class="string">&quot;UP&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;components&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;db&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;status&quot;</span><span class="punctuation">:</span> <span class="string">&quot;UP&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;details&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;database&quot;</span><span class="punctuation">:</span> <span class="string">&quot;MySQL&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;validationQuery&quot;</span><span class="punctuation">:</span> <span class="string">&quot;isValid()&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;diskSpace&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;status&quot;</span><span class="punctuation">:</span> <span class="string">&quot;UP&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;details&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;total&quot;</span><span class="punctuation">:</span> <span class="number">510769754112</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;free&quot;</span><span class="punctuation">:</span> <span class="number">342642921472</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;threshold&quot;</span><span class="punctuation">:</span> <span class="number">10485760</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;exists&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">true</span></span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;ping&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;status&quot;</span><span class="punctuation">:</span> <span class="string">&quot;UP&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<h4 id="1-4-Metrics-Endpoint"><a href="#1-4-Metrics-Endpoint" class="headerlink" title="1.4 Metrics Endpoint"></a>1.4 Metrics Endpoint</h4><p>提供详细的、层级的、空间指标信息这些信息可以被pull主动推送或者push被动获取方式得到</p>
<ul>
<li>通过Metrics对接多种监控系统</li>
<li>简化核心Metrics开发</li>
<li>添加自定义Metrics或者扩展已有Metrics</li>
</ul>
<p>查看完整的监控指标信息 <a href="http://localhost:8080/actuator/metrics">http://localhost:8080/actuator/metrics</a></p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;names&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="string">&quot;hikaricp.connections&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;hikaricp.connections.acquire&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;hikaricp.connections.active&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;hikaricp.connections.creation&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;hikaricp.connections.idle&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;hikaricp.connections.max&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;hikaricp.connections.min&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;hikaricp.connections.pending&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;hikaricp.connections.timeout&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;hikaricp.connections.usage&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;http.server.requests&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jdbc.connections.max&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jdbc.connections.min&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.buffer.count&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.buffer.memory.used&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.buffer.total.capacity&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.classes.loaded&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.classes.unloaded&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.gc.live.data.size&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.gc.max.data.size&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.gc.memory.allocated&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.gc.memory.promoted&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.gc.pause&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.memory.committed&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.memory.max&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.memory.used&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.threads.daemon&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.threads.live&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.threads.peak&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;jvm.threads.states&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;logback.events&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;process.cpu.usage&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;process.start.time&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;process.uptime&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;system.cpu.count&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="string">&quot;system.cpu.usage&quot;</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230828143224633.png" alt="image-20230828143224633"></p>
<p>查看某一个监控指标的详细信息例如查看hikaricp.connections的详细信息 <a href="http://localhost:8080/actuator/metrics/hikaricp.connections">http://localhost:8080/actuator/metrics/hikaricp.connections</a> </p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;hikaricp.connections&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;description&quot;</span><span class="punctuation">:</span> <span class="string">&quot;Total connections&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;baseUnit&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;measurements&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;statistic&quot;</span><span class="punctuation">:</span> <span class="string">&quot;VALUE&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;value&quot;</span><span class="punctuation">:</span> <span class="number">10</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;availableTags&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;tag&quot;</span><span class="punctuation">:</span> <span class="string">&quot;pool&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;values&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="string">&quot;HikariPool-1&quot;</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<h4 id="1-5-管理Endpoint"><a href="#1-5-管理Endpoint" class="headerlink" title="1.5 管理Endpoint"></a>1.5 管理Endpoint</h4><p><strong>开启与禁用Endpoints</strong></p>
<ul>
<li>默认所有的Endpoint除过shutdown都是开启的。</li>
<li>需要开启或者禁用某个Endpoint 配置模式为 management.endpoint.endpointName.enabled &#x3D; true</li>
</ul>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">management:</span></span><br><span class="line"> <span class="attr">endpoint:</span></span><br><span class="line"> <span class="attr">beans:</span> <span class="comment">#可以写health、metrics等端点</span></span><br><span class="line"> <span class="attr">enabled:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
<ul>
<li>或者禁用所有的Endpoint然后手动开启指定的Endpoint</li>
</ul>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">management:</span></span><br><span class="line"> <span class="attr">endpoints:</span></span><br><span class="line"> <span class="attr">enabled-by-default:</span> <span class="literal">false</span> <span class="comment">#禁用所有的端点jconsole中也无法使用</span></span><br><span class="line"> <span class="attr">endpoint:</span></span><br><span class="line"> <span class="attr">beans:</span></span><br><span class="line"> <span class="attr">enabled:</span> <span class="literal">true</span> <span class="comment">#逐一开启端点</span></span><br><span class="line"> <span class="attr">health:</span></span><br><span class="line"> <span class="attr">enabled:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
<h4 id="1-6-定制Endpoint"><a href="#1-6-定制Endpoint" class="headerlink" title="1.6 定制Endpoint"></a>1.6 定制Endpoint</h4><h5 id="1-6-1-定制health-endpoint"><a href="#1-6-1-定制health-endpoint" class="headerlink" title="1.6.1 定制health endpoint"></a>1.6.1 定制health endpoint</h5><p>1.编写MyComHealthIndicator类继承AbstractHealthIndicator</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot.acutuator.health;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.actuate.health.AbstractHealthIndicator;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.actuate.health.Health;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.actuate.health.Status;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Component;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.HashMap;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 自定义端点</span></span><br><span class="line"><span class="comment"> * 类的后缀必须为HealthIndicator</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MyComHealthIndicator</span> <span class="keyword">extends</span> <span class="title class_">AbstractHealthIndicator</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 真实的检查方法 检查健康的方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">protected</span> <span class="keyword">void</span> <span class="title function_">doHealthCheck</span><span class="params">(Health.Builder builder)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> Map&lt;String,Object&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">// 检查完成</span></span><br><span class="line"> <span class="keyword">if</span>(<span class="number">1</span> == <span class="number">1</span>)&#123; <span class="comment">//这里我们可以编写一个业务逻辑,例如数据库是否连接成功的业务逻辑</span></span><br><span class="line"> <span class="comment">// builder.up(); //健康</span></span><br><span class="line"> builder.status(Status.UP);</span><br><span class="line"> map.put(<span class="string">&quot;count&quot;</span>,<span class="number">1</span>);</span><br><span class="line"> map.put(<span class="string">&quot;ms&quot;</span>,<span class="number">100</span>);</span><br><span class="line"> &#125;<span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//builder.down();</span></span><br><span class="line"> builder.status(Status.OUT_OF_SERVICE);</span><br><span class="line"> map.put(<span class="string">&quot;err&quot;</span>,<span class="string">&quot;连接超时&quot;</span>);</span><br><span class="line"> map.put(<span class="string">&quot;ms&quot;</span>,<span class="number">3000</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> builder.withDetail(<span class="string">&quot;code&quot;</span>,<span class="number">100</span>)</span><br><span class="line"> .withDetails(map);</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>myCom &#x3D; MyComHealthIndicator - HealthIndicator 所以类的名字一定要以HealthIndicator为后缀</p>
<p><img src="/pictures/image-20230828150633322.png" alt="image-20230828150633322"></p>
<h5 id="1-6-2-定制-info-endpoint"><a href="#1-6-2-定制-info-endpoint" class="headerlink" title="1.6.2 定制 info endpoint"></a>1.6.2 定制 info endpoint</h5><p>方式一: 编写配置文件</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">info:</span></span><br><span class="line"> <span class="attr">appName:</span> <span class="string">boot-admin</span> <span class="comment">#应用名</span></span><br><span class="line"> <span class="attr">version:</span> <span class="number">2.0</span><span class="number">.1</span> <span class="comment">#版本</span></span><br><span class="line"> <span class="attr">mavenProjectName:</span> <span class="string">@project.artifactId@</span> <span class="comment">#使用@@可以获取maven的pom文件值</span></span><br><span class="line"> <span class="attr">mavenProjectVersion:</span> <span class="string">@project.version@</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230828151416487.png" alt="image-20230828151416487"></p>
<p>方式二: 编写InfoContributor</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot.acutuator.info;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.actuate.info.Info;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.actuate.info.InfoContributor;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Component;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Collections;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">AppInfoInfoContributor</span> <span class="keyword">implements</span> <span class="title class_">InfoContributor</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">contribute</span><span class="params">(Info.Builder builder)</span> &#123;</span><br><span class="line"></span><br><span class="line"> builder.withDetail(<span class="string">&quot;msg&quot;</span>,<span class="string">&quot;你好&quot;</span>)</span><br><span class="line"> .withDetail(<span class="string">&quot;hello&quot;</span>,<span class="string">&quot;atguigu&quot;</span>)</span><br><span class="line"> .withDetails(Collections.singletonMap(<span class="string">&quot;world&quot;</span>,<span class="string">&quot;666600&quot;</span>));</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>如果我们没有删除上面配置文件的配置,这时我们访问 <a href="http://localhost:8080/actuator/info">http://localhost:8080/actuator/info</a> 的时候会将配置文件和InfoContributor中的信息共同返回</p>
<p><img src="/pictures/image-20230828152006549.png" alt="image-20230828152006549"></p>
<h5 id="1-6-3-定制Metrics信息"><a href="#1-6-3-定制Metrics信息" class="headerlink" title="1.6.3 定制Metrics信息"></a>1.6.3 定制Metrics信息</h5><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">class</span> <span class="title class_">MyService</span>&#123;</span><br><span class="line"> </span><br><span class="line"> Counter counter;</span><br><span class="line"> </span><br><span class="line"> <span class="comment">//构造器注入MeterRegistry</span></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">MyService</span><span class="params">(MeterRegistry meterRegistry)</span>&#123;</span><br><span class="line"> <span class="comment">//访问 http://localhost:8080/actuator/metrics 的时候会多一个监控项myservice.method.running.counter</span></span><br><span class="line"> counter = meterRegistry.counter(<span class="string">&quot;myservice.method.running.counter&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">hello</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//调用hello方法的时候counter加1</span></span><br><span class="line"> counter.increment();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//也可以使用下面的方式</span></span><br><span class="line"><span class="meta">@Bean</span></span><br><span class="line">MeterBinder <span class="title function_">queueSize</span><span class="params">(Queue queue)</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> (registry) -&gt; Gauge.builder(<span class="string">&quot;queueSize&quot;</span>, queue::size).register(registry);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="1-7-新增Endpoint"><a href="#1-7-新增Endpoint" class="headerlink" title="1.7 新增Endpoint"></a>1.7 新增Endpoint</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.boot.acutuator.endpoint;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.actuate.endpoint.annotation.Endpoint;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.actuate.endpoint.annotation.ReadOperation;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.actuate.endpoint.annotation.WriteOperation;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Component;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Collections;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="meta">@Endpoint(id = &quot;myservice&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MyServiceEndPoint</span> &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="meta">@ReadOperation</span></span><br><span class="line"> <span class="keyword">public</span> Map <span class="title function_">getDockerInfo</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="comment">//端点的读操作 http://localhost:8080/actuator/myservice</span></span><br><span class="line"> <span class="keyword">return</span> Collections.singletonMap(<span class="string">&quot;dockerInfo&quot;</span>,<span class="string">&quot;docker started.....&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@WriteOperation</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">stopDocker</span><span class="params">()</span>&#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;docker stopped.....&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230828153914619.png" alt="image-20230828153914619"></p>
<p><img src="/pictures/image-20230828153902598.png" alt="image-20230828153902598"></p>
<h4 id="1-8-可视化"><a href="#1-8-可视化" class="headerlink" title="1.8 可视化"></a>1.8 可视化</h4><p>github地址: <a href="https://github.com/codecentric/spring-boot-admin">https://github.com/codecentric/spring-boot-admin</a></p>
<p>项目文档: <a href="https://docs.spring-boot-admin.com/current/getting-started.html">https://docs.spring-boot-admin.com/current/getting-started.html</a></p>
<p>1.创建一个新的springBoot项目用作服务端场景只需要选择web场景即可</p>
<p><img src="/pictures/image-20230828154818630.png" alt="image-20230828154818630"></p>
<p>2.引入依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>de.codecentric<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-admin-starter-server<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.3.1<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>3.在启动类上添加注解</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@EnableAdminServer</span></span><br></pre></td></tr></table></figure>
<p>4.修改以下端口号以防和业务的端口冲突</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="attr">server.port</span>=<span class="string">8888</span></span><br></pre></td></tr></table></figure>
<p>5.访问<a href="http://localhost:8888/">http://localhost:8888</a></p>
<p><img src="/pictures/image-20230828155537932.png" alt="image-20230828155537932"></p>
<p>6.客户端上引入依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>de.codecentric<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-admin-starter-client<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.3.1<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>7.客户端的配置文件添加以下的配置</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring.boot.admin.client.url</span>=<span class="string">http://localhost:8888 #服务端的地址</span></span><br><span class="line"><span class="attr">management.endpoints.web.exposure.include</span>=<span class="string">*</span></span><br></pre></td></tr></table></figure>
<p>8.重启一下客户端然后访问服务端的localhost:8080</p>
<p><img src="/pictures/image-20230828160606081.png" alt="image-20230828160606081"></p>
<p>点击应用墙,点击需要查看信息的应用就可以看到应用的详细信息</p>
<p><img src="/pictures/image-20230828160731314.png" alt="image-20230828160731314"></p>
<h2 id="六-原理解析"><a href="#六-原理解析" class="headerlink" title="六.原理解析"></a>六.原理解析</h2><h3 id="1-Profile功能"><a href="#1-Profile功能" class="headerlink" title="1.Profile功能"></a>1.Profile功能</h3><p>为了方便多环境适配springboot简化了profile功能</p>
<ul>
<li><p>默认配置文件 application.yaml任何时候都会加载</p>
</li>
<li><p>指定环境配置文件 application-{env}.yaml</p>
</li>
<li><p>激活指定环境</p>
</li>
<li><ul>
<li>配置文件激活,在默认配置文件 application.yaml 中添加spring.profiles.active&#x3D;xxxx</li>
<li>命令行激活java -jar xxx.jar spring.profiles.active&#x3D;prod</li>
</ul>
</li>
<li><ul>
<li><ul>
<li>修改配置文件的任意值,命令行优先</li>
</ul>
</li>
</ul>
</li>
<li><p>默认配置与环境配置同时生效</p>
</li>
<li><p>同名配置项profile配置优先</p>
</li>
</ul>
<p><strong>@Profile注解</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//@Profile(&quot;prod&quot;)</span></span><br><span class="line"><span class="comment">//可以标注在类和方法上</span></span><br><span class="line"><span class="comment">//标注在类和方法上表示在prod环境下启用</span></span><br></pre></td></tr></table></figure>
<p><strong>外部配置源</strong></p>
<p>常用Java属性文件、YAML文件、环境变量、命令行参数</p>
<p><strong>配置文件查找位置</strong></p>
<p>下面的优先级覆盖上面的优先级</p>
<p>(1) classpath 根路径</p>
<p>(2) classpath 根路径下config目录</p>
<p>(3) jar包当前目录</p>
<p>(4) jar包当前目录的config目录</p>
<p>(5) &#x2F;config子目录的直接子目录</p>
<p><strong>配置文件加载顺序:</strong></p>
<ol>
<li> 当前jar包内部的application.properties和application.yml</li>
<li> 当前jar包内部的application-{profile}.properties 和 application-{profile}.yml</li>
<li> 引用的外部jar包的application.properties和application.yml</li>
<li> 引用的外部jar包的application-{profile}.properties 和 application-{profile}.yml</li>
</ol>
<p><strong>总结:</strong> 指定环境优先,外部优先,后面的可以覆盖前面的同名配置项</p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>SpringBoot</tag>
</tags>
</entry>
<entry>
<title>大数据开发相关笔记</title>
<url>/posts/46054.html</url>
<content><![CDATA[<div class="note success flat"><p>笔记转载于黑马程序员,详细的笔记来源于:<a href="https://www.bilibili.com/video/BV1WY4y197g7/?spm_id_from=333.337.search-card.all.click&vd_source=22300b9f40de74b7db529eb8f04510a9">https://www.bilibili.com/video/BV1WY4y197g7/?spm_id_from=333.337.search-card.all.click&amp;vd_source=22300b9f40de74b7db529eb8f04510a9</a></p>
</div>
<h1 id="一-Hive"><a href="#一-Hive" class="headerlink" title="一.Hive"></a>一.Hive</h1><h2 id="1-Hive-SQL语法大全"><a href="#1-Hive-SQL语法大全" class="headerlink" title="1.Hive SQL语法大全"></a>1.Hive SQL语法大全</h2>
<div class="row">
<embed src="/pdf/Hive-SQL语法大全.pdf" width="100%" height="550" type="application/pdf">
</div>
<h2 id="2-Hive函数"><a href="#2-Hive函数" class="headerlink" title="2.Hive函数"></a>2.Hive函数</h2>
<div class="row">
<embed src="/pdf/Hive函数.pdf" width="100%" height="550" type="application/pdf">
</div>
<div class="row">
<embed src="/pdf/hive函数大全.pdf" width="100%" height="550" type="application/pdf">
</div>
]]></content>
<categories>
<category>大数据</category>
</categories>
<tags>
<tag>大数据</tag>
</tags>
</entry>
<entry>
<title>常用正则表达式大全</title>
<url>/posts/47003.html</url>
<content><![CDATA[<p>一、校验数字的表达式<br>1 数字:^[0-9]$<br>2 n位的数字^\d{n}$<br>3 至少n位的数字^\d{n,}$<br>4 m-n位的数字^\d{m,n}$<br>5 零和非零开头的数字:^(0|[1-9][0-9])$<br>6 非零开头的最多带两位小数的数字:^([1-9][0-9])+(.[0-9]{1,2})?$<br>7 带1-2位小数的正数或负数^(-)?\d+(.\d{1,2})?$<br>8 正数、负数、和小数:^(-|+)?\d+(.\d+)?$<br>9 有两位小数的正实数:^[0-9]+(.[0-9]{2})?$<br>10 有1~3位小数的正实数^[0-9]+(.[0-9]{1,3})?$<br>11 非零的正整数:^[1-9]\d$ 或 ^([1-9][0-9]){1,3}$ 或 ^+?[1-9][0-9]$<br>12 非零的负整数:^-[1-9][]0-9”$ 或 ^-[1-9]\d$<br>13 非负整数:^\d+$ 或 ^[1-9]\d|0$<br>14 非正整数:^-[1-9]\d|0$ 或 ^((-\d+)|(0+))$<br>15 非负浮点数:^\d+(.\d+)?$ 或 ^[1-9]\d.\d|0.\d[1-9]\d|0?.0+|0$<br>16 非正浮点数:^((-\d+(.\d+)?)|(0+(.0+)?))$ 或 ^(-([1-9]\d.\d|0.\d[1-9]\d))|0?.0+|0$<br>17 正浮点数:^[1-9]\d.\d|0.\d[1-9]\d$ 或 ^(([0-9]+.[0-9][1-9][0-9])|([0-9][1-9][0-9].[0-9]+)|([0-9][1-9][0-9]))$<br>18 负浮点数:^-([1-9]\d.\d|0.\d[1-9]\d)$ 或 ^(-(([0-9]+.[0-9][1-9][0-9])|([0-9][1-9][0-9].[0-9]+)|([0-9][1-9][0-9])))$<br>19 浮点数:^(-?\d+)(.\d+)?$ 或 ^-?([1-9]\d.\d|0.\d[1-9]\d|0?.0+|0)$</p>
<p>二、校验字符的表达式<br>1 汉字:^[\u4e00-\u9fa5]{0,}$<br>2 英文和数字:^[A-Za-z0-9]+$ 或 ^[A-Za-z0-9]{4,40}$<br>3 长度为3-20的所有字符^.{3,20}$<br>4 由26个英文字母组成的字符串^[A-Za-z]+$<br>5 由26个大写英文字母组成的字符串^[A-Z]+$<br>6 由26个小写英文字母组成的字符串^[a-z]+$<br>7 由数字和26个英文字母组成的字符串^[A-Za-z0-9]+$<br>8 由数字、26个英文字母或者下划线组成的字符串^\w+$ 或 ^\w{3,20}$<br>9 中文、英文、数字包括下划线:^[\u4E00-\u9FA5A-Za-z0-9_]+$<br>10 中文、英文、数字但不包括下划线等符号:^[\u4E00-\u9FA5A-Za-z0-9]+$ 或 ^[\u4E00-\u9FA5A-Za-z0-9]{2,20}$<br>11 可以输入含有^%&amp;,;&#x3D;?$&quot;等字符:[^%&amp;,;&#x3D;?$\x22]+<br>12 禁止输入含有<del>的字符:[^</del>\x22]+</p>
<p>三、特殊需求表达式<br>1 Email地址^\w+([-+.]\w+)@\w+([-.]\w+).\w+([-.]\w+)$<br>2 域名:[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(&#x2F;.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+&#x2F;.?<br>3 InternetURL[a-zA-z]+:&#x2F;&#x2F;[^\s] 或 ^https:&#x2F;&#x2F;([\w-]+.)+[\w-]+(&#x2F;[\w-.&#x2F;?%&amp;&#x3D;])?$<br>4 手机号码:^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$<br>5 电话号码(“XXX-XXXXXXX”、”XXXX-XXXXXXXX”、”XXX-XXXXXXX”、”XXX-XXXXXXXX”、”XXXXXXX”和”XXXXXXXX)^((\d{3,4}-)|\d{3.4}-)?\d{7,8}$<br>6 国内电话号码(0511-4405222、021-87888822)\d{3}-\d{8}|\d{4}-\d{7}<br>7 身份证号:<br> 15或18位身份证^\d{15}|\d{18}$<br> 15位身份证^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$<br> 18位身份证^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{4}$<br>8 短身份证号码(数字、字母x结尾)^([0-9]){7,18}(x|X)?$ 或 ^\d{8,18}|[0-9x]{8,18}|[0-9X]{8,18}?$<br>9 帐号是否合法(字母开头允许5-16字节允许字母数字下划线)^[a-zA-Z][a-zA-Z0-9_]{4,15}$<br>10 密码(以字母开头长度在6~18之间只能包含字母、数字和下划线)^[a-zA-Z]\w{5,17}$<br>11 强密码(必须包含大小写字母和数字的组合不能使用特殊字符长度在8-10之间)^(?&#x3D;.\d)(?&#x3D;.[a-z])(?&#x3D;.[A-Z]).{8,10}$<br>12 日期格式:^\d{4}-\d{1,2}-\d{1,2}<br>13 一年的12个月(0109和112)^(0?[1-9]|1[0-2])$<br>14 一个月的31天(0109和131)^((0?[1-9])|((1|2)[0-9])|30|31)$<br>15 钱的输入格式:<br>16 1.有四种钱的表示形式我们可以接受:”10000.00” 和 “10,000.00”, 和没有 “分” 的 “10000” 和 “10,000”^[1-9][0-9]$<br>17 2.这表示任意一个不以0开头的数字,但是,这也意味着一个字符”0”不通过,所以我们采用下面的形式:^(0|[1-9][0-9])$<br>18 3.一个0或者一个不以0开头的数字.我们还可以允许开头有一个负号:^(0|-?[1-9][0-9])$<br>19 4.这表示一个0或者一个可能为负的开头不为0的数字.让用户以0开头好了.把负号的也去掉,因为钱总不能是负的吧.下面我们要加的是说明可能的小数部分:^[0-9]+(.[0-9]+)?$<br>20 5.必须说明的是,小数点后面至少应该有1位数,所以”10.”是不通过的,但是 “10” 和 “10.2” 是通过的:^[0-9]+(.[0-9]{2})?$<br>21 6.这样我们规定小数点后面必须有两位,如果你认为太苛刻了,可以这样:^[0-9]+(.[0-9]{1,2})?$<br>22 7.这样就允许用户只写一位小数.下面我们该考虑数字中的逗号了,我们可以这样:^[0-9]{1,3}(,[0-9]{3})(.[0-9]{1,2})?$<br>23 8.1到3个数字,后面跟着任意个 逗号+3个数字,逗号成为可选,而不是必须:^([0-9]+|[0-9]{1,3}(,[0-9]{3}))(.[0-9]{1,2})?$<br>24 备注:这就是最终结果了,别忘了”+”可以用””替代如果你觉得空字符串也可以接受的话(奇怪,为什么?)最后,别忘了在用函数时去掉去掉那个反斜杠,一般的错误都在这里<br>25 xml文件^([a-zA-Z]+-?)+[a-zA-Z0-9]+\.[x|X][m|M][l|L]$<br>26 中文字符的正则表达式:[\u4e00-\u9fa5]<br>27 双字节字符:[^\x00-\xff] (包括汉字在内,可以用来计算字符串的长度(一个双字节字符长度计2ASCII字符计1))<br>28 空白行的正则表达式:\n\s\r (可以用来删除空白行)<br>29 HTML标记的正则表达式&lt;(\S?)[^&gt;]&gt;.?|&lt;.? &#x2F;&gt; (网上流传的版本太糟糕,上面这个也仅仅能部分,对于复杂的嵌套标记依旧无能为力)<br>30 首尾空白字符的正则表达式:^\s|\s$或(^\s)|(\s$) (可以用来删除行首行尾的空白字符(包括空格、制表符、换页符等等),非常有用的表达式)<br>31 腾讯QQ号[1-9][0-9]{4,} (腾讯QQ号从10000开始)<br>32 中国邮政编码:[1-9]\d{5}(?!\d) (中国邮政编码为6位数字)<br>33 IP地址\d+.\d+.\d+.\d+ (提取IP地址时有用)</p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>正则表达式</tag>
</tags>
</entry>
<entry>
<title>对象存储服务MinIO</title>
<url>/posts/36397.html</url>
<content><![CDATA[<h1 id="一-MinIo基本介绍"><a href="#一-MinIo基本介绍" class="headerlink" title="一.MinIo基本介绍"></a>一.MinIo基本介绍</h1><h2 id="1-简介"><a href="#1-简介" class="headerlink" title="1.简介"></a>1.简介</h2><p> MinIO基于Apache License v2.0开源协议的对象存储服务可以做为云存储的解决方案用来保存海量的图片视频文档。由于采用Golang实现服务端可以工作在Windows,Linux, OS X和FreeBSD上。配置简单基本是复制可执行程序单行命令可以运行起来。MinIO兼容亚马逊<strong>S3云存储服务接口</strong>,非常适合于存储大容量非结构化的数据,例如图片、视频、日志文件、备份数据和容器&#x2F;虚拟机镜像等而一个对象文件可以是任意大小从几kb到最大5T不等。</p>
<p><strong>S3 Simple Storage Service简单存储服务</strong></p>
<p>基本概念</p>
<ul>
<li>bucket 类比于文件系统的目录</li>
<li>Object 类比文件系统的文件</li>
<li>Keys 类比文件名</li>
</ul>
<p>官网文档:<a href="http://docs.minio.org.cn/docs/">http://docs.minio.org.cn/docs/</a></p>
<h2 id="2-特点"><a href="#2-特点" class="headerlink" title="2.特点"></a>2.特点</h2><ul>
<li><p>数据保护</p>
<p>Minio使用Minio Erasure Code纠删码来防止硬件故障。即便损坏一半以上的driver但是仍然可以从中恢复。</p>
</li>
<li><p>高性能</p>
<p>作为高性能对象存储在标准硬件条件下它能达到55GB&#x2F;s的读、35GB&#x2F;s的写速率</p>
</li>
<li><p>可扩容</p>
<p>不同MinIO集群可以组成联邦并形成一个全局的命名空间并跨越多个数据中心</p>
</li>
<li><p>SDK支持</p>
<p>基于Minio轻量的特点它得到类似Java、Python或Go等语言的sdk支持</p>
</li>
<li><p>有操作页面</p>
<p>面向用户友好的简单操作界面非常方便的管理Bucket及里面的文件资源</p>
</li>
<li><p>功能简单</p>
<p>这一设计原则让MinIO不容易出错、更快启动</p>
</li>
<li><p>丰富的API</p>
<p>支持文件资源的分享连接及分享链接的过期策略、存储桶操作、文件列表访问及文件上传下载的基本功能等。</p>
</li>
<li><p>文件变化主动通知</p>
<p>存储桶Bucket如果发生改变,比如上传对象和删除对象,可以使用存储桶事件通知机制进行监控,并通过以下方式发布出去:AMQP、MQTT、Elasticsearch、Redis、NATS、MySQL、Kafka、Webhooks等。</p>
</li>
</ul>
<h2 id="3-对象存储方式比较"><a href="#3-对象存储方式比较" class="headerlink" title="3.对象存储方式比较"></a>3.对象存储方式比较</h2><table>
<thead>
<tr>
<th>存储方式</th>
<th>优点</th>
<th>缺点</th>
</tr>
</thead>
<tbody><tr>
<td>服务器磁盘</td>
<td>开发便捷,成本低</td>
<td>扩展困难</td>
</tr>
<tr>
<td>分布式文件系统 (如MinIo)</td>
<td>容易实现扩容</td>
<td>复杂度高</td>
</tr>
<tr>
<td>第三方存储 (如阿里OSS)</td>
<td>开发简单,功能强大,免维护</td>
<td>收费</td>
</tr>
</tbody></table>
<h2 id="4-分布式文件系统比较"><a href="#4-分布式文件系统比较" class="headerlink" title="4.分布式文件系统比较"></a>4.分布式文件系统比较</h2><table>
<thead>
<tr>
<th>存储方式</th>
<th>优点</th>
<th>缺点</th>
</tr>
</thead>
<tbody><tr>
<td>FastDFS</td>
<td>1主备服务高可用 2支持主从文件支持自定义扩展名 3支持动态扩容</td>
<td>1没有完备官方文档近几年没有更新 2环境搭建较为麻烦</td>
</tr>
<tr>
<td>MinIO</td>
<td>1性能高准硬件条件下它能达到55GB&#x2F;s的读、35GB&#x2F;s的写速率 2部署自带管理界面 3MinIO.Inc运营的开源项目社区活跃度高 4提供了所有主流开发语言的SDK</td>
<td>1不支持动态增加节点</td>
</tr>
</tbody></table>
<h1 id="二-MinIo安装教程"><a href="#二-MinIo安装教程" class="headerlink" title="二.MinIo安装教程"></a>二.MinIo安装教程</h1><p>使用Docker的方式安装MInIo,Docker使用教程 <a href="https://qingling.icu/posts/19306.html">https://qingling.icu/posts/19306.html</a></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">拉取minio的镜像</span></span><br><span class="line">docker pull minio/minio</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">创建并运行容器</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">设置用户名-e <span class="string">&quot;MINIO_ACCESS_KEY=minio&quot;</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">设置密码 -e <span class="string">&quot;MINIO_SECRET_KEY=minio123&quot;</span></span></span><br><span class="line">docker run -p 9000:9000 --name minio -d --restart=always -e &quot;MINIO_ACCESS_KEY=minio&quot; -e &quot;MINIO_SECRET_KEY=minio123&quot; -v /home/data:/data -v /home/config:/root/.minio minio/minio server /data</span><br></pre></td></tr></table></figure>
<p>访问: <a href="http://192.168.200.130:9000/">http://192.168.200.130:9000</a> </p>
<p><img src="/pictures/image-20230818145600002.png" alt="image-20230818145600002"></p>
<p>Access Key为minio Secret_key 为minio123 进入系统后可以看到主界面</p>
<p><img src="/pictures/image-20230818145721071.png" alt="image-20230818145721071"></p>
<h1 id="三-快速入门"><a href="#三-快速入门" class="headerlink" title="三.快速入门"></a>三.快速入门</h1><p><strong>基本概念</strong></p>
<ul>
<li>bucket 类比于文件系统的目录</li>
<li>Object 类比文件系统的文件</li>
<li>Keys 类比文件名</li>
</ul>
<h2 id="1-创建一个bucket"><a href="#1-创建一个bucket" class="headerlink" title="1.创建一个bucket"></a>1.创建一个bucket</h2><p><strong>点击右下角的“+”号 ,创建一个桶</strong></p>
<p><img src="/pictures/image-20230818150154249.png" alt="image-20230818150154249"></p>
<p><strong>创建成功后</strong></p>
<p><img src="/pictures/image-20230818150902795.png" alt="image-20230818150902795"></p>
<h2 id="2-环境搭建"><a href="#2-环境搭建" class="headerlink" title="2.环境搭建"></a>2.环境搭建</h2><h3 id="2-1-创建一个Demo工程"><a href="#2-1-创建一个Demo工程" class="headerlink" title="2.1 创建一个Demo工程"></a>2.1 创建一个Demo工程</h3><p><img src="/pictures/image-20230818151929679.png" alt="image-20230818151929679"></p>
<h3 id="2-2-导入依赖和创建启动类"><a href="#2-2-导入依赖和创建启动类" class="headerlink" title="2.2 导入依赖和创建启动类"></a>2.2 导入依赖和创建启动类</h3><p>pom.xml</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependencies</span>&gt;</span></span><br><span class="line"> </span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>io.minio<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>minio<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>7.1.0<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-web<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-test<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependencies</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>启动类</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.minio;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.SpringApplication;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.autoconfigure.SpringBootApplication;</span><br><span class="line"></span><br><span class="line"><span class="meta">@SpringBootApplication</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MinIOApplication</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> SpringApplication.run(MinIOApplication.class,args);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="3-测试案例"><a href="#3-测试案例" class="headerlink" title="3.测试案例"></a>3.测试案例</h2><h3 id="3-1-上传文件进行静态访问"><a href="#3-1-上传文件进行静态访问" class="headerlink" title="3.1 上传文件进行静态访问"></a>3.1 上传文件进行静态访问</h3><p><strong>目标把test.html文件上传到minio中并且可以在浏览器中访问</strong></p>
<p>test.html测试文件</p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;utf-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>Hello World!<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">b</span>&gt;</span>普通文本 String 展示:<span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">Hello freemarker <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">b</span>&gt;</span>对象Student中的数据展示<span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">姓名:小明<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">年龄18</span><br><span class="line"><span class="tag">&lt;<span class="name">hr</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><strong>文件上传代码</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.minio;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/18</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@SpringBootTest(classes = MinIOApplication.class)</span></span><br><span class="line"><span class="meta">@RunWith(SpringRunner.class)</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MinIOTest</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 把list.html文件上传到minio中,并且可以在浏览器中访问</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">testMinIO</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//读取一个文件</span></span><br><span class="line"> <span class="type">FileInputStream</span> <span class="variable">inputStream</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">FileInputStream</span>(<span class="string">&quot;C:\\Gong\\data\\test.html&quot;</span>);</span><br><span class="line"> <span class="comment">//1.获取MinIO的连接信息创建一个minio的客户端</span></span><br><span class="line"> <span class="type">MinioClient</span> <span class="variable">minioClient</span> <span class="operator">=</span> MinioClient.builder()</span><br><span class="line"> .credentials(<span class="string">&quot;minio&quot;</span>, <span class="string">&quot;minio123&quot;</span>)<span class="comment">//minio的账号密码</span></span><br><span class="line"> .endpoint(<span class="string">&quot;http://192.168.200.130:9000&quot;</span>)<span class="comment">//minio的地址</span></span><br><span class="line"> .build();</span><br><span class="line"> <span class="comment">//2.上传</span></span><br><span class="line"> <span class="type">PutObjectArgs</span> <span class="variable">putObjectArgs</span> <span class="operator">=</span> PutObjectArgs.builder()</span><br><span class="line"> .object(<span class="string">&quot;test.html&quot;</span>)<span class="comment">//文件的名称</span></span><br><span class="line"> .contentType(<span class="string">&quot;text/html&quot;</span>)<span class="comment">//文件的类型</span></span><br><span class="line"> .bucket(<span class="string">&quot;leadnews&quot;</span>)<span class="comment">//桶的名称与之前的minio管理界面创建的bucket名称一致即可</span></span><br><span class="line"> .stream(inputStream,inputStream.available(),-<span class="number">1</span>)</span><br><span class="line"> .build();</span><br><span class="line"> <span class="comment">//3.访问的路径 minio的访问路径 + 桶的名称 + 文件的名称</span></span><br><span class="line"> log.info(<span class="string">&quot;http://192.168.200.130:9000/leadnews/test.html&quot;</span>);</span><br><span class="line"> minioClient.putObject(putObjectArgs);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>执行成功之后可以在MinIO中找到该文件</strong></p>
<p><img src="/pictures/image-20230818154409682.png" alt="image-20230818154409682"></p>
<p><strong>设置浏览器输入文件在minio中的地址可以直接访问文件的内容</strong></p>
<p>设置bucket的访问权限</p>
<p><img src="/pictures/image-20230818154858988.png" alt="image-20230818154858988"></p>
<p>设置完毕后访问文件的地址可以直接访问到</p>
<p><img src="/pictures/image-20230818155021308.png" alt="image-20230818155021308"></p>
<h2 id="4-封装MinIO为Starter-以黑马头条项目为例"><a href="#4-封装MinIO为Starter-以黑马头条项目为例" class="headerlink" title="4.封装MinIO为Starter-以黑马头条项目为例"></a>4.封装MinIO为Starter-以黑马头条项目为例</h2><p>黑马头条项目gitee地址: <a href="https://gitee.com/JasonsGong/heima-leadnews">https://gitee.com/JasonsGong/heima-leadnews</a></p>
<p>在开发的过程中有很多模块需要使用到文件服务我们直接把文件服务封装成一个Starter,方便其余的模块调用</p>
<p><img src="/pictures/image-20230818155501495.png" alt="image-20230818155501495"></p>
<h3 id="4-1-创建模块heima-file-starter"><a href="#4-1-创建模块heima-file-starter" class="headerlink" title="4.1 创建模块heima-file-starter"></a>4.1 创建模块heima-file-starter</h3><p>导入依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependencies</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-autoconfigure<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>io.minio<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>minio<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>7.1.0<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-configuration-processor<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">optional</span>&gt;</span>true<span class="tag">&lt;/<span class="name">optional</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-actuator<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependencies</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="4-2-配置类"><a href="#4-2-配置类" class="headerlink" title="4.2 配置类"></a>4.2 配置类</h3><p>MinIOConfigProperties</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.file.config;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.context.properties.ConfigurationProperties;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.Serializable;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@ConfigurationProperties(prefix = &quot;minio&quot;)</span> </span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MinIOConfigProperties</span> <span class="keyword">implements</span> <span class="title class_">Serializable</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String accessKey;</span><br><span class="line"> <span class="keyword">private</span> String secretKey;</span><br><span class="line"> <span class="keyword">private</span> String bucket;</span><br><span class="line"> <span class="keyword">private</span> String endpoint;</span><br><span class="line"> <span class="keyword">private</span> String readPath;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>MinIOConfig</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.file.config;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.file.service.FileStorageService;</span><br><span class="line"><span class="keyword">import</span> io.minio.MinioClient;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.autoconfigure.condition.ConditionalOnClass;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.context.properties.EnableConfigurationProperties;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Bean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="meta">@EnableConfigurationProperties(&#123;MinIOConfigProperties.class&#125;)</span></span><br><span class="line"><span class="comment">//当引入FileStorageService接口时</span></span><br><span class="line"><span class="meta">@ConditionalOnClass(FileStorageService.class)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MinIOConfig</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> MinIOConfigProperties minIOConfigProperties;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> MinioClient <span class="title function_">buildMinioClient</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> MinioClient</span><br><span class="line"> .builder()</span><br><span class="line"> .credentials(minIOConfigProperties.getAccessKey(), minIOConfigProperties.getSecretKey())</span><br><span class="line"> .endpoint(minIOConfigProperties.getEndpoint())</span><br><span class="line"> .build();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="4-3-封装操作minIO类"><a href="#4-3-封装操作minIO类" class="headerlink" title="4.3 封装操作minIO类"></a>4.3 封装操作minIO类</h3><p>FileStorageService</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.file.service;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.InputStream;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> itheima</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">interface</span> <span class="title class_">FileStorageService</span> &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 上传图片文件</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> prefix 文件前缀</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> filename 文件名</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> inputStream 文件流</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 文件全路径</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">uploadImgFile</span><span class="params">(String prefix, String filename,InputStream inputStream)</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 上传html文件</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> prefix 文件前缀</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> filename 文件名</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> inputStream 文件流</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 文件全路径</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">uploadHtmlFile</span><span class="params">(String prefix, String filename,InputStream inputStream)</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 删除文件</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> pathUrl 文件全路径</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">delete</span><span class="params">(String pathUrl)</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 下载文件</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> pathUrl 文件全路径</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">byte</span>[] downLoadFile(String pathUrl);</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>MinIOFileStorageService</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.file.service.impl;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.file.config.MinIOConfig;</span><br><span class="line"><span class="keyword">import</span> com.heima.file.config.MinIOConfigProperties;</span><br><span class="line"><span class="keyword">import</span> com.heima.file.service.FileStorageService;</span><br><span class="line"><span class="keyword">import</span> io.minio.GetObjectArgs;</span><br><span class="line"><span class="keyword">import</span> io.minio.MinioClient;</span><br><span class="line"><span class="keyword">import</span> io.minio.PutObjectArgs;</span><br><span class="line"><span class="keyword">import</span> io.minio.RemoveObjectArgs;</span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.context.properties.EnableConfigurationProperties;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Import;</span><br><span class="line"><span class="keyword">import</span> org.springframework.util.StringUtils;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.ByteArrayOutputStream;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.io.InputStream;</span><br><span class="line"><span class="keyword">import</span> java.text.SimpleDateFormat;</span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@EnableConfigurationProperties(MinIOConfigProperties.class)</span></span><br><span class="line"><span class="meta">@Import(MinIOConfig.class)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MinIOFileStorageService</span> <span class="keyword">implements</span> <span class="title class_">FileStorageService</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> MinioClient minioClient;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> MinIOConfigProperties minIOConfigProperties;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">final</span> <span class="keyword">static</span> <span class="type">String</span> <span class="variable">separator</span> <span class="operator">=</span> <span class="string">&quot;/&quot;</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> dirPath</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> filename yyyy/mm/dd/file.jpg</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">builderFilePath</span><span class="params">(String dirPath,String filename)</span> &#123;</span><br><span class="line"> <span class="type">StringBuilder</span> <span class="variable">stringBuilder</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">StringBuilder</span>(<span class="number">50</span>);</span><br><span class="line"> <span class="keyword">if</span>(!StringUtils.isEmpty(dirPath))&#123;</span><br><span class="line"> stringBuilder.append(dirPath).append(separator);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">SimpleDateFormat</span> <span class="variable">sdf</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SimpleDateFormat</span>(<span class="string">&quot;yyyy/MM/dd&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">todayStr</span> <span class="operator">=</span> sdf.format(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> stringBuilder.append(todayStr).append(separator);</span><br><span class="line"> stringBuilder.append(filename);</span><br><span class="line"> <span class="keyword">return</span> stringBuilder.toString();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 上传图片文件</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> prefix 文件前缀</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> filename 文件名</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> inputStream 文件流</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 文件全路径</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">uploadImgFile</span><span class="params">(String prefix, String filename,InputStream inputStream)</span> &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">filePath</span> <span class="operator">=</span> builderFilePath(prefix, filename);</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">PutObjectArgs</span> <span class="variable">putObjectArgs</span> <span class="operator">=</span> PutObjectArgs.builder()</span><br><span class="line"> .object(filePath)</span><br><span class="line"> .contentType(<span class="string">&quot;image/jpg&quot;</span>)</span><br><span class="line"> .bucket(minIOConfigProperties.getBucket()).stream(inputStream,inputStream.available(),-<span class="number">1</span>)</span><br><span class="line"> .build();</span><br><span class="line"> minioClient.putObject(putObjectArgs);</span><br><span class="line"> <span class="type">StringBuilder</span> <span class="variable">urlPath</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">StringBuilder</span>(minIOConfigProperties.getReadPath());</span><br><span class="line"> urlPath.append(separator+minIOConfigProperties.getBucket());</span><br><span class="line"> urlPath.append(separator);</span><br><span class="line"> urlPath.append(filePath);</span><br><span class="line"> <span class="keyword">return</span> urlPath.toString();</span><br><span class="line"> &#125;<span class="keyword">catch</span> (Exception ex)&#123;</span><br><span class="line"> log.error(<span class="string">&quot;minio put file error.&quot;</span>,ex);</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;上传文件失败&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 上传html文件</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> prefix 文件前缀</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> filename 文件名</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> inputStream 文件流</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 文件全路径</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">uploadHtmlFile</span><span class="params">(String prefix, String filename,InputStream inputStream)</span> &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">filePath</span> <span class="operator">=</span> builderFilePath(prefix, filename);</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">PutObjectArgs</span> <span class="variable">putObjectArgs</span> <span class="operator">=</span> PutObjectArgs.builder()</span><br><span class="line"> .object(filePath)</span><br><span class="line"> .contentType(<span class="string">&quot;text/html&quot;</span>)</span><br><span class="line"> .bucket(minIOConfigProperties.getBucket()).stream(inputStream,inputStream.available(),-<span class="number">1</span>)</span><br><span class="line"> .build();</span><br><span class="line"> minioClient.putObject(putObjectArgs);</span><br><span class="line"> <span class="type">StringBuilder</span> <span class="variable">urlPath</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">StringBuilder</span>(minIOConfigProperties.getReadPath());</span><br><span class="line"> urlPath.append(separator+minIOConfigProperties.getBucket());</span><br><span class="line"> urlPath.append(separator);</span><br><span class="line"> urlPath.append(filePath);</span><br><span class="line"> <span class="keyword">return</span> urlPath.toString();</span><br><span class="line"> &#125;<span class="keyword">catch</span> (Exception ex)&#123;</span><br><span class="line"> log.error(<span class="string">&quot;minio put file error.&quot;</span>,ex);</span><br><span class="line"> ex.printStackTrace();</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;上传文件失败&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 删除文件</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> pathUrl 文件全路径</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">delete</span><span class="params">(String pathUrl)</span> &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">key</span> <span class="operator">=</span> pathUrl.replace(minIOConfigProperties.getEndpoint()+<span class="string">&quot;/&quot;</span>,<span class="string">&quot;&quot;</span>);</span><br><span class="line"> <span class="type">int</span> <span class="variable">index</span> <span class="operator">=</span> key.indexOf(separator);</span><br><span class="line"> <span class="type">String</span> <span class="variable">bucket</span> <span class="operator">=</span> key.substring(<span class="number">0</span>,index);</span><br><span class="line"> <span class="type">String</span> <span class="variable">filePath</span> <span class="operator">=</span> key.substring(index+<span class="number">1</span>);</span><br><span class="line"> <span class="comment">// 删除Objects</span></span><br><span class="line"> <span class="type">RemoveObjectArgs</span> <span class="variable">removeObjectArgs</span> <span class="operator">=</span> RemoveObjectArgs.builder().bucket(bucket).object(filePath).build();</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> minioClient.removeObject(removeObjectArgs);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> log.error(<span class="string">&quot;minio remove file error. pathUrl:&#123;&#125;&quot;</span>,pathUrl);</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 下载文件</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> pathUrl 文件全路径</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 文件流</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">byte</span>[] downLoadFile(String pathUrl) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">key</span> <span class="operator">=</span> pathUrl.replace(minIOConfigProperties.getEndpoint()+<span class="string">&quot;/&quot;</span>,<span class="string">&quot;&quot;</span>);</span><br><span class="line"> <span class="type">int</span> <span class="variable">index</span> <span class="operator">=</span> key.indexOf(separator);</span><br><span class="line"> <span class="type">String</span> <span class="variable">bucket</span> <span class="operator">=</span> key.substring(<span class="number">0</span>,index);</span><br><span class="line"> <span class="type">String</span> <span class="variable">filePath</span> <span class="operator">=</span> key.substring(index+<span class="number">1</span>);</span><br><span class="line"> <span class="type">InputStream</span> <span class="variable">inputStream</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> inputStream = minioClient.getObject(GetObjectArgs.builder().bucket(minIOConfigProperties.getBucket()).object(filePath).build());</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> log.error(<span class="string">&quot;minio down file error. pathUrl:&#123;&#125;&quot;</span>,pathUrl);</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="type">ByteArrayOutputStream</span> <span class="variable">byteArrayOutputStream</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ByteArrayOutputStream</span>();</span><br><span class="line"> <span class="type">byte</span>[] buff = <span class="keyword">new</span> <span class="title class_">byte</span>[<span class="number">100</span>];</span><br><span class="line"> <span class="type">int</span> <span class="variable">rc</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (!((rc = inputStream.read(buff, <span class="number">0</span>, <span class="number">100</span>)) &gt; <span class="number">0</span>)) <span class="keyword">break</span>;</span><br><span class="line"> &#125; <span class="keyword">catch</span> (IOException e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> byteArrayOutputStream.write(buff, <span class="number">0</span>, rc);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> byteArrayOutputStream.toByteArray();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="4-4-对外加入自动配置"><a href="#4-4-对外加入自动配置" class="headerlink" title="4.4 对外加入自动配置"></a>4.4 对外加入自动配置</h3><p>在resources中新建<code>META-INF/spring.factories</code></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line">org.springframework.boot.autoconfigure.EnableAutoConfiguration=\</span><br><span class="line"> com.heima.file.service.impl.MinIOFileStorageService</span><br></pre></td></tr></table></figure>
<h3 id="4-5-其他微服务使用"><a href="#4-5-其他微服务使用" class="headerlink" title="4.5 其他微服务使用"></a>4.5 其他微服务使用</h3><p>第一导入heima-file-starter的依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.heima<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>heima-file-starter<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>1.0-SNAPSHOT<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>第二在微服务中添加minio所需要的配置</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">minio:</span></span><br><span class="line"> <span class="attr">accessKey:</span> <span class="string">minio</span></span><br><span class="line"> <span class="attr">secretKey:</span> <span class="string">minio123</span></span><br><span class="line"> <span class="attr">bucket:</span> <span class="string">leadnews</span></span><br><span class="line"> <span class="attr">endpoint:</span> <span class="string">http://192.168.200.130:9000</span></span><br><span class="line"> <span class="attr">readPath:</span> <span class="string">http://192.168.200.130:9000</span></span><br></pre></td></tr></table></figure>
<p>第三在对应使用的业务类中注入FileStorageService样例如下</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Autowired</span></span><br><span class="line"><span class="keyword">private</span> FileStorageService fileStorageService;</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.minio;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/18</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@SpringBootTest(classes = MinIOApplication.class)</span></span><br><span class="line"><span class="meta">@RunWith(SpringRunner.class)</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MinIOTest</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> FileStorageService fileStorageService;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">testMinIOStarter</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="comment">//读取一个文件</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">FileInputStream</span> <span class="variable">inputStream</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">FileInputStream</span>(<span class="string">&quot;C:\\Gong\\data\\test.html&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">s</span> <span class="operator">=</span> fileStorageService.uploadHtmlFile(<span class="string">&quot;&quot;</span>, <span class="string">&quot;test,html&quot;</span>, inputStream);</span><br><span class="line"> log.info(s);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (FileNotFoundException e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230818165138917.png" alt="image-20230818165138917"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>MinIo</tag>
</tags>
</entry>
<entry>
<title>前端基础知识</title>
<url>/posts/432.html</url>
<content><![CDATA[<h1 id="一-VSCode的使用"><a href="#一-VSCode的使用" class="headerlink" title="一.VSCode的使用"></a>一.VSCode的使用</h1><h2 id="常用插件"><a href="#常用插件" class="headerlink" title="常用插件"></a>常用插件</h2><p><img src="/pictures/image-20230521233651126.png" alt="image-20230521233651126"></p>
<h1 id="二-ES6"><a href="#二-ES6" class="headerlink" title="二. ES6"></a>二. ES6</h1><p><a href="https://www.runoob.com/w3cnote/es6-tutorial.html">菜鸟ES6教程教程</a></p>
<h2 id="1-简介"><a href="#1-简介" class="headerlink" title="1.简介"></a>1.简介</h2><p> ES6 全称 ECMAScript 6.0 ,是 JavaScript 的下一个版本标准2015.06 发版。ES6 主要是为了解决 ES5 的先天不足,比如 JavaScript 里并没有类的概念,但是目前浏览器的 JavaScript 是 ES5 版本,大多数高版本的浏览器也支持 ES6不过只实现了 ES6 的部分特性和功能。</p>
<h2 id="2-基础语法"><a href="#2-基础语法" class="headerlink" title="2.基础语法"></a>2.基础语法</h2><img src="/pictures/es6-tutorial.jpg" alt="img" style="zoom:150%;" />
<h3 id="2-1-声明变量"><a href="#2-1-声明变量" class="headerlink" title="2.1 声明变量"></a>2.1 声明变量</h3><ul>
<li>let 声明的变量有严格的作用域 var没有严格的作用域</li>
<li>let变量只能声明一次</li>
<li>let不存在变量提升 var存在变量提升先使用后声明</li>
<li>const声明的是常量不能重新赋值</li>
<li>总计:使用let声明变量</li>
</ul>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>声明变量<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//1.有严格的作用域</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//var 声明的变量往往会越域</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//let 声明的变量有严格的作用域</span></span></span><br><span class="line"><span class="language-javascript"> &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">var</span> a = <span class="number">1</span>;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> b = <span class="number">1</span>;</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(a) <span class="comment">//不会报错</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(b) <span class="comment">//ReferenceError: b is not defined,有严格的作用域,所以会报错</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//2.let的变量只能声明一次</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">var</span> m = <span class="number">1</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">var</span> m = <span class="number">2</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> n = <span class="number">3</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">// let n = 4</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(m) <span class="comment">//不会报错</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(n) <span class="comment">//Identifier &#x27;n&#x27; has already been declared 不能声明两次</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//3.let不存在变量提升 var存在变量提升</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>,<span class="title function_">log</span>(x)</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">var</span> x = <span class="number">10</span>; <span class="comment">//这里不会报错,可以先使用后定义</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//4.const声明的是常量不能重新赋值</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//总计:使用let声明变量</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-2-解构表达式和模板字符串"><a href="#2-2-解构表达式和模板字符串" class="headerlink" title="2.2 解构表达式和模板字符串"></a>2.2 解构表达式和模板字符串</h3><ul>
<li>数组的解构</li>
<li>对象的解构</li>
<li>字符串API的扩展</li>
<li>模板字符串</li>
</ul>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>解构表达式<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//解构表达式</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//1.原始的数组的赋值方式</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> arr = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">// let a = arr[0]</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">// let b = arr[1]</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">// let c = arr[2]</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//2.使用解构表达式给数组赋值(数组解构)</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> [a, b, c] = arr;</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(a, b, c);</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//3.使用解构表达式给对象赋值(对象解构)</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">const</span> person = &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">name</span>: <span class="string">&quot;jack&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">age</span>: <span class="number">21</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">language</span>: [<span class="string">&#x27;java&#x27;</span>, <span class="string">&#x27;js&#x27;</span>, <span class="string">&#x27;css&#x27;</span>]</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//原始的赋值方式</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">// const name = person.name</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">// const age = person.age</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">// const language = person.language</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//使用解构赋值(对象解构)</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//const &#123; name, age, language &#125; = person</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//更换属性名</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">const</span> &#123; <span class="attr">name</span>: abc, age, language &#125; = person</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//将属性名name更换为abc</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(abc, age, language)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//4.字符串扩展</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//几个新的字符串API</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> str = <span class="string">&quot;hello.vue&quot;</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//是不是以什么开头</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(str.<span class="title function_">startsWith</span>(<span class="string">&quot;hello&quot;</span>));<span class="comment">//true</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//是不是以什么结束</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(str.<span class="title function_">endsWith</span>(<span class="string">&quot;.vue&quot;</span>));<span class="comment">//true</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//是不是包含什么</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(str.<span class="title function_">includes</span>(<span class="string">&quot;e&quot;</span>));<span class="comment">//true</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(str.<span class="title function_">includes</span>(<span class="string">&quot;hello&quot;</span>));<span class="comment">//true</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//5.模板字符串</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//$&#123;&#125;插值</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> name = <span class="string">&quot;Tom&quot;</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> result = <span class="string">`你好<span class="subst">$&#123;name&#125;</span>`</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(result)</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//可以直接调用字符串的返回值组成一个新的字符串</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">function</span> <span class="title function_">fun</span>(<span class="params"></span>)&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> <span class="string">&quot;这是一个函数&quot;</span></span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> result = <span class="string">`你好<span class="subst">$&#123;name&#125;</span>,我想说:<span class="subst">$&#123;fun()&#125;</span>`</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(result)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-3-函数优化"><a href="#2-3-函数优化" class="headerlink" title="2.3 函数优化"></a>2.3 函数优化</h3><ul>
<li>默认初始值</li>
<li>不定参数</li>
<li>箭头函数</li>
</ul>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>函数优化<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//1.函数优化</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//在ES6以前我们无法给一个函数参数设置默认值只能采用变通的写法</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">function</span> <span class="title function_">add</span>(<span class="params">a, b</span>) &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//判断b是否为空 如果为空就给默认值1</span></span></span><br><span class="line"><span class="language-javascript"> b = b || <span class="number">1</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> a + b</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//传一个参数</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="title function_">add</span>(<span class="number">10</span>)) <span class="comment">//结果是11</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//优化后 直接在参数上写上默认的值 如果没有传就会自动使用默认值</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">function</span> <span class="title function_">add2</span>(<span class="params">a, b = <span class="number">1</span></span>) &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> a + b</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="title function_">add2</span>(<span class="number">20</span>)) <span class="comment">//结果是21</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//2.不定参数 类似于java里面的可变形参</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">function</span> <span class="title function_">fun</span>(<span class="params">...values</span>) &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(values.<span class="property">length</span>)</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="title function_">fun</span>(<span class="number">1</span>, <span class="number">2</span>)</span></span><br><span class="line"><span class="language-javascript"> <span class="title function_">fun</span>(<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>)</span></span><br><span class="line"><span class="language-javascript"> <span class="title function_">fun</span>(<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//3.箭头函数</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//以前的声明方法</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">var</span> print = <span class="keyword">function</span> (<span class="params">obj</span>) &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(obj)</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">var</span> <span class="title function_">print1</span> = obj =&gt; <span class="variable language_">console</span>.<span class="title function_">log</span>(obj)</span></span><br><span class="line"><span class="language-javascript"> <span class="title function_">print1</span>(<span class="string">&quot;hello&quot;</span>) <span class="comment">//输出hello</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//求两数之和</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//以前的方法</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">var</span> sum = <span class="keyword">function</span> (<span class="params">a, b</span>) &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> a + b</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//使用箭头函数</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">var</span> <span class="title function_">sum2</span> = (<span class="params">a, b</span>) =&gt; a + b <span class="comment">//方法体中只有一行代码 不用写return</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="title function_">sum2</span>(<span class="number">11</span>, <span class="number">3</span>))</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">var</span> <span class="title function_">sum3</span> = (<span class="params">a, b</span>) =&gt; &#123;<span class="comment">//方法体中有多行代码 写法如下</span></span></span><br><span class="line"><span class="language-javascript"> c = a + b;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> a + c</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="title function_">sum3</span>(<span class="number">11</span>, <span class="number">3</span>))</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//复杂一点的箭头函数</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">const</span> person = &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">name</span>: <span class="string">&quot;jack&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">age</span>: <span class="number">21</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">language</span>: [<span class="string">&#x27;java&#x27;</span>, <span class="string">&#x27;js&#x27;</span>, <span class="string">&#x27;css&#x27;</span>]</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//原始的方法</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">function</span> <span class="title function_">hello</span>(<span class="params">person</span>) &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;hello &quot;</span> + person.<span class="property">name</span>)</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//单纯的箭头函数</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">var</span> <span class="title function_">hello2</span> = (<span class="params">obj</span>) =&gt; <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;hello,&quot;</span> + obj.<span class="property">name</span>)</span></span><br><span class="line"><span class="language-javascript"> <span class="title function_">hello2</span>(person)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//箭头函数加解构表达式</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">var</span> <span class="title function_">hello3</span> = (<span class="params">&#123;name&#125;</span>) =&gt; <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;hello,&quot;</span> + name)</span></span><br><span class="line"><span class="language-javascript"> <span class="title function_">hello3</span>(person)</span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-4-对象优化"><a href="#2-4-对象优化" class="headerlink" title="2.4 对象优化"></a>2.4 对象优化</h3><ul>
<li>对象新增的API</li>
<li>声明对象的简写方式</li>
<li>对象函数属性的简写</li>
</ul>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>对象优化<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//1.对象相关的API</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//定义一个person对象</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">const</span> person = &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">name</span>: <span class="string">&quot;jack&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">age</span>: <span class="number">21</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">language</span>: [<span class="string">&#x27;java&#x27;</span>, <span class="string">&#x27;js&#x27;</span>, <span class="string">&#x27;css&#x27;</span>]</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//测试对象新增的API</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//返回对象所有的属性信息</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="title class_">Object</span>.<span class="title function_">keys</span>(person)) <span class="comment">//[&#x27;name&#x27;, &#x27;age&#x27;, &#x27;language&#x27;]</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//返回对象中vaules</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="title class_">Object</span>.<span class="title function_">values</span>(person))<span class="comment">// [&#x27;jack&#x27;, 21, Array(3)]</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//返回key-vaues</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="title class_">Object</span>.<span class="title function_">entries</span>(person))<span class="comment">// [Array(2), Array(2), Array(2)]</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//将source1和source2的属性合并到target中</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">const</span> target = &#123; <span class="attr">a</span>: <span class="number">1</span> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">const</span> source1 = &#123; <span class="attr">b</span>: <span class="number">2</span> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">const</span> source2 = &#123; <span class="attr">c</span>: <span class="number">3</span> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//将source1和source2中的属性合并在一起</span></span></span><br><span class="line"><span class="language-javascript"> <span class="title class_">Object</span>.<span class="title function_">assign</span>(target, source1, source2)</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(target) <span class="comment">//&#123;a: 1, b: 2, c: 3&#125;</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//2.声明对象的简写方式</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//声明两个变量</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">const</span> age = <span class="number">23</span>;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">const</span> name = <span class="string">&quot;张三&quot;</span>;</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//原始的方式然后声明一个对象,属性值为这两个变量的值</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">const</span> person1 = &#123; <span class="attr">age</span>: age, <span class="attr">name</span>: name &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(person1)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//ES6的方式</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">const</span> person2 = &#123; age, name &#125;<span class="comment">// 属性名和属性值代表的变量的名字一样可以省写</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(person2)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//3.对象函数属性的简写</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> person3 = &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">name</span>: <span class="string">&quot;jack&quot;</span>,<span class="comment">//对象的属性</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//以前的语法格式</span></span></span><br><span class="line"><span class="language-javascript"> <span class="attr">eat</span>: <span class="keyword">function</span> (<span class="params">food</span>) &#123;<span class="comment">//对象的方法</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="variable language_">this</span>.<span class="property">name</span> + <span class="string">&quot;在吃&quot;</span> + food)</span></span><br><span class="line"><span class="language-javascript"> &#125;,</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//使用箭头有函数简写 箭头函数中this.name无法使用</span></span></span><br><span class="line"><span class="language-javascript"> <span class="attr">eat2</span>: <span class="function"><span class="params">food</span> =&gt;</span> <span class="variable language_">console</span>.<span class="title function_">log</span>(person3.<span class="property">name</span> + <span class="string">&quot;在吃&quot;</span> + food),</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="title function_">eat3</span>(<span class="params">food</span>) &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="variable language_">this</span>.<span class="property">name</span> + <span class="string">&quot;在吃&quot;</span> + food)</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> person3.<span class="title function_">eat</span>(<span class="string">&quot;香蕉&quot;</span>)</span></span><br><span class="line"><span class="language-javascript"> person3.<span class="title function_">eat2</span>(<span class="string">&quot;苹果&quot;</span>)</span></span><br><span class="line"><span class="language-javascript"> person3.<span class="title function_">eat3</span>(<span class="string">&quot;梨子&quot;</span>)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//4.对象的扩展运算符</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//拷贝对象(深拷贝)</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//将person01的值拷贝给someone</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> person01 = &#123; <span class="attr">name</span>: <span class="string">&quot;Amy&quot;</span>, <span class="attr">age</span>: <span class="number">15</span> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> someone = &#123; ...person01 &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(someone)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//合并对象</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> age1 = &#123; <span class="attr">age</span>: <span class="number">15</span> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> name1 = &#123; <span class="attr">name</span>: <span class="string">&quot;Amy&quot;</span> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> person03 = &#123; ...age1, ...name1 &#125;<span class="comment">//两个对象属性的合并一个对象中,如果有相同的值,后一个覆盖前面的那一个属性的值</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(person03)<span class="comment">//&#123;age: 15, name: &#x27;Amy&#x27;&#125;</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-5-数组的map、reduce方法"><a href="#2-5-数组的map、reduce方法" class="headerlink" title="2.5 数组的map、reduce方法"></a>2.5 数组的map、reduce方法</h3><ul>
<li>map方法</li>
<li>reduce方法</li>
</ul>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>map和reduce<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//数组中新增了map和reduce方法</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//map():接收一个函数,将原数组中的所有元素用这个函数处理后放入新数组返回</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> arr = [<span class="string">&#x27;1&#x27;</span>, <span class="string">&#x27;20&#x27;</span>, <span class="string">&#x27;-5&#x27;</span>, <span class="string">&#x27;3&#x27;</span>]</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//需求:将原数组中的每一个值乘以2并返回</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//第一种方法</span></span></span><br><span class="line"><span class="language-javascript"> arr1 = arr.<span class="title function_">map</span>(<span class="function">(<span class="params">item</span>) =&gt;</span> &#123;<span class="comment">//item为数组中的每一个元素</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> item * <span class="number">2</span></span></span><br><span class="line"><span class="language-javascript"> &#125;)</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(arr1)</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//第二种方法</span></span></span><br><span class="line"><span class="language-javascript"> arr2 = arr.<span class="title function_">map</span>(<span class="function"><span class="params">item</span> =&gt;</span> item * <span class="number">2</span>)</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(arr2)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//reduce()方法:为数组中的每一个元素依次执行回调函数,不包括数组中被删除或从未被赋值的元素</span></span></span><br><span class="line"><span class="language-javascript"> arr3 = [<span class="number">2</span>, <span class="number">40</span>, -<span class="number">10</span>, <span class="number">6</span>]</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//arr.reduce(callback,[initialValue]) //可以传一个回调函数callback也可以传一个初始值initialValue</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//传入的是回调函数 可以传入的值有</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">/**</span></span></span><br><span class="line"><span class="comment"><span class="language-javascript"> * previousValue (上一次调用回调返回的值或者是提供的初始值initialValue)</span></span></span><br><span class="line"><span class="comment"><span class="language-javascript"> * currentValue (数组中当前被处理的元素)</span></span></span><br><span class="line"><span class="comment"><span class="language-javascript"> * index (当前元素在数组中的索引)</span></span></span><br><span class="line"><span class="comment"><span class="language-javascript"> * array (调用reduce的数组)</span></span></span><br><span class="line"><span class="comment"><span class="language-javascript"> * */</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> result = arr3.<span class="title function_">reduce</span>(<span class="function">(<span class="params">a, b</span>) =&gt;</span> &#123;<span class="comment">//这个方法相当于求数组中每一个元素的和</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;上一次处理后的值:&quot;</span> + a)</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;当前处理的值:&quot;</span> + b)</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> a + b;</span></span><br><span class="line"><span class="language-javascript"> &#125;)</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(result)</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">/**结果</span></span></span><br><span class="line"><span class="comment"><span class="language-javascript"> * 上一次处理后的值:2</span></span></span><br><span class="line"><span class="comment"><span class="language-javascript"> 当前处理的值:40</span></span></span><br><span class="line"><span class="comment"><span class="language-javascript"> 上一次处理后的值:42</span></span></span><br><span class="line"><span class="comment"><span class="language-javascript"> 当前处理的值:-10</span></span></span><br><span class="line"><span class="comment"><span class="language-javascript"> 上一次处理后的值:32</span></span></span><br><span class="line"><span class="comment"><span class="language-javascript"> 当前处理的值:6</span></span></span><br><span class="line"><span class="comment"><span class="language-javascript"> 38</span></span></span><br><span class="line"><span class="comment"><span class="language-javascript"> **/</span></span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-6-promise异步编排"><a href="#2-6-promise异步编排" class="headerlink" title="2.6 promise异步编排"></a>2.6 promise异步编排</h3><p><strong>解决回调地域的问题</strong></p>
<p> Promise构造函数接受一个函数作为参数该函数的两个参数分别是resolve和reject。它们是两个函数由 JavaScript 引擎提供不用自己部署。resolve函数的作用是将Promise对象的状态从“未完成”变为“成功”即从 pending 变为 resolved在异步操作成功时调用并将异步操作的结果作为参数传递出去reject函数的作用是将Promise对象的状态从“未完成”变为“失败”即从 pending 变为 rejected在异步操作失败时调用并将异步操作报出的错误作为参数传递出去。</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="keyword">let</span> promise = <span class="keyword">new</span> <span class="title class_">Promise</span>(<span class="keyword">function</span>(<span class="params">resolve, reject</span>) &#123;</span><br><span class="line"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&#x27;Promise&#x27;</span>);</span><br><span class="line"> <span class="title function_">resolve</span>();</span><br><span class="line">&#125;);</span><br><span class="line"></span><br><span class="line">promise.<span class="title function_">then</span>(<span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&#x27;resolved.&#x27;</span>);</span><br><span class="line">&#125;);</span><br><span class="line"></span><br><span class="line"><span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&#x27;Hi!&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">// Promise</span></span><br><span class="line"><span class="comment">// Hi!</span></span><br><span class="line"><span class="comment">// resolved</span></span><br></pre></td></tr></table></figure>
<p><strong>原有的基础上进一步的封装,链式调用</strong></p>
<h2 id="3-模块化"><a href="#3-模块化" class="headerlink" title="3.模块化"></a>3.模块化</h2><h3 id="3-1-什么是模块化"><a href="#3-1-什么是模块化" class="headerlink" title="3.1 什么是模块化"></a>3.1 什么是模块化</h3><p> 模块化就是把代码进行拆分分辨重复使用。类似java中的导包要使用一个包必须先导包。而JS中没有包的概念换来的是模块。</p>
<p>模块功能主要由两个命令构成: export和import</p>
<ul>
<li>export命令用于规定模块的对外接口</li>
<li>import命令用于导入其他模块提供的功能</li>
</ul>
<h3 id="3-2-export"><a href="#3-2-export" class="headerlink" title="3.2 export"></a>3.2 export</h3><p><strong>export不仅可以导出对象一切js对象都可以导出。比如:基本类型的变量、函数、数组、对象</strong></p>
<p>比如我们定义了一个js文件hello.js里面有一个对象</p>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">const</span> util = &#123;</span><br><span class="line"> <span class="title function_">dsum</span>(<span class="params">a, b</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> a + b;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>我们可以使用export将这个对象导出</p>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">const</span> util = &#123;</span><br><span class="line"> <span class="title function_">dsum</span>(<span class="params">a, b</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> a + b;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//导出对象</span></span><br><span class="line"><span class="keyword">export</span> &#123; util &#125;</span><br></pre></td></tr></table></figure>
<p>也可以简写成</p>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">export</span> <span class="keyword">const</span> util = &#123;</span><br><span class="line"> <span class="title function_">dsum</span>(<span class="params">a, b</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> a + b;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>当要导出多个值时,还可以简写。比如我有一个文件: user.js</p>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">var</span> name = <span class="string">&quot;jack&quot;</span></span><br><span class="line"><span class="keyword">var</span> age = <span class="number">21</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">export</span>&#123;name, age&#125;</span><br></pre></td></tr></table></figure>
<h3 id="3-3-import"><a href="#3-3-import" class="headerlink" title="3.3 import"></a>3.3 import</h3><p>比如我们之前定义了两个JS文件</p>
<p>hello.js</p>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">const</span> util = &#123;</span><br><span class="line"> <span class="title function_">dsum</span>(<span class="params">a, b</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> a + b;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//导出对象</span></span><br><span class="line"><span class="keyword">export</span> &#123; util &#125;</span><br></pre></td></tr></table></figure>
<p>user.js</p>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">var</span> name = <span class="string">&quot;jack&quot;</span></span><br><span class="line"><span class="keyword">var</span> age = <span class="number">21</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">add</span>(<span class="params">a, b</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> a + b</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">export</span> &#123; name, age, add &#125;</span><br></pre></td></tr></table></figure>
<p>我们在main.js文件中导入上面的两个文件并使用上面的两个文件的方法</p>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> util <span class="keyword">from</span> <span class="string">&quot;./hello&quot;</span> <span class="comment">//这里只能是util 不能是其他的名字</span></span><br><span class="line"><span class="keyword">import</span> &#123;name,age,add&#125; <span class="keyword">from</span> <span class="string">&#x27;./user&#x27;</span> <span class="comment">//可以不用全部导入 只用导入需要的即可</span></span><br><span class="line"></span><br><span class="line">util.<span class="title function_">sum</span>(<span class="number">1</span>,<span class="number">2</span>)</span><br><span class="line"><span class="variable language_">console</span>.<span class="title function_">log</span>(name);</span><br><span class="line"><span class="title function_">add</span>(<span class="number">1</span>,<span class="number">2</span>)</span><br></pre></td></tr></table></figure>
<h3 id="3-4-注意"><a href="#3-4-注意" class="headerlink" title="3.4 注意"></a>3.4 注意</h3><p>当我们这样定义时,导入的时候可以自定义导入时使用的变量名</p>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">export</span> <span class="keyword">default</span> &#123; <span class="comment">//导出的时候这样写</span></span><br><span class="line"> <span class="title function_">dsum</span>(<span class="params">a, b</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> a + b;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> xxx <span class="keyword">from</span> <span class="string">&quot;./hello&quot;</span> <span class="comment">//这里使用可以随意的取名</span></span><br></pre></td></tr></table></figure>
<h1 id="三-Vue"><a href="#三-Vue" class="headerlink" title="三.Vue"></a>三.Vue</h1><h2 id="1-MVVM思想"><a href="#1-MVVM思想" class="headerlink" title="1.MVVM思想"></a>1.MVVM思想</h2><ul>
<li>M:即 Model模型包括数据和一些基本操作</li>
<li>V:即View视图页面渲染结果</li>
<li>VM:即 View-Model模型与视图间的双向操作无需开发人员干涉)</li>
</ul>
<p> 在MVVM之前开发人员从后端获取需要的数据模型然后要通过DOM操作 Model渲染到View中。而后当用户操作视图我们还需要通过DOM获取View中的数据然后同步到Model中。而MVVM中的VM要做的事情就是把DOM操作完全封装起来开发人员不用再关心Model和View之间是如何互相影响的:</p>
<h2 id="2-vue的简介"><a href="#2-vue的简介" class="headerlink" title="2.vue的简介"></a>2.vue的简介</h2><p> Vue (发音为 &#x2F;vjuː&#x2F;,类似 <strong>view</strong>) 是一款用于构建用户界面的 JavaScript 框架。它基于标准 HTML、CSS 和 JavaScript 构建并提供了一套声明式的、组件化的编程模型帮助你高效地开发用户界面。无论是简单还是复杂的界面Vue 都可以胜任。</p>
<p><strong><a href="https://v2.cn.vuejs.org/">Vue2官方文档</a></strong></p>
<h2 id="3-语法基础"><a href="#3-语法基础" class="headerlink" title="3.语法基础"></a>3.语法基础</h2><h3 id="3-1-快速入门"><a href="#3-1-快速入门" class="headerlink" title="3.1 快速入门"></a>3.1 快速入门</h3><p>1.创建一个文件夹,用VSCode打开</p>
<p>2.下载vue的依赖</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">初始化项目</span></span><br><span class="line">npm init -y</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">安装vue的依赖这里vue2和vue3版本语法有些差别使用的时候要注意</span></span><br><span class="line">npm install vue@2 </span><br></pre></td></tr></table></figure>
<p>3.创建一个index.html文件</p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>Vue入门<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">&quot;app&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">h1</span>&gt;</span>&#123;&#123;name&#125;&#125;,是个傻子<span class="tag">&lt;/<span class="name">h1</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;./node_modules/vue/dist/vue.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//这里最新版的vue上面无法获取到name的值</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> vm = <span class="keyword">new</span> <span class="title class_">Vue</span>(&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">el</span>: <span class="string">&quot;#app&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">data</span>: &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">name</span>:<span class="string">&quot;张三&quot;</span></span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;);</span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="3-2-基本的语法和插件的安装"><a href="#3-2-基本的语法和插件的安装" class="headerlink" title="3.2 基本的语法和插件的安装"></a>3.2 基本的语法和插件的安装</h3><h4 id="3-2-1双向绑定v-model"><a href="#3-2-1双向绑定v-model" class="headerlink" title="3.2.1双向绑定v-model"></a>3.2.1双向绑定v-model</h4><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>Vue入门<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">&quot;app&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 双向绑定 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;text&quot;</span> <span class="attr">v-model</span>=<span class="string">&quot;num&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">h1</span>&gt;</span>&#123;&#123;name&#125;&#125;今年&#123;&#123;num&#125;&#125;岁了<span class="tag">&lt;/<span class="name">h1</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;./node_modules/vue/dist/vue.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//声明式渲染</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> vm = <span class="keyword">new</span> <span class="title class_">Vue</span>(&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">el</span>: <span class="string">&quot;#app&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">data</span>: &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">name</span>:<span class="string">&quot;张三&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">num</span>: <span class="number">1</span></span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;);</span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="3-2-2事件处理"><a href="#3-2-2事件处理" class="headerlink" title="3.2.2事件处理"></a>3.2.2事件处理</h4><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>Vue入门<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">&quot;app&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 双向绑定 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;text&quot;</span> <span class="attr">v-model</span>=<span class="string">&quot;num&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 点击事件绑定 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">button</span> <span class="attr">v-on:click</span>=<span class="string">&quot;num++&quot;</span>&gt;</span>点赞<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 取消点赞 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">button</span> <span class="attr">v-on:click</span>=<span class="string">&quot;cancle()&quot;</span>&gt;</span>取消点赞<span class="tag">&lt;/<span class="name">button</span>&gt;</span><span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">h1</span>&gt;</span>有&#123;&#123;num&#125;&#125;为&#123;&#123;name&#125;&#125;点赞!<span class="tag">&lt;/<span class="name">h1</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;./node_modules/vue/dist/vue.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//声明式渲染</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">let</span> vm = <span class="keyword">new</span> <span class="title class_">Vue</span>(&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">el</span>: <span class="string">&quot;#app&quot;</span>, <span class="comment">//绑定元素</span></span></span><br><span class="line"><span class="language-javascript"> <span class="attr">data</span>: &#123;<span class="comment">//封装数据</span></span></span><br><span class="line"><span class="language-javascript"> <span class="attr">name</span>:<span class="string">&quot;张三&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">num</span>: <span class="number">1</span></span></span><br><span class="line"><span class="language-javascript"> &#125;,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">methods</span>:&#123;<span class="comment">//封装方法</span></span></span><br><span class="line"><span class="language-javascript"> <span class="title function_">cancle</span>(<span class="params"></span>)&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">this</span>.<span class="property">num</span>--;</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;);</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//v-xx 相当于指令</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//总结</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//1.创建vue的实例关联页面的模板将自己的数据(data)渲染到关联的模板</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//2.使用指令简化对dom的操作 例如 v-XX</span></span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="3-2-3VUE代码提示插件和浏览器插件"><a href="#3-2-3VUE代码提示插件和浏览器插件" class="headerlink" title="3.2.3VUE代码提示插件和浏览器插件"></a>3.2.3VUE代码提示插件和浏览器插件</h4><p><strong><a href="https://wwvc.lanzouk.com/ibGDO0x9717i">浏览器插件地址</a></strong> 直接解压打开浏览器插件的开发者模式选择加载已解压的文件选择chrome目录即可</p>
<p><img src="/pictures/image-20230525192244158.png" alt="image-20230525192244158"></p>
<img src="/pictures/image-20230525191246045.png" alt="image-20230525191246045" style="zoom:200%;" />
<h4 id="3-2-4常用指令"><a href="#3-2-4常用指令" class="headerlink" title="3.2.4常用指令"></a>3.2.4常用指令</h4><h5 id="v-html-和-v-text"><a href="#v-html-和-v-text" class="headerlink" title="v-html 和 v-text"></a>v-html 和 v-text</h5><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>常用指令<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">&quot;app&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 1.显示类的指令 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 插值表达式会发生插值闪烁的问题,先显示&#123;&#123;msg&#125;&#125;后显示内容 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 打印的是&lt;h1&gt;Hello&lt;/h1&gt; --&gt;</span></span><br><span class="line"> &#123;&#123;msg&#125;&#125; <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> &#123;&#123;1+1&#125;&#125; <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> &#123;&#123;hello()&#125;&#125; <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">span</span> <span class="attr">v-text</span>=<span class="string">&quot;msg&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 直接显示h1的大标题 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">span</span> <span class="attr">v-html</span>=<span class="string">&quot;msg&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;./node_modules/vue/dist/vue.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">new</span> <span class="title class_">Vue</span>(&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">el</span>:<span class="string">&quot;#app&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">data</span>:&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">msg</span>:<span class="string">&quot;&lt;h1&gt;Hello&lt;/h1&gt;&quot;</span></span></span><br><span class="line"><span class="language-javascript"> &#125;,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">methods</span>: &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="title function_">hello</span>(<span class="params"></span>)&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> <span class="string">&quot;hello&quot;</span>;</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;,</span></span><br><span class="line"><span class="language-javascript"> &#125;)</span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h5 id="v-bind单向绑定"><a href="#v-bind单向绑定" class="headerlink" title="v-bind单向绑定"></a>v-bind单向绑定</h5><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>单向绑定<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span> = <span class="string">&quot;app&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 单向绑定 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">a</span> <span class="attr">v-bind:href</span>=<span class="string">&quot;link&quot;</span>&gt;</span>百度<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- class style也可以通过标签进行单向绑定 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">span</span> <span class="attr">v-bind:style</span>=<span class="string">&quot;&#123;color:color&#125;&quot;</span>&gt;</span>你好<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">span</span> <span class="attr">:style</span>=<span class="string">&quot;&#123;color:color&#125;&quot;</span>&gt;</span>使用缩写形式的单向绑定<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;./node_modules/vue/dist/vue.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">new</span> <span class="title class_">Vue</span>(&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">el</span>: <span class="string">&quot;#app&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">data</span>: &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">link</span>:<span class="string">&quot;http://www.baidu.com&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">color</span>: <span class="string">&#x27;green&#x27;</span></span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;)</span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h5 id="v-model-双向绑定"><a href="#v-model-双向绑定" class="headerlink" title="v-model 双向绑定"></a>v-model 双向绑定</h5><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>双向绑定<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span> = <span class="string">&quot;app&quot;</span>&gt;</span></span><br><span class="line"> 精通的语言:<span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;checkbox&quot;</span> <span class="attr">v-model</span>=<span class="string">&quot;language&quot;</span> <span class="attr">value</span>=<span class="string">&quot;java&quot;</span>&gt;</span>JAVA <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;checkbox&quot;</span> <span class="attr">v-model</span>=<span class="string">&quot;language&quot;</span> <span class="attr">value</span>=<span class="string">&quot;php&quot;</span>&gt;</span>PHP <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;checkbox&quot;</span> <span class="attr">v-model</span>=<span class="string">&quot;language&quot;</span> <span class="attr">value</span>=<span class="string">&quot;python&quot;</span>&gt;</span>Python <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> 选中了: &#123;&#123;language&#125;&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;./node_modules/vue/dist/vue.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">new</span> <span class="title class_">Vue</span>(&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">el</span>: <span class="string">&quot;#app&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">data</span>: &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">language</span>:[]</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;)</span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230526164858205.png" alt="image-20230526164858205"></p>
<h5 id="v-on-事件绑定"><a href="#v-on-事件绑定" class="headerlink" title="v-on 事件绑定"></a>v-on 事件绑定</h5><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>事件绑定<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">&quot;app&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 绑定一个单机事件 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">button</span> <span class="attr">v-on:click</span>=<span class="string">&quot;num++&quot;</span>&gt;</span>v-on:click的方式点赞<span class="tag">&lt;/<span class="name">button</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 简写的方式实现点赞 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">button</span> @<span class="attr">click</span>=<span class="string">&quot;num++&quot;</span>&gt;</span>@click的方式点赞<span class="tag">&lt;/<span class="name">button</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 点击事件指定一个回调函数 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">button</span> <span class="attr">v-on:click</span>=<span class="string">&quot;cancle()&quot;</span>&gt;</span>取消点赞<span class="tag">&lt;/<span class="name">button</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> 点赞的数量:&#123;&#123;num&#125;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;./node_modules/vue/dist/vue.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">new</span> <span class="title class_">Vue</span>(&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">el</span>: <span class="string">&quot;#app&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">data</span>: &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">num</span>: <span class="number">0</span></span></span><br><span class="line"><span class="language-javascript"> &#125;,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">methods</span>: &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="title function_">cancle</span>(<span class="params"></span>)&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">this</span>.<span class="property">num</span>--;</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;,</span></span><br><span class="line"><span class="language-javascript"> &#125;)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<img src="/pictures/image-20230526170222378.png" alt="image-20230526170222378" style="zoom:150%;" />
<h5 id="v-for-循环显示"><a href="#v-for-循环显示" class="headerlink" title="v-for 循环显示"></a>v-for 循环显示</h5><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>循环遍历<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">&quot;app&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">ul</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 1.遍历数组 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 可以使用v-for=&quot;user in users&quot;遍历用户信息 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 获取下标的信息加上一个index --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">li</span> <span class="attr">v-for</span>=<span class="string">&quot;(user,index) in users&quot;</span> <span class="attr">:key</span>=<span class="string">&quot;&quot;</span>&gt;</span></span><br><span class="line"> 序号:&#123;&#123;index+1&#125;&#125; <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> 姓名:&#123;&#123;user.name&#125;&#125; <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> 性别:&#123;&#123;user.gender&#125;&#125; <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> 年龄:&#123;&#123;user.age&#125;&#125; <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 2.遍历对象,获取每一个属性信息 --&gt;</span></span><br><span class="line"> 对象信息:</span><br><span class="line"> <span class="tag">&lt;<span class="name">span</span> <span class="attr">v-for</span>=<span class="string">&quot;(v,k,i) in user&quot;</span>&gt;</span>属性索引=&#123;&#123;i&#125;&#125;|属性名=&#123;&#123;k&#125;&#125;|属性值=&#123;&#123;v&#125;&#125;|<span class="tag">&lt;/<span class="name">span</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 遍历的时候加上 :key 提高渲染的效率 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- &lt;li v-for=&quot;(user,index) in users&quot; :key=&quot;&quot;&gt; --&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br><span class="line"> </span><br><span class="line"> <span class="comment">&lt;!-- 遍历数组 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">ul</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">li</span> <span class="attr">v-for</span>=<span class="string">&quot;(item,index) in nums&quot;</span> <span class="attr">::key</span>=<span class="string">&quot;index&quot;</span>&gt;</span></span><br><span class="line"> &#123;&#123;item&#125;&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;./node_modules/vue/dist/vue.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">new</span> <span class="title class_">Vue</span>(&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">el</span>: <span class="string">&quot;#app&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">data</span>: &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">users</span>: [</span></span><br><span class="line"><span class="language-javascript"> &#123; <span class="attr">name</span>: <span class="string">&quot;mary&quot;</span>, <span class="attr">gender</span>: <span class="string">&#x27;女&#x27;</span>, <span class="attr">age</span>: <span class="number">21</span> &#125;,</span></span><br><span class="line"><span class="language-javascript"> &#123; <span class="attr">name</span>: <span class="string">&quot;tom&quot;</span>, <span class="attr">gender</span>: <span class="string">&#x27;男&#x27;</span>, <span class="attr">age</span>: <span class="number">35</span> &#125;,</span></span><br><span class="line"><span class="language-javascript"> &#123; <span class="attr">name</span>: <span class="string">&quot;mike&quot;</span>, <span class="attr">gender</span>: <span class="string">&#x27;男&#x27;</span>, <span class="attr">age</span>: <span class="number">21</span> &#125;,</span></span><br><span class="line"><span class="language-javascript"> &#123; <span class="attr">name</span>: <span class="string">&quot;amy&quot;</span>, <span class="attr">gender</span>: <span class="string">&#x27;女&#x27;</span>, <span class="attr">age</span>: <span class="number">64</span> &#125;</span></span><br><span class="line"><span class="language-javascript"> ],</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">nums</span>:[<span class="number">1</span>,<span class="number">2</span>,<span class="number">3</span>,<span class="number">4</span>,<span class="number">5</span>,<span class="number">6</span>,<span class="number">7</span>,<span class="number">8</span>,<span class="number">9</span>,<span class="number">10</span>,<span class="number">11</span>]</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230526172228532.png" alt="image-20230526172228532"></p>
<h5 id="v-if-和-v-show"><a href="#v-if-和-v-show" class="headerlink" title="v-if 和 v-show"></a>v-if 和 v-show</h5><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>判断<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- v-if 条件判断,当结果为true时,所有的元素才会被渲染 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- v-show 当得到的结果为true时,所有的元素才会被显示 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">&quot;app&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">button</span> <span class="attr">v-on:click</span>=<span class="string">&quot;show = !show&quot;</span>&gt;</span>点击显示与否<span class="tag">&lt;/<span class="name">button</span>&gt;</span><span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 1.使用v-if显示 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">h1</span> <span class="attr">v-if</span>=<span class="string">&quot;show&quot;</span>&gt;</span>if=看到我...<span class="tag">&lt;/<span class="name">h1</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 2.使用v-show显示 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">h1</span> <span class="attr">v-show</span>=<span class="string">&quot;show&quot;</span>&gt;</span>show=显示...<span class="tag">&lt;/<span class="name">h1</span>&gt;</span><span class="tag">&lt;/<span class="name">h1</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 多重判断 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- v-if、v-else-if、v-else --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 循环的时候也可以加上判断 --&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;./node_modules/vue/dist/vue.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">new</span> <span class="title class_">Vue</span>(&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">el</span>: <span class="string">&quot;#app&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">data</span>: &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">show</span>:<span class="literal">true</span></span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="3-2-5-计算属性和侦听器"><a href="#3-2-5-计算属性和侦听器" class="headerlink" title="3.2.5 计算属性和侦听器"></a>3.2.5 计算属性和侦听器</h4><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>计算属性和侦听器<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">&quot;app&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 计算属性 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">ul</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">li</span>&gt;</span>西游记;价格:&#123;&#123;xyjPrice&#125;&#125;,数量:<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;number&quot;</span> <span class="attr">v-model</span>=<span class="string">&quot;xyjNum&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">li</span>&gt;</span>水浒传;价格:&#123;&#123;shzPrice&#125;&#125;,数量:<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;number&quot;</span> <span class="attr">v-model</span>=<span class="string">&quot;shzNum&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">li</span>&gt;</span>总价:&#123;&#123;totalPrice&#125;&#125;<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"> &#123;&#123;msg&#125;&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 侦听器,监听属性值的变化 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;./node_modules/vue/dist/vue.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">new</span> <span class="title class_">Vue</span>(&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">el</span>: <span class="string">&quot;#app&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">data</span>: &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">xyjPrice</span>: <span class="number">99.98</span>, <span class="comment">//西游记价格</span></span></span><br><span class="line"><span class="language-javascript"> <span class="attr">shzPrice</span>: <span class="number">99.00</span>, <span class="comment">//水浒传价格</span></span></span><br><span class="line"><span class="language-javascript"> <span class="attr">xyjNum</span>: <span class="number">0</span>, <span class="comment">//西游记的数量</span></span></span><br><span class="line"><span class="language-javascript"> <span class="attr">shzNum</span>: <span class="number">0</span>, <span class="comment">//水浒传的数量</span></span></span><br><span class="line"><span class="language-javascript"> <span class="attr">msg</span>: <span class="string">&quot;&quot;</span> <span class="comment">//提示的消息</span></span></span><br><span class="line"><span class="language-javascript"> &#125;,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">computed</span>: &#123;<span class="comment">//计算属性</span></span></span><br><span class="line"><span class="language-javascript"> <span class="title function_">totalPrice</span>(<span class="params"></span>) &#123;<span class="comment">//计算总价</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> <span class="variable language_">this</span>.<span class="property">xyjPrice</span> * <span class="variable language_">this</span>.<span class="property">xyjNum</span> + <span class="variable language_">this</span>.<span class="property">shzPrice</span> * <span class="variable language_">this</span>.<span class="property">shzNum</span></span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">watch</span>: &#123;<span class="comment">//监听器</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//newVal新值</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//oldVal旧值</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//下面的这个方法是监听当购买的数量超出了3就提示超库存了并把输入框的值设置为最大的3</span></span></span><br><span class="line"><span class="language-javascript"> <span class="attr">xyjNum</span>: <span class="keyword">function</span> (<span class="params">newVal, oldVal</span>) &#123;<span class="comment">//监听西游记数量的变化</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&quot;newVal:&quot;</span> + newVal + <span class="string">&quot; | &quot;</span> + <span class="string">&quot;oldVal:&quot;</span> + oldVal)</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">if</span> (newVal &gt;= <span class="number">3</span>) &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">this</span>.<span class="property">msg</span> = <span class="string">&quot;库存超出了限制&quot;</span></span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">this</span>.<span class="property">xyjNum</span> = <span class="number">3</span></span></span><br><span class="line"><span class="language-javascript"> &#125; <span class="keyword">else</span> &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="variable language_">this</span>.<span class="property">msg</span> = <span class="string">&quot;&quot;</span></span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> &#125;)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="3-2-6-过滤器"><a href="#3-2-6-过滤器" class="headerlink" title="3.2.6 过滤器"></a>3.2.6 过滤器</h4><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>过滤器<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">&quot;app&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 过滤器常用来处理文本格式化的操作过滤器可以用在两个地方插值表达式和v-bind表达式 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">ul</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">li</span> <span class="attr">v-for</span>=<span class="string">&quot;user in userList&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 显示性别的时候不用代号显示,使用男女显示 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 方式一:通过三元运算符的形式显示 --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 姓名:&#123;&#123;user.name&#125;&#125; | 性别:&#123;&#123;user.gender== 1?&quot;男&quot;:&quot;女&quot;&#125;&#125; --&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 方式二:使用过滤器的方式 其中 | 是管道符 genderFilter是过滤器 --&gt;</span></span><br><span class="line"> 姓名:&#123;&#123;user.name&#125;&#125; | 性别:&#123;&#123;user.gender | genderFilter&#125;&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;./node_modules/vue/dist/vue.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="title class_">Vue</span>.<span class="title function_">filter</span>(<span class="string">&quot;gFilter&quot;</span>, <span class="keyword">function</span> (<span class="params">val</span>) &#123;<span class="comment">//全局过滤器</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">if</span> (val == <span class="number">1</span>) &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> <span class="string">&quot;男··&quot;</span></span></span><br><span class="line"><span class="language-javascript"> &#125; <span class="keyword">else</span> &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> <span class="string">&quot;女··&quot;</span></span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">new</span> <span class="title class_">Vue</span>(&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">el</span>: <span class="string">&quot;#app&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">data</span>: &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">userList</span>: [</span></span><br><span class="line"><span class="language-javascript"> &#123; <span class="attr">id</span>: <span class="number">1</span>, <span class="attr">name</span>: <span class="string">&quot;jacky&quot;</span>, <span class="attr">gender</span>: <span class="number">1</span> &#125;,</span></span><br><span class="line"><span class="language-javascript"> &#123; <span class="attr">id</span>: <span class="number">2</span>, <span class="attr">name</span>: <span class="string">&quot;peter&quot;</span>, <span class="attr">gender</span>: <span class="number">0</span> &#125;,</span></span><br><span class="line"><span class="language-javascript"> ]</span></span><br><span class="line"><span class="language-javascript"> &#125;,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">filters</span>: &#123;<span class="comment">//局部的过滤器</span></span></span><br><span class="line"><span class="language-javascript"> <span class="title function_">genderFilter</span>(<span class="params">val</span>) &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">if</span> (val == <span class="number">1</span>) &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> <span class="string">&quot;男&quot;</span></span></span><br><span class="line"><span class="language-javascript"> &#125; <span class="keyword">else</span> &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> <span class="string">&quot;女&quot;</span></span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="3-3-组件化"><a href="#3-3-组件化" class="headerlink" title="3.3 组件化"></a>3.3 组件化</h3><p> 在大型应用开发的时候,页面可以划分成很多部分。往往不同的页面,也会有相同的部分。例如可能会有相同的头部导航。但是每个页面都都独自开发,这无疑增加了开发的成本。所以我们会把页面的不同部分拆分成独立的组件,然后在不同的页面就可以共享这些组件,避免重复开发。</p>
<img src="/pictures/image-20230527215736955.png" alt="image-20230527215736955" style="zoom:150%;" />
<h4 id="3-3-1-全局组件"><a href="#3-3-1-全局组件" class="headerlink" title="3.3.1 全局组件"></a>3.3.1 全局组件</h4><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>组件化<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">&quot;app&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">button</span> @<span class="attr">click</span>=<span class="string">&quot;count++&quot;</span>&gt;</span>我被点击了&#123;&#123;count&#125;&#125;次<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- 组件的使用 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">counter</span>&gt;</span><span class="tag">&lt;/<span class="name">counter</span>&gt;</span></span><br><span class="line"> </span><br><span class="line"> <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;./node_modules/vue/dist/vue.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//1.全局声明一个组件</span></span></span><br><span class="line"><span class="language-javascript"> <span class="title class_">Vue</span>.<span class="title function_">component</span>(<span class="string">&quot;counter&quot;</span>, &#123;<span class="comment">//counter是组件的名称可以随便起名见名知意就行</span></span></span><br><span class="line"><span class="language-javascript"> <span class="attr">template</span>: <span class="string">`&lt;button @click=&quot;count++&quot;&gt;我被点击了&#123;&#123;count&#125;&#125;次&lt;/button&gt;`</span>,<span class="comment">//模板</span></span></span><br><span class="line"><span class="language-javascript"> <span class="title function_">data</span>(<span class="params"></span>) &#123; <span class="comment">//模板中的属性信息这里的data必须是一个函数</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">count</span>: <span class="number">1</span></span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;);</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">new</span> <span class="title class_">Vue</span>(&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">el</span>: <span class="string">&quot;#app&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">data</span>: &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">count</span>: <span class="number">0</span></span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<img src="/pictures/image-20230527220905922.png" alt="image-20230527220905922" style="zoom:150%;" />
<h4 id="3-3-2-局部组件"><a href="#3-3-2-局部组件" class="headerlink" title="3.3.2 局部组件"></a>3.3.2 局部组件</h4><figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>组件化<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">&quot;app&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">button</span> @<span class="attr">click</span>=<span class="string">&quot;count++&quot;</span>&gt;</span>我被点击了&#123;&#123;count&#125;&#125;次<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- 局部组件的使用 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">button-counter</span>&gt;</span><span class="tag">&lt;/<span class="name">button-counter</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;./node_modules/vue/dist/vue.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//声明一个局部的组件</span></span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">const</span> buttonCounter = &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">template</span>: <span class="string">`&lt;button @click=&quot;count++&quot;&gt;我被点击了&#123;&#123;count&#125;&#125;次&lt;/button&gt;`</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="title function_">data</span>(<span class="params"></span>) &#123; </span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">return</span> &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">count</span>: <span class="number">1</span></span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> <span class="keyword">new</span> <span class="title class_">Vue</span>(&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">el</span>: <span class="string">&quot;#app&quot;</span>,</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">data</span>: &#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="attr">count</span>: <span class="number">0</span></span></span><br><span class="line"><span class="language-javascript"> &#125;,</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//声明一个局部的组件</span></span></span><br><span class="line"><span class="language-javascript"> <span class="attr">components</span>:&#123;</span></span><br><span class="line"><span class="language-javascript"> <span class="string">&#x27;button-counter&#x27;</span>:buttonCounter</span></span><br><span class="line"><span class="language-javascript"> &#125;</span></span><br><span class="line"><span class="language-javascript"> &#125;)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript"> </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="3-3-生命周期和钩子函数"><a href="#3-3-生命周期和钩子函数" class="headerlink" title="3.3 生命周期和钩子函数"></a>3.3 生命周期和钩子函数</h3><p><strong>生命周期图</strong></p>
<p><img src="/pictures/image-20230527221756442.png" alt="image-20230527221756442"></p>
<h3 id="3-4-Vue模块化开发"><a href="#3-4-Vue模块化开发" class="headerlink" title="3.4 Vue模块化开发"></a>3.4 Vue模块化开发</h3><p><strong>1.全局安装webpack</strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">npm install webpack -g</span><br></pre></td></tr></table></figure>
<p><strong>2.全局安装vue脚手架</strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">npm install -g @vue/cli-init</span><br></pre></td></tr></table></figure>
<p><strong>3.初始化vue的项目</strong></p>
<p>创建一个文件夹打开cmd切换到这个文件夹执行以下的命令</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">vue脚手架使用webpacke模板初始化一个项目</span></span><br><span class="line">vue init webpack 项目名称 </span><br></pre></td></tr></table></figure>
<p><strong>4.启动vue的项目</strong></p>
<p>项目中的package.json中有scripts代表我们能运行的命令</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">启动项目</span></span><br><span class="line">npm start </span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">或者</span></span><br><span class="line">npm run dev </span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">将项目打包</span></span><br><span class="line">npm run build </span><br></pre></td></tr></table></figure>
<h2 id="4-Eelment-UI"><a href="#4-Eelment-UI" class="headerlink" title="4.Eelment-UI"></a>4.Eelment-UI</h2><p><strong>官方文档:<a href="https://element.eleme.cn/#/zh-CN/component/quickstart">https://element.eleme.cn/#/zh-CN/component/quickstart</a></strong></p>
]]></content>
<categories>
<category>前端</category>
</categories>
<tags>
<tag>前端</tag>
</tags>
</entry>
<entry>
<title>力扣(LeetCode)算法刷题</title>
<url>/posts/13579.html</url>
<content><![CDATA[<p><strong>刷题网站:</strong> <a href="https://leetcode.cn/problemset/all/">力扣</a> <strong>视频:</strong> <a href="https://www.acwing.com/activity/">AcWing</a></p>
<h2 id="一-数组"><a href="#一-数组" class="headerlink" title="一.数组"></a>一.数组</h2><h3 id="A-简单"><a href="#A-简单" class="headerlink" title="A.简单"></a>A.简单</h3><h4 id="1-两数之和"><a href="#1-两数之和" class="headerlink" title="1.两数之和"></a>1.两数之和</h4><p>给定一个整数数组 <code>nums</code> 和一个整数目标值 <code>target</code>,请你在该数组中找出 <strong>和为目标值</strong> <em><code>target</code></em> 的那 <strong>两个</strong> 整数,并返回它们的数组下标。你可以假设每种输入只会对应一个答案。但是,数组中同一个元素在答案里不能重复出现。你可以按任意顺序返回答案。</p>
<p><strong>示例 1</strong></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">输入nums = [2,7,11,15], target = 9</span><br><span class="line">输出:[0,1]</span><br><span class="line">解释:因为 nums[0] + nums[1] == 9 ,返回 [0, 1] 。</span><br></pre></td></tr></table></figure>
<p><strong>示例 2</strong></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">输入nums = [3,2,4], target = 6</span><br><span class="line">输出:[1,2]</span><br></pre></td></tr></table></figure>
<p><strong>示例 3</strong></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">输入nums = [3,3], target = 6</span><br><span class="line">输出:[0,1]</span><br></pre></td></tr></table></figure>
<p><strong>提示:</strong></p>
<ul>
<li><code>2 &lt;= nums.length &lt;= 104</code></li>
<li><code>-109 &lt;= nums[i] &lt;= 109</code></li>
<li><code>-109 &lt;= target &lt;= 109</code></li>
<li><strong>只会存在一个有效答案</strong></li>
</ul>
<p><strong>代码实现</strong></p>
<p>自己的代码 暴力枚举</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">class</span> <span class="title class_">Solution</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span>[] twoSum(<span class="type">int</span>[] nums, <span class="type">int</span> target) &#123;</span><br><span class="line"> <span class="type">int</span>[] result = <span class="keyword">new</span> <span class="title class_">int</span>[<span class="number">2</span>];</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; nums.length; i++) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">j</span> <span class="operator">=</span> <span class="number">0</span>; j &lt; nums.length; j++) &#123;</span><br><span class="line"> <span class="keyword">if</span> (nums[i] + nums[j] == target &amp;&amp; i != j) &#123;</span><br><span class="line"> result[<span class="number">0</span>] = i;</span><br><span class="line"> result[<span class="number">1</span>] = j;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> result;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="2-删除有序数组中的重复项"><a href="#2-删除有序数组中的重复项" class="headerlink" title="2.删除有序数组中的重复项"></a>2.删除有序数组中的重复项</h4><p>给你一个 <strong>升序排列</strong> 的数组 <code>nums</code> ,请你**<a href="http://baike.baidu.com/item/%E5%8E%9F%E5%9C%B0%E7%AE%97%E6%B3%95"> 原地</a>** 删除重复出现的元素,使每个元素 <strong>只出现一次</strong> ,返回删除后数组的新长度。元素的 <strong>相对顺序</strong> 应该保持 <strong>一致</strong> 。然后返回 <code>nums</code> 中唯一元素的个数。</p>
<p>考虑 <code>nums</code> 的唯一元素的数量为 <code>k</code> ,你需要做以下事情确保你的题解可以被通过:</p>
<ul>
<li>更改数组 <code>nums</code> ,使 <code>nums</code> 的前 <code>k</code> 个元素包含唯一元素,并按照它们最初在 <code>nums</code> 中出现的顺序排列。<code>nums</code> 的其余元素与 <code>nums</code> 的大小不重要。</li>
<li>返回 <code>k</code> 。</li>
</ul>
<p><strong>判题标准:</strong></p>
<p>系统会用下面的代码来测试你的题解:</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">int[] nums = [...]; // 输入数组</span><br><span class="line">int[] expectedNums = [...]; // 长度正确的期望答案</span><br><span class="line"></span><br><span class="line">int k = removeDuplicates(nums); // 调用</span><br><span class="line"></span><br><span class="line">assert k == expectedNums.length;</span><br><span class="line">for (int i = 0; i &lt; k; i++) &#123;</span><br><span class="line"> assert nums[i] == expectedNums[i];</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>如果所有断言都通过,那么您的题解将被 <strong>通过</strong>。</p>
<p><strong>示例 1</strong></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">输入nums = [1,1,2]</span><br><span class="line">输出2, nums = [1,2,_]</span><br><span class="line">解释:函数应该返回新的长度 2 ,并且原数组 nums 的前两个元素被修改为 1, 2 。不需要考虑数组中超出新长度后面的元素。</span><br></pre></td></tr></table></figure>
<p><strong>示例 2</strong></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">输入nums = [0,0,1,1,1,2,2,3,3,4]</span><br><span class="line">输出5, nums = [0,1,2,3,4]</span><br><span class="line">解释:函数应该返回新的长度 5 并且原数组 nums 的前五个元素被修改为 0, 1, 2, 3, 4 。不需要考虑数组中超出新长度后面的元素。</span><br></pre></td></tr></table></figure>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= nums.length &lt;= 3 * 104</code></li>
<li><code>-104 &lt;= nums[i] &lt;= 104</code></li>
<li><code>nums</code> 已按 <strong>升序</strong> 排列</li>
</ul>
<p><strong>代码实现</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.leetcode.array;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Arrays;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/16</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 删除有序数组中的重复项</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">RemoveDuplicates</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">RemoveDuplicates</span> <span class="variable">removeDuplicates</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">RemoveDuplicates</span>();</span><br><span class="line"> <span class="type">int</span>[] arr = &#123;<span class="number">0</span>,<span class="number">0</span>,<span class="number">1</span>,<span class="number">1</span>,<span class="number">1</span>,<span class="number">2</span>,<span class="number">2</span>,<span class="number">3</span>,<span class="number">3</span>,<span class="number">4</span>&#125;;</span><br><span class="line"> System.out.println(removeDuplicates.removeDuplicates(arr));</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 数组去重</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">removeDuplicates</span><span class="params">(<span class="type">int</span>[] nums)</span> &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">n</span> <span class="operator">=</span> nums.length;<span class="comment">//获取数组长度</span></span><br><span class="line"> <span class="keyword">if</span> (n == <span class="number">0</span>) &#123; <span class="comment">//数组的长度是零就直接的退出</span></span><br><span class="line"> <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">int</span> <span class="variable">fast</span> <span class="operator">=</span> <span class="number">1</span>, slow = <span class="number">1</span>; <span class="comment">//定义两个快慢指针</span></span><br><span class="line"> <span class="keyword">while</span> (fast &lt; n) &#123;</span><br><span class="line"> <span class="comment">//如果后面一个数和前面的那个数相同 慢指针不动 快指针动</span></span><br><span class="line"> <span class="comment">//然后下一次判断的时候 慢指针就别快指针慢了一次 再将慢指针指向快指针</span></span><br><span class="line"> <span class="comment">//相同的数就后移了</span></span><br><span class="line"> <span class="keyword">if</span> (nums[fast] != nums[fast - <span class="number">1</span>]) &#123;</span><br><span class="line"> nums[slow] = nums[fast];</span><br><span class="line"> ++slow;</span><br><span class="line"> &#125;</span><br><span class="line"> ++fast;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> slow;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="3-移除元素"><a href="#3-移除元素" class="headerlink" title="3.移除元素"></a>3.移除元素</h4><p>给你一个数组 <code>nums</code> 和一个值 <code>val</code>,你需要 <strong><a href="https://baike.baidu.com/item/%E5%8E%9F%E5%9C%B0%E7%AE%97%E6%B3%95">原地</a></strong> 移除所有数值等于 <code>val</code> 的元素,并返回移除后数组的新长度。</p>
<p>不要使用额外的数组空间,你必须仅使用 <code>O(1)</code> 额外空间并 <strong><a href="https://baike.baidu.com/item/%E5%8E%9F%E5%9C%B0%E7%AE%97%E6%B3%95">原地 </a>修改输入数组</strong>。</p>
<p>元素的顺序可以改变。你不需要考虑数组中超出新长度后面的元素。</p>
<p><strong>说明:</strong></p>
<p>为什么返回数值是整数,但输出的答案是数组呢?</p>
<p>请注意,输入数组是以<strong>「引用」</strong>方式传递的,这意味着在函数里修改输入数组对于调用者是可见的。</p>
<p>你可以想象内部操作如下:</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">// nums 是以“引用”方式传递的。也就是说,不对实参作任何拷贝</span><br><span class="line">int len = removeElement(nums, val);</span><br><span class="line"></span><br><span class="line">// 在函数里修改输入数组对于调用者是可见的。</span><br><span class="line">// 根据你的函数返回的长度, 它会打印出数组中 该长度范围内 的所有元素。</span><br><span class="line">for (int i = 0; i &lt; len; i++) &#123;</span><br><span class="line"> print(nums[i]);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>示例 1</strong></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">输入nums = [3,2,2,3], val = 3</span><br><span class="line">输出2, nums = [2,2]</span><br><span class="line">解释:函数应该返回新的长度 2, 并且 nums 中的前两个元素均为 2。你不需要考虑数组中超出新长度后面的元素。例如函数返回的新长度为 2 ,而 nums = [2,2,3,3] 或 nums = [2,2,0,0],也会被视作正确答案。</span><br></pre></td></tr></table></figure>
<p><strong>示例 2</strong></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">输入nums = [0,1,2,2,3,0,4,2], val = 2</span><br><span class="line">输出5, nums = [0,1,4,0,3]</span><br><span class="line">解释:函数应该返回新的长度 5, 并且 nums 中的前五个元素为 0, 1, 3, 0, 4。注意这五个元素可为任意顺序。你不需要考虑数组中超出新长度后面的元素。</span><br></pre></td></tr></table></figure>
<p><strong>提示:</strong></p>
<ul>
<li><code>0 &lt;= nums.length &lt;= 100</code></li>
<li><code>0 &lt;= nums[i] &lt;= 50</code></li>
<li><code>0 &lt;= val &lt;= 100</code></li>
</ul>
<p><strong>代码实现</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"></span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>数据结构与算法</tag>
</tags>
</entry>
<entry>
<title>压力测试与性能监控</title>
<url>/posts/1416.html</url>
<content><![CDATA[<h2 id="一-压力测试"><a href="#一-压力测试" class="headerlink" title="一.压力测试"></a>一.压力测试</h2><p><strong>性能指标</strong></p>
<ul>
<li><p>响应时间Response Time: RT响应时间指用户从客户端发起一个请求开始到客户端接收到从服务器端返回的响应结束整个过程所耗费的时间。</p>
</li>
<li><p>HPSHits Per Second :每秒点击次数,单位是次&#x2F;秒。</p>
</li>
<li><p>TPSTransaction per Second系统每秒处理交易数单位是笔&#x2F;秒。</p>
</li>
<li><p>QPSQuery per Second系统每秒处理查询次数单位是次&#x2F;秒。对于互联网业务中,如果某些业务有且仅有一个请求连接,那么 TPS&#x3D;QPS&#x3D;HPS一般情况下用 TPS 来衡量整个业务流程,用 QPS 来衡量接口查询次数,用 HPS 来表示对服务器单击请求。</p>
</li>
<li><p>无论 TPS、QPS、HPS,此指标是衡量系统处理能力非常重要的指标,越大越好,根据经验,一般情况下:</p>
<p>金融行业1000TPS~50000TPS不包括互联网化的活动</p>
<p>保险行业100TPS~100000TPS不包括互联网化的活动</p>
<p>制造行业10TPS~5000TPS</p>
<p>互联网电子商务10000TPS~1000000TPS</p>
<p>互联网中型网站1000TPS~50000TPS</p>
<p>互联网小型网站500TPS~10000TPS</p>
</li>
<li><p>最大响应时间Max Response Time 指用户发出请求或者指令到系统做出反应(响应)的最大时间。</p>
</li>
<li><p>最少响应时间Mininum ResponseTime 指用户发出请求或者指令到系统做出反应(响应)的最少时间。</p>
</li>
<li><p>90%响应时间90% Response Time 是指所有用户的响应时间进行排序,第 90%的响应时间。</p>
</li>
<li><p>从外部看,性能测试主要关注如下三个指标</p>
<p>吞吐量:每秒钟系统能够处理的请求数、任务数。</p>
<p>响应时间:服务处理一个请求或一个任务的耗时。</p>
<p>错误率:一批请求中结果出错的请求所占比例。</p>
</li>
</ul>
<h3 id="1-JMeter的使用"><a href="#1-JMeter的使用" class="headerlink" title="1.JMeter的使用"></a>1.JMeter的使用</h3><h4 id="1-1-安装"><a href="#1-1-安装" class="headerlink" title="1.1 安装"></a>1.1 安装</h4><p><strong>1.下载安装包</strong></p>
<p>安装网址: <a href="https://jmeter.apache.org/download_jmeter.cgi">https://jmeter.apache.org/download_jmeter.cgi</a></p>
<p><img src="/pictures/image-20230709161151542.png" alt="image-20230709161151542"></p>
<p><strong>2.解压并双击运行</strong></p>
<p><img src="/pictures/image-20230709161346717.png" alt="image-20230709161346717"></p>
<p><img src="/pictures/image-20230709161600398.png" alt="image-20230709161600398"></p>
<h4 id="1-2-设置"><a href="#1-2-设置" class="headerlink" title="1.2 设置"></a>1.2 设置</h4><p>设置为中文页面</p>
<p>点击Options-&gt;Language-&gt;选择简体中文</p>
<p><img src="/pictures/image-20230709161752103.png" alt="image-20230709161752103"></p>
<p>永久设置成中文-&gt;在<code>bin\jmeter.properties</code>配置文件中添加如下配置</p>
<p><img src="/pictures/image-20240105214825445.png" alt="image-20240105214825445"></p>
<p>jmeter发送请求响应的数据乱码的问题-&gt;在<code>bin\jmeter.properties</code>配置文件中添加如下配置</p>
<p><img src="/pictures/image-20240105215115275.png" alt="image-20240105215115275"></p>
<h4 id="1-3-压测示例"><a href="#1-3-压测示例" class="headerlink" title="1.3 压测示例"></a>1.3 压测示例</h4><p><strong>1.新建线程组</strong></p>
<p>右键点击测试计划-&gt;添加-&gt;线程-&gt;线程组</p>
<p><img src="/pictures/image-20230709162502383.png" alt="image-20230709162502383"></p>
<p>线程组参数详解:</p>
<ul>
<li><p>线程数:虚拟用户数。一个虚拟用户占用一个进程或线程。设置多少虚拟用户数在这里也就是设置多少个线程数。</p>
</li>
<li><p>线程数:虚拟用户数。一个虚拟用户占用一个进程或线程。设置多少虚拟用户数在这里也就是设置多少个线程数。</p>
</li>
<li><p>Ramp-Up Period(in seconds)准备时长:设置的虚拟用户数需要多长时间全部启动。如果线程数为 10准备时长为 2那么需要 2 秒钟启动10个线程也就是每秒钟启动 5 个线程。</p>
</li>
<li><p>循环次数:每个线程发送请求的次数。如果线程数为 10循环次数为 100那么每个线程发送 100 次请求。总请求数为 10*100&#x3D;1000 。如勾选了“永远”,那么所有线程会一直发送请求,一到选择停止运行脚本。</p>
</li>
<li><p>Delay Thread creation until needed直到需要时延迟线程的创建。</p>
</li>
<li><p>调度器:设置线程组启动的开始时间和结束时间(配置调度器时,需要勾选循环次数为永远)</p>
</li>
<li><p>持续时间(秒):测试持续时间,会覆盖结束时间</p>
</li>
<li><p>启动延迟(秒):测试延迟启动时间,会覆盖启动时间</p>
</li>
<li><p>启动时间:测试启动时间,启动延迟会覆盖它。当启动时间已过,手动只需测试时当前时间也会覆盖它。</p>
</li>
<li><p>结束时间:测试结束时间,持续时间会覆盖它。</p>
</li>
</ul>
<p><strong>2.添加HTTP请求</strong></p>
<p><img src="/pictures/image-20230709163303477.png" alt="image-20230709163303477"></p>
<p><img src="/pictures/image-20230709163457833.png" alt="image-20230709163457833"></p>
<p><strong>3.添加监听器</strong></p>
<p><img src="/pictures/image-20230709163639856.png" alt="image-20230709163639856"></p>
<p><strong>4.启动压测和查看分析结果</strong></p>
<p><img src="/pictures/image-20230709164012746.png" alt="image-20230709164012746"></p>
<p><img src="/pictures/image-20230709164208747.png" alt="image-20230709164208747"></p>
<h4 id="1-4-JMeter-Address-Already-in-use-错误解决"><a href="#1-4-JMeter-Address-Already-in-use-错误解决" class="headerlink" title="1.4 JMeter Address Already in use 错误解决"></a>1.4 JMeter Address Already in use 错误解决</h4><p>windows 本身提供的端口访问机制的问题。<br>Windows 提供给 TCP&#x2F;IP 链接的端口为 1024-5000并且要四分钟来循环回收他们。就导致<br>我们在短时间内跑大量的请求时将端口占满了。<br>1.cmd 中,用 regedit 命令打开注册表</p>
<p>2.在 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters 下,<br>右击 parameters添加一个新的 DWORD名字为 MaxUserPort然后双击 MaxUserPort输入数值数据为 65534基数选择十进制如果是分布式运行的话控制机器和负载机器都需要这样操作</p>
<p>3.修改配置完毕之后记得重启机器才会生效<br>官网解释:<a href="https://support.microsoft.com/zh-cn/help/196271/when-you-try-to-connect-from-tcp-ports-greater-than-5000-you-receive-t">https://support.microsoft.com/zh-cn/help/196271/when-you-try-to-connect-from-tcp-ports-greater-than-5000-you-receive-t</a><br>TCPTimedWaitDelay30</p>
<h2 id="二-性能监控"><a href="#二-性能监控" class="headerlink" title="二.性能监控"></a>二.性能监控</h2><p>Jdk 的两个小工具 jconsole、jvisualvm升级版的 jconsole;通过命令行启动,可监控本地和远程应用。</p>
<h3 id="1-jconsole"><a href="#1-jconsole" class="headerlink" title="1.jconsole"></a>1.jconsole</h3><p><img src="/pictures/image-20230709160343565.png" alt="image-20230709160343565"></p>
<h3 id="2-jvisualvm"><a href="#2-jvisualvm" class="headerlink" title="2.jvisualvm"></a><strong>2.jvisualvm</strong></h3><p><strong>jvisualvm相比jconsole功能更全一般使用jvisualvm</strong></p>
<p><img src="/pictures/image-20230709160552461.png" alt="image-20230709160552461"></p>
<p><strong>Visual GC插件的安装</strong></p>
<p>点击工具-&gt;插件-&gt;在可用插件中选择Visual GC安装</p>
<p>安装成功之后显示如下</p>
<p><img src="/pictures/image-20230709160932416.png" alt="image-20230709160932416"></p>
<p><img src="/pictures/image-20230709170626946.png" alt="image-20230709170626946"></p>
]]></content>
<categories>
<category>测试</category>
</categories>
<tags>
<tag>测试</tag>
</tags>
</entry>
<entry>
<title>常用的DOS命令</title>
<url>/posts/51007.html</url>
<content><![CDATA[<h3 id="1-一些基础的DOS命令"><a href="#1-一些基础的DOS命令" class="headerlink" title="1.一些基础的DOS命令"></a>1.一些基础的DOS命令</h3><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">c:\javacode&gt;dir //查看C盘javacode目录下有那些文件</span><br></pre></td></tr></table></figure>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">c:\javacode&gt;cd /D d: //从C盘切换到D盘</span><br></pre></td></tr></table></figure>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">c:\javacode&gt;help cd //解释cd是怎么使用的</span><br></pre></td></tr></table></figure>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">c:\javacode&gt;cd .. //切换到上一级目录</span><br></pre></td></tr></table></figure>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">c:\javacode&gt;cd \ //切换到根目录</span><br></pre></td></tr></table></figure>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">C:\tree c:\javacode //查看C盘下的子目录javacode下面的所有子目录,形成一个目录树</span><br></pre></td></tr></table></figure>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&gt;cls //清空所有内容,清屏</span><br><span class="line">&gt;exit //退出控制台</span><br><span class="line">md[创建目录],rd[删除目录],copy[拷贝文件],del[删除文件],echo[输入内容到文件],type,move[剪切] </span><br><span class="line">&gt;echo ok &gt;pic.txt //创建pic.txt并把ok输入到pic.txt中</span><br><span class="line">&gt;echo nul &gt;pic.txt //创建一个空文件pic.txt</span><br><span class="line">&gt;copy ok.txt d:\ok.txt //把ok.txt从当前路径拷贝到D盘下面,可以更改第二个ok.txt的文件名</span><br><span class="line">&gt;move ok.txt d:\ok.txt //把ok.txt剪切到D盘下面</span><br></pre></td></tr></table></figure>
<h3 id="2-网络编程相关的DOS命令"><a href="#2-网络编程相关的DOS命令" class="headerlink" title="2.网络编程相关的DOS命令"></a>2.网络编程相关的DOS命令</h3><figure class="highlight dos"><table><tr><td class="code"><pre><span class="line">//获取IP相关的信息</span><br><span class="line">&gt;<span class="built_in">ipconfig</span></span><br><span class="line">//端口监听和网络监听情况</span><br><span class="line">&gt;netstat -an</span><br><span class="line">&gt;netstat -an | <span class="built_in">more</span>//分页显示</span><br><span class="line">&gt;netstat -anb</span><br><span class="line">//<span class="built_in">ping</span>命令,查看网络是否连通</span><br><span class="line">&gt;<span class="built_in">ping</span> IP地址或者域名</span><br></pre></td></tr></table></figure>
<h3 id="3-MySql的相关DOS命令"><a href="#3-MySql的相关DOS命令" class="headerlink" title="3.MySql的相关DOS命令"></a>3.MySql的相关DOS命令</h3><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">//开启MySQL和关闭MySQL服务</span><br><span class="line">&gt;net start mysql //开</span><br><span class="line">&gt;new stop mysql //关</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">//登录mysql的命令</span><br><span class="line">&gt;mysql -u 用户名 -p密码 //密码可以先不输入直接回车输入或者直接写在p的后面中间不要空格</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">//连接mysql服务mysql数据库的指令</span><br><span class="line">&gt;mysql -h 主机ip -P端口 -u 用户名 -p密码</span><br><span class="line">//tips:</span><br><span class="line"> //p和密码中间不要有空格</span><br><span class="line"> //-p后面没有密码的话会让回车的时候输入密码</span><br><span class="line"> //如果没有写-h主机默认就是本机</span><br><span class="line"> //如果没有写-P端口默认就是3306</span><br><span class="line"> //在实际的工作中端口一般会修改使用3306这一端口容易被黑客发现并攻击</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">//备份数据库的命令</span><br><span class="line"> //备份整个数据库</span><br><span class="line">&gt;mysqldump -u root -p -B 数据库 数据库 &gt; c:\\test\\bak.sql</span><br><span class="line"> //备份数据库的某个表</span><br><span class="line">&gt;mysqldump -u root -p 数据库 表1 表2 表n &gt; c:\\test\\bak.sql </span><br><span class="line">//这里就是把数据库hsp_db02 和数据库hsp_db03备份在C盘下面test目录中一个叫bak.sql的文件中这里备份的是sql语句</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">//根据备份的文件,恢复数据库</span><br><span class="line">//第一种方式</span><br><span class="line">&gt;source c:\\test\\bak.sql //根据C盘下面的c:\\test\\bak.sql的文件恢复数据库</span><br><span class="line">//第二种方式</span><br><span class="line">//直接把这个.sql的文件再执行一遍就会恢复两个数据库了</span><br><span class="line"></span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>常用命令</tag>
</tags>
</entry>
<entry>
<title>常见问题和细节知识</title>
<url>/posts/14438.html</url>
<content><![CDATA[<h1 id="一-常见问题"><a href="#一-常见问题" class="headerlink" title="一.常见问题"></a>一.常见问题</h1><h2 id="1-前后端时间格式的问题"><a href="#1-前后端时间格式的问题" class="headerlink" title="1.前后端时间格式的问题"></a>1.前后端时间格式的问题</h2><p>配置文件中设置时间的格式和时区</p>
<p><img src="/pictures/image-20230506130238222.png" alt="image-20230506130238222"></p>
<h2 id="2-MyBatis分页插件统计总记录数total失效的问题"><a href="#2-MyBatis分页插件统计总记录数total失效的问题" class="headerlink" title="2.MyBatis分页插件统计总记录数total失效的问题"></a>2.MyBatis分页插件统计总记录数total失效的问题</h2><p>检查一下分页插件的配置 选择以下正确的分页插件配置</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.common.config.mp;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.DbType;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;</span><br><span class="line"><span class="keyword">import</span> org.mybatis.spring.annotation.MapperScan;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Bean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * mp的分页插件</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="meta">@MapperScan(&quot;com.atguigu.auth.mapper&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MybatisPlusConfig</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false 避免缓存出现问题(该属性会在旧插件移除后一同移除)</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> MybatisPlusInterceptor <span class="title function_">mybatisPlusInterceptor</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">MybatisPlusInterceptor</span> <span class="variable">interceptor</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">MybatisPlusInterceptor</span>();</span><br><span class="line"> interceptor.addInnerInterceptor(<span class="keyword">new</span> <span class="title class_">PaginationInnerInterceptor</span>(DbType.MYSQL));</span><br><span class="line"> <span class="keyword">return</span> interceptor;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> ConfigurationCustomizer <span class="title function_">configurationCustomizer</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> configuration -&gt; configuration.setUseDeprecatedExecutor(<span class="literal">false</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.config;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.core.injector.ISqlInjector;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Bean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/3/4</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> mybatis-plus的配置文件</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MpConfig</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 分页插件</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> PaginationInterceptor <span class="title function_">paginationInterceptor</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">PaginationInterceptor</span>();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="3-网关中的路由问题"><a href="#3-网关中的路由问题" class="headerlink" title="3.网关中的路由问题"></a>3.网关中的路由问题</h2><p>网关中的路由匹配问题,模糊的路由放在精确的路由前面,容易是精确的路由配置失效</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">cloud:</span></span><br><span class="line"> <span class="attr">gateway:</span></span><br><span class="line"> <span class="attr">routes:</span></span><br><span class="line"> <span class="comment">#这个是精确的路由,下面的路由在前,特定的请求就不会转发到这个请求中来</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">id:</span> <span class="string">product_route</span></span><br><span class="line"> <span class="attr">uri:</span> <span class="string">lb://gulimall-product</span></span><br><span class="line"> <span class="attr">predicates:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">Path=/api/product/**</span></span><br><span class="line"> <span class="attr">filters:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">RewritePath=/api/(?&lt;segment&gt;.*),/$\&#123;segment&#125;</span></span><br><span class="line"> </span><br><span class="line"> <span class="comment">#这个是模糊的路由,如果放在上面的那个路由配置的前面,会导致上面的那个路由配置失效</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">id:</span> <span class="string">admin_route</span> </span><br><span class="line"> <span class="attr">uri:</span> <span class="string">lb://renren-fast</span></span><br><span class="line"> <span class="attr">predicates:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">Path=/api/**</span></span><br><span class="line"> <span class="attr">filters:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">RewritePath=/api/(?&lt;segment&gt;.*),/renren-fast/$\&#123;segment&#125;</span></span><br></pre></td></tr></table></figure>
<h2 id="4-Docker中部署mysql后SpringBoot连接时提示表不存在"><a href="#4-Docker中部署mysql后SpringBoot连接时提示表不存在" class="headerlink" title="4.Docker中部署mysql后SpringBoot连接时提示表不存在"></a>4.Docker中部署mysql后SpringBoot连接时提示表不存在</h2><p>使用Docer启动容器的时候设置忽略大小写表不存在是因为表名大小写的原因。</p>
<p><strong>方案一:启动的时候加上lower_case_table_names&#x3D; 1</strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">docker run -p 3306:3306 --name mysql -v /usr/local/docker/mysql/conf:/etc/mysql -v /usr/local/docker/mysql/logs:/var/log/mysql -v /usr/local/docker/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7 --lower_case_table_names= 1</span><br></pre></td></tr></table></figure>
<p><strong>方案二: 修改mysql挂载在宿主机的配置文件</strong></p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment"># 在配置文件中添加如下的配置</span></span><br><span class="line"><span class="attr">lower_case_table_names</span>=<span class="string">1</span></span><br></pre></td></tr></table></figure>
<h1 id="二-细节知识"><a href="#二-细节知识" class="headerlink" title="二.细节知识"></a>二.细节知识</h1><h2 id="1-Linux开启-关闭防火墙的命令"><a href="#1-Linux开启-关闭防火墙的命令" class="headerlink" title="1.Linux开启&#x2F;关闭防火墙的命令"></a>1.Linux开启&#x2F;关闭防火墙的命令</h2><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">检查防火墙状态:</span></span><br><span class="line">systemctl status firewalld</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">开启防火墙</span></span><br><span class="line">systemctl start firewalld</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">关闭防火墙(有时间限制)</span></span><br><span class="line">systemctl stop firewalld</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">设置开机禁用防火墙(先执行上面一条命令之后执行此命令,即可永久关闭)</span></span><br><span class="line">systemctl disable firewalld.service</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">设置开机启用防火墙</span></span><br><span class="line">systemctl enable firewalld.service</span><br></pre></td></tr></table></figure>
<h2 id="2-windows查看端口占用情况-杀死端口的命令"><a href="#2-windows查看端口占用情况-杀死端口的命令" class="headerlink" title="2.windows查看端口占用情况,杀死端口的命令"></a>2.windows查看端口占用情况,杀死端口的命令</h2><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">查询被占用的端口号的信息</span></span><br><span class="line">netstat -ano | findstr &quot;8080&quot;</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">根据端口号的PID杀死该端口的进程 其中 17156 是8080端口的PID值</span></span><br><span class="line">taskkill /pid 17156 /f</span><br></pre></td></tr></table></figure>
<h2 id="3-Linux开启关闭键盘背光灯"><a href="#3-Linux开启关闭键盘背光灯" class="headerlink" title="3.Linux开启关闭键盘背光灯"></a>3.Linux开启关闭键盘背光灯</h2><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">不是永久有效的</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">开启键盘背光灯</span></span><br><span class="line">xset led named &quot;Scroll Lock&quot;</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">关闭键盘背光灯</span></span><br><span class="line">xset -led named &quot;Scroll Lock&quot;</span><br></pre></td></tr></table></figure>
<h2 id="4-关闭Mysql的服务"><a href="#4-关闭Mysql的服务" class="headerlink" title="4.关闭Mysql的服务"></a>4.关闭Mysql的服务</h2><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查找是否安装了mysql的服务</span></span><br><span class="line">rpm -qa | grep -i mysql</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看mysql服务的状态</span></span><br><span class="line">service mysqld status</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">关闭mysql的服务</span></span><br><span class="line">service mysqld stop</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">重启的命令</span></span><br><span class="line">service mysqld restart</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">关闭开机自启动</span></span><br><span class="line">systemctl disable mysqld</span><br></pre></td></tr></table></figure>
<h2 id="5-前端向后端传递对象数据"><a href="#5-前端向后端传递对象数据" class="headerlink" title="5.前端向后端传递对象数据"></a>5.前端向后端传递对象数据</h2><p>传递普通对象参数的写法</p>
<p>params: searchObj</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="title function_">getPageList</span>(<span class="params">current,limit,searchObj</span>)&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="title function_">request</span>(&#123;</span><br><span class="line"> <span class="attr">url</span>: <span class="string">`<span class="subst">$&#123;api_name&#125;</span>/<span class="subst">$&#123;current&#125;</span>/<span class="subst">$&#123;limit&#125;</span>`</span>,</span><br><span class="line"> <span class="attr">method</span>: <span class="string">&#x27;get&#x27;</span>,</span><br><span class="line"> <span class="attr">params</span>: searchObj <span class="comment">//使用这种方式进行传递</span></span><br><span class="line"> &#125;)</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@GetMapping(&quot;/&#123;page&#125;/&#123;limit&#125;&quot;)</span></span><br><span class="line"><span class="keyword">public</span> Result <span class="title function_">pageQueryRole</span><span class="params">(<span class="meta">@PathVariable</span> Long page,</span></span><br><span class="line"><span class="params"> <span class="meta">@PathVariable</span> Integer limit,</span></span><br><span class="line"><span class="params"> SysRoleQueryVo sysRoleQueryVo)</span> &#123; <span class="comment">//普通的对象进行接收 没有添加注解</span></span><br><span class="line"></span><br><span class="line"> Page&lt;SysRole&gt; pageParam = <span class="keyword">new</span> <span class="title class_">Page</span>&lt;&gt;(page, limit);</span><br><span class="line"> LambdaQueryWrapper&lt;SysRole&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> queryWrapper.like(!StringUtils.isEmpty(sysRoleQueryVo.getRoleName()),SysRole::getRoleName, sysRoleQueryVo.getRoleName());</span><br><span class="line"> Page&lt;SysRole&gt; sysRolePage = sysRoleService.page(pageParam, queryWrapper);</span><br><span class="line"> <span class="keyword">return</span> Result.ok(sysRolePage);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>json格式的传递</p>
<p>data: searchObj</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="title function_">add</span>(<span class="params">sysRole</span>)&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="title function_">request</span>(&#123;</span><br><span class="line"> <span class="attr">url</span>: <span class="string">`<span class="subst">$&#123;api_name&#125;</span>/save`</span>,</span><br><span class="line"> <span class="attr">method</span>: <span class="string">&#x27;post&#x27;</span>,</span><br><span class="line"> <span class="attr">data</span>: sysRole <span class="comment">//使用这种方式进行传递</span></span><br><span class="line"> &#125;)</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@PostMapping(&quot;/save&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> Result <span class="title function_">save</span><span class="params">(<span class="meta">@RequestBody</span> SysRole sysRole)</span>&#123; <span class="comment">//JSON格式对象的传递 需要使用注解@RequestBody</span></span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isSave</span> <span class="operator">=</span> sysRoleService.save(sysRole);</span><br><span class="line"> <span class="keyword">return</span> isSave? Result.ok() : Result.fail();</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h2 id="6-调整日志的级别"><a href="#6-调整日志的级别" class="headerlink" title="6.调整日志的级别"></a>6.调整日志的级别</h2><figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">logging:</span></span><br><span class="line"> <span class="attr">level:</span></span><br><span class="line"> <span class="comment"># 注意这里包的路径要根据实际情况t</span></span><br><span class="line"> <span class="attr">com.atguigu.gulimall:</span> <span class="string">debug</span></span><br></pre></td></tr></table></figure>
<h2 id="7-JsonInclude注解"><a href="#7-JsonInclude注解" class="headerlink" title="7.@JsonInclude注解"></a>7.@JsonInclude注解</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@JsonInclude(JsonInclude.Include.NON_EMPTY)</span><span class="comment">//这里是当children为空的时候向前端传递数据就不带这个</span></span><br><span class="line"><span class="keyword">private</span> List&lt;CategoryEntity&gt; children;</span><br></pre></td></tr></table></figure>
<h2 id="8-node相关的问题"><a href="#8-node相关的问题" class="headerlink" title="8.node相关的问题"></a>8.node相关的问题</h2><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看node的版本</span></span><br><span class="line">node -v</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看npm的版本</span></span><br><span class="line">npm -v</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看npm使用的镜像源(npm镜像源)</span></span><br><span class="line">npm get registry</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">设置淘宝镜像源</span></span><br><span class="line">npm config set registry http://registry.npm.taobao.org</span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>Java</tag>
</tags>
</entry>
<entry>
<title>开发环境的搭建</title>
<url>/posts/63333.html</url>
<content><![CDATA[<h2 id="1-后端环境搭建"><a href="#1-后端环境搭建" class="headerlink" title="1.后端环境搭建"></a>1.后端环境搭建</h2><h3 id="1-1-JDK环境的配置"><a href="#1-1-JDK环境的配置" class="headerlink" title="1.1 JDK环境的配置"></a>1.1 JDK环境的配置</h3><p>常规的安装,无需教程</p>
<p>IDEA中设置默认的JDK</p>
<p><img src="/pictures/image-20230604120610791.png" alt="image-20230604120610791"></p>
<p>选中需要设置为默认JDK的JDK</p>
<p><img src="/pictures/image-20230604120654078.png" alt="image-20230604120654078"></p>
<h3 id="1-2-Maven的安装与配置"><a href="#1-2-Maven的安装与配置" class="headerlink" title="1.2 Maven的安装与配置"></a>1.2 Maven的安装与配置</h3><p><strong>环境变量的配置</strong></p>
<p>MAVEN_HOME和Path 配置文件的配置</p>
<p>设置默认maven每次创建新的工程的时候就会使用这个maven</p>
<p><img src="/pictures/image-20230604120307280.png" alt="image-20230604120307280"></p>
<p>然后在弹出的页面中设置这样每次创建新的工程就会使用当前设置的maven</p>
<p><img src="/pictures/image-20230604120436139.png" alt="image-20230604120436139"></p>
<h3 id="1-3-IDEA的配置"><a href="#1-3-IDEA的配置" class="headerlink" title="1.3 IDEA的配置"></a>1.3 IDEA的配置</h3><p>展开目录树 取消勾选下面的选项</p>
<p><img src="/pictures/image-20230604151530534.png" alt="image-20230604151530534"></p>
<p>快捷键的配置 IDEA中的全局查找的快捷键会和windows的中文的繁简字体切换的快捷键冲突直接关掉系统的快捷键</p>
<p><img src="/pictures/image-20230604121126549.png" alt="image-20230604121126549"></p>
<p>页面中字体的配置</p>
<img src="/pictures/image-20230603202245269.png" alt="image-20230603202245269" style="zoom:150%;" />
<p>代码字体的配置</p>
<img src="/pictures/image-20230603154531129.png" alt="image-20230603154531129" style="zoom:150%;" />
<p>设置代码粗体</p>
<img src="/pictures/image-20230603154622726.png" alt="image-20230603154622726" style="zoom:150%;" />
<p>打开的多个文件多行显示,不在同一行显示</p>
<p><img src="/pictures/image-20230611211438017.png" alt="image-20230611211438017"></p>
<p><strong>浅色主题的配置</strong></p>
<p><img src="/pictures/image-20230815171925527.png" alt="image-20230815171925527"></p>
<p>修改注释的颜色</p>
<p>修改多行注释的颜色: 修改Doc comment -&gt; Text的颜色</p>
<p><img src="/pictures/image-20230815172326472.png" alt="image-20230815172326472"></p>
<h3 id="1-4-mysql的安装"><a href="#1-4-mysql的安装" class="headerlink" title="1.4 mysql的安装"></a>1.4 mysql的安装</h3><p>具体的安装教程在《MySql5.7的安装教程的博客中》</p>
<h3 id="1-5-Nacos的安装配置"><a href="#1-5-Nacos的安装配置" class="headerlink" title="1.5 Nacos的安装配置"></a>1.5 Nacos的安装配置</h3><p>github下载之后直接解压运行</p>
<p>下载的地址:<a href="https://github.com/alibaba/nacos/releases">https://github.com/alibaba/nacos/releases</a></p>
<p>踩坑:单节点部署的话,启动的时候需要配置一下,不然启动的时候会闪退</p>
<p><img src="/pictures/image-20230603193632659.png" alt="image-20230603193632659"></p>
<h2 id="2-前端环境的搭建"><a href="#2-前端环境的搭建" class="headerlink" title="2.前端环境的搭建"></a>2.前端环境的搭建</h2><h3 id="2-1-Nodejs的安装与配置"><a href="#2-1-Nodejs的安装与配置" class="headerlink" title="2.1 Nodejs的安装与配置"></a>2.1 Nodejs的安装与配置</h3><p>下载的网址:<a href="https://nodejs.org/zh-cn/download/releases">https://nodejs.org/zh-cn/download/releases</a></p>
<p>选择.msi的下载即可</p>
<p>不用配置环境变量一直下一步直到安装成功过node自带npm包管理工具</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">检验命令</span></span><br><span class="line">node -v</span><br><span class="line">npm -v</span><br></pre></td></tr></table></figure>
<h2 id="3-前后端公共环境的搭建"><a href="#3-前后端公共环境的搭建" class="headerlink" title="3.前后端公共环境的搭建"></a>3.前后端公共环境的搭建</h2><h3 id="1-Git环境的搭建"><a href="#1-Git环境的搭建" class="headerlink" title="1.Git环境的搭建"></a>1.Git环境的搭建</h3><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">以下的操作在下载安装完毕之后进行</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">1.鼠标在桌面右键 选择Git Bash Here 打开控制台</span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">2.配置用户名和邮箱</span></span><br><span class="line">git config --global user.name &quot;用户名&quot; #随意</span><br><span class="line">git config --global user.email &quot;邮箱&quot; #自己的邮箱</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">3.配置SSH免密连接</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">生成密钥</span></span><br><span class="line">ssh-keygen -t rsa -C &quot;在码云上注册的邮箱地址&quot; #连续三次回车</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看密钥并复制公钥的内容</span></span><br><span class="line">cat ~/.ssh/id_rsa.pub</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">4.将密钥的复制到码云的SSH公钥中</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">4.1添加公钥 公钥名随意 公钥内容就是上面复制的内容</span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">5.测试</span></span><br><span class="line">ssh -T git@gitee.com</span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>环境搭建</tag>
</tags>
</entry>
<entry>
<title>开源项目-若依框架</title>
<url>/posts/5293.html</url>
<content><![CDATA[<h1 id="一-若依简介"><a href="#一-若依简介" class="headerlink" title="一.若依简介"></a>一.若依简介</h1><p><strong>官网简介</strong></p>
<p>RuoYi 是一个后台管理系统,主要目的让开发者注重专注业务,降低技术难度,从而节省人力成本,缩短项目周期,提高软件安全质量。</p>
<p>单体版本技术栈Spring Boot、Apache Shiro、MyBatis、Thymeleaf</p>
<p>前后端分离版本技术栈SpringBoot、Spring Security、Jwt、Vue</p>
<p>微服务版本技术栈Spring Boot、Spring Cloud &amp; Alibaba</p>
<p><strong>相关网站</strong></p>
<ul>
<li>若依官网:<a href="http://ruoyi.vip/">http://ruoyi.vip(opens new window)</a></li>
<li>演示地址:<a href="http://demo.ruoyi.vip/">http://demo.ruoyi.vip(opens new window)</a></li>
<li>代码下载:<a href="https://gitee.com/y_project/RuoYi">https://gitee.com/y_project/RuoYi</a></li>
<li>文档地址:<a href="https://doc.ruoyi.vip/ruoyi/">https://doc.ruoyi.vip/ruoyi/</a></li>
</ul>
<p><strong>总结</strong></p>
<p>若依就是一个后台管理系统的通用模板,这个模板中包含了后台管理系统的常用功能,比如登录、权限管理、菜单管理、用户管理等,避免我们在开发中重复造轮子,让开发回归到业务本身。</p>
<h1 id="二-下载使用"><a href="#二-下载使用" class="headerlink" title="二.下载使用"></a>二.下载使用</h1><h2 id="1-前置环境"><a href="#1-前置环境" class="headerlink" title="1.前置环境"></a>1.前置环境</h2><p>后端:JDK、Maven、Mysql、Redis</p>
<p>前端:Node、Npm</p>
<h2 id="2-下载运行"><a href="#2-下载运行" class="headerlink" title="2.下载运行"></a>2.下载运行</h2><p>1.克隆命令</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">git clone https://gitee.com/y_project/RuoYi-Vue.git</span><br></pre></td></tr></table></figure>
<p>2.使用Idea打开项目并初始化数据库脚本</p>
<blockquote>
<p>执行克隆的项目工程目录下sql目录中的两个sql文件初始化数据库</p>
</blockquote>
<p>3.修改Mysql和Redis的连接信息</p>
<blockquote>
<p>在application.yml中修改redis的连接信息在application-druid.yml中修改mysql的连接信息</p>
<p>application.yml</p>
<p>application-druid.yml</p>
</blockquote>
<p>4.使用Vscode或者Idea打开前端项目并执行命令初始化前端项目</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">前端相关命令</span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">进入项目目录</span></span><br><span class="line">cd ruoyi-ui</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">安装依赖</span></span><br><span class="line">npm install</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题</span></span><br><span class="line">npm install --registry=https://registry.npmmirror.com</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">启动服务</span></span><br><span class="line">npm run dev</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20240203135647790.png" alt="image-20240203135647790"></p>
<h1 id="三-项目功能实现逻辑"><a href="#三-项目功能实现逻辑" class="headerlink" title="三.项目功能实现逻辑"></a>三.项目功能实现逻辑</h1><h2 id="1-基本配置"><a href="#1-基本配置" class="headerlink" title="1.基本配置"></a>1.基本配置</h2><h3 id="1-1-浏览器请求过程"><a href="#1-1-浏览器请求过程" class="headerlink" title="1.1 浏览器请求过程"></a>1.1 浏览器请求过程</h3><p><strong>配置的原因是在前端解决跨域</strong></p>
<p>1.浏览器发送<code>http://localhost/prod-api/captchaImage</code> 请求</p>
<p>2.前端接收<code>http://localhost/prod-api/captchaImage</code> 请求通过下面的配置重写url然后再将请求发送给后端通过<code>[&#39;^&#39; + process.env.VUE_APP_BASE_API]: &#39;&#39;</code>配置将<code>http://localhost/prod-api/captchaImage</code>重写为<code>http://localhost:8080/captchaImage</code></p>
<p>该配置在<code>vue.config.js</code>配置文件中</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="attr">devServer</span>: &#123;</span><br><span class="line"> <span class="attr">host</span>: <span class="string">&#x27;0.0.0.0&#x27;</span>,</span><br><span class="line"> <span class="attr">port</span>: port,</span><br><span class="line"> <span class="attr">open</span>: <span class="literal">true</span>,</span><br><span class="line"> <span class="attr">proxy</span>: &#123;</span><br><span class="line"> <span class="comment">// detail: https://cli.vuejs.org/config/#devserver-proxy</span></span><br><span class="line"> [process.<span class="property">env</span>.<span class="property">VUE_APP_BASE_API</span>]: &#123;</span><br><span class="line"> <span class="comment">//在这里我们我们可以把target修改为我们自己的后端服务地址</span></span><br><span class="line"> <span class="attr">target</span>: <span class="string">`http://localhost:8080`</span>,</span><br><span class="line"> <span class="attr">changeOrigin</span>: <span class="literal">true</span>,</span><br><span class="line"> <span class="attr">pathRewrite</span>: &#123;</span><br><span class="line"> <span class="comment">//将VUE_APP_BASE_API(VUE_APP_BASE_API的值可能为dev-api、pood-api)置换为空再在前面拼接target</span></span><br><span class="line"> [<span class="string">&#x27;^&#x27;</span> + process.<span class="property">env</span>.<span class="property">VUE_APP_BASE_API</span>]: <span class="string">&#x27;&#x27;</span></span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;,</span><br><span class="line"> <span class="attr">disableHostCheck</span>: <span class="literal">true</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="2-登录功能"><a href="#2-登录功能" class="headerlink" title="2.登录功能"></a>2.登录功能</h2><p><img src="/pictures/image-20240203152609601.png" alt="image-20240203152609601"></p>
<p><strong>实现思路</strong></p>
<p>1.后端生成一个计算表达式 ,例如 1+1&#x3D;?@2</p>
<p>2.然后将1+1&#x3D;?以流的方式传递给前端前端展示为图片同时后端也会传递一个UUID给前端这个UUID为就是<code>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</code>2作为结果value值存入Redis中。存入Redis中的key的格式为<code>captcha_codes:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</code> </p>
<p>3.用户在填写完表单之后会携带账号、密码、验证码的结果值以及之前后端传递给前端的UUID值给后端后端会先以<code>captcha_codes:+UUID</code>作为key在reidis中查找value值再和前端输入的验证码结果值作比较如果验证码相同再比较账号密码账号密码在数据库中也可以匹配上就登录成功反之返回给前端账号密码错误如果验证码不相同直接返回给前端验证码错误。</p>
<p><strong>代码实现</strong></p>
<p>1.前端在页面初始化或者刷新验证码的时候会调用下面的方法获取验证码和UUID值</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="title function_">getCode</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="title function_">getCodeImg</span>().<span class="title function_">then</span>(<span class="function"><span class="params">res</span> =&gt;</span> &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">captchaEnabled</span> = res.<span class="property">captchaEnabled</span> === <span class="literal">undefined</span> ? <span class="literal">true</span> : res.<span class="property">captchaEnabled</span>;</span><br><span class="line"> <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">captchaEnabled</span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">codeUrl</span> = <span class="string">&quot;data:image/gif;base64,&quot;</span> + res.<span class="property">img</span>;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">loginForm</span>.<span class="property">uuid</span> = res.<span class="property">uuid</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>2.后端生成验证码的过程</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 生成验证码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@GetMapping(&quot;/captchaImage&quot;)</span></span><br><span class="line"><span class="keyword">public</span> AjaxResult <span class="title function_">getCode</span><span class="params">(HttpServletResponse response)</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="comment">//创建一个ajax的返回值对象</span></span><br><span class="line"> <span class="type">AjaxResult</span> <span class="variable">ajax</span> <span class="operator">=</span> AjaxResult.success();</span><br><span class="line"> </span><br><span class="line"> <span class="comment">//判断是否开启的验证码功能</span></span><br><span class="line"> <span class="type">boolean</span> <span class="variable">captchaEnabled</span> <span class="operator">=</span> configService.selectCaptchaEnabled();</span><br><span class="line"> ajax.put(<span class="string">&quot;captchaEnabled&quot;</span>, captchaEnabled);</span><br><span class="line"> <span class="keyword">if</span> (!captchaEnabled) &#123;</span><br><span class="line"> <span class="keyword">return</span> ajax;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 保存验证码信息</span></span><br><span class="line"> <span class="comment">//获取uui</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">uuid</span> <span class="operator">=</span> IdUtils.simpleUUID();</span><br><span class="line"> <span class="comment">//生成验证码的key值</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">verifyKey</span> <span class="operator">=</span> CacheConstants.CAPTCHA_CODE_KEY + uuid;</span><br><span class="line"></span><br><span class="line"> <span class="type">String</span> <span class="variable">capStr</span> <span class="operator">=</span> <span class="literal">null</span>, code = <span class="literal">null</span>;</span><br><span class="line"> <span class="type">BufferedImage</span> <span class="variable">image</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 生成验证码</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">captchaType</span> <span class="operator">=</span> RuoYiConfig.getCaptchaType();</span><br><span class="line"> <span class="keyword">if</span> (<span class="string">&quot;math&quot;</span>.equals(captchaType)) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">capText</span> <span class="operator">=</span> captchaProducerMath.createText();</span><br><span class="line"> capStr = capText.substring(<span class="number">0</span>, capText.lastIndexOf(<span class="string">&quot;@&quot;</span>));</span><br><span class="line"> code = capText.substring(capText.lastIndexOf(<span class="string">&quot;@&quot;</span>) + <span class="number">1</span>);</span><br><span class="line"> image = captchaProducerMath.createImage(capStr);</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="string">&quot;char&quot;</span>.equals(captchaType)) &#123;</span><br><span class="line"> capStr = code = captchaProducer.createText();</span><br><span class="line"> image = captchaProducer.createImage(capStr);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);</span><br><span class="line"> <span class="comment">// 转换流信息写出</span></span><br><span class="line"> <span class="type">FastByteArrayOutputStream</span> <span class="variable">os</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">FastByteArrayOutputStream</span>();</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> ImageIO.write(image, <span class="string">&quot;jpg&quot;</span>, os);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (IOException e) &#123;</span><br><span class="line"> <span class="keyword">return</span> AjaxResult.error(e.getMessage());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> ajax.put(<span class="string">&quot;uuid&quot;</span>, uuid);</span><br><span class="line"> ajax.put(<span class="string">&quot;img&quot;</span>, Base64.encode(os.toByteArray()));</span><br><span class="line"> <span class="keyword">return</span> ajax;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>3.前端登录提交的表单和处理登录的方法</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="title function_">data</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> &#123;</span><br><span class="line"> <span class="comment">//验证码图片的链接</span></span><br><span class="line"> <span class="attr">codeUrl</span>: <span class="string">&quot;&quot;</span>,</span><br><span class="line"> <span class="comment">//登录提交的表单信息</span></span><br><span class="line"> <span class="attr">loginForm</span>: &#123;</span><br><span class="line"> <span class="comment">//用户名</span></span><br><span class="line"> <span class="attr">username</span>: <span class="string">&quot;admin&quot;</span>,</span><br><span class="line"> <span class="comment">//密码</span></span><br><span class="line"> <span class="attr">password</span>: <span class="string">&quot;admin123&quot;</span>,</span><br><span class="line"> <span class="comment">//是否记住密码</span></span><br><span class="line"> <span class="attr">rememberMe</span>: <span class="literal">false</span>,</span><br><span class="line"> <span class="comment">//验证码结果值</span></span><br><span class="line"> <span class="attr">code</span>: <span class="string">&quot;&quot;</span>,</span><br><span class="line"> <span class="comment">//uuid值</span></span><br><span class="line"> <span class="attr">uuid</span>: <span class="string">&quot;&quot;</span></span><br><span class="line"> &#125;</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="title function_">handleLogin</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">$refs</span>.<span class="property">loginForm</span>.<span class="title function_">validate</span>(<span class="function"><span class="params">valid</span> =&gt;</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (valid) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">loading</span> = <span class="literal">true</span>;</span><br><span class="line"> <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">loginForm</span>.<span class="property">rememberMe</span>) &#123;</span><br><span class="line"> <span class="title class_">Cookies</span>.<span class="title function_">set</span>(<span class="string">&quot;username&quot;</span>, <span class="variable language_">this</span>.<span class="property">loginForm</span>.<span class="property">username</span>, &#123; <span class="attr">expires</span>: <span class="number">30</span> &#125;);</span><br><span class="line"> <span class="title class_">Cookies</span>.<span class="title function_">set</span>(<span class="string">&quot;password&quot;</span>, <span class="title function_">encrypt</span>(<span class="variable language_">this</span>.<span class="property">loginForm</span>.<span class="property">password</span>), &#123; <span class="attr">expires</span>: <span class="number">30</span> &#125;);</span><br><span class="line"> <span class="title class_">Cookies</span>.<span class="title function_">set</span>(<span class="string">&#x27;rememberMe&#x27;</span>, <span class="variable language_">this</span>.<span class="property">loginForm</span>.<span class="property">rememberMe</span>, &#123; <span class="attr">expires</span>: <span class="number">30</span> &#125;);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="title class_">Cookies</span>.<span class="title function_">remove</span>(<span class="string">&quot;username&quot;</span>);</span><br><span class="line"> <span class="title class_">Cookies</span>.<span class="title function_">remove</span>(<span class="string">&quot;password&quot;</span>);</span><br><span class="line"> <span class="title class_">Cookies</span>.<span class="title function_">remove</span>(<span class="string">&#x27;rememberMe&#x27;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">$store</span>.<span class="title function_">dispatch</span>(<span class="string">&quot;Login&quot;</span>, <span class="variable language_">this</span>.<span class="property">loginForm</span>).<span class="title function_">then</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">$router</span>.<span class="title function_">push</span>(&#123; <span class="attr">path</span>: <span class="variable language_">this</span>.<span class="property">redirect</span> || <span class="string">&quot;/&quot;</span> &#125;).<span class="title function_">catch</span>(<span class="function">()=&gt;</span>&#123;&#125;);</span><br><span class="line"> &#125;).<span class="title function_">catch</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">loading</span> = <span class="literal">false</span>;</span><br><span class="line"> <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">captchaEnabled</span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="title function_">getCode</span>();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>4.后端登录的实现逻辑</p>
]]></content>
<categories>
<category>开源项目</category>
</categories>
<tags>
<tag>若依</tag>
</tags>
</entry>
<entry>
<title>接口测试工具</title>
<url>/posts/35630.html</url>
<content><![CDATA[<h2 id="一-Postman的使用"><a href="#一-Postman的使用" class="headerlink" title="一 Postman的使用"></a>一 Postman的使用</h2><p><strong>官网网址: <a href="https://www.postman.com/">https://www.postman.com/</a></strong></p>
<p><strong>Postman的首页</strong></p>
<p><img src="/pictures/image-20230813162510205.png" alt="image-20230813162510205"></p>
<h3 id="1-使用教程"><a href="#1-使用教程" class="headerlink" title="1 使用教程"></a>1 使用教程</h3><h4 id="1-1-发送Post请求"><a href="#1-1-发送Post请求" class="headerlink" title="1.1 发送Post请求"></a>1.1 发送Post请求</h4><p><strong>以一个普通的登录操作来演示Postman的使用教程</strong></p>
<p>发送Post请求的: 1.修改请求的方式 2.设置请求体的数据类型</p>
<p><img src="/pictures/image-20230813163451814.png" alt="image-20230813163451814"></p>
<p>请求数据的格式</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;phone&quot;</span><span class="punctuation">:</span><span class="string">&quot;13511223456&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;password&quot;</span><span class="punctuation">:</span><span class="string">&quot;admin&quot;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p>响应数据的格式</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;host&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;code&quot;</span><span class="punctuation">:</span> <span class="number">200</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;errorMessage&quot;</span><span class="punctuation">:</span> <span class="string">&quot;操作成功&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;data&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;user&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;id&quot;</span><span class="punctuation">:</span> <span class="number">4</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;salt&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;admin&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;password&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;phone&quot;</span><span class="punctuation">:</span> <span class="string">&quot;13511223456&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;image&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sex&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">true</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;certification&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;identityAuthentication&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">null</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;status&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">true</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;flag&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;createdTime&quot;</span><span class="punctuation">:</span> <span class="string">&quot;2020-03-30T08:36:32.000+00:00&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;token&quot;</span><span class="punctuation">:</span> <span class="string">&quot;eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAADWLQQrDMAzA_uJzc3DnBKe_cRKPpVAIOIWNsb_PPfQmIfSFfXbYgCqlEkmDVI6BHlJCrrWF9IzKiMKNERboMmHDlDFjTMgL2Fn8to9NPa5u5vrSfoibnM1NxnDW97jPvF5n90a_P2LDCJyAAAAA.Rk6wC_YpLmxrqylQxEgz19uKHkrBRV6_JmIqbHrSQENkURtavrzhLzr0D8mQf-wtKivaGGviDGHmdckw8IWi7g&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<h2 id="二-Swagger的使用"><a href="#二-Swagger的使用" class="headerlink" title="二 Swagger的使用"></a>二 Swagger的使用</h2><p>SpringBoot整合Swagger:<a href="https://qingling.icu/posts/32246.html">https://qingling.icu/posts/32246.html</a></p>
<p><strong>以一个普通的登录操作来演示Swagger的使用教程</strong></p>
<p><img src="/pictures/image-20230813170950932.png" alt="image-20230813170950932"></p>
<p><img src="/pictures/image-20230813171244848.png" alt="image-20230813171244848"></p>
<h2 id="三-knife4j的使用"><a href="#三-knife4j的使用" class="headerlink" title="三 knife4j的使用"></a>三 knife4j的使用</h2><p><strong>SpringBoot整合Knife4j教程: <a href="https://qingling.icu/posts/855.html">https://qingling.icu/posts/855.html</a></strong></p>
<p>gitee地址<a href="https://gitee.com/xiaoym/knife4j">https://gitee.com/xiaoym/knife4j</a> </p>
<p>官方文档:<a href="https://doc.xiaominfo.com/">https://doc.xiaominfo.com/</a> </p>
<p><strong>核心功能</strong> :文档说明 在线调试 个性化配置 离线文档 接口排序</p>
<p><img src="/pictures/image-20230813172211110.png" alt="image-20230813172211110"></p>
<p><strong>以一个普通的登录操作来演示knife4j的使用教程</strong></p>
<p><img src="/pictures/image-20230813172355353.png" alt="image-20230813172355353"></p>
<p><strong>下载离线文档</strong></p>
<p><img src="/pictures/image-20230813172605624.png" alt="image-20230813172605624"></p>
<p>下载成功之后打开的效果</p>
<p><img src="/pictures/image-20230813172720116.png" alt="image-20230813172720116"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>工具</tag>
</tags>
</entry>
<entry>
<title>微信登录</title>
<url>/posts/45572.html</url>
<content><![CDATA[<h2 id="1、OAuth2"><a href="#1、OAuth2" class="headerlink" title="1、OAuth2"></a>1、OAuth2</h2><p>微信登录使用了OAuth2解决方案</p>
<h3 id="1-1-OAuth2解决什么问题"><a href="#1-1-OAuth2解决什么问题" class="headerlink" title="1.1 OAuth2解决什么问题"></a>1.1 OAuth2解决什么问题</h3><h4 id="1-1-1-开放系统间授权"><a href="#1-1-1-开放系统间授权" class="headerlink" title="1.1.1 开放系统间授权"></a>1.1.1 开放系统间授权</h4><p>照片拥有者想要在云冲印服务上打印照片,云冲印服务需要访问云存储服务上的资源</p>
<p><img src="/pictures/clip_image002.jpg" alt="IMG_256"></p>
<h4 id="1-1-2图例"><a href="#1-1-2图例" class="headerlink" title="1.1.2图例"></a>1.1.2图例</h4><p>资源拥有者:照片拥有者</p>
<p>客户应用:云冲印</p>
<p>受保护的资源:照片</p>
<p><img src="/pictures/clip_image004.jpg" alt="IMG_256"></p>
<h4 id="1-1-3方式一用户名密码复制"><a href="#1-1-3方式一用户名密码复制" class="headerlink" title="1.1.3方式一:用户名密码复制"></a>1.1.3方式一:用户名密码复制</h4><p><img src="/pictures/clip_image006.jpg" alt="IMG_258"></p>
<p>用户将自己的”云存储”服务的用户名和密码,告诉”云冲印”,后者就可以读取用户的照片了。这样的做法有以下几个严重的缺点。</p>
<p>1”云冲印”为了后续的服务会保存用户的密码这样很不安全。</p>
<p>2Google不得不部署密码登录而我们知道单纯的密码登录并不安全。</p>
<p>3”云冲印”拥有了获取用户储存在Google所有资料的权力用户没法限制”云冲印”获得授权的范围和有效期。</p>
<p>4用户只有修改密码才能收回赋予”云冲印”的权力。但是这样做会使得其他所有获得用户授权的第三方应用程序全部失效。</p>
<p>5只要有一个第三方应用程序被破解就会导致用户密码泄漏以及所有被密码保护的数据泄漏。</p>
<p><strong>总结:</strong></p>
<p>将受保护的资源中的用户名和密码存储在客户应用的服务器上,使用时直接使用这个用户名和密码登录</p>
<p>适用于同一公司内部的多个系统,不适用于不受信的第三方应用</p>
<h4 id="1-1-4方式二通用开发者key"><a href="#1-1-4方式二通用开发者key" class="headerlink" title="1.1.4方式二通用开发者key"></a>1.1.4方式二通用开发者key</h4><p>适用于合作商或者授信的不同业务部门之间</p>
<p><img src="/pictures/clip_image008.jpg" alt="IMG_259"></p>
<h4 id="1-1-5方式三颁发令牌"><a href="#1-1-5方式三颁发令牌" class="headerlink" title="1.1.5方式三:颁发令牌"></a>1.1.5方式三:颁发令牌</h4><p>接近OAuth2方式需要考虑如何管理令牌、颁发令牌、吊销令牌需要统一的协议因此就有了OAuth2协议</p>
<p><img src="/pictures/clip_image010.jpg" alt="IMG_256"></p>
<p><strong>令牌类比仆从钥匙</strong></p>
<p><img src="/pictures/clip_image012.jpg" alt="IMG_256"></p>
<h3 id="1-2-OAuth2最简向导"><a href="#1-2-OAuth2最简向导" class="headerlink" title="1.2 OAuth2最简向导"></a>1.2 OAuth2最简向导</h3><h4 id="1-2-1-OAuth主要角色"><a href="#1-2-1-OAuth主要角色" class="headerlink" title="1.2.1 OAuth主要角色"></a>1.2.1 OAuth主要角色</h4><p><img src="/pictures/clip_image014.jpg" alt="IMG_256"></p>
<h4 id="1-2-2最简向导"><a href="#1-2-2最简向导" class="headerlink" title="1.2.2最简向导"></a>1.2.2最简向导</h4><p>川崎高彦OAuth2领域专家开发了一个OAuth2 sass服务OAuth2 as Service并且做成了一个公司</p>
<p>在融资的过程中为了向投资人解释OAuth2是什么于是写了一篇文章《OAuth2最简向导》</p>
<h3 id="1-3-OAuth2的应用"><a href="#1-3-OAuth2的应用" class="headerlink" title="1.3 OAuth2的应用"></a>1.3 OAuth2的应用</h3><h4 id="1-3-1-微服务安全"><a href="#1-3-1-微服务安全" class="headerlink" title="1.3.1 微服务安全"></a>1.3.1 微服务安全</h4><p>现代微服务中系统微服务化以及应用的形态和设备类型增多,不能用传统的登录方式</p>
<p>核心的技术不是用户名和密码而是token由AuthServer颁发token用户使用token进行登录</p>
<p><img src="/pictures/clip_image016.jpg" alt="IMG_256"></p>
<h4 id="1-3-2-社交登录"><a href="#1-3-2-社交登录" class="headerlink" title="1.3.2 社交登录"></a>1.3.2 社交登录</h4><p><img src="/pictures/clip_image018.jpg"></p>
<h2 id="2、微信登录介绍"><a href="#2、微信登录介绍" class="headerlink" title="2、微信登录介绍"></a>2、微信登录介绍</h2><h3 id="2-1-前期准备"><a href="#2-1-前期准备" class="headerlink" title="2.1 前期准备"></a>2.1 前期准备</h3><p>1、注册</p>
<p>微信开放平台:<a href="https://open.weixin.qq.com/">https://open.weixin.qq.com</a></p>
<p>2、邮箱激活</p>
<p>3、完善开发者资料</p>
<p>4、开发者资质认证</p>
<p>准备营业执照1-2个工作日审批、300元</p>
<p>5、创建网站应用</p>
<p>提交审核7个工作日审批</p>
<p>6、内网穿透</p>
<p>ngrok的使用</p>
<h3 id="2-2-授权流程"><a href="#2-2-授权流程" class="headerlink" title="2.2 授权流程"></a>2.2 授权流程</h3><p>参考文档:<a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419316505&token=e547653f995d8f402704d5cb2945177dc8aa4e7e&lang=zh_CN">https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&amp;t=resource/res_list&amp;verify=1&amp;id=open1419316505&amp;token=e547653f995d8f402704d5cb2945177dc8aa4e7e&amp;lang=zh_CN</a></p>
<p><strong>获取access_token时序图</strong></p>
<p><img src="/pictures/clip_image002.gif" alt="IMG_256"></p>
<p>第一步请求CODE生成授权URL</p>
<p>第二步通过code获取access_token开发回调URL</p>
<h2 id="3、使用教程"><a href="#3、使用教程" class="headerlink" title="3、使用教程"></a>3、使用教程</h2><p>由于微信登录需要企业用户才能注册,这里我们使用的是尚硅谷的密钥</p>
<p>当前项目的启动端口设置为 8160 才可以获取到登录的二维码</p>
<h3 id="3-1-配置文件中添加配置"><a href="#3-1-配置文件中添加配置" class="headerlink" title="3.1 配置文件中添加配置"></a>3.1 配置文件中添加配置</h3><figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment"># 微信开放平台appid</span></span><br><span class="line"><span class="attr">wx.open.app_id</span>=<span class="string">wxed9954c01bb89b47</span></span><br><span class="line"><span class="comment"># 微信开放平台appsecret</span></span><br><span class="line"><span class="attr">wx.open.app_secret</span>=<span class="string">a7482517235173ddb4083788de60b90e</span></span><br><span class="line"><span class="comment">#回调的地址</span></span><br><span class="line"><span class="attr">wx.open.redirect_url</span>=<span class="string">http://localhost:8160/api/ucenter/wx/callback</span></span><br><span class="line"><span class="comment">#前端项目的地址</span></span><br><span class="line"><span class="attr">yygh.baseUrl</span>=<span class="string">http://localhost:3000</span></span><br></pre></td></tr></table></figure>
<h3 id="3-2-编写配置类读取配置文件中的值"><a href="#3-2-编写配置类读取配置文件中的值" class="headerlink" title="3.2 编写配置类读取配置文件中的值"></a>3.2 编写配置类读取配置文件中的值</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.InitializingBean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Value;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Component;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ConstantPropertiesUtil</span> <span class="keyword">implements</span> <span class="title class_">InitializingBean</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;wx.open.app_id&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String appId;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;wx.open.app_secret&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String appSecret;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;wx.open.redirect_url&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String redirectUrl;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;yygh.baseUrl&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String yyghBaseUrl;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String WX_OPEN_APP_ID;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String WX_OPEN_APP_SECRET;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String WX_OPEN_REDIRECT_URL;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String YYGH_BASE_URL;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">afterPropertiesSet</span><span class="params">()</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> WX_OPEN_APP_ID = appId;</span><br><span class="line"> WX_OPEN_APP_SECRET = appSecret;</span><br><span class="line"> WX_OPEN_REDIRECT_URL = redirectUrl;</span><br><span class="line"> YYGH_BASE_URL = yyghBaseUrl;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="3-3-生成二维码和扫描二维码之后的回调操作"><a href="#3-3-生成二维码和扫描二维码之后的回调操作" class="headerlink" title="3.3 生成二维码和扫描二维码之后的回调操作"></a>3.3 生成二维码和扫描二维码之后的回调操作</h3><h4 id="3-3-1-生成二维码"><a href="#3-3-1-生成二维码" class="headerlink" title="3.3.1 生成二维码"></a>3.3.1 生成二维码</h4><p>生成内嵌的二维码</p>
<p>返回给前端的相关参数</p>
<table>
<thead>
<tr>
<th align="left">参数</th>
<th align="left">是否必须</th>
<th align="left">说明</th>
</tr>
</thead>
<tbody><tr>
<td align="left">self_redirect</td>
<td align="left">否</td>
<td align="left">true手机点击确认登录后可以在 iframe 内跳转到 redirect_urifalse手机点击确认登录后可以在 top window 跳转到 redirect_uri。默认为 false。</td>
</tr>
<tr>
<td align="left">id</td>
<td align="left">是</td>
<td align="left">第三方页面显示二维码的容器id</td>
</tr>
<tr>
<td align="left">appid</td>
<td align="left">是</td>
<td align="left">应用唯一标识,在微信开放平台提交应用审核通过后获得</td>
</tr>
<tr>
<td align="left">scope</td>
<td align="left">是</td>
<td align="left">应用授权作用域,拥有多个作用域用逗号(,分隔网页应用目前仅填写snsapi_login即可</td>
</tr>
<tr>
<td align="left">redirect_uri</td>
<td align="left">是</td>
<td align="left">重定向地址需要进行UrlEncode</td>
</tr>
<tr>
<td align="left">state</td>
<td align="left">否</td>
<td align="left">用于保持请求和回调的状态授权请求后原样带回给第三方。该参数可用于防止csrf攻击跨站请求伪造攻击建议第三方带上该参数可设置为简单的随机数加session进行校验</td>
</tr>
<tr>
<td align="left">style</td>
<td align="left">否</td>
<td align="left">提供”black”、”white”可选默认为黑色文字描述。详见文档底部FAQ</td>
</tr>
<tr>
<td align="left">href</td>
<td align="left">否</td>
<td align="left">自定义样式链接第三方可根据实际需求覆盖默认样式。详见文档底部FAQ</td>
</tr>
</tbody></table>
<p>生成扫描二维码的后端部分</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> com.atguigu.yygh.common.result.Result;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.yygh.user.utils.ConstantPropertiesUtil;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Controller;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.CrossOrigin;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.GetMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.ResponseBody;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.UnsupportedEncodingException;</span><br><span class="line"><span class="keyword">import</span> java.net.URLEncoder;</span><br><span class="line"><span class="keyword">import</span> java.util.HashMap;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/20</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 微信登录的控制器方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/api/ucenter/wx&quot;)</span></span><br><span class="line"><span class="meta">@CrossOrigin</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WxController</span> &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 生成微信扫描二维码</span></span><br><span class="line"><span class="comment"> * 返回给前端一些生成二维码的参数</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/getLoginParameters&quot;)</span></span><br><span class="line"> <span class="meta">@ResponseBody</span></span><br><span class="line"> <span class="keyword">public</span> Result <span class="title function_">getLoginParameters</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> HashMap&lt;String, Object&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> map.put(<span class="string">&quot;appid&quot;</span>, ConstantPropertiesUtil.WX_OPEN_APP_ID);</span><br><span class="line"> map.put(<span class="string">&quot;scope&quot;</span>, <span class="string">&quot;snsapi_login&quot;</span>);</span><br><span class="line"> map.put(<span class="string">&quot;redirect_uri&quot;</span>, URLEncoder.encode(ConstantPropertiesUtil.WX_OPEN_REDIRECT_URL, <span class="string">&quot;utf-8&quot;</span>));</span><br><span class="line"> map.put(<span class="string">&quot;state&quot;</span>, System.currentTimeMillis() + <span class="string">&quot;&quot;</span>);<span class="comment">//原样返回,可以没有</span></span><br><span class="line"> <span class="keyword">return</span> Result.ok(map);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (UnsupportedEncodingException e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="keyword">return</span> Result.fail();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>生成扫描二维码的前端部分</p>
<p>JS部分</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> request <span class="keyword">from</span> <span class="string">&#x27;@/utils/request&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">export</span> <span class="keyword">default</span> &#123;</span><br><span class="line"> <span class="comment">//获取生成二维码需要的参数信息</span></span><br><span class="line"> <span class="title function_">getLoginParam</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="title function_">request</span>(&#123;</span><br><span class="line"> <span class="attr">url</span>: <span class="string">`/api/ucenter/wx/getLoginParam`</span>,</span><br><span class="line"> <span class="attr">method</span>: <span class="string">&#x27;get&#x27;</span></span><br><span class="line"> &#125;)</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>引入api</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> weixinApi <span class="keyword">from</span> <span class="string">&quot;@/api/weixin&quot;</span>;</span><br></pre></td></tr></table></figure>
<p>在mounted()方法中初始化微信js</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="title function_">mounted</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="comment">//初始化微信js</span></span><br><span class="line"> <span class="keyword">const</span> script = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;script&#x27;</span>)</span><br><span class="line"> script.<span class="property">type</span> = <span class="string">&#x27;text/javascript&#x27;</span></span><br><span class="line"> script.<span class="property">src</span> = <span class="string">&#x27;https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js&#x27;</span></span><br><span class="line"> <span class="variable language_">document</span>.<span class="property">body</span>.<span class="title function_">appendChild</span>(script)</span><br><span class="line"> &#125;,</span><br></pre></td></tr></table></figure>
<p>在页面中微信登录按钮绑定的是weixinLogin()点击事件,所以我们要在这个方法中初始化对象</p>
<p>向后端发起请求获取生成二维码需要的参数信息</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line">weixinLogin() &#123;</span><br><span class="line"> weixinApi.getLoginParam().then((response) =&gt; &#123;</span><br><span class="line"> <span class="type">var</span> <span class="variable">obj</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">WxLogin</span>(&#123;</span><br><span class="line"> self_redirect: <span class="literal">true</span>,</span><br><span class="line"> id: <span class="string">&quot;weixinLogin&quot;</span>, <span class="comment">// 需要显示的容器id &lt;div id=&quot;weixinLogin&quot;&gt;&lt;/div&gt;</span></span><br><span class="line"> appid: response.data.appid, <span class="comment">// appid</span></span><br><span class="line"> scope: response.data.scope, <span class="comment">// 网页默认即可</span></span><br><span class="line"> redirect_uri: response.data.redirectUri, <span class="comment">// 授权成功后回调的url</span></span><br><span class="line"> state: response.data.state, <span class="comment">// 可设置为简单的随机数加session用来校验</span></span><br><span class="line"> style: <span class="string">&quot;black&quot;</span>, <span class="comment">//。二维码的样式, 提供&quot;black&quot;、&quot;white&quot;可选</span></span><br><span class="line"> href: <span class="string">&quot;&quot;</span>, <span class="comment">// 外部css文件url需要https</span></span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br></pre></td></tr></table></figure>
<p>点击微信登录之后,页面上的效果</p>
<p><img src="/pictures/image-20230421203717902.png" alt="image-20230421203717902"></p>
<h4 id="3-3-2-处理用户扫描成功之后的回调"><a href="#3-3-2-处理用户扫描成功之后的回调" class="headerlink" title="3.3.2 处理用户扫描成功之后的回调"></a>3.3.2 处理用户扫描成功之后的回调</h4><p>实现的思路:</p>
<p>用户扫描二维码 -&gt; 点击确认 -&gt; 会执行回调请求(请求配置文件中这个地址wx.open.redirect_url&#x3D;<a href="http://localhost:8160/api/ucenter/wx/callback">http://localhost:8160/api/ucenter/wx/callback</a>) -&gt; 获取回调请求中携带的参数,再根据参数获取扫描用户的信息,执行相关的操作</p>
<p>扫描成功之后发起如下的请求:</p>
<p><img src="/pictures/image-20230421205258647.png" alt="image-20230421205258647"></p>
<p><img src="/pictures/image-20230421210454720.png" alt="image-20230421210454720"></p>
<p>引入httpclient(不依赖浏览器发起请求)依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.apache.httpcomponents<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>httpclient<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>4.5.1<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>导入HttpClientUtils工具类</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> org.apache.commons.io.IOUtils;</span><br><span class="line"><span class="keyword">import</span> org.apache.commons.lang.StringUtils;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.Consts;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.HttpEntity;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.HttpResponse;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.NameValuePair;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.client.HttpClient;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.client.config.RequestConfig;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.client.config.RequestConfig.Builder;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.client.entity.UrlEncodedFormEntity;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.client.methods.HttpGet;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.client.methods.HttpPost;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.conn.ConnectTimeoutException;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.conn.ssl.SSLConnectionSocketFactory;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.conn.ssl.SSLContextBuilder;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.conn.ssl.TrustStrategy;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.conn.ssl.X509HostnameVerifier;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.entity.ContentType;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.entity.StringEntity;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.impl.client.CloseableHttpClient;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.impl.client.HttpClients;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.impl.conn.PoolingHttpClientConnectionManager;</span><br><span class="line"><span class="keyword">import</span> org.apache.http.message.BasicNameValuePair;</span><br><span class="line"><span class="keyword">import</span> javax.net.ssl.SSLContext;</span><br><span class="line"><span class="keyword">import</span> javax.net.ssl.SSLException;</span><br><span class="line"><span class="keyword">import</span> javax.net.ssl.SSLSession;</span><br><span class="line"><span class="keyword">import</span> javax.net.ssl.SSLSocket;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.net.SocketTimeoutException;</span><br><span class="line"><span class="keyword">import</span> java.security.GeneralSecurityException;</span><br><span class="line"><span class="keyword">import</span> java.security.cert.CertificateException;</span><br><span class="line"><span class="keyword">import</span> java.security.cert.X509Certificate;</span><br><span class="line"><span class="keyword">import</span> java.util.ArrayList;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"><span class="keyword">import</span> java.util.Map.Entry;</span><br><span class="line"><span class="keyword">import</span> java.util.Set;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/21</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">HttpClientUtils</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">int</span> connTimeout=<span class="number">10000</span>;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">int</span> readTimeout=<span class="number">10000</span>;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> String charset=<span class="string">&quot;UTF-8&quot;</span>;</span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="type">HttpClient</span> <span class="variable">client</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">static</span> &#123;</span><br><span class="line"> <span class="type">PoolingHttpClientConnectionManager</span> <span class="variable">cm</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PoolingHttpClientConnectionManager</span>();</span><br><span class="line"> cm.setMaxTotal(<span class="number">128</span>);</span><br><span class="line"> cm.setDefaultMaxPerRoute(<span class="number">128</span>);</span><br><span class="line"> client = HttpClients.custom().setConnectionManager(cm).build();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">postParameters</span><span class="params">(String url, String parameterStr)</span> <span class="keyword">throws</span> ConnectTimeoutException, SocketTimeoutException, Exception&#123;</span><br><span class="line"> <span class="keyword">return</span> post(url,parameterStr,<span class="string">&quot;application/x-www-form-urlencoded&quot;</span>,charset,connTimeout,readTimeout);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">postParameters</span><span class="params">(String url, String parameterStr,String charset, Integer connTimeout, Integer readTimeout)</span> <span class="keyword">throws</span> ConnectTimeoutException, SocketTimeoutException, Exception&#123;</span><br><span class="line"> <span class="keyword">return</span> post(url,parameterStr,<span class="string">&quot;application/x-www-form-urlencoded&quot;</span>,charset,connTimeout,readTimeout);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">postParameters</span><span class="params">(String url, Map&lt;String, String&gt; params)</span> <span class="keyword">throws</span> ConnectTimeoutException,</span><br><span class="line"> SocketTimeoutException, Exception &#123;</span><br><span class="line"> <span class="keyword">return</span> postForm(url, params, <span class="literal">null</span>, connTimeout, readTimeout);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">postParameters</span><span class="params">(String url, Map&lt;String, String&gt; params, Integer connTimeout,Integer readTimeout)</span> <span class="keyword">throws</span> ConnectTimeoutException,</span><br><span class="line"> SocketTimeoutException, Exception &#123;</span><br><span class="line"> <span class="keyword">return</span> postForm(url, params, <span class="literal">null</span>, connTimeout, readTimeout);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">get</span><span class="params">(String url)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="keyword">return</span> get(url, charset, <span class="literal">null</span>, <span class="literal">null</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">get</span><span class="params">(String url, String charset)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="keyword">return</span> get(url, charset, connTimeout, readTimeout);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 发送一个 Post 请求, 使用指定的字符集编码.</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> url</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> body RequestBody</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> mimeType 例如 application/xml &quot;application/x-www-form-urlencoded&quot; a=1&amp;b=2&amp;c=3</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> charset 编码</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> connTimeout 建立链接超时时间,毫秒.</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> readTimeout 响应超时时间,毫秒.</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> ResponseBody, 使用指定的字符集编码.</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@throws</span> ConnectTimeoutException 建立链接超时异常</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@throws</span> SocketTimeoutException 响应超时</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@throws</span> Exception</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">post</span><span class="params">(String url, String body, String mimeType,String charset, Integer connTimeout, Integer readTimeout)</span></span><br><span class="line"> <span class="keyword">throws</span> ConnectTimeoutException, SocketTimeoutException, Exception &#123;</span><br><span class="line"> <span class="type">HttpClient</span> <span class="variable">client</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="type">HttpPost</span> <span class="variable">post</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HttpPost</span>(url);</span><br><span class="line"> <span class="type">String</span> <span class="variable">result</span> <span class="operator">=</span> <span class="string">&quot;&quot;</span>;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (StringUtils.isNotBlank(body)) &#123;</span><br><span class="line"> <span class="type">HttpEntity</span> <span class="variable">entity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">StringEntity</span>(body, ContentType.create(mimeType, charset));</span><br><span class="line"> post.setEntity(entity);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">// 设置参数</span></span><br><span class="line"> <span class="type">Builder</span> <span class="variable">customReqConf</span> <span class="operator">=</span> RequestConfig.custom();</span><br><span class="line"> <span class="keyword">if</span> (connTimeout != <span class="literal">null</span>) &#123;</span><br><span class="line"> customReqConf.setConnectTimeout(connTimeout);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (readTimeout != <span class="literal">null</span>) &#123;</span><br><span class="line"> customReqConf.setSocketTimeout(readTimeout);</span><br><span class="line"> &#125;</span><br><span class="line"> post.setConfig(customReqConf.build());</span><br><span class="line"></span><br><span class="line"> HttpResponse res;</span><br><span class="line"> <span class="keyword">if</span> (url.startsWith(<span class="string">&quot;https&quot;</span>)) &#123;</span><br><span class="line"> <span class="comment">// 执行 Https 请求.</span></span><br><span class="line"> client = createSSLInsecureClient();</span><br><span class="line"> res = client.execute(post);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">// 执行 Http 请求.</span></span><br><span class="line"> client = HttpClientUtils.client;</span><br><span class="line"> res = client.execute(post);</span><br><span class="line"> &#125;</span><br><span class="line"> result = IOUtils.toString(res.getEntity().getContent(), charset);</span><br><span class="line"> &#125; <span class="keyword">finally</span> &#123;</span><br><span class="line"> post.releaseConnection();</span><br><span class="line"> <span class="keyword">if</span> (url.startsWith(<span class="string">&quot;https&quot;</span>) &amp;&amp; client != <span class="literal">null</span>&amp;&amp; client <span class="keyword">instanceof</span> CloseableHttpClient) &#123;</span><br><span class="line"> ((CloseableHttpClient) client).close();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> result;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 提交form表单</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> url</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> params</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> connTimeout</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> readTimeout</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> * <span class="doctag">@throws</span> ConnectTimeoutException</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@throws</span> SocketTimeoutException</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@throws</span> Exception</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">postForm</span><span class="params">(String url, Map&lt;String, String&gt; params, Map&lt;String, String&gt; headers, Integer connTimeout,Integer readTimeout)</span> <span class="keyword">throws</span> ConnectTimeoutException,</span><br><span class="line"> SocketTimeoutException, Exception &#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">HttpClient</span> <span class="variable">client</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="type">HttpPost</span> <span class="variable">post</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HttpPost</span>(url);</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (params != <span class="literal">null</span> &amp;&amp; !params.isEmpty()) &#123;</span><br><span class="line"> List&lt;NameValuePair&gt; formParams = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;NameValuePair&gt;();</span><br><span class="line"> Set&lt;Entry&lt;String, String&gt;&gt; entrySet = params.entrySet();</span><br><span class="line"> <span class="keyword">for</span> (Entry&lt;String, String&gt; entry : entrySet) &#123;</span><br><span class="line"> formParams.add(<span class="keyword">new</span> <span class="title class_">BasicNameValuePair</span>(entry.getKey(), entry.getValue()));</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">UrlEncodedFormEntity</span> <span class="variable">entity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">UrlEncodedFormEntity</span>(formParams, Consts.UTF_8);</span><br><span class="line"> post.setEntity(entity);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (headers != <span class="literal">null</span> &amp;&amp; !headers.isEmpty()) &#123;</span><br><span class="line"> <span class="keyword">for</span> (Entry&lt;String, String&gt; entry : headers.entrySet()) &#123;</span><br><span class="line"> post.addHeader(entry.getKey(), entry.getValue());</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">// 设置参数</span></span><br><span class="line"> <span class="type">Builder</span> <span class="variable">customReqConf</span> <span class="operator">=</span> RequestConfig.custom();</span><br><span class="line"> <span class="keyword">if</span> (connTimeout != <span class="literal">null</span>) &#123;</span><br><span class="line"> customReqConf.setConnectTimeout(connTimeout);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (readTimeout != <span class="literal">null</span>) &#123;</span><br><span class="line"> customReqConf.setSocketTimeout(readTimeout);</span><br><span class="line"> &#125;</span><br><span class="line"> post.setConfig(customReqConf.build());</span><br><span class="line"> <span class="type">HttpResponse</span> <span class="variable">res</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="keyword">if</span> (url.startsWith(<span class="string">&quot;https&quot;</span>)) &#123;</span><br><span class="line"> <span class="comment">// 执行 Https 请求.</span></span><br><span class="line"> client = createSSLInsecureClient();</span><br><span class="line"> res = client.execute(post);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">// 执行 Http 请求.</span></span><br><span class="line"> client = HttpClientUtils.client;</span><br><span class="line"> res = client.execute(post);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> IOUtils.toString(res.getEntity().getContent(), <span class="string">&quot;UTF-8&quot;</span>);</span><br><span class="line"> &#125; <span class="keyword">finally</span> &#123;</span><br><span class="line"> post.releaseConnection();</span><br><span class="line"> <span class="keyword">if</span> (url.startsWith(<span class="string">&quot;https&quot;</span>) &amp;&amp; client != <span class="literal">null</span></span><br><span class="line"> &amp;&amp; client <span class="keyword">instanceof</span> CloseableHttpClient) &#123;</span><br><span class="line"> ((CloseableHttpClient) client).close();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 发送一个 GET 请求</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">get</span><span class="params">(String url, String charset, Integer connTimeout,Integer readTimeout)</span></span><br><span class="line"> <span class="keyword">throws</span> ConnectTimeoutException,SocketTimeoutException, Exception &#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">HttpClient</span> <span class="variable">client</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="type">HttpGet</span> <span class="variable">get</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HttpGet</span>(url);</span><br><span class="line"> <span class="type">String</span> <span class="variable">result</span> <span class="operator">=</span> <span class="string">&quot;&quot;</span>;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">// 设置参数</span></span><br><span class="line"> <span class="type">Builder</span> <span class="variable">customReqConf</span> <span class="operator">=</span> RequestConfig.custom();</span><br><span class="line"> <span class="keyword">if</span> (connTimeout != <span class="literal">null</span>) &#123;</span><br><span class="line"> customReqConf.setConnectTimeout(connTimeout);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (readTimeout != <span class="literal">null</span>) &#123;</span><br><span class="line"> customReqConf.setSocketTimeout(readTimeout);</span><br><span class="line"> &#125;</span><br><span class="line"> get.setConfig(customReqConf.build());</span><br><span class="line"></span><br><span class="line"> <span class="type">HttpResponse</span> <span class="variable">res</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (url.startsWith(<span class="string">&quot;https&quot;</span>)) &#123;</span><br><span class="line"> <span class="comment">// 执行 Https 请求.</span></span><br><span class="line"> client = createSSLInsecureClient();</span><br><span class="line"> res = client.execute(get);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">// 执行 Http 请求.</span></span><br><span class="line"> client = HttpClientUtils.client;</span><br><span class="line"> res = client.execute(get);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> result = IOUtils.toString(res.getEntity().getContent(), charset);</span><br><span class="line"> &#125; <span class="keyword">finally</span> &#123;</span><br><span class="line"> get.releaseConnection();</span><br><span class="line"> <span class="keyword">if</span> (url.startsWith(<span class="string">&quot;https&quot;</span>) &amp;&amp; client != <span class="literal">null</span> &amp;&amp; client <span class="keyword">instanceof</span> CloseableHttpClient) &#123;</span><br><span class="line"> ((CloseableHttpClient) client).close();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> result;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 从 response 里获取 charset</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@SuppressWarnings(&quot;unused&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> String <span class="title function_">getCharsetFromResponse</span><span class="params">(HttpResponse ressponse)</span> &#123;</span><br><span class="line"> <span class="comment">// Content-Type:text/html; charset=GBK</span></span><br><span class="line"> <span class="keyword">if</span> (ressponse.getEntity() != <span class="literal">null</span> &amp;&amp; ressponse.getEntity().getContentType() != <span class="literal">null</span> &amp;&amp; ressponse.getEntity().getContentType().getValue() != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">contentType</span> <span class="operator">=</span> ressponse.getEntity().getContentType().getValue();</span><br><span class="line"> <span class="keyword">if</span> (contentType.contains(<span class="string">&quot;charset=&quot;</span>)) &#123;</span><br><span class="line"> <span class="keyword">return</span> contentType.substring(contentType.indexOf(<span class="string">&quot;charset=&quot;</span>) + <span class="number">8</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 创建 SSL连接</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> * <span class="doctag">@throws</span> GeneralSecurityException</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> CloseableHttpClient <span class="title function_">createSSLInsecureClient</span><span class="params">()</span> <span class="keyword">throws</span> GeneralSecurityException &#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">SSLContext</span> <span class="variable">sslContext</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SSLContextBuilder</span>().loadTrustMaterial(<span class="literal">null</span>, <span class="keyword">new</span> <span class="title class_">TrustStrategy</span>() &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">isTrusted</span><span class="params">(X509Certificate[] chain,String authType)</span> <span class="keyword">throws</span> CertificateException &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;).build();</span><br><span class="line"></span><br><span class="line"> <span class="type">SSLConnectionSocketFactory</span> <span class="variable">sslsf</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SSLConnectionSocketFactory</span>(sslContext, <span class="keyword">new</span> <span class="title class_">X509HostnameVerifier</span>() &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">verify</span><span class="params">(String arg0, SSLSession arg1)</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">verify</span><span class="params">(String host, SSLSocket ssl)</span></span><br><span class="line"> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">verify</span><span class="params">(String host, X509Certificate cert)</span></span><br><span class="line"> <span class="keyword">throws</span> SSLException &#123;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">verify</span><span class="params">(String host, String[] cns,</span></span><br><span class="line"><span class="params"> String[] subjectAlts)</span> <span class="keyword">throws</span> SSLException &#123;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> <span class="keyword">return</span> HttpClients.custom().setSSLSocketFactory(sslsf).build();</span><br><span class="line"></span><br><span class="line"> &#125; <span class="keyword">catch</span> (GeneralSecurityException e) &#123;</span><br><span class="line"> <span class="keyword">throw</span> e;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>Controller</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.yygh.user.controller;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.fastjson.JSONObject;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.yygh.common.result.Result;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.yygh.user.utils.ConstantPropertiesUtil;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.yygh.user.utils.HttpClientUtils;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Controller;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.CrossOrigin;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.GetMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.ResponseBody;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.UnsupportedEncodingException;</span><br><span class="line"><span class="keyword">import</span> java.net.URLEncoder;</span><br><span class="line"><span class="keyword">import</span> java.util.HashMap;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/20</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 微信登录的控制器方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/api/ucenter/wx&quot;)</span></span><br><span class="line"><span class="meta">@CrossOrigin</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WxController</span> &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 生成微信扫描二维码</span></span><br><span class="line"><span class="comment"> * 返回给前端一些生成二维码的参数</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/getLoginParam&quot;)</span></span><br><span class="line"> <span class="meta">@ResponseBody</span></span><br><span class="line"> <span class="keyword">public</span> Result <span class="title function_">getLoginParameters</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> HashMap&lt;String, Object&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> map.put(<span class="string">&quot;appid&quot;</span>, ConstantPropertiesUtil.WX_OPEN_APP_ID);</span><br><span class="line"> map.put(<span class="string">&quot;scope&quot;</span>, <span class="string">&quot;snsapi_login&quot;</span>);</span><br><span class="line"> map.put(<span class="string">&quot;redirect_uri&quot;</span>, URLEncoder.encode(ConstantPropertiesUtil.WX_OPEN_REDIRECT_URL, <span class="string">&quot;utf-8&quot;</span>));</span><br><span class="line"> map.put(<span class="string">&quot;state&quot;</span>, System.currentTimeMillis() + <span class="string">&quot;&quot;</span>);<span class="comment">//原样返回,可以没有</span></span><br><span class="line"> <span class="keyword">return</span> Result.ok(map);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (UnsupportedEncodingException e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="keyword">return</span> Result.fail();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 扫描之后回调的请求中携带了相关的参数,帮助我们获取用户的信息</span></span><br><span class="line"><span class="comment"> * 登录成功之后的回调方法</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> code 临时票据</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> state 生成微信二维码之前put进去的参数 原样返回</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/callback&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">callback</span><span class="params">(String code ,String state)</span>&#123;</span><br><span class="line"> <span class="comment">//通过code、appid和app_secret去请求固定地址换取access_token</span></span><br><span class="line"> <span class="type">StringBuffer</span> <span class="variable">baseAccessTokenUrl</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">StringBuffer</span>()</span><br><span class="line"> .append(<span class="string">&quot;https://api.weixin.qq.com/sns/oauth2/access_token&quot;</span>) <span class="comment">//请求的固定地址</span></span><br><span class="line"> .append(<span class="string">&quot;?appid=%s&quot;</span>) <span class="comment">//%s占位符</span></span><br><span class="line"> .append(<span class="string">&quot;&amp;secret=%s&quot;</span>)</span><br><span class="line"> .append(<span class="string">&quot;&amp;code=%s&quot;</span>)</span><br><span class="line"> .append(<span class="string">&quot;&amp;grant_type=authorization_code&quot;</span>);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//拼接完整之后的地址</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">accessTokenUrl</span> <span class="operator">=</span> String.format(baseAccessTokenUrl.toString(),</span><br><span class="line"> ConstantPropertiesUtil.WX_OPEN_APP_ID,</span><br><span class="line"> ConstantPropertiesUtil.WX_OPEN_APP_SECRET,</span><br><span class="line"> code);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//使用httpclient去请求这个地址换取access_token</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">accessTokenInfo</span> <span class="operator">=</span> HttpClientUtils.get(accessTokenUrl);<span class="comment">//json格式的字符串</span></span><br><span class="line"> <span class="comment">//从这个字符串中获取openid和 access_token的值</span></span><br><span class="line"> <span class="type">JSONObject</span> <span class="variable">jsonObject</span> <span class="operator">=</span> JSONObject.parseObject(accessTokenInfo);</span><br><span class="line"> <span class="type">String</span> <span class="variable">accessToken</span> <span class="operator">=</span> jsonObject.getString(<span class="string">&quot;access_token&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">openid</span> <span class="operator">=</span> jsonObject.getString(<span class="string">&quot;openid&quot;</span>);</span><br><span class="line"> <span class="comment">//根据access_token和openid获取微信用户的基本信息</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">baseUserInfoUrl</span> <span class="operator">=</span> <span class="string">&quot;https://api.weixin.qq.com/sns/userinfo&quot;</span> +</span><br><span class="line"> <span class="string">&quot;?access_token=%s&quot;</span> +</span><br><span class="line"> <span class="string">&quot;&amp;openid=%s&quot;</span>;</span><br><span class="line"> <span class="type">String</span> <span class="variable">userInfoUrl</span> <span class="operator">=</span> String.format(baseUserInfoUrl, accessToken, openid);</span><br><span class="line"> <span class="comment">//发起请求获取用户信息</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">userInfo</span> <span class="operator">=</span> HttpClientUtils.get(userInfoUrl);<span class="comment">//json格式的字符串</span></span><br><span class="line"> <span class="type">JSONObject</span> <span class="variable">parseObject</span> <span class="operator">=</span> JSONObject.parseObject(userInfo);</span><br><span class="line"> <span class="comment">//获取具体的用户信息</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">nickname</span> <span class="operator">=</span> parseObject.getString(<span class="string">&quot;nickname&quot;</span>);<span class="comment">//用户昵称</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">sex</span> <span class="operator">=</span> parseObject.getString(<span class="string">&quot;sex&quot;</span>);<span class="comment">//性别</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">language</span> <span class="operator">=</span> parseObject.getString(<span class="string">&quot;language&quot;</span>);<span class="comment">//语言</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">city</span> <span class="operator">=</span> parseObject.getString(<span class="string">&quot;city&quot;</span>);<span class="comment">//所在城市</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">province</span> <span class="operator">=</span> parseObject.getString(<span class="string">&quot;province&quot;</span>);<span class="comment">//省份</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">country</span> <span class="operator">=</span> parseObject.getString(<span class="string">&quot;country&quot;</span>);<span class="comment">//注册国家</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">headimgurl</span> <span class="operator">=</span> parseObject.getString(<span class="string">&quot;headimgurl&quot;</span>);<span class="comment">//头像的url地址</span></span><br><span class="line"> System.out.println(<span class="string">&quot;昵称:&quot;</span>+nickname+<span class="string">&quot;,性别:&quot;</span>+sex+<span class="string">&quot;,语言:&quot;</span>+language+<span class="string">&quot;,城市:&quot;</span>+city+<span class="string">&quot;,省份:&quot;</span>+province+<span class="string">&quot;,注册国家:&quot;</span>+country+<span class="string">&quot;,头像地址:&quot;</span>+headimgurl);</span><br><span class="line"> <span class="comment">//TODO 将扫码人的信息添加到数据库中</span></span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;redirect:地址信息&amp;参数信息(用户信息或者token信息等)&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>Java</tag>
</tags>
</entry>
<entry>
<title>数据校验</title>
<url>/posts/27166.html</url>
<content><![CDATA[<p> 在前端接收数据和前端向后端传递数据的时候,都需要进行数据校验,避免传入错误的信息,比如在需要传入一个非空的值时,传入了一个空字符串,需要传入邮箱号码的时候,传入的非邮箱格式的数据。同时在写接口时经常要写效验请求参数逻辑,这时候我们会常用做法是写大量的 if 与 if else 类似这样的代码大量if-else代码看起来比较混乱降低了代码的可读性。</p>
<h2 id="一-JSR303数据校验"><a href="#一-JSR303数据校验" class="headerlink" title="一.JSR303数据校验"></a>一.JSR303数据校验</h2><h3 id="1-引入依赖"><a href="#1-引入依赖" class="headerlink" title="1.引入依赖"></a>1.引入依赖</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.hibernate<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>hibernate-validator<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>6.0.7.Final<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-给实体类添加校验注解并定义自己的message提示"><a href="#2-给实体类添加校验注解并定义自己的message提示" class="headerlink" title="2.给实体类添加校验注解并定义自己的message提示"></a>2.给实体类添加校验注解并定义自己的message提示</h3><p><strong>常用的检验注解</strong></p>
<img src="/pictures/image-20230612170704286.png" alt="image-20230612170704286" style="zoom:150%;" />
<p><strong>示例</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.product.entity;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableId;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableName;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.Serializable;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"><span class="keyword">import</span> org.hibernate.validator.constraints.URL;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.validation.constraints.Min;</span><br><span class="line"><span class="keyword">import</span> javax.validation.constraints.NotBlank;</span><br><span class="line"><span class="keyword">import</span> javax.validation.constraints.NotEmpty;</span><br><span class="line"><span class="keyword">import</span> javax.validation.constraints.Pattern;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 品牌</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> JasonGong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@email</span> JasonGong@gmail.com</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@date</span> 2023-05-19 00:23:36</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@TableName(&quot;pms_brand&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">BrandEntity</span> <span class="keyword">implements</span> <span class="title class_">Serializable</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">long</span> <span class="variable">serialVersionUID</span> <span class="operator">=</span> <span class="number">1L</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 品牌id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableId</span></span><br><span class="line"> <span class="keyword">private</span> Long brandId;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 品牌名</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@NotBlank(message = &quot;品牌名必须提交&quot;)</span> <span class="comment">//非空的校验</span></span><br><span class="line"> <span class="keyword">private</span> String name;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 品牌logo地址</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@NotEmpty</span><span class="comment">//既不能为空也要符合URL的格式</span></span><br><span class="line"> <span class="meta">@URL(message = &quot;logo必须是一个合法的URL地址&quot;)</span><span class="comment">//URL的校验</span></span><br><span class="line"> <span class="keyword">private</span> String logo;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 介绍</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String descript;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 显示状态[0-不显示1-显示]</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Integer showStatus;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 检索首字母</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@NotEmpty</span></span><br><span class="line"> <span class="meta">@Pattern(regexp = &quot;^[a-zA-Z]$&quot;, message = &quot;检索首字母必须是一个字母&quot;)</span><span class="comment">//正则表达式的校验,在java中使用正则的时候不需要/符号</span></span><br><span class="line"> <span class="keyword">private</span> String firstLetter;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@NotNull</span> <span class="comment">//Integer类型不为空使用@NotNull不能使用@NotEmpty</span></span><br><span class="line"> <span class="meta">@Min(value = 0, message = &quot;排序必须大于等于0&quot;)</span><span class="comment">//最小值是0</span></span><br><span class="line"> <span class="keyword">private</span> Integer sort;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="3-开启校验功能-Valid"><a href="#3-开启校验功能-Valid" class="headerlink" title="3.开启校验功能@Valid"></a>3.开启校验功能@Valid</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Valid</span>注解开启校验</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> result 检验之后响应的结果信息</span></span><br><span class="line"><span class="comment"> * 给校验的bean后紧跟一个BindingResult就可以获取到校验的结果</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/save&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">save</span><span class="params">(<span class="meta">@Valid</span> <span class="meta">@RequestBody</span> BrandEntity brand, BindingResult result<span class="comment">/*紧跟在需要校验的字段后面*/</span>)</span>&#123;</span><br><span class="line"> <span class="keyword">if</span>(result.hasErrors())&#123;<span class="comment">//判断有没有校验的错误</span></span><br><span class="line"> Map&lt;String,String&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//获取检验的错误结果, result.getFieldErrors():校验出错的字段的集合</span></span><br><span class="line"> <span class="keyword">for</span> (FieldError fieldError : result.getFieldErrors()) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">defaultMessage</span> <span class="operator">=</span> fieldError.getDefaultMessage();<span class="comment">//获取到错误的提示</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">field</span> <span class="operator">=</span> fieldError.getField();<span class="comment">//获取错误的属性(字段)的名字</span></span><br><span class="line"> <span class="comment">//封装在一个集合中方便后期统一通过R返回结果</span></span><br><span class="line"> map.put(field,defaultMessage);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> R.error(<span class="number">400</span>,<span class="string">&quot;提交的数据不合法&quot;</span>).put(<span class="string">&quot;data&quot;</span>,map);</span><br><span class="line"> &#125;<span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//校验合格的话,就做进行业务的处理</span></span><br><span class="line"> brandService.save(brand);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> R.ok();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>测试查看返回的数据的格式,这里我们输入的都是不合法的数据格式,返回的结果如下</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;msg&quot;</span><span class="punctuation">:</span> <span class="string">&quot;提交的数据不合法&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;code&quot;</span><span class="punctuation">:</span> <span class="number">400</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;data&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;品牌名必须提交&quot;</span><span class="punctuation">,</span><span class="comment">//字段:错误信息</span></span><br><span class="line"> <span class="attr">&quot;logo&quot;</span><span class="punctuation">:</span> <span class="string">&quot;logo必须是一个合法的URL地址&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;sort&quot;</span><span class="punctuation">:</span> <span class="string">&quot;排序必须大于等于0&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;firstLetter&quot;</span><span class="punctuation">:</span> <span class="string">&quot;检索首字母必须是一个字母&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p>参数没有错误之后返回的数据</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;msg&quot;</span><span class="punctuation">:</span> <span class="string">&quot;success&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;code&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<h3 id="4-上面的代码过于冗余-我们可以直接使用统一异常处理处理数据校验的异常"><a href="#4-上面的代码过于冗余-我们可以直接使用统一异常处理处理数据校验的异常" class="headerlink" title="4.上面的代码过于冗余,我们可以直接使用统一异常处理处理数据校验的异常"></a>4.上面的代码过于冗余,我们可以直接使用统一异常处理处理数据校验的异常</h3><p>在统一异常处理类上加上数据校验异常的异常处理</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.product.exception;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.atguigu.common.utils.R;</span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.springframework.validation.BindingResult;</span><br><span class="line"><span class="keyword">import</span> org.springframework.validation.FieldError;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.MethodArgumentNotValidException;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.ExceptionHandler;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RestControllerAdvice;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.HashMap;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/6/12</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 异常处理类</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@RestControllerAdvice(basePackages = &quot;com.atguigu.gulimall.product.controller&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">GulimallExceptionControllerAdvice</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@ExceptionHandler(value = MethodArgumentNotValidException.class)</span></span><br><span class="line"> <span class="keyword">public</span> R <span class="title function_">handleValidException</span><span class="params">(MethodArgumentNotValidException e)</span>&#123;</span><br><span class="line"> log.error(<span class="string">&quot;数据校验出现问题:&#123;&#125;,异常类型:&#123;&#125;&quot;</span>,e.getMessage(),e.getClass());</span><br><span class="line"> Map&lt;String,String&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//获取检验的错误结果</span></span><br><span class="line"> <span class="type">BindingResult</span> <span class="variable">result</span> <span class="operator">=</span> e.getBindingResult();</span><br><span class="line"> <span class="keyword">for</span> (FieldError fieldError : result.getFieldErrors()) &#123;</span><br><span class="line"> <span class="comment">//获取到错误的提示</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">defaultMessage</span> <span class="operator">=</span> fieldError.getDefaultMessage();</span><br><span class="line"> <span class="comment">//获取错误的属性的名字</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">field</span> <span class="operator">=</span> fieldError.getField();</span><br><span class="line"> map.put(field,defaultMessage);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> R.error(<span class="number">400</span>,<span class="string">&quot;数据校验出现问题&quot;</span>).put(<span class="string">&quot;data&quot;</span>,map);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>这个时候上面的代码就可以简化为下面的格式,数据校验出现问题之后就直接在统一异常处理中处理了</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/save&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">save</span><span class="params">(<span class="meta">@Valid</span> <span class="meta">@RequestBody</span> BrandEntity brand )</span>&#123;</span><br><span class="line"> brandService.save(brand);</span><br><span class="line"> <span class="keyword">return</span> R.ok();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="5-分组校验功能"><a href="#5-分组校验功能" class="headerlink" title="5.分组校验功能"></a>5.分组校验功能</h3><pre><code> 例如:当我们在添加一个品牌的时候我们不需要传入这个品牌的id信息需要这个品牌的品牌名信息但是在修改这个品牌的时候我们需要这个品牌的id信息和品牌名的信息这时我们就需要使用分组校验了
</code></pre>
<h4 id="5-1-定义空接口-作为分组校验的组"><a href="#5-1-定义空接口-作为分组校验的组" class="headerlink" title="5.1 定义空接口,作为分组校验的组"></a>5.1 定义空接口,作为分组校验的组</h4><p>添加操作的组</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.common.valid;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">interface</span> <span class="title class_">AddGroup</span> &#123;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>修改操作的组</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.common.valid;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">interface</span> <span class="title class_">UpdateGroup</span> &#123;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h4 id="5-2-在实体类上添加上分组的信息"><a href="#5-2-在实体类上添加上分组的信息" class="headerlink" title="5.2 在实体类上添加上分组的信息"></a>5.2 在实体类上添加上分组的信息</h4><p><strong>注意:使用了分组校验之后,其余的字段也要加上分组信息,否则没有加上分组信息的会失效</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.product.entity;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.atguigu.common.valid.AddGroup;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.common.valid.UpdateGroup;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableId;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableName;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.Serializable;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"><span class="keyword">import</span> org.hibernate.validator.constraints.URL;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.validation.constraints.*;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@TableName(&quot;pms_brand&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">BrandEntity</span> <span class="keyword">implements</span> <span class="title class_">Serializable</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">long</span> <span class="variable">serialVersionUID</span> <span class="operator">=</span> <span class="number">1L</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 品牌id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@NotNull(message = &quot;修改必须指定品牌id&quot;, groups = &#123;UpdateGroup.class&#125;)</span><span class="comment">//在修改的时候进行校验</span></span><br><span class="line"> <span class="meta">@Null(message = &quot;新增不能指定id&quot;, groups = &#123;AddGroup.class&#125;)</span><span class="comment">//在添加的时候进行校验</span></span><br><span class="line"> <span class="meta">@TableId</span></span><br><span class="line"> <span class="keyword">private</span> Long brandId;</span><br><span class="line"> </span><br><span class="line"> </span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 品牌名</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@NotBlank(message = &quot;品牌名必须提交&quot;, groups = &#123;AddGroup.class, UpdateGroup.class&#125;)</span><span class="comment">//这个就是在添加和修改的组中都需要进行校验</span></span><br><span class="line"> <span class="keyword">private</span> String name;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h4 id="5-3-在控制层添加上相应的注解信息-指定当前是操作属于的分组"><a href="#5-3-在控制层添加上相应的注解信息-指定当前是操作属于的分组" class="headerlink" title="5.3 在控制层添加上相应的注解信息,指定当前是操作属于的分组"></a>5.3 在控制层添加上相应的注解信息,指定当前是操作属于的分组</h4><p><strong>注意:这里如果产生数据校验的出现问题的异常,会由统一异常处理进行处理</strong></p>
<p>保存的控制器方法上添加上添加分组信息</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Validated</span>(&#123;AddGroup.class&#125;) 指定使用添加分组的校验</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/save&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">save</span><span class="params">(<span class="meta">@Validated(&#123;AddGroup.class&#125;)</span> <span class="meta">@RequestBody</span> BrandEntity brand )</span>&#123;</span><br><span class="line"> brandService.save(brand);</span><br><span class="line"> <span class="keyword">return</span> R.ok();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>修改的分组上添加上修改的分组信息</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 修改</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/update&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">update</span><span class="params">(<span class="meta">@Validated(&#123;UpdateGroup.class&#125;)</span> <span class="meta">@RequestBody</span> BrandEntity brand)</span>&#123;</span><br><span class="line"> brandService.updateById(brand);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> R.ok();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>测试:我们在新增的时候加上品牌的id这时就会产生错误</p>
<p><img src="/pictures/image-20230614105450858.png" alt="image-20230614105450858"></p>
<p>修改的时候不带品牌的id信息</p>
<p><img src="/pictures/image-20230614111024292.png" alt="image-20230614111024292"></p>
<h3 id="6-自定义校验"><a href="#6-自定义校验" class="headerlink" title="6.自定义校验"></a>6.自定义校验</h3><p><strong>这里我们以编写一个输入的值只能是指定值的注解为例</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 显示状态[0-不显示1-显示]</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="comment">//注意:我们使用了分组校验所以这里也要加上分组groups</span></span><br><span class="line"><span class="meta">@ListValue(vals = &#123;0, 1&#125;, groups = &#123;AddGroup.class, UpdateGroup.class&#125;)</span><span class="comment">//自定义的注解输入的时候只能是0或者1</span></span><br><span class="line"><span class="keyword">private</span> Integer showStatus;</span><br></pre></td></tr></table></figure>
<h4 id="6-1-编写一个自定义的校验注解"><a href="#6-1-编写一个自定义的校验注解" class="headerlink" title="6.1 编写一个自定义的校验注解"></a>6.1 编写一个自定义的校验注解</h4><p>编写自定义注解</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.common.valid;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.validation.Constraint;</span><br><span class="line"><span class="keyword">import</span> javax.validation.Payload;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.lang.annotation.Documented;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.lang.annotation.Retention;</span><br><span class="line"><span class="keyword">import</span> java.lang.annotation.Target;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> <span class="keyword">static</span> java.lang.annotation.ElementType.*;</span><br><span class="line"><span class="keyword">import</span> <span class="keyword">static</span> java.lang.annotation.ElementType.TYPE_USE;</span><br><span class="line"><span class="keyword">import</span> <span class="keyword">static</span> java.lang.annotation.RetentionPolicy.RUNTIME;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/6/15</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 自定义的校验注解</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Documented</span></span><br><span class="line"><span class="meta">@Constraint(validatedBy = &#123;&#125;)</span><span class="comment">//校验注解使用的校验器</span></span><br><span class="line"><span class="meta">@Target(&#123;METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE&#125;)</span><span class="comment">//注解可以标注的位置</span></span><br><span class="line"><span class="meta">@Retention(RUNTIME)</span></span><br><span class="line"><span class="keyword">public</span> <span class="meta">@interface</span> ListValue &#123;</span><br><span class="line"></span><br><span class="line"> String <span class="title function_">message</span><span class="params">()</span> <span class="keyword">default</span> <span class="string">&quot;&#123;com.atguigu.common.valid.ListValue.message&#125;&quot;</span>;<span class="comment">//在配置文件中指明</span></span><br><span class="line"></span><br><span class="line"> Class&lt;?&gt;[] groups() <span class="keyword">default</span> &#123;&#125;;</span><br><span class="line"></span><br><span class="line"> Class&lt;? <span class="keyword">extends</span> <span class="title class_">Payload</span>&gt;[] payload() <span class="keyword">default</span> &#123;&#125;;</span><br><span class="line"></span><br><span class="line"> <span class="type">int</span>[] vals() <span class="keyword">default</span> &#123;&#125;;<span class="comment">//使用注解的时候会有vals属性 在属性里面指定值</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>编写注解中默认提示消息的配置文件</p>
<p><strong>ValidationMessages.properties</strong></p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="attr">com.atguigu.common.valid.ListValue.message</span>=<span class="string">必须提交指定的值</span></span><br></pre></td></tr></table></figure>
<h4 id="6-2-编写一个自定义的校验器"><a href="#6-2-编写一个自定义的校验器" class="headerlink" title="6.2 编写一个自定义的校验器"></a>6.2 编写一个自定义的校验器</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.common.valid;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.validation.ConstraintValidator;</span><br><span class="line"><span class="keyword">import</span> javax.validation.ConstraintValidatorContext;</span><br><span class="line"><span class="keyword">import</span> java.util.HashSet;</span><br><span class="line"><span class="keyword">import</span> java.util.Set;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/6/15</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 自定义的校验器</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ListValueConstraintValidator</span> <span class="keyword">implements</span> <span class="title class_">ConstraintValidator</span>&lt;ListValue,Integer&gt; &#123;</span><br><span class="line"> <span class="keyword">private</span> Set&lt;Integer&gt; set = <span class="keyword">new</span> <span class="title class_">HashSet</span>&lt;&gt;();<span class="comment">//创建一个set集合 用于存储指定输入的值0和1</span></span><br><span class="line"> <span class="comment">//初始化方法</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">initialize</span><span class="params">(ListValue constraintAnnotation)</span> &#123;</span><br><span class="line"> <span class="type">int</span>[] vals = constraintAnnotation.vals();<span class="comment">//@ListValue(vals = &#123;0, 1&#125;)</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> val : vals) &#123;</span><br><span class="line"> set.add(val);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//判断是否校验成功</span></span><br><span class="line"> <span class="comment">//value:需要校验的值</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">isValid</span><span class="params">(Integer integer, ConstraintValidatorContext constraintValidatorContext)</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> set.contains(integer);<span class="comment">//判断真实树的值在不在包含0和1的这个set集合中</span></span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="6-3-关联自定义的校验器和校验注解"><a href="#6-3-关联自定义的校验器和校验注解" class="headerlink" title="6.3 关联自定义的校验器和校验注解"></a>6.3 关联自定义的校验器和校验注解</h4><p>在自定义的注解上面关联上上面自定义的校验规则</p>
<p><img src="/pictures/image-20230615151144311.png" alt="image-20230615151144311"></p>
<p>测试自定义的注解</p>
<p><img src="/pictures/image-20230615152331597.png" alt="image-20230615152331597"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>Java</tag>
</tags>
</entry>
<entry>
<title>特殊符号大全</title>
<url>/posts/12367.html</url>
<content><![CDATA[<h4 id="中文字符"><a href="#中文字符" class="headerlink" title="中文字符"></a>中文字符</h4><p>零壹贰叁肆伍陆柒捌玖拾佰仟万亿吉太拍艾分厘毫微卍卐卄巜弍弎弐朤氺曱甴囍兀々〆のぁ〡〢〣〤〥〦〧〨〩㊎㊍㊌㊋㊏㊚㊛㊐㊊㊣㊤㊥㊦㊧㊨㊒㊫㊑㊓㊔㊕㊖㊗㊘㊜㊝㊞㊟㊠㊡㊢㊩㊪㊬㊭㊮㊯㊰㊀㊁㊂㊃㊄㊅㊆㊇㊈㊉</p>
<h4 id="常用特殊符号"><a href="#常用特殊符号" class="headerlink" title="常用特殊符号"></a>常用特殊符号</h4><p>❤❥웃유♋☮✌☏☢☠✔☑♚▲♪✈✞÷↑↓◆◇⊙■□△▽¿─│♥❣♂♀☿Ⓐ✍✉☣☤✘☒♛▼♫⌘☪≈←→◈◎☉★☆⊿※¡━┃♡ღツ☼☁❅♒✎©®™Σ✪✯☭➳卐√↖↗●◐Θ◤◥︻〖〗┄┆℃℉°✿ϟ☃☂✄¢€£∞✫★½✡×↙↘○◑⊕◣◢︼【】┅┇☽☾✚〓▂▃▄▅▆▇█▉▊▋▌▍▎▏↔↕☽☾の•▸◂▴▾┈┊①②③④⑤⑥⑦⑧⑨⑩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩ㍿▓♨♛❖♓☪✙┉┋☹☺☻تヅツッシÜϡﭢ™℠℗©®♥❤❥❣❦❧♡۵웃유ღ♋♂♀☿☼☀☁☂☄☾☽❄☃☈⊙☉℃℉❅✺ϟ☇♤♧♡♢♠♣♥♦☜☞☝✍☚☛☟✌✽✾✿❁❃❋❀⚘☑✓✔√☐☒✗✘ㄨ✕✖✖⋆✢✣✤✥❋✦✧✩✰✪✫✬✭✮✯❂✡★✱✲✳✴✵✶✷✸✹✺✻✼❄❅❆❇❈❉❊†☨✞✝☥☦☓☩☯☧☬☸✡♁✙♆。,、':∶;?‘’“”〝〞ˆˇ﹕︰﹔﹖﹑•¨….¸;!´?!~—ˉ|‖"〃`@﹫¡¿﹏﹋﹌︴々﹟#﹩$﹠&amp;﹪%*﹡﹢﹦﹤‐ ̄¯―﹨ˆ˜﹍﹎+&#x3D;&lt;__-\ˇ~﹉﹊()〈〉‹›﹛﹜『』〖〗[]《》〔〕{}「」【】︵︷︿︹︽_﹁﹃︻︶︸﹀︺︾ˉ﹂﹄︼☩☨☦✞✛✜✝✙✠✚†‡◉○◌◍◎●◐◑◒◓◔◕◖◗❂☢⊗⊙◘◙◍⅟½⅓⅕⅙⅛⅔⅖⅚⅜¾⅗⅝⅞⅘≂≃≄≅≆≇≈≉≊≋≌≍≎≏≐≑≒≓≔≕≖≗≘≙≚≛≜≝≞≟≠≡≢≣≤≥≦≧≨≩⊰⊱⋛⋚∫∬∭∮∯∰∱∲∳%℅‰‱㊣㊎㊍㊌㊋㊏㊐㊊㊚㊛㊤㊥㊦㊧㊨㊒㊞㊑㊒㊓㊔㊕㊖㊗㊘㊜㊝㊟㊠㊡㊢㊩㊪㊫㊬㊭㊮㊯㊰㊙㉿囍♔♕♖♗♘♙♚♛♜♝♞♟ℂℍℕℙℚℝℤℬℰℯℱℊℋℎℐℒℓℳℴ℘ℛℭ℮ℌℑℜℨ♪♫♩♬♭♮♯°øⒶ☮✌☪✡☭✯卐✐✎✏✑✒✍✉✁✂✃✄✆✉☎☏➟➡➢➣➤➥➦➧➨➚➘➙➛➜➝➞➸♐➲➳⏎➴➵➶➷➸➹➺➻➼➽←↑→↓↔↕↖↗↘↙↚↛↜↝↞↟↠↡↢↣↤↥↦↧↨➫➬➩➪➭➮➯➱↩↪↫↬↭↮↯↰↱↲↳↴↵↶↷↸↹↺↻↼↽↾↿⇀⇁⇂⇃⇄⇅⇆⇇⇈⇉⇊⇋⇌⇍⇎⇏⇐⇑⇒⇓⇔⇕⇖⇗⇘⇙⇚⇛⇜⇝⇞⇟⇠⇡⇢⇣⇤⇥⇦⇧⇨⇩⇪➀➁➂➃➄➅➆➇➈➉➊➋➌➍➎➏➐➑➒➓㊀㊁㊂㊃㊄㊅㊆㊇㊈㊉ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ⒜⒝⒞⒟⒠⒡⒢⒣⒤⒥⒦⒧⒨⒩⒪⒫⒬⒭⒮⒯⒰⒱⒲⒳⒴⒵ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿ┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋╌╍╎╏═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬◤◥◄►▶◀◣◢▲▼◥▸◂▴▾△▽▷◁⊿▻◅▵▿▹◃❏❐❑❒▀▁▂▃▄▅▆▇▉▊▋█▌▍▎▏▐░▒▓▔▕■□▢▣▤▥▦▧▨▩▪▫▬▭▮▯㋀㋁㋂㋃㋄㋅㋆㋇㋈㋉㋊㋋㏠㏡㏢㏣㏤㏥㏦㏧㏨㏩㏪㏫㏬㏭㏮㏯㏰㏱㏲㏳㏴㏵㏶㏷㏸㏹㏺㏻㏼㏽㏾㍙㍚㍛㍜㍝㍞㍟㍠㍡㍢㍣㍤㍥㍦㍧㍨㍩㍪㍫㍬㍭㍮㍯㍰㍘☰☲☱☴☵☶☳☷☯</p>
<h4 id="十二星座符号"><a href="#十二星座符号" class="headerlink" title="十二星座符号"></a>十二星座符号</h4><table>
<thead>
<tr>
<th>♈</th>
<th>♉</th>
<th>♊</th>
<th>♋</th>
<th>♌</th>
<th>♍</th>
<th>♎</th>
<th>♏</th>
<th>♐</th>
<th>♑</th>
<th>♒</th>
<th>♓</th>
</tr>
</thead>
<tbody><tr>
<td>牧羊</td>
<td>金牛</td>
<td>双子</td>
<td>巨蟹</td>
<td>狮子</td>
<td>处女</td>
<td>天秤</td>
<td>天蝎</td>
<td>射手</td>
<td>摩羯</td>
<td>水瓶</td>
<td>双鱼</td>
</tr>
</tbody></table>
<h4 id="特殊符号"><a href="#特殊符号" class="headerlink" title="特殊符号"></a>特殊符号</h4><p>♠♣♧♡♥❤❥❣♂♀✲☀☼☾☽◐◑☺☻☎☏✿❀№↑↓←→√×÷★℃℉°◆◇⊙■□△▽¿½☯✡㍿卍卐♂♀✚〓㎡♪♫♩♬㊚㊛囍㊒㊖Φ♀♂‖$@*&amp;#※卍卐Ψ♫♬♭♩♪♯♮⌒¶∮‖€£¥$</p>
<h4 id="编号序号"><a href="#编号序号" class="headerlink" title="编号序号"></a>编号序号</h4><p>①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳⓪❶❷❸❹❺❻❼❽❾❿⓫⓬⓭⓮⓯⓰⓱⓲⓳⓴㊀㊁㊂㊃㊄㊅㊆㊇㊈㊉㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩⑴⑵⑶⑷⑸⑹⑺⑻⑼⑽⑾⑿⒀⒁⒂⒃⒄⒅⒆⒇⒈⒉⒊⒋⒌⒍⒎⒏⒐⒑⒒⒓⒔⒕⒖⒗⒘⒙⒚⒛ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ⒜⒝⒞⒟⒠⒡⒢⒣⒤⒥⒦⒧⒨⒩⒪⒫⒬⒭⒮⒯⒰⒱⒲⒳⒴⒵</p>
<h4 id="数学符号"><a href="#数学符号" class="headerlink" title="数学符号"></a>数学符号</h4><p>﹢﹣×÷±&#x2F;&#x3D;≌∽≦≧≒﹤﹥≈≡≠&#x3D;≤≥&lt;&gt;≮≯∷∶∫∮∝∞∧∨∑∏∪∩∈∵∴⊥∥∠⌒⊙√∟⊿㏒㏑%‰⅟½⅓⅕⅙⅛⅔⅖⅚⅜¾⅗⅝⅞⅘≂≃≄≅≆≇≈≉≊≋≌≍≎≏≐≑≒≓≔≕≖≗≘≙≚≛≜≝≞≟≠≡≢≣≤≥≦≧≨≩⊰⊱⋛⋚∫∬∭∮∯∰∱∲∳%℅‰‱øØπ</p>
<h4 id="爱心符号"><a href="#爱心符号" class="headerlink" title="爱心符号"></a>爱心符号</h4><p>♥❣ღ♠♡♤❤❥</p>
<h4 id="标点符号"><a href="#标点符号" class="headerlink" title="标点符号"></a>标点符号</h4><p>。,、':∶;?‘’“”〝〞ˆˇ﹕︰﹔﹖﹑•¨….¸;!´?!~—ˉ|‖"〃`@﹫¡¿﹏﹋﹌︴々﹟#﹩$﹠&amp;﹪%*﹡﹢﹦﹤‐ ̄¯―﹨ˆ˜﹍﹎+&#x3D;&lt;__-\ˇ~﹉﹊()〈〉‹›﹛﹜『』〖〗[]《》〔〕{}「」【】︵︷︿︹︽_﹁﹃︻︶︸﹀︺︾ˉ﹂﹄︼❝❞</p>
<h4 id="单位符号"><a href="#单位符号" class="headerlink" title="单位符号"></a>单位符号</h4><p>°¥〒¢£℃℉﹩﹪‰﹫㎡㏕㎜㎝㎞㏎m³㎎㎏㏄º○¤%$º¹²³</p>
<h4 id="货币符号"><a href="#货币符号" class="headerlink" title="货币符号"></a>货币符号</h4><p>€£Ұ₴$₰¢₤¥₳₲₪₵元₣₱฿¤₡₮₭₩ރ円₢₥₫₦zł﷼₠₧₯₨Kčर₹ƒ₸¢</p>
<h4 id="箭头符号"><a href="#箭头符号" class="headerlink" title="箭头符号"></a>箭头符号</h4><p>↑↓←→↖↗↘↙↔↕➻➼➽➸➳➺➻➴➵➶➷➹▶►▷◁◀◄«»➩➪➫➬➭➮➯➱⏎➲➾➔➘➙➚➛➜➝➞➟➠➡➢➣➤➥➦➧➨↚↛↜↝↞↟↠↠↡↢↣↤↤↥↦↧↨⇄⇅⇆⇇⇈⇉⇊⇋⇌⇍⇎⇏⇐⇑⇒⇓⇔⇖⇗⇘⇙⇜↩↪↫↬↭↮↯↰↱↲↳↴↵↶↷↸↹☇☈↼↽↾↿⇀⇁⇂⇃⇞⇟⇠⇡⇢⇣⇤⇥⇦⇧⇨⇩⇪↺↻⇚⇛♐</p>
<h4 id="符号图案"><a href="#符号图案" class="headerlink" title="符号图案"></a>符号图案</h4><p>✐✎✏✑✒✍✉✁✂✃✄✆✉☎☏☑✓✔√☐☒✗✘ㄨ✕✖✖☢☠☣✈★☆✡囍㍿☯☰☲☱☴☵☶☳☷☜☞☝✍☚☛☟✌♤♧♡♢♠♣♥♦☀☁☂❄☃♨웃유❖☽☾☪✿♂♀✪✯☭➳卍卐√×■◆●○◐◑✙☺☻❀⚘♔♕♖♗♘♙♚♛♜♝♞♟♧♡♂♀♠♣♥❤☜☞☎☏⊙◎☺☻☼▧▨♨◐◑↔↕▪▒◊◦▣▤▥▦▩◘◈◇♬♪♩♭♪の★☆→あぃ£Ю〓§♤♥▶¤✲❈✿✲❈➹☀☂☁【】┱┲❣✚✪✣✤✥✦❉❥❦❧❃❂❁❀✄☪☣☢☠☭ღ▶▷◀◁☀☁☂☃☄★☆☇☈⊙☊☋☌☍ⓛⓞⓥⓔ╬『』∴☀♫♬♩♭♪☆∷﹌の★◎▶☺☻►◄▧▨♨◐◑↔↕↘▀▄█▌◦☼♪の☆→♧ぃ£❤▒▬♦◊◦♠♣▣۰•❤•۰►◄▧▨♨◐◑↔↕▪▫☼♦⊙●○①⊕◎Θ⊙¤㊣★☆♀◆◇◣◢◥▲▼△▽⊿◤◥✐✌✍✡✓✔✕✖♂♀♥♡☜☞☎☏⊙◎☺☻►◄▧▨♨◐◑↔↕♥♡▪▫☼♦▀▄█▌▐░▒▬♦◊◘◙◦☼♠♣▣▤▥▦▩◘◙◈♫♬♪♩♭♪✄☪☣☢☠♯♩♪♫♬♭♮☎☏☪♈ºº₪¤큐«»™♂✿♥ ◕‿-。 。◕‿◕。</p>
<h4 id="希腊字母"><a href="#希腊字母" class="headerlink" title="希腊字母"></a>希腊字母</h4><p>ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζνξοπρσηθικλμτυφχψω</p>
<h4 id="俄语字母"><a href="#俄语字母" class="headerlink" title="俄语字母"></a>俄语字母</h4><p>АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя</p>
<h4 id="汉语拼音"><a href="#汉语拼音" class="headerlink" title="汉语拼音"></a>汉语拼音</h4><p>āáǎàōóǒòēéěèīíǐìūúǔùǖǘǚǜüêɑńňɡㄅㄆㄇㄈㄉㄊㄋㄌㄍㄎㄏㄐㄑㄒㄓㄔㄕㄖㄗㄘㄙㄚㄛㄜㄝㄞㄟㄠㄡㄢㄣㄤㄥㄦㄧㄨㄩ</p>
<h4 id="日文平假名片假名"><a href="#日文平假名片假名" class="headerlink" title="日文平假名片假名"></a>日文平假名片假名</h4><p>ぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをんゔゕゖァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶヷヸヹヺ・ーヽヾヿ゠ㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ</p>
<h4 id="制表符"><a href="#制表符" class="headerlink" title="制表符"></a>制表符</h4><p>─ ━│┃╌╍╎╏┄ ┅┆┇┈ ┉┊┋┌┍┎┏┐┑┒┓└ ┕┖┗ ┘┙┚┛├┝┞┟┠┡┢┣ ┤┥┦┧┨┩┪┫┬ ┭ ┮ ┯ ┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻┼ ┽ ┾ ┿ ╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ╪ ╫ ╬═║╒╓╔ ╕╖╗╘╙╚ ╛╜╝╞╟╠ ╡╢╣╤ ╥ ╦ ╧ ╨ ╩ ╳╔ ╗╝╚ ╬ ═ ╓ ╩ ┠ ┨┯ ┷┏ ┓┗ ┛┳ ⊥ ﹃ ﹄┌ ╮ ╭ ╯╰</p>
<h4 id="皇冠符号"><a href="#皇冠符号" class="headerlink" title="皇冠符号"></a>皇冠符号</h4><p>♚ ♛ ♝ ♞ ♜ ♟ ♔ ♕ ♗ ♘ ♖ ♟</p>
<h4 id="表情符号"><a href="#表情符号" class="headerlink" title="表情符号"></a>表情符号</h4><p>😀😁😂😃😄😅😆😉😊😋😎😍😘😗😙😚☺😇😐😑😶😏😣😥😮😯😪😫😴😌😛😜😝😒😓😔😕😲😷😖😞😟😤😢😭😦😧😨😬😰😱😳😵😡😠😈👿👹👺💀👻👽👦👧👨👩👴👵👶👱👮👲👳👷👸💂🎅👰👼💆💇🙍🙎🙅🙆💁🙋🙇🙌🙏👤👥🚶🏃👯💃👫👬👭💏💑👪💪👈👉☝👆👇✌✋👌👍👎✊👊👋👏👐✍👣👀👂👃👅👄💋👓👔👕👖👗👘👙👚👛👜👝🎒💼👞👟👠👡👢👑👒🎩🎓💄💅💍🌂🙈🙉🙊🐵🐒🐶🐕🐩🐺🐱😺😸😹😻😼😽🙀😿😾🐈🐯🐅🐆🐴🐎🐮🐂🐃🐄🐷🐖🐗🐽🐏🐑🐐🐪🐫🐘🐭🐁🐀🐹🐰🐇🐻🐨🐼🐾🐔🐓🐣🐤🐥🐦🐧🐸🐊🐢🐍🐲🐉🐳🐋🐬🐟🐠🐡🐙🐚🐌🐛🐜🐝🐞🦋💐🌸💮🌹🌺🌻🌼🌷🌱🌲🌳🌴🌵🌾🌿🍀🍁🍂🍃🌍🌎🌏🌐🌑🌒🌓🌔🌕🌖🌗🌘🌙🌚🌛🌜☀🌝🌞⭐🌟🌠☁⛅☔⚡❄🔥💧🌊💩🍇🍈🍉🍊🍋🍌🍍🍎🍏🍐🍑🍒🍓🍅🍆🌽🍄🌰🍞🍖🍗🍔🍟🍕🍳🍲🍱🍘🍙🍚🍛🍜🍝🍠🍢🍣🍤🍥🍡🍦🍧🍨🍩🍪🎂🍰🍫🍬🍭🍮🍯🍼☕🍵🍶🍷🍸🍹🍺🍻🍴🎪🎭🎨🎰🚣🛀🎫🏆⚽⚾🏀🏈🏉🎾🎱🎳⛳🎣🎽🎿🏂🏄🏇🏊🚴🚵🎯🎮🎲🎷🎸🎺🎻🎬👾🌋🗻🏠🏡🏢🏣🏤🏥🏦🏨🏩🏪🏫🏬🏭🏯🏰💒🗼🗽⛪⛲🌁🌃🌆🌇🌉🌌🎠🎡🎢🚂🚃🚄🚅🚆🚇🚈🚉🚊🚝🚞🚋🚌🚍🚎🚏🚐🚑🚒🚓🚔🚕🚖🚗🚘🚚🚛🚜🚲⛽🚨🚥🚦🚧⚓⛵🚤🚢✈💺🚁🚟🚠🚡🚀🎑🗿🛂🛃🛄🛅💌💎🔪💈🚪🚽🚿🛁⌛⏳⌚⏰🎈🎉🎊🎎🎏🎐🎀🎁📯📻📱📲☎📞📟📠🔋🔌💻💽💾💿📀🎥📺📷📹📼🔍🔎🔬🔭📡💡🔦🏮📔📕📖📗📘📙📚📓📃📜📄📰📑🔖💰💴💵💶💷💸💳✉📧📨📩📤📥📦📫📪📬📭📮✏✒📝📁📂📅📆📇📈📉📊📋📌📍📎📏📐✂🔒🔓🔏🔐🔑🔨🔫🔧🔩🔗💉💊🚬🔮🚩🎌💦💨💣☠♠♥♦♣🀄🎴🔇🔈🔉🔊📢📣💤💢💬💭♨🌀🔔🔕✡✝🔯📛🔰🔱⭕✅☑✔✖❌❎➕➖➗➰➿〽✳✴❇‼⁉❓❔❕❗©®™🎦🔅🔆💯🔠🔡🔢🔣🔤🅰🆎🅱🆑🆒🆓ℹ🆔Ⓜ🆕🆖🅾🆗🅿🆘🆙🆚🈁🈂🈷🈶🈯🉐🈹🈚🈲🉑🈸🈴🈳㊗㊙🈺🈵▪▫◻◼◽◾⬛⬜🔶🔷🔸🔹🔺🔻💠🔲🔳⚪⚫🔴🔵♈♉♊♋♌♍♎♏♐♑♒♓⛎💘❤💓💔💕💖💗💙💚💛💜💝💞💟❣🌿🚧💒☎📟💽⬆↗➡↘⬇↙⬅↖↕↔↩↪⤴⤵🔃🔄🔙🔚🔛🔜🔝🔀🔁🔂▶⏩◀⏪🔼⏫🔽⏬📱📶📳📴♻🏧🚮🚰♿🚹🚺🚻🚼🚾⚠🚸⛔🚫🚳🚭🚯🚱🚷🔞</p>
<p>汉语字典为您提供特殊符号大全,网名符号,特殊符号☎☏✄☪☣☢☠♨« »큐〓㊚㊛囍㊒㊖☑✔☐☒✘㍿☯☰☷♥♠♤❤♂♀★☆☯✡※卍卐■□◆◇▲△▂▃▄▅▆▇█●○◎⊕⊙㊣↑↓←→↖↗↘↙㎡№§※≡✿ⓛⓞⓥⓔ∞∑√øπ×÷±∫∵∴⊥∥∠€¥℃™©®①❶㊀㈠⑴⒈Ⓐⓐ⒜</p>
<p>转载于: <a href="https://shijianchuo.net/tesufuhao">https://shijianchuo.net/tesufuhao</a></p>
]]></content>
<categories>
<category>其它</category>
</categories>
<tags>
<tag>特殊符号</tag>
</tags>
</entry>
<entry>
<title>简历模板</title>
<url>/posts/29250.html</url>
<content><![CDATA[<p>黑马程序员新版Java面试专题视频教程java八股文面试全套真题+深度详解(含大厂高频面试真题) <a href="https://www.bilibili.com/video/BV1yT411H7YK/?share_source=copy_web&vd_source=aee5e475191b69e6c781059ab6662584">https://www.bilibili.com/video/BV1yT411H7YK/?share_source=copy_web&amp;vd_source=aee5e475191b69e6c781059ab6662584</a></p>
<h2 id="Java批注简历标准"><a href="#Java批注简历标准" class="headerlink" title="Java批注简历标准"></a>Java批注简历标准</h2><p><img src="/pictures/image-20230508235133469.png" alt="image-20230508235133469"></p>
<h2 id="面试参考话术"><a href="#面试参考话术" class="headerlink" title="面试参考话术"></a>面试参考话术</h2>
<div class="row">
<embed src="/pdf/【必看】面试参考话术.pdf" width="100%" height="550" type="application/pdf">
</div>
<h2 id="模板"><a href="#模板" class="headerlink" title="模板"></a>模板</h2><p>全部的模板地址: <a href="https://github.com/JasonsGong/resume">JasonsGong&#x2F;resume: 简历模板 (github.com)</a></p>
<h3 id="模板一-本科一年经验"><a href="#模板一-本科一年经验" class="headerlink" title="模板一 本科一年经验"></a>模板一 本科一年经验</h3>
<div class="row">
<embed src="/pdf/【参考】1年_本科.pdf" width="100%" height="550" type="application/pdf">
</div>
<h3 id="模板二-Java开发-AAA-N年"><a href="#模板二-Java开发-AAA-N年" class="headerlink" title="模板二 Java开发_AAA_N年"></a>模板二 Java开发_AAA_N年</h3>
<div class="row">
<embed src="/pdf/Java开发_AAA_N年.pdf" width="100%" height="550" type="application/pdf">
</div>
<h3 id="模板三-灰蓝色色时尚简历模板"><a href="#模板三-灰蓝色色时尚简历模板" class="headerlink" title="模板三 灰蓝色色时尚简历模板"></a>模板三 灰蓝色色时尚简历模板</h3>
<div class="row">
<embed src="/pdf/灰蓝色色时尚简历模板.pdf" width="100%" height="550" type="application/pdf">
</div>
<h3 id="模板四-灰色大气简约简历模板"><a href="#模板四-灰色大气简约简历模板" class="headerlink" title="模板四 灰色大气简约简历模板"></a>模板四 灰色大气简约简历模板</h3>
<div class="row">
<embed src="/pdf/灰色大气简约简历模板.pdf" width="100%" height="550" type="application/pdf">
</div>
<h3 id="模板五-简约大气橙色简历模板"><a href="#模板五-简约大气橙色简历模板" class="headerlink" title="模板五 简约大气橙色简历模板"></a>模板五 简约大气橙色简历模板</h3>
<div class="row">
<embed src="/pdf/简约大气橙色简历模板.pdf" width="100%" height="550" type="application/pdf">
</div>
<h3 id="模板六-经典风格简历模板"><a href="#模板六-经典风格简历模板" class="headerlink" title="模板六 经典风格简历模板"></a>模板六 经典风格简历模板</h3>
<div class="row">
<embed src="/pdf/经典风格简历模板.pdf" width="100%" height="550" type="application/pdf">
</div>
<h3 id="模板七-时尚线条简历模板"><a href="#模板七-时尚线条简历模板" class="headerlink" title="模板七 时尚线条简历模板"></a>模板七 时尚线条简历模板</h3>
<div class="row">
<embed src="/pdf/时尚线条简历模板.pdf" width="100%" height="550" type="application/pdf">
</div>
<h3 id="模板八-科技版简历模板"><a href="#模板八-科技版简历模板" class="headerlink" title="模板八 科技版简历模板"></a>模板八 科技版简历模板</h3>
<div class="row">
<embed src="/pdf/科技版简历模板.pdf" width="100%" height="550" type="application/pdf">
</div>
<h3 id="模板九-JAVA开发-李传播-5年"><a href="#模板九-JAVA开发-李传播-5年" class="headerlink" title="模板九 JAVA开发_李传播_5年"></a>模板九 JAVA开发_李传播_5年</h3>
<div class="row">
<embed src="/pdf/JAVA开发_李传播_5年.pdf" width="100%" height="550" type="application/pdf">
</div>
]]></content>
<categories>
<category>面试</category>
</categories>
<tags>
<tag>简历</tag>
</tags>
</entry>
<entry>
<title>统一异常处理</title>
<url>/posts/31385.html</url>
<content><![CDATA[<p>我们想让异常结果也显示为统一的返回结果对象,并且统一处理系统的异常信息,那么需要统一异常处理。</p>
<p><img src="/pictures/image-20230506153955544.png" alt="image-20230506153955544"></p>
<h2 id="1-全局异常处理"><a href="#1-全局异常处理" class="headerlink" title="1.全局异常处理"></a>1.全局异常处理</h2><p>异常返回的结果也为统一的返回结果的对象</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.common.exception;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.atguigu.common.result.Result;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.ControllerAdvice;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.ExceptionHandler;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.ResponseBody;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/6</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 全局的异常处理器</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@ControllerAdvice</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">GlobalExceptionHandler</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 全局的异常处理</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@ExceptionHandler(Exception.class)</span> <span class="comment">//标记什么异常使用该方法</span></span><br><span class="line"> <span class="meta">@ResponseBody</span> <span class="comment">//返回的是json数据</span></span><br><span class="line"> <span class="keyword">public</span> Result <span class="title function_">error</span><span class="params">(Exception e)</span>&#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="keyword">return</span> Result.fail().message(<span class="string">&quot;全局异常处理器捕获到该异常&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 特定的异常处理(先找特定的异常 再找全局的异常)</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@ExceptionHandler(ArithmeticException.class)</span> <span class="comment">//标记什么异常使用该方法</span></span><br><span class="line"> <span class="meta">@ResponseBody</span> <span class="comment">//返回的是json数据</span></span><br><span class="line"> <span class="keyword">public</span> Result <span class="title function_">error</span><span class="params">(ArithmeticException e)</span>&#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="keyword">return</span> Result.fail().message(<span class="string">&quot;数学运算异常&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 自定义异常处理</span></span><br><span class="line"><span class="comment"> * GuiguException为自定义的异常</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@ExceptionHandler(GuiguException.class)</span> <span class="comment">//标记什么异常使用该方法</span></span><br><span class="line"> <span class="meta">@ResponseBody</span> <span class="comment">//返回的是json数据</span></span><br><span class="line"> <span class="keyword">public</span> Result <span class="title function_">error</span><span class="params">(GuiguException e)</span>&#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="comment">//获取抛出异常的时候填入的code和message的值并返回</span></span><br><span class="line"> <span class="keyword">return</span> Result.fail().code(e.getCode()).message(e.getMessage());</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="2-自定义异常"><a href="#2-自定义异常" class="headerlink" title="2.自定义异常"></a>2.自定义异常</h2><h3 id="创建异常类-继承RuntimeException"><a href="#创建异常类-继承RuntimeException" class="headerlink" title="创建异常类 继承RuntimeException"></a>创建异常类 继承RuntimeException</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.common.exception;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.atguigu.common.result.ResultCodeEnum;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/6</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 自定义的异常</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">GuiguException</span> <span class="keyword">extends</span> <span class="title class_">RuntimeException</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 异常的状态码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Integer code;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 描述信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String message;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 通过状态码和错误消息创建异常对象</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">GuiguException</span><span class="params">(Integer code, String message)</span> &#123;</span><br><span class="line"> <span class="built_in">super</span>(message);</span><br><span class="line"> <span class="built_in">this</span>.code = code;</span><br><span class="line"> <span class="built_in">this</span>.message = message;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 接收枚举类型对象</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> resultCodeEnum 枚举类型的结果信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">GuiguException</span><span class="params">(ResultCodeEnum resultCodeEnum)</span> &#123;</span><br><span class="line"> <span class="built_in">super</span>(resultCodeEnum.getMessage());</span><br><span class="line"> <span class="built_in">this</span>.code = resultCodeEnum.getCode();</span><br><span class="line"> <span class="built_in">this</span>.message = resultCodeEnum.getMessage();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">toString</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;GuliException&#123;&quot;</span> +</span><br><span class="line"> <span class="string">&quot;code=&quot;</span> + code +</span><br><span class="line"> <span class="string">&quot;, message=&quot;</span> + <span class="built_in">this</span>.getMessage() +</span><br><span class="line"> <span class="string">&#x27;&#125;&#x27;</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="在需要抛出自定义异常的地方抛出异常"><a href="#在需要抛出自定义异常的地方抛出异常" class="headerlink" title="在需要抛出自定义异常的地方抛出异常"></a>在需要抛出自定义异常的地方抛出异常</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查询所有的方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@ApiOperation(&quot;查询所有角色的接口&quot;)</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/findAll&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> Result&lt;List&lt;SysRole&gt;&gt; <span class="title function_">findAll</span><span class="params">()</span> &#123;</span><br><span class="line"> List&lt;SysRole&gt; sysRoles = sysRoleService.list();</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//这里我们使用除零模拟异常</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">1</span>/<span class="number">0</span>;</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">GuiguException</span>(<span class="number">2001</span>, <span class="string">&quot;抛出了自定义的异常&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> Result.ok(sysRoles);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h3 id="全局异常处理器捕获异常并返回异常信息"><a href="#全局异常处理器捕获异常并返回异常信息" class="headerlink" title="全局异常处理器捕获异常并返回异常信息"></a>全局异常处理器捕获异常并返回异常信息</h3><p><img src="/pictures/image-20230506154605339.png" alt="image-20230506154605339"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>Java</tag>
</tags>
</entry>
<entry>
<title>数据结构与算法</title>
<url>/posts/40445.html</url>
<content><![CDATA[<p>代码仓库的地址:<a href="https://gitee.com/JasonsGong/DataStructures">https://gitee.com/JasonsGong/DataStructures</a></p>
<h2 id="一-经典算法问题"><a href="#一-经典算法问题" class="headerlink" title="一.经典算法问题"></a>一.经典算法问题</h2><p>字符串匹配 KMP算法 </p>
<p>汉诺塔问题 分治算法</p>
<p>八皇后问题 回溯算法 </p>
<p>马踏棋盘问题 图的深度优化遍历算法(DFS)和 贪心算法优化</p>
<h2 id="二-数据结构与算法的概述"><a href="#二-数据结构与算法的概述" class="headerlink" title="二.数据结构与算法的概述"></a>二.数据结构与算法的概述</h2><h3 id="2-1-数据结构与算法的关系"><a href="#2-1-数据结构与算法的关系" class="headerlink" title="2.1 数据结构与算法的关系"></a>2.1 数据结构与算法的关系</h3><p>1数据(data)结构(structure)是一门研究组织数据方式的学科,有了编程语言也就有了数据结构,学好了数据结构可以编写出更加漂亮,更加有效率的代码。</p>
<p>2程序&#x3D;数据结构+算法</p>
<p>3数据结构是算法的基础</p>
<h3 id="2-2解决实际的问题"><a href="#2-2解决实际的问题" class="headerlink" title="2.2解决实际的问题"></a>2.2解决实际的问题</h3><p>五子棋程序 稀疏数组(压缩存档) 二维数组-&gt;转化成稀疏数组-&gt;存档 读档反之</p>
<p>约瑟夫问题(丢手帕问题) 单向环形列表</p>
<p>修路问题 求最小生成树 + 普利姆算法</p>
<p>最短路径问题 图+弗洛伊德算法</p>
<h3 id="2-3-数据结构"><a href="#2-3-数据结构" class="headerlink" title="2.3 数据结构"></a>2.3 数据结构</h3><p>线性结构:</p>
<p> 线性结构作为最常用的数据结构,其特点是数据元素之间存在一对一的线性关系</p>
<p> 线性结构有两种不同的存储结构,即顺序存储结构和链式存储结构。顺序存储的线性表称为顺序表,顺序表中的存储元素是连续的</p>
<p> 链式存储的线性表称为链表,链表中的存储元素不一定是连续的,元素节点中存放数据元素以及相邻元素的地址信息</p>
<p> 线性结构常见的有:数组、队列、链表和栈</p>
<p>非线性结构:</p>
<p> 二维数组,多维数组,广义表,树结构,图结构</p>
<h2 id="三-稀疏数组和队列"><a href="#三-稀疏数组和队列" class="headerlink" title="三.稀疏数组和队列"></a>三.稀疏数组和队列</h2><h3 id="3-1稀疏数组"><a href="#3-1稀疏数组" class="headerlink" title="3.1稀疏数组"></a>3.1稀疏数组</h3><h4 id="3-1-1-基本的介绍"><a href="#3-1-1-基本的介绍" class="headerlink" title="3.1.1 基本的介绍"></a>3.1.1 基本的介绍</h4><p> 当一个数组中大部分元素为0,或者为同一个值的数组时,可以使用稀疏数组来保存该数组。</p>
<p>稀疏数组的处理方法是:</p>
<p> 1)记录数组一共有几行几列,有多少个不同的值</p>
<p> 2)把具有不同值的元素的行列及值记录在一个小规模的数组中,从而缩小程序的规模</p>
<h4 id="3-1-2使用的场景"><a href="#3-1-2使用的场景" class="headerlink" title="3.1.2使用的场景"></a>3.1.2使用的场景</h4><p> 五子棋程序的存档和退出功能的实现</p>
<h4 id="3-1-3图解"><a href="#3-1-3图解" class="headerlink" title="3.1.3图解"></a>3.1.3图解</h4><p>第一行记录的是原始的数组有几行几列有几个非零的值 例如下面的数组是一个6行7列有8个非零值的数组</p>
<p><img src="/pictures/image-20230313124552408.png" alt="image-20230313124552408"></p>
<h4 id="3-1-5实现的思路"><a href="#3-1-5实现的思路" class="headerlink" title="3.1.5实现的思路"></a>3.1.5实现的思路</h4><p><img src="/pictures/image-20230318100138197.png" alt="image-20230318100138197"></p>
<h4 id="3-1-5代码实现"><a href="#3-1-5代码实现" class="headerlink" title="3.1.5代码实现"></a>3.1.5代码实现</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.sparsearray;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/3/18</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 稀疏数组的代码实现 稀疏数组和二维数组之间的互转</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">SparseArray</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//创建一个原始的二维数组</span></span><br><span class="line"> <span class="comment">//0:表示没有棋子 1:表示黑子 2:表示白子</span></span><br><span class="line"> <span class="type">int</span>[][] chessArr1 = <span class="keyword">new</span> <span class="title class_">int</span>[<span class="number">11</span>][<span class="number">11</span>];</span><br><span class="line"> chessArr1[<span class="number">1</span>][<span class="number">2</span>] = <span class="number">1</span>;</span><br><span class="line"> chessArr1[<span class="number">2</span>][<span class="number">3</span>] = <span class="number">2</span>;</span><br><span class="line"> chessArr1[<span class="number">4</span>][<span class="number">5</span>] = <span class="number">1</span>;</span><br><span class="line"> <span class="comment">//遍历输出</span></span><br><span class="line"> System.out.println(<span class="string">&quot;原始的二维数组&quot;</span>);</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span>[] row : chessArr1) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> num : row) &#123;</span><br><span class="line"> System.out.print(num + <span class="string">&quot; &quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">//将二维数组转化成稀疏数组</span></span><br><span class="line"> <span class="comment">//获取原始二维数组中非零元素的个数</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">sum</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span>[] row : chessArr1) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> num : row) &#123;</span><br><span class="line"> <span class="keyword">if</span> (num != <span class="number">0</span>) &#123;</span><br><span class="line"> sum++;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;非零元素的个数:&quot;</span> + sum);</span><br><span class="line"> <span class="comment">//根据非零的元素的个数创建对应的稀疏数组</span></span><br><span class="line"> <span class="type">int</span>[][] sparseArr2 = <span class="keyword">new</span> <span class="title class_">int</span>[sum + <span class="number">1</span>][<span class="number">3</span>];</span><br><span class="line"> <span class="comment">//给稀疏数组赋值</span></span><br><span class="line"> <span class="comment">//第一行的赋值操作</span></span><br><span class="line"> sparseArr2[<span class="number">0</span>][<span class="number">0</span>] = <span class="number">11</span>;</span><br><span class="line"> sparseArr2[<span class="number">0</span>][<span class="number">1</span>] = <span class="number">11</span>;</span><br><span class="line"> sparseArr2[<span class="number">0</span>][<span class="number">2</span>] = sum;</span><br><span class="line"> <span class="comment">//其余行的赋值操作</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">row</span> <span class="operator">=</span> <span class="number">1</span>; <span class="comment">//充当计数器的作用</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; chessArr1.length; i++) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">j</span> <span class="operator">=</span> <span class="number">0</span>; j &lt; chessArr1[i].length; j++) &#123;</span><br><span class="line"> <span class="keyword">if</span> (chessArr1[i][j] != <span class="number">0</span>) &#123;</span><br><span class="line"> sparseArr2[row][<span class="number">0</span>] = i;</span><br><span class="line"> sparseArr2[row][<span class="number">1</span>] = j;</span><br><span class="line"> sparseArr2[row][<span class="number">2</span>] = chessArr1[i][j];</span><br><span class="line"> row++;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">//遍历稀疏数组</span></span><br><span class="line"> System.out.println(<span class="string">&quot;得到的稀疏数组如下&quot;</span>);</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span>[] ints : sparseArr2) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> anInt : ints) &#123;</span><br><span class="line"> System.out.print(anInt + <span class="string">&quot; &quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">//将稀疏数组转化成二维数组</span></span><br><span class="line"> <span class="comment">//获取原先的二维数组的大小</span></span><br><span class="line"> <span class="comment">//读取第一行 获取原始二维数组的行列值</span></span><br><span class="line"> <span class="type">int</span>[][] sparseArr3 = <span class="keyword">new</span> <span class="title class_">int</span>[sparseArr2[<span class="number">0</span>][<span class="number">0</span>]][sparseArr2[<span class="number">0</span>][<span class="number">1</span>]];</span><br><span class="line"> <span class="comment">//遍历稀疏数组第二行之后的值 赋值给原始的数组 从第二行开始算</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">1</span>; i &lt; sparseArr2.length; i++) &#123;</span><br><span class="line"> sparseArr3[sparseArr2[i][<span class="number">0</span>]][sparseArr2[i][<span class="number">1</span>]] = sparseArr2[i][<span class="number">2</span>];</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//遍历还原之后的二维数组</span></span><br><span class="line"> System.out.println(<span class="string">&quot;稀疏数组还原成二维数组&quot;</span>);</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span>[] ints : sparseArr3) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> anInt : ints) &#123;</span><br><span class="line"> System.out.print(anInt+<span class="string">&quot; &quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h3 id="3-2队列"><a href="#3-2队列" class="headerlink" title="3.2队列"></a>3.2队列</h3><h4 id="3-2-1基本的介绍"><a href="#3-2-1基本的介绍" class="headerlink" title="3.2.1基本的介绍"></a>3.2.1基本的介绍</h4><p>先进先出</p>
<p> 队列是一个有序列表,可以通过数组或者链表实现。</p>
<p> 遵循先入先出的原则。即:先存入队列的数据,要先取出。后存入队列的数据要后取出。</p>
<h4 id="3-2-2代码实现"><a href="#3-2-2代码实现" class="headerlink" title="3.2.2代码实现"></a>3.2.2代码实现</h4><p> 使用数组模拟队列 </p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.queue;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Scanner;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/3/18</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 使用数组模拟队列</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ArrayQueueDemo</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//测试一把</span></span><br><span class="line"> <span class="comment">//创建一个队列</span></span><br><span class="line"> <span class="type">ArrayQueue</span> <span class="variable">queue</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ArrayQueue</span>(<span class="number">3</span>);</span><br><span class="line"> <span class="type">char</span> <span class="variable">key</span> <span class="operator">=</span> <span class="string">&#x27; &#x27;</span>; <span class="comment">//接收用户输入</span></span><br><span class="line"> <span class="type">Scanner</span> <span class="variable">scanner</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Scanner</span>(System.in);<span class="comment">//</span></span><br><span class="line"> <span class="type">boolean</span> <span class="variable">loop</span> <span class="operator">=</span> <span class="literal">true</span>;</span><br><span class="line"> <span class="comment">//输出一个菜单</span></span><br><span class="line"> <span class="keyword">while</span> (loop) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;s(show): 显示队列&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;e(exit): 退出程序&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;a(add): 添加数据到队列&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;g(get): 从队列取出数据&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;h(head): 查看队列头的数据&quot;</span>);</span><br><span class="line"> key = scanner.next().charAt(<span class="number">0</span>);<span class="comment">//接收一个字符</span></span><br><span class="line"> <span class="keyword">switch</span> (key) &#123;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&#x27;s&#x27;</span>:</span><br><span class="line"> queue.showQueue();</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&#x27;a&#x27;</span>:</span><br><span class="line"> System.out.println(<span class="string">&quot;输出一个数&quot;</span>);</span><br><span class="line"> <span class="type">int</span> <span class="variable">value</span> <span class="operator">=</span> scanner.nextInt();</span><br><span class="line"> queue.addQueue(value);</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&#x27;g&#x27;</span>: <span class="comment">//取出数据</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">res</span> <span class="operator">=</span> queue.getQueue();</span><br><span class="line"> System.out.printf(<span class="string">&quot;取出的数据是%d\n&quot;</span>, res);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> <span class="comment">// <span class="doctag">TODO:</span> handle exception</span></span><br><span class="line"> System.out.println(e.getMessage());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&#x27;h&#x27;</span>: <span class="comment">//查看队列头的数据</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">res</span> <span class="operator">=</span> queue.headQueue();</span><br><span class="line"> System.out.printf(<span class="string">&quot;队列头的数据是%d\n&quot;</span>, res);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> <span class="comment">// <span class="doctag">TODO:</span> handle exception</span></span><br><span class="line"> System.out.println(e.getMessage());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&#x27;e&#x27;</span>: <span class="comment">//退出</span></span><br><span class="line"> scanner.close();</span><br><span class="line"> loop = <span class="literal">false</span>;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">default</span>:</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> System.out.println(<span class="string">&quot;程序退出~~&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 使用数组模拟队列-编写一个ArrayQueue类</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">ArrayQueue</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> maxSize; <span class="comment">// 表示数组的最大容量</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> front; <span class="comment">// 队列头</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> rear; <span class="comment">// 队列尾</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span>[] arr; <span class="comment">// 该数据用于存放数据, 模拟队列</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">// 创建队列的构造器</span></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">ArrayQueue</span><span class="params">(<span class="type">int</span> arrMaxSize)</span> &#123;</span><br><span class="line"> maxSize = arrMaxSize;</span><br><span class="line"> arr = <span class="keyword">new</span> <span class="title class_">int</span>[maxSize];</span><br><span class="line"> front = -<span class="number">1</span>; <span class="comment">// 指向队列头部分析出front是指向队列头的前一个位置.</span></span><br><span class="line"> rear = -<span class="number">1</span>; <span class="comment">// 指向队列尾,指向队列尾的数据(即就是队列最后一个数据)</span></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 判断队列是否满</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">isFull</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> rear == maxSize - <span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 判断队列是否为空</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">isEmpty</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> rear == front;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 添加数据到队列</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">addQueue</span><span class="params">(<span class="type">int</span> n)</span> &#123;</span><br><span class="line"> <span class="comment">// 判断队列是否满</span></span><br><span class="line"> <span class="keyword">if</span> (isFull()) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;队列满,不能加入数据~&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> rear++; <span class="comment">// 让rear 后移</span></span><br><span class="line"> arr[rear] = n;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 获取队列的数据, 出队列</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">getQueue</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">// 判断队列是否空</span></span><br><span class="line"> <span class="keyword">if</span> (isEmpty()) &#123;</span><br><span class="line"> <span class="comment">// 通过抛出异常</span></span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;队列空,不能取数据&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> front++; <span class="comment">// front后移</span></span><br><span class="line"> <span class="keyword">return</span> arr[front];</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 显示队列的所有数据</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">showQueue</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">// 遍历</span></span><br><span class="line"> <span class="keyword">if</span> (isEmpty()) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;队列空的,没有数据~~&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; arr.length; i++) &#123;</span><br><span class="line"> System.out.printf(<span class="string">&quot;arr[%d]=%d\n&quot;</span>, i, arr[i]);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 显示队列的头数据, 注意不是取出数据</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">headQueue</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">// 判断</span></span><br><span class="line"> <span class="keyword">if</span> (isEmpty()) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;队列空的,没有数据~~&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> arr[front + <span class="number">1</span>];</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="3-2-3-数组模拟环形队列"><a href="#3-2-3-数组模拟环形队列" class="headerlink" title="3.2.3 数组模拟环形队列"></a>3.2.3 数组模拟环形队列</h4><p>环形队列的思路分析</p>
<ul>
<li>环形队列满的条件:(rear + 1) % maxSize &#x3D;&#x3D; front</li>
<li>环形队列空的条件:rear &#x3D;&#x3D; front</li>
<li>环形队列中有效数据的个数: (rear + maxSize - front) % maxSize</li>
</ul>
<p><img src="/pictures/image-20230428124659873.png" alt="image-20230428124659873"></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.queue;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Scanner;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/28</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 模拟环形队列</span></span><br><span class="line"><span class="comment"> * &lt;p&gt;</span></span><br><span class="line"><span class="comment"> * 环形队列满的条件:(rear + 1) % maxSize == front</span></span><br><span class="line"><span class="comment"> * 环形队列空的条件:rear == front</span></span><br><span class="line"><span class="comment"> * 环形队列中有效数据的个数: (rear + maxSize - front) % maxSize</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">CircleArrayQueueDemo</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//创建一个队列</span></span><br><span class="line"> System.out.println(<span class="string">&quot;测试环形队列&quot;</span>);</span><br><span class="line"> <span class="type">CircleArray</span> <span class="variable">queue</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">CircleArray</span>(<span class="number">3</span>);</span><br><span class="line"> <span class="type">char</span> <span class="variable">key</span> <span class="operator">=</span> <span class="string">&#x27; &#x27;</span>; <span class="comment">//接收用户输入</span></span><br><span class="line"> <span class="type">Scanner</span> <span class="variable">scanner</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Scanner</span>(System.in);<span class="comment">//</span></span><br><span class="line"> <span class="type">boolean</span> <span class="variable">loop</span> <span class="operator">=</span> <span class="literal">true</span>;</span><br><span class="line"> <span class="comment">//输出一个菜单</span></span><br><span class="line"> <span class="keyword">while</span> (loop) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;s(show): 显示队列&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;e(exit): 退出程序&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;a(add): 添加数据到队列&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;g(get): 从队列取出数据&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;h(head): 查看队列头的数据&quot;</span>);</span><br><span class="line"> key = scanner.next().charAt(<span class="number">0</span>);<span class="comment">//接收一个字符</span></span><br><span class="line"> <span class="keyword">switch</span> (key) &#123;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&#x27;s&#x27;</span>:</span><br><span class="line"> queue.showQueue();</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&#x27;a&#x27;</span>:<span class="comment">//添加数据</span></span><br><span class="line"> System.out.println(<span class="string">&quot;输出一个数&quot;</span>);</span><br><span class="line"> <span class="type">int</span> <span class="variable">value</span> <span class="operator">=</span> scanner.nextInt();</span><br><span class="line"> queue.addQueue(value);</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&#x27;g&#x27;</span>: <span class="comment">//取出数据</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">res</span> <span class="operator">=</span> queue.getQueue();</span><br><span class="line"> System.out.printf(<span class="string">&quot;取出的数据是%d\n&quot;</span>, res);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> <span class="comment">// <span class="doctag">TODO:</span> handle exception</span></span><br><span class="line"> System.out.println(e.getMessage());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&#x27;h&#x27;</span>: <span class="comment">//查看队列头的数据</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">res</span> <span class="operator">=</span> queue.headQueue();</span><br><span class="line"> System.out.printf(<span class="string">&quot;队列头的数据是%d\n&quot;</span>, res);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> <span class="comment">// <span class="doctag">TODO:</span> handle exception</span></span><br><span class="line"> System.out.println(e.getMessage());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&#x27;e&#x27;</span>: <span class="comment">//退出</span></span><br><span class="line"> scanner.close();</span><br><span class="line"> loop = <span class="literal">false</span>;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">default</span>:</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> System.out.println(<span class="string">&quot;程序退出~~&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">CircleArray</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> maxSize; <span class="comment">// 表示数组的最大容量 因为预留了一个空间 实际上maxSize=3 只能存储两个元素</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> front; <span class="comment">// 队列头 初始值是0</span></span><br><span class="line"> <span class="comment">//rear 变量的含义做一个调整rear 指向队列的最后一个元素的后一个位置. 因为希望空出一个空间做为约定</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> rear; <span class="comment">// 队列尾</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span>[] arr; <span class="comment">// 该数据用于存放数据, 模拟队列</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 构造方法</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> arrMaxSize 环形队列的最大容量</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">CircleArray</span><span class="params">(<span class="type">int</span> arrMaxSize)</span> &#123;</span><br><span class="line"> maxSize = arrMaxSize;</span><br><span class="line"> arr = <span class="keyword">new</span> <span class="title class_">int</span>[maxSize];</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断队列是否为满</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">isFull</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//因为是环形队列 如果尾部队列的后一个指向队列的头部 那么我们认为队列是满的</span></span><br><span class="line"> <span class="keyword">return</span> (rear + <span class="number">1</span>) % maxSize == front; <span class="comment">//这里是一个理解点</span></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断队列是否为空</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">isEmpty</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> rear == front;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 添加数据</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">addQueue</span><span class="params">(<span class="type">int</span> n)</span> &#123;</span><br><span class="line"> <span class="comment">//先判断队列是否为满 满了就不添加</span></span><br><span class="line"> <span class="keyword">if</span> (<span class="built_in">this</span>.isFull()) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;队列为满,不能添加数据!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//添加数据</span></span><br><span class="line"> arr[rear] = n;</span><br><span class="line"> <span class="comment">//将人rear向后移</span></span><br><span class="line"> rear = (rear + <span class="number">1</span>) % maxSize; <span class="comment">//这里是一个理解点</span></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 取出数据</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">getQueue</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//先判断队列是否为空 空了就无法取出数据</span></span><br><span class="line"> <span class="keyword">if</span> (<span class="built_in">this</span>.isEmpty()) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;队列为空,无法取出数据!&quot;</span>);</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;队列空,不能取数据&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//不为空 取出数据</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">result</span> <span class="operator">=</span> arr[front];</span><br><span class="line"> front = (front + <span class="number">1</span>) % maxSize; <span class="comment">//这里是一个理解点</span></span><br><span class="line"> <span class="keyword">return</span> result;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 显示对垒数据的方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">showQueue</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//判断队列是否为空 如果队列为空就不遍历</span></span><br><span class="line"> <span class="keyword">if</span> (<span class="built_in">this</span>.isEmpty()) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;队列为空!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//遍历的方式 从front开始遍历 遍历多少个元素</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">count</span> <span class="operator">=</span> <span class="built_in">this</span>.size();</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> front; i &lt; front + count; i++) &#123;<span class="comment">//主要作用是遍历多少次</span></span><br><span class="line"> System.out.println(<span class="string">&quot;arr[&quot;</span> + i % maxSize + <span class="string">&quot;]=&quot;</span> + arr[i % maxSize]);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 求出当前数列中有效数据的个数</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">size</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> (rear + maxSize - front) % maxSize; <span class="comment">//这是一个理解点</span></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 显示队列的头元素</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">headQueue</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">// 判断</span></span><br><span class="line"> <span class="keyword">if</span> (isEmpty()) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;队列空的,没有数据~~&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> arr[front];</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="四-链表"><a href="#四-链表" class="headerlink" title="四.链表"></a>四.链表</h2><h3 id="4-1-链表-Linked-List-介绍"><a href="#4-1-链表-Linked-List-介绍" class="headerlink" title="4.1 链表(Linked List)介绍"></a>4.1 链表(Linked List)介绍</h3><p>在内存中不是连续存储的</p>
<h3 id=""><a href="#" class="headerlink" title=""></a><img src="/pictures/image-20230428134234636.png"></h3><p>链表的逻辑结构</p>
<p><img src="/pictures/image-20230428135032883.png" alt="image-20230428135032883"></p>
<h3 id="4-2单链表的应用实例-CRUD"><a href="#4-2单链表的应用实例-CRUD" class="headerlink" title="4.2单链表的应用实例(CRUD)"></a>4.2单链表的应用实例(CRUD)</h3><p>使用带head头的单向链表实现 –水浒英雄排行榜管理 完成对英雄人物的增删改查操作</p>
<h4 id="4-2-1向单链表中添加数据"><a href="#4-2-1向单链表中添加数据" class="headerlink" title="4.2.1向单链表中添加数据"></a>4.2.1向单链表中添加数据</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.linkedlist;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/28</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 单链表的实现</span></span><br><span class="line"><span class="comment"> * 使用带head头的单向链表实现 –水浒英雄排行榜管理</span></span><br><span class="line"><span class="comment"> * 完成对英雄人物的增删改查操作</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">SingleLinkedListDemo</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">SingleLinkedList</span> <span class="variable">singleLinkedList</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SingleLinkedList</span>();</span><br><span class="line"> singleLinkedList.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">1</span>, <span class="string">&quot;宋江&quot;</span>, <span class="string">&quot;及时雨&quot;</span>));</span><br><span class="line"> singleLinkedList.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">2</span>, <span class="string">&quot;卢俊义&quot;</span>, <span class="string">&quot;玉麒麟&quot;</span>));</span><br><span class="line"> singleLinkedList.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">3</span>, <span class="string">&quot;吴用&quot;</span>, <span class="string">&quot;智多星&quot;</span>));</span><br><span class="line"> singleLinkedList.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">4</span>, <span class="string">&quot;林冲&quot;</span>, <span class="string">&quot;豹子头&quot;</span>));</span><br><span class="line"> <span class="comment">//显示链表</span></span><br><span class="line"> singleLinkedList.list();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//定义SingleLinkedList来管理我们的英雄任务</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">SingleLinkedList</span> &#123;</span><br><span class="line"> <span class="comment">//初始化一个头节点 不存储具体的数据</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">HeroNode</span> <span class="variable">head</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">0</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;&quot;</span>);</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 添加节点到单向链表</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">add</span><span class="params">(HeroNode heroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//找到当前链表的最后一个节点</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> head;</span><br><span class="line"> <span class="keyword">while</span> (temp.next != <span class="literal">null</span>) &#123;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> temp.next = heroNode;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 显示链表</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">list</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//先判断链表是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (head.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;链表为空!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> head;</span><br><span class="line"> <span class="keyword">while</span> (temp.next != <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(temp.next);</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//定义一个heroNode,每个heroNode对象都是一个节点</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">HeroNode</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> no;</span><br><span class="line"> <span class="keyword">public</span> String name;</span><br><span class="line"> <span class="keyword">public</span> String nickname;</span><br><span class="line"> <span class="keyword">public</span> HeroNode next; <span class="comment">//指向下一个节点</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//构造器</span></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">HeroNode</span><span class="params">(<span class="type">int</span> no, String name, String nickname)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.no = no;</span><br><span class="line"> <span class="built_in">this</span>.name = name;</span><br><span class="line"> <span class="built_in">this</span>.nickname = nickname;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">toString</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;HeroNode&#123;&quot;</span> +</span><br><span class="line"> <span class="string">&quot;no=&quot;</span> + no +</span><br><span class="line"> <span class="string">&quot;, name=&#x27;&quot;</span> + name + <span class="string">&#x27;\&#x27;&#x27;</span> +</span><br><span class="line"> <span class="string">&quot;, nickname=&#x27;&quot;</span> + nickname + <span class="string">&#x27;\&#x27;&#x27;</span> +</span><br><span class="line"> <span class="string">&#x27;&#125;&#x27;</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="4-2-2修改单链表中节点的方法"><a href="#4-2-2修改单链表中节点的方法" class="headerlink" title="4.2.2修改单链表中节点的方法"></a>4.2.2修改单链表中节点的方法</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 修改节点的信息</span></span><br><span class="line"><span class="comment"> * 根据新的节点的编号进行修改</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">update</span><span class="params">(HeroNode newHeroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//判断链表是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (head.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;链表为空,无法修改该节点!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//找到需要修改的节点</span></span><br><span class="line"> <span class="comment">//首先找到头节点的位置</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> head.next;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">idFind</span> <span class="operator">=</span> <span class="literal">false</span>; <span class="comment">//是否找到节点的信息</span></span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (temp == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">break</span>;<span class="comment">//已经到了链表的结尾,就退出循环</span></span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (temp.no == newHeroNode.no) &#123;<span class="comment">//找到修改的节点</span></span><br><span class="line"> temp.name = newHeroNode.name;</span><br><span class="line"> temp.nickname = newHeroNode.nickname;</span><br><span class="line"> idFind = <span class="literal">true</span>; <span class="comment">//找到了节点并且修改了节点的信息</span></span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//做出判断,返回结果</span></span><br><span class="line"> System.out.println(idFind ? <span class="string">&quot;修改成功&quot;</span> : <span class="string">&quot;没有找到该节点的信息&quot;</span>);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h4 id="4-2-3删除单链表中节点的方法"><a href="#4-2-3删除单链表中节点的方法" class="headerlink" title="4.2.3删除单链表中节点的方法"></a>4.2.3删除单链表中节点的方法</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 删除链表中的节点</span></span><br><span class="line"><span class="comment"> * 根据节点的编号删除节点的信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">delete</span><span class="params">(<span class="type">int</span> no)</span> &#123;</span><br><span class="line"> <span class="comment">//判断链表是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (head.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;链表为空,无法删除!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//找到要删除的节点的信息</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> head;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isDelete</span> <span class="operator">=</span> <span class="literal">false</span>;<span class="comment">//是否删除</span></span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (temp.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//这里的temp指的是要删除节点的上一个节点 temp.next.next指的是要删除节点的下一个节点</span></span><br><span class="line"> <span class="keyword">if</span> (temp.next.no == no) &#123;</span><br><span class="line"> <span class="comment">//将要删除的节点的上一个节点指向要删除节点的下一个节点 实现删除的操作</span></span><br><span class="line"> <span class="comment">//这样要删除的节点没有引用指向,会被垃圾回收机制回收</span></span><br><span class="line"> temp.next = temp.next.next; </span><br><span class="line"> isDelete = <span class="literal">true</span>;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//做出判断,返回结果</span></span><br><span class="line"> System.out.println(isDelete ? <span class="string">&quot;删除成功&quot;</span> : <span class="string">&quot;没有找到该节点的信息&quot;</span>);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h4 id="4-2-4完整代码"><a href="#4-2-4完整代码" class="headerlink" title="4.2.4完整代码"></a>4.2.4完整代码</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.linkedlist;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/28</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 单链表的实现</span></span><br><span class="line"><span class="comment"> * 使用带head头的单向链表实现 –水浒英雄排行榜管理</span></span><br><span class="line"><span class="comment"> * 完成对英雄人物的增删改查操作</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">SingleLinkedListDemo</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">SingleLinkedList</span> <span class="variable">singleLinkedList</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SingleLinkedList</span>();</span><br><span class="line"> singleLinkedList.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">1</span>, <span class="string">&quot;宋江&quot;</span>, <span class="string">&quot;及时雨&quot;</span>));</span><br><span class="line"> singleLinkedList.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">2</span>, <span class="string">&quot;卢俊义&quot;</span>, <span class="string">&quot;玉麒麟&quot;</span>));</span><br><span class="line"> singleLinkedList.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">3</span>, <span class="string">&quot;吴用&quot;</span>, <span class="string">&quot;智多星&quot;</span>));</span><br><span class="line"> singleLinkedList.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">4</span>, <span class="string">&quot;林冲&quot;</span>, <span class="string">&quot;豹子头&quot;</span>));</span><br><span class="line"> <span class="comment">//显示链表</span></span><br><span class="line"> singleLinkedList.list();</span><br><span class="line"> <span class="comment">//测试修改节点的功能</span></span><br><span class="line"> singleLinkedList.update(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">2</span>, <span class="string">&quot;卢俊义&quot;</span>, <span class="string">&quot;玉麒麟增强版&quot;</span>));</span><br><span class="line"> <span class="comment">//显示链表的信息</span></span><br><span class="line"> singleLinkedList.list();</span><br><span class="line"> <span class="comment">//测试删除节点</span></span><br><span class="line"> singleLinkedList.delete(<span class="number">2</span>);</span><br><span class="line"> <span class="comment">//显示链表的信息</span></span><br><span class="line"> singleLinkedList.list();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//定义SingleLinkedList来管理我们的英雄任务</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">SingleLinkedList</span> &#123;</span><br><span class="line"> <span class="comment">//初始化一个头节点 不存储具体的数据</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">HeroNode</span> <span class="variable">head</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">0</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;&quot;</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 删除链表中的节点</span></span><br><span class="line"><span class="comment"> * 根据节点的编号删除节点的信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">delete</span><span class="params">(<span class="type">int</span> no)</span> &#123;</span><br><span class="line"> <span class="comment">//判断链表是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (head.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;链表为空,无法删除!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//找到要删除的节点的信息</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> head;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isDelete</span> <span class="operator">=</span> <span class="literal">false</span>;<span class="comment">//是否删除</span></span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (temp.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (temp.next.no == no) &#123;<span class="comment">//这里的temp指的是要删除节点的上一个节点 temp.next.next指的是要删除节点的下一个节点</span></span><br><span class="line"> <span class="comment">//将当前节点的上一个节点指向当前节点的下一个节点</span></span><br><span class="line"> temp.next = temp.next.next; <span class="comment">//将要删除的节点的上一个节点指向要删除节点的下一个节点 这样要删除的节点没有引用指向 会被垃圾回收机制回收</span></span><br><span class="line"> isDelete = <span class="literal">true</span>;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//做出判断,返回结果</span></span><br><span class="line"> System.out.println(isDelete ? <span class="string">&quot;删除成功&quot;</span> : <span class="string">&quot;没有找到该节点的信息&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 修改节点的信息</span></span><br><span class="line"><span class="comment"> * 根据新的节点的编号进行修改</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">update</span><span class="params">(HeroNode newHeroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//判断链表是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (head.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;链表为空,无法修改该节点!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//找到需要修改的节点</span></span><br><span class="line"> <span class="comment">//首先找到头节点的位置</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> head.next;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">idFind</span> <span class="operator">=</span> <span class="literal">false</span>; <span class="comment">//是否找到节点的信息</span></span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (temp == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">break</span>;<span class="comment">//已经到了链表的结尾,就退出循环</span></span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (temp.no == newHeroNode.no) &#123;<span class="comment">//找到修改的节点</span></span><br><span class="line"> temp.name = newHeroNode.name;</span><br><span class="line"> temp.nickname = newHeroNode.nickname;</span><br><span class="line"> idFind = <span class="literal">true</span>; <span class="comment">//找到了节点并且修改了节点的信息</span></span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//做出判断,返回结果</span></span><br><span class="line"> System.out.println(idFind ? <span class="string">&quot;修改成功&quot;</span> : <span class="string">&quot;没有找到该节点的信息&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 添加节点到单向链表</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">add</span><span class="params">(HeroNode heroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//找到当前链表的最后一个节点</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> head;</span><br><span class="line"> <span class="keyword">while</span> (temp.next != <span class="literal">null</span>) &#123;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> temp.next = heroNode;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 显示链表</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">list</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//先判断链表是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (head.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;链表为空!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> head;</span><br><span class="line"> <span class="keyword">while</span> (temp.next != <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(temp.next);</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//定义一个heroNode,每个heroNode对象都是一个节点</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">HeroNode</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> no;</span><br><span class="line"> <span class="keyword">public</span> String name;</span><br><span class="line"> <span class="keyword">public</span> String nickname;</span><br><span class="line"> <span class="keyword">public</span> HeroNode next; <span class="comment">//指向下一个节点</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//构造器</span></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">HeroNode</span><span class="params">(<span class="type">int</span> no, String name, String nickname)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.no = no;</span><br><span class="line"> <span class="built_in">this</span>.name = name;</span><br><span class="line"> <span class="built_in">this</span>.nickname = nickname;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">toString</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;HeroNode&#123;&quot;</span> +</span><br><span class="line"> <span class="string">&quot;no=&quot;</span> + no +</span><br><span class="line"> <span class="string">&quot;, name=&#x27;&quot;</span> + name + <span class="string">&#x27;\&#x27;&#x27;</span> +</span><br><span class="line"> <span class="string">&quot;, nickname=&#x27;&quot;</span> + nickname + <span class="string">&#x27;\&#x27;&#x27;</span> +</span><br><span class="line"> <span class="string">&#x27;&#125;&#x27;</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="4-2-5-单链表的面试题(新浪,百度,腾讯)"><a href="#4-2-5-单链表的面试题(新浪,百度,腾讯)" class="headerlink" title="4.2.5 单链表的面试题(新浪,百度,腾讯)"></a>4.2.5 单链表的面试题(新浪,百度,腾讯)</h4><h5 id="1-求单链表中有效节点的个数"><a href="#1-求单链表中有效节点的个数" class="headerlink" title="1.求单链表中有效节点的个数"></a>1.求单链表中有效节点的个数</h5><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 获取有效节点的个数(如果是带头节点的链表,需求不统计头节点)</span></span><br><span class="line"><span class="comment"> * 注意:这里是有头节点的情况下统计节点的个数 (这里我们去除了头节点)</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> heroNode 头节点</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 有效节点的个数</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">getLength</span><span class="params">(HeroNode heroNode)</span>&#123;</span><br><span class="line"> <span class="comment">//先判断节点是否为空</span></span><br><span class="line"> <span class="keyword">if</span>(heroNode.next == <span class="literal">null</span>)&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//遍历节点进行统计</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">length</span> <span class="operator">=</span> <span class="number">0</span>;<span class="comment">//有效节点的个数</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> heroNode.next;<span class="comment">//这里没有统计头节点</span></span><br><span class="line"> <span class="keyword">while</span> (temp != <span class="literal">null</span>)&#123;<span class="comment">//遍历 统计个数</span></span><br><span class="line"> length++;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> length;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h5 id="2-查找单链表中的倒数第K个节点-新浪面试题"><a href="#2-查找单链表中的倒数第K个节点-新浪面试题" class="headerlink" title="2.查找单链表中的倒数第K个节点(新浪面试题)"></a>2.查找单链表中的倒数第K个节点(新浪面试题)</h5><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查找单链表中的倒数第K个节点</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> index 倒数第几</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> heroNode 头节点</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 倒数第K个节点的信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> HeroNode <span class="title function_">getHeroNodeByLastIndex</span><span class="params">(<span class="type">int</span> index, HeroNode heroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//先判断节点是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (heroNode.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//首先获取有效节点的个数</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">length</span> <span class="operator">=</span> <span class="built_in">this</span>.getLength(heroNode);<span class="comment">//使用求节点有效个数的方法</span></span><br><span class="line"> <span class="comment">//求倒数第k个节点就是在求正数第length - index + 1节点</span></span><br><span class="line"> index = length - index; <span class="comment">//求出正向的索引位置</span></span><br><span class="line"> <span class="keyword">if</span> (index &lt; <span class="number">0</span> || index &gt; length) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;所求的在链表中不存在&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">int</span> <span class="variable">count</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> heroNode.next;</span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (count == index) &#123;</span><br><span class="line"> <span class="keyword">return</span> temp;</span><br><span class="line"> &#125;</span><br><span class="line"> count++;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h5 id="3-单链表的反转-腾讯面试题"><a href="#3-单链表的反转-腾讯面试题" class="headerlink" title="3.单链表的反转(腾讯面试题)"></a>3.单链表的反转(腾讯面试题)</h5><p><img src="/pictures/image-20230506105453269.png" alt="image-20230506105453269"></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 单链表的反转</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> heroNode 需要反转单链表的头节点</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">reverseHeroNode</span><span class="params">(HeroNode heroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//先判断当前的链表是否为空 或者当前的链表只有一个节点</span></span><br><span class="line"> <span class="keyword">if</span>(head.next == <span class="literal">null</span> || head.next.next == <span class="literal">null</span>)&#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;当前链表为空或者只有一个节点,无需反转&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//定义一个辅助的变量 帮助我们遍历原来的链表</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">cur</span> <span class="operator">=</span> head.next;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">next</span> <span class="operator">=</span> <span class="literal">null</span>;<span class="comment">//指向当前节点的下一个节点 我们要在挪动当前节点之前帮当前指针 下移</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">reverseHeroNode</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">0</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;&quot;</span>);<span class="comment">//新链表的头节点</span></span><br><span class="line"> <span class="comment">//遍历原先的列表 确定每一个链表的指向关系</span></span><br><span class="line"> <span class="keyword">while</span> (cur != <span class="literal">null</span>)&#123;</span><br><span class="line"> next = cur.next;<span class="comment">//保存当前节点的下一个节点</span></span><br><span class="line"> <span class="comment">//reverseHeroNode.next表示头节点的下一个节点 我们让cur的下一个节点cur.next指向头节点的下一个节点 //reverseHeroNode.next 就把当前的节点cur穿插进去了</span></span><br><span class="line"> <span class="comment">//下一句将头节点和当前节点建立关系reverseHeroNode.next = cur 整个节点就连接起来了</span></span><br><span class="line"> cur.next = reverseHeroNode.next;<span class="comment">//将cur的下一个节点指向新的链表的最前端 相当于在头节点和头节点的下一个节点 //之间穿插了一个节点</span></span><br><span class="line"> reverseHeroNode.next = cur;<span class="comment">//将cur连接到新的链表上</span></span><br><span class="line"> cur = next; <span class="comment">//cur像后移动</span></span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//将head.next指向reverseHeroNode.next 实现单链表的反转</span></span><br><span class="line"> head.next = reverseHeroNode.next;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h5 id="4-从尾到头打印单链表(百度面试题)"><a href="#4-从尾到头打印单链表(百度面试题)" class="headerlink" title="4.从尾到头打印单链表(百度面试题)"></a>4.从尾到头打印单链表(百度面试题)</h5><p>不改变链表本身的结构(不是通过链表的反转之后再打印的)</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * (通过栈的方式实现单链表的逆序打印)</span></span><br><span class="line"><span class="comment"> * 栈的特点是先入后出 正好可以满足逆序打印</span></span><br><span class="line"><span class="comment"> * 单链表的逆序打印</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">reversePrint</span><span class="params">(HeroNode heroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//先判断当前的链表是否为空 或者当前的链表只有一个节点</span></span><br><span class="line"> <span class="keyword">if</span> (head.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;当前链表为空,无法逆序打印!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//创建一个栈,将各个节点压入栈中</span></span><br><span class="line"> <span class="comment">//先创建一个栈</span></span><br><span class="line"> Stack&lt;HeroNode&gt; stack = <span class="keyword">new</span> <span class="title class_">Stack</span>&lt;&gt;();</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">cur</span> <span class="operator">=</span> heroNode.next;</span><br><span class="line"> <span class="comment">//循环将每一个节点添加进栈中</span></span><br><span class="line"> <span class="keyword">while</span> (cur != <span class="literal">null</span>) &#123;</span><br><span class="line"> stack.push(cur);<span class="comment">//将节点压入栈中</span></span><br><span class="line"> cur = cur.next;<span class="comment">//cur后移 压入下一个节点</span></span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//将栈中节点打印</span></span><br><span class="line"> <span class="keyword">while</span> (stack.size() &gt; <span class="number">0</span>) &#123;</span><br><span class="line"> System.out.println(stack.pop());</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h5 id="5-合并两个有序的单链表,合并之后的链表依然有序"><a href="#5-合并两个有序的单链表,合并之后的链表依然有序" class="headerlink" title="5.合并两个有序的单链表,合并之后的链表依然有序"></a>5.合并两个有序的单链表,合并之后的链表依然有序</h5><p>以下代码有一些bug 后期修改</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 合并两个有序的单链表,合并之后的链表依然有序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">mergeHeroNode</span><span class="params">(HeroNode oneHead, HeroNode twoHead ,HeroNode head)</span> &#123;</span><br><span class="line"> <span class="comment">//先判断两个链表是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (oneHead.next == <span class="literal">null</span> || twoHead.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;其中有一个(两个)链表为空,无法合并&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//合并</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">oneCur</span> <span class="operator">=</span> oneHead.next;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">twoCur</span> <span class="operator">=</span> twoHead.next;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">oneNext</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">twoNext</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">finalHeroHead</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">0</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;&quot;</span>);</span><br><span class="line"> <span class="keyword">while</span> (oneCur != <span class="literal">null</span> &amp;&amp; twoCur != <span class="literal">null</span>) &#123;</span><br><span class="line"> oneNext = oneCur.next;</span><br><span class="line"> twoNext = twoCur.next;</span><br><span class="line"> <span class="keyword">if</span>(oneCur.no &lt;= twoCur.no) &#123;</span><br><span class="line"> oneCur.next = finalHeroHead.next;</span><br><span class="line"> finalHeroHead.next = oneCur;</span><br><span class="line"> oneCur = oneNext;</span><br><span class="line"> &#125;<span class="keyword">else</span> &#123;</span><br><span class="line"> twoCur.next = finalHeroHead.next;</span><br><span class="line"> finalHeroHead.next = twoCur;</span><br><span class="line"> twoCur = twoNext;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> head.next = finalHeroHead.next;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h5 id="全部代码"><a href="#全部代码" class="headerlink" title="全部代码"></a>全部代码</h5><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.linkedlist;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Stack;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/28</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 单链表的实现</span></span><br><span class="line"><span class="comment"> * 使用带head头的单向链表实现 –水浒英雄排行榜管理</span></span><br><span class="line"><span class="comment"> * 完成对英雄人物的增删改查操作</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">SingleLinkedListDemo</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">SingleLinkedList</span> <span class="variable">singleLinkedList</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SingleLinkedList</span>();</span><br><span class="line"><span class="comment">// singleLinkedList.add(new HeroNode(1, &quot;宋江&quot;, &quot;及时雨&quot;));</span></span><br><span class="line"><span class="comment">// singleLinkedList.add(new HeroNode(2, &quot;卢俊义&quot;, &quot;玉麒麟&quot;));</span></span><br><span class="line"><span class="comment">// singleLinkedList.add(new HeroNode(3, &quot;吴用&quot;, &quot;智多星&quot;));</span></span><br><span class="line"><span class="comment">// singleLinkedList.add(new HeroNode(4, &quot;林冲&quot;, &quot;豹子头&quot;));</span></span><br><span class="line"><span class="comment">// //显示链表</span></span><br><span class="line"><span class="comment">// singleLinkedList.list();</span></span><br><span class="line"><span class="comment">// //测试修改节点的功能</span></span><br><span class="line"><span class="comment">// singleLinkedList.update(new HeroNode(2, &quot;卢俊义&quot;, &quot;玉麒麟增强版&quot;));</span></span><br><span class="line"><span class="comment">// //显示链表的信息</span></span><br><span class="line"><span class="comment">// singleLinkedList.list();</span></span><br><span class="line"><span class="comment">// //测试删除节点</span></span><br><span class="line"><span class="comment">// singleLinkedList.delete(2);</span></span><br><span class="line"><span class="comment">// //显示链表的信息</span></span><br><span class="line"><span class="comment">// singleLinkedList.list();</span></span><br><span class="line"><span class="comment">// //统计有效节点的个数</span></span><br><span class="line"><span class="comment">// System.out.println(&quot;有效节点的个数&quot; + singleLinkedList.getLength(singleLinkedList.getHead()));</span></span><br><span class="line"><span class="comment">// //查找单链表中的倒数第K个节点</span></span><br><span class="line"><span class="comment">// int index = 2;</span></span><br><span class="line"><span class="comment">// System.out.println(&quot;倒数第&quot; + index + &quot;个节点的位置:&quot; + singleLinkedList.getHeroNodeByLastIndex(index, singleLinkedList.getHead()));</span></span><br><span class="line"><span class="comment">// //测试单链表的反转</span></span><br><span class="line"><span class="comment">// singleLinkedList.reverseHeroNode(singleLinkedList.getHead());</span></span><br><span class="line"><span class="comment">// singleLinkedList.list();</span></span><br><span class="line"><span class="comment">// //测试通过栈的方式逆序打印</span></span><br><span class="line"><span class="comment">// System.out.println(&quot;测试通过栈的方式逆序打印头节点&quot;);</span></span><br><span class="line"><span class="comment">// singleLinkedList.reversePrint(singleLinkedList.getHead());</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//测试合并两个有序的链表</span></span><br><span class="line"> <span class="type">SingleLinkedList</span> <span class="variable">singleLinkedList1</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SingleLinkedList</span>();</span><br><span class="line"> singleLinkedList1.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">1</span>, <span class="string">&quot;宋江&quot;</span>, <span class="string">&quot;及时雨&quot;</span>));</span><br><span class="line"> singleLinkedList1.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">3</span>, <span class="string">&quot;卢俊义&quot;</span>, <span class="string">&quot;玉麒麟&quot;</span>));</span><br><span class="line"> singleLinkedList1.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">5</span>, <span class="string">&quot;吴用&quot;</span>, <span class="string">&quot;智多星&quot;</span>));</span><br><span class="line"> singleLinkedList1.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">7</span>, <span class="string">&quot;林冲&quot;</span>, <span class="string">&quot;豹子头&quot;</span>));</span><br><span class="line"> <span class="type">SingleLinkedList</span> <span class="variable">singleLinkedList2</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SingleLinkedList</span>();</span><br><span class="line"> singleLinkedList2.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">2</span>, <span class="string">&quot;宋江&quot;</span>, <span class="string">&quot;及时雨&quot;</span>));</span><br><span class="line"> singleLinkedList2.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">4</span>, <span class="string">&quot;卢俊义&quot;</span>, <span class="string">&quot;玉麒麟&quot;</span>));</span><br><span class="line"> singleLinkedList2.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">6</span>, <span class="string">&quot;吴用&quot;</span>, <span class="string">&quot;智多星&quot;</span>));</span><br><span class="line"> singleLinkedList2.add(<span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">8</span>, <span class="string">&quot;林冲&quot;</span>, <span class="string">&quot;豹子头&quot;</span>));</span><br><span class="line"> mergeHeroNode(singleLinkedList1.getHead(),singleLinkedList2.getHead(),singleLinkedList.getHead());</span><br><span class="line"> singleLinkedList.list();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 合并两个有序的单链表,合并之后的链表依然有序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">mergeHeroNode</span><span class="params">(HeroNode oneHead, HeroNode twoHead ,HeroNode head)</span> &#123;</span><br><span class="line"> <span class="comment">//先判断两个链表是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (oneHead.next == <span class="literal">null</span> || twoHead.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;其中有一个(两个)链表为空,无法合并&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//合并</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">oneCur</span> <span class="operator">=</span> oneHead.next;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">twoCur</span> <span class="operator">=</span> twoHead.next;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">oneNext</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">twoNext</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">finalHeroHead</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">0</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;&quot;</span>);</span><br><span class="line"> <span class="keyword">while</span> (oneCur != <span class="literal">null</span> &amp;&amp; twoCur != <span class="literal">null</span>) &#123;</span><br><span class="line"> oneNext = oneCur.next;</span><br><span class="line"> twoNext = twoCur.next;</span><br><span class="line"> <span class="keyword">if</span>(oneCur.no &lt;= twoCur.no) &#123;</span><br><span class="line"> oneCur.next = finalHeroHead.next;</span><br><span class="line"> finalHeroHead.next = oneCur;</span><br><span class="line"> oneCur = oneNext;</span><br><span class="line"> &#125;<span class="keyword">else</span> &#123;</span><br><span class="line"> twoCur.next = finalHeroHead.next;</span><br><span class="line"> finalHeroHead.next = twoCur;</span><br><span class="line"> twoCur = twoNext;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> head.next = finalHeroHead.next;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//定义SingleLinkedList来管理我们的英雄任务</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">SingleLinkedList</span> &#123;</span><br><span class="line"> <span class="comment">//初始化一个头节点 不存储具体的数据</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">HeroNode</span> <span class="variable">head</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">0</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;&quot;</span>);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> HeroNode <span class="title function_">getHead</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> head;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * (通过栈的方式实现单链表的逆序打印)</span></span><br><span class="line"><span class="comment"> * 栈的特点是先入后出 正好可以满足逆序打印</span></span><br><span class="line"><span class="comment"> * 单链表的逆序打印</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">reversePrint</span><span class="params">(HeroNode heroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//先判断当前的链表是否为空 或者当前的链表只有一个节点</span></span><br><span class="line"> <span class="keyword">if</span> (heroNode.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;当前链表为空,无法逆序打印!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//创建一个栈,将各个节点压入栈中</span></span><br><span class="line"> <span class="comment">//先创建一个栈</span></span><br><span class="line"> Stack&lt;HeroNode&gt; stack = <span class="keyword">new</span> <span class="title class_">Stack</span>&lt;&gt;();</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">cur</span> <span class="operator">=</span> heroNode.next;</span><br><span class="line"> <span class="comment">//循环将每一个节点添加进栈中</span></span><br><span class="line"> <span class="keyword">while</span> (cur != <span class="literal">null</span>) &#123;</span><br><span class="line"> stack.push(cur);<span class="comment">//将节点压入栈中</span></span><br><span class="line"> cur = cur.next;<span class="comment">//cur后移 压入下一个节点</span></span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//将栈中节点打印</span></span><br><span class="line"> <span class="keyword">while</span> (stack.size() &gt; <span class="number">0</span>) &#123;</span><br><span class="line"> System.out.println(stack.pop());</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 单链表的反转</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> heroNode 需要反转单链表的头节点</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">reverseHeroNode</span><span class="params">(HeroNode heroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//先判断当前的链表是否为空 或者当前的链表只有一个节点</span></span><br><span class="line"> <span class="keyword">if</span> (heroNode.next == <span class="literal">null</span> || heroNode.next.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;当前链表为空或者只有一个节点,无需反转&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//定义一个辅助的变量 帮助我们遍历原来的链表</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">cur</span> <span class="operator">=</span> heroNode.next;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">next</span> <span class="operator">=</span> <span class="literal">null</span>;<span class="comment">//指向当前节点的下一个节点 我们要在挪动当前节点之前帮当前指针 下移</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">reverseHeroNode</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HeroNode</span>(<span class="number">0</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;&quot;</span>);<span class="comment">//新链表的头节点</span></span><br><span class="line"> <span class="comment">//遍历原先的列表 确定每一个链表的指向关系</span></span><br><span class="line"> <span class="keyword">while</span> (cur != <span class="literal">null</span>) &#123;</span><br><span class="line"> next = cur.next;<span class="comment">//保存当前节点的下一个节点</span></span><br><span class="line"> <span class="comment">//reverseHeroNode.next表示头节点的下一个节点 我们让cur的下一个节点cur.next指向头节点的下一个节点reverseHeroNode.next 就把当前的节点cur穿插进去了</span></span><br><span class="line"> <span class="comment">//下一句将头节点和当前节点建立关系reverseHeroNode.next = cur 整个节点就连接起来了</span></span><br><span class="line"> cur.next = reverseHeroNode.next;<span class="comment">//将cur的下一个节点指向新的链表的最前端 相当于在头节点和头节点的下一个节点之间穿插了一个节点</span></span><br><span class="line"> reverseHeroNode.next = cur;<span class="comment">//将cur连接到新的链表上</span></span><br><span class="line"> cur = next; <span class="comment">//cur像后移动</span></span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//将head.next指向reverseHeroNode.next 实现单链表的反转</span></span><br><span class="line"> heroNode.next = reverseHeroNode.next;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查找单链表中的倒数第K个节点</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> index 倒数第几</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> heroNode 头节点</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 倒数第K个节点的信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> HeroNode <span class="title function_">getHeroNodeByLastIndex</span><span class="params">(<span class="type">int</span> index, HeroNode heroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//先判断节点是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (heroNode.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//首先获取有效节点的个数</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">length</span> <span class="operator">=</span> <span class="built_in">this</span>.getLength(heroNode);<span class="comment">//使用求节点有效个数的方法</span></span><br><span class="line"> <span class="comment">//求倒数第k个节点就是在求正数第length - index + 1节点</span></span><br><span class="line"> index = length - index; <span class="comment">//求出正向的索引位置</span></span><br><span class="line"> <span class="keyword">if</span> (index &lt; <span class="number">0</span> || index &gt; length) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;所求的在链表中不存在&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">int</span> <span class="variable">count</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> heroNode.next;</span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (count == index) &#123;</span><br><span class="line"> <span class="keyword">return</span> temp;</span><br><span class="line"> &#125;</span><br><span class="line"> count++;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 获取有效节点的个数(如果是带头节点的链表,需求不统计头节点)</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> heroNode 头节点</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 有效节点的个数</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">getLength</span><span class="params">(HeroNode heroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//先判断节点是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (heroNode.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//遍历节点进行统计</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">length</span> <span class="operator">=</span> <span class="number">0</span>;<span class="comment">//有效节点的个数</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> heroNode.next;<span class="comment">//这里没有统计头节点</span></span><br><span class="line"> <span class="keyword">while</span> (temp != <span class="literal">null</span>) &#123;<span class="comment">//遍历 统计个数</span></span><br><span class="line"> length++;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> length;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 删除链表中的节点</span></span><br><span class="line"><span class="comment"> * 根据节点的编号删除节点的信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">delete</span><span class="params">(<span class="type">int</span> no)</span> &#123;</span><br><span class="line"> <span class="comment">//判断链表是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (head.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;链表为空,无法删除!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//找到要删除的节点的信息</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> head;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isDelete</span> <span class="operator">=</span> <span class="literal">false</span>;<span class="comment">//是否删除</span></span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (temp.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (temp.next.no == no) &#123;<span class="comment">//这里的temp指的是要删除节点的上一个节点 temp.next.next指的是要删除节点的下一个节点</span></span><br><span class="line"> <span class="comment">//将当前节点的上一个节点指向当前节点的下一个节点</span></span><br><span class="line"> temp.next = temp.next.next; <span class="comment">//将要删除的节点的上一个节点指向要删除节点的下一个节点 这样要删除的节点没有引用指向 会被垃圾回收机制回收</span></span><br><span class="line"> isDelete = <span class="literal">true</span>;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//做出判断,返回结果</span></span><br><span class="line"> System.out.println(isDelete ? <span class="string">&quot;删除成功&quot;</span> : <span class="string">&quot;没有找到该节点的信息&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 修改节点的信息</span></span><br><span class="line"><span class="comment"> * 根据新的节点的编号进行修改</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">update</span><span class="params">(HeroNode newHeroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//判断链表是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (head.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;链表为空,无法修改该节点!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//找到需要修改的节点</span></span><br><span class="line"> <span class="comment">//首先找到头节点的位置</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> head.next;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">idFind</span> <span class="operator">=</span> <span class="literal">false</span>; <span class="comment">//是否找到节点的信息</span></span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (temp == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">break</span>;<span class="comment">//已经到了链表的结尾,就退出循环</span></span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (temp.no == newHeroNode.no) &#123;<span class="comment">//找到修改的节点</span></span><br><span class="line"> temp.name = newHeroNode.name;</span><br><span class="line"> temp.nickname = newHeroNode.nickname;</span><br><span class="line"> idFind = <span class="literal">true</span>; <span class="comment">//找到了节点并且修改了节点的信息</span></span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//做出判断,返回结果</span></span><br><span class="line"> System.out.println(idFind ? <span class="string">&quot;修改成功&quot;</span> : <span class="string">&quot;没有找到该节点的信息&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 添加节点到单向链表</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">add</span><span class="params">(HeroNode heroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//找到当前链表的最后一个节点</span></span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> head;</span><br><span class="line"> <span class="keyword">while</span> (temp.next != <span class="literal">null</span>) &#123;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> temp.next = heroNode;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 显示链表</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">list</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//先判断链表是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (head.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;链表为空!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">HeroNode</span> <span class="variable">temp</span> <span class="operator">=</span> head;</span><br><span class="line"> <span class="keyword">while</span> (temp.next != <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(temp.next);</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//定义一个heroNode,每个heroNode对象都是一个节点</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">HeroNode</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> no;</span><br><span class="line"> <span class="keyword">public</span> String name;</span><br><span class="line"> <span class="keyword">public</span> String nickname;</span><br><span class="line"> <span class="keyword">public</span> HeroNode next; <span class="comment">//指向下一个节点</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//构造器</span></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">HeroNode</span><span class="params">(<span class="type">int</span> no, String name, String nickname)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.no = no;</span><br><span class="line"> <span class="built_in">this</span>.name = name;</span><br><span class="line"> <span class="built_in">this</span>.nickname = nickname;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">toString</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;HeroNode&#123;&quot;</span> +</span><br><span class="line"> <span class="string">&quot;no=&quot;</span> + no +</span><br><span class="line"> <span class="string">&quot;, name=&#x27;&quot;</span> + name + <span class="string">&#x27;\&#x27;&#x27;</span> +</span><br><span class="line"> <span class="string">&quot;, nickname=&#x27;&quot;</span> + nickname + <span class="string">&#x27;\&#x27;&#x27;</span> +</span><br><span class="line"> <span class="string">&#x27;&#125;&#x27;</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="4-3-双向链表"><a href="#4-3-双向链表" class="headerlink" title="4.3 双向链表"></a>4.3 双向链表</h3><p>双向的链表的CRUD操作于单向链表的CRUD操作类似</p>
<p><img src="/pictures/image-20230507100730848.png" alt="image-20230507100730848"></p>
<p>完整的增删改查代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.linkedlist;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/7</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 双向链表的使用</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">DoubleLinkedListDemo</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">DoubleLinkedList</span> <span class="variable">doubleLinkedList</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">DoubleLinkedList</span>();</span><br><span class="line"> <span class="comment">//测试添加链表的功能</span></span><br><span class="line"> doubleLinkedList.add(<span class="keyword">new</span> <span class="title class_">HeroNode2</span>(<span class="number">1</span>, <span class="string">&quot;宋江&quot;</span>, <span class="string">&quot;及时雨&quot;</span>));</span><br><span class="line"> doubleLinkedList.add(<span class="keyword">new</span> <span class="title class_">HeroNode2</span>(<span class="number">2</span>, <span class="string">&quot;卢俊义&quot;</span>, <span class="string">&quot;玉麒麟&quot;</span>));</span><br><span class="line"> doubleLinkedList.add(<span class="keyword">new</span> <span class="title class_">HeroNode2</span>(<span class="number">3</span>, <span class="string">&quot;吴用&quot;</span>, <span class="string">&quot;智多星&quot;</span>));</span><br><span class="line"> doubleLinkedList.add(<span class="keyword">new</span> <span class="title class_">HeroNode2</span>(<span class="number">4</span>, <span class="string">&quot;林冲&quot;</span>, <span class="string">&quot;豹子头&quot;</span>));</span><br><span class="line"> <span class="comment">//测试显示链表的功能</span></span><br><span class="line"> doubleLinkedList.list();</span><br><span class="line"> <span class="comment">//测试删除双向链表中的节点</span></span><br><span class="line"> doubleLinkedList.delete(<span class="number">2</span>);</span><br><span class="line"> doubleLinkedList.list();</span><br><span class="line"> <span class="comment">//测试修改双向链表中的节点</span></span><br><span class="line"> doubleLinkedList.update(<span class="keyword">new</span> <span class="title class_">HeroNode2</span>(<span class="number">2</span>, <span class="string">&quot;卢俊义修改版&quot;</span>, <span class="string">&quot;玉麒麟&quot;</span>));</span><br><span class="line"> doubleLinkedList.list();</span><br><span class="line"> System.out.println(<span class="string">&quot;--------------&quot;</span>);</span><br><span class="line"> doubleLinkedList.orderAdd(<span class="keyword">new</span> <span class="title class_">HeroNode2</span>(<span class="number">3</span>, <span class="string">&quot;小卢&quot;</span>, <span class="string">&quot;玉麒麟&quot;</span>));</span><br><span class="line"> doubleLinkedList.list();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">DoubleLinkedList</span> &#123;</span><br><span class="line"> <span class="comment">//初始化一个头节点 不存储具体的数据</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">HeroNode2</span> <span class="variable">head</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">HeroNode2</span>(<span class="number">0</span>, <span class="string">&quot;&quot;</span>, <span class="string">&quot;&quot;</span>);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//返回头节点的信息</span></span><br><span class="line"> <span class="keyword">public</span> HeroNode2 <span class="title function_">getHead</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> head;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 双向链表的顺序添加</span></span><br><span class="line"><span class="comment"> * 应该有问题 不是参考答案</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">orderAdd</span><span class="params">(HeroNode2 heroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//找到当前链表的最后一个节点</span></span><br><span class="line"> <span class="type">HeroNode2</span> <span class="variable">temp</span> <span class="operator">=</span> head;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isSuccess</span> <span class="operator">=</span> <span class="literal">false</span>;</span><br><span class="line"> <span class="keyword">while</span> (temp.next != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (temp.next.no &gt;= heroNode.no) &#123;</span><br><span class="line"> heroNode.next = temp.next;</span><br><span class="line"> temp.next.pre = heroNode;</span><br><span class="line"> temp.next = heroNode;</span><br><span class="line"> heroNode.pre = temp;</span><br><span class="line"> isSuccess = <span class="literal">true</span>;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (!isSuccess) &#123;<span class="comment">//没有添加成功 说明当前链表的序号超过了链表里面已有节点序号的最高值 直接添加到最后</span></span><br><span class="line"> <span class="built_in">this</span>.add(heroNode);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 删除双向链表中的一个节点</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">delete</span><span class="params">(<span class="type">int</span> no)</span> &#123;</span><br><span class="line"> <span class="comment">//判断链表是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (head.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;链表为空,无法删除!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//找到要删除的节点的信息</span></span><br><span class="line"> <span class="type">HeroNode2</span> <span class="variable">temp</span> <span class="operator">=</span> head.next;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isDelete</span> <span class="operator">=</span> <span class="literal">false</span>;<span class="comment">//是否删除</span></span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (temp == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (temp.no == no) &#123;</span><br><span class="line"> temp.pre.next = temp.next;</span><br><span class="line"> <span class="keyword">if</span> (temp.next != <span class="literal">null</span>) &#123;</span><br><span class="line"> temp.next.pre = temp.pre;<span class="comment">//这句话有个条件 temp不能是最后一个节点</span></span><br><span class="line"> &#125;</span><br><span class="line"> isDelete = <span class="literal">true</span>;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(isDelete ? <span class="string">&quot;删除成功&quot;</span> : <span class="string">&quot;没有找到该节点的信息&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 修改双向链表的信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">update</span><span class="params">(HeroNode2 newHeroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//判断链表是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (head.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;链表为空,无法修改该节点!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//找到需要修改的节点</span></span><br><span class="line"> <span class="comment">//首先找到头节点的位置</span></span><br><span class="line"> <span class="type">HeroNode2</span> <span class="variable">temp</span> <span class="operator">=</span> head.next;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">idFind</span> <span class="operator">=</span> <span class="literal">false</span>; <span class="comment">//是否找到节点的信息</span></span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (temp == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">break</span>;<span class="comment">//已经到了链表的结尾,就退出循环</span></span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (temp.no == newHeroNode.no) &#123;<span class="comment">//找到修改的节点</span></span><br><span class="line"> temp.name = newHeroNode.name;</span><br><span class="line"> temp.nickname = newHeroNode.nickname;</span><br><span class="line"> idFind = <span class="literal">true</span>; <span class="comment">//找到了节点并且修改了节点的信息</span></span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//做出判断,返回结果</span></span><br><span class="line"> System.out.println(idFind ? <span class="string">&quot;修改成功&quot;</span> : <span class="string">&quot;没有找到该节点的信息&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 向双向链表中添加节点信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">add</span><span class="params">(HeroNode2 heroNode)</span> &#123;</span><br><span class="line"> <span class="comment">//找到当前链表的最后一个节点</span></span><br><span class="line"> <span class="type">HeroNode2</span> <span class="variable">temp</span> <span class="operator">=</span> head;</span><br><span class="line"> <span class="keyword">while</span> (temp.next != <span class="literal">null</span>) &#123;</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> temp.next = heroNode;</span><br><span class="line"> heroNode.pre = temp;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 显示链表</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">list</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//先判断链表是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (head.next == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;链表为空!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">HeroNode2</span> <span class="variable">temp</span> <span class="operator">=</span> head;</span><br><span class="line"> <span class="keyword">while</span> (temp.next != <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(temp.next);</span><br><span class="line"> temp = temp.next;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//定义一个heroNode,每个heroNode对象都是一个节点</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">HeroNode2</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> no;</span><br><span class="line"> <span class="keyword">public</span> String name;</span><br><span class="line"> <span class="keyword">public</span> String nickname;</span><br><span class="line"> <span class="keyword">public</span> HeroNode2 next; <span class="comment">//指向下一个节点</span></span><br><span class="line"> <span class="keyword">public</span> HeroNode2 pre;<span class="comment">//指向上一个节点</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//构造器</span></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">HeroNode2</span><span class="params">(<span class="type">int</span> no, String name, String nickname)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.no = no;</span><br><span class="line"> <span class="built_in">this</span>.name = name;</span><br><span class="line"> <span class="built_in">this</span>.nickname = nickname;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">toString</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;HeroNode&#123;&quot;</span> +</span><br><span class="line"> <span class="string">&quot;no=&quot;</span> + no +</span><br><span class="line"> <span class="string">&quot;, name=&#x27;&quot;</span> + name + <span class="string">&#x27;\&#x27;&#x27;</span> +</span><br><span class="line"> <span class="string">&quot;, nickname=&#x27;&quot;</span> + nickname + <span class="string">&#x27;\&#x27;&#x27;</span> +</span><br><span class="line"> <span class="string">&#x27;&#125;&#x27;</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="4-4-单向环形链表的应用场景-Josephu问题"><a href="#4-4-单向环形链表的应用场景-Josephu问题" class="headerlink" title="4.4 单向环形链表的应用场景(Josephu问题)"></a>4.4 单向环形链表的应用场景(Josephu问题)</h3><p> Josephu 问题为设编号为12… n的n个人围坐一圈约定编号为k1&lt;&#x3D;k&lt;&#x3D;n的人从1开始报数数到m 的那个人出列它的下一位又从1开始报数数到m的那个人又出列依次类推直到所有人出列为止由此产生一个出队编号的序列。</p>
<p> 解决的方案:用一个不带头结点的循环链表来处理Josephu 问题先构成一个有n个结点的单循环链表然后由k结点起从1开始计数计到m时对应结点从链表中删除然后再从被删除结点的下一个结点又从1开始计数直到最后一个结点从链表中删除算法结束。</p>
<p><img src="/pictures/image-20230508104207815.png" alt="image-20230508104207815"></p>
<p><img src="/pictures/image-20230508121934697.png" alt="image-20230508121934697"></p>
<p>完整的代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.linkedlist;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/8</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 约瑟夫问题</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Josephu</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//测试构建环形链表</span></span><br><span class="line"> <span class="type">CircleSingleLinkedList</span> <span class="variable">circleSingleLinkedList</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">CircleSingleLinkedList</span>();</span><br><span class="line"> circleSingleLinkedList.addBoy(<span class="number">5</span>);</span><br><span class="line"> <span class="comment">//测试遍历环形单向链表</span></span><br><span class="line"> circleSingleLinkedList.showBoy();</span><br><span class="line"> <span class="comment">//测试生成小孩出圈的序列</span></span><br><span class="line"> circleSingleLinkedList.countBoy(<span class="number">1</span>,<span class="number">2</span>,<span class="number">5</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">//创建一个环形的单向链表</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">CircleSingleLinkedList</span> &#123;</span><br><span class="line"> <span class="comment">//创建一个first节点当前没有编号</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">Boy</span> <span class="variable">first</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 根据用户的输入产生一个出队编号的序列</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> startNo 表示从第几个小孩开始数</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> countNum 表示数几下</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> nums 传入几个小孩</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">countBoy</span><span class="params">(<span class="type">int</span> startNo, <span class="type">int</span> countNum, <span class="type">int</span> nums)</span> &#123;</span><br><span class="line"> <span class="comment">//先对输入的数据进行校验</span></span><br><span class="line"> <span class="keyword">if</span> (first == <span class="literal">null</span> || startNo &lt; <span class="number">0</span> || startNo &gt; nums) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;参数输入有误,请重新输入!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//创建一个辅助指针</span></span><br><span class="line"> <span class="type">Boy</span> <span class="variable">helper</span> <span class="operator">=</span> first;</span><br><span class="line"> <span class="comment">//将helper指向环形链表的最后一个节点</span></span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (helper.getNext() == first) &#123;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> helper = helper.getNext();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//将first和helper移动到指定的位置 考虑从第几个小孩开始数</span></span><br><span class="line"> <span class="comment">//小孩报数前,先让 first 和 helper 移动 k - 1次</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; startNo - <span class="number">1</span>; i++) &#123;</span><br><span class="line"> first = first.getNext();</span><br><span class="line"> helper = helper.getNext();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//让first和helper移动 m-1次然后出圈</span></span><br><span class="line"> <span class="comment">//循环操作 直到圈中只有一个小孩节点</span></span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>)&#123;</span><br><span class="line"> <span class="keyword">if</span>(helper == first)&#123;<span class="comment">//说明圈中只有一个节点</span></span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//让first和helper移动 countNum - 1</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; countNum - <span class="number">1</span>; i++) &#123;</span><br><span class="line"> first = first.getNext();</span><br><span class="line"> helper = helper.getNext();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//这时first指向的节点就是要出圈的小孩</span></span><br><span class="line"> System.out.printf(<span class="string">&quot;小孩%d出圈\n&quot;</span>,first.getNo());</span><br><span class="line"> <span class="comment">//将first指向的小孩出圈</span></span><br><span class="line"> first = first.getNext();</span><br><span class="line"> helper.setNext(first);</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.printf(<span class="string">&quot;最后留在圈中小孩编号是:%d \n&quot;</span>,helper.getNo());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 遍历当前的环形链表</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">showBoy</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//先判断链表是不是为空</span></span><br><span class="line"> <span class="keyword">if</span> (first == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;环形链表为空!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//创建一个辅助指针</span></span><br><span class="line"> <span class="type">Boy</span> <span class="variable">curBoy</span> <span class="operator">=</span> first;</span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> System.out.printf(<span class="string">&quot;小孩的编号:%d \n&quot;</span>, curBoy.getNo());</span><br><span class="line"> <span class="keyword">if</span> (curBoy.getNext() == first) &#123;<span class="comment">//说明已经循环一圈了 就不在循环 退出了</span></span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//向后移动</span></span><br><span class="line"> curBoy = curBoy.getNext();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 添加小孩节点 构建成一个环形的链表</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> nums 传入几个小孩</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">addBoy</span><span class="params">(<span class="type">int</span> nums)</span> &#123;</span><br><span class="line"> <span class="comment">//将传入的数据进行一个校验</span></span><br><span class="line"> <span class="keyword">if</span> (nums &lt; <span class="number">1</span>) &#123;<span class="comment">//传入小孩的的数量不能小于一</span></span><br><span class="line"> System.out.println(<span class="string">&quot;输入的值不正确!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">Boy</span> <span class="variable">curBoy</span> <span class="operator">=</span> <span class="literal">null</span>;<span class="comment">//辅助指针,帮助构建环形链表</span></span><br><span class="line"> <span class="comment">//使用循环创建我们的环形链表</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">1</span>; i &lt;= nums; i++) &#123; <span class="comment">//要加入几个小孩 就循环几次</span></span><br><span class="line"> <span class="comment">//根据编号创建小孩节点</span></span><br><span class="line"> <span class="type">Boy</span> <span class="variable">boy</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Boy</span>(i);</span><br><span class="line"> <span class="comment">//将小孩加入到环形链表中</span></span><br><span class="line"> <span class="keyword">if</span> (i == <span class="number">1</span>) &#123;<span class="comment">//说明是第一个小孩</span></span><br><span class="line"> first = boy;</span><br><span class="line"> first.setNext(first);<span class="comment">//添加的第一个节点 先自己指向自己 构建成一个环</span></span><br><span class="line"> curBoy = first; <span class="comment">//first节点我们不能动 使用辅助节点</span></span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//这是在循环里面 每次循环之后 小孩节点都不一样</span></span><br><span class="line"> curBoy.setNext(boy);</span><br><span class="line"> boy.setNext(first); <span class="comment">//形成回路</span></span><br><span class="line"> curBoy = boy;<span class="comment">//curBoy每次指向的都是最后一个小孩节点</span></span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//创建一个boy类 表示一个节点</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">Boy</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> no; <span class="comment">//编号</span></span><br><span class="line"> <span class="keyword">private</span> Boy next;<span class="comment">//指向下一个节点 默认是null</span></span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">Boy</span><span class="params">(<span class="type">int</span> no)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.no = no;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">getNo</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> no;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">setNo</span><span class="params">(<span class="type">int</span> no)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.no = no;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> Boy <span class="title function_">getNext</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> next;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">setNext</span><span class="params">(Boy next)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.next = next;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="五-栈"><a href="#五-栈" class="headerlink" title="五.栈"></a>五.栈</h2><h3 id="1-介绍"><a href="#1-介绍" class="headerlink" title="1.介绍"></a>1.介绍</h3><p>1)栈的英文为(stack)</p>
<p>2)栈是一个<strong>先入后出</strong>(FILO-First In Last Out)的有序列表。</p>
<p>3)栈(stack)是限制线性表中元素的插入和删除<strong>只能在线性表的同一端</strong>进行的一种特殊线性表。允许插入和删除的一端,为变化的一端,称为<strong>栈顶</strong>(Top),另一端为固定的一端,称为<strong>栈底</strong>(Bottom)。</p>
<p>4)根据栈的定义可知,最先放入栈中元素在栈底,最后放入的元素在栈顶,而删除元素刚好相反,最后放入的元素最先删除,最先放入的元素最后删除</p>
<h3 id="2-应用场景"><a href="#2-应用场景" class="headerlink" title="2.应用场景"></a>2.应用场景</h3><p>1)子程序的调用:在跳往子程序前,会先将下个指令的地址存到堆栈中,直到子程序执行完后再将地址取出,以回到原来的程序中。 </p>
<p>2)处理递归调用:和子程序的调用类似,只是除了储存下一个指令的地址外,也将参数、区域变量等数据存入堆栈中。</p>
<p>3)表达式的转换[中缀表达式转后缀表达式]与求值(实际解决)。</p>
<p>4)二叉树的遍历。</p>
<p>5)图形的深度优先(depth一first)搜索法。</p>
<h3 id="3-图解"><a href="#3-图解" class="headerlink" title="3.图解"></a>3.图解</h3><p><img src="/pictures/image-20230510101713914.png" alt="image-20230510101713914"></p>
<p><img src="/pictures/image-20230510101722707.png" alt="image-20230510101722707"></p>
<h3 id="4-使用数组模拟栈"><a href="#4-使用数组模拟栈" class="headerlink" title="4.使用数组模拟栈"></a>4.使用数组模拟栈</h3><p><img src="/pictures/image-20230510101916230.png" alt="image-20230510101916230"></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.stack;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/10</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 使用数组模拟栈</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ArrayStackDemo</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">ArrayStack</span> <span class="variable">stack</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ArrayStack</span>(<span class="number">5</span>);</span><br><span class="line"> <span class="comment">//入栈</span></span><br><span class="line"> stack.push(<span class="number">1</span>);</span><br><span class="line"> stack.push(<span class="number">2</span>);</span><br><span class="line"> stack.push(<span class="number">3</span>);</span><br><span class="line"> <span class="comment">//出栈</span></span><br><span class="line"> System.out.println(<span class="string">&quot;出栈的数是:&quot;</span>+stack.pop());</span><br><span class="line"> <span class="comment">//显示栈中所有的数据</span></span><br><span class="line"> stack.list();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//定义一个ArrayStack表示栈</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">ArrayStack</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> maxSize;<span class="comment">//栈的大小</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span>[] stack;<span class="comment">//数组 数组模拟栈 数据放在数组中</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> <span class="variable">top</span> <span class="operator">=</span> -<span class="number">1</span>; <span class="comment">//top表示栈顶 初始化为1</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//构造器</span></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">ArrayStack</span><span class="params">(<span class="type">int</span> maxSize)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.maxSize = maxSize;</span><br><span class="line"> <span class="comment">//完成数组的初始化</span></span><br><span class="line"> stack = <span class="keyword">new</span> <span class="title class_">int</span>[maxSize];</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断是否栈满</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">isFull</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> top == maxSize - <span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断栈是否为空</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">isEmpty</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> top == -<span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 入栈的操作</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">push</span><span class="params">(<span class="type">int</span> value)</span> &#123;</span><br><span class="line"> <span class="comment">//先判断栈是否为满</span></span><br><span class="line"> <span class="keyword">if</span> (isFull()) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;栈满,无法添加数据!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> top++;</span><br><span class="line"> stack[top] = value;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 出栈的操作</span></span><br><span class="line"><span class="comment"> * 将栈顶的数据返回</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">pop</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//先判断栈是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (isEmpty()) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;栈空,无法取出数据!&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//取出数据</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">value</span> <span class="operator">=</span> stack[top];</span><br><span class="line"> top--;</span><br><span class="line"> <span class="keyword">return</span> value;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 显示栈的情况</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">list</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//先判断栈是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (isEmpty()) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;栈空,无法取出数据!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> top; i &gt;= <span class="number">0</span>; i--) &#123;</span><br><span class="line"> System.out.printf(<span class="string">&quot;stack[%d] = %d \n&quot;</span>, i, stack[i]);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="5-栈实现综合计算器"><a href="#5-栈实现综合计算器" class="headerlink" title="5.栈实现综合计算器"></a>5.栈实现综合计算器</h3><p>中缀表达式</p>
<p><img src="/pictures/image-20230510105251076.png" alt="image-20230510105251076"></p>
<p><img src="/pictures/image-20230510110403055.png" alt="image-20230510110403055"></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.stack;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/10</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 综合计算器</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Calculator</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 1. 通过一个 index 值(索引),来遍历我们的表达式</span></span><br><span class="line"><span class="comment"> * 2. 如果我们发现是一个数字, 就直接入数栈</span></span><br><span class="line"><span class="comment"> * 3. 如果发现扫描到的是一个符号, 就分如下情况</span></span><br><span class="line"><span class="comment"> * 3.1 如果发现当前的符号栈为 空,就直接入栈</span></span><br><span class="line"><span class="comment"> * 3.2 如果符号栈有操作符,就进行比较,如果当前的操作符的优先级小于或者等于栈中的操作符, 就需要从数栈中pop出两个数,在从符号栈中pop出一个符号进行运算将得到结果入数栈然后将当前的操作符入符号栈 如果当前的操作符的优先级大于栈中的操作符, 就直接入符号栈.</span></span><br><span class="line"><span class="comment"> * 4. 当表达式扫描完毕,就顺序的从 数栈和符号栈中pop出相应的数和符号并运行.</span></span><br><span class="line"><span class="comment"> * 5. 最后在数栈只有一个数字,就是表达式的结果</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">expression</span> <span class="operator">=</span> <span class="string">&quot;30+2*6-2&quot;</span>;</span><br><span class="line"> <span class="comment">//创建两个栈 一个是数栈 一个是符号栈</span></span><br><span class="line"> <span class="type">ArrayStack2</span> <span class="variable">numStack</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ArrayStack2</span>(<span class="number">10</span>);</span><br><span class="line"> <span class="type">ArrayStack2</span> <span class="variable">operStack</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ArrayStack2</span>(<span class="number">10</span>);</span><br><span class="line"> <span class="comment">//定义需要的相关变量</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">index</span> <span class="operator">=</span> <span class="number">0</span>;<span class="comment">//用于扫描</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">num1</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="type">int</span> <span class="variable">num2</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="type">int</span> <span class="variable">oper</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="type">int</span> <span class="variable">result</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="type">char</span> <span class="variable">ch</span> <span class="operator">=</span> <span class="string">&#x27; &#x27;</span>; <span class="comment">//将每次扫描得到的char保存在ch中</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">keepNum</span> <span class="operator">=</span> <span class="string">&quot;&quot;</span>;<span class="comment">//用于拼接多位数的</span></span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="comment">//得到expression的每一个字符</span></span><br><span class="line"> ch = expression.substring(index, index + <span class="number">1</span>).charAt(<span class="number">0</span>);</span><br><span class="line"> <span class="comment">//判断ch是什么 做相应的处理</span></span><br><span class="line"> <span class="keyword">if</span> (operStack.isOper(ch)) &#123;</span><br><span class="line"> <span class="comment">//先符号栈判断是不是为空</span></span><br><span class="line"> <span class="keyword">if</span> (!operStack.isEmpty()) &#123; <span class="comment">//判断符号栈是否为空</span></span><br><span class="line"> <span class="comment">//不为空的情况</span></span><br><span class="line"> <span class="keyword">if</span> (operStack.priority(ch) &lt;= operStack.priority(operStack.peek())) &#123;</span><br><span class="line"> <span class="comment">//如果当前的操作符的优先级小于或者等于栈中的操作符, 就需要从数栈中pop出两个数,</span></span><br><span class="line"> <span class="comment">// 在从符号栈中pop出一个符号进行运算将得到结果入数栈</span></span><br><span class="line"> num1 = numStack.pop();</span><br><span class="line"> num2 = numStack.pop();</span><br><span class="line"> oper = operStack.pop();</span><br><span class="line"> result = numStack.cal(num1, num2, oper);</span><br><span class="line"> <span class="comment">//将运算的结果入数栈</span></span><br><span class="line"> numStack.push(result);</span><br><span class="line"> <span class="comment">//将当前的操作符入符号栈</span></span><br><span class="line"> operStack.push(ch);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//如果当前的操作符的优先级大于栈中的操作符, 就直接入符号栈.</span></span><br><span class="line"> operStack.push(ch);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//如果为空 直接入栈</span></span><br><span class="line"> operStack.push(ch);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//如果是数字 就直接入数栈</span></span><br><span class="line"> <span class="comment">//要考虑是多位数的情况</span></span><br><span class="line"> keepNum += ch;</span><br><span class="line"> <span class="comment">//如果ch是表达式的最后一位 就直接入栈</span></span><br><span class="line"> <span class="keyword">if</span> (index == expression.length() - <span class="number">1</span>) &#123;</span><br><span class="line"> numStack.push(Integer.parseInt(keepNum));</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//判断下一个字符是不是数字 如果是数字 就继续扫描 如果是运算符 则入栈</span></span><br><span class="line"> <span class="keyword">if</span> (operStack.isOper(expression.substring(index + <span class="number">1</span>, index + <span class="number">2</span>).charAt(<span class="number">0</span>))) &#123;<span class="comment">//下一位是操作符</span></span><br><span class="line"> <span class="comment">//直接将当前为添加到数栈</span></span><br><span class="line"> numStack.push(Integer.parseInt(keepNum));</span><br><span class="line"> <span class="comment">//清空keepNum</span></span><br><span class="line"> keepNum = <span class="string">&quot;&quot;</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//让index + 1 ,并判断是否扫描到表达式的最后</span></span><br><span class="line"> index++;</span><br><span class="line"> <span class="keyword">if</span> (index &gt;= expression.length()) &#123;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//当表达式扫描完毕,就顺序的从 数栈和符号栈中pop出相应的数和符号并运行.</span></span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="comment">//如果符号栈为空 则计算结束 数栈中只有 一个数字</span></span><br><span class="line"> <span class="keyword">if</span> (operStack.isEmpty()) &#123;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> num1 = numStack.pop();</span><br><span class="line"> num2 = numStack.pop();</span><br><span class="line"> oper = operStack.pop();</span><br><span class="line"> result = numStack.cal(num1, num2, oper);</span><br><span class="line"> numStack.push(result);</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.printf(<span class="string">&quot;表达式:%s = %d&quot;</span>, expression, numStack.pop());</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//定义一个ArrayStack表示栈</span></span><br><span class="line"><span class="keyword">class</span> <span class="title class_">ArrayStack2</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> maxSize;<span class="comment">//栈的大小</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span>[] stack;<span class="comment">//数组 数组模拟栈 数据放在数组中</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">int</span> <span class="variable">top</span> <span class="operator">=</span> -<span class="number">1</span>; <span class="comment">//top表示栈顶 初始化为1</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//构造器</span></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">ArrayStack2</span><span class="params">(<span class="type">int</span> maxSize)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.maxSize = maxSize;</span><br><span class="line"> <span class="comment">//完成数组的初始化</span></span><br><span class="line"> stack = <span class="keyword">new</span> <span class="title class_">int</span>[maxSize];</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断是否栈满</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">isFull</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> top == maxSize - <span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断栈是否为空</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">isEmpty</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> top == -<span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 入栈的操作</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">push</span><span class="params">(<span class="type">int</span> value)</span> &#123;</span><br><span class="line"> <span class="comment">//先判断栈是否为满</span></span><br><span class="line"> <span class="keyword">if</span> (isFull()) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;栈满,无法添加数据!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> top++;</span><br><span class="line"> stack[top] = value;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 出栈的操作</span></span><br><span class="line"><span class="comment"> * 将栈顶的数据返回</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">pop</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//先判断栈是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (isEmpty()) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;栈空,无法取出数据!&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//取出数据</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">value</span> <span class="operator">=</span> stack[top];</span><br><span class="line"> top--;</span><br><span class="line"> <span class="keyword">return</span> value;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 显示栈的情况</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">list</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//先判断栈是否为空</span></span><br><span class="line"> <span class="keyword">if</span> (isEmpty()) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;栈空,无法取出数据!&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> top; i &gt;= <span class="number">0</span>; i--) &#123;</span><br><span class="line"> System.out.printf(<span class="string">&quot;stack[%d] = %d \n&quot;</span>, i, stack[i]);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 返回运算符的优先级</span></span><br><span class="line"><span class="comment"> * 优先级由数字表示</span></span><br><span class="line"><span class="comment"> * 数字大 优先级高</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">priority</span><span class="params">(<span class="type">int</span> oper)</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (oper == <span class="string">&#x27;*&#x27;</span> || oper == <span class="string">&#x27;/&#x27;</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="number">1</span>;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (oper == <span class="string">&#x27;+&#x27;</span> || oper == <span class="string">&#x27;-&#x27;</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> -<span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断是不是一个运算符</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">isOper</span><span class="params">(<span class="type">char</span> val)</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> val == <span class="string">&#x27;+&#x27;</span> || val == <span class="string">&#x27;-&#x27;</span> || val == <span class="string">&#x27;*&#x27;</span> || val == <span class="string">&#x27;/&#x27;</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 计算方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">cal</span><span class="params">(<span class="type">int</span> num1, <span class="type">int</span> num2, <span class="type">int</span> oper)</span> &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">result</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">switch</span> (oper) &#123;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&#x27;+&#x27;</span>:</span><br><span class="line"> result = num1 + num2;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&#x27;-&#x27;</span>:</span><br><span class="line"> result = num2 - num1; <span class="comment">//注意顺序</span></span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&#x27;*&#x27;</span>:</span><br><span class="line"> result = num1 * num2;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&#x27;/&#x27;</span>:</span><br><span class="line"> result = num2 / num1;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> result;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查看栈顶数据的方法</span></span><br><span class="line"><span class="comment"> * 返回栈顶的值 不是pop出来</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">peek</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> stack[top];</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="6-逆波兰计算器的设计与实现"><a href="#6-逆波兰计算器的设计与实现" class="headerlink" title="6.逆波兰计算器的设计与实现"></a>6.逆波兰计算器的设计与实现</h3><p><strong>逆波兰表达式(后缀表达式)</strong></p>
<p>1)<strong>输入一个逆波兰表达式(后缀表达式),使用栈(Stack),计算其结果</strong></p>
<p>2)<strong>支持小括号和多位数整数,因为这里我们主要讲的是数据结构,因此计算器进行简化,只支持对整数的计算。</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.stack;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.ArrayList;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"><span class="keyword">import</span> java.util.Stack;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/11</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 逆波兰计算器的设计与实现</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">PolandNotation</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//先定义一个逆波兰表达式</span></span><br><span class="line"> <span class="comment">//(3+4)×5-6 的逆波兰表达式是 3 4 + 5 × 6 -</span></span><br><span class="line"> <span class="comment">//为了方便 逆波兰表达式的数字和符号有空格隔开</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">suffixExpression</span> <span class="operator">=</span> <span class="string">&quot;3 4 + 5 * 6 -&quot;</span>;<span class="comment">//中间有空格隔开</span></span><br><span class="line"> <span class="comment">//1.先将suffixExpression放入到List集合中</span></span><br><span class="line"> <span class="comment">//2.将List集合传递给一个方法 配合栈 完成计算</span></span><br><span class="line"> List&lt;String&gt; rpnList = getListString(suffixExpression);</span><br><span class="line"> System.out.println(<span class="string">&quot;计算的结果是:&quot;</span>+calculate(rpnList));</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//将一个逆波兰表达式依次将数据和运算符放入到List集合中</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> List&lt;String&gt; <span class="title function_">getListString</span><span class="params">(String suffixExpression)</span> &#123;</span><br><span class="line"> <span class="comment">//将suffixExpression按照空格分割</span></span><br><span class="line"> String[] strings = suffixExpression.split(<span class="string">&quot; &quot;</span>);</span><br><span class="line"> List&lt;String&gt; list = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> <span class="keyword">for</span> (String string : strings) &#123;</span><br><span class="line"> list.add(string);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> list;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 从左至右扫描将3和4压入堆栈</span></span><br><span class="line"><span class="comment"> * 遇到+运算符因此弹出4和34为栈顶元素3为次顶元素计算出3+4的值得7再将7入栈</span></span><br><span class="line"><span class="comment"> * 将5入栈</span></span><br><span class="line"><span class="comment"> * 接下来是×运算符因此弹出5和7计算出7×5=35将35入栈</span></span><br><span class="line"><span class="comment"> * 将6入栈</span></span><br><span class="line"><span class="comment"> * 最后是-运算符计算出35-6的值即29由此得出最终结果</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">int</span> <span class="title function_">calculate</span><span class="params">(List&lt;String&gt; list)</span> &#123;</span><br><span class="line"> <span class="comment">//创建一个栈</span></span><br><span class="line"> Stack&lt;String&gt; stack = <span class="keyword">new</span> <span class="title class_">Stack</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//遍历list</span></span><br><span class="line"> <span class="keyword">for</span> (String item : list) &#123;</span><br><span class="line"> <span class="comment">//使用正则表达式取出数字</span></span><br><span class="line"> <span class="keyword">if</span> (item.matches(<span class="string">&quot;\\d+&quot;</span>)) &#123; <span class="comment">//匹配的是多位数</span></span><br><span class="line"> <span class="comment">//入栈</span></span><br><span class="line"> stack.push(item);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//弹出两个数 并运算 再入栈</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">num2</span> <span class="operator">=</span> Integer.parseInt(stack.pop());</span><br><span class="line"> <span class="type">int</span> <span class="variable">num1</span> <span class="operator">=</span> Integer.parseInt(stack.pop());</span><br><span class="line"> <span class="comment">//运算</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">res</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">if</span> (item.equals(<span class="string">&quot;+&quot;</span>)) &#123;</span><br><span class="line"> res = num1 + num2;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (item.equals(<span class="string">&quot;-&quot;</span>)) &#123;</span><br><span class="line"> res = num1 - num2;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (item.equals(<span class="string">&quot;*&quot;</span>)) &#123;</span><br><span class="line"> res = num1 * num2;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (item.equals(<span class="string">&quot;/&quot;</span>)) &#123;</span><br><span class="line"> res = num1 / num2;</span><br><span class="line"> &#125;<span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;运算符有误!&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//把结果入栈</span></span><br><span class="line"> stack.push(res + <span class="string">&quot;&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//最后留在stack中的数就是运算结果</span></span><br><span class="line"> <span class="keyword">return</span> Integer.parseInt(stack.pop());</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>将中缀表达式转化为后缀表达式(逆波兰表达式)</strong></p>
<p>解题的步骤:</p>
<p>1)初始化两个栈运算符栈s1和储存中间结果的栈s2</p>
<p>2)从左至右扫描中缀表达式;</p>
<p>3)遇到操作数时将其压s2</p>
<p>4)遇到运算符时比较其与s1栈顶运算符的优先级</p>
<p> (1)如果s1为空或栈顶运算符为左括号“(”,则直接将此运算符入栈;</p>
<p> (2)否则若优先级比栈顶运算符的高也将运算符压入s1</p>
<p> (3)否则将s1栈顶的运算符弹出并压入到s2中再次转到(4-1)与s1中新的栈顶运算符相比较</p>
<p>5)遇到括号时:<br> (1) 如果是左括号“(”则直接压入s1<br> (2) 如果是右括号“)”则依次弹出s1栈顶的运算符并压入s2直到遇到左括号为止此时将这一对括号丢弃</p>
<p>6)重复步骤2至5直到表达式的最右边</p>
<p>7)将s1中剩余的运算符依次弹出并压入s2</p>
<p>8)依次弹出s2中的元素并输出<strong>结果的逆序即为中缀表达式对应的后缀表达式</strong></p>
<p><img src="/pictures/image-20230511094011546.png" alt="image-20230511094011546"></p>
<p>先将中缀表达式转化成list集合</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 将中缀表达式转化成对应的list</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> expression 中缀表达式</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 中缀表达式转化成的一个list集合</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> List&lt;String&gt; <span class="title function_">toInfixExpressionList</span><span class="params">(String expression)</span> &#123;</span><br><span class="line"> <span class="comment">//定义一个集合存储中缀表达式对应的list集合</span></span><br><span class="line"> List&lt;String&gt; list = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> <span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>;<span class="comment">//这个是一个指针 用于遍历中缀表达式的字符串</span></span><br><span class="line"> String str;<span class="comment">//做多位数的拼接工作 ,因为我们要考虑多位数的情况</span></span><br><span class="line"> <span class="type">char</span> c;<span class="comment">//每遍历一个字符就放入到c中</span></span><br><span class="line"> <span class="keyword">do</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> ((c = expression.charAt(i)) &lt; <span class="number">48</span> || (c = expression.charAt(i)) &gt; <span class="number">57</span>) &#123; <span class="comment">//如果c是一个非数字的字符需要加入到ls中</span></span><br><span class="line"> list.add(c + <span class="string">&quot;&quot;</span>); <span class="comment">//直接将这个字符添加到list集合中</span></span><br><span class="line"> i++;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;<span class="comment">//如果是一个数 要考虑多位数的问题</span></span><br><span class="line"> str = <span class="string">&quot;&quot;</span>;<span class="comment">//先将str置空</span></span><br><span class="line"> <span class="keyword">while</span> (i &lt; expression.length() &amp;&amp; (c = expression.charAt(i)) &gt;= <span class="number">48</span> &amp;&amp; (c = expression.charAt(i)) &lt;= <span class="number">57</span>) &#123;</span><br><span class="line"> str += c;</span><br><span class="line"> i++;</span><br><span class="line"> &#125;</span><br><span class="line"> list.add(str);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">while</span> (i &lt; expression.length());</span><br><span class="line"> <span class="keyword">return</span> list;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>将中缀表达式的集合转化成逆波兰表达式(后缀表达式)的集合</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 将中缀表达式对应的List转化成后缀表达式对应的list</span></span><br><span class="line"><span class="comment"> * tips:</span></span><br><span class="line"><span class="comment"> * 1)初始化两个栈运算符栈s1和储存中间结果的栈s2</span></span><br><span class="line"><span class="comment"> * 2)从左至右扫描中缀表达式;</span></span><br><span class="line"><span class="comment"> * 3)遇到操作数时将其压s2</span></span><br><span class="line"><span class="comment"> * 4)遇到运算符时比较其与s1栈顶运算符的优先级</span></span><br><span class="line"><span class="comment"> * (1)如果s1为空或栈顶运算符为左括号“(”,则直接将此运算符入栈;</span></span><br><span class="line"><span class="comment"> * (2)否则若优先级比栈顶运算符的高也将运算符压入s1</span></span><br><span class="line"><span class="comment"> * (3)否则将s1栈顶的运算符弹出并压入到s2中再次转到(4-1)与s1中新的栈顶运算符相比较</span></span><br><span class="line"><span class="comment"> * 5)遇到括号时:</span></span><br><span class="line"><span class="comment"> * (1) 如果是左括号“(”则直接压入s1</span></span><br><span class="line"><span class="comment"> * (2) 如果是右括号“)”则依次弹出s1栈顶的运算符并压入s2直到遇到左括号为止此时将这一对括号丢弃</span></span><br><span class="line"><span class="comment"> * 6)重复步骤2至5直到表达式的最右边</span></span><br><span class="line"><span class="comment"> * 7)将s1中剩余的运算符依次弹出并压入s2</span></span><br><span class="line"><span class="comment"> * 8)依次弹出s2中的元素并输出**结果的逆序即为中缀表达式对应的后缀表达式**</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> ls 中缀表达式对应的list</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 后缀表达式对应的list</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> List&lt;String&gt; <span class="title function_">parseSuffixExpressionList</span><span class="params">(List&lt;String&gt; ls)</span> &#123;</span><br><span class="line"> <span class="comment">//定义栈</span></span><br><span class="line"> Stack&lt;String&gt; s1 = <span class="keyword">new</span> <span class="title class_">Stack</span>&lt;&gt;();<span class="comment">//符号栈 s1栈</span></span><br><span class="line"> <span class="comment">//说明:因为思路分析中使用的s2的栈在整个的运算的过程中没有进行pop的操作 我们直接使用list集合代替s2栈 (同时也为了方便后面逆序的输出)</span></span><br><span class="line"> ArrayList&lt;String&gt; s2 = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();<span class="comment">//用于存储中间结果的list</span></span><br><span class="line"> <span class="comment">//遍历ls</span></span><br><span class="line"> <span class="keyword">for</span> (String item : ls) &#123;</span><br><span class="line"> <span class="comment">//如果是一个数 就加入到s2栈</span></span><br><span class="line"> <span class="keyword">if</span> (item.matches(<span class="string">&quot;\\d+&quot;</span>)) &#123;<span class="comment">//正则匹配</span></span><br><span class="line"> s2.add(item);</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (item.equals(<span class="string">&quot;(&quot;</span>)) &#123; <span class="comment">//如果是s1的话就直接入符号栈</span></span><br><span class="line"> s1.push(item);</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (item.equals(<span class="string">&quot;)&quot;</span>)) &#123;</span><br><span class="line"> <span class="comment">//如果是右括号“)”则依次弹出s1栈顶的运算符并压入s2直到遇到左括号为止此时将这一对括号丢弃</span></span><br><span class="line"> <span class="keyword">while</span> (!s1.peek().equals(<span class="string">&quot;(&quot;</span>)) &#123;</span><br><span class="line"> s2.add(s1.pop());</span><br><span class="line"> &#125;</span><br><span class="line"> s1.pop();<span class="comment">//将弹出s1栈,这里的操作就是消除括号</span></span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;<span class="comment">//加减乘除的操作</span></span><br><span class="line"> <span class="comment">//当item的优先级小于栈顶的优先级</span></span><br><span class="line"> <span class="comment">// 将s1栈顶的运算符弹出并加入到s2中再次转到(4.1)与s1中新的栈顶运算符相比较</span></span><br><span class="line"> <span class="keyword">while</span> (s1.size() != <span class="number">0</span> &amp;&amp; getVal(s1.peek()) &gt;= getVal(item)) &#123;</span><br><span class="line"> s2.add(s1.pop());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//还需要将item压入栈中</span></span><br><span class="line"> s1.push(item);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//将s1中剩余的运算符依次弹出并加入s2</span></span><br><span class="line"> <span class="keyword">while</span> (s1.size() != <span class="number">0</span>) &#123;</span><br><span class="line"> s2.add(s1.pop());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> s2;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>通过逆波兰表达式(后缀表达式)的集合得到最终的计算结果</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 通过一个后缀表达式的list集合得到表达式最终的计算结果</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> list 后缀表达式的list集合</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 根据后缀表达式的集合计算出的表达式的结果信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">int</span> <span class="title function_">calculate</span><span class="params">(List&lt;String&gt; list)</span> &#123;</span><br><span class="line"> <span class="comment">//创建一个栈</span></span><br><span class="line"> Stack&lt;String&gt; stack = <span class="keyword">new</span> <span class="title class_">Stack</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//遍历list</span></span><br><span class="line"> <span class="keyword">for</span> (String item : list) &#123;</span><br><span class="line"> <span class="comment">//使用正则表达式取出数字</span></span><br><span class="line"> <span class="keyword">if</span> (item.matches(<span class="string">&quot;\\d+&quot;</span>)) &#123; <span class="comment">//匹配的是多位数</span></span><br><span class="line"> <span class="comment">//入栈</span></span><br><span class="line"> stack.push(item);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//弹出两个数 并运算 再入栈</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">num2</span> <span class="operator">=</span> Integer.parseInt(stack.pop());</span><br><span class="line"> <span class="type">int</span> <span class="variable">num1</span> <span class="operator">=</span> Integer.parseInt(stack.pop());</span><br><span class="line"> <span class="comment">//运算</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">res</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">if</span> (item.equals(<span class="string">&quot;+&quot;</span>)) &#123;</span><br><span class="line"> res = num1 + num2;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (item.equals(<span class="string">&quot;-&quot;</span>)) &#123;</span><br><span class="line"> res = num1 - num2;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (item.equals(<span class="string">&quot;*&quot;</span>)) &#123;</span><br><span class="line"> res = num1 * num2;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (item.equals(<span class="string">&quot;/&quot;</span>)) &#123;</span><br><span class="line"> res = num1 / num2;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;运算符有误!&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//把结果入栈</span></span><br><span class="line"> stack.push(res + <span class="string">&quot;&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//最后留在stack中的数就是运算结果</span></span><br><span class="line"> <span class="keyword">return</span> Integer.parseInt(stack.pop());</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p><strong>完整的代码</strong></p>
<p>(不支持小数)</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.stack;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.ArrayList;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"><span class="keyword">import</span> java.util.Stack;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/11</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 逆波兰计算器的设计与实现</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">PolandNotation</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//先定义一个逆波兰表达式</span></span><br><span class="line"> <span class="comment">//(3+4)×5-6 的逆波兰表达式是 3 4 + 5 × 6 -</span></span><br><span class="line"> <span class="comment">//为了方便 逆波兰表达式的数字和符号有空格隔开</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">suffixExpression</span> <span class="operator">=</span> <span class="string">&quot;3 4 + 5 * 6 -&quot;</span>;<span class="comment">//中间有空格隔开</span></span><br><span class="line"> <span class="comment">//1.先将suffixExpression放入到List集合中</span></span><br><span class="line"> <span class="comment">//2.将List集合传递给一个方法 配合栈 完成计算</span></span><br><span class="line"> List&lt;String&gt; rpnList = getListString(suffixExpression);</span><br><span class="line"> System.out.println(<span class="string">&quot;计算的结果是:&quot;</span> + calculate(rpnList));</span><br><span class="line"></span><br><span class="line"> <span class="comment">//测试将中缀表达式转化成逆波兰表达式</span></span><br><span class="line"> <span class="comment">//完成一个将中缀表达式 转换为一个后缀表达式</span></span><br><span class="line"> <span class="comment">//1. 1+((2+3)×4)-5(中缀表达式) -&gt; 1 2 3 + 4 × + 5 (后缀表达式)</span></span><br><span class="line"> <span class="comment">//2. 将中缀表达式转化成List集合</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">expression</span> <span class="operator">=</span> <span class="string">&quot;1+((2+3)*4)-5&quot;</span>;</span><br><span class="line"> List&lt;String&gt; list = toInfixExpressionList(expression);</span><br><span class="line"> System.out.println(<span class="string">&quot;中缀表达式对应的List:&quot;</span> + list);</span><br><span class="line"> <span class="comment">//3.将得到的中缀表达式对应的List 转换成一个逆波兰表达式(后缀表达式)对应的List</span></span><br><span class="line"> List&lt;String&gt; stringList = parseSuffixExpressionList(list);</span><br><span class="line"> System.out.println(<span class="string">&quot;中缀表达式对应的List:&quot;</span> + stringList);</span><br><span class="line"> System.out.println(<span class="string">&quot;计算的结果:&quot;</span> + calculate(stringList));</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 输入一个运算符 返回对应的优先级</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">int</span> <span class="title function_">getVal</span><span class="params">(String operation)</span> &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">res</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">switch</span> (operation) &#123;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&quot;+&quot;</span>:</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&quot;-&quot;</span>:</span><br><span class="line"> res = <span class="number">1</span>;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&quot;/&quot;</span>:</span><br><span class="line"> <span class="keyword">case</span> <span class="string">&quot;*&quot;</span>:</span><br><span class="line"> res = <span class="number">2</span>;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">default</span>:</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> res;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 将中缀表达式对应的List转化成后缀表达式对应的list</span></span><br><span class="line"><span class="comment"> * tips:</span></span><br><span class="line"><span class="comment"> * 1)初始化两个栈运算符栈s1和储存中间结果的栈s2</span></span><br><span class="line"><span class="comment"> * 2)从左至右扫描中缀表达式;</span></span><br><span class="line"><span class="comment"> * 3)遇到操作数时将其压s2</span></span><br><span class="line"><span class="comment"> * 4)遇到运算符时比较其与s1栈顶运算符的优先级</span></span><br><span class="line"><span class="comment"> * (1)如果s1为空或栈顶运算符为左括号“(”,则直接将此运算符入栈;</span></span><br><span class="line"><span class="comment"> * (2)否则若优先级比栈顶运算符的高也将运算符压入s1</span></span><br><span class="line"><span class="comment"> * (3)否则将s1栈顶的运算符弹出并压入到s2中再次转到(4-1)与s1中新的栈顶运算符相比较</span></span><br><span class="line"><span class="comment"> * 5)遇到括号时:</span></span><br><span class="line"><span class="comment"> * (1) 如果是左括号“(”则直接压入s1</span></span><br><span class="line"><span class="comment"> * (2) 如果是右括号“)”则依次弹出s1栈顶的运算符并压入s2直到遇到左括号为止此时将这一对括号丢弃</span></span><br><span class="line"><span class="comment"> * 6)重复步骤2至5直到表达式的最右边</span></span><br><span class="line"><span class="comment"> * 7)将s1中剩余的运算符依次弹出并压入s2</span></span><br><span class="line"><span class="comment"> * 8)依次弹出s2中的元素并输出**结果的逆序即为中缀表达式对应的后缀表达式**</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> ls 中缀表达式对应的list</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 后缀表达式对应的list</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> List&lt;String&gt; <span class="title function_">parseSuffixExpressionList</span><span class="params">(List&lt;String&gt; ls)</span> &#123;</span><br><span class="line"> <span class="comment">//定义栈</span></span><br><span class="line"> Stack&lt;String&gt; s1 = <span class="keyword">new</span> <span class="title class_">Stack</span>&lt;&gt;();<span class="comment">//符号栈 s1栈</span></span><br><span class="line"> <span class="comment">//说明:因为思路分析中使用的s2的栈在整个的运算的过程中没有进行pop的操作 我们直接使用list集合代替s2栈 (同时也为了方便后面逆序的输出)</span></span><br><span class="line"> ArrayList&lt;String&gt; s2 = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();<span class="comment">//用于存储中间结果的list</span></span><br><span class="line"> <span class="comment">//遍历ls</span></span><br><span class="line"> <span class="keyword">for</span> (String item : ls) &#123;</span><br><span class="line"> <span class="comment">//如果是一个数 就加入到s2栈</span></span><br><span class="line"> <span class="keyword">if</span> (item.matches(<span class="string">&quot;\\d+&quot;</span>)) &#123;<span class="comment">//正则匹配</span></span><br><span class="line"> s2.add(item);</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (item.equals(<span class="string">&quot;(&quot;</span>)) &#123; <span class="comment">//如果是s1的话就直接入符号栈</span></span><br><span class="line"> s1.push(item);</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (item.equals(<span class="string">&quot;)&quot;</span>)) &#123;</span><br><span class="line"> <span class="comment">//如果是右括号“)”则依次弹出s1栈顶的运算符并压入s2直到遇到左括号为止此时将这一对括号丢弃</span></span><br><span class="line"> <span class="keyword">while</span> (!s1.peek().equals(<span class="string">&quot;(&quot;</span>)) &#123;</span><br><span class="line"> s2.add(s1.pop());</span><br><span class="line"> &#125;</span><br><span class="line"> s1.pop();<span class="comment">//将弹出s1栈,这里的操作就是消除括号</span></span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;<span class="comment">//加减乘除的操作</span></span><br><span class="line"> <span class="comment">//当item的优先级小于栈顶的优先级</span></span><br><span class="line"> <span class="comment">// 将s1栈顶的运算符弹出并加入到s2中再次转到(4.1)与s1中新的栈顶运算符相比较</span></span><br><span class="line"> <span class="keyword">while</span> (s1.size() != <span class="number">0</span> &amp;&amp; getVal(s1.peek()) &gt;= getVal(item)) &#123;</span><br><span class="line"> s2.add(s1.pop());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//还需要将item压入栈中</span></span><br><span class="line"> s1.push(item);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//将s1中剩余的运算符依次弹出并加入s2</span></span><br><span class="line"> <span class="keyword">while</span> (s1.size() != <span class="number">0</span>) &#123;</span><br><span class="line"> s2.add(s1.pop());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> s2;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 将中缀表达式转化成对应的list</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> expression 中缀表达式</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 中缀表达式转化成的一个list集合</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> List&lt;String&gt; <span class="title function_">toInfixExpressionList</span><span class="params">(String expression)</span> &#123;</span><br><span class="line"> <span class="comment">//定义一个集合存储中缀表达式对应的list集合</span></span><br><span class="line"> List&lt;String&gt; list = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> <span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>;<span class="comment">//这个是一个指针 用于遍历中缀表达式的字符串</span></span><br><span class="line"> String str;<span class="comment">//做多位数的拼接工作 ,因为我们要考虑多位数的情况</span></span><br><span class="line"> <span class="type">char</span> c;<span class="comment">//每遍历一个字符就放入到c中</span></span><br><span class="line"> <span class="keyword">do</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> ((c = expression.charAt(i)) &lt; <span class="number">48</span> || (c = expression.charAt(i)) &gt; <span class="number">57</span>) &#123; <span class="comment">//如果c是一个非数字的字符需要加入到ls中</span></span><br><span class="line"> list.add(c + <span class="string">&quot;&quot;</span>); <span class="comment">//直接将这个字符添加到list集合中</span></span><br><span class="line"> i++;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;<span class="comment">//如果是一个数 要考虑多位数的问题</span></span><br><span class="line"> str = <span class="string">&quot;&quot;</span>;<span class="comment">//先将str置空</span></span><br><span class="line"> <span class="comment">//这个只要遍历的有一个字符不是数字 就会退出while循环</span></span><br><span class="line"> <span class="keyword">while</span> (i &lt; expression.length() &amp;&amp; (c = expression.charAt(i)) &gt;= <span class="number">48</span> &amp;&amp; (c = expression.charAt(i)) &lt;= <span class="number">57</span>) &#123;</span><br><span class="line"> str += c;</span><br><span class="line"> i++;</span><br><span class="line"> &#125;</span><br><span class="line"> list.add(str);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">while</span> (i &lt; expression.length());</span><br><span class="line"> <span class="keyword">return</span> list;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">//将一个逆波兰表达式依次将数据和运算符放入到List集合中</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> List&lt;String&gt; <span class="title function_">getListString</span><span class="params">(String suffixExpression)</span> &#123;</span><br><span class="line"> <span class="comment">//将suffixExpression按照空格分割</span></span><br><span class="line"> String[] strings = suffixExpression.split(<span class="string">&quot; &quot;</span>);</span><br><span class="line"> List&lt;String&gt; list = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> <span class="keyword">for</span> (String string : strings) &#123;</span><br><span class="line"> list.add(string);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> list;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 通过一个后缀表达式的list集合得到表达式最终的计算结果</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> list 后缀表达式的list集合</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 根据后缀表达式的集合计算出的表达式的结果信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">int</span> <span class="title function_">calculate</span><span class="params">(List&lt;String&gt; list)</span> &#123;</span><br><span class="line"> <span class="comment">//创建一个栈</span></span><br><span class="line"> Stack&lt;String&gt; stack = <span class="keyword">new</span> <span class="title class_">Stack</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//遍历list</span></span><br><span class="line"> <span class="keyword">for</span> (String item : list) &#123;</span><br><span class="line"> <span class="comment">//使用正则表达式取出数字</span></span><br><span class="line"> <span class="keyword">if</span> (item.matches(<span class="string">&quot;\\d+&quot;</span>)) &#123; <span class="comment">//匹配的是多位数</span></span><br><span class="line"> <span class="comment">//入栈</span></span><br><span class="line"> stack.push(item);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//弹出两个数 并运算 再入栈</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">num2</span> <span class="operator">=</span> Integer.parseInt(stack.pop());</span><br><span class="line"> <span class="type">int</span> <span class="variable">num1</span> <span class="operator">=</span> Integer.parseInt(stack.pop());</span><br><span class="line"> <span class="comment">//运算</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">res</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">if</span> (item.equals(<span class="string">&quot;+&quot;</span>)) &#123;</span><br><span class="line"> res = num1 + num2;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (item.equals(<span class="string">&quot;-&quot;</span>)) &#123;</span><br><span class="line"> res = num1 - num2;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (item.equals(<span class="string">&quot;*&quot;</span>)) &#123;</span><br><span class="line"> res = num1 * num2;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (item.equals(<span class="string">&quot;/&quot;</span>)) &#123;</span><br><span class="line"> res = num1 / num2;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;运算符有误!&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//把结果入栈</span></span><br><span class="line"> stack.push(res + <span class="string">&quot;&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//最后留在stack中的数就是运算结果</span></span><br><span class="line"> <span class="keyword">return</span> Integer.parseInt(stack.pop());</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>完整的逆波兰计算器,含小数点的计算</strong></p>
<p>(老师的代码)</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.stack;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.ArrayList;</span><br><span class="line"><span class="keyword">import</span> java.util.Collections;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"><span class="keyword">import</span> java.util.Stack;</span><br><span class="line"><span class="keyword">import</span> java.util.regex.Pattern;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ReversePolishMultiCalc</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 匹配 + - * / ( ) 运算符</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">String</span> <span class="variable">SYMBOL</span> <span class="operator">=</span> <span class="string">&quot;\\+|-|\\*|/|\\(|\\)&quot;</span>;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">String</span> <span class="variable">LEFT</span> <span class="operator">=</span> <span class="string">&quot;(&quot;</span>;</span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">String</span> <span class="variable">RIGHT</span> <span class="operator">=</span> <span class="string">&quot;)&quot;</span>;</span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">String</span> <span class="variable">ADD</span> <span class="operator">=</span> <span class="string">&quot;+&quot;</span>;</span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">final</span> String MINUS= <span class="string">&quot;-&quot;</span>;</span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">String</span> <span class="variable">TIMES</span> <span class="operator">=</span> <span class="string">&quot;*&quot;</span>;</span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">String</span> <span class="variable">DIVISION</span> <span class="operator">=</span> <span class="string">&quot;/&quot;</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 加減 + -</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">int</span> <span class="variable">LEVEL_01</span> <span class="operator">=</span> <span class="number">1</span>;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 乘除 * /</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">int</span> <span class="variable">LEVEL_02</span> <span class="operator">=</span> <span class="number">2</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 括号</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">int</span> <span class="variable">LEVEL_HIGH</span> <span class="operator">=</span> Integer.MAX_VALUE;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="keyword">static</span> Stack&lt;String&gt; stack = <span class="keyword">new</span> <span class="title class_">Stack</span>&lt;&gt;();</span><br><span class="line"> <span class="keyword">static</span> List&lt;String&gt; data = Collections.synchronizedList(<span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;String&gt;());</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 去除所有空白符</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> s</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">replaceAllBlank</span><span class="params">(String s )</span>&#123;</span><br><span class="line"> <span class="comment">// \\s+ 匹配任何空白字符,包括空格、制表符、换页符等等, 等价于[ \f\n\r\t\v]</span></span><br><span class="line"> <span class="keyword">return</span> s.replaceAll(<span class="string">&quot;\\s+&quot;</span>,<span class="string">&quot;&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断是不是数字 int double long float</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> s</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">boolean</span> <span class="title function_">isNumber</span><span class="params">(String s)</span>&#123;</span><br><span class="line"> <span class="type">Pattern</span> <span class="variable">pattern</span> <span class="operator">=</span> Pattern.compile(<span class="string">&quot;^[-\\+]?[.\\d]*$&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span> pattern.matcher(s).matches();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断是不是运算符</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> s</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">boolean</span> <span class="title function_">isSymbol</span><span class="params">(String s)</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> s.matches(SYMBOL);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 匹配运算等级</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> s</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">int</span> <span class="title function_">calcLevel</span><span class="params">(String s)</span>&#123;</span><br><span class="line"> <span class="keyword">if</span>(<span class="string">&quot;+&quot;</span>.equals(s) || <span class="string">&quot;-&quot;</span>.equals(s))&#123;</span><br><span class="line"> <span class="keyword">return</span> LEVEL_01;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span>(<span class="string">&quot;*&quot;</span>.equals(s) || <span class="string">&quot;/&quot;</span>.equals(s))&#123;</span><br><span class="line"> <span class="keyword">return</span> LEVEL_02;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> LEVEL_HIGH;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 匹配</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> s</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@throws</span> Exception</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> List&lt;String&gt; <span class="title function_">doMatch</span> <span class="params">(String s)</span> <span class="keyword">throws</span> Exception&#123;</span><br><span class="line"> <span class="keyword">if</span>(s == <span class="literal">null</span> || <span class="string">&quot;&quot;</span>.equals(s.trim())) <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;data is empty&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span>(!isNumber(s.charAt(<span class="number">0</span>)+<span class="string">&quot;&quot;</span>)) <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;data illeagle,start not with a number&quot;</span>);</span><br><span class="line"></span><br><span class="line"> s = replaceAllBlank(s);</span><br><span class="line"></span><br><span class="line"> String each;</span><br><span class="line"> <span class="type">int</span> <span class="variable">start</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; s.length(); i++) &#123;</span><br><span class="line"> <span class="keyword">if</span>(isSymbol(s.charAt(i)+<span class="string">&quot;&quot;</span>))&#123;</span><br><span class="line"> each = s.charAt(i)+<span class="string">&quot;&quot;</span>;</span><br><span class="line"> <span class="comment">//栈为空,(操作符,或者 操作符优先级大于栈顶优先级 &amp;&amp; 操作符优先级不是( )的优先级 及是 ) 不能直接入栈</span></span><br><span class="line"> <span class="keyword">if</span>(stack.isEmpty() || LEFT.equals(each)</span><br><span class="line"> || ((calcLevel(each) &gt; calcLevel(stack.peek())) &amp;&amp; calcLevel(each) &lt; LEVEL_HIGH))&#123;</span><br><span class="line"> stack.push(each);</span><br><span class="line"> &#125;<span class="keyword">else</span> <span class="keyword">if</span>( !stack.isEmpty() &amp;&amp; calcLevel(each) &lt;= calcLevel(stack.peek()))&#123;</span><br><span class="line"> <span class="comment">//栈非空,操作符优先级小于等于栈顶优先级时出栈入列,直到栈为空,或者遇到了(,最后操作符入栈</span></span><br><span class="line"> <span class="keyword">while</span> (!stack.isEmpty() &amp;&amp; calcLevel(each) &lt;= calcLevel(stack.peek()) )&#123;</span><br><span class="line"> <span class="keyword">if</span>(calcLevel(stack.peek()) == LEVEL_HIGH)&#123;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> data.add(stack.pop());</span><br><span class="line"> &#125;</span><br><span class="line"> stack.push(each);</span><br><span class="line"> &#125;<span class="keyword">else</span> <span class="keyword">if</span>(RIGHT.equals(each))&#123;</span><br><span class="line"> <span class="comment">// ) 操作符,依次出栈入列直到空栈或者遇到了第一个)操作符,此时)出栈</span></span><br><span class="line"> <span class="keyword">while</span> (!stack.isEmpty() &amp;&amp; LEVEL_HIGH &gt;= calcLevel(stack.peek()))&#123;</span><br><span class="line"> <span class="keyword">if</span>(LEVEL_HIGH == calcLevel(stack.peek()))&#123;</span><br><span class="line"> stack.pop();</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> data.add(stack.pop());</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> start = i ; <span class="comment">//前一个运算符的位置</span></span><br><span class="line"> &#125;<span class="keyword">else</span> <span class="keyword">if</span>( i == s.length()-<span class="number">1</span> || isSymbol(s.charAt(i+<span class="number">1</span>)+<span class="string">&quot;&quot;</span>) )&#123;</span><br><span class="line"> each = start == <span class="number">0</span> ? s.substring(start,i+<span class="number">1</span>) : s.substring(start+<span class="number">1</span>,i+<span class="number">1</span>);</span><br><span class="line"> <span class="keyword">if</span>(isNumber(each)) &#123;</span><br><span class="line"> data.add(each);</span><br><span class="line"> <span class="keyword">continue</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;data not match number&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//如果栈里还有元素,此时元素需要依次出栈入列,可以想象栈里剩下栈顶为/,栈底为+应该依次出栈入列可以直接翻转整个stack 添加到队列</span></span><br><span class="line"> Collections.reverse(stack);</span><br><span class="line"> data.addAll(<span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;(stack));</span><br><span class="line"></span><br><span class="line"> System.out.println(data);</span><br><span class="line"> <span class="keyword">return</span> data;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 算出结果</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> list</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> Double <span class="title function_">doCalc</span><span class="params">(List&lt;String&gt; list)</span>&#123;</span><br><span class="line"> <span class="type">Double</span> <span class="variable">d</span> <span class="operator">=</span> <span class="number">0d</span>;</span><br><span class="line"> <span class="keyword">if</span>(list == <span class="literal">null</span> || list.isEmpty())&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (list.size() == <span class="number">1</span>)&#123;</span><br><span class="line"> System.out.println(list);</span><br><span class="line"> d = Double.valueOf(list.get(<span class="number">0</span>));</span><br><span class="line"> <span class="keyword">return</span> d;</span><br><span class="line"> &#125;</span><br><span class="line"> ArrayList&lt;String&gt; list1 = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; list.size(); i++) &#123;</span><br><span class="line"> list1.add(list.get(i));</span><br><span class="line"> <span class="keyword">if</span>(isSymbol(list.get(i)))&#123;</span><br><span class="line"> <span class="type">Double</span> <span class="variable">d1</span> <span class="operator">=</span> doTheMath(list.get(i - <span class="number">2</span>), list.get(i - <span class="number">1</span>), list.get(i));</span><br><span class="line"> list1.remove(i);</span><br><span class="line"> list1.remove(i-<span class="number">1</span>);</span><br><span class="line"> list1.set(i-<span class="number">2</span>,d1+<span class="string">&quot;&quot;</span>);</span><br><span class="line"> list1.addAll(list.subList(i+<span class="number">1</span>,list.size()));</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> doCalc(list1);</span><br><span class="line"> <span class="keyword">return</span> d;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 运算</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> s1</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> s2</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> symbol</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> Double <span class="title function_">doTheMath</span><span class="params">(String s1,String s2,String symbol)</span>&#123;</span><br><span class="line"> Double result ;</span><br><span class="line"> <span class="keyword">switch</span> (symbol)&#123;</span><br><span class="line"> <span class="keyword">case</span> ADD : result = Double.valueOf(s1) + Double.valueOf(s2); <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> MINUS : result = Double.valueOf(s1) - Double.valueOf(s2); <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> TIMES : result = Double.valueOf(s1) * Double.valueOf(s2); <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">case</span> DIVISION : result = Double.valueOf(s1) / Double.valueOf(s2); <span class="keyword">break</span>;</span><br><span class="line"> <span class="keyword">default</span> : result = <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> result;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//String math = &quot;9+(3-1)*3+10/2&quot;;</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">math</span> <span class="operator">=</span> <span class="string">&quot;12.8 + (2 - 3.55)*4+10/5.0&quot;</span>;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> doCalc(doMatch(math));</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="六-递归"><a href="#六-递归" class="headerlink" title="六.递归"></a>六.递归</h2><h3 id="1-简单介绍"><a href="#1-简单介绍" class="headerlink" title="1.简单介绍"></a>1.简单介绍</h3><p>递归就是方法自己调用自己,每次调用时传入不同的变量,<strong>递归有助于编程者解决复杂的问题</strong>,同时可以让代码变得简洁</p>
<p><img src="/pictures/image-20230511123527496.png" alt="image-20230511123527496"></p>
<h3 id="2-入门案例"><a href="#2-入门案例" class="headerlink" title="2.入门案例"></a>2.入门案例</h3><p><img src="/pictures/image-20230511123245408.png" alt="image-20230511123245408"></p>
<h3 id="3-递归解决的问题"><a href="#3-递归解决的问题" class="headerlink" title="3.递归解决的问题"></a>3.递归解决的问题</h3><p>1)各种数学问题如: 8皇后问题 , 汉诺塔, 阶乘问题, 迷宫问题, 球和篮子的问题(google编程大赛)</p>
<p>2)各种算法中也会使用到递归,比如快排,归并排序,二分查找,分治算法等.</p>
<p>3)将用栈解决的问题–&gt;第归代码比较简洁</p>
<h3 id="4-递归遵循的规则"><a href="#4-递归遵循的规则" class="headerlink" title="4.递归遵循的规则"></a>4.递归遵循的规则</h3><p>1)执行一个方法时,就创建一个新的受保护的独立空间(栈空间)</p>
<p>2)方法的局部变量是独立的,不会相互影响, 比如n变量</p>
<p>3)如果方法中使用的是引用类型变量(比如数组),就会共享该引用类型的数据.</p>
<p>4)递归必须向退出递归的条件逼近,否则就是无限递归,出现StackOverflowError死龟了:)</p>
<p>5)当一个方法执行完毕或者遇到return就会返回遵守谁调用就将结果返回给谁同时当方法执行完毕或者返回时该方法也就执行完毕。</p>
<h3 id="5-递归的实际应用"><a href="#5-递归的实际应用" class="headerlink" title="5.递归的实际应用"></a>5.递归的实际应用</h3><h4 id="5-1递归解决迷宫问题"><a href="#5-1递归解决迷宫问题" class="headerlink" title="5.1递归解决迷宫问题"></a>5.1递归解决迷宫问题</h4><p><img src="/pictures/image-20230512092144712.png" alt="image-20230512092144712"></p>
<p><strong>代码实现</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.recursion;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/12</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 递归解决迷宫问题</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MiGong</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//创建一个二维数组模拟迷宫</span></span><br><span class="line"> <span class="comment">//地图</span></span><br><span class="line"> <span class="type">int</span>[][] map = <span class="keyword">new</span> <span class="title class_">int</span>[<span class="number">8</span>][<span class="number">7</span>];</span><br><span class="line"> <span class="comment">//使用1表示墙的位置</span></span><br><span class="line"> <span class="comment">//把四周变成墙</span></span><br><span class="line"> <span class="comment">//将上下变成墙</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; <span class="number">7</span>; i++) &#123;</span><br><span class="line"> map[<span class="number">0</span>][i] = <span class="number">1</span>;</span><br><span class="line"> map[<span class="number">7</span>][i] = <span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//将左右变成墙</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; <span class="number">8</span>; i++) &#123;</span><br><span class="line"> map[i][<span class="number">0</span>] = <span class="number">1</span>;</span><br><span class="line"> map[i][<span class="number">6</span>] = <span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//设置自定义的墙的位置</span></span><br><span class="line"> map[<span class="number">3</span>][<span class="number">1</span>] = <span class="number">1</span>;</span><br><span class="line"> map[<span class="number">3</span>][<span class="number">2</span>] = <span class="number">1</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//输出地图</span></span><br><span class="line"> showMap(map);</span><br><span class="line"> <span class="comment">//使用递归回溯给小球找路</span></span><br><span class="line"> getWay(map, <span class="number">1</span>, <span class="number">1</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;标识过的路&quot;</span>);</span><br><span class="line"> showMap(map);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 遍历输出地图的信息</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> map 地图组成的二维数组</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">showMap</span><span class="params">(<span class="type">int</span>[][] map)</span> &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; map.length; i++) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">j</span> <span class="operator">=</span> <span class="number">0</span>; j &lt; map[i].length; j++) &#123;</span><br><span class="line"> System.out.print(map[i][j] + <span class="string">&quot; &quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 1.表示墙 2.表示通路 可以走 3.表示该位置已经走过 但是走不通</span></span><br><span class="line"><span class="comment"> * 在就走迷宫的时候我们要确定一个策略 比如下-&gt;右-&gt;上-&gt;左 如果该点走不通 再回溯</span></span><br><span class="line"><span class="comment"> * 使用递归的方法给小球找路</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> map 传进来的地图信息</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> i 从哪个位置开始找</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> j 从哪个位置开始找</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 是否找到路</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">boolean</span> <span class="title function_">getWay</span><span class="params">(<span class="type">int</span>[][] map, <span class="type">int</span> i, <span class="type">int</span> j)</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (map[<span class="number">6</span>][<span class="number">5</span>] == <span class="number">2</span>) &#123; <span class="comment">//说明通路已经找到了 就直接退出</span></span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (map[i][j] == <span class="number">0</span>) &#123;<span class="comment">//如果当前这个点还没有走过</span></span><br><span class="line"> <span class="comment">//按照策略走 下-&gt;右-&gt;上-&gt;左</span></span><br><span class="line"> map[i][j] = <span class="number">2</span>;<span class="comment">//先假定这个点可以走通</span></span><br><span class="line"> <span class="keyword">if</span> (getWay(map, i + <span class="number">1</span>, j)) &#123; <span class="comment">//向下走</span></span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (getWay(map, i, j + <span class="number">1</span>)) &#123;<span class="comment">//向右走</span></span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (getWay(map, i - <span class="number">1</span>, j)) &#123;<span class="comment">//向上走</span></span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (getWay(map, i, j - <span class="number">1</span>)) &#123;<span class="comment">//向左走</span></span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;<span class="comment">//四个方向都走不通的话说明不是一个通路 设置成false</span></span><br><span class="line"> map[i][j] = <span class="number">3</span>;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;<span class="comment">//不为0 可以是1,2,3</span></span><br><span class="line"> <span class="comment">//可以理解为只走没有走过的</span></span><br><span class="line"> <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="5-2-递归解决八皇后问题"><a href="#5-2-递归解决八皇后问题" class="headerlink" title="5.2 递归解决八皇后问题"></a>5.2 递归解决八皇后问题</h4><p>使用回溯算法解决 类似于穷举法 后期使用别的算法优化</p>
<p><strong>问题介绍</strong></p>
<p><img src="/pictures/image-20230512112050729.png" alt="image-20230512112050729"></p>
<p><strong>思路分析</strong></p>
<p><img src="/pictures/image-20230512112456731.png" alt="image-20230512112456731"></p>
<p><strong>代码实现</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.recursion;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/13</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 八皇后问题的解题思路及代码实现</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Queue8</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">Queue8</span> <span class="variable">queue8</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Queue8</span>();</span><br><span class="line"> queue8.check(<span class="number">0</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//定义一个max表示共有多少个皇后</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">max</span> <span class="operator">=</span> <span class="number">8</span>;</span><br><span class="line"> <span class="comment">//定义一个一维数组 记录皇后在列上的位置 arr[8] = &#123;0 , 4, 7, 5, 2, 6, 1, 3&#125;</span></span><br><span class="line"> <span class="type">int</span>[] array = <span class="keyword">new</span> <span class="title class_">int</span>[max];</span><br><span class="line"> <span class="comment">//记录摆法的次数</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">count</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 编写一个方法 放置n个皇后</span></span><br><span class="line"><span class="comment"> * 会自己回溯</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">check</span><span class="params">(<span class="type">int</span> n)</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (n == max) &#123; <span class="comment">//说明已经放到了第九个皇后了</span></span><br><span class="line"> print(); <span class="comment">//打印</span></span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//依次放入皇后 判断是否冲突</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; max; i++) &#123;</span><br><span class="line"> <span class="comment">//先把当前的这个皇后n放到该行的第i列</span></span><br><span class="line"> array[n] = i;</span><br><span class="line"> <span class="comment">//判断当前放置第n个皇后到i列时与前面放置的皇后是否冲突</span></span><br><span class="line"> <span class="keyword">if</span> (judge(n)) &#123; <span class="comment">//不冲突</span></span><br><span class="line"> <span class="comment">//接着放n+1个皇后</span></span><br><span class="line"> check(n + <span class="number">1</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//如果冲突 就继续执行 array[n] = i 就皇后在本行后移一个位置</span></span><br><span class="line"> <span class="comment">//因为在循环里面 i++会自增 n会后移</span></span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 当我们放置了n个皇后之后 就去检测</span></span><br><span class="line"><span class="comment"> * 该皇后是否和前面已经摆放的皇后冲突</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> n 表示第n个皇后</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">judge</span><span class="params">(<span class="type">int</span> n)</span> &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; n; i++) &#123;</span><br><span class="line"> <span class="comment">// array[8] = &#123;0 , 4, 7, 5, 2, 6, 1, 3&#125; 再次注意这里数组记录的是每个皇后在列上的值</span></span><br><span class="line"> <span class="comment">//array[i] == array[i] 判断是不是在同一列</span></span><br><span class="line"> <span class="comment">//Math.abs(n - i) == Math.abs(array[n] - array[i]) 判断是不是在同一斜线上</span></span><br><span class="line"> <span class="comment">//自己的理解:(n -i) 相当于在行上的距离 array[n] - array[i]相当于在列上的距离 行距离等于列距离 说明二者在同一斜线上</span></span><br><span class="line"> <span class="keyword">if</span> (array[i] == array[n] || Math.abs(n - i) == Math.abs(array[n] - array[i])) &#123;<span class="comment">//与前面放置的位置是否冲突</span></span><br><span class="line"> <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 定义一个数组 打印皇后拜访的位置</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">print</span><span class="params">()</span> &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;第&quot;</span> + (++count) + <span class="string">&quot;中摆法&quot;</span>);</span><br><span class="line"> <span class="type">int</span>[][] arr = <span class="keyword">new</span> <span class="title class_">int</span>[max][max];</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; array.length; i++) &#123;</span><br><span class="line"> arr[i][array[i]] = <span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span>[] ints : arr) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> i : ints) &#123;</span><br><span class="line"> System.out.print(i + <span class="string">&quot; &quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="七-排序算法"><a href="#七-排序算法" class="headerlink" title="七.排序算法"></a>七.排序算法</h2><p><strong>十大经典的排序算法:</strong><a href="https://www.runoob.com/w3cnote/ten-sorting-algorithm.html">菜鸟教程排序算法</a></p>
<h3 id="1-介绍-1"><a href="#1-介绍-1" class="headerlink" title="1.介绍"></a>1.介绍</h3><p><img src="/pictures/image-20230513115319799.png" alt="image-20230513115319799"></p>
<h3 id="2-时间复杂度"><a href="#2-时间复杂度" class="headerlink" title="2.时间复杂度"></a>2.时间复杂度</h3><p><strong>度量时间复杂度的两种方法</strong></p>
<p>事后统计法的不足:</p>
<ul>
<li>需要实际的运行程序 比较耗时</li>
<li>受计算机硬件和软件的影响</li>
</ul>
<p><img src="/pictures/image-20230513115606521.png" alt="image-20230513115606521"></p>
<p><strong>时间频度</strong></p>
<p> 基本的介绍:一个算法花费的时间与算法中语句的执行次数成正比例,哪个算法中语句执行次数多,它花费时间就多。<strong>一个算法中的语句执行次数称为语句频度或时间频度</strong>。记为T(n)</p>
<p><strong>时间复杂度介绍</strong></p>
<p><img src="/pictures/image-20230515093520587.png" alt="image-20230515093520587"></p>
<p><strong>常见的时间复杂度</strong></p>
<p><img src="/pictures/image-20230515093753893.png" alt="image-20230515093753893"></p>
<h3 id="3-空间复杂度"><a href="#3-空间复杂度" class="headerlink" title="3.空间复杂度"></a>3.空间复杂度</h3><p><img src="/pictures/image-20230515095247319.png" alt="image-20230515095247319"></p>
<p><strong>排序算法的时间和空间复杂度</strong></p>
<p><img src="/pictures/image-20230516083738747.png" alt="image-20230516083738747"></p>
<h3 id="4-冒泡排序"><a href="#4-冒泡排序" class="headerlink" title="4.冒泡排序"></a>4.冒泡排序</h3><p>冒泡排序的时间复杂度:o(n^2)</p>
<p>同一台电脑 8万个数据 十几秒左右</p>
<h4 id="4-1-基本介绍"><a href="#4-1-基本介绍" class="headerlink" title="4.1 基本介绍"></a>4.1 基本介绍</h4><p><img src="/pictures/image-20230515100345339.png" alt="image-20230515100345339"></p>
<h4 id="4-2-图解"><a href="#4-2-图解" class="headerlink" title="4.2 图解"></a>4.2 图解</h4><p><img src="/pictures/image-20230515100754827.png" alt="image-20230515100754827"></p>
<h4 id="4-3-代码实现"><a href="#4-3-代码实现" class="headerlink" title="4.3 代码实现"></a>4.3 代码实现</h4><p>优化之前的代码 </p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.sort;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Arrays;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/15</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 冒泡排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">BubbleSort</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">int</span> arr[] = &#123;<span class="number">3</span>, <span class="number">9</span>, -<span class="number">1</span>, <span class="number">10</span>, -<span class="number">2</span>&#125;;</span><br><span class="line"> BubbleSort.sort(arr);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">sort</span><span class="params">(<span class="type">int</span>[] arr)</span> &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; arr.length - <span class="number">1</span>; i++) &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">temp</span> <span class="operator">=</span> <span class="number">0</span>; <span class="comment">//临时变量</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">j</span> <span class="operator">=</span> <span class="number">0</span>; j &lt; arr.length - <span class="number">1</span> - i; j++) &#123;</span><br><span class="line"> <span class="comment">//如果前面的数字大于后面的数字就交换</span></span><br><span class="line"> <span class="keyword">if</span> (arr[j] &gt; arr[j + <span class="number">1</span>]) &#123;</span><br><span class="line"> temp = arr[j];</span><br><span class="line"> arr[j] = arr[j + <span class="number">1</span>];</span><br><span class="line"> arr[j + <span class="number">1</span>] = temp;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;第&quot;</span> + (i + <span class="number">1</span>) + <span class="string">&quot;次排序:&quot;</span> + Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;排序之后的数组:&quot;</span> + Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>优化之后的代码(如果排序的过程中代码有序就不在排序)</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.sort;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Arrays;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/15</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 冒泡排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">BubbleSort</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">int</span> arr[] = &#123;<span class="number">3</span>, <span class="number">9</span>, -<span class="number">1</span>, <span class="number">10</span>, -<span class="number">2</span>&#125;;</span><br><span class="line"> BubbleSort.sort(arr);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 冒泡排序</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> arr 需要排序的数组</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">sort</span><span class="params">(<span class="type">int</span>[] arr)</span> &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; arr.length - <span class="number">1</span>; i++) &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">temp</span> <span class="operator">=</span> <span class="number">0</span>; <span class="comment">//临时变量</span></span><br><span class="line"> <span class="type">boolean</span> <span class="variable">flag</span> <span class="operator">=</span> <span class="literal">false</span>; <span class="comment">//表示是否进行过排序</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">j</span> <span class="operator">=</span> <span class="number">0</span>; j &lt; arr.length - <span class="number">1</span> - i; j++) &#123;</span><br><span class="line"> <span class="comment">//如果前面的数字大于后面的数字就交换</span></span><br><span class="line"> <span class="keyword">if</span> (arr[j] &gt; arr[j + <span class="number">1</span>]) &#123;</span><br><span class="line"> flag = <span class="literal">true</span>;</span><br><span class="line"> temp = arr[j];</span><br><span class="line"> arr[j] = arr[j + <span class="number">1</span>];</span><br><span class="line"> arr[j + <span class="number">1</span>] = temp;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;第&quot;</span> + (i + <span class="number">1</span>) + <span class="string">&quot;次排序:&quot;</span> + Arrays.toString(arr));</span><br><span class="line"> <span class="keyword">if</span>(!flag)&#123; <span class="comment">//说明一次都没有交换 说明已经有序</span></span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;排序之后的数组:&quot;</span> + Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230516091218716.png" alt="image-20230516091218716"></p>
<h3 id="5-选择排序"><a href="#5-选择排序" class="headerlink" title="5.选择排序"></a>5.选择排序</h3><h4 id="5-1-基本介绍"><a href="#5-1-基本介绍" class="headerlink" title="5.1 基本介绍"></a>5.1 基本介绍</h4><p>同一台电脑 8万个数据 两秒左右</p>
<p>选择式排序也属于内部排序法,是从欲排序的数据中,按指定的规则选出某一元素,再依规定交换位置后达到排序的目的</p>
<p><img src="/pictures/image-20230515105359552.png" alt="image-20230515105359552"></p>
<h4 id="5-2图解"><a href="#5-2图解" class="headerlink" title="5.2图解"></a>5.2图解</h4><p><img src="/pictures/selectionSort.gif" alt="img"></p>
<p><img src="/pictures/image-20230516083148055.png" alt="image-20230516083148055"></p>
<h4 id="5-3代码实现"><a href="#5-3代码实现" class="headerlink" title="5.3代码实现"></a>5.3代码实现</h4><p>两种方法 一个是自己的 一个是老师的</p>
<p>使用老师的代码 老师的代码验证过</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.sort;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Arrays;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/16</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 选择排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">SelectSort</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">int</span>[] arr = &#123;<span class="number">101</span>,<span class="number">34</span>,<span class="number">119</span>,<span class="number">1</span>&#125;;</span><br><span class="line"> <span class="type">int</span>[] arr1 = &#123;<span class="number">3</span>, <span class="number">9</span>, -<span class="number">1</span>, <span class="number">10</span>, -<span class="number">2</span>&#125;;</span><br><span class="line"> <span class="type">int</span>[] arr2 = &#123;<span class="number">3</span>, <span class="number">9</span>, -<span class="number">1</span>, <span class="number">10</span>, -<span class="number">2</span>&#125;;</span><br><span class="line"> System.out.println(<span class="string">&quot;自己的代码&quot;</span>);</span><br><span class="line"> SelectSort.selectSort(arr2);</span><br><span class="line"> System.out.println(<span class="string">&quot;老师的代码&quot;</span>);</span><br><span class="line"> SelectSort.selectSortByTeacher(arr1);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 选择排序</span></span><br><span class="line"><span class="comment"> * 自己写的 中间的过程和老师的不一样 不确定是不是选择排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">selectSort</span><span class="params">(<span class="type">int</span>[] arr)</span> &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; arr.length - <span class="number">1</span>; i++) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">j</span> <span class="operator">=</span> i + <span class="number">1</span>; j &lt; arr.length; j++) &#123;<span class="comment">//从第一个数字开始 依次找到最小值</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">temp</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">if</span>(arr[i] &gt; arr[j]) &#123;</span><br><span class="line"> temp = arr[i];</span><br><span class="line"> arr[i] = arr[j];</span><br><span class="line"> arr[j] = temp;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;第次&quot;</span>+(i+<span class="number">1</span>)+<span class="string">&quot;排序的结果:&quot;</span>+Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;最终的结果:&quot;</span>+Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 老师的代码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">selectSortByTeacher</span><span class="params">(<span class="type">int</span>[] arr)</span>&#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; arr.length - <span class="number">1</span>; i++) &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">minIndex</span> <span class="operator">=</span> i;</span><br><span class="line"> <span class="type">int</span> <span class="variable">min</span> <span class="operator">=</span> arr[i];</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">j</span> <span class="operator">=</span> i + <span class="number">1</span>; j &lt; arr.length; j++) &#123;<span class="comment">//从第一个数字开始 依次找到最小值</span></span><br><span class="line"> <span class="keyword">if</span>(min &gt; arr[j])&#123;</span><br><span class="line"> min = arr[j];</span><br><span class="line"> minIndex = j;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//交换</span></span><br><span class="line"> arr[minIndex] = arr[i];</span><br><span class="line"> arr[i] = min;</span><br><span class="line"> System.out.println(<span class="string">&quot;第次&quot;</span>+(i+<span class="number">1</span>)+<span class="string">&quot;排序的结果:&quot;</span>+Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;最终的结果:&quot;</span>+Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230516093143656.png" alt="image-20230516093143656"></p>
<h3 id="6-插入排序"><a href="#6-插入排序" class="headerlink" title="6.插入排序"></a>6.插入排序</h3><h4 id="6-1-基本介绍"><a href="#6-1-基本介绍" class="headerlink" title="6.1 基本介绍"></a>6.1 基本介绍</h4><p>同一台电脑 8万个数据 五秒左右</p>
<p>插入式排序属于内部排序法,是对于欲排序的元素以插入的方式找寻该元素的适当位置,以达到排序的目的。</p>
<p><img src="/pictures/image-20230516100256880.png" alt="image-20230516100256880"></p>
<h4 id="6-2-图解"><a href="#6-2-图解" class="headerlink" title="6.2 图解"></a>6.2 图解</h4><img src="/pictures/insertionSort.gif" alt="img" style="zoom:150%;" />
<h4 id="6-3-代码实现"><a href="#6-3-代码实现" class="headerlink" title="6.3 代码实现"></a>6.3 代码实现</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.sort;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Arrays;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/16</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 插入排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">InsertSort</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">int</span>[] arr = &#123;<span class="number">101</span>, <span class="number">34</span>, <span class="number">119</span>, <span class="number">1</span>,-<span class="number">1</span>,<span class="number">89</span>&#125;;</span><br><span class="line"> System.out.println(<span class="string">&quot;插入前的数组:&quot;</span>+Arrays.toString(arr));</span><br><span class="line"> InsertSort.insertSort(arr);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 插入排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">insertSort</span><span class="params">(<span class="type">int</span>[] arr)</span> &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">1</span>; i &lt; arr.length; i++) &#123;</span><br><span class="line"> <span class="comment">//定义待插入的数</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">insertVal</span> <span class="operator">=</span> arr[i];</span><br><span class="line"> <span class="comment">//待插入的数的前一个数的下标</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">insertIndex</span> <span class="operator">=</span> i - <span class="number">1</span>;</span><br><span class="line"> <span class="keyword">while</span> (insertIndex &gt;= <span class="number">0</span> &amp;&amp; insertVal &lt; arr[insertIndex]) &#123;</span><br><span class="line"> arr[insertIndex + <span class="number">1</span>] = arr[insertIndex];</span><br><span class="line"> insertIndex--;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//退出循环之后 代表找到了要插入数据的位置</span></span><br><span class="line"> <span class="comment">//插入数据</span></span><br><span class="line"> arr[insertIndex + <span class="number">1</span>] = insertVal;</span><br><span class="line"> System.out.println(<span class="string">&quot;第&quot;</span> + i + <span class="string">&quot;次插入的结果:&quot;</span> + Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;最终的结果:&quot;</span> + Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230516105517026.png" alt="image-20230516105517026"></p>
<h3 id="7-希尔排序"><a href="#7-希尔排序" class="headerlink" title="7.希尔排序"></a>7.希尔排序</h3><h4 id="7-1基本介绍"><a href="#7-1基本介绍" class="headerlink" title="7.1基本介绍"></a>7.1基本介绍</h4><p>同一台电脑 8万个数据 十七秒左右(交换法)</p>
<p>同一台电脑 8万个数据 一秒左右(移动法)</p>
<p><img src="/pictures/image-20230517091741355.png" alt="image-20230517091741355"></p>
<p><img src="/pictures/image-20230517091841366.png" alt="image-20230517091841366"></p>
<h4 id="7-2-图解"><a href="#7-2-图解" class="headerlink" title="7.2.图解"></a>7.2.图解</h4><p><img src="/pictures/Sorting_shellsort_anim.gif" alt="img"></p>
<img src="/pictures/image-20230517102649272.png" alt="image-20230517102649272" style="zoom:150%;" />
<h4 id="7-3-代码实现"><a href="#7-3-代码实现" class="headerlink" title="7.3 代码实现"></a>7.3 代码实现</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.sort;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Arrays;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/17</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 希尔排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ShellSort</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">int</span>[] arr = &#123;<span class="number">8</span>, <span class="number">9</span>, <span class="number">1</span>, <span class="number">7</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">4</span>, <span class="number">6</span>, <span class="number">0</span>&#125;;</span><br><span class="line"> <span class="comment">//shellSort(arr);</span></span><br><span class="line"> shellSort2(arr);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 希尔排序 使用的是交换法 这个很慢 比直接的插入排序还慢</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">shellSort</span><span class="params">(<span class="type">int</span>[] arr)</span> &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">temp</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="type">int</span> <span class="variable">count</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="comment">//用于分组 10个数据 第一次分5组 第二次分2组 第三次分1组 每组分别插入排序</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">gap</span> <span class="operator">=</span> arr.length / <span class="number">2</span>; gap &gt; <span class="number">0</span>; gap /= <span class="number">2</span>) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> gap; i &lt; arr.length; i++) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">j</span> <span class="operator">=</span> i - gap; j &gt;= <span class="number">0</span>; j -= gap) &#123;</span><br><span class="line"> <span class="comment">//如果当前的那个元素大于加上步长后的那个元素,就交换</span></span><br><span class="line"> <span class="keyword">if</span> (arr[j] &gt; arr[j + gap]) &#123;</span><br><span class="line"> temp = arr[j];</span><br><span class="line"> arr[j] = arr[j + gap];</span><br><span class="line"> arr[j + gap] = temp;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;排序第&quot;</span> + (++count) + <span class="string">&quot;轮的结果:&quot;</span> + Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;最终的结果:&quot;</span> + Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 使用移动法的希尔排序 这个更快 </span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">shellSort2</span><span class="params">(<span class="type">int</span>[] arr)</span> &#123;</span><br><span class="line"> <span class="comment">//用于分组 10个数据 第一次分5组 第二次分2组 第三次分1组 每组分别插入排序</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">count</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">gap</span> <span class="operator">=</span> arr.length / <span class="number">2</span>; gap &gt; <span class="number">0</span>; gap /= <span class="number">2</span>) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> gap; i &lt; arr.length; i++) &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">j</span> <span class="operator">=</span> i;</span><br><span class="line"> <span class="type">int</span> <span class="variable">temp</span> <span class="operator">=</span> arr[j];</span><br><span class="line"> <span class="keyword">if</span> (arr[j] &lt; arr[j - gap]) &#123;</span><br><span class="line"> <span class="keyword">while</span> (j - gap &gt;= <span class="number">0</span> &amp;&amp; temp &lt; arr[j - gap]) &#123;</span><br><span class="line"> arr[j] = arr[j - gap];</span><br><span class="line"> j -= gap;</span><br><span class="line"> &#125;</span><br><span class="line"> arr[j] = temp; &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;排序第&quot;</span> + (++count) + <span class="string">&quot;轮的结果:&quot;</span> + Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;最终的结果:&quot;</span> + Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="8-快速排序"><a href="#8-快速排序" class="headerlink" title="8.快速排序"></a>8.快速排序</h3><h4 id="8-1-基本介绍"><a href="#8-1-基本介绍" class="headerlink" title="8.1 基本介绍"></a>8.1 基本介绍</h4><p>同一台电脑 8万个数据 不到一秒 800万个数据两秒钟</p>
<p> <strong>快速排序Quicksort是对冒泡排序的一种改进。基本思想是通过一趟排序将要排序的数据分割成独立的两部分其中一部分的所有数据都比另外一部分的所有数据都要小然后再按此方法对这两部分数据分别进行快速排序整个排序过程可以递归进行以此达到整个数据变成有序序列</strong></p>
<h4 id="8-2-图解"><a href="#8-2-图解" class="headerlink" title="8.2 图解"></a>8.2 图解</h4><img src="/pictures/quickSort.gif" alt="img" style="zoom:150%;" />
<img src="/pictures/image-20230517103139900.png" alt="image-20230517103139900" style="zoom:150%;" />
<h4 id="8-3-代码实现"><a href="#8-3-代码实现" class="headerlink" title="8.3 代码实现"></a>8.3 代码实现</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.sort;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Arrays;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/17</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 快速排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">QuickSort</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">int</span>[] arr = &#123;-<span class="number">9</span>, <span class="number">78</span>, <span class="number">0</span>, <span class="number">23</span>, -<span class="number">567</span>, <span class="number">70</span>&#125;;</span><br><span class="line"> quickSort(arr, <span class="number">0</span>, arr.length - <span class="number">1</span>);</span><br><span class="line"> System.out.println(Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> arr 需要排序的数组</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> left 左下标</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> right 右下标</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">quickSort</span><span class="params">(<span class="type">int</span>[] arr, <span class="type">int</span> left, <span class="type">int</span> right)</span> &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">l</span> <span class="operator">=</span> left;</span><br><span class="line"> <span class="type">int</span> <span class="variable">r</span> <span class="operator">=</span> right;</span><br><span class="line"> <span class="comment">//pivot 中轴</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">pivot</span> <span class="operator">=</span> arr[(left + right) / <span class="number">2</span>];</span><br><span class="line"> <span class="type">int</span> <span class="variable">temp</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="comment">//while循环的目的是让比pivot小的放到左边 大的放在右边</span></span><br><span class="line"> <span class="keyword">while</span> (l &lt; r) &#123;</span><br><span class="line"> <span class="comment">//在pivot的左边一直找 找到大于等于pivot的值 才退出</span></span><br><span class="line"> <span class="keyword">while</span> (arr[l] &lt; pivot) &#123;</span><br><span class="line"> l += <span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//在pivot的左边一直找 找到大于等于pivot的值 才退出</span></span><br><span class="line"> <span class="keyword">while</span> (arr[r] &gt; pivot) &#123;</span><br><span class="line"> r -= <span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//如果l &gt;= r成立 说明pivot的左右两边的值 已经是按照左边全部是</span></span><br><span class="line"> <span class="comment">//小于等于pivot值 右边全部是大于等于pivot值</span></span><br><span class="line"> <span class="keyword">if</span> (l &gt;= r) &#123;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//交换</span></span><br><span class="line"> temp = arr[l];</span><br><span class="line"> arr[l] = arr[r];</span><br><span class="line"> arr[r] = temp;</span><br><span class="line"> <span class="comment">//如果交换完之后发现arr[l] = pivot值</span></span><br><span class="line"> <span class="keyword">if</span> (arr[l] == pivot) &#123;</span><br><span class="line"> r--;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//如果交换完之后发现arr[r] = pivot值</span></span><br><span class="line"> <span class="keyword">if</span> (arr[r] == pivot) &#123;</span><br><span class="line"> l++;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//如果l == r 必须l++ r--</span></span><br><span class="line"> <span class="keyword">if</span> (l == r) &#123;</span><br><span class="line"> l += <span class="number">1</span>;</span><br><span class="line"> r -= <span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//向左递归</span></span><br><span class="line"> <span class="keyword">if</span> (left &lt; r) &#123;<span class="comment">//左边的数全部有序</span></span><br><span class="line"> quickSort(arr, left, r);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//向右递归</span></span><br><span class="line"> <span class="keyword">if</span> (right &gt; l) &#123;</span><br><span class="line"> quickSort(arr, l, right);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="9-归并排序"><a href="#9-归并排序" class="headerlink" title="9. 归并排序"></a>9. 归并排序</h3><h4 id="9-1基本介绍"><a href="#9-1基本介绍" class="headerlink" title="9.1基本介绍"></a>9.1基本介绍</h4><p>同一台电脑 8万个数据 大约一秒钟 800万个数据三秒</p>
<p><img src="/pictures/image-20230518111233009.png" alt="image-20230518111233009"></p>
<h4 id="9-2-图解"><a href="#9-2-图解" class="headerlink" title="9.2 图解"></a>9.2 图解</h4><img src="/pictures/mergeSort.gif" alt="img" style="zoom:150%;" />
<p><img src="/pictures/image-20230518111454775.png" alt="image-20230518111454775"></p>
<p><img src="/pictures/image-20230518111536026.png" alt="image-20230518111536026"></p>
<h4 id="9-3代码实现"><a href="#9-3代码实现" class="headerlink" title="9.3代码实现"></a>9.3代码实现</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.sort;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Arrays;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/18</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 归并排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MergeSort</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">int</span>[] arr = &#123;<span class="number">8</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">7</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">6</span>, <span class="number">2</span>&#125;;</span><br><span class="line"> <span class="type">int</span>[] temp = <span class="keyword">new</span> <span class="title class_">int</span>[arr.length];</span><br><span class="line"> mergeSort(arr,<span class="number">0</span>, arr.length -<span class="number">1</span>,temp);</span><br><span class="line"> System.out.println(<span class="string">&quot;归并排序之后的数组:&quot;</span>+ Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 分治的过程</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">mergeSort</span><span class="params">(<span class="type">int</span>[] arr, <span class="type">int</span> left, <span class="type">int</span> right, <span class="type">int</span>[] temp)</span>&#123;</span><br><span class="line"> <span class="keyword">if</span>(left &lt; right)&#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">mid</span> <span class="operator">=</span> (left + right) / <span class="number">2</span>;</span><br><span class="line"> <span class="comment">//向左递归分解</span></span><br><span class="line"> mergeSort(arr,left,mid,temp);</span><br><span class="line"> <span class="comment">//向右递归分解</span></span><br><span class="line"> mergeSort(arr,mid+<span class="number">1</span>,right,temp);</span><br><span class="line"> <span class="comment">//合并</span></span><br><span class="line"> merge(arr,left,mid,right,temp);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 合并的方法 治</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> arr 需要排序的数组</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> left 右边有序序列的初始索引</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> mid 中间索引</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> right 右边索引</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> temp 中转的数组</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">merge</span><span class="params">(<span class="type">int</span>[] arr, <span class="type">int</span> left, <span class="type">int</span> mid, <span class="type">int</span> right, <span class="type">int</span>[] temp)</span> &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> left;<span class="comment">//左边有序序列的初始索引</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">j</span> <span class="operator">=</span> mid + <span class="number">1</span>;<span class="comment">//右边有序序列的初始化索引</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">t</span> <span class="operator">=</span> <span class="number">0</span>;<span class="comment">//指向temp数组的当前索引</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//1.</span></span><br><span class="line"> <span class="comment">//先把左右两边有序的数据填充到temp数组</span></span><br><span class="line"> <span class="comment">//直到左右两边的数据有一边处理完毕为止</span></span><br><span class="line"> <span class="keyword">while</span> (i &lt;= mid &amp;&amp; j &lt;= right) &#123;<span class="comment">//相当于左右两边的数组都有一个指针</span></span><br><span class="line"> <span class="keyword">if</span> (arr[i] &lt;= arr[j]) &#123;</span><br><span class="line"> temp[t] = arr[i];</span><br><span class="line"> t++;</span><br><span class="line"> i++;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;<span class="comment">//反之将右边有序序列的当前元素 填充到temp数组</span></span><br><span class="line"> temp[t] = arr[j];</span><br><span class="line"> t++;</span><br><span class="line"> j++;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//2.</span></span><br><span class="line"> <span class="comment">//把有剩余数据的一边的数据依次全部填充到temp</span></span><br><span class="line"> <span class="keyword">while</span> (i &lt;= mid) &#123;<span class="comment">//说明左边的有序序列还有剩余的元素</span></span><br><span class="line"> temp[t] = arr[i];</span><br><span class="line"> t++;</span><br><span class="line"> i++;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">while</span> (j &lt;= right) &#123;</span><br><span class="line"> temp[t] = arr[j];</span><br><span class="line"> t++;</span><br><span class="line"> j++;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//3.</span></span><br><span class="line"> <span class="comment">//将temp数组的元素拷贝到arr</span></span><br><span class="line"> <span class="comment">//并不是每次都拷贝</span></span><br><span class="line"> t = <span class="number">0</span>;</span><br><span class="line"> <span class="type">int</span> <span class="variable">tempLeft</span> <span class="operator">=</span> left;</span><br><span class="line"> <span class="keyword">while</span> (tempLeft &lt;= right) &#123;</span><br><span class="line"> arr[tempLeft] = temp[t];</span><br><span class="line"> t++;</span><br><span class="line"> tempLeft++;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="10-基数排序"><a href="#10-基数排序" class="headerlink" title="10.基数排序"></a>10.基数排序</h3><p>同一台电脑8万个数据 一秒左右 8千万个数据会报内存不足</p>
<h4 id="10-1-基本介绍"><a href="#10-1-基本介绍" class="headerlink" title="10.1 基本介绍"></a>10.1 基本介绍</h4><p><img src="/pictures/image-20230525195008102.png" alt="image-20230525195008102"></p>
<p><img src="/pictures/image-20230526094945578.png" alt="image-20230526094945578"></p>
<p><img src="/pictures/image-20230526113739081.png" alt="image-20230526113739081"></p>
<h4 id="10-2-图解"><a href="#10-2-图解" class="headerlink" title="10.2 图解"></a>10.2 图解</h4><p><img src="/pictures/radixSort.gif" alt="img"></p>
<h4 id="10-3-代码实现"><a href="#10-3-代码实现" class="headerlink" title="10.3 代码实现"></a>10.3 代码实现</h4><p><strong>推导代码</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.sort;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Arrays;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/26</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 基数排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">RadixSort</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//定义一个待排序的数组</span></span><br><span class="line"> <span class="type">int</span> arr[] = &#123;<span class="number">53</span>, <span class="number">3</span>, <span class="number">542</span>, <span class="number">748</span>, <span class="number">14</span>, <span class="number">214</span>&#125;;</span><br><span class="line"> RadixSort.radixSort(arr);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//基数排序</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">radixSort</span><span class="params">(<span class="type">int</span>[] arr)</span> &#123;</span><br><span class="line"> <span class="comment">//1.第一轮(针对每个元素的个位进行排序处理)</span></span><br><span class="line"> <span class="comment">//定义一个二维数组,表示十个桶,每个桶就是一个一维数组</span></span><br><span class="line"> <span class="comment">//为了防止数据的溢出,这里每个桶的大小我们设置的大一些 大小定为arr.length</span></span><br><span class="line"> <span class="type">int</span>[][] bucket = <span class="keyword">new</span> <span class="title class_">int</span>[<span class="number">10</span>][arr.length];</span><br><span class="line"> <span class="comment">//为了记录每个桶中实际存放了多少个数据,我们定义一个一维数组来记录每个桶中依次放入数据的个数</span></span><br><span class="line"> <span class="comment">//bucketElementCounts[0]记录的就是第0个桶的数据的个数</span></span><br><span class="line"> <span class="type">int</span>[] bucketElementCounts = <span class="keyword">new</span> <span class="title class_">int</span>[<span class="number">10</span>];</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">j</span> <span class="operator">=</span> <span class="number">0</span>; j &lt; arr.length; j++) &#123;</span><br><span class="line"> <span class="comment">//取出每个元素的个位数的值</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">digitOfElement</span> <span class="operator">=</span> arr[j] % <span class="number">10</span>;</span><br><span class="line"> <span class="comment">//放入对应的桶中</span></span><br><span class="line"> bucket[digitOfElement][bucketElementCounts[digitOfElement]] = arr[j];</span><br><span class="line"> <span class="comment">//[bucketElementCounts[digitOfElement]]++的意思是在digitOfElement对应的桶中数据个数加一</span></span><br><span class="line"> bucketElementCounts[digitOfElement]++;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//按照这个桶中顺序取出数据</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">index</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">k</span> <span class="operator">=</span> <span class="number">0</span>; k &lt; bucketElementCounts.length; k++) &#123;</span><br><span class="line"> <span class="comment">//如果桶中有数据,我们才放入到原数组</span></span><br><span class="line"> <span class="keyword">if</span> (bucketElementCounts[k] != <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="comment">//循环该桶即第K个桶放入</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">l</span> <span class="operator">=</span> <span class="number">0</span>; l &lt; bucketElementCounts[k]; l++) &#123;</span><br><span class="line"> arr[index++] = bucket[k][l];</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> bucketElementCounts[k] = <span class="number">0</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;第一轮:&quot;</span> + Arrays.toString(arr));</span><br><span class="line"></span><br><span class="line"> <span class="comment">//2.第2轮</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">j</span> <span class="operator">=</span> <span class="number">0</span>; j &lt; arr.length; j++) &#123;</span><br><span class="line"> <span class="comment">//取出每个元素的十位数的值</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">digitOfElement</span> <span class="operator">=</span> arr[j] / <span class="number">10</span> % <span class="number">10</span>;</span><br><span class="line"> <span class="comment">//放入对应的桶中</span></span><br><span class="line"> bucket[digitOfElement][bucketElementCounts[digitOfElement]] = arr[j];</span><br><span class="line"> <span class="comment">//[bucketElementCounts[digitOfElement]]++的意思是在digitOfElement对应的桶中数据个数加一</span></span><br><span class="line"> bucketElementCounts[digitOfElement]++;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//按照这个桶中顺序取出数据</span></span><br><span class="line"> index = <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">k</span> <span class="operator">=</span> <span class="number">0</span>; k &lt; bucketElementCounts.length; k++) &#123;</span><br><span class="line"> <span class="comment">//如果桶中有数据,我们才放入到原数组</span></span><br><span class="line"> <span class="keyword">if</span> (bucketElementCounts[k] != <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="comment">//循环该桶即第K个桶放入</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">l</span> <span class="operator">=</span> <span class="number">0</span>; l &lt; bucketElementCounts[k]; l++) &#123;</span><br><span class="line"> arr[index++] = bucket[k][l];</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> bucketElementCounts[k] = <span class="number">0</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;第2轮:&quot;</span> + Arrays.toString(arr));</span><br><span class="line"></span><br><span class="line"> <span class="comment">//3.第3轮</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">j</span> <span class="operator">=</span> <span class="number">0</span>; j &lt; arr.length; j++) &#123;</span><br><span class="line"> <span class="comment">//取出每个元素的百位数的值</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">digitOfElement</span> <span class="operator">=</span> arr[j] / <span class="number">100</span> % <span class="number">10</span>;</span><br><span class="line"> <span class="comment">//放入对应的桶中</span></span><br><span class="line"> bucket[digitOfElement][bucketElementCounts[digitOfElement]] = arr[j];</span><br><span class="line"> <span class="comment">//[bucketElementCounts[digitOfElement]]++的意思是在digitOfElement对应的桶中数据个数加一</span></span><br><span class="line"> bucketElementCounts[digitOfElement]++;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//按照这个桶中顺序取出数据</span></span><br><span class="line"> index = <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">k</span> <span class="operator">=</span> <span class="number">0</span>; k &lt; bucketElementCounts.length; k++) &#123;</span><br><span class="line"> <span class="comment">//如果桶中有数据,我们才放入到原数组</span></span><br><span class="line"> <span class="keyword">if</span> (bucketElementCounts[k] != <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="comment">//循环该桶即第K个桶放入</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">l</span> <span class="operator">=</span> <span class="number">0</span>; l &lt; bucketElementCounts[k]; l++) &#123;</span><br><span class="line"> arr[index++] = bucket[k][l];</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;第3轮:&quot;</span> + Arrays.toString(arr));</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>最终代码</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.sort;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Arrays;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/26</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 基数排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">RadixSort</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//定义一个待排序的数组</span></span><br><span class="line"> <span class="type">int</span> arr[] = &#123;<span class="number">53</span>, <span class="number">3</span>, <span class="number">542</span>, <span class="number">748</span>, <span class="number">14</span>, <span class="number">214</span>&#125;;</span><br><span class="line"> RadixSort.radixSort(arr);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//基数排序</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">radixSort</span><span class="params">(<span class="type">int</span>[] arr)</span> &#123;</span><br><span class="line"> <span class="comment">//得到数组中最大数的位数</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">max</span> <span class="operator">=</span> arr[<span class="number">0</span>];</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; arr.length; i++) &#123;</span><br><span class="line"> <span class="keyword">if</span> (arr[i] &gt; max) &#123;</span><br><span class="line"> max = arr[i];</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//最大数的位数</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">maxLength</span> <span class="operator">=</span> (max + <span class="string">&quot;&quot;</span>).length();</span><br><span class="line"> <span class="comment">//定义一个二维数组,表示十个桶,每个桶就是一个一维数组</span></span><br><span class="line"> <span class="type">int</span>[][] bucket = <span class="keyword">new</span> <span class="title class_">int</span>[<span class="number">10</span>][arr.length];</span><br><span class="line"> <span class="comment">//为了记录每个桶中实际存放了多少个数据,我们定义一个一维数组来记录每个桶中依次放入数据的个数</span></span><br><span class="line"> <span class="type">int</span>[] bucketElementCounts = <span class="keyword">new</span> <span class="title class_">int</span>[<span class="number">10</span>];</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>, n = <span class="number">1</span>; i &lt; maxLength; i++, n *= <span class="number">10</span>) &#123;<span class="comment">//循环的是每一轮,第一次是个位。第二次是百位</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">j</span> <span class="operator">=</span> <span class="number">0</span>; j &lt; arr.length; j++) &#123;</span><br><span class="line"> <span class="comment">//取出每个元素的对应位数的值</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">digitOfElement</span> <span class="operator">=</span> arr[j] / n % <span class="number">10</span>;</span><br><span class="line"> <span class="comment">//放入对应的桶中</span></span><br><span class="line"> bucket[digitOfElement][bucketElementCounts[digitOfElement]] = arr[j];</span><br><span class="line"> <span class="comment">//[bucketElementCounts[digitOfElement]]++的意思是在digitOfElement对应的桶中数据个数加一</span></span><br><span class="line"> bucketElementCounts[digitOfElement]++;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//按照这个桶中顺序取出数据</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">index</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">k</span> <span class="operator">=</span> <span class="number">0</span>; k &lt; bucketElementCounts.length; k++) &#123;</span><br><span class="line"> <span class="comment">//如果桶中有数据,我们才放入到原数组</span></span><br><span class="line"> <span class="keyword">if</span> (bucketElementCounts[k] != <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="comment">//循环该桶即第K个桶放入</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">l</span> <span class="operator">=</span> <span class="number">0</span>; l &lt; bucketElementCounts[k]; l++) &#123;</span><br><span class="line"> arr[index++] = bucket[k][l];</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> bucketElementCounts[k] = <span class="number">0</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(<span class="string">&quot;第&quot;</span> + (i + <span class="number">1</span>) + <span class="string">&quot;轮:&quot;</span> + Arrays.toString(arr));</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="11-常用排序算法总结和对比"><a href="#11-常用排序算法总结和对比" class="headerlink" title="11.常用排序算法总结和对比"></a>11.常用排序算法总结和对比</h3><p><img src="/pictures/image-20230526114127402.png" alt="image-20230526114127402"></p>
<h2 id="八-查找算法"><a href="#八-查找算法" class="headerlink" title="八.查找算法"></a>八.查找算法</h2><h3 id="1-简单介绍-1"><a href="#1-简单介绍-1" class="headerlink" title="1.简单介绍"></a>1.简单介绍</h3><img src="/pictures/image-20230526115027518.png" alt="image-20230526115027518" style="zoom:200%;" />
<h3 id="2-线性查找算法"><a href="#2-线性查找算法" class="headerlink" title="2.线性查找算法"></a>2.线性查找算法</h3><h4 id="2-1代码实现"><a href="#2-1代码实现" class="headerlink" title="2.1代码实现"></a>2.1代码实现</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.search;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/29</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 线性查找</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">SeqSearch</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">int</span>[] arr = &#123;<span class="number">1</span>,<span class="number">9</span>,<span class="number">11</span>,-<span class="number">1</span>,<span class="number">34</span>,<span class="number">89</span>&#125;;<span class="comment">//没有顺序的数组</span></span><br><span class="line"> System.out.println(<span class="string">&quot;目标值的下标:&quot;</span>+seqSearch(arr, <span class="number">11</span>));</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 找到一个满足条件的值就返回</span></span><br><span class="line"><span class="comment"> * 线性查找是逐一比对,发现有相同的值时就返回这个值的下标</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> arr 需要在这里面找目标值的数组</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> value 目标值</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 目标值的下标</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">int</span> <span class="title function_">seqSearch</span><span class="params">(<span class="type">int</span>[] arr,<span class="type">int</span> value)</span>&#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; arr.length; i++) &#123;</span><br><span class="line"> <span class="keyword">if</span>(arr[i] == value)&#123;</span><br><span class="line"> <span class="keyword">return</span> i;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> -<span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h3 id="3-二分查找算法"><a href="#3-二分查找算法" class="headerlink" title="3.二分查找算法"></a>3.二分查找算法</h3><h4 id="3-1-图解"><a href="#3-1-图解" class="headerlink" title="3.1 图解"></a>3.1 图解</h4><img src="/pictures/image-20230529104112317.png" alt="image-20230529104112317" style="zoom:150%;" />
<h4 id="3-2-代码实现"><a href="#3-2-代码实现" class="headerlink" title="3.2 代码实现"></a>3.2 代码实现</h4><p><em><strong>递归的方式解决</strong></em></p>
<p><strong>基本的写法</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.search;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/29</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 二分查找</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">BinarySearch</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">int</span>[] arr = &#123;<span class="number">1</span>, <span class="number">8</span>, <span class="number">10</span>, <span class="number">89</span>, <span class="number">1000</span>, <span class="number">1234</span>&#125;;</span><br><span class="line"> System.out.println(<span class="string">&quot;目标值的下标:&quot;</span> + binarySearch(arr, <span class="number">0</span>, arr.length - <span class="number">1</span>, <span class="number">3</span>));</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 二分查找</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> arr 需要在这里面查找目标值的数组</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> left 左边的索引</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> right 右边的索引</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> findVal 要查找的值</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 目标值在数组中的下标,找到就返回下标,没有就返回-1</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">int</span> <span class="title function_">binarySearch</span><span class="params">(<span class="type">int</span>[] arr, <span class="type">int</span> left, <span class="type">int</span> right, <span class="type">int</span> findVal)</span> &#123;</span><br><span class="line"> <span class="comment">//结束递归的条件</span></span><br><span class="line"> <span class="keyword">if</span> (left &gt; right) &#123;</span><br><span class="line"> <span class="keyword">return</span> -<span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">int</span> <span class="variable">mid</span> <span class="operator">=</span> (left + right) / <span class="number">2</span>;</span><br><span class="line"> <span class="type">int</span> <span class="variable">midVal</span> <span class="operator">=</span> arr[mid];</span><br><span class="line"> <span class="keyword">if</span> (findVal &gt; midVal) &#123;<span class="comment">//向右递归</span></span><br><span class="line"> <span class="keyword">return</span> binarySearch(arr, mid + <span class="number">1</span>, right, findVal);</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (findVal &lt; midVal) &#123;<span class="comment">//向左递归</span></span><br><span class="line"> <span class="keyword">return</span> binarySearch(arr, left, mid - <span class="number">1</span>, findVal);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> mid;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>完整的代码</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.search;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.ArrayList;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/29</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 二分查找</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">BinarySearch</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="type">int</span>[] arr = &#123;<span class="number">1</span>, <span class="number">8</span>, <span class="number">10</span>, <span class="number">89</span>, <span class="number">1000</span>, <span class="number">1234</span>&#125;;</span><br><span class="line"> System.out.println(<span class="string">&quot;目标值的下标:&quot;</span> + binarySearch(arr, <span class="number">0</span>, arr.length - <span class="number">1</span>, <span class="number">3</span>));</span><br><span class="line"> <span class="type">int</span>[] arr2 = &#123;<span class="number">1</span>, <span class="number">8</span>, <span class="number">10</span>, <span class="number">89</span>, <span class="number">89</span>, <span class="number">89</span>, <span class="number">1000</span>, <span class="number">1234</span>&#125;;</span><br><span class="line"> System.out.println(<span class="string">&quot;目标值在数组中下标的集合:&quot;</span> + binarySearch2(arr2, <span class="number">0</span>, arr2.length - <span class="number">1</span>, <span class="number">89</span>));</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 二分查找</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> arr 需要在这里面查找目标值的数组</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> left 左边的索引</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> right 右边的索引</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> findVal 要查找的值</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 目标值在数组中的下标,找到就返回下标,没有就返回-1</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">int</span> <span class="title function_">binarySearch</span><span class="params">(<span class="type">int</span>[] arr, <span class="type">int</span> left, <span class="type">int</span> right, <span class="type">int</span> findVal)</span> &#123;</span><br><span class="line"> <span class="comment">//结束递归的条件</span></span><br><span class="line"> <span class="keyword">if</span> (left &gt; right) &#123;</span><br><span class="line"> <span class="keyword">return</span> -<span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">int</span> <span class="variable">mid</span> <span class="operator">=</span> (left + right) / <span class="number">2</span>;</span><br><span class="line"> <span class="type">int</span> <span class="variable">midVal</span> <span class="operator">=</span> arr[mid];</span><br><span class="line"> <span class="keyword">if</span> (findVal &gt; midVal) &#123;<span class="comment">//向右递归</span></span><br><span class="line"> <span class="keyword">return</span> binarySearch(arr, mid + <span class="number">1</span>, right, findVal);</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (findVal &lt; midVal) &#123;<span class="comment">//向左递归</span></span><br><span class="line"> <span class="keyword">return</span> binarySearch(arr, left, mid - <span class="number">1</span>, findVal);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> mid;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 二分查找查找出所有与目标值相同的数组的下标</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> arr 需要在这里面查找目标值的数组</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> left 左边的索引</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> right 右边的索引</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> findVal 要查找的的值</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 目标值在数组中的下标的集合</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> List&lt;Integer&gt; <span class="title function_">binarySearch2</span><span class="params">(<span class="type">int</span>[] arr, <span class="type">int</span> left, <span class="type">int</span> right, <span class="type">int</span> findVal)</span> &#123;</span><br><span class="line"> <span class="comment">//结束递归的条件</span></span><br><span class="line"> <span class="keyword">if</span> (left &gt; right) &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">int</span> <span class="variable">mid</span> <span class="operator">=</span> (left + right) / <span class="number">2</span>;</span><br><span class="line"> <span class="type">int</span> <span class="variable">midVal</span> <span class="operator">=</span> arr[mid];</span><br><span class="line"> <span class="keyword">if</span> (findVal &gt; midVal) &#123;<span class="comment">//向右递归</span></span><br><span class="line"> <span class="keyword">return</span> binarySearch2(arr, mid + <span class="number">1</span>, right, findVal);</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (findVal &lt; midVal) &#123;<span class="comment">//向左递归</span></span><br><span class="line"> <span class="keyword">return</span> binarySearch2(arr, left, mid - <span class="number">1</span>, findVal);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> List&lt;Integer&gt; resList = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> <span class="type">int</span> <span class="variable">temp</span> <span class="operator">=</span> mid - <span class="number">1</span>;</span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123; <span class="comment">//向左边探测相同值的元素</span></span><br><span class="line"> <span class="keyword">if</span> (temp &lt; <span class="number">0</span> || arr[temp] != findVal) &#123;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//否则就把temp放入到集合中</span></span><br><span class="line"> resList.add(temp);</span><br><span class="line"> temp--;<span class="comment">//左移</span></span><br><span class="line"> &#125;</span><br><span class="line"> resList.add(mid);</span><br><span class="line"> <span class="comment">//向右边探测</span></span><br><span class="line"> temp = mid + <span class="number">1</span>;</span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123; <span class="comment">//向右边探测相同值的元素</span></span><br><span class="line"> <span class="keyword">if</span> (temp &gt; arr.length - <span class="number">1</span> || arr[temp] != findVal) &#123;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//否则就把temp放入到集合中</span></span><br><span class="line"> resList.add(temp);</span><br><span class="line"> temp++;<span class="comment">//右移</span></span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> resList;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="4-插值查找算法"><a href="#4-插值查找算法" class="headerlink" title="4.插值查找算法"></a>4.插值查找算法</h3><h4 id="4-1-图解"><a href="#4-1-图解" class="headerlink" title="4.1 图解"></a>4.1 图解</h4><p><img src="/pictures/image-20230530101020552.png"></p>
<img src="/pictures/image-20230530101803392.png" alt="image-20230530101803392" style="zoom:200%;" />
<h4 id="4-2-代码实现"><a href="#4-2-代码实现" class="headerlink" title="4.2 代码实现"></a>4.2 代码实现</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.search;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Arrays;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/30</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 插值查找算法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">InsertValueSearch</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//创建一个数组 用于模拟需要查找数据的数组</span></span><br><span class="line"> <span class="type">int</span>[] arr = <span class="keyword">new</span> <span class="title class_">int</span>[<span class="number">100</span>];</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; <span class="number">100</span>; i++) &#123;</span><br><span class="line"> arr[i] = i + <span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> System.out.println(Arrays.toString(arr));</span><br><span class="line"> System.out.println(<span class="string">&quot;查找的数的下标为:&quot;</span> + insertValueSearch(arr, <span class="number">0</span>, arr.length - <span class="number">1</span>, <span class="number">30</span>));</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 插值查找算法</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> arr 目标数组(有序的)等差序列的最好1-100有序的数组找一个数只用找一次就行了</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> left 左边索引</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> right 右边索引</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> findVal 需要查找的值</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 查找的值在数组中的索引</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">int</span> <span class="title function_">insertValueSearch</span><span class="params">(<span class="type">int</span>[] arr, <span class="type">int</span> left, <span class="type">int</span> right, <span class="type">int</span> findVal)</span> &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;方法被调用了&quot;</span>);</span><br><span class="line"> <span class="comment">//退出的条件和防止数组越界</span></span><br><span class="line"> <span class="keyword">if</span> (left &gt; right || findVal &lt; arr[<span class="number">0</span>] || findVal &gt; arr[arr.length - <span class="number">1</span>]) &#123;</span><br><span class="line"> <span class="keyword">return</span> -<span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//求出mid,这个是插值查找算法的灵魂,自适应的查找</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">mid</span> <span class="operator">=</span> left + (right - left) * (findVal - arr[left]) / (arr[right] - arr[left]);</span><br><span class="line"> <span class="type">int</span> <span class="variable">midVal</span> <span class="operator">=</span> arr[mid];</span><br><span class="line"> <span class="keyword">if</span> (findVal &gt; midVal) &#123; <span class="comment">//应向右递归</span></span><br><span class="line"> <span class="keyword">return</span> insertValueSearch(arr, mid + <span class="number">1</span>, right, findVal);</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (findVal &lt; midVal) &#123;<span class="comment">//向左边递归</span></span><br><span class="line"> <span class="keyword">return</span> insertValueSearch(arr, left, mid - <span class="number">1</span>, findVal);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> mid;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="4-3-注意事项"><a href="#4-3-注意事项" class="headerlink" title="4.3 注意事项"></a>4.3 注意事项</h4><p><img src="/pictures/image-20230530105652529.png" alt="image-20230530105652529"></p>
<h3 id="5-斐波那契(黄金分割法)查找算法"><a href="#5-斐波那契(黄金分割法)查找算法" class="headerlink" title="5.斐波那契(黄金分割法)查找算法"></a>5.斐波那契(黄金分割法)查找算法</h3><h4 id="5-1-基本介绍-1"><a href="#5-1-基本介绍-1" class="headerlink" title="5.1 基本介绍"></a>5.1 基本介绍</h4><img src="/pictures/image-20230530110145048.png" alt="image-20230530110145048" style="zoom:150%;" />
<h4 id="5-2-原理介绍"><a href="#5-2-原理介绍" class="headerlink" title="5.2 原理介绍"></a>5.2 原理介绍</h4><p><img src="/pictures/image-20230530110511769.png" alt="image-20230530110511769"></p>
<hr>
<h2 id="PDF笔记"><a href="#PDF笔记" class="headerlink" title="PDF笔记"></a>PDF笔记</h2>
<div class="row">
<embed src="/pdf/尚硅谷图解Java数据结构和算法.pdf" width="100%" height="550" type="application/pdf">
</div>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>数据结构与算法</tag>
</tags>
</entry>
<entry>
<title>阿里云对象存储OSS</title>
<url>/posts/6319.html</url>
<content><![CDATA[<h2 id="1-官网介绍"><a href="#1-官网介绍" class="headerlink" title="1.官网介绍"></a>1.官网介绍</h2><p> 阿里云对象存储OSSObject Storage Service是一款海量、安全、低成本、高可靠的云存储服务可提供99.9999999999%12个9的数据持久性99.995%的数据可用性。多种存储类型供选择全面优化存储成本。OSS具有与平台无关的RESTful API接口您可以在任何应用、任何时间、任何地点存储和访问任意类型的数据。您可以使用阿里云提供的API、SDK接口或者OSS迁移工具轻松地将海量数据移入或移出阿里云OSS。数据存储到阿里云OSS以后您可以选择标准存储Standard作为移动应用、大型网站、图片分享或热点音视频的主要存储方式也可以选择成本更低、存储期限更长的低频访问存储Infrequent Access、归档存储Archive、冷归档存储Cold Archive作为不经常访问数据的存储方式。</p>
<h2 id="2-使用"><a href="#2-使用" class="headerlink" title="2.使用"></a>2.使用</h2><h3 id="2-1-使用的前置准备"><a href="#2-1-使用的前置准备" class="headerlink" title="2.1 使用的前置准备"></a>2.1 使用的前置准备</h3><p>1申请阿里云账号<br>2实名认证<br>3开通“对象存储OSS”服务<br>4进入管理控制台</p>
<h3 id="2-2-创建Bucket"><a href="#2-2-创建Bucket" class="headerlink" title="2.2 创建Bucket"></a>2.2 创建Bucket</h3><p>点击创建Bucket</p>
<p><img src="/pictures/image-20230422210404204.png" alt="image-20230422210404204"></p>
<p>填写相关的信息</p>
<p><img src="/pictures/image-20230422211448747.png" alt="image-20230422211448747"></p>
<h3 id="2-3获取AccessKey保存备用"><a href="#2-3获取AccessKey保存备用" class="headerlink" title="2.3获取AccessKey保存备用"></a>2.3获取AccessKey保存备用</h3><p>AccessKey拥有对阿里云提供服务对象存储、短信服务、视频点播服务等等的控制权,要妥善保管</p>
<p><img src="/pictures/image-20230422211940485.png" alt="image-20230422211940485"></p>
<h3 id="2-4-查看开发文档"><a href="#2-4-查看开发文档" class="headerlink" title="2.4 查看开发文档"></a>2.4 查看开发文档</h3><p>刚开始不会使用的话,查看开发文档是入门的最好方式</p>
<p><img src="/pictures/image-20230422212508029.png" alt="image-20230422212508029"></p>
<h3 id="2-5-入门案例"><a href="#2-5-入门案例" class="headerlink" title="2.5 入门案例"></a>2.5 入门案例</h3><p>创建一个SpringBoot工程</p>
<h4 id="1-引入依赖"><a href="#1-引入依赖" class="headerlink" title="1.引入依赖"></a>1.引入依赖</h4><p>可以引入一个日期工具类<strong>joda-time</strong> 方便后面生成图片存储的路径</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.aliyun.oss<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>aliyun-sdk-oss<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>3.15.1<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="2-修改配置文件"><a href="#2-修改配置文件" class="headerlink" title="2.修改配置文件"></a>2.修改配置文件</h4><p>入门案例中以下值会直接在代码中写死,先不从配置文件中获取</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment"># 地域节点 bucket概览中查看</span></span><br><span class="line"><span class="attr">aliyun.oss.endpoint</span>=<span class="string">oss-cn-beijing.aliyuncs.com</span></span><br><span class="line"><span class="comment"># accessKey</span></span><br><span class="line"><span class="attr">aliyun.oss.accessKeyId</span>=<span class="string">LTAI4G4SV6WtST7UYH77XXXX</span></span><br><span class="line"><span class="comment"># secret</span></span><br><span class="line"><span class="attr">aliyun.oss.secret</span>=<span class="string">X9KHNYgztNr9MI5Zp8JffXXXXXXXX</span></span><br><span class="line"><span class="comment"># bucket名</span></span><br><span class="line"><span class="attr">aliyun.oss.bucket</span>=<span class="string">yygh-atguigu</span></span><br></pre></td></tr></table></figure>
<h4 id="3-创建读取配置文件的配置类"><a href="#3-创建读取配置文件的配置类" class="headerlink" title="3.创建读取配置文件的配置类"></a>3.创建读取配置文件的配置类</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ConstantOssPropertiesUtils</span> <span class="keyword">implements</span> <span class="title class_">InitializingBean</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;aliyun.oss.endpoint&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String endpoint;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;aliyun.oss.accessKeyId&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String accessKeyId;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;aliyun.oss.secret&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String secret;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;aliyun.oss.bucket&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String bucket;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String EDNPOINT;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String ACCESS_KEY_ID;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String SECRECT;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String BUCKET;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">afterPropertiesSet</span><span class="params">()</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> EDNPOINT=endpoint;</span><br><span class="line"> ACCESS_KEY_ID=accessKeyId;</span><br><span class="line"> SECRECT=secret;</span><br><span class="line"> BUCKET=bucket;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="4-测试案例"><a href="#4-测试案例" class="headerlink" title="4.测试案例"></a>4.测试案例</h4><p>以下测试案例由官方开发文档提供</p>
<p>1.通过代码创建Bucket</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Demo</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="comment">// Endpoint以华东1杭州为例其它Region请按实际情况填写。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">endpoint</span> <span class="operator">=</span> <span class="string">&quot;https://oss-cn-hangzhou.aliyuncs.com&quot;</span>;</span><br><span class="line"> <span class="comment">// 阿里云账号AccessKey拥有所有API的访问权限风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维请登录RAM控制台创建RAM用户。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">accessKeyId</span> <span class="operator">=</span> <span class="string">&quot;yourAccessKeyId&quot;</span>;</span><br><span class="line"> <span class="type">String</span> <span class="variable">accessKeySecret</span> <span class="operator">=</span> <span class="string">&quot;yourAccessKeySecret&quot;</span>;</span><br><span class="line"> <span class="comment">// 填写Bucket名称例如examplebucket。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">bucketName</span> <span class="operator">=</span> <span class="string">&quot;examplebucket&quot;</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 创建OSSClient实例。</span></span><br><span class="line"> <span class="type">OSS</span> <span class="variable">ossClient</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">OSSClientBuilder</span>().build(endpoint, accessKeyId, accessKeySecret);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">// 创建存储空间。</span></span><br><span class="line"> ossClient.createBucket(bucketName);</span><br><span class="line"></span><br><span class="line"> &#125; <span class="keyword">catch</span> (OSSException oe) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;Caught an OSSException, which means your request made it to OSS, &quot;</span></span><br><span class="line"> + <span class="string">&quot;but was rejected with an error response for some reason.&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Message:&quot;</span> + oe.getErrorMessage());</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Code:&quot;</span> + oe.getErrorCode());</span><br><span class="line"> System.out.println(<span class="string">&quot;Request ID:&quot;</span> + oe.getRequestId());</span><br><span class="line"> System.out.println(<span class="string">&quot;Host ID:&quot;</span> + oe.getHostId());</span><br><span class="line"> &#125; <span class="keyword">catch</span> (ClientException ce) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;Caught an ClientException, which means the client encountered &quot;</span></span><br><span class="line"> + <span class="string">&quot;a serious internal problem while trying to communicate with OSS, &quot;</span></span><br><span class="line"> + <span class="string">&quot;such as not being able to access the network.&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Message:&quot;</span> + ce.getMessage());</span><br><span class="line"> &#125; <span class="keyword">finally</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (ossClient != <span class="literal">null</span>) &#123;</span><br><span class="line"> ossClient.shutdown();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>2.上传文件</p>
<p>以下代码用于通过流式上传的方式将文件上传到OSS。</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> com.aliyun.oss.ClientException;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSS;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSSClientBuilder;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSSException;</span><br><span class="line"><span class="keyword">import</span> java.io.ByteArrayInputStream;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Demo</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="comment">// Endpoint以华东1杭州为例其它Region请按实际情况填写。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">endpoint</span> <span class="operator">=</span> <span class="string">&quot;https://oss-cn-hangzhou.aliyuncs.com&quot;</span>;</span><br><span class="line"> <span class="comment">// 阿里云账号AccessKey拥有所有API的访问权限风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维请登录RAM控制台创建RAM用户。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">accessKeyId</span> <span class="operator">=</span> <span class="string">&quot;yourAccessKeyId&quot;</span>;</span><br><span class="line"> <span class="type">String</span> <span class="variable">accessKeySecret</span> <span class="operator">=</span> <span class="string">&quot;yourAccessKeySecret&quot;</span>;</span><br><span class="line"> <span class="comment">// 填写Bucket名称例如examplebucket。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">bucketName</span> <span class="operator">=</span> <span class="string">&quot;examplebucket&quot;</span>;</span><br><span class="line"> <span class="comment">// 填写Object完整路径例如exampledir/exampleobject.txt。Object完整路径中不能包含Bucket名称。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">objectName</span> <span class="operator">=</span> <span class="string">&quot;exampledir/exampleobject.txt&quot;</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 创建OSSClient实例。</span></span><br><span class="line"> <span class="type">OSS</span> <span class="variable">ossClient</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">OSSClientBuilder</span>().build(endpoint, accessKeyId, accessKeySecret);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">content</span> <span class="operator">=</span> <span class="string">&quot;Hello OSS&quot;</span>;</span><br><span class="line"> ossClient.putObject(bucketName, objectName, <span class="keyword">new</span> <span class="title class_">ByteArrayInputStream</span>(content.getBytes()));</span><br><span class="line"> &#125; <span class="keyword">catch</span> (OSSException oe) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;Caught an OSSException, which means your request made it to OSS, &quot;</span></span><br><span class="line"> + <span class="string">&quot;but was rejected with an error response for some reason.&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Message:&quot;</span> + oe.getErrorMessage());</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Code:&quot;</span> + oe.getErrorCode());</span><br><span class="line"> System.out.println(<span class="string">&quot;Request ID:&quot;</span> + oe.getRequestId());</span><br><span class="line"> System.out.println(<span class="string">&quot;Host ID:&quot;</span> + oe.getHostId());</span><br><span class="line"> &#125; <span class="keyword">catch</span> (ClientException ce) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;Caught an ClientException, which means the client encountered &quot;</span></span><br><span class="line"> + <span class="string">&quot;a serious internal problem while trying to communicate with OSS, &quot;</span></span><br><span class="line"> + <span class="string">&quot;such as not being able to access the network.&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Message:&quot;</span> + ce.getMessage());</span><br><span class="line"> &#125; <span class="keyword">finally</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (ossClient != <span class="literal">null</span>) &#123;</span><br><span class="line"> ossClient.shutdown();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>3.下载文件</p>
<p>以下代码用于通过流式下载方式从OSS下载文件。</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> com.aliyun.oss.ClientException;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSS;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSSClientBuilder;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSSException;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.model.OSSObject;</span><br><span class="line"><span class="keyword">import</span> java.io.BufferedReader;</span><br><span class="line"><span class="keyword">import</span> java.io.InputStream;</span><br><span class="line"><span class="keyword">import</span> java.io.InputStreamReader;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Demo</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="comment">// Endpoint以华东1杭州为例其它Region请按实际情况填写。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">endpoint</span> <span class="operator">=</span> <span class="string">&quot;https://oss-cn-hangzhou.aliyuncs.com&quot;</span>;</span><br><span class="line"> <span class="comment">// 阿里云账号AccessKey拥有所有API的访问权限风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维请登录RAM控制台创建RAM用户。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">accessKeyId</span> <span class="operator">=</span> <span class="string">&quot;yourAccessKeyId&quot;</span>;</span><br><span class="line"> <span class="type">String</span> <span class="variable">accessKeySecret</span> <span class="operator">=</span> <span class="string">&quot;yourAccessKeySecret&quot;</span>;</span><br><span class="line"> <span class="comment">// 填写Bucket名称例如examplebucket。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">bucketName</span> <span class="operator">=</span> <span class="string">&quot;examplebucket&quot;</span>;</span><br><span class="line"> <span class="comment">// 填写Object完整路径例如exampledir/exampleobject.txt。Object完整路径中不能包含Bucket名称。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">objectName</span> <span class="operator">=</span> <span class="string">&quot;exampledir/exampleobject.txt&quot;</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 创建OSSClient实例。</span></span><br><span class="line"> <span class="type">OSS</span> <span class="variable">ossClient</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">OSSClientBuilder</span>().build(endpoint, accessKeyId, accessKeySecret);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">// 调用ossClient.getObject返回一个OSSObject实例该实例包含文件内容及文件元信息。</span></span><br><span class="line"> <span class="type">OSSObject</span> <span class="variable">ossObject</span> <span class="operator">=</span> ossClient.getObject(bucketName, objectName);</span><br><span class="line"> <span class="comment">// 调用ossObject.getObjectContent获取文件输入流可读取此输入流获取其内容。</span></span><br><span class="line"> <span class="type">InputStream</span> <span class="variable">content</span> <span class="operator">=</span> ossObject.getObjectContent();</span><br><span class="line"> <span class="keyword">if</span> (content != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="type">BufferedReader</span> <span class="variable">reader</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">BufferedReader</span>(<span class="keyword">new</span> <span class="title class_">InputStreamReader</span>(content));</span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">line</span> <span class="operator">=</span> reader.readLine();</span><br><span class="line"> <span class="keyword">if</span> (line == <span class="literal">null</span>) <span class="keyword">break</span>;</span><br><span class="line"> System.out.println(<span class="string">&quot;\n&quot;</span> + line);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">// 数据读取完成后,获取的流必须关闭,否则会造成连接泄漏,导致请求无连接可用,程序无法正常工作。</span></span><br><span class="line"> content.close();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">catch</span> (OSSException oe) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;Caught an OSSException, which means your request made it to OSS, &quot;</span></span><br><span class="line"> + <span class="string">&quot;but was rejected with an error response for some reason.&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Message:&quot;</span> + oe.getErrorMessage());</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Code:&quot;</span> + oe.getErrorCode());</span><br><span class="line"> System.out.println(<span class="string">&quot;Request ID:&quot;</span> + oe.getRequestId());</span><br><span class="line"> System.out.println(<span class="string">&quot;Host ID:&quot;</span> + oe.getHostId());</span><br><span class="line"> &#125; <span class="keyword">catch</span> (ClientException ce) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;Caught an ClientException, which means the client encountered &quot;</span></span><br><span class="line"> + <span class="string">&quot;a serious internal problem while trying to communicate with OSS, &quot;</span></span><br><span class="line"> + <span class="string">&quot;such as not being able to access the network.&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Message:&quot;</span> + ce.getMessage());</span><br><span class="line"> &#125; <span class="keyword">finally</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (ossClient != <span class="literal">null</span>) &#123;</span><br><span class="line"> ossClient.shutdown();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>4.列举文件</p>
<p>以下代码用于列举examplebucket存储空间下的文件。默认列举100个文件。</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> com.aliyun.oss.ClientException;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSS;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSSClientBuilder;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSSException;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.model.OSSObjectSummary;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.model.ObjectListing;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Demo</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="comment">// Endpoint以华东1杭州为例其它Region请按实际情况填写。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">endpoint</span> <span class="operator">=</span> <span class="string">&quot;https://oss-cn-hangzhou.aliyuncs.com&quot;</span>;</span><br><span class="line"> <span class="comment">// 阿里云账号AccessKey拥有所有API的访问权限风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维请登录RAM控制台创建RAM用户。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">accessKeyId</span> <span class="operator">=</span> <span class="string">&quot;yourAccessKeyId&quot;</span>;</span><br><span class="line"> <span class="type">String</span> <span class="variable">accessKeySecret</span> <span class="operator">=</span> <span class="string">&quot;yourAccessKeySecret&quot;</span>;</span><br><span class="line"> <span class="comment">// 填写Bucket名称例如examplebucket。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">bucketName</span> <span class="operator">=</span> <span class="string">&quot;examplebucket&quot;</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 创建OSSClient实例。</span></span><br><span class="line"> <span class="type">OSS</span> <span class="variable">ossClient</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">OSSClientBuilder</span>().build(endpoint, accessKeyId, accessKeySecret);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">// ossClient.listObjects返回ObjectListing实例包含此次listObject请求的返回结果。</span></span><br><span class="line"> <span class="type">ObjectListing</span> <span class="variable">objectListing</span> <span class="operator">=</span> ossClient.listObjects(bucketName);</span><br><span class="line"> <span class="comment">// objectListing.getObjectSummaries获取所有文件的描述信息。</span></span><br><span class="line"> <span class="keyword">for</span> (OSSObjectSummary objectSummary : objectListing.getObjectSummaries()) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot; - &quot;</span> + objectSummary.getKey() + <span class="string">&quot; &quot;</span> +</span><br><span class="line"> <span class="string">&quot;(size = &quot;</span> + objectSummary.getSize() + <span class="string">&quot;)&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">catch</span> (OSSException oe) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;Caught an OSSException, which means your request made it to OSS, &quot;</span></span><br><span class="line"> + <span class="string">&quot;but was rejected with an error response for some reason.&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Message:&quot;</span> + oe.getErrorMessage());</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Code:&quot;</span> + oe.getErrorCode());</span><br><span class="line"> System.out.println(<span class="string">&quot;Request ID:&quot;</span> + oe.getRequestId());</span><br><span class="line"> System.out.println(<span class="string">&quot;Host ID:&quot;</span> + oe.getHostId());</span><br><span class="line"> &#125; <span class="keyword">catch</span> (ClientException ce) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;Caught an ClientException, which means the client encountered &quot;</span></span><br><span class="line"> + <span class="string">&quot;a serious internal problem while trying to communicate with OSS, &quot;</span></span><br><span class="line"> + <span class="string">&quot;such as not being able to access the network.&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Message:&quot;</span> + ce.getMessage());</span><br><span class="line"> &#125; <span class="keyword">finally</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (ossClient != <span class="literal">null</span>) &#123;</span><br><span class="line"> ossClient.shutdown();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>5.删除文件</p>
<p>以下代码用于删除指定文件。</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> com.aliyun.oss.ClientException;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSS;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSSClientBuilder;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSSException;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Demo</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="comment">// Endpoint以华东1杭州为例其它Region请按实际情况填写。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">endpoint</span> <span class="operator">=</span> <span class="string">&quot;https://oss-cn-hangzhou.aliyuncs.com&quot;</span>;</span><br><span class="line"> <span class="comment">// 阿里云账号AccessKey拥有所有API的访问权限风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维请登录RAM控制台创建RAM用户。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">accessKeyId</span> <span class="operator">=</span> <span class="string">&quot;yourAccessKeyId&quot;</span>;</span><br><span class="line"> <span class="type">String</span> <span class="variable">accessKeySecret</span> <span class="operator">=</span> <span class="string">&quot;yourAccessKeySecret&quot;</span>;</span><br><span class="line"> <span class="comment">// 填写Bucket名称例如examplebucket。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">bucketName</span> <span class="operator">=</span> <span class="string">&quot;examplebucket&quot;</span>;</span><br><span class="line"> <span class="comment">// 填写Object完整路径例如exampledir/exampleobject.txt。Object完整路径中不能包含Bucket名称。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">objectName</span> <span class="operator">=</span> <span class="string">&quot;exampledir/exampleobject.txt&quot;</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 创建OSSClient实例。</span></span><br><span class="line"> <span class="type">OSS</span> <span class="variable">ossClient</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">OSSClientBuilder</span>().build(endpoint, accessKeyId, accessKeySecret);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">// 删除文件。</span></span><br><span class="line"> ossClient.deleteObject(bucketName, objectName);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (OSSException oe) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;Caught an OSSException, which means your request made it to OSS, &quot;</span></span><br><span class="line"> + <span class="string">&quot;but was rejected with an error response for some reason.&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Message:&quot;</span> + oe.getErrorMessage());</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Code:&quot;</span> + oe.getErrorCode());</span><br><span class="line"> System.out.println(<span class="string">&quot;Request ID:&quot;</span> + oe.getRequestId());</span><br><span class="line"> System.out.println(<span class="string">&quot;Host ID:&quot;</span> + oe.getHostId());</span><br><span class="line"> &#125; <span class="keyword">catch</span> (ClientException ce) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;Caught an ClientException, which means the client encountered &quot;</span></span><br><span class="line"> + <span class="string">&quot;a serious internal problem while trying to communicate with OSS, &quot;</span></span><br><span class="line"> + <span class="string">&quot;such as not being able to access the network.&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;Error Message:&quot;</span> + ce.getMessage());</span><br><span class="line"> &#125; <span class="keyword">finally</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (ossClient != <span class="literal">null</span>) &#123;</span><br><span class="line"> ossClient.shutdown();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="5-项目中使用OSS对象存储"><a href="#5-项目中使用OSS对象存储" class="headerlink" title="5.项目中使用OSS对象存储"></a>5.项目中使用OSS对象存储</h4><h5 id="1-文件的上传操作"><a href="#1-文件的上传操作" class="headerlink" title="1.文件的上传操作"></a>1.文件的上传操作</h5><p>controller层</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> com.atguigu.yygh.common.result.Result;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.yygh.oss.service.OSSService;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.PostMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RestController;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.multipart.MultipartFile;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/22</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 对象存储的控制器方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RestController</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/api/oss/file&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">OSSController</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> OSSService ossService;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 上传文件到阿里云</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@PostMapping(&quot;/fileUpload&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> Result <span class="title function_">fileUpload</span><span class="params">(MultipartFile file)</span>&#123;</span><br><span class="line"> <span class="comment">//上传文件,返回文件的url地址</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">url</span> <span class="operator">=</span> ossService.upload(file);</span><br><span class="line"> <span class="keyword">return</span> Result.ok(url);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>service层</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> com.aliyun.oss.ClientException;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSS;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSSClientBuilder;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSSException;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.yygh.oss.service.OSSService;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.yygh.oss.utils.ConstantOssPropertiesUtils;</span><br><span class="line"><span class="keyword">import</span> org.joda.time.DateTime;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Service;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.multipart.MultipartFile;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.ByteArrayInputStream;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.io.InputStream;</span><br><span class="line"><span class="keyword">import</span> java.util.UUID;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/4/22</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> OSS文件相关操作</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Service</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">OSSServiceImpl</span> <span class="keyword">implements</span> <span class="title class_">OSSService</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 上传文件</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> file 文件</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 文件的地址</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">upload</span><span class="params">(MultipartFile file)</span> &#123;</span><br><span class="line"> <span class="comment">// Endpoint,地域节点信息</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">endpoint</span> <span class="operator">=</span> ConstantOssPropertiesUtils.EDNPOINT;</span><br><span class="line"> <span class="comment">// 阿里云账号AccessKey拥有所有API的访问权限风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维请登录RAM控制台创建RAM用户。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">accessKeyId</span> <span class="operator">=</span> ConstantOssPropertiesUtils.ACCESS_KEY_ID;</span><br><span class="line"> <span class="type">String</span> <span class="variable">accessKeySecret</span> <span class="operator">=</span> ConstantOssPropertiesUtils.SECRECT;</span><br><span class="line"> <span class="comment">// Bucket名称</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">bucketName</span> <span class="operator">=</span> ConstantOssPropertiesUtils.BUCKET;</span><br><span class="line"> <span class="comment">// 创建OSSClient实例。</span></span><br><span class="line"> <span class="type">OSS</span> <span class="variable">ossClient</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">OSSClientBuilder</span>().build(endpoint, accessKeyId, accessKeySecret);</span><br><span class="line"> <span class="comment">//生成文件名 生成文件名的策略是日期/文件名.jpg 文件名由UUID随机生成</span></span><br><span class="line"> <span class="comment">//获取原始的文件名</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">originalFilename</span> <span class="operator">=</span> file.getOriginalFilename();</span><br><span class="line"> <span class="comment">//分割出扩展名</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">suffixFilename</span> <span class="operator">=</span> originalFilename.substring(originalFilename.lastIndexOf(<span class="string">&quot;.&quot;</span>));</span><br><span class="line"> <span class="comment">//得到随机的文件名</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">prefixFilename</span> <span class="operator">=</span> UUID.randomUUID().toString();</span><br><span class="line"> <span class="comment">//得到文件名</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">filename</span> <span class="operator">=</span> prefixFilename + suffixFilename;</span><br><span class="line"> <span class="comment">//将文件按照日期进行分类 日期/文件名.jpg</span></span><br><span class="line"> <span class="comment">//获取当前的日期 使用时间作为目录</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">filePath</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">DateTime</span>().toString(<span class="string">&quot;yyyy/MM/dd&quot;</span>);</span><br><span class="line"> <span class="comment">//得到最终的文件名</span></span><br><span class="line"> filename = filePath + <span class="string">&quot;/&quot;</span> + filename;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//获取上传文件的流</span></span><br><span class="line"> <span class="type">InputStream</span> <span class="variable">inputStream</span> <span class="operator">=</span> file.getInputStream();</span><br><span class="line"> <span class="comment">//上传文件</span></span><br><span class="line"> ossClient.putObject(bucketName, filename, inputStream);</span><br><span class="line"> <span class="comment">//拼接文件的url地址并返回</span></span><br><span class="line"> <span class="comment">//https://edu-guli-0306.oss-cn-beijing.aliyuncs.com/81ea0d8d-0e52-4749-be58-6292410deec6.jpg</span></span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;https://&quot;</span> + bucketName + <span class="string">&quot;.&quot;</span> + endpoint + <span class="string">&quot;/&quot;</span> + filename;</span><br><span class="line"> &#125; <span class="keyword">catch</span> (IOException e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125; <span class="keyword">finally</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (ossClient != <span class="literal">null</span>) &#123;</span><br><span class="line"> ossClient.shutdown();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="3-Aliyun-Spring-Boot-OSS"><a href="#3-Aliyun-Spring-Boot-OSS" class="headerlink" title="3.Aliyun Spring Boot OSS"></a>3.Aliyun Spring Boot OSS</h2><p><strong>[使用文档](<a href="https://github.com/alibaba/aliyun-spring-boot/blob/master/aliyun-spring-boot-samples/aliyun-oss-spring-boot-sample/README-zh.md">aliyun-spring-boot&#x2F;README-zh.md at master · alibaba&#x2F;aliyun-spring-boot · GitHub</a>)</strong></p>
<p>相比与上面的Demo这个Demo更加的简便编写的代码比较少</p>
<p><strong>项目说明</strong></p>
<p> 如果您的应用是 Spring Cloud 应用,且需要使用阿里云的 OSS 服务进行云端的文件存储,例如电商业务中常见的商品图片存储,那么您可以使用 OSS starter 完成 Spring Cloud 应用的对象存储。</p>
<p>阿里云对象存储服务Object Storage Service简称 OSS是阿里云提供的海量、安全、低成本、高可靠的云存储服务。您可以在任何应用、任何时间、任何地点存储和访问任意类型的数据。更多 OSS 相关的信息,请参考 <a href="https://www.aliyun.com/product/oss">OSS官网</a>。</p>
<h3 id="1-引入依赖-1"><a href="#1-引入依赖-1" class="headerlink" title="1.引入依赖"></a>1.引入依赖</h3><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 阿里云的对象存储的依赖--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.alibaba.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-alicloud-oss<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.1.0.RELEASE<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">type</span>&gt;</span>pom<span class="tag">&lt;/<span class="name">type</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2-在配置文件中增加配置"><a href="#2-在配置文件中增加配置" class="headerlink" title="2.在配置文件中增加配置"></a>2.在配置文件中增加配置</h3><figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring.cloud.alicloud.access-key</span>=<span class="string">************</span></span><br><span class="line"><span class="attr">spring.cloud.alicloud.secret-key</span>=<span class="string">************</span></span><br><span class="line"><span class="attr">spring.cloud.alicloud.oss.endpoint</span>=<span class="string">************</span></span><br></pre></td></tr></table></figure>
<h3 id="3-测试使用"><a href="#3-测试使用" class="headerlink" title="3.测试使用"></a>3.测试使用</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Autowired</span></span><br><span class="line">OSSClient ossClient;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 测试使用阿里云上传视频</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">void</span> <span class="title function_">testUpload</span><span class="params">()</span> <span class="keyword">throws</span> FileNotFoundException &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">bucketName</span> <span class="operator">=</span> <span class="string">&quot;gulimall-0611&quot;</span>;</span><br><span class="line"> <span class="type">String</span> <span class="variable">objectName</span> <span class="operator">=</span> <span class="string">&quot;test1.jpg&quot;</span>;</span><br><span class="line"> <span class="type">InputStream</span> <span class="variable">inputStream</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">FileInputStream</span>(<span class="string">&quot;C:\\Gong\\data\\test.jpg&quot;</span>);</span><br><span class="line"> <span class="comment">// 创建PutObjectRequest对象。</span></span><br><span class="line"> ossClient.putObject(bucketName,objectName,inputStream);</span><br><span class="line"> ossClient.shutdown();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="4-在项目中使用OSS进行文件的上传和下载的操作"><a href="#4-在项目中使用OSS进行文件的上传和下载的操作" class="headerlink" title="4.在项目中使用OSS进行文件的上传和下载的操作"></a>4.在项目中使用OSS进行文件的上传和下载的操作</h3><p><strong>服务端签名直传</strong> 使用这种方式可以减轻本地服务器的压力</p>
<p>参考文档:<a href="https://help.aliyun.com/document_detail/91868.htm?spm=a2c4g.31927.0.0.44193d70tJDLJb#concept-ahk-rfz-2fb">https://help.aliyun.com/document_detail/91868.htm?spm=a2c4g.31927.0.0.44193d70tJDLJb#concept-ahk-rfz-2fb</a></p>
<img src="/pictures/image-20230611214209712.png" alt="image-20230611214209712" style="zoom:150%;" />
<h4 id="4-1-获取文件上传相关的签名信息"><a href="#4-1-获取文件上传相关的签名信息" class="headerlink" title="4.1 获取文件上传相关的签名信息"></a>4.1 获取文件上传相关的签名信息</h4><p>获取签名信息的接口</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.thirdparty.controller;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSS;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSSClientBuilder;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.common.utils.BinaryUtil;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.model.MatchMode;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.model.PolicyConditions;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Value;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RestController;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.text.SimpleDateFormat;</span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"><span class="keyword">import</span> java.util.LinkedHashMap;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/6/11</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 阿里云对象存储的控制器方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="meta">@RestController</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">OSSController</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> OSS ossClient;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;spring.cloud.alicloud.oss.endpoint&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String endpoint;</span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;spring.cloud.alicloud.oss.bucket&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String bucket;</span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;spring.cloud.alicloud.access-key&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String accessId;</span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;spring.cloud.alicloud.secret-key&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String accessKey;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@RequestMapping(&quot;/oss/policy&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> Map&lt;String, String&gt; <span class="title function_">policy</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">// 填写Host地址格式为https://bucketname.endpoint。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">host</span> <span class="operator">=</span> <span class="string">&quot;https://&quot;</span>+bucket+<span class="string">&quot;.&quot;</span>+endpoint;</span><br><span class="line"> <span class="comment">// 设置上传回调URL即回调服务器地址用于处理应用服务器与OSS之间的通信。OSS会在文件上传完成后把文件上传信息通过此回调URL发送给应用服务器。</span></span><br><span class="line"> <span class="comment">//String callbackUrl = &quot;https://192.168.0.0:8888&quot;;</span></span><br><span class="line"> <span class="comment">// 设置上传到OSS文件的前缀可置空此项。置空后文件将上传至Bucket的根目录下。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">format</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SimpleDateFormat</span>(<span class="string">&quot;yyyy/MM/dd&quot;</span>).format(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> <span class="type">String</span> <span class="variable">dir</span> <span class="operator">=</span> format+<span class="string">&quot;/&quot;</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 创建ossClient实例。</span></span><br><span class="line"> <span class="type">OSS</span> <span class="variable">ossClient</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">OSSClientBuilder</span>().build(endpoint, accessId, accessKey);</span><br><span class="line"> Map&lt;String, String&gt; respMap = <span class="literal">null</span>;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">long</span> <span class="variable">expireTime</span> <span class="operator">=</span> <span class="number">30</span>;</span><br><span class="line"> <span class="type">long</span> <span class="variable">expireEndTime</span> <span class="operator">=</span> System.currentTimeMillis() + expireTime * <span class="number">1000</span>;</span><br><span class="line"> <span class="type">Date</span> <span class="variable">expiration</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Date</span>(expireEndTime);</span><br><span class="line"> <span class="type">PolicyConditions</span> <span class="variable">policyConds</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PolicyConditions</span>();</span><br><span class="line"> policyConds.addConditionItem(PolicyConditions.COND_CONTENT_LENGTH_RANGE, <span class="number">0</span>, <span class="number">1048576000</span>);</span><br><span class="line"> policyConds.addConditionItem(MatchMode.StartWith, PolicyConditions.COND_KEY, dir);</span><br><span class="line"></span><br><span class="line"> <span class="type">String</span> <span class="variable">postPolicy</span> <span class="operator">=</span> ossClient.generatePostPolicy(expiration, policyConds);</span><br><span class="line"> <span class="type">byte</span>[] binaryData = postPolicy.getBytes(<span class="string">&quot;utf-8&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">encodedPolicy</span> <span class="operator">=</span> BinaryUtil.toBase64String(binaryData);</span><br><span class="line"> <span class="type">String</span> <span class="variable">postSignature</span> <span class="operator">=</span> ossClient.calculatePostSignature(postPolicy);</span><br><span class="line"></span><br><span class="line"> respMap = <span class="keyword">new</span> <span class="title class_">LinkedHashMap</span>&lt;String, String&gt;();</span><br><span class="line"> respMap.put(<span class="string">&quot;accessId&quot;</span>, accessId);</span><br><span class="line"> respMap.put(<span class="string">&quot;policy&quot;</span>, encodedPolicy);</span><br><span class="line"> respMap.put(<span class="string">&quot;signature&quot;</span>, postSignature);</span><br><span class="line"> respMap.put(<span class="string">&quot;dir&quot;</span>, dir);</span><br><span class="line"> respMap.put(<span class="string">&quot;host&quot;</span>, host);</span><br><span class="line"> respMap.put(<span class="string">&quot;expire&quot;</span>, String.valueOf(expireEndTime / <span class="number">1000</span>));</span><br><span class="line"> <span class="comment">// respMap.put(&quot;expire&quot;, formatISO8601Date(expiration));</span></span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> System.out.println(e.getMessage());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> respMap;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>访问接口之后返回的数据格式</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;accessId&quot;</span><span class="punctuation">:</span> <span class="string">&quot;LTAI5tDDwk18w2S7w1KF24oT&quot;</span><span class="punctuation">,</span><span class="comment">//access-key</span></span><br><span class="line"> <span class="attr">&quot;policy&quot;</span><span class="punctuation">:</span> <span class="string">&quot;eyJleHBpcmF0aW9uIjoiMjAyMy0wNi0xMVQxNDoxNzozMi43OTdaIiwiY29uZGl0aW9ucyI6W1siY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsMTA0ODU3NjAwMF0sWyJzdGFydHMtd2l0aCIsIiRrZXkiLCIyMDIzLzA2LzExLyJdXX0=&quot;</span><span class="punctuation">,</span><span class="comment">//策略,加密之后的结果</span></span><br><span class="line"> <span class="attr">&quot;signature&quot;</span><span class="punctuation">:</span> <span class="string">&quot;n67QffiYHceO2Hf7g8MDXgWsfpw=&quot;</span><span class="punctuation">,</span><span class="comment">//签名</span></span><br><span class="line"> <span class="attr">&quot;dir&quot;</span><span class="punctuation">:</span> <span class="string">&quot;2023/06/11/&quot;</span><span class="punctuation">,</span><span class="comment">//上传到的文件的地址</span></span><br><span class="line"> <span class="attr">&quot;host&quot;</span><span class="punctuation">:</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com&quot;</span><span class="punctuation">,</span><span class="comment">//上传到的主机的</span></span><br><span class="line"> <span class="attr">&quot;expire&quot;</span><span class="punctuation">:</span> <span class="string">&quot;1686493052&quot;</span><span class="comment">//过期时间</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p>前端相关的代码</p>
<p><strong>前端相关的代码可以借鉴一下谷粒商城的前端上传文件的组件,里面封装了多文件上传和单文件上传的功能</strong></p>
<p><img src="/pictures/image-20230612111805518.png" alt="image-20230612111805518"></p>
<p>出现跨域的问题</p>
<p><img src="/pictures/image-20230612114314757.png" alt="image-20230612114314757"></p>
<p>解决方法</p>
<p><img src="/pictures/image-20230612114238391.png" alt="image-20230612114238391"></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>云计算</tag>
</tags>
</entry>
<entry>
<title>面试题集锦</title>
<url>/posts/29985.html</url>
<content><![CDATA[<p><strong>参考资料:</strong></p>
<p><a href="https://www.nowcoder.com/issue/tutorial?tutorialId=94&uuid=ea1986fcff294f6292385703e94689e8">Java工程师面试 宝典学习说明_互联网校招面试真题面经汇总_牛客网 (nowcoder.com)</a></p>
<p><a href="https://javaguide.cn/java/">Java | JavaGuide(Java面试 + 学习指南)</a></p>
<h2 id="一-Java基础面试题"><a href="#一-Java基础面试题" class="headerlink" title="一.Java基础面试题"></a>一.Java基础面试题</h2><h3 id="1-谈谈你对面向对象的理解"><a href="#1-谈谈你对面向对象的理解" class="headerlink" title="1.谈谈你对面向对象的理解"></a>1.谈谈你对面向对象的理解</h3><p> 对比面向过程,是两种不同处理问题的角度,面向过程更注重事情的每一步骤及顺序,面向对象更注重事情有哪些参与者(对象),以及各自需要做什么。面向过程比较直接高效,面向对象易于复用、扩展和维护。</p>
<p>面向对象的三大基本特征:封装、继承、多态(父类应用指向子类对象)</p>
<h3 id="2-JDK、JRE、JVM之间的区别"><a href="#2-JDK、JRE、JVM之间的区别" class="headerlink" title="2.JDK、JRE、JVM之间的区别"></a>2.JDK、JRE、JVM之间的区别</h3><p>JDK java 开发工具</p>
<p>JRE(Java Runtime Environment Java 运行环境)</p>
<p>JVM java虚拟机</p>
<p>JDK &#x3D; JRE + 开发工具集(例如 Javac,java 编译工具等)</p>
<p>JRE &#x3D; JVM + Java SE 标准类库java 核心类库)</p>
<h3 id="3-和equals⽅法的区别"><a href="#3-和equals⽅法的区别" class="headerlink" title="3.&#x3D;&#x3D;和equals⽅法的区别"></a>3.&#x3D;&#x3D;和equals⽅法的区别</h3><p>&#x3D;&#x3D;:如果是基本数据类型,⽐较是值,如果是引⽤类型,⽐较的是引⽤地址<br>equals具体看各个类重写equals⽅法之后的⽐较逻辑⽐如String类虽然是引⽤类型但是String类中重写了equals⽅法⽅法内部⽐较的是字符串中的各个字符是否全部相等。</p>
<h3 id="4-String-StringBuffer-StringBuilder的区别"><a href="#4-String-StringBuffer-StringBuilder的区别" class="headerlink" title="4.String,StringBuffer,StringBuilder的区别"></a>4.String,StringBuffer,StringBuilder的区别</h3><p>1.String是不可变的如果尝试去修改会新⽣成⼀个字符串对象StringBuffer和StringBuilder是可变的,修改是在原对象上操作的</p>
<p>2.StringBuffer是线程安全的StringBuilder是线程不安全的所以在单线程环境下StringBuilder效率会更⾼</p>
<p>性能: StringBuilder &gt; StringBuffer &gt; String</p>
<h3 id="5-重载和重写的区别"><a href="#5-重载和重写的区别" class="headerlink" title="5.重载和重写的区别"></a>5.重载和重写的区别</h3><p>重载:发生在同一个类中,方法名必须相同,参数类型不同、个数不同、顺序不同、方法返回值和访问修饰符可以不同,发生在编译时。</p>
<p>重写:发生在父子类中,方法名,参数列表必须相同,返回值范围小于等于父类,抛出异常范围小于等于父类,访问修饰符范围大于等于父类;如果父类访问修饰符为私有,子类不能重写该方法。</p>
<h3 id="6-接口和抽象类的区别"><a href="#6-接口和抽象类的区别" class="headerlink" title="6.接口和抽象类的区别"></a>6.接口和抽象类的区别</h3><p>1.抽象类可以有实现的方法和抽象的方法</p>
<p>2.抽象类的成员变量可以是各种类型的接口中的成员变量只能是public static final类型(默认)的</p>
<p>3.抽象类只能继承一个,接口可以实现多个</p>
<p>4.关键字不同接口的关键字是interface,抽象类的关键字是abstract</p>
<h3 id="7-List和set的区别"><a href="#7-List和set的区别" class="headerlink" title="7.List和set的区别"></a>7.List和set的区别</h3><p>List:有序按对象进入的顺序保存对象可重复允许多个Null元素对象可以使用iterator取出所有的元素在逐一遍历还可以使用get(int index)获取指定下标的元素。</p>
<p>Set:无序不可重复最多允许有一个Null元素对象取元素时只能用iterator接口取得所有元素再逐一遍历各个元素。</p>
<h3 id="8-hashCode-与equals-之间的关系"><a href="#8-hashCode-与equals-之间的关系" class="headerlink" title="8.hashCode()与equals()之间的关系"></a>8.hashCode()与equals()之间的关系</h3><p>hashCode()的作用是获取哈希码,也称散列码,哈希码的作用是确定该对象在哈希表中的索引位置。</p>
<ul>
<li><p>如果两个对象相等那么它们的hashCode()值一定相同</p>
</li>
<li><p>如果两个对象hashCode()相等,它们并不一定相等</p>
</li>
</ul>
<h3 id="9-ArrayList和LinkedList的区别"><a href="#9-ArrayList和LinkedList的区别" class="headerlink" title="9.ArrayList和LinkedList的区别"></a>9.ArrayList和LinkedList的区别</h3><p>ArrayList基于动态数组连续内存存储适合下标访问随机访问。扩容机制因为数组长度固定超出长度存数据时需要新建数组将老数组的数据拷贝到新数组然后插入需要加入到数组中的数据。</p>
<p>LinkedList基于链表可以存储在分散的内存中适合做数据插入及删除操作不适合查询。遍历LinkedList必须使用iterator不能使用for循环因为for循环体内通过get(i)取得某一元素时都需要对list重新遍历性能消耗大。</p>
<h3 id="10-HashMap和HashTable的区别底层实现是什么"><a href="#10-HashMap和HashTable的区别底层实现是什么" class="headerlink" title="10.HashMap和HashTable的区别底层实现是什么?"></a>10.HashMap和HashTable的区别底层实现是什么?</h3><p>区别:</p>
<p>1.HashMap方法没有synchronized修饰线程非安全HashTable线程安全</p>
<p>2.HashMap允许key和value为null而HashTable不允许</p>
<p>底层实现: 数组 + 链表</p>
<h3 id="11-ConcurrentHashMap"><a href="#11-ConcurrentHashMap" class="headerlink" title="11.ConcurrentHashMap"></a>11.ConcurrentHashMap</h3><p>ConcurrentHashMap和HashTable都是线程安全的但ConcurrentHashMap相比HashTable性能更高</p>
<h3 id="12-如何实现一个IOC容器"><a href="#12-如何实现一个IOC容器" class="headerlink" title="12.如何实现一个IOC容器"></a>12.如何实现一个IOC容器</h3><p>1.配置文件配置包扫描路径</p>
<p>2.递归包扫描获取.class文件</p>
<p>3.反射、确定需要交给IOC管理的类</p>
<p>4.对需要注入的类进行依赖注入</p>
<h3 id="13-什么是字节码?采用字节码的好处是什么?"><a href="#13-什么是字节码?采用字节码的好处是什么?" class="headerlink" title="13.什么是字节码?采用字节码的好处是什么?"></a>13.什么是字节码?采用字节码的好处是什么?</h3><p><strong>什么是字节码?</strong></p>
<p>Java中引入了虚拟机的概念即在机器和编译程序之间加入了一层抽象的虚拟的机器。编译程序只需要面向虚拟机生成虚拟机能够理解的代码然后由解释器来将虚拟机代码转化为特定系统的机器码执行在java中这种供虚拟机理解的代码叫做字节码(即扩展名为.class的文件)。</p>
<p><strong>采用字节码的好处是什么?</strong></p>
<p>Java语言通过字节码的方式在一定程度上解决了传统解释型语言执行效率的问题同时又保留了解释型语言可移植的特点。所以Java程序运行时比较高效而且由于字节码并不专对一种特定的机器因此Java程序无需重新编译便可在多种计算机上运行。</p>
<h3 id="14-Java类加载器有哪些"><a href="#14-Java类加载器有哪些" class="headerlink" title="14.Java类加载器有哪些"></a>14.Java类加载器有哪些</h3><p>JDK有三个类加载器:</p>
<ol>
<li>bootstrap ClassLoader是ExClassLoader 的父类加载器,默认负责加载%JAVA_HOME%bin下的jar包和class文件</li>
<li>ExClassLoader是AppClassLoader的父类加载器负责加载%JAVA_HOME%&#x2F;bin&#x2F;ext文件夹下的jar包和class文件</li>
<li>AppClassLoader是自定义加载器的父类负责加载classpath下的类文件系统类加载器线程上下文加载器</li>
</ol>
<p>自定义加载器的方法: 继承ClassLoader实现自定义加载器</p>
<h3 id="15-双亲委派模型"><a href="#15-双亲委派模型" class="headerlink" title="15.双亲委派模型"></a>15.双亲委派模型</h3><p><strong>双亲委派模型的执行流程是这样的:</strong> </p>
<p>1、当加载一个类时会先从应用程序类加载器的缓存里查找相应的类如果能找到就返回对象如果找不到就执行下面流程</p>
<p>2、在扩展加载器缓存中查找相应的类如果能找到就返回对象如果找不到就继续下面流程</p>
<p>3、在启动类加载器中查询相应的类如果找到就返回对象如果找不到就继续下面流程</p>
<p>4、在扩展加载器中查找并加载类如果能找到就返回对象并将对象加入到缓存中如果找不到就继续下面流程</p>
<p>5、在应用程序类加载器中查找并加载类如果能找到就返回对象并将对象加入到缓存中如果找不到就返回 ClassNotFound 异常。</p>
<p><strong>加载流程如下图所示:</strong></p>
<p><img src="/pictures/image-20230904161407239.png" alt="image-20230904161407239"></p>
<p>一般“双亲”指的是“父亲”和“母亲”,而在这里“双亲”指的是类加载类先向上找,再向下找的流程就叫做双亲委派模型。</p>
<p><strong>双亲委派模型的好处</strong></p>
<ol>
<li>主要是为了安全性避免用户自己编写的类动他替换java的一些核心类比如String</li>
<li>同时避免了类的重复加载因为jvm中区分不同类不仅仅是根据类名相同的class文件被不同的ClassLoader加载就是不同的两个类</li>
</ol>
<h3 id="16-Java中的异常体系"><a href="#16-Java中的异常体系" class="headerlink" title="16.Java中的异常体系"></a>16.Java中的异常体系</h3><ol>
<li>Java中所有异常都来自顶级父类Throwable</li>
<li>Throwable下面有两个子类Exception和Error</li>
<li>Error是程序无法处理的错误一旦出现这个错误程序将被迫停止运行Exception不会导致程序停止</li>
<li>Exception有分为两个部分RunTimeException运行时异常和CheckedException检查异常</li>
<li>RunTimeException常常发生在程序运行过程中会导致程序当前线程执行失败。CheckedException常常发生在程序编译过程中会导致程序编译不通过。</li>
</ol>
<h3 id="17-GC如何判断对象可以被回收"><a href="#17-GC如何判断对象可以被回收" class="headerlink" title="17.GC如何判断对象可以被回收"></a>17.GC如何判断对象可以被回收</h3><ul>
<li>引用计数法每一个对象有一个引用计数属性新增一个引用计数加1引用释放减1计数为0时可以回收。java中没有使用这个方法原因可能会出现A引用了BB又引用了A这时就算他们都不再使用了但是因为他们互相引用计数器&#x3D;1永远无法被回收</li>
<li>可达性分析法从GC Roots开始向下搜索搜索所走过的路径称为引用链。当一个对象到GC Roots没有任何引用链相连时则证明此对象是不可用的那么虚拟机就可以判断是可回收对象。</li>
</ul>
<h3 id="18-线程的生命周期,线程有哪些状态"><a href="#18-线程的生命周期,线程有哪些状态" class="headerlink" title="18.线程的生命周期,线程有哪些状态"></a>18.线程的生命周期,线程有哪些状态</h3><p>线程通常有五种状态:创建、就绪、运行、阻塞、死亡状态</p>
<p>阻塞又分为三种情况:等待阻塞、同步阻塞、其他阻塞</p>
<ol>
<li>新建状态:新创建了一个线程对象</li>
<li>就绪状态线程对象创建后其他线程调用了该对象的start()方法。该线程位于可运行线程池中变得可运行等待获取CPU的使用权</li>
<li>运行状态就绪状态的线程获取了CPU执行了程序代码</li>
<li>阻塞状态阻塞状态是线程因为某种原因放弃了CPU使用权暂时停止运行。直到线程进入就绪状态才有机会转到运行状态</li>
<li>死亡状态线程执行完了或者因为异常退出了run()方法,该线程结束生命周期</li>
</ol>
<h3 id="19-sleep-wait-join-yield-的区别"><a href="#19-sleep-wait-join-yield-的区别" class="headerlink" title="19.sleep(),wait(),join(),yield()的区别"></a>19.sleep(),wait(),join(),yield()的区别</h3><p><strong>sleep(),wait()的区别</strong></p>
<ol>
<li>sleep()是Thread类的静态本地方法wait()是Object类的本地方法</li>
<li>sleep()不会释放锁把锁带着进入冻结状态wait会释放锁</li>
<li>sleep方法不依赖于同步器synchronized但是wait需要依赖synchronized关键字</li>
<li>sleep不需要被唤醒休眠之后退出阻塞但是wait需要不指定时间需要被别人中断</li>
<li>sleep一般用于当前线程休眠或者轮循暂停操作wait则用于多线程之间的通信</li>
<li>sleep会让出cpu执行时间且强制上下文切换而wait则不一定wait后可能还是有机会重新竞争到锁继续执行</li>
</ol>
<p><strong>yield()执行后线程直接进入就绪状态马上释放了cpu但是依然保留了cpu的执行资格所有有可能cpu下次进行线程调度还会让这个线程取到执行权</strong></p>
<p><strong>join()执行后线程进入阻塞状态例如在线程B中调用了A的join()那线程B会进入到阻塞队列直到线程A结束或者中断线程</strong></p>
<h3 id="20-说说你对线程安全的理解"><a href="#20-说说你对线程安全的理解" class="headerlink" title="20.说说你对线程安全的理解"></a>20.说说你对线程安全的理解</h3><p>线程安全讲的不是线程安全,应该是<strong>内存安全</strong><strong>堆是共享内存,可以被所有线程访问</strong></p>
<p><strong>线程安全的定义</strong>:当多个线程访问一个对象的时候,如果不用进行<strong>额外的同步控制或者其他的协调操作</strong>,调用这个对象的行为都可以获得<strong>正确的结果</strong>,我们就说这个线程数是安全的。</p>
<p><strong>产生线程安全问题的原因:</strong> 在每个进程的内存空间中都会有一块特殊的公共区域,通常称为堆(内存)。进程内所有线程都可以访问到该区域,这就是造成问题的潜在原因。</p>
<h3 id="21-说说你对守护线程的理解"><a href="#21-说说你对守护线程的理解" class="headerlink" title="21.说说你对守护线程的理解"></a>21.说说你对守护线程的理解</h3><p><strong>守护线程</strong>为非守护线程用户线程提供服务的线程任何一个守护线程都是整个jvm中所有非守护线程的守护线程。</p>
<p><strong>守护线程的作用:</strong></p>
<p>举例GC垃圾回收机制就是一个经典的守护线程当我们的程序不再有任何运行的Thread程序就不会再产生垃圾垃圾回收器也就没事可做所以当垃圾回收线程是jvm上仅剩的线程时垃圾回收线程会自动离开它始终再低级别的状态中运行用于实时监控和管理系统中的可回收资源。</p>
<p><strong>应用场景:</strong></p>
<ol>
<li>为其他的线程提供服务支持情况</li>
<li>或者在任何情况下,程序结束时,这个线程必须正常的且立刻关闭,就可以作为守护线程来使用</li>
</ol>
<h3 id="22-ThreadLocal的原理和使用场景"><a href="#22-ThreadLocal的原理和使用场景" class="headerlink" title="22.ThreadLocal的原理和使用场景"></a>22.ThreadLocal的原理和使用场景</h3><p>同一个线程中通过ThreadLocal存进去的数据在任何位置取出来是一致的</p>
<p><strong>原理</strong></p>
<p>每一个Thread对象均含有一个ThreadLocalMap类型的成员变量threadLocals,它存储<strong>本线程</strong>中所有ThreadLocal对象及对应的值。</p>
<p>当执行set()方法时ThreadLocal首先会获取当前线程对象然后获取当前线程的ThreadLocalMap对象。再以当前ThreadLocal对象为key获取对应的value。</p>
<p>get方法的执行过程类似。ThreadLocal首先会获取当前线程对象然后获取当前线程的ThreadLocalMap对象。再以当前ThreadLocal对象为key获取对应的value。</p>
<p>由于每一条线程均含有各自<strong>私有</strong>的ThreadLocalMap容器这些容器相互独立互不影响因此不会存在线程安全性问题从而无需使用同步机制来保证多条线程访问容器的互斥性。</p>
<p><strong>使用场景</strong></p>
<ol>
<li>在进行对象的跨层传递的时候使用ThreadLocal可以避免多次传递打破层次间的约束</li>
<li>线程间数据隔离</li>
<li>进行事务操作,用于存储事务信息</li>
<li>数据库连接Session会话管理</li>
</ol>
<h3 id="23-ThreadLocal内存泄漏原因怎么避免"><a href="#23-ThreadLocal内存泄漏原因怎么避免" class="headerlink" title="23.ThreadLocal内存泄漏原因怎么避免"></a>23.ThreadLocal内存泄漏原因怎么避免</h3><p><strong>内存泄漏</strong>:不会使用的对象或者变量占用的内存不能被回收,就是内存泄漏(内存泄漏为程序在申请内存后无法释放已申请的内存空间一次内存泄漏的危害可以忽略但内存泄漏堆积后果很严重无论多少内存迟早会被占光导致OOM。)</p>
<p>强引用使用最普遍的引用通过new一个对象具有强应用不会被垃圾回收器回收即使是内存不足。我们想要取消强引用可以显示的将引用赋值为nulljvm在合适的时间就会回收该对象。</p>
<p><strong>ThreadLocal内存泄漏的根源</strong></p>
<p>由于ThreadLocalMap的生命周期和Thread一样长如果没有手动删除对应key就会导致内存泄漏</p>
<p><strong>怎么避免</strong></p>
<ol>
<li>每次使用ThreadLocal都调用它的remove()方法清除数据</li>
<li>将ThreadLocal变量定义成private static,这样就一直村子ThreadLocal的强应用也就能保证任何时候都能通过ThreadLocal的弱引用访问到Entry的value值进而清除掉。</li>
</ol>
<h3 id="24-产生内存泄漏的原因有哪些"><a href="#24-产生内存泄漏的原因有哪些" class="headerlink" title="24.产生内存泄漏的原因有哪些"></a>24.产生内存泄漏的原因有哪些</h3><ol>
<li>资源未关闭或释放导致内存泄露(io资源数据库的连接)</li>
<li>使用 ThreadLocal 造成内存泄露</li>
<li>静态集合类引起内存泄漏如HashMap、LinkedList等等。如果这些容器为静态的那么它们的生命周期与程序一致则容器中的对象在程序结束之前将不能被释放从而造成内存泄漏。生命周期长的对象持有短生命周期对象的引用尽管短生命周期的对象不再使用但是因为长生命周期对象持有它的引用而导致不能被回收。</li>
<li>重写了 finalize() 的类,如果 finalize() 方法重写的不合理或 finalizer 队列无法跟上 Java 垃圾回收器的速度,那么迟早,应用程序会出现 OutOfMemoryError 异常</li>
</ol>
<h3 id="25-并发、并行、串行的区别"><a href="#25-并发、并行、串行的区别" class="headerlink" title="25.并发、并行、串行的区别"></a>25.并发、并行、串行的区别</h3><p>串行在时间上不可能发生重叠,前一个任务没有搞定,下一个任务只能等</p>
<p>并行在时间上是重叠的,两个任务在同一时刻互不干扰的同时执行</p>
<p>并发允许两个任务彼此干扰,同一时间点,只有一个任务运行,交替执行</p>
<h3 id="26-并发的三大特性"><a href="#26-并发的三大特性" class="headerlink" title="26.并发的三大特性"></a>26.并发的三大特性</h3><ul>
<li>原子性是指在在一个操作中CPU不可以在中途暂停然后再调度即不被中断操作要不全部执行完成要不都不执行。</li>
<li>可见性:当多个线程访问同一个变量时,一个线程修改了这个变量的值,其他的线程能够立即看到修改的值。</li>
<li>有序性:虚拟机再进行代码编译的时,对于那些改变顺序之后不会对最终的结果造成影响的代码,虚拟机不一定会按照我们写的代码的顺序来执行,有可能将它们重排序。</li>
</ul>
<h3 id="27-为什么用线程池?解释线程池参数?"><a href="#27-为什么用线程池?解释线程池参数?" class="headerlink" title="27.为什么用线程池?解释线程池参数?"></a>27.为什么用线程池?解释线程池参数?</h3><p><strong>为什么</strong></p>
<ol>
<li>降低资源的消耗;提高线程的利用率,降低创建和销毁现成的消耗</li>
<li>提高响应速度,任务来了,直接有线程可用执行,不是创建线程之后再执行</li>
<li>提高线程的可管理性;线程是稀缺资源,使用线程池可以统一分配调优监控</li>
</ol>
<p><strong>线程池参数</strong></p>
<ul>
<li><code>corePoolSize</code>代表核心线程数,也就是正常情况下创建工作的线程数,这些线程创建之后不会消除,而是一种常驻线程。</li>
<li><code>maxnumPoolSize</code>代表最大线程数,它与核心线程数相对应,表示最大允许被创建的线程数,比如当前任务较多,将核心线程数都用完了,还无法满足要求时,此时就会创建新的线程,但是线程池总数不会超过最大线程数</li>
<li><code>keepAliveTime</code>空闲线程存活时间,当一个可被回收的线程的空闲时间大于keepAliveTime就会被回收; unitkeepAliveTime的时间单位</li>
<li><code>workQueue</code>工作队列,存放待执行任务的队列当提交的任务数超过核心线程数大小后再提交的任务就存放在工作队列任务调度时再从队列中取出任务。它仅仅用来存放被execute()方法提交的Runnable任务。工作队列实现了BlockingQueue接口。</li>
<li><code>threadFactory</code>线程工厂,创建线程的工厂,可以设定线程名、线程编号等。</li>
<li><code>handler</code>拒绝策略,当线程池线程数已满并且工作队列达到限制新提交的任务使用拒绝策略处理。可以自定义拒绝策略拒绝策略需实现RejectedExecutionHandler接口。</li>
</ul>
<h3 id="28-简述线程池的处理流程"><a href="#28-简述线程池的处理流程" class="headerlink" title="28.简述线程池的处理流程"></a>28.简述线程池的处理流程</h3><p><img src="/pictures/image-20230905204135018.png" alt="image-20230905204135018"></p>
<h3 id="29-线程池中阻塞队列的作用?为什么是先添加队列而不是先创建最大线程?"><a href="#29-线程池中阻塞队列的作用?为什么是先添加队列而不是先创建最大线程?" class="headerlink" title="29.线程池中阻塞队列的作用?为什么是先添加队列而不是先创建最大线程?"></a>29.线程池中阻塞队列的作用?为什么是先添加队列而不是先创建最大线程?</h3><p><strong>线程池中阻塞队列的作用?</strong></p>
<p>1、一般的队列只能保证作为一个有限长度的缓冲区如果超出了缓冲长度就无法保留当前的任务了阻塞队列通过阻塞可以保留住当前想要继续入队的任务。</p>
<p>2、阻塞队列可以保证任务队列中没有任务时阻塞获取任务的线程使得线程进入wait状态释放cpu资源。</p>
<p>3、阻塞队列自带阻塞和唤醒的功能不需要额外处理无任务执行时线程池利用阻塞队列的take方法挂起从而维持核心线程的存活不至于一直占着cpu资源。</p>
<p><strong>为什么是先添加队列而不是先创建最大线程?</strong></p>
<p>在创建新线程的时候。是要获取全局锁的,这个时候其它就得阻塞,影响了整体效率。</p>
<p>就好比一个企业里面有10个core正式工的名额最多招10个正式工要是任务超过正式工人数task &gt; core的情况下工厂领导线程池不是首先扩招工人还是这10个人但是任务会稍微的积压一下即先放到队列去代价低10个正式工慢慢干迟早会干完的要是任务还在继续增加超过正式工的加班忍耐极限了队列满了就得招外包帮忙了注意是临时工要是正式工加上外包还是不能完成任务那新来的任务就会被领导拒绝了线程池的拒绝策略。</p>
<h3 id="30-线程池中线程复用原理"><a href="#30-线程池中线程复用原理" class="headerlink" title="30.线程池中线程复用原理"></a>30.线程池中线程复用原理</h3><p>线程池将线程和任务解耦线程是线程任务是任务摆脱了之前通过Thread创建线程时的一个线程必须对应一个任务的限制。</p>
<p>在线程池中同一个线程可以从阻塞队列中不断获取新任务来执行其核心原理在于线程池对Thread进行了封装并不是每次执行都会调用Thread.start()来创建新线程而是让每个线程去执行一个“循环任务”在这个“循环任务”中不停检查是否有任务需要被执行如果有则执行也就是调用任务中的run方法将run方法当成一个普通的方法执行通过这种方式只使用固定的线程就将所有任务的run方法串联起来。</p>
<h3 id="31-Spring是什么"><a href="#31-Spring是什么" class="headerlink" title="31.Spring是什么"></a>31.Spring是什么</h3><p>轻量级的开源的j2EE框架。他是一个容器框架用来装javabeanjava对象中间层框架万能胶可以起一个连接作用比如说把struts和hibernate粘合在一起运用可以让我们的企业开发更快、更简洁</p>
<p>Spring是一个轻量级的控制反转(ioc)和面向切面aop的容器框架</p>
<ul>
<li>从大小与开销两方面而言Spring都是轻量级的</li>
<li>通过控制反转(ioc)的技术达到松耦合的目的</li>
<li>提供了面向切面编程的丰富支持,允许通过分离应用的业务逻辑与系统级服务进行内聚的开发</li>
<li>包含并管理应用对象bean的配置和生命周期这个意义上是一个容器</li>
<li>将简单的组件配置、组合成复杂的应用,这个意义上是一个框架</li>
</ul>
<h3 id="32-谈谈你对AOP的理解"><a href="#32-谈谈你对AOP的理解" class="headerlink" title="32.谈谈你对AOP的理解"></a>32.谈谈你对AOP的理解</h3><p>系统是由许多不同的组件所组成的,每一个组件各负责一块特定的功能。除了实现自身的核心功能之外,这些组件还经常承担着额外的职责。例如日志、事务管理和安全这样的服务经常融入到自身具有核心业务逻辑的组件中去。这些系统服务经常被称为横切关注点,因为他们会跨域系统的多个组件。</p>
<p>当我们需要将分散的对象引入公共行为的时候OOP则显得无能为力也就是说OOP允许你定义从上到下的关系但并不适合定义从左到右的关系。例如日志功能</p>
<p>AOP将程序中的交叉业务逻辑比如安全、日志、事务封装成一个切面。然后注入到目标对象具体业务逻辑中去。AOP可以对某个对象或者某些功能进行增强比如对象中的方法进行增强可以在执行某个方法之前额外做一些事情在某个方法执行之后额外做一些事情。</p>
<h3 id="33-谈谈你对IOC的理解"><a href="#33-谈谈你对IOC的理解" class="headerlink" title="33.谈谈你对IOC的理解"></a>33.谈谈你对IOC的理解</h3><p>容器概念、控制反转、依赖注入三方面理解</p>
<p><strong>容器概念</strong></p>
<p>ioc容器实际上就是个mapkey、value里面存的就是各种对象在xml里配置bean节点、@Repository、@Service、@Controller在项目启动的时候会读取配置文件路面的bean节点。</p>
<p><strong>控制反转</strong></p>
<p>在没有引入ioc容器之前对象A依赖于对象B那么对象A在初始化或者运行到某一点的时候自己必须主动去创建对象B或者使用已经创建的对象B。无论是创建还是使用对象B控制权都在自己手上。</p>
<p>引入ioc容器之后对象A和对象B之间失去了直接联系。当对象A运行到需要对象B的时候ioc容器会主动创建一个对象B注入到对象A需要的地方。</p>
<p>通过前后的对比不难看出来对象A获得依赖对象B的过程由主动行为变成了被动行为控制权颠倒过来了这就是控制反转这个名称的由来。</p>
<p><strong>依赖注入</strong></p>
<p>“获得依赖对象的过程被反转了”。控制器反转之后获得依赖对象的过程由自身管理变为了由IOC容器主动注入。依赖注入是实现IOC的方法就是由IOC容器在运行期间动态地将某种依赖关系注入到对象之中。</p>
<h3 id="34-BeanFactory和ApplicationContext有什么区别"><a href="#34-BeanFactory和ApplicationContext有什么区别" class="headerlink" title="34.BeanFactory和ApplicationContext有什么区别"></a>34.BeanFactory和ApplicationContext有什么区别</h3><p>ApplicationContext是BeanFactory的子接口</p>
<p>ApplicationContext提供了更完整的功能</p>
<p>1、继承了MessageSource,因此支持国际化</p>
<p>2、统一资源文件的访问方式</p>
<p>3、提供在监听器中注册bean的事件</p>
<p>4、同时加载多个配置文件</p>
<p>5、载入多个有继承关系上下文使得每一个上下文都专注于一个特定的层次比如应用的web层</p>
<h3 id="35-深拷贝和浅拷贝"><a href="#35-深拷贝和浅拷贝" class="headerlink" title="35.深拷贝和浅拷贝"></a>35.深拷贝和浅拷贝</h3><p>深拷贝和浅拷贝就是指对象的拷贝,一个对象中存在两种类型的属性,一种是基本数据类型,一种是实列对象的引用</p>
<ul>
<li>浅拷贝是指,只会拷贝基本数据类型的值,以及实例对象的引用地址,并不会复制一份引用地址所指向的对象,也就是浅拷贝出来的对象,内部的类属性指向的是一个对象</li>
<li>深拷贝是指,既会拷贝基本数据类型的值,也会针对实例对象的引用地址所指向的对象进行复制,深拷贝出来的对象,内部的类执行指向的不是同一个对象</li>
</ul>
<p>举例:A对象中有一个user属性A1拷贝A对象两个user指向同一个对象的话就是浅拷贝反之是深拷贝</p>
<h3 id="36-TCP和UDP有什么区别TCP为什么是三次握手而不是两次"><a href="#36-TCP和UDP有什么区别TCP为什么是三次握手而不是两次" class="headerlink" title="36.TCP和UDP有什么区别TCP为什么是三次握手而不是两次"></a>36.TCP和UDP有什么区别TCP为什么是三次握手而不是两次</h3><p><strong>TCP</strong> Transfer Control Protocol是一种面向连接的、可靠的、传输层通信协议</p>
<ul>
<li>面向连接的,点对点的通信,高可靠,效率比较低、占用系统的资源比较多(类似于打电话)</li>
</ul>
<p><strong>UDP</strong> (User Datagram Protocal) 是一种无连接、不可靠的、传输层通信协议</p>
<ul>
<li>不需要连接、发送方不管接收方有没有准备好,直接发消息;可以进行广播发送的;传输不可靠,有可能会丢失消息;效率比较高;协议比较简单,占用的系统资源少(类似于广播)</li>
</ul>
<p><strong>TCP为什么是三次握手而不是两次</strong></p>
<p>如果是两次握手,可能会造成连接资源浪费的问题</p>
<h3 id="37-JVM中有哪些垃圾回收算法"><a href="#37-JVM中有哪些垃圾回收算法" class="headerlink" title="37.JVM中有哪些垃圾回收算法"></a>37.JVM中有哪些垃圾回收算法</h3><p>MarkSweep标记清除算法</p>
<p>Copying拷贝算法</p>
<p>MarkCompack标记压缩算法</p>
<h3 id="38-集合相关的面试题"><a href="#38-集合相关的面试题" class="headerlink" title="38.集合相关的面试题"></a>38.集合相关的面试题</h3><p> <img src="/pictures/image-20230926110554758.png" alt="image-20230926110554758"></p>
<p><img src="/pictures/image-20230926122104134.png" alt="image-20230926122104134"></p>
<p><img src="/pictures/image-20230926121325686.png" alt="image-20230926121325686"></p>
<p><img src="/pictures/image-20230926121517150.png" alt="image-20230926121517150"></p>
<p><img src="/pictures/image-20230926122420662.png" alt="image-20230926122420662"></p>
<p><img src="/pictures/image-20230926122546930.png" alt="image-20230926122546930"></p>
<p><img src="/pictures/image-20230926133043725.png" alt="image-20230926133043725"></p>
<p><img src="/pictures/image-20230926133301807.png" alt="image-20230926133301807"></p>
<h2 id="二-框架篇相关面试题"><a href="#二-框架篇相关面试题" class="headerlink" title="二.框架篇相关面试题"></a>二.框架篇相关面试题</h2><h3 id="1-Spring-Bean的生命周期"><a href="#1-Spring-Bean的生命周期" class="headerlink" title="1.Spring Bean的生命周期"></a>1.Spring Bean的生命周期</h3><p><strong>1.创建前准备阶段</strong></p>
<p>这个阶段主要是在开始Bean加载之前从Spring上下文和相关配置中解析并查找Bean有关的配置内容比如<code>init-method</code>-容器在初始化bean时调用的方法、<code>destory-method</code>容器在销毁Bean时调用的方法。以及BeanFactoryPostProcessor这类的bean加载过程中的前置和后置处理。这些类或者配置其实是Spring提供给开发者用来实现Bean加载过程中的扩展机制在很多和Spring集成的中间件经常使用比如Dubbo。</p>
<p><strong>2.创建实例阶段</strong></p>
<p>这个阶段主要是通过反射来创建Bean的实例对象并且扫描和解析Bean声明的一些属性。</p>
<p><strong>3.依赖注入阶段</strong></p>
<p>在这个阶段会检测被实例化的Bean是否存在其他依赖如果存在其他依赖就需要对这些被依赖Bean进行注入。比如通过<code>@Autowired</code>、@Setter等依赖注入的配置。在这个阶段还会触发一些扩展的调用比如常见的扩展类BeanPostProcessors用来实现Bean初始化前后的回调、InitializingBean类这个类有一个afterPropertiesSet()方法给属性赋值、还有BeanFactoryAware等等。</p>
<p><strong>4.容器缓存阶段</strong></p>
<p>容器缓存阶段主要是把Bean保存到IoC容器中缓存起来到了这个阶段Bean就可以被开发者使用了。这个阶段涉及到的操作常见的有<code>init-method</code>这个属性配置的方法会在这个阶段调用。比如BeanPostProcessors方法中的后置处理器方法postProcessAfterInitialization也是在这个阶段触发的。</p>
<p><strong>5.销毁实例阶段</strong></p>
<p>这个阶段是完成Spring应用上下文关闭时将销毁Spring上下文中所有的Bean。如果Bean实现了DisposableBean接口或者配置了<code>destory-method</code>属 性,将会在这个阶段被调用。</p>
<p>实例化 -&gt; 属性赋值 -&gt; 初始化 -&gt; 销毁</p>
<h3 id="2-Spring框架中的单例Bean是线程安全的吗"><a href="#2-Spring框架中的单例Bean是线程安全的吗" class="headerlink" title="2.Spring框架中的单例Bean是线程安全的吗"></a>2.Spring框架中的单例Bean是线程安全的吗</h3><p>不是线程安全的!</p>
<p>Sping中Bean默认是单例模式的框架中并没有对Bean进行多线程的封装处理。</p>
<p>线程安全这个问题要从单例与原型Bean分别进行说明。</p>
<p><strong>「原型Bean」</strong>对于原型Bean,每次创建一个新对象也就是线程之间并不存在Bean共享自然是不会有线程安全的问题。</p>
<p><strong>「单例Bean」</strong>对于单例Bean,所有线程都共享一个单例实例Bean,因此是存在资源的竞争。</p>
<p>如果单例Bean,是一个无状态Bean也就是线程中的操作不会对Bean的成员执行<strong>「查询」</strong>以外的操作那么这个单例Bean是线程安全的。比如Spring mvc 的 Controller、Service、Dao等这些Bean大多是无状态的只关注于方法本身。</p>
<h3 id="3-Spring-Bean作用域"><a href="#3-Spring-Bean作用域" class="headerlink" title="3.Spring Bean作用域"></a>3.Spring Bean作用域</h3><p>Spring 的 bean 作用域scope类型有5种</p>
<p>1、singleton:单例,默认作用域。</p>
<p>2、prototype:原型,每次创建一个新对象。</p>
<p>3、request:请求每次Http请求创建一个新对象适用于WebApplicationContext环境下。</p>
<p>4、session:会话,同一个会话共享一个实例,不同会话使用不用的实例。</p>
<p>5、global-session:全局会话,所有会话共享一个实例。</p>
<h3 id="4-Spring框架中用到了哪些设计模式"><a href="#4-Spring框架中用到了哪些设计模式" class="headerlink" title="4.Spring框架中用到了哪些设计模式"></a>4.Spring框架中用到了哪些设计模式</h3><ol>
<li>简单工厂由一个工厂类根据传入的参数动态决定应该创建哪一个产品类。Spring中的BeanFactory就是简单工厂模式的体现根据传入的一个唯一的标识来获得Bean对象但是否在传入参数后创建还是传入参数前创建这个要根据具体情况来定。</li>
<li>工厂方法实现了FactoryBean接口的bean是一类叫做factory的bean.其特点是spring会在使用getBean()调用获得该bean时会自动调用该bean的getObject()方法所以返回的不是factory这个bean,而是这个bean.getObject()方法的返回值。</li>
<li>单例模式保证一个类仅有一个实例并提供一个访问它的全局访问点。spring对单例的实现spring中的单例模式完成了后半句话即提供了全局访问点BeanFactory但没有从构造器级别去控制单例这时因为spring管理的是任意的java对象。</li>
<li>适配器模式spring中定义了一个适配接口使得每一种Controller有一种对应的适配器实现类让适配器代替controller执行响应的方法。这样扩展controller时只需要增加一个适配类就完成了springMvc的扩展了。</li>
<li>装饰器模式动态地给一个对象增加一些额外的职责。就增加功能来说Decorator模式相比生成子类更为灵活。spring中用到的装饰器模式在类名上有两种表现一是类名中含有wrapper另一种时类名中含有Decorator.</li>
<li>动态代理切面在应用运行的时刻被织入。一般情况下在织入切面时AOP容器会为目标对象动态地创建一个代理对象。SpringAOP就是以这种方式织入切面的。 织入:把切面应用到目标对象并创建新代理对象的过程。</li>
<li>观察者模式Spring的事件驱动模型使用的是观察者模式spring中observer模式常用的地方是listener的实现。</li>
<li>策略模式:spring框架的资源访问Resource接口。该接口提供了更强的资源访问能力spring框架本身大量使用了Resource接口来访问底层资源。</li>
</ol>
<h3 id="5-spring中事务实现方和原理式以及隔离级别"><a href="#5-spring中事务实现方和原理式以及隔离级别" class="headerlink" title="5.spring中事务实现方和原理式以及隔离级别"></a>5.spring中事务实现方和原理式以及隔离级别</h3><p><strong>实现方式</strong></p>
<p>在使用Spring框架时可以有两种使用事务的方式一种是编程式一种是申明式的@Transactional注解就是申明式的。</p>
<p>首先事务这个概念是数据库层面的Spring只是基于数据库中的事务进行了扩展以及提供了一些能让程序员更加方便操作事务的方式。比如我们可以通过在某个方法上增加@Transactional注解就可以开启事务这个方法中所有的sql都会在一个事务中执行统一成功失败。</p>
<p><strong>原理</strong></p>
<p>在一个方法上加了@Transactional注解后Spring会基于这个类生成一个代理对象会将这个代理对象作为bean,当在使用这个代理对象的方法时,如果这个方法存在@Transactional注解那么代理逻辑会先把事务的自动提价设置为false,然后再去执行原本的业务逻辑方法,如果执行业务逻辑方法没有异常,那么代理逻辑中就会将事务进行提交,如果执行业务逻辑方法出现了异常,那么则会将事务进行回滚。当然,针对哪些异常回滚事务是可以配置的,可以利用@Transactional注解中的rollbackFor属性进行配置默认情况下会对RuntimeException和Error进行回滚。</p>
<p><strong>隔离级别</strong></p>
<p>spring的事务隔离级别就是数据库的隔离级别外加一个默认级别</p>
<ol>
<li>read uncommitted(未提交读)</li>
<li>read committed(提交读、不可重复读)</li>
<li>repeatable read (可重复读)</li>
<li>serializable(可串行化)</li>
</ol>
<p>注数据库设置的隔离级别会被spring的配置覆盖</p>
<h3 id="6-Spring事务传播机制"><a href="#6-Spring事务传播机制" class="headerlink" title="6.Spring事务传播机制"></a>6.Spring事务传播机制</h3><p>多个事务方法相互调用的时,事务是如何在这些方法间传播</p>
<p>方法A是一个事务的方法方法A执行过程中调用了方法B那么方法B有无事务以及方法B对事务的要求不同都会对方法A的事务具体执行造成影响同时方法A的事务对方法B的事务执行也有影响这种影响具体是什么就由两个方法所定义的事务传播类型所决定。</p>
<p><strong>REQUIRED</strong>(Spring默认的事务传播类型)如果当前没有事务,则自己创建一个事务,如果当前存在事务,则加入这个事务</p>
<p><strong>SUPPORTS</strong>:当前存在事务,则加入当前事务,如果当前没有事务,就以非事务方法执行</p>
<p><strong>MANDATORY</strong>:当前存在事务,则加入当前事务,如果当前的事务不存在,则抛出异常</p>
<p><strong>REQUIRES_NEW</strong>:创建一个新事务,如果存在当前事务,则挂起该事务</p>
<p><strong>NOT_SUPPORTED</strong>:以非事务方式执行,如果当前存在事务,则挂起当前事务</p>
<p><strong>NEVER</strong>:不使用事务,如果当前事务存在,则抛出异常</p>
<p><strong>NESTED</strong>:如果当前事务存在则在嵌套事务中执行否则REQUIRED的操作一样开启一个事务</p>
<h3 id="7-Spring事务什么时候会失效"><a href="#7-Spring事务什么时候会失效" class="headerlink" title="7.Spring事务什么时候会失效"></a>7.Spring事务什么时候会失效</h3><p>Spring事务原理是AOP进行了切面增强那么失效的根本原因是这个AOP不起作用了常见情况有如下几种</p>
<ol>
<li>发生自调用类里面使用this调用本类的方法此时这个this对象不是代理类而是UserService对象本身</li>
<li>方法不是public的,非要在非public上使用事务可以开启Aspectj代理模式</li>
<li>数据库不支持事务例如使用的MyISAM存储引擎</li>
<li>没有被spring管理</li>
<li>异常被吃掉事务不会回滚或者抛出的异常没有定义默认为RuntimeException</li>
</ol>
<h3 id="8-什么是bean的自动装配有哪些方式"><a href="#8-什么是bean的自动装配有哪些方式" class="headerlink" title="8.什么是bean的自动装配有哪些方式"></a>8.什么是bean的自动装配有哪些方式</h3><p>autowire属性有五种装配的方式</p>
<ul>
<li>no 缺省情况下自动配置是通过“ref”属性手动设定</li>
</ul>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--手动装配以value或ref的方式明确指定属性值都是手动装配。 需要通过ref属性来连接bean--&gt;</span></span><br></pre></td></tr></table></figure>
<ul>
<li>byName-根据bean的属性名称进行自动装配</li>
</ul>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--Cutomer的属性名称是personSpring会将bean id为person的bean通过setter方法进行自动装配--&gt;</span></span><br><span class="line">&lt; bean id=“cutomer” class=“com.xxx.xxx.Cutomer” autowire=“byName”/&gt;</span><br><span class="line">&lt; bean id=“person” class=“com.xxx.xxx.Person”/&gt;</span><br></pre></td></tr></table></figure>
<ul>
<li>byType-根据bean的类型进行自动装配</li>
</ul>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--Cutomer的属性person的类型为PersonSpirng会将Person类型通过setter方法进行自动装配--&gt;</span></span><br><span class="line">&lt; bean&gt; id=“cutomer” class=“com.xxx.xxx.Cutomer” autowire=“byType”/&gt;</span><br><span class="line">&lt; bean&gt; id=“person” class=“com.xxx.xxx.Person”/&gt;</span><br></pre></td></tr></table></figure>
<ul>
<li>constructor-类似byType不过是应用于构造器的参数。如果一个bean与构造器参数的类型形<br>同,则进行自动装配,否则导致异常</li>
</ul>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--Cutomer构造函数的参数person的类型为PersonSpirng会将Person类型通过构造方法进行自动装配--&gt;</span></span><br><span class="line">&lt; bean&gt; id=“cutomer” class=“com.xxx.xxx.Cutomer” autowire=“construtor”/&gt;</span><br><span class="line">&lt; bean&gt; id=“person” class=“com.xxx.xxx.Person”/&gt;</span><br></pre></td></tr></table></figure>
<ul>
<li>autodetect-如果有默认的构造器则通过constructor方式进行自动装配否则使用byType方式 进行自动装配</li>
</ul>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--如果有默认的构造器则通过constructor方式进行自动装配否则使用byType方式进行自动装配--&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="9-Spring-Boot、SpringMVC和Spring有什么区别"><a href="#9-Spring-Boot、SpringMVC和Spring有什么区别" class="headerlink" title="9.Spring Boot、SpringMVC和Spring有什么区别"></a>9.Spring Boot、SpringMVC和Spring有什么区别</h3><p><strong>Spring</strong>是一个IOC容器用来管理Bean,使用依赖注入实现控制反转可以很方便的整合各种框架提供AOP机制弥补OOP的代码重复问题更方便将不同方法中的共同处理抽取成切面自动注入给方法执行比如日志、异常等</p>
<p><strong>SpringMvc</strong>是spring对web框架的一个解决方案提供了一个总的前端控制器Servlet用来接受请求然后定义了一套路由策略url到handle的映射及适配执行handle将handle结果使用视图解析技术生成视图展现给前端</p>
<p><strong>SpringBoot</strong>是Spring提供的一个快速开发工具包让程序员更方便、更快速的开发spring + springmvc应用简化了配置约定了默认配置整合了一系列的解决方案starter机制,redis、mongodb、es可以开箱即用</p>
<h3 id="10-SpringMVC的工作流程"><a href="#10-SpringMVC的工作流程" class="headerlink" title="10.SpringMVC的工作流程"></a>10.SpringMVC的工作流程</h3><ol>
<li>用户发送请求到前端控制器DispatcherServlet</li>
<li>DispatcherServlet收到请求调用HandlerMapping处理器映射器</li>
<li>处理器映射器找到具体的处理器可以根据xml配置、注解进行查找,生成处理器及处理器拦截器如果有则生成一并返回给DispatcherServlet</li>
<li>DispatcherServlet调用HandlerAdapter处理器适配器</li>
<li>HandlerAdapter调用具体的处理器controller也叫后端控制器</li>
<li>Controller执行完成返回ModelAndView</li>
<li>HandlerAdapter将Controller执行结果ModelAndView返回给DispatcherServlet</li>
<li>DispatcherServlet将ModelAndView传给ViewReslover视图解析器</li>
<li>ViewReslover解析后返回具体view</li>
<li>DispatcherServlet根据view进行渲染视图即将模型数据填充到视图中</li>
<li>DispatcherServlet响应给用户</li>
</ol>
<p><img src="/pictures/image-20230911141826287.png" alt="image-20230911141826287"></p>
<h3 id="11-SpringMvc中的九大组件"><a href="#11-SpringMvc中的九大组件" class="headerlink" title="11.SpringMvc中的九大组件"></a>11.SpringMvc中的九大组件</h3><p>Handler是用来干活的工具HandlerMapping用于根据需要干的活找到相应的工具HandlerAdapter是使用工具干活的人</p>
<ol>
<li><p><strong>HandlerMapping</strong>是用来查找Handler的。在SpringMVC中会有很多请求每个请求都需要一个Handler处理具体接收到一个请求之后使用哪个Handler进行处理呢这就是HandlerMapping需要做的事。</p>
</li>
<li><p><strong>HandlerAdapter</strong>,从名字上看它就是一个适配器。因为SpringMVC中的Handler可以是任意的形式只要能处理请求就ok但是Servlet需要的处理方法的结构却是固定的都是以request和response为参数的方法。如何让固定的Servlet处理方法调用灵活的Handler来进行处理呢这就是HandlerAdapter要做的事情。</p>
</li>
<li><p><strong>HandlerExceptionResolver</strong>其它组件都是用来干活的。在干活的过程中难免会出现问题出问题后怎么办呢这就需要有一个专门的角色对异常情况进行处理在SpringMVC中就是HandlerExceptionResolver。具体来说此组件的作用是根据异常设置ModelAndView之后再交给render方法进行渲染。</p>
</li>
<li><p><strong>ViewResolverViewResolver</strong>用来将String类型的视图名和Locale解析为View类型的视图。View是用来渲染页面的也就是将程序返回的参数填入模板里生成html也可能是其它类型文件。这里就有两个关键问题使用哪个模板用什么技术规则填入参数这其实是ViewResolver主要要做的工作ViewResolver需要找到渲染所用的模板和所用的技术也就是视图的类型进行渲染具体的渲染过程则交由不同的视图自己完成。</p>
</li>
<li><p><strong>RequestToViewNameTranslatorViewName</strong>是根据ViewName查找View但有的Handler处理完后并没有设置View也没有设置ViewName这时就需要从request获取ViewName了如何从request中获取ViewName就是RequestToViewNameTranslator要做的事情了。RequestToViewNameTranslator在Spring MVC容器里只可以配置一个所以所有request到ViewName的转换规则都要在一个Translator里面全部实现。</p>
</li>
<li><p><strong>LocaleResolver</strong>解析视图需要两个参数一是视图名另一个是Locale。视图名是处理器返回的Locale是从哪里来的这就是LocaleResolver要做的事情。LocaleResolver用于从request解析出LocaleLocale就是zh-cn之类表示一个区域有了这个就可以对不同区域的用户显示不同的结果。SpringMVC主要有两个地方用到了Locale一是ViewResolver视图解析的时候二是用到国际化资源或者主题的时候。</p>
</li>
<li><p><strong>ThemeResolver</strong>用于解析主题。SpringMVC中一个主题对应一个properties文件里面存放着跟当前主题相关的所有资源、如图片、css样式等。SpringMVC的主题也支持国际化同一个主题不同区域也可以显示不同的风格。SpringMVC中跟主题相关的类有 ThemeResolver、ThemeSource和Theme。主题是通过一系列资源来具体体现的要得到一个主题的资源首先要得到资源的名称这是ThemeResolver的工作。然后通过主题名称找到对应的主题可以理解为一个配置文件这是ThemeSource的工作。最后从主题中获取资源就可以了。</p>
</li>
<li><p><strong>MultipartResolver</strong>用于处理上传请求。处理方法是将普通的request包装成MultipartHttpServletRequest后者可以直接调用getFile方法获取File如果上传多个文件还可以调用getFileMap得到FileName-&gt;File结构的Map。此组件中一共有三个方法作用分别是判断是不是上传请求将request包装成MultipartHttpServletRequest、处理完后清理上传过程中产生的临时资源。</p>
</li>
<li><p><strong>FlashMapManager</strong>用来管理FlashMap的FlashMap主要用在redirect中传递参数。</p>
</li>
</ol>
<h3 id="12-SpringBoot自动配置原理简答的阐述见下面15条"><a href="#12-SpringBoot自动配置原理简答的阐述见下面15条" class="headerlink" title="12.SpringBoot自动配置原理简答的阐述见下面15条"></a>12.SpringBoot自动配置原理简答的阐述见下面15条</h3><p>自动装配简单来说就是自动把第三方组件的Bean装载到Spring IOC器里面不需要开发人员再去写Bean的装配配置。</p>
<p>在Spring Boot应用里面只需要在启动类加上@SpringBootApplication注解就可以实现自动装配。@SpringBootApplication是一个复合注解真正实现自动装配的注解是@EnableAutoConfiguration。</p>
<p><img src="/pictures/image-20230911195638524.png" alt="image-20230911195638524"></p>
<h3 id="13-MyBatis的优缺点"><a href="#13-MyBatis的优缺点" class="headerlink" title="13.MyBatis的优缺点"></a>13.MyBatis的优缺点</h3><p><strong>优点:</strong></p>
<ol>
<li>基于SQL语句编程相当灵活不会对应用程序或者数据库的现有设计造成任何影响SQL写在XML里解除sql与程序代码的耦合便于统一管理提供XML标签支持编写动态SQL语句并可重用</li>
<li>与JDBC相比减少了50%以上的代码量消除了JDBC大量冗余的代码不需要手动开关连接</li>
<li>很好的与各种数据库兼容因为MyBatis使用JDBC来连接数据库所以只要JDBC支持的数据库MyBatis都支持)</li>
<li>能够与Spring很好的集成</li>
<li>提供映射标签支持对象与数据库的ORM字段关系映射提供对象关系映射标签支持对象关系组件维护</li>
</ol>
<p><strong>缺点:</strong></p>
<p>1.<br> SQL语句的编写工作量较大尤其当字段多、关联表多时对开发人员编写SQL语句的功底有一定要求<br>2. SQL语句依赖于数据库导致数据库移植性差不能随意更换数据库</p>
<h3 id="14-MyBatis中-和-的区别是什么?"><a href="#14-MyBatis中-和-的区别是什么?" class="headerlink" title="14.MyBatis中#{}和${}的区别是什么?"></a>14.MyBatis中#{}和${}的区别是什么?</h3><ol>
<li>功能不同:${} 是直接替换,而 #{} 是预处理</li>
<li>使用场景不同:普通参数使用 #{},如果传递的是 SQL 命令或 SQL 关键字,需要使用 ${},但在使用前一定要做好安全验证</li>
<li>安全性不同:使用 ${} 存在安全问题SQL注入而 #{} 则不存在安全问题</li>
</ol>
<h3 id="15-Spring-Boot自动装配的过程"><a href="#15-Spring-Boot自动装配的过程" class="headerlink" title="15.Spring Boot自动装配的过程"></a>15.Spring Boot自动装配的过程</h3><p><img src="/pictures/image-20230921145126572.png" alt="image-20230921145126572"></p>
<p><strong>整个自动装配的过程是</strong>Spring Boot通过@EnableAutoConfiguration注解开启自动配置加载spring.factories中注册的各AutoConfiguration类当某个AutoConfiguration类满足其注解@Conditional指定的生效条件Starters提供的依赖、配置或Spring容器中是否存在某个Bean等实例化该AutoConfiguration类中定义的Bean组件等并注入Spring容器就可以完成依赖框架的自动配置。</p>
<h2 id="二-Mysql相关面试题"><a href="#二-Mysql相关面试题" class="headerlink" title="二.Mysql相关面试题"></a>二.Mysql相关面试题</h2><h3 id="1-存储引擎InnoDB-与MyISAM-的区别"><a href="#1-存储引擎InnoDB-与MyISAM-的区别" class="headerlink" title="1.存储引擎InnoDB 与MyISAM 的区别"></a>1.存储引擎InnoDB 与MyISAM 的区别</h3><ol>
<li>数据存储的方式不同MyISAM中的数据和索引是分开存储的而InnoDB是把索引和数据存储在同一个文件里面</li>
<li>对于事务的支持不同MyISAM不支持事务而InnoDB支持ACID特性的事务处理</li>
<li>对于锁的支持不同MyISAM只支持表锁而InnoDB可以根据不同的情况支持行锁表锁间隙锁临键锁</li>
<li>MyISAM不支持外键InnoDB支持外键因此基于这些特性我们在实际应用中可以根据不同的场景来选择合适的存储引擎</li>
<li>比如如果需要支持事务那必须要选择InnoDB。如果大部分的表操作都是查询可以选择MyISAM</li>
</ol>
<h3 id="2-索引的基本原理"><a href="#2-索引的基本原理" class="headerlink" title="2.索引的基本原理"></a>2.索引的基本原理</h3><p>原理:把无序的数据变成有序的查询</p>
<ol>
<li>把创建了索引的列的内容进行排序</li>
<li>对排序结果生成倒排表</li>
<li>在倒排表内容上拼上数据地址链</li>
<li>在查询的时候,先拿到倒排表的内容,再取出数据地址链,从而拿到数据</li>
</ol>
<h3 id="3-索引失效的场景"><a href="#3-索引失效的场景" class="headerlink" title="3.索引失效的场景"></a>3.索引失效的场景</h3><ol>
<li>索引在使用的时候没有遵循最左匹配法则.</li>
<li>模糊查询,如果%号在前面也会导致索引失效。</li>
<li>在添加索引的字段上进行了运算操作或者类型转换也都会导致索引失效。</li>
<li>如果使用了复合索引,中间使用了范围查询,右边的条件索引也会失效</li>
<li>查询的时候发生了类型转换,在查询的时候做了运算的操作和模糊查询也会导致索引失效</li>
</ol>
<h3 id="4-事务的隔离级别有哪些MySQL-的默认隔离级别是什么?"><a href="#4-事务的隔离级别有哪些MySQL-的默认隔离级别是什么?" class="headerlink" title="4.事务的隔离级别有哪些MySQL 的默认隔离级别是什么?"></a>4.事务的隔离级别有哪些MySQL 的默认隔离级别是什么?</h3><p>读未提交Read Uncommitted可能读到其他事务未提交的数据也叫做脏读<br>读已提交Read Committed两次读取结果不一致叫做不可重复读<br>可重复读Repeatable Read是mysql默认的隔离级别每次读取的结果都一样当时可能产生幻读<br>串行化Serializable一般是不会使用的他给每一行读取的数据加锁会导致大量超时和锁竞争的问题<br>Mysql 默认的事务隔离级别是可重复读(Repeatable Read)</p>
<h3 id="5-事务的基本特性"><a href="#5-事务的基本特性" class="headerlink" title="5.事务的基本特性"></a>5.事务的基本特性</h3><p>事务的基本特性ACID分别是</p>
<ol>
<li>A 原子性:一个事务的操作要么全部成功,要么全部失败</li>
<li>C 一致性:数据库从一个一致性的状态转换到另一个一致性的状态</li>
<li>I 隔离性:一个事务的修改在最终提交前,对其他事务是不可见的</li>
<li>D 持久性 一旦事务提交,所做的修改就会永远的保存到数据库中</li>
</ol>
<h3 id="6-怎么处理慢查询"><a href="#6-怎么处理慢查询" class="headerlink" title="6.怎么处理慢查询"></a>6.怎么处理慢查询</h3><p>SQL查询慢的原因</p>
<ol>
<li>查询没有命中索引</li>
<li>查询了不需要的数据列</li>
<li>数据量太大</li>
</ol>
<p>根据上面的原因给出优化的措施</p>
<ol>
<li>分析语句的执行计划,然后获得其使用索引的情况,然后修改语句或者索引,使得语句可以尽可能的命中索引</li>
<li>分析语句,是否查询了不需要的数据列</li>
<li>如果对语句的优化已经无法进行,可以考虑表中的数据量是否太大,如果是的话可以进行横向或者纵向的分表</li>
</ol>
<h3 id="7-ACID靠什么保证的"><a href="#7-ACID靠什么保证的" class="headerlink" title="7.ACID靠什么保证的"></a>7.ACID靠什么保证的</h3><p>A 原子性由<strong>undo log日志</strong>保证它记录了需要回滚的日志信息事务回滚时撤销已经执行成功的sql</p>
<p>C 一致性由其他的三大特性保证 程序代码要保证业务上的一致性</p>
<p>I 隔离性由<strong>MVCC</strong>来保证</p>
<p>D 持久性由<strong>内存 + redo log</strong> 来保证。Mysql修改数据同时在内存和redo log记录这次操作宕机的时候可以从redo log恢复</p>
<h2 id="三-Redis相关面试题"><a href="#三-Redis相关面试题" class="headerlink" title="三.Redis相关面试题"></a>三.Redis相关面试题</h2><h3 id="1-Redis过期键的删除策略"><a href="#1-Redis过期键的删除策略" class="headerlink" title="1.Redis过期键的删除策略"></a>1.Redis过期键的删除策略</h3><p>redis是key-value数据库我们可以设置redis中缓存的key的过期时间。redis的过期策略就是指当redis中缓存的key过期了redis该如何处理。</p>
<ul>
<li><strong>惰性过期</strong>只有当访问一个key时才会判断该key是否已过期过期则删除。该策略可以最大化地节省CU资源但是对内存非常的不友好。极端地情况可能出现大量地过期key没有再次被访问从而不被清除占用大量内存。</li>
<li>**定期过期:**每隔一定地时间会扫描一定数量地数据库地expires字典中一定数量地key并清除其中已过期的key。该策略是前两者的一个折中方案。通过定时扫描的时间间隔和每次扫描的限定功耗可以在不同情况下使得CPU和内存资源达到最优的平衡效果。</li>
</ul>
<p>在Redis中同时使用了这两种策略</p>
<h3 id="2-Redis的线程模型单线程为什么快"><a href="#2-Redis的线程模型单线程为什么快" class="headerlink" title="2.Redis的线程模型单线程为什么快"></a>2.Redis的线程模型单线程为什么快</h3><p>IO多路复用机制监听多个Socket</p>
<p><strong>单线程快的原因:</strong></p>
<ol>
<li>纯内存操作</li>
<li>核心是基于非阻塞的IO多路复用机制</li>
<li>单线程反而避免了多线程的频繁上下文切换带来的性能问题</li>
</ol>
<h3 id="3-缓存雪崩、缓存穿透、缓存击穿"><a href="#3-缓存雪崩、缓存穿透、缓存击穿" class="headerlink" title="3.缓存雪崩、缓存穿透、缓存击穿"></a>3.缓存雪崩、缓存穿透、缓存击穿</h3><p><strong>缓存雪崩</strong> 缓存在同一时间大面积失效,所以,后面的请求都会落在数据库上,造成数据库短时间内承受大量请求而崩掉。</p>
<p>解决方案:</p>
<ol>
<li>缓存数据的过期时间设置随机,防止同一时间大量数据过期现象发生</li>
<li>给每一个缓存数据增加响应的缓存标记,记录缓存是否失效,如果缓存标记失效,则更新数据缓存</li>
<li>缓存预热,启动系统之前先把热点数据放在缓存中去</li>
<li>互斥锁</li>
</ol>
<p><strong>缓存穿透</strong> 缓存和数据库中都没有数据,导致所有的请求都落在数据库上,造成数据库短时间内承受大量请求</p>
<p>解决方案:</p>
<ol>
<li>接口层增加校验如用户鉴权校验id做基础校验id&lt;&#x3D;0的直接拦截掉</li>
<li>从缓存取不到数据在数据库中也没有取到这时也可以将key-value对写为key-null缓存有效时间可以设置短一些如30秒设置太长会导致正常的情况也没法使用。这样可以防止攻击用户反复用同一个id暴力攻击</li>
<li>采用布隆过滤器将所有可能存在的数据哈希到一个足够大的bitmap中一个一定不存在的数据会被这个bitmap拦截掉从而避免了对底层存储系统的查询压力</li>
</ol>
<p><strong>缓存击穿</strong> 缓存中没有但数据库中有的数据(一般是缓存时间到期),这时由于并发用户特别多,同时读缓存没有读到数据,又同时去数据库取数据,引起数据库压力瞬间增大,造成过大压力。和缓存雪崩不同的是,缓存击穿指并发查同一条数据,缓存雪崩是不同数据都过期了,很多数据都查不到从而查数据库。</p>
<p>解决方案:</p>
<ol>
<li>设置热点数据永不过期</li>
<li>加互斥锁</li>
</ol>
<h3 id="4-Redis的数据结构"><a href="#4-Redis的数据结构" class="headerlink" title="4.Redis的数据结构"></a>4.Redis的数据结构</h3><p>Redis支持五种数据类型string字符串hash哈希list列表set无序集合及zset(有序集合)</p>
<p><img src="/pictures/image-20230914154911197.png" alt="image-20230914154911197"></p>
<p><strong>PDF</strong></p>
<div class="row">
<embed src="/pdf/2023最新Java面试题全集.pdf" width="100%" height="550" type="application/pdf">
</div>
]]></content>
<categories>
<category>面试</category>
</categories>
<tags>
<tag>面试</tag>
</tags>
</entry>
<entry>
<title>验证码服务</title>
<url>/posts/11844.html</url>
<content><![CDATA[<h2 id="1-使用邮件发送验证码"><a href="#1-使用邮件发送验证码" class="headerlink" title="1.使用邮件发送验证码"></a>1.使用邮件发送验证码</h2><h3 id="1-1-引入依赖"><a href="#1-1-引入依赖" class="headerlink" title="1.1 引入依赖"></a>1.1 引入依赖</h3><p>坑点:有时候遇到验证码发不出去的情况,要调整依赖的版本,更新为高版本的依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--javaMail--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependencies</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>javax.mail<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>javax.mail-api<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>1.5.6<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.sun.mail<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>javax.mail<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>1.5.3<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependencies</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="1-2-导入发送验证码的工具类"><a href="#1-2-导入发送验证码的工具类" class="headerlink" title="1.2 导入发送验证码的工具类"></a>1.2 导入发送验证码的工具类</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//读取配置文件中的值</span></span><br><span class="line"><span class="comment">//静态属性只会加载一次 我们要在第一次加载的时候给静态属性赋上值</span></span><br><span class="line"><span class="comment">//还要其他的方法 比如使用@Value注解 </span></span><br><span class="line"><span class="keyword">static</span> &#123; <span class="comment">//读取配置文件中的关于邮件的配置</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">FileInputStream</span> <span class="variable">fileInputStream</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">FileInputStream</span>(<span class="string">&quot;src/main/resources/application.properties&quot;</span>);</span><br><span class="line"> <span class="type">Properties</span> <span class="variable">properties</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Properties</span>();</span><br><span class="line"> properties.load(fileInputStream);</span><br><span class="line"> user = properties.getProperty(<span class="string">&quot;guli.user&quot;</span>);</span><br><span class="line"> password = properties.getProperty(<span class="string">&quot;guli.password&quot;</span>);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (IOException e) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(e);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Value;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Component;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.annotation.PostConstruct;</span><br><span class="line"><span class="keyword">import</span> javax.mail.*;</span><br><span class="line"><span class="keyword">import</span> javax.mail.internet.InternetAddress;</span><br><span class="line"><span class="keyword">import</span> javax.mail.internet.MimeMessage;</span><br><span class="line"><span class="keyword">import</span> java.util.Properties;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 发邮件工具类</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MailUtils</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="type">String</span> <span class="variable">USER</span> <span class="operator">=</span> <span class="string">&quot;xxxxxxxx&quot;</span>; <span class="comment">// 发件人称号,同邮箱地址</span></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="type">String</span> <span class="variable">PASSWORD</span> <span class="operator">=</span> <span class="string">&quot;xxxxxxxx&quot;</span>; <span class="comment">// 授权码开启SMTP时显示</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> to 收件人邮箱</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> text 邮件正文</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> title 标题</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="comment">/* 发送验证信息的邮件 */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">boolean</span> <span class="title function_">sendMail</span><span class="params">(String to, String text, String title)</span> &#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="keyword">final</span> <span class="type">Properties</span> <span class="variable">props</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Properties</span>();</span><br><span class="line"> props.put(<span class="string">&quot;mail.smtp.auth&quot;</span>, <span class="string">&quot;true&quot;</span>);</span><br><span class="line"> <span class="comment">//注意发送邮件的方法中发送给谁的发送给对应的app※</span></span><br><span class="line"> <span class="comment">//要改成对应的app。扣扣的改成qq的网易的要改成网易的。※</span></span><br><span class="line"> <span class="comment">//props.put(&quot;mail.smtp.host&quot;, &quot;smtp.qq.com&quot;);</span></span><br><span class="line"> props.put(<span class="string">&quot;mail.smtp.host&quot;</span>, <span class="string">&quot;smtp.qq.com&quot;</span>);</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 发件人的账号</span></span><br><span class="line"> props.put(<span class="string">&quot;mail.user&quot;</span>, USER);</span><br><span class="line"> <span class="comment">//发件人的密码</span></span><br><span class="line"> props.put(<span class="string">&quot;mail.password&quot;</span>, PASSWORD);</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 构建授权信息用于进行SMTP进行身份验证</span></span><br><span class="line"> <span class="type">Authenticator</span> <span class="variable">authenticator</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Authenticator</span>() &#123;</span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">protected</span> PasswordAuthentication <span class="title function_">getPasswordAuthentication</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">// 用户名、密码</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">userName</span> <span class="operator">=</span> props.getProperty(<span class="string">&quot;mail.user&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">password</span> <span class="operator">=</span> props.getProperty(<span class="string">&quot;mail.password&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">PasswordAuthentication</span>(userName, password);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;;</span><br><span class="line"> <span class="comment">// 使用环境属性和授权信息,创建邮件会话</span></span><br><span class="line"> <span class="type">Session</span> <span class="variable">mailSession</span> <span class="operator">=</span> Session.getInstance(props, authenticator);</span><br><span class="line"> <span class="comment">// 创建邮件消息</span></span><br><span class="line"> <span class="type">MimeMessage</span> <span class="variable">message</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">MimeMessage</span>(mailSession);</span><br><span class="line"> <span class="comment">// 设置发件人</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">username</span> <span class="operator">=</span> props.getProperty(<span class="string">&quot;mail.user&quot;</span>);</span><br><span class="line"> <span class="type">InternetAddress</span> <span class="variable">form</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">InternetAddress</span>(username);</span><br><span class="line"> message.setFrom(form);</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 设置收件人</span></span><br><span class="line"> <span class="type">InternetAddress</span> <span class="variable">toAddress</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">InternetAddress</span>(to);</span><br><span class="line"> message.setRecipient(Message.RecipientType.TO, toAddress);</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 设置邮件标题</span></span><br><span class="line"> message.setSubject(title);</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 设置邮件的内容体</span></span><br><span class="line"> message.setContent(text, <span class="string">&quot;text/html;charset=UTF-8&quot;</span>);</span><br><span class="line"> <span class="comment">// 发送邮件</span></span><br><span class="line"> Transport.send(message);</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="1-3-导入随机生成验证码的工具类"><a href="#1-3-导入随机生成验证码的工具类" class="headerlink" title="1.3 导入随机生成验证码的工具类"></a>1.3 导入随机生成验证码的工具类</h3><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> java.util.Random;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 随机生成验证码工具类</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ValidateCodeUtils</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 随机生成验证码</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> length 长度为4位或者6位</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> Integer <span class="title function_">generateValidateCode</span><span class="params">(<span class="type">int</span> length)</span> &#123;</span><br><span class="line"> <span class="type">Integer</span> <span class="variable">code</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="keyword">if</span> (length == <span class="number">4</span>) &#123;</span><br><span class="line"> code = <span class="keyword">new</span> <span class="title class_">Random</span>().nextInt(<span class="number">9999</span>);<span class="comment">//生成随机数最大为9999</span></span><br><span class="line"> <span class="keyword">if</span> (code &lt; <span class="number">1000</span>) &#123;</span><br><span class="line"> code = code + <span class="number">1000</span>;<span class="comment">//保证随机数为4位数字</span></span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (length == <span class="number">6</span>) &#123;</span><br><span class="line"> code = <span class="keyword">new</span> <span class="title class_">Random</span>().nextInt(<span class="number">999999</span>);<span class="comment">//生成随机数最大为999999</span></span><br><span class="line"> <span class="keyword">if</span> (code &lt; <span class="number">100000</span>) &#123;</span><br><span class="line"> code = code + <span class="number">100000</span>;<span class="comment">//保证随机数为6位数字</span></span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;只能生成4位或6位数字验证码&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> code;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 随机生成指定长度字符串验证码</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> length 长度</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">generateValidateCode4String</span><span class="params">(<span class="type">int</span> length)</span> &#123;</span><br><span class="line"> <span class="type">Random</span> <span class="variable">rdm</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Random</span>();</span><br><span class="line"> <span class="type">String</span> <span class="variable">hash1</span> <span class="operator">=</span> Integer.toHexString(rdm.nextInt());</span><br><span class="line"> <span class="type">String</span> <span class="variable">capstr</span> <span class="operator">=</span> hash1.substring(<span class="number">0</span>, length);</span><br><span class="line"> <span class="keyword">return</span> capstr;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="1-4-测试使用"><a href="#1-4-测试使用" class="headerlink" title="1.4 测试使用"></a>1.4 测试使用</h3><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">1.设置发送邮件的账号和授权码信息</span><br><span class="line">2.编写测试类测试邮件是否可以正常的发送</span><br><span class="line">3.添加到业务代码中,实现验证码的发送功能</span><br></pre></td></tr></table></figure>
<h2 id="2-使用阿里云的短信服务"><a href="#2-使用阿里云的短信服务" class="headerlink" title="2.使用阿里云的短信服务"></a>2.使用阿里云的短信服务</h2><p>阿里云的短信服务不面向个人用户,无法使用,但是使用的基本逻辑和使用邮箱类似</p>
<h2 id="3-Token字符串生成的工具类-JWT"><a href="#3-Token字符串生成的工具类-JWT" class="headerlink" title="3.Token字符串生成的工具类(JWT)"></a>3.Token字符串生成的工具类(JWT)</h2><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.commonutils;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> io.jsonwebtoken.Claims;</span><br><span class="line"><span class="keyword">import</span> io.jsonwebtoken.Jws;</span><br><span class="line"><span class="keyword">import</span> io.jsonwebtoken.Jwts;</span><br><span class="line"><span class="keyword">import</span> io.jsonwebtoken.SignatureAlgorithm;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.server.reactive.ServerHttpRequest;</span><br><span class="line"><span class="keyword">import</span> org.springframework.util.StringUtils;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletRequest;</span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> helen</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@since</span> 2019/10/16</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">JwtUtils</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 设置token的过期时间</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">long</span> <span class="variable">EXPIRE</span> <span class="operator">=</span> <span class="number">1000</span> * <span class="number">60</span> * <span class="number">60</span> * <span class="number">24</span>;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 密钥</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">String</span> <span class="variable">APP_SECRET</span> <span class="operator">=</span> <span class="string">&quot;ukc8BDbRigUDaY6pZFfWus2jZWLPHO&quot;</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 生成token字符串</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">getJwtToken</span><span class="params">(String id, String nickname)</span>&#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">String</span> <span class="variable">JwtToken</span> <span class="operator">=</span> Jwts.builder()</span><br><span class="line"> .setHeaderParam(<span class="string">&quot;typ&quot;</span>, <span class="string">&quot;JWT&quot;</span>)</span><br><span class="line"> .setHeaderParam(<span class="string">&quot;alg&quot;</span>, <span class="string">&quot;HS256&quot;</span>)</span><br><span class="line"> .setSubject(<span class="string">&quot;guli-user&quot;</span>)</span><br><span class="line"> .setIssuedAt(<span class="keyword">new</span> <span class="title class_">Date</span>())</span><br><span class="line"> .setExpiration(<span class="keyword">new</span> <span class="title class_">Date</span>(System.currentTimeMillis() + EXPIRE))</span><br><span class="line"> .claim(<span class="string">&quot;id&quot;</span>, id)</span><br><span class="line"> .claim(<span class="string">&quot;nickname&quot;</span>, nickname)</span><br><span class="line"> .signWith(SignatureAlgorithm.HS256, APP_SECRET)</span><br><span class="line"> .compact();</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> JwtToken;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断token是否存在与有效</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">boolean</span> <span class="title function_">checkToken</span><span class="params">(String jwtToken)</span> &#123;</span><br><span class="line"> <span class="keyword">if</span>(StringUtils.isEmpty(jwtToken)) <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> Jwts.parser().setSigningKey(APP_SECRET).parseClaimsJws(jwtToken);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断token是否存在与有效</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="type">boolean</span> <span class="title function_">checkToken</span><span class="params">(HttpServletRequest request)</span> &#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">jwtToken</span> <span class="operator">=</span> request.getHeader(<span class="string">&quot;token&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span>(StringUtils.isEmpty(jwtToken)) <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> Jwts.parser().setSigningKey(APP_SECRET).parseClaimsJws(jwtToken);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 根据token获取会员id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> String <span class="title function_">getMemberIdByJwtToken</span><span class="params">(HttpServletRequest request)</span> &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">jwtToken</span> <span class="operator">=</span> request.getHeader(<span class="string">&quot;token&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span>(StringUtils.isEmpty(jwtToken)) <span class="keyword">return</span> <span class="string">&quot;&quot;</span>;</span><br><span class="line"> Jws&lt;Claims&gt; claimsJws = Jwts.parser().setSigningKey(APP_SECRET).parseClaimsJws(jwtToken);</span><br><span class="line"> <span class="type">Claims</span> <span class="variable">claims</span> <span class="operator">=</span> claimsJws.getBody();</span><br><span class="line"> <span class="keyword">return</span> (String)claims.get(<span class="string">&quot;id&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>Java</tag>
</tags>
</entry>
<entry>
<title>面试专题</title>
<url>/posts/46317.html</url>
<content><![CDATA[<p><strong>参考资料:</strong></p>
<p>java八股文面试全套真题+深度详解(含大厂高频面试真题) <a href="https://www.bilibili.com/video/BV1yT411H7YK/?share_source=copy_web&vd_source=aee5e475191b69e6c781059ab6662584">https://www.bilibili.com/video/BV1yT411H7YK/?share_source=copy_web&amp;vd_source=aee5e475191b69e6c781059ab6662584</a></p>
<h2 id="1-Redis篇"><a href="#1-Redis篇" class="headerlink" title="1.Redis篇"></a>1.Redis篇</h2><blockquote>
<p><strong>面试官</strong>:什么是缓存穿透 ? 怎么解决 ?</p>
<p><strong>候选人</strong></p>
<p>嗯~~,我想一下</p>
<p>缓存穿透是指查询一个一定<strong>不存在</strong>的数据,如果从存储层查不到数据则不写入缓存,这将导致这个不存在的数据每次请求都要到 DB 去查询,可能导致 DB 挂掉。这种情况大概率是遭到了攻击。</p>
<p>解决方案的话,我们通常都会用布隆过滤器来解决它</p>
<p><strong>面试官</strong>:好的,你能介绍一下布隆过滤器吗?</p>
<p><strong>候选人</strong></p>
<p>嗯,是这样~</p>
<p>布隆过滤器主要是用于检索一个元素是否在一个集合中。我们当时使用的是redisson实现的布隆过滤器。</p>
<p>它的底层主要是先去初始化一个比较大数组里面存放的二进制0或1。在一开始都是0当一个key来了之后经过3次hash计算模于数组长度找到数据的下标然后把数组中原来的0改为1这样的话三个数组的位置就能标明一个key的存在。查找的过程也是一样的。</p>
<p>当然是有缺点的布隆过滤器有可能会产生一定的误判我们一般可以设置这个误判率大概不会超过5%其实这个误判是必然存在的要不就得增加数组的长度其实已经算是很划分了5%以内的误判率一般的项目也能接受,不至于高并发下压倒数据库。</p>
<p><strong>面试官</strong>:什么是缓存击穿 ? 怎么解决 ?</p>
<p><strong>候选人</strong></p>
<p>嗯!!</p>
<p>缓存击穿的意思是对于设置了过期时间的key缓存在某个时间点过期的时候恰好这时间点对这个Key有大量的并发请求过来这些请求发现缓存过期一般都会从后端 DB 加载数据并回设到缓存,这个时候大并发的请求可能会瞬间把 DB 压垮。</p>
<p>解决方案有两种方式:</p>
<p>第一可以使用互斥锁当缓存失效时不立即去load db先使用如 Redis 的 setnx 去设置一个互斥锁,当操作成功返回时再进行 load db的操作并回设缓存否则重试get缓存的方法</p>
<p>第二种方案可以设置当前key逻辑过期大概是思路如下</p>
<p>①在设置key的时候设置一个过期时间字段一块存入缓存中不给当前key设置过期时间</p>
<p>②当查询的时候从redis取出数据后判断时间是否过期</p>
<p>③:如果过期则开通另外一个线程进行数据同步,当前线程正常返回数据,这个数据不是最新</p>
<p>当然两种方案各有利弊:&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</p>
<p>如果选择数据的强一致性,建议使用分布式锁的方案,性能上可能没那么高,锁需要等,也有可能产生死锁的问题</p>
<p>如果选择key的逻辑删除则优先考虑的高可用性性能比较高但是数据同步这块做不到强一致。</p>
<p><strong>面试官</strong>:什么是缓存雪崩 ? 怎么解决 ?</p>
<p><strong>候选人</strong></p>
<p>嗯!!</p>
<p>缓存雪崩意思是设置缓存时采用了相同的过期时间导致缓存在某一时刻同时失效请求全部转发到DBDB 瞬时压力过重雪崩。与缓存击穿的区别雪崩是很多key击穿是某一个key缓存。</p>
<p>解决方案主要是可以将缓存失效时间分散开比如可以在原有的失效时间基础上增加一个随机值比如1-5分钟随机这样每一个缓存的过期时间的重复率就会降低就很难引发集体失效的事件。</p>
<p><strong>面试官</strong>redis做为缓存mysql的数据如何与redis进行同步呢双写一致性</p>
<p><strong>候选人</strong>就说我最近做的这个项目里面有xxxx<strong>根据自己的简历上写</strong>的功能需要让数据库与redis高度保持一致因为要求时效性比较高我们当时采用的读写锁保证的强一致性。</p>
<p>我们采用的是redisson实现的读写锁在读的时候添加共享锁可以保证读读不互斥读写互斥。当我们更新数据的时候添加排他锁它是读写读读都互斥这样就能保证在写数据的同时是不会让其他线程读数据的避免了脏数据。这里面需要注意的是读方法和写方法上需要使用同一把锁才行。</p>
<p><strong>面试官</strong>:那这个排他锁是如何保证读写、读读互斥的呢?</p>
<p><strong>候选人</strong>其实排他锁底层使用也是setnx保证了同时只能有一个线程操作锁住的方法</p>
<p><strong>面试官</strong>:你听说过延时双删吗?为什么不用它呢?</p>
<p><strong>候选人</strong>:延迟双删,如果是写操作,我们先把缓存中的数据删除,然后更新数据库,最后再延时删除缓存中的数据,其中这个延时多久不太好确定,在延时的过程中可能会出现脏数据,并不能保证强一致性,所以没有采用它。</p>
<p><strong>面试官</strong>redis做为缓存mysql的数据如何与redis进行同步呢双写一致性</p>
<p><strong>候选人</strong>就说我最近做的这个项目里面有xxxx<strong>根据自己的简历上写</strong>)的功能,数据同步可以有一定的延时(符合大部分业务)</p>
<p>我们当时采用的阿里的canal组件实现数据同步不需要更改业务代码部署一个canal服务。canal服务把自己伪装成mysql的一个从节点当mysql数据更新以后canal会读取binlog数据然后在通过canal的客户端获取到数据更新缓存即可。</p>
<p><strong>面试官</strong>redis做为缓存数据的持久化是怎么做的</p>
<p><strong>候选人</strong>在Redis中提供了两种数据持久化的方式1、RDB 2、AOF</p>
<p><strong>面试官</strong>:这两种持久化方式有什么区别呢?</p>
<p><strong>候选人</strong>RDB是一个快照文件它是把redis内存存储的数据写到磁盘上当redis实例宕机恢复数据的时候方便从RDB的快照文件中恢复数据。</p>
<p>AOF的含义是追加文件当redis操作写命令的时候都会存储这个文件中当redis实例宕机恢复数据的时候会从这个文件中再次执行一遍命令来恢复数据</p>
<p><strong>面试官</strong>:这两种方式,哪种恢复的比较快呢?</p>
<p><strong>候选人</strong>RDB因为是二进制文件在保存的时候体积也是比较小的它恢复的比较快但是它有可能会丢数据我们通常在项目中也会使用AOF来恢复数据虽然AOF恢复的速度慢一些但是它丢数据的风险要小很多在AOF文件中可以设置刷盘策略我们当时设置的就是每秒批量写入一次命令</p>
<p><strong>面试官</strong>Redis的数据过期策略有哪些 ?</p>
<p><strong>候选人</strong></p>
<p>嗯~在redis中提供了两种数据过期删除策略</p>
<p>第一种是惰性删除在设置该key过期时间后我们不去管它当需要该key时我们在检查其是否过期如果过期我们就删掉它反之返回该key。</p>
<p>第二种是 定期删除就是说每隔一段时间我们就对一些key进行检查删除里面过期的key</p>
<p>定期清理的两种模式:</p>
<ul>
<li>SLOW模式是定时任务执行频率默认为10hz每次不超过25ms以通过修改配置文件redis.conf 的 <strong>hz</strong> 选项来调整这个次数</li>
<li>FAST模式执行频率不固定每次事件循环会尝试执行但两次间隔不低于2ms每次耗时不超过1ms</li>
</ul>
<p>Redis的过期删除策略<strong>惰性删除 + 定期删除</strong>两种策略进行配合使用。</p>
<p><strong>面试官</strong>Redis的数据淘汰策略有哪些 ?</p>
<p><strong>候选人</strong></p>
<p>嗯这个在redis中提供了很多种默认是noeviction不删除任何数据内部不足直接报错</p>
<p>是可以在redis的配置文件中进行设置的里面有两个非常重要的概念一个是LRU另外一个是LFU</p>
<p>LRU的意思就是最少最近使用用当前时间减去最后一次访问时间这个值越大则淘汰优先级越高。</p>
<p>LFU的意思是最少频率使用。会统计每个key的访问频率值越小淘汰优先级越高</p>
<p>我们在项目设置的allkeys-lru挑选最近最少使用的数据淘汰把一些经常访问的key留在redis中</p>
<p><strong>面试官</strong>数据库有1000万数据 ,Redis只能缓存20w数据, 如何保证Redis中的数据都是热点数据 ?</p>
<p><strong>候选人</strong></p>
<p>嗯,我想一下~~</p>
<p>可以使用 allkeys-lru (挑选最近最少使用的数据淘汰)淘汰策略,那留下来的都是经常访问的热点数据</p>
<p><strong>面试官</strong>Redis的内存用完了会发生什么</p>
<p><strong>候选人</strong></p>
<p>嗯~这个要看redis的数据淘汰策略是什么如果是默认的配置redis内存用完以后则直接报错。我们当时设置的 allkeys-lru 策略。把最近最常访问的数据留在缓存中。</p>
<p><strong>面试官</strong>Redis分布式锁如何实现 ?</p>
<p><strong>候选人</strong>在redis中提供了一个命令setnx(SET if not exists)</p>
<p>由于redis的单线程的用了命令之后只能有一个客户端对某一个key设置值在没有过期或删除key的时候是其他客户端是不能设置这个key的</p>
<p><strong>面试官</strong>好的那你如何控制Redis实现分布式锁有效时长呢</p>
<p><strong>候选人</strong>的确redis的setnx指令不好控制这个问题我们当时采用的redis的一个框架redisson实现的。</p>
<p>在redisson中需要手动加锁并且可以控制锁的失效时间和等待时间当锁住的一个业务还没有执行完成的时候在redisson中引入了一个看门狗机制就是说每隔一段时间就检查当前业务是否还持有锁如果持有就增加加锁的持有时间当业务执行完成之后需要使用释放锁就可以了</p>
<p>还有一个好处就是在高并发下一个业务有可能会执行很快先客户1持有锁的时候客户2来了以后并不会马上拒绝它会自旋不断尝试获取锁如果客户1释放之后客户2就可以马上持有锁性能也得到了提升。</p>
<p><strong>面试官</strong>好的redisson实现的分布式锁是可重入的吗</p>
<p><strong>候选人</strong>是可以重入的。这样做是为了避免死锁的产生。这个重入其实在内部就是判断是否是当前线程持有的锁如果是当前线程持有的锁就会计数如果释放锁就会在计算上减一。在存储数据的时候采用的hash结构大key可以按照自己的业务进行定制其中小key是当前线程的唯一标识value是当前线程重入的次数</p>
<p><strong>面试官</strong>redisson实现的分布式锁能解决主从一致性的问题吗</p>
<p><strong>候选人</strong>这个是不能的比如当线程1加锁成功后master节点数据会异步复制到slave节点此时当前持有Redis锁的master节点宕机slave节点被提升为新的master节点假如现在来了一个线程2再次加锁会在新的master节点上加锁成功这个时候就会出现两个节点同时持有一把锁的问题。</p>
<p>我们可以利用redisson提供的红锁来解决这个问题它的主要作用是不能只在一个redis实例上创建锁应该是在多个redis实例上创建锁并且要求在大多数redis节点上都成功创建锁红锁中要求是redis的节点数量要过半。这样就能避免线程1加锁成功后master节点宕机导致线程2成功加锁到新的master节点上的问题了。</p>
<p>但是,如果使用了红锁,因为需要同时在多个节点上都添加锁,性能就变的很低了,并且运维维护成本也非常高,所以,我们一般在项目中也不会直接使用红锁,并且官方也暂时废弃了这个红锁</p>
<p><strong>面试官</strong>:好的,如果业务非要保证数据的强一致性,这个该怎么解决呢?</p>
<p><strong>候选人:</strong>嗯~redis本身就是支持高可用的做到强一致性就非常影响性能所以如果有强一致性要求高的业务建议使用zookeeper实现的分布式锁它是可以保证强一致性的。</p>
<p><strong>面试官</strong>Redis集群有哪些方案, 知道嘛 ?</p>
<p><strong>候选人</strong>:嗯~~在Redis中提供的集群方案总共有三种主从复制、哨兵模式、Redis分片集群</p>
<p><strong>面试官</strong>:那你来介绍一下主从同步</p>
<p><strong>候选人</strong>是这样的单节点Redis的并发能力是有上限的要进一步提高Redis的并发能力可以搭建主从集群实现读写分离。一般都是一主多从主节点负责写数据从节点负责读数据主节点写入数据之后需要把数据同步到从节点中</p>
<p><strong>面试官</strong>:能说一下,主从同步数据的流程</p>
<p><strong>候选人</strong>:嗯~~,好!主从同步分为了两个阶段,一个是全量同步,一个是增量同步</p>
<p>全量同步是指从节点第一次与主节点建立连接的时候使用全量同步,流程是这样的:</p>
<p>第一从节点请求主节点同步数据其中从节点会携带自己的replication id和offset偏移量。</p>
<p>第二主节点判断是否是第一次请求主要判断的依据就是主节点与从节点是否是同一个replication id如果不是就说明是第一次同步那主节点就会把自己的replication id和offset发送给从节点让从节点与主节点的信息保持一致。</p>
<p>第三在同时主节点会执行bgsave生成rdb文件后发送给从节点去执行从节点先把自己的数据清空然后执行主节点发送过来的rdb文件这样就保持了一致</p>
<p>当然如果在rdb生成执行期间依然有请求到了主节点而主节点会以命令的方式记录到缓冲区缓冲区是一个日志文件最后把这个日志文件发送给从节点这样就能保证主节点与从节点完全一致了后期再同步数据的时候都是依赖于这个日志文件这个就是全量同步</p>
<p>增量同步指的是当从节点服务重启之后数据就不一致了所以这个时候从节点会请求主节点同步数据主节点还是判断不是第一次请求不是第一次就获取从节点的offset值然后主节点从命令日志中获取offset值之后的数据发送给从节点进行数据同步</p>
<p><strong>面试官</strong>怎么保证Redis的高并发高可用</p>
<p><strong>候选人</strong>首先可以搭建主从集群再加上使用redis中的哨兵模式哨兵模式可以实现主从集群的自动故障恢复里面就包含了对主从服务的监控、自动故障恢复、通知如果master故障Sentinel会将一个slave提升为master。当故障实例恢复后也以新的master为主同时Sentinel也充当Redis客户端的服务发现来源当集群发生故障转移时会将最新信息推送给Redis的客户端所以一般项目都会采用哨兵的模式来保证redis的高并发高可用</p>
<p><strong>面试官</strong>你们使用redis是单点还是集群哪种集群</p>
<p><strong>候选人</strong>我们当时使用的是主从1主1从加哨兵。一般单节点不超过10G内存如果Redis内存不足则可以给不同服务分配独立的Redis主从节点。尽量不做分片集群。因为集群维护起来比较麻烦并且集群之间的心跳检测和数据通信会消耗大量的网络带宽也没有办法使用lua脚本和事务</p>
<p><strong>面试官</strong>redis集群脑裂该怎么解决呢</p>
<p><strong>候选人</strong>:嗯! 这个在项目很少见不过脑裂的问题是这样的我们现在用的是redis的哨兵模式集群的</p>
<p>有的时候由于网络等原因可能会出现脑裂的情况就是说由于redis master节点和redis salve节点和sentinel处于不同的网络分区使得sentinel没有能够心跳感知到master所以通过选举的方式提升了一个salve为master这样就存在了两个master就像大脑分裂了一样这样会导致客户端还在old master那里写入数据新节点无法同步数据当网络恢复后sentinel会将old master降为salve这时再从新master同步数据这会导致old master中的大量数据丢失。</p>
<p>关于解决的话我记得在redis的配置中可以设置第一可以设置最少的salve节点个数比如设置至少要有一个从节点才能同步数据第二个可以设置主从数据复制和同步的延迟时间达不到要求就拒绝请求就可以避免大量的数据丢失</p>
<p><strong>面试官</strong>redis的分片集群有什么作用</p>
<p><strong>候选人</strong>分片集群主要解决的是海量数据存储的问题集群中有多个master每个master保存不同数据并且还可以给每个master设置多个slave节点就可以继续增大集群的高并发能力。同时每个master之间通过ping监测彼此健康状态就类似于哨兵模式了。当客户端请求可以访问集群任意节点最终都会被转发到正确节点</p>
<p><strong>面试官</strong>Redis分片集群中数据是怎么存储和读取的</p>
<p><strong>候选人</strong></p>
<p>嗯~在redis集群中是这样的</p>
<p>Redis 集群引入了哈希槽的概念,有 16384 个哈希槽,集群中每个主节点绑定了一定范围的哈希槽范围, key通过 CRC16 校验后对 16384 取模来决定放置哪个槽,通过槽找到对应的节点进行存储。</p>
<p>取值的逻辑是一样的</p>
<p><strong>面试官</strong>Redis是单线程的但是为什么还那么快</p>
<p><strong>候选人</strong></p>
<p>嗯,这个有几个原因吧~~~</p>
<p>1、完全基于内存的C语言编写</p>
<p>2、采用单线程避免不必要的上下文切换可竞争条件</p>
<p>3、使用多路I&#x2F;O复用模型非阻塞IO</p>
<p>例如bgsave 和 bgrewriteaof 都是在<strong>后台</strong>执行操作,不影响主线程的正常使用,不会产生阻塞</p>
<p><strong>面试官</strong>能解释一下I&#x2F;O多路复用模型</p>
<p><strong>候选人</strong>:嗯~~I&#x2F;O多路复用是指利用单个线程来同时监听多个Socket 并在某个Socket可读、可写时得到通知从而避免无效的等待充分利用CPU资源。目前的I&#x2F;O多路复用都是采用的epoll模式实现它会在通知用户进程Socket就绪的同时把已就绪的Socket写入用户空间不需要挨个遍历Socket来判断是否就绪提升了性能。</p>
<p>其中Redis的网络模型就是使用I&#x2F;O多路复用结合事件的处理器来应对多个Socket请求比如提供了连接应答处理器、命令回复处理器命令请求处理器</p>
<p>在Redis6.0之后,为了提升更好的性能,在命令回复处理器使用了多线程来处理回复事件,在命令请求处理器中,将命令的转换使用了多线程,增加命令转换速度,在命令执行的时候,依然是单线程</p>
</blockquote>
<h2 id="2-数据库篇"><a href="#2-数据库篇" class="headerlink" title="2.数据库篇"></a>2.数据库篇</h2><blockquote>
<p><strong>面试官:</strong>MySQL中如何定位慢查询?</p>
<p><strong>候选人:</strong></p>
<p>嗯~我们当时做压测的时候有的接口非常的慢接口的响应时间超过了2秒以上因为我们当时的系统部署了运维的监控系统Skywalking 在展示的报表中可以看到是哪一个接口比较慢并且可以分析这个接口哪部分比较慢这里可以看到SQL的具体的执行时间所以可以定位是哪个sql出了问题</p>
<p>如果项目中没有这种运维的监控系统其实在MySQL中也提供了慢日志查询的功能可以在MySQL的系统配置文件中开启这个慢日志的功能并且也可以设置SQL执行超过多少时间来记录到一个日志文件中我记得上一个项目配置的是2秒只要SQL执行的时间超过了2秒就会记录到日志文件中我们就可以在日志文件找到执行比较慢的SQL了。</p>
<p><strong>面试官:</strong>那这个SQL语句执行很慢, 如何分析呢?</p>
<p><strong>候选人:</strong>如果一条sql执行很慢的话我们通常会使用mysql自动的执行计划explain来去查看这条sql的执行情况比如在这里面可以通过key和key_len检查是否命中了索引如果本身已经添加了索引也可以判断索引是否有失效的情况第二个可以通过type字段查看sql是否有进一步的优化空间是否存在全索引扫描或全盘扫描第三个可以通过extra建议来判断是否出现了回表的情况如果出现了可以尝试添加索引或修改返回字段来修复</p>
<p><strong>面试官:</strong>了解过索引吗?(什么是索引)</p>
<p><strong>候选人:</strong>嗯索引在项目中还是比较常见的它是帮助MySQL高效获取数据的数据结构主要是用来提高数据检索的效率降低数据库的IO成本同时通过索引列对数据进行排序降低数据排序的成本也能降低了CPU的消耗</p>
<p><strong>面试官:</strong>索引的底层数据结构了解过嘛 ? </p>
<p><strong>候选人:</strong>MySQL的默认的存储引擎InnoDB采用的B+树的数据结构来存储索引选择B+树的主要的原因是第一阶数更多路径更短第二个磁盘读写代价B+树更低非叶子节点只存储指针叶子阶段存储数据第三是B+树便于扫库和区间查询,叶子节点是一个双向链表</p>
<p><strong>面试官:</strong>B树和B+树的区别是什么呢?</p>
<p><strong>候选人</strong>第一在B树中非叶子节点和叶子节点都会存放数据而B+树的所有的数据都会出现在叶子节点在查询的时候B+树查找效率更加稳定</p>
<p>第二在进行范围查询的时候B+树效率更高因为B+树都在叶子节点存储,并且叶子节点是一个双向链表</p>
<p><strong>面试官:</strong>什么是聚簇索引什么是非聚簇索引 ?</p>
<p><strong>候选人:</strong></p>
<p>好的~聚簇索引主要是指数据与索引放到一块B+树的叶子节点保存了整行数据,有且只有一个,一般情况下主键在作为聚簇索引的</p>
<p>非聚簇索引值的是数据与索引分开存储B+树的叶子节点保存对应的主键,可以有多个,一般我们自己定义的索引都是非聚簇索引</p>
<p><strong>面试官:</strong>知道什么是回表查询嘛 ?</p>
<p><strong>候选人:</strong>嗯,其实跟刚才介绍的聚簇索引和非聚簇索引是有关系的,回表的意思就是通过二级索引找到对应的主键值,然后再通过主键值找到聚集索引中所对应的整行数据,这个过程就是回表</p>
<p>【<strong>备注</strong>:如果面试官直接问回表,则需要先介绍聚簇索引和非聚簇索引】</p>
<p><strong>面试官:</strong>知道什么叫覆盖索引嘛 ? </p>
<p><strong>候选人:</strong>嗯~,清楚的</p>
<p>覆盖索引是指select查询语句使用了索引在返回的列必须在索引中全部能够找到如果我们使用id查询它会直接走聚集索引查询一次索引扫描直接返回数据性能高。</p>
<p>如果按照二级索引查询数据的时候返回的列中没有创建索引有可能会触发回表查询尽量避免使用select *,尽量在返回的列中都包含添加索引的字段</p>
<p><strong>面试官:</strong>MYSQL超大分页怎么处理 ?</p>
<p><strong>候选人:</strong>嗯超大分页一般都是在数据量比较大时我们使用了limit分页查询并且需要对数据进行排序这个时候效率就很低我们可以采用覆盖索引和子查询来解决</p>
<p>先分页查询数据的id字段确定了id之后再用子查询来过滤只查询这个id列表中的数据就可以了</p>
<p>因为查询id的时候走的覆盖索引所以效率可以提升很多</p>
<p><strong>面试官:</strong>索引创建原则有哪些?</p>
<p><strong>候选人:</strong>嗯这个情况有很多不过都有一个大前提就是表中的数据要超过10万以上我们才会创建索引并且添加索引的字段是查询比较频繁的字段一般也是像作为查询条件排序字段或分组的字段这些。</p>
<p>还有就是我们通常创建索引的时候都是使用复合索引来创建一条sql的返回值尽量使用覆盖索引如果字段的区分度不高的话我们也会把它放在组合索引后面的字段。</p>
<p>如果某一个字段的内容较长,我们会考虑使用前缀索引来使用,当然并不是所有的字段都要添加索引,这个索引的数量也要控制,因为添加索引也会导致新增改的速度变慢。</p>
<p><strong>面试官:</strong>什么情况下索引会失效 ?</p>
<p><strong>候选人:</strong>嗯,这个情况比较多,我说一些自己的经验,以前遇到过的</p>
<p>比如,索引在使用的时候没有遵循最左匹配法则,第二个是,模糊查询,如果%号在前面也会导致索引失效。如果在添加索引的字段上进行了运算操作或者类型转换也都会导致索引失效。</p>
<p>我们之前还遇到过一个就是,如果使用了复合索引,中间使用了范围查询,右边的条件索引也会失效</p>
<p>查询的时候发生了类型转换,在查询的时候做了运算的操作和模糊查询也会导致索引失效</p>
<p>所以通常情况下想要判断出这条sql是否有索引失效的情况可以使用explain执行计划来分析</p>
<p><strong>面试官:</strong>sql的优化的经验</p>
<p><strong>候选人:</strong>嗯这个在项目还是挺常见的当然如果直说sql优化的话我们会从这几方面考虑比如</p>
<p>建表的时候、使用索引、sql语句的编写、主从复制读写分离还有一个是如果量比较大的话可以考虑分库分表</p>
<p>直接经验:</p>
<p>①SELECT语句务必指明字段名称避免直接使用select * </p>
<p>②SQL语句要避免造成索引失效的写法</p>
<p>③尽量用union all代替union union会多一次过滤效率低</p>
<p>④避免在where子句中对字段进行表达式操作</p>
<p>⑤Join优化 能用innerjoin 就不用left join right join如必须使用 一定要以小表为驱动内连接会对两个表进行优化优先把小表放到外边把大表放到里边。left join 或 right join不会重新调整顺序</p>
<p><strong>面试官:</strong>创建表的时候,你们是如何优化的呢?</p>
<p><strong>候选人:</strong>这个我们主要参考的阿里出的那个开发手册《嵩山版》就比如在定义字段的时候需要结合字段的内容来选择合适的类型如果是数值的话像tinyint、int 、bigint这些类型要根据实际情况选择。如果是字符串类型也是结合存储的内容来选择char和varchar或者text类型</p>
<p><strong>面试官:</strong>那在使用索引的时候,是如何优化呢?</p>
<p><strong>候选人:</strong>【参考索引创建原则 进行描述】</p>
<p>1). 针对于数据量较大,且查询比较频繁的表建立索引。</p>
<p>2). 针对于常作为查询条件where、排序order by、分组group by操作的字段建立索引。</p>
<p>3). 尽量选择区分度高的列作为索引,尽量建立唯一索引,区分度越高,使用索引的效率越高。</p>
<p>4). 如果是字符串类型的字段,字段的长度较长,可以针对于字段的特点,建立前缀索引。</p>
<p>5). 尽量使用联合索引,减少单列索引,查询时,联合索引很多时候可以覆盖索引,节省存储空间,避免回表,提高查询效率。</p>
<p>6). 要控制索引的数量,索引并不是多多益善,索引越多,维护索引结构的代价也就越大,会影响增删改的效率。</p>
<p>7). 如果索引列不能存储NULL值请在创建表时使用NOT NULL约束它。当优化器知道每列是否包含NULL值时它可以更好地确定哪个索引最有效地用于查询。</p>
<p><strong>面试官:</strong>你平时对sql语句做了哪些优化呢</p>
<p><strong>候选人:</strong>嗯这个也有很多比如SELECT语句务必指明字段名称不要直接使用select * 还有就是要注意SQL语句避免造成索引失效的写法如果是聚合查询尽量用union all代替union union会多一次过滤效率比较低如果是表关联的话尽量使用innerjoin 不要使用用left join right join如必须使用 一定要以小表为驱动</p>
<p><strong>面试官:</strong>事务的特性是什么?可以详细说一下吗?</p>
<p><strong>候选人:</strong>嗯这个比较清楚ACID分别指的是原子性、一致性、隔离性、持久性我举个例子</p>
<p>A向B转账500转账成功A扣除500元B增加500元原子操作体现在要么都成功要么都失败</p>
<p>在转账的过程中数据要一致A扣除了500B必须增加500</p>
<p>在转账的过程中隔离性体现在A像B转账不能受其他事务干扰</p>
<p>在转账的过程中,持久性体现在事务提交后,要把数据持久化(可以说是落盘操作)</p>
<p>ACID介绍:</p>
<p>原子性(<strong>A</strong>tomicity事务是不可分割的最小操作单元要么全部成功要么全部失败。</p>
<p>一致性(<strong>C</strong>onsistency事务完成时必须使所有的数据都保持一致状态。</p>
<p>隔离性(<strong>I</strong>solation数据库系统提供的隔离机制保证事务在不受外部并发操作影响的独立环境下运行。</p>
<p>持久性(<strong>D</strong>urability事务一旦提交或回滚它对数据库中的数据的改变就是永久的。</p>
<p><strong>面试官</strong>:并发事务带来哪些问题?</p>
<p><strong>候选人</strong></p>
<p>我们在项目开发中,多个事务并发进行是经常发生的,并发也是必然的,有可能导致一些问题</p>
<p>第一是脏读, 当一个事务正在访问数据并且对数据进行了修改,而这种修改还没有提交到数据库中,这时另外一个事务也访问了这个数据,因为这个数据是还没有提交的数据,那么另外一个事务读到的这个数据是“脏数据”,依据“脏数据”所做的操作可能是不正确的。</p>
<p>第二是不可重复读:比如在一个事务内多次读同一数据。在这个事务还没有结束时,另一个事务也访问该数据。那么,在第一个事务中的两次读数据之间,由于第二个事务的修改导致第一个事务两次读取的数据可能不太一样。这就发生了在一个事务内两次读到的数据是不一样的情况,因此称为不可重复读。</p>
<p>第三是幻读Phantom read幻读与不可重复读类似。它发生在一个事务T1读取了几行数据接着另一个并发事务T2插入了一些数据时。在随后的查询中第一个事务T1就会发现多了一些原本不存在的记录就好像发生了幻觉一样所以称为幻读。</p>
<p><img src="/pictures/image-20230511172226172.png" alt="image-20230511172226172"></p>
<p><strong>面试官</strong>怎么解决这些问题呢MySQL的默认隔离级别是</p>
<p><strong>候选人</strong>:解决方案是对事务进行隔离</p>
<p>MySQL支持四种隔离级别分别有</p>
<p>第一个是未提交读read uncommitted它解决不了刚才提出的所有问题一般项目中也不用这个。第二个是读已提交read committed它能解决脏读的问题的但是解决不了不可重复读和幻读。第三个是可重复读repeatable read它能解决脏读和不可重复读但是解决不了幻读这个也是mysql默认的隔离级别。第四个是串行化serializable它可以解决刚才提出来的所有问题但是由于让是事务串行执行的性能比较低。所以我们一般使用的都是mysql默认的隔离级别:可重复读</p>
<p><img src="/pictures/image-20230511172259204.png" alt="image-20230511172259204"></p>
<p><strong>面试官</strong>undo log和redo log的区别</p>
<p><strong>候选人</strong>好的其中redo log日志记录的是数据页的物理变化服务宕机可用来同步数据而undo log 不同它主要记录的是逻辑日志当事务回滚时通过逆操作恢复原来的数据比如我们删除一条数据的时候就会在undo log日志文件中新增一条delete语句如果发生回滚就执行逆操作</p>
<p>redo log保证了事务的持久性undo log保证了事务的原子性和一致性</p>
<p><strong>面试官</strong>:事务中的隔离性是如何保证的呢?(你解释一下MVCC)</p>
<p><strong>候选人</strong>事务的隔离性是由锁和mvcc实现的。</p>
<p>其中mvcc的意思是多版本并发控制。指维护一个数据的多个版本使得读写操作没有冲突它的底层实现主要是分为了三个部分第一个是隐藏字段第二个是undo log日志第三个是readView读视图</p>
<p>隐藏字段是指在mysql中给每个表都设置了隐藏字段有一个是trx_id(事务id)记录每一次操作的事务id是自增的另一个字段是roll_pointer(回滚指针),指向上一个版本的事务版本记录地址</p>
<p>undo log主要的作用是记录回滚日志存储老版本数据在内部会形成一个版本链在多个事务并行操作某一行记录记录不同事务修改数据的版本通过roll_pointer指针形成一个链表</p>
<p>readView解决的是一个事务查询选择版本的问题在内部定义了一些匹配规则和当前的一些事务id判断该访问那个版本的数据不同的隔离级别快照读是不一样的最终的访问的结果不一样。如果是rc隔离级别每一次执行快照读时生成ReadView如果是rr隔离级别仅在事务中第一次执行快照读时生成ReadView后续复用</p>
<p><strong>面试官</strong>MySQL主从同步原理 </p>
<p><strong>候选人</strong>MySQL主从复制的核心就是二进制日志(DDL数据定义语言语句和 DML数据操纵语言语句),它的步骤是这样的:</p>
<p>第一:主库在事务提交时,会把数据变更记录在二进制日志文件 Binlog 中。</p>
<p>第二:从库读取主库的二进制日志文件 Binlog ,写入到从库的中继日志 Relay Log 。</p>
<p>第三:从库重做中继日志中的事件,将改变反映它自己的数据</p>
<p><strong>面试官</strong>你们项目用过MySQL的分库分表吗</p>
<p><strong>候选人</strong></p>
<p>嗯,因为我们都是微服务开发,每个微服务对应了一个数据库,是根据业务进行拆分的,这个其实就是垂直拆分。</p>
<p><strong>面试官</strong>:那你之前使用过水平分库吗?</p>
<p><strong>候选人</strong></p>
<p>嗯,这个是使用过的,我们当时的业务是(xxx),一开始,我们也是单库,后来这个业务逐渐发展,业务量上来的很迅速,其中(xx)表已经存放了超过1000万的数据我们做了很多优化也不好使性能依然很慢所以当时就使用了水平分库。</p>
<p>我们一开始先做了3台服务器对应了3个数据库由于库多了需要分片我们当时采用的mycat来作为数据库的中间件。数据都是按照id自增取模的方式来存取的。</p>
<p>当然一开始的时候那些旧数据我们做了一些清洗的工作我们也是按照id取模规则分别存储到了各个数据库中好处就是可以让各个数据库分摊存储和读取的压力解决了我们当时性能的问题</p>
</blockquote>
<h2 id="3-框架篇"><a href="#3-框架篇" class="headerlink" title="3.框架篇"></a>3.框架篇</h2><blockquote>
<p><strong>面试官</strong>Spring框架中的单例bean是线程安全的吗</p>
<p><strong>候选人</strong></p>
<p>嗯!</p>
<p>不是线程安全的,是这样的</p>
<p>当多用户同时请求一个服务时,容器会给每一个请求分配一个线程,这是多个线程会并发执行该请求对应的业务逻辑(成员方法),如果该处理逻辑中有对该单列状态的修改(体现为该单例的成员属性),则必须考虑线程同步问题。</p>
<p>Spring框架并没有对单例bean进行任何多线程的封装处理。关于单例bean的线程安全和并发问题需要开发者自行去搞定。</p>
<p>比如我们通常在项目中使用的Spring bean都是不可可变的状态(比如Service类和DAO类)所以在某种程度上说Spring的单例bean是线程安全的。</p>
<p>如果你的bean有多种状态的话比如 View Model对象就需要自行保证线程安全。最浅显的解决办法就是将多态bean的作用由“<strong>singleton</strong>”变更为“<strong>prototype</strong>”。</p>
<p><strong>面试官</strong>什么是AOP</p>
<p><strong>候选人</strong></p>
<p>aop是面向切面编程在spring中用于将那些与业务无关但却对多个对象产生影响的公共行为和逻辑抽取公共模块复用降低耦合一般比如可以做为公共日志保存事务处理等</p>
<p><strong>面试官</strong>你们项目中有没有使用到AOP</p>
<p><strong>候选人</strong></p>
<p>我们当时在后台管理系统中就是使用aop来记录了系统的操作日志</p>
<p>主要思路是这样的使用aop中的环绕通知+切点表达式,这个表达式就是要找到要记录日志的方法,然后通过环绕通知的参数获取请求方法的参数,比如类信息、方法信息、注解、请求方式等,获取到这些参数以后,保存到数据库</p>
<p><strong>面试官</strong>Spring中的事务是如何实现的</p>
<p><strong>候选人</strong></p>
<p>spring实现的事务本质就是aop完成对方法前后进行拦截在执行方法之前开启事务在执行完目标方法之后根据执行情况提交或者回滚事务。</p>
<p><strong>面试官</strong>Spring中事务失效的场景有哪些</p>
<p><strong>候选人</strong></p>
<p>嗯!这个在项目中之前遇到过,我想想啊</p>
<p>第一个,如果方法上异常捕获处理,自己处理了异常,没有抛出,就会导致事务失效,所以一般处理了异常以后,别忘了跑出去就行了</p>
<p>第二个如果方法抛出检查异常如果报错也会导致事务失效最后在spring事务的注解上就是@Transactional上配置rollbackFor属性为Exception这样别管是什么异常都会回滚事务</p>
<p>第三我之前还遇到过一个如果方法上不是public修饰的也会导致事务失效</p>
<p>嗯,就能想起来那么多</p>
<p><strong>面试官</strong>Spring的bean的生命周期</p>
<p><strong>候选人</strong></p>
<p>嗯!,这个步骤还是挺多的,我之前看过一些源码,它大概流程是这样的</p>
<p>首先会通过一个非常重要的类叫做BeanDefinition获取bean的定义信息这里面就封装了bean的所有信息比如类的全路径是否是延迟加载是否是单例等等这些信息</p>
<p>在创建bean的时候第一步是调用构造函数实例化bean</p>
<p>第二步是bean的依赖注入比如一些set方法注入像平时开发用的@Autowire都是这一步完成</p>
<p>第三步是处理Aware接口如果某一个bean实现了Aware接口就会重写方法执行</p>
<p>第四步是bean的后置处理器BeanPostProcessor这个是前置处理器</p>
<p>第五步是初始化方法比如实现了接口InitializingBean或者自定义了方法init-method标签或@PostContruct</p>
<p>第六步是执行了bean的后置处理器BeanPostProcessor主要是对bean进行增强有可能在这里产生代理对象</p>
<p>最后一步是销毁bean</p>
<p><strong>面试官</strong>Spring中的循环引用</p>
<p><strong>候选人</strong></p>
<p>嗯,好的,我来解释一下</p>
<p>循环依赖:循环依赖其实就是循环引用,也就是两个或两个以上的bean互相持有对方,最终形成闭环。比如A依赖于B,B依赖于A</p>
<p>循环依赖在spring中是允许存在spring框架依据三级缓存已经解决了大部分的循环依赖</p>
<p>①一级缓存单例池缓存已经经历了完整的生命周期已经初始化完成的bean对象</p>
<p>②二级缓存缓存早期的bean对象生命周期还没走完</p>
<p>③三级缓存缓存的是ObjectFactory表示对象工厂用来创建某个对象的</p>
<p><strong>面试官</strong>:那具体解决流程清楚吗?</p>
<p><strong>候选人</strong></p>
<p>第一先实例A对象同时会创建ObjectFactory对象存入三级缓存singletonFactories</p>
<p>第二A在初始化的时候需要B对象这个走B的创建的逻辑</p>
<p>第三B实例化完成也会创建ObjectFactory对象存入三级缓存singletonFactories</p>
<p>第四B需要注入A通过三级缓存中获取ObjectFactory来生成一个A的对象同时存入二级缓存这个是有两种情况一个是可能是A的普通对象另外一个是A的代理对象都可以让ObjectFactory来生产对应的对象这也是三级缓存的关键</p>
<p>第五B通过从通过二级缓存earlySingletonObjects 获得到A的对象后可以正常注入B创建成功存入一级缓存singletonObjects</p>
<p>第六回到A对象初始化因为B对象已经创建完成则可以直接注入BA创建成功存入一次缓存singletonObjects</p>
<p>第七二级缓存中的临时对象A清除</p>
<p><strong>面试官</strong>:构造方法出现了循环依赖怎么解决?</p>
<p><strong>候选人</strong></p>
<p>由于bean的生命周期中构造函数是第一个执行的spring框架并不能解决构造函数的的依赖注入可以使用@Lazy懒加载什么时候需要对象再进行bean对象的创建</p>
<p><strong>面试官</strong>SpringMVC的执行流程知道嘛</p>
<p><strong>候选人</strong></p>
<p>嗯,这个知道的,它分了好多步骤</p>
<p>1、用户发送出请求到前端控制器DispatcherServlet这是一个调度中心</p>
<p>2、DispatcherServlet收到请求调用HandlerMapping处理器映射器。</p>
<p>3、HandlerMapping找到具体的处理器(可查找xml配置或注解配置),生成处理器对象及处理器拦截器(如果有)再一起返回给DispatcherServlet。</p>
<p>4、DispatcherServlet调用HandlerAdapter处理器适配器。</p>
<p>5、HandlerAdapter经过适配调用具体的处理器Handler&#x2F;Controller。</p>
<p>6、Controller执行完成返回ModelAndView对象。</p>
<p>7、HandlerAdapter将Controller执行结果ModelAndView返回给DispatcherServlet。</p>
<p>8、DispatcherServlet将ModelAndView传给ViewReslover视图解析器。</p>
<p>9、ViewReslover解析后返回具体View视图。</p>
<p>10、DispatcherServlet根据View进行渲染视图即将模型数据填充至视图中。</p>
<p>11、DispatcherServlet响应用户。</p>
<p>当然现在的开发基本都是前后端分离的开发的并没有视图这些一般都是handler中使用Response直接结果返回</p>
<p><strong>面试官</strong>Springboot自动配置原理</p>
<p><strong>候选人</strong></p>
<p>嗯,好的,它是这样的。</p>
<p>在Spring Boot项目中的引导类上有一个注解@SpringBootApplication这个注解是对三个注解进行了封装分别是</p>
<ul>
<li>@SpringBootConfiguration</li>
<li>@EnableAutoConfiguration</li>
<li>@ComponentScan</li>
</ul>
<p>其中<code>@EnableAutoConfiguration</code>是实现自动化配置的核心注解。</p>
<p>该注解通过<code>@Import</code>注解导入对应的配置选择器。关键的是内部就是读取了该项目和该项目引用的Jar包的的classpath路径下<strong>META-INF&#x2F;spring.factories</strong>文件中的所配置的类的全类名。</p>
<p>在这些配置类中所定义的Bean会根据条件注解所<strong>指定的条件来决定</strong>是否需要将其导入到Spring容器中。</p>
<p>一般条件判断会有像<code>@ConditionalOnClass</code>这样的注解判断是否有对应的class文件如果有则加载该类把这个配置类的所有的Bean放入spring容器中使用。</p>
<p><strong>面试官</strong>Spring 的常见注解有哪些?</p>
<p><strong>候选人</strong></p>
<p>嗯,这个就很多了</p>
<p>第一类是声明bean有@Component、@Service、@Repository、@Controller</p>
<p>第二类是:依赖注入相关的,有@Autowired、@Qualifier、@Resourse</p>
<p>第三类是:设置作用域 @Scope</p>
<p>第四类是spring配置相关的比如@Configuration@ComponentScan 和 @Bean</p>
<p>第五类是跟aop相关做增强的注解 @Aspect@Before@After@Around@Pointcut</p>
<p><strong>面试官</strong>SpringMVC常见的注解有哪些</p>
<p><strong>候选人</strong></p>
<p>嗯,这个也很多的</p>
<p>有@RequestMapping用于映射请求路径</p>
<p>@RequestBody注解实现接收http请求的json数据将json转换为java对象</p>
<p>@RequestParam指定请求参数的名称</p>
<p>@PathViriable从请求路径下中获取请求参数(&#x2F;user&#x2F;{id}),传递给方法的形式参数;@ResponseBody注解实现将controller方法返回对象转化为json对象响应给客户端。@RequestHeader获取指定的请求头数据还有像@PostMapping、@GetMapping这些。</p>
<p><strong>面试官</strong>Springboot常见注解有哪些</p>
<p><strong>候选人</strong></p>
<p>嗯~~</p>
<p>Spring Boot的核心注解是@SpringBootApplication , 他由几个注解组成 :</p>
<ul>
<li>@SpringBootConfiguration 组合了- @Configuration注解实现配置文件的功能</li>
<li>@EnableAutoConfiguration打开自动配置的功能也可以关闭某个自动配置的选项</li>
<li>@ComponentScanSpring组件扫描</li>
</ul>
<p><strong>面试官</strong>MyBatis执行流程</p>
<p><strong>候选人</strong></p>
<p>好,这个知道的,不过步骤也很多</p>
<p>①读取MyBatis配置文件mybatis-config.xml加载运行环境和映射文件</p>
<p>②构造会话工厂SqlSessionFactory一个项目只需要一个单例的一般由spring进行管理</p>
<p>③会话工厂创建SqlSession对象这里面就含了执行SQL语句的所有方法</p>
<p>④操作数据库的接口Executor执行器同时负责查询缓存的维护</p>
<p>⑤Executor接口的执行方法中有一个MappedStatement类型的参数封装了映射信息</p>
<p>⑥输入参数映射</p>
<p>⑦输出结果映射</p>
<p><strong>面试官</strong>Mybatis是否支持延迟加载</p>
<p><strong>候选人</strong></p>
<p>是支持的~</p>
<p>延迟加载的意思是:就是在需要用到数据时才进行加载,不需要用到数据时就不加载数据。</p>
<p>Mybatis支持一对一关联对象和一对多关联集合对象的延迟加载</p>
<p>在Mybatis配置文件中可以配置是否启用延迟加载lazyLoadingEnabled&#x3D;true|false默认是关闭的</p>
<p><strong>面试官</strong>:延迟加载的底层原理知道吗?</p>
<p><strong>候选人</strong></p>
<p>嗯,我想想啊</p>
<p>延迟加载在底层主要使用的CGLIB动态代理完成的</p>
<p>第一是使用CGLIB创建目标对象的代理对象这里的目标对象就是开启了延迟加载的mapper</p>
<p>第二个是当调用目标方法时进入拦截器invoke方法发现目标方法是null值再执行sql查询</p>
<p>第三个是获取数据以后调用set方法设置属性值再继续查询目标方法就有值了</p>
<p><strong>面试官</strong>Mybatis的一级、二级缓存用过吗</p>
<p><strong>候选人</strong></p>
<p>嗯~~,用过的~</p>
<p>mybatis的一级缓存: 基于 PerpetualCache 的 HashMap 本地缓存,其存储作用域为 Session当Session进行flush或close之后该Session中的所有Cache就将清空默认打开一级缓存</p>
<p>关于二级缓存需要单独开启</p>
<p>二级缓存是基于namespace和mapper的作用域起作用的不是依赖于SQL session默认也是采用 PerpetualCacheHashMap 存储。</p>
<p>如果想要开启二级缓存需要在全局配置文件和映射文件中开启配置才行。</p>
<p><strong>面试官</strong>Mybatis的二级缓存什么时候会清理缓存中的数据</p>
<p><strong>候选人</strong></p>
<p>嗯!!</p>
<p>当某一个作用域(一级缓存 Session&#x2F;二级缓存Namespaces)的进行了新增、修改、删除操作后,默认该作用域下所有 select 中的缓存将被 clear。</p>
</blockquote>
<h2 id="4-微服务篇"><a href="#4-微服务篇" class="headerlink" title="4.微服务篇"></a>4.微服务篇</h2><blockquote>
<p><strong>面试官:</strong>Spring Cloud 5大组件有哪些</p>
<p><strong>候选人:</strong></p>
<p>早期我们一般认为的Spring Cloud五大组件是</p>
<ul>
<li>Eureka : 注册中心</li>
<li>Ribbon : 负载均衡</li>
<li>Feign : 远程调用</li>
<li>Hystrix : 服务熔断</li>
<li>Zuul&#x2F;Gateway : 网关</li>
</ul>
<p>随着SpringCloudAlibba在国内兴起 , 我们项目中使用了一些阿里巴巴的组件</p>
<ul>
<li>注册中心&#x2F;配置中心 Nacos</li>
<li>负载均衡 Ribbon</li>
<li>服务调用 Feign</li>
<li>服务保护 sentinel</li>
<li>服务网关 Gateway</li>
</ul>
<p><strong>面试官:</strong>服务注册和发现是什么意思Spring Cloud 如何实现服务注册发现?</p>
<p><strong>候选人:</strong></p>
<p>我理解的是主要三块大功能,分别是服务注册 、服务发现、服务状态监控</p>
<p>我们当时项目采用的eureka作为注册中心这个也是spring cloud体系中的一个核心组件</p>
<p><strong>服务注册</strong>服务提供者需要把自己的信息注册到eureka由eureka来保存这些信息比如服务名称、ip、端口等等</p>
<p><strong>服务发现</strong>消费者向eureka拉取服务列表信息如果服务提供者有集群则消费者会利用负载均衡算法选择一个发起调用</p>
<p><strong>服务监控</strong>服务提供者会每隔30秒向eureka发送心跳报告健康状态如果eureka服务90秒没接收到心跳从eureka中剔除</p>
<p><strong>面试官:</strong>我看你之前也用过nacos、你能说下nacos与eureka的区别</p>
<p><strong>候选人:</strong></p>
<p>我们当时xx项目就是采用的nacos作为注册中心选择nacos还要一个重要原因就是它支持配置中心不过nacos作为注册中心也比eureka要方便好用一些主要相同不同点在于几点</p>
<ul>
<li>共同点</li>
</ul>
<p>Nacos与eureka都支持服务注册和服务拉取都支持服务提供者心跳方式做健康检测</p>
<ul>
<li>Nacos与Eureka的区别</li>
</ul>
<p>①Nacos支持服务端主动检测提供者状态临时实例采用心跳模式非临时实例采用主动检测模式</p>
<p>②临时实例心跳不正常会被剔除,非临时实例则不会被剔除</p>
<p>③Nacos支持服务列表变更的消息推送模式服务列表更新更及时</p>
<p>④Nacos集群默认采用AP方式当集群中存在非临时实例时采用CP模式Eureka采用AP方式</p>
<p><strong>面试官:</strong>你们项目负载均衡如何实现的 ?</p>
<p><strong>候选人:</strong></p>
<p>是这样~~</p>
<p>在服务调用过程中的负载均衡一般使用SpringCloud的Ribbon 组件实现 , Feign的底层已经自动集成了Ribbon , 使用起来非常简单</p>
<p>当发起远程调用时ribbon先从注册中心拉取服务地址列表然后按照一定的路由策略选择一个发起远程调用一般的调用策略是轮询</p>
<p><strong>面试官:</strong>Ribbon负载均衡策略有哪些 ?</p>
<p><strong>候选人:</strong></p>
<p>我想想啊,有很多种,我记得几个:</p>
<ul>
<li>RoundRobinRule简单轮询服务列表来选择服务器</li>
<li>WeightedResponseTimeRule按照权重来选择服务器响应时间越长权重越小</li>
<li>RandomRule随机选择一个可用的服务器</li>
<li>ZoneAvoidanceRule区域敏感策略以区域可用的服务器为基础进行服务器的选择。使用Zone对服务器进行分类这个Zone可以理解为一个机房、一个机架等。而后再对Zone内的多个服务做轮询(默认)</li>
</ul>
<p><strong>面试官:</strong>如果想自定义负载均衡策略如何实现 ?</p>
<p><strong>候选人:</strong></p>
<p>提供了两种方式:</p>
<p>1创建类实现IRule接口可以指定负载均衡策略这个是全局的对所有的远程调用都起作用</p>
<p>2在客户端的配置文件中可以配置某一个服务调用的负载均衡策略只是对配置的这个服务生效远程调用</p>
<p><strong>面试官:</strong>什么是服务雪崩,怎么解决这个问题?</p>
<p><strong>候选人:</strong></p>
<p>服务雪崩是指一个服务失败,导致整条链路的服务都失败的情形,一般我们在项目解决的话就是两种方案,第一个是服务降级,第二个是服务熔断,如果流量太大的话,可以考虑限流</p>
<p>服务降级服务自我保护的一种方式或者保护下游服务的一种方式用于确保服务不会受请求突增影响变得不可用确保服务不会崩溃一般在实际开发中与feign接口整合编写降级逻辑</p>
<p>服务熔断:默认关闭,需要手动打开,如果检测到 10 秒内请求的失败率超过 50%,就触发熔断机制。之后每隔 5 秒重新尝试请求微服务,如果微服务不能响应,继续走熔断机制。如果微服务可达,则关闭熔断机制,恢复正常请求</p>
<p><strong>面试官:</strong>你们的微服务是怎么监控的?</p>
<p><strong>候选人:</strong></p>
<p>我们项目中采用的skywalking进行监控的</p>
<p>1skywalking主要可以监控接口、服务、物理实例的一些状态。特别是在压测的时候可以看到众多服务中哪些服务和接口比较慢我们可以针对性的分析和优化。</p>
<p>2我们还在skywalking设置了告警规则特别是在项目上线以后如果报错我们分别设置了可以给相关负责人发短信和发邮件第一时间知道项目的bug情况第一时间修复</p>
<p><strong>面试官:</strong>你们项目中有没有做过限流 ? 怎么做的 ?</p>
<p><strong>候选人:</strong></p>
<p>我当时做的xx项目采用就是微服务的架构因为xx因为应该会有突发流量最大QPS可以达到2000但是服务支撑不住我们项目都通过压测最多可以支撑1200QPS。因为我们平时的QPS也就不到100为了解决这些突发流量所以采用了限流。</p>
<p>【版本1】</p>
<p>我们当时采用的nginx限流操作nginx使用的漏桶算法来实现过滤让请求以固定的速率处理请求可以应对突发流量我们控制的速率是按照ip进行限流限制的流量是每秒20</p>
<p>【版本2】</p>
<p>我们当时采用的是spring cloud gateway中支持局部过滤器RequestRateLimiter来做限流使用的是令牌桶算法可以根据ip或路径进行限流可以设置每秒填充平均速率和令牌桶总容量</p>
<p><strong>面试官:</strong>限流常见的算法有哪些呢?</p>
<p><strong>候选人:</strong></p>
<p>比较常见的限流算法有漏桶算法和令牌桶算法</p>
<p>漏桶算法是把请求存入到桶中,以固定速率从桶中流出,可以让我们的服务做到绝对的平均,起到很好的限流效果</p>
<p>令牌桶算法在桶中存储的是令牌,按照一定的速率生成令牌,每个请求都要先申请令牌,申请到令牌以后才能正常请求,也可以起到很好的限流作用</p>
<p>它们的区别是漏桶和令牌桶都可以处理突发流量其中漏桶可以做到绝对的平滑令牌桶有可能会产生突发大量请求的情况一般nginx限流采用的漏桶spring cloud gateway中可以支持令牌桶算法</p>
<p><strong>面试官</strong>什么是CAP理论</p>
<p><strong>候选人</strong></p>
<p>CAP主要是在分布式项目下的一个理论。包含了三项一致性、可用性、分区容错性</p>
<ul>
<li>一致性(Consistency)是指更新操作成功并返回客户端完成后,所有节点在同一时间的数据完全一致(强一致性),不能存在中间状态。</li>
<li>可用性(Availability) 是指系统提供的服务必须一直处于可用的状态,对于用户的每一个操作请求总是能够在有限的时间内返回结果。</li>
<li>分区容错性(Partition tolerance) 是指分布式系统在遇到任何网络分区故障时,仍然需要能够保证对外提供满足一致性和可用性的服务,除非是整个网络环境都发生了故障。</li>
</ul>
<p><strong>面试官</strong>:为什么分布式系统中无法同时保证一致性和可用性?</p>
<p><strong>候选人</strong></p>
<p>嗯,是这样的~~</p>
<p>首先一个前提对于分布式系统而言分区容错性是一个最基本的要求因此基本上我们在设计分布式系统的时候只能从一致性C和可用性A之间进行取舍。</p>
<p>如果保证了一致性C对于节点N1和N2当往N1里写数据时N2上的操作必须被暂停只有当N1同步数据到N2时才能对N2进行读写请求在N2被暂停操作期间客户端提交的请求会收到失败或超时。显然这与可用性是相悖的。</p>
<p>如果保证了可用性A那就不能暂停N2的读写操作但同时N1在写数据的话这就违背了一致性的要求。</p>
<p><strong>面试官</strong>什么是BASE理论</p>
<p><strong>候选人</strong></p>
<p>嗯这个也是CAP分布式系统设计理论</p>
<p>BASE是CAP理论中AP方案的延伸核心思想是即使无法做到强一致性StrongConsistencyCAP的一致性就是强一致性但应用可以采用适合的方式达到最终一致性Eventual Consitency。它的思想包含三方面</p>
<p>1、Basically Available基本可用基本可用是指分布式系统在出现不可预知的故障的时候允许损失部分可用性但不等于系统不可用。</p>
<p>2、Soft state软状态即是指允许系统中的数据存在中间状态并认为该中间状态的存在不会影响系统的整体可用性即允许系统在不同节点的数据副本之间进行数据同步的过程存在延时。</p>
<p>3、Eventually consistent最终一致性强调系统中所有的数据副本在经过一段时间的同步后最终能够达到一个一致的状态。其本质是需要系统保证最终数据能够达到一致而不需要实时保证系统数据的强一致性。</p>
<p><strong>面试官:</strong>你们采用哪种分布式事务解决方案?</p>
<p><strong>候选人:</strong></p>
<p>我们当时是xx项目主要使用到的seata的at模式解决的分布式事务</p>
<p>seata的AT模型分为两个阶段</p>
<p>1、阶段一RM的工作① 注册分支事务 ② 记录undo-log数据快照③ 执行业务sql并提交 ④报告事务状态</p>
<p>2、阶段二提交时RM的工作删除undo-log即可</p>
<p>3、阶段二回滚时RM的工作根据undo-log恢复数据到更新前</p>
<p>at模式牺牲了一致性保证了可用性不过它保证的是最终一致性</p>
<p><strong>面试官:</strong>分布式服务的接口幂等性如何设计?</p>
<p><strong>候选人:</strong></p>
<p>嗯我们当时有一个xx项目的下单操作采用的token+redis实现的流程是这样的</p>
<p>第一次请求也就是用户打开了商品详情页面我们会发起一个请求在后台生成一个唯一token存入rediskey就是用户的idvalue就是这个token同时把这个token返回前端</p>
<p>第二次请求当用户点击了下单操作会后会携带之前的token后台先到redis进行验证如果存在token可以执行业务同时删除token如果不存在则直接返回不处理业务就保证了同一个token只处理一次业务就保证了幂等性</p>
<p><strong>面试官:</strong>xxl-job路由策略有哪些</p>
<p><strong>候选人:</strong></p>
<p>xxl-job提供了很多的路由策略我们平时用的较多就是轮询、故障转移、分片广播…</p>
<p><strong>面试官:</strong>xxl-job任务执行失败怎么解决</p>
<p><strong>候选人:</strong></p>
<p>有这么几个操作</p>
<p>第一:路由策略选择故障转移,优先使用健康的实例来执行任务</p>
<p>第二,如果还有失败的,我们在创建任务时,可以设置重试次数</p>
<p>第三,如果还有失败的,就可以查看日志或者配置邮件告警来通知相关负责人解决</p>
<p><strong>面试官:</strong>如果有大数据量的任务同时都需要执行,怎么解决?</p>
<p><strong>候选人:</strong></p>
<p>我们会让部署多个实例,共同去执行这些批量的任务,其中任务的路由策略是分片广播</p>
<p>在任务执行的代码中可以获取分片总数和当前分片,按照取模的方式分摊到各个实例执行就可以了</p>
</blockquote>
<h2 id="5-消息中间件篇"><a href="#5-消息中间件篇" class="headerlink" title="5.消息中间件篇"></a>5.消息中间件篇</h2><blockquote>
<p><strong>面试官</strong>RabbitMQ-如何保证消息不丢失</p>
<p><strong>候选人</strong></p>
<p>嗯我们当时MYSQL和Redis的数据双写一致性就是采用RabbitMQ实现同步的这里面就要求了消息的高可用性我们要保证消息的不丢失。主要从三个层面考虑</p>
<p>第一个是开启生产者确认机制,确保生产者的消息能到达队列,如果报错可以先记录到日志中,再去修复数据</p>
<p>第二个是开启持久化功能,确保消息未消费前在队列中不会丢失,其中的交换机、队列、和消息都要做持久化</p>
<p>第三个是开启消费者确认机制为auto由spring确认消息处理成功后完成ack当然也需要设置一定的重试次数我们当时设置了3次如果重试3次还没有收到消息就将失败后的消息投递到异常交换机交由人工处理</p>
<p><strong>面试官</strong>RabbitMQ消息的重复消费问题如何解决的</p>
<p><strong>候选人</strong></p>
<p>嗯这个我们还真遇到过是这样的我们当时消费者是设置了自动确认机制当服务还没来得及给MQ确认的时候服务宕机了导致服务重启之后又消费了一次消息。这样就重复消费了</p>
<p>因为我们当时处理的支付(订单|业务唯一标识),它有一个业务的唯一标识,我们再处理消息时,先到数据库查询一下,这个数据是否存在,如果不存在,说明没有处理过,这个时候就可以正常处理这个消息了。如果已经存在这个数据了,就说明消息重复消费了,我们就不需要再消费了</p>
<p><strong>面试官</strong>:那你还知道其他的解决方案吗?</p>
<p><strong>候选人</strong></p>
<p>嗯,我想想~</p>
<p>其实这个就是典型的幂等的问题比如redis分布式锁、数据库的锁都是可以的</p>
<p><strong>面试官</strong>RabbitMQ中死信交换机 ? RabbitMQ延迟队列有了解过嘛</p>
<p><strong>候选人</strong></p>
<p>嗯!了解过!</p>
<p>我们当时的xx项目有一个xx业务需要用到延迟队列其中就是使用RabbitMQ来实现的。</p>
<p>延迟队列就是用到了死信交换机和TTL消息存活时间实现的。</p>
<p>如果消息超时未消费就会变成死信在RabbitMQ中如果消息成为死信队列可以绑定一个死信交换机在死信交换机上可以绑定其他队列在我们发消息的时候可以按照需求指定TTL的时间这样就实现了延迟队列的功能了。</p>
<p>我记得RabbitMQ还有一种方式可以实现延迟队列在RabbitMQ中安装一个死信插件这样更方便一些我们只需要在声明交互机的时候指定这个就是死信交换机然后在发送消息的时候直接指定超时时间就行了相对于死信交换机+TTL要省略了一些步骤</p>
<p><strong>面试官</strong>如果有100万消息堆积在MQ , 如何解决 ?</p>
<p><strong>候选人</strong></p>
<p>我在实际的开发中,没遇到过这种情况,不过,如果发生了堆积的问题,解决方案也所有很多的</p>
<p>第一:提高消费者的消费能力 ,可以使用多线程消费任务</p>
<p>第二:增加更多消费者,提高消费速度</p>
<p> 使用工作队列模式, 设置多个消费者消费消费同一个队列中的消息</p>
<p>第三:扩大队列容积,提高堆积上限</p>
<p>可以使用RabbitMQ惰性队列惰性队列的好处主要是</p>
<p>①接收到消息后直接存入磁盘而非内存</p>
<p>②消费者要消费消息时才会从磁盘中读取并加载到内存</p>
<p>③支持数百万条的消息存储</p>
<p><strong>面试官</strong>RabbitMQ的高可用机制有了解过嘛</p>
<p><strong>候选人</strong></p>
<p>嗯,熟悉的~</p>
<p>我们当时项目在生产环境下使用的集群当时搭建是镜像模式集群使用了3台机器。</p>
<p>镜像队列结构是一主多从,所有操作都是主节点完成,然后同步给镜像节点,如果主节点宕机后,镜像节点会替代成新的主节点,不过在主从同步完成前,主节点就已经宕机,可能出现数据丢失</p>
<p><strong>面试官</strong>:那出现丢数据怎么解决呢?</p>
<p><strong>候选人</strong></p>
<p>我们可以采用仲裁队列与镜像队列一样都是主从模式支持主从数据同步主从同步基于Raft协议强一致。</p>
<p>并且使用起来也非常简单,不需要额外的配置,在声明队列的时候只要指定这个是仲裁队列即可</p>
<p><strong>面试官</strong>Kafka是如何保证消息不丢失</p>
<p><strong>候选人</strong></p>
<p>嗯,这个保证机制很多,在发送消息到消费者接收消息,在每个阶段都有可能会丢失消息,所以我们解决的话也是从多个方面考虑</p>
<p>第一个是生产者发送消息的时候,可以使用异步回调发送,如果消息发送失败,我们可以通过回调获取失败后的消息信息,可以考虑重试或记录日志,后边再做补偿都是可以的。同时在生产者这边还可以设置消息重试,有的时候是由于网络抖动的原因导致发送不成功,就可以使用重试机制来解决</p>
<p>第二个在broker中消息有可能会丢失我们可以通过kafka的复制机制来确保消息不丢失在生产者发送消息的时候可以设置一个acks就是确认机制。我们可以设置参数为all这样的话当生产者发送消息到了分区之后不仅仅只在leader分区保存确认在follwer分区也会保存确认只有当所有的副本都保存确认以后才算是成功发送了消息所以这样设置就很大程度了保证了消息不会在broker丢失</p>
<p>第三个有可能是在消费者端丢失消息kafka消费消息都是按照offset进行标记消费的消费者默认是自动按期提交已经消费的偏移量默认是每隔5s提交一次如果出现重平衡的情况可能会重复消费或丢失数据。我们一般都会禁用掉自动提价偏移量改为手动提交当消费成功以后再报告给broker消费的位置这样就可以避免消息丢失和重复消费了</p>
<p><strong>面试官</strong>Kafka中消息的重复消费问题如何解决的</p>
<p><strong>候选人</strong></p>
<p>kafka消费消息都是按照offset进行标记消费的消费者默认是自动按期提交已经消费的偏移量默认是每隔5s提交一次如果出现重平衡的情况可能会重复消费或丢失数据。我们一般都会禁用掉自动提价偏移量改为手动提交当消费成功以后再报告给broker消费的位置这样就可以避免消息丢失和重复消费了</p>
<p>为了消息的幂等我们也可以设置唯一主键来进行区分或者是加锁数据库的锁或者是redis分布式锁都能解决幂等的问题</p>
<p><strong>面试官</strong>Kafka是如何保证消费的顺序性</p>
<p><strong>候选人</strong></p>
<p>kafka默认存储和消费消息是不能保证顺序性的因为一个topic数据可能存储在不同的分区中每个分区都有一个按照顺序的存储的偏移量如果消费者关联了多个分区不能保证顺序性</p>
<p>如果有这样的需求的话我们是可以解决的把消息都存储同一个分区下就行了有两种方式都可以进行设置第一个是发送消息时指定分区号第二个是发送消息时按照相同的业务设置相同的key因为默认情况下分区也是通过key的hashcode值来选择分区的hash值如果一样的话分区肯定也是一样的</p>
<p><strong>面试官</strong>Kafka的高可用机制有了解过嘛</p>
<p><strong>候选人</strong></p>
<p>嗯,主要是有两个层面,第一个是集群,第二个是提供了复制机制</p>
<p>kafka集群指的是由多个broker实例组成即使某一台宕机也不耽误其他broker继续对外提供服务</p>
<p>复制机制是可以保证kafka的高可用的一个topic有多个分区每个分区有多个副本有一个leader其余的是follower副本存储在不同的broker中所有的分区副本的内容是都是相同的如果leader发生故障时会自动将其中一个follower提升为leader保证了系统的容错性、高可用性</p>
<p><strong>面试官</strong>解释一下复制机制中的ISR</p>
<p><strong>候选人</strong></p>
<p>ISR的意思是in-sync replica就是需要同步复制保存的follower</p>
<p>其中分区副本有很多的follower分为了两类一个是ISR与leader副本同步保存数据另外一个普通的副本是异步同步数据当leader挂掉之后会优先从ISR副本列表中选取一个作为leader因为ISR是同步保存数据数据更加的完整一些所以优先选择ISR副本列表</p>
<p><strong>面试官</strong>Kafka数据清理机制了解过嘛</p>
<p><strong>候选人</strong></p>
<p>嗯,了解过~~</p>
<p>Kafka中topic的数据存储在分区上分区如果文件过大会分段存储segment</p>
<p>每个分段都在磁盘上以索引(xxxx.index)和日志文件(xxxx.log)的形式存储这样分段的好处是第一能够减少单个文件内容的大小查找数据方便第二方便kafka进行日志清理。</p>
<p>在kafka中提供了两个日志的清理策略</p>
<p>第一根据消息的保留时间当消息保存的时间超过了指定的时间就会触发清理默认是168小时 7天</p>
<p>第二是根据topic存储的数据大小当topic所占的日志文件大小大于一定的阈值则开始删除最久的消息。这个默认是关闭的</p>
<p>这两个策略都可以通过kafka的broker中的配置文件进行设置</p>
<p><strong>面试官</strong>Kafka中实现高性能的设计有了解过嘛</p>
<p><strong>候选人</strong></p>
<p>Kafka 高性能是多方面协同的结果包括宏观架构、分布式存储、ISR 数据同步、以及高效的利用磁盘、操作系统特性等。主要体现有这么几点:</p>
<p>消息分区:不受单台服务器的限制,可以不受限的处理更多的数据</p>
<p>顺序读写:磁盘顺序读写,提升读写效率</p>
<p>页缓存:把磁盘中的数据缓存到内存中,把对磁盘的访问变为对内存的访问</p>
<p>零拷贝:减少上下文切换及数据拷贝</p>
<p>消息压缩减少磁盘IO和网络IO</p>
<p>分批发送:将消息打包批量发送,减少网络开销</p>
</blockquote>
]]></content>
<categories>
<category>面试</category>
</categories>
<tags>
<tag>面试</tag>
</tags>
</entry>
<entry>
<title>项目实战-黑马头条</title>
<url>/posts/64695.html</url>
<content><![CDATA[<h1 id="一-项目介绍"><a href="#一-项目介绍" class="headerlink" title="一.项目介绍"></a>一.项目介绍</h1><h2 id="1-项目概述"><a href="#1-项目概述" class="headerlink" title="1.项目概述"></a>1.项目概述</h2><p> 随着智能手机的普及,人们更加习惯于通过手机来看新闻。由于生活节奏的加快,很多人只能利用碎片时间来获取信息,因此,对于移动资讯客户端的需求也越来越高。黑马头条项目正是在这样背景下开发出来。黑马头条项目采用当下火热的微服务+大数据技术架构实现。本项目主要着手于获取最新最热新闻资讯,通过大数据分析用户喜好精确推送咨询新闻。</p>
<p><img src="/pictures/image-20230810153039562.png" alt="image-20230810153039562"></p>
<h2 id="2-业务说明"><a href="#2-业务说明" class="headerlink" title="2.业务说明"></a>2.业务说明</h2><p><strong>功能架构图</strong></p>
<p><img src="/pictures/image-20230810153700690.png" alt="image-20230810153700690"></p>
<h2 id="3-技术栈"><a href="#3-技术栈" class="headerlink" title="3.技术栈"></a>3.技术栈</h2><ul>
<li>Spring-Cloud-Gateway : 微服务之前架设的网关服务实现服务注册中的API请求路由以及控制流速控制和熔断处理都是常用的架构手段而这些功能Gateway天然支持</li>
<li>运用Spring Boot快速开发框架构建项目工程并结合Spring Cloud全家桶技术实现后端个人中心、自媒体、管理中心等微服务。</li>
<li>运用Spring Cloud Alibaba Nacos作为项目中的注册中心和配置中心</li>
<li>运用mybatis-plus作为持久层提升开发效率</li>
<li>运用Kafka完成内部系统消息通知与客户端系统消息通知以及实时数据计算</li>
<li>运用Redis缓存技术实现热数据的计算提升系统性能指标</li>
<li>使用Mysql存储用户数据以保证上层数据查询的高性能</li>
<li>使用Mongo存储用户热数据以保证用户热数据高扩展和高性能指标</li>
<li>使用FastDFS作为静态资源存储器在其上实现热静态资源缓存、淘汰等功能</li>
<li>运用Hbase技术存储系统中的冷数据保证系统数据的可靠性</li>
<li>运用ES搜索技术对冷数据、文章数据建立索引以保证冷数据、文章查询性能</li>
<li>运用AI技术来完成系统自动化功能以提升效率及节省成本。比如实名认证自动化</li>
<li>PMD&amp;P3C : 静态代码扫描工具,在项目中扫描项目代码,检查异常点、优化点、代码规范等,为开发团队提供规范统一,提升项目代码质量</li>
</ul>
<p><strong>技术栈</strong></p>
<p><img src="/pictures/image-20230809170653756.png" alt="image-20230809170653756"></p>
<p><strong>解决方案</strong></p>
<p><img src="/pictures/image-20230809170929986.png" alt="image-20230809170929986"></p>
<h1 id="二-环境搭建"><a href="#二-环境搭建" class="headerlink" title="二.环境搭建"></a>二.环境搭建</h1><h2 id="1-Linxu环境的搭建"><a href="#1-Linxu环境的搭建" class="headerlink" title="1.Linxu环境的搭建"></a>1.Linxu环境的搭建</h2><h3 id="1-1-虚拟机的安装"><a href="#1-1-虚拟机的安装" class="headerlink" title="1.1 虚拟机的安装"></a>1.1 虚拟机的安装</h3><p><strong>1.解压分享的虚拟机镜像文件</strong></p>
<p><img src="/pictures/image-20230811103629846.png" alt="image-20230811103629846"></p>
<p><strong>2.使用VmWare打开.vmx文件</strong><br><img src="/pictures/image-20230811103800217.png" alt="image-20230811103800217"></p>
<p><strong>3.配置虚拟机的网络环境</strong></p>
<p><img src="/pictures/image-20230811104150226.png" alt="image-20230811104150226"></p>
<p><img src="/pictures/image-20230811104320075.png" alt="image-20230811104320075"></p>
<p><strong>4.开启虚拟机</strong></p>
<p><img src="/pictures/image-20230811104523506.png" alt="image-20230811104523506"></p>
<p><strong>5.使用FinalShell连接此虚拟机</strong></p>
<p>用户名: root 密码:root IP地址: 192.168.200.130</p>
<p><img src="/pictures/image-20230811104741394.png" alt="image-20230811104741394"></p>
<h3 id="1-2-Linux软件安装"><a href="#1-2-Linux软件安装" class="headerlink" title="1.2 Linux软件安装"></a>1.2 Linux软件安装</h3><p><strong><a href="https://qingling.icu/posts/20683.html">Linux中开发环境的搭建 | The Blog (qingling.icu)</a></strong></p>
<h2 id="2-开发环境的配置"><a href="#2-开发环境的配置" class="headerlink" title="2.开发环境的配置"></a>2.开发环境的配置</h2><h3 id="2-1-项目依赖的环境"><a href="#2-1-项目依赖的环境" class="headerlink" title="2.1 项目依赖的环境"></a>2.1 项目依赖的环境</h3><ul>
<li><p><strong>JDK1.8</strong></p>
</li>
<li><p><strong>Intellij Idea</strong></p>
</li>
<li><p><strong>maven-3.6.1</strong></p>
</li>
<li><p><strong>Git</strong></p>
</li>
</ul>
<h3 id="2-2-后端工程的搭建"><a href="#2-2-后端工程的搭建" class="headerlink" title="2.2 后端工程的搭建"></a>2.2 后端工程的搭建</h3><p><img src="/pictures/image-20230811160530674.png" alt="image-20230811160530674"></p>
<p>解压heima-leadnews.zip文件并用IDEA工具打开</p>
<p><img src="/pictures/image-20230811152915886.png" alt="image-20230811152915886"></p>
<p>编码格式的设置</p>
<p><img src="/pictures/image-20230811154426723.png" alt="image-20230811154426723"></p>
<h1 id="三-app端功能开发"><a href="#三-app端功能开发" class="headerlink" title="三.app端功能开发"></a>三.app端功能开发</h1><h2 id="1-app登录"><a href="#1-app登录" class="headerlink" title="1.app登录"></a>1.app登录</h2><p>登录相关的表结构</p>
<table>
<thead>
<tr>
<th><strong>表名称</strong></th>
<th><strong>说明</strong></th>
</tr>
</thead>
<tbody><tr>
<td>ap_user</td>
<td>APP用户信息表</td>
</tr>
<tr>
<td>ap_user_fan</td>
<td>APP用户粉丝信息表</td>
</tr>
<tr>
<td>ap_user_follow</td>
<td>APP用户关注信息表</td>
</tr>
<tr>
<td>ap_user_realname</td>
<td>APP实名认证信息表</td>
</tr>
</tbody></table>
<p>ap_user表对应的实体类</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.model.user.pojos;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.IdType;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableField;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableId;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableName;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.Serializable;</span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * &lt;p&gt;</span></span><br><span class="line"><span class="comment"> * APP用户信息表</span></span><br><span class="line"><span class="comment"> * &lt;/p&gt;</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> itheima</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@TableName(&quot;ap_user&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ApUser</span> <span class="keyword">implements</span> <span class="title class_">Serializable</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">long</span> <span class="variable">serialVersionUID</span> <span class="operator">=</span> <span class="number">1L</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 主键</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableId(value = &quot;id&quot;, type = IdType.AUTO)</span></span><br><span class="line"> <span class="keyword">private</span> Integer id;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 密码、通信等加密盐</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;salt&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String salt;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 用户名</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;name&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String name;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 密码,md5加密</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;password&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String password;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 手机号</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;phone&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String phone;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 头像</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;image&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String image;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 0 男</span></span><br><span class="line"><span class="comment"> 1 女</span></span><br><span class="line"><span class="comment"> 2 未知</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;sex&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Boolean sex;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 0 未</span></span><br><span class="line"><span class="comment"> 1 是</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;is_certification&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Boolean certification;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 是否身份认证</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;is_identity_authentication&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Boolean identityAuthentication;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 0正常</span></span><br><span class="line"><span class="comment"> 1锁定</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;status&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Boolean status;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 0 普通用户</span></span><br><span class="line"><span class="comment"> 1 自媒体人</span></span><br><span class="line"><span class="comment"> 2 大V</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;flag&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Short flag;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 注册时间</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;created_time&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Date createdTime;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="1-1-用户登录逻辑"><a href="#1-1-用户登录逻辑" class="headerlink" title="1.1 用户登录逻辑"></a>1.1 用户登录逻辑</h3><p><strong>注册加盐的过程</strong></p>
<p> 用户在登录的时候会生成一个随机的字符串(salt),这个随机的字符串会加到密码后面然后连同密码加密存储到数据库。</p>
<p><img src="/pictures/image-20230811165505210.png" alt="image-20230811165505210"></p>
<p><strong>登录加盐的过程</strong></p>
<p> 先根据账号查询是否存在该用户如果存在的话根据用户输入的密码和数据库中的salt进行md5加密并和数据库中的密码比对一致的话比对通过不一样的话不通过。</p>
<p><img src="/pictures/image-20230811165808912.png" alt="image-20230811165808912"></p>
<h3 id="1-2-用户模块搭建"><a href="#1-2-用户模块搭建" class="headerlink" title="1.2 用户模块搭建"></a>1.2 用户模块搭建</h3><p>heima-leadnews-service父工程依赖文件</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;?xml version=<span class="string">&quot;1.0&quot;</span> encoding=<span class="string">&quot;UTF-8&quot;</span>?&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">project</span> <span class="attr">xmlns</span>=<span class="string">&quot;http://maven.apache.org/POM/4.0.0&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">xmlns:xsi</span>=<span class="string">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">xsi:schemaLocation</span>=<span class="string">&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">parent</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>heima-leadnews<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.heima<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>1.0-SNAPSHOT<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">parent</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">packaging</span>&gt;</span>pom<span class="tag">&lt;/<span class="name">packaging</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">modules</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">module</span>&gt;</span>heima-leadnews-user<span class="tag">&lt;/<span class="name">module</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">modules</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">modelVersion</span>&gt;</span>4.0.0<span class="tag">&lt;/<span class="name">modelVersion</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>heima-leadnews-service<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">properties</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">maven.compiler.source</span>&gt;</span>8<span class="tag">&lt;/<span class="name">maven.compiler.source</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">maven.compiler.target</span>&gt;</span>8<span class="tag">&lt;/<span class="name">maven.compiler.target</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">properties</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependencies</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 数据模型子模块 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.heima<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>heima-leadnews-model<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- 公共子模块 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.heima<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>heima-leadnews-common<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- 远程调用子模块 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.heima<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>heima-leadnews-feign-api<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- Spring Boot Web starter --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-web<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- Spring Boot Test测试 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-test<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">scope</span>&gt;</span>test<span class="tag">&lt;/<span class="name">scope</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- Nacos注册中心 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.alibaba.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-alibaba-nacos-discovery<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- Nacos配置中心 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.alibaba.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-alibaba-nacos-config<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- Feign远程调用客户端 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-openfeign<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependencies</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">project</span>&gt;</span></span><br></pre></td></tr></table></figure>
<ol>
<li><p>创建子模块并创建出对应的目录结构</p>
<p>在heima-leadnews-service父工程下创建工程heima-leadnews-user</p>
<p><img src="/pictures/image-20230812172036450.png" alt="image-20230812172036450"></p>
</li>
<li><p>编写用户模块的配置文件</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">server:</span></span><br><span class="line"> <span class="attr">port:</span> <span class="number">51801</span></span><br><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">application:</span></span><br><span class="line"> <span class="attr">name:</span> <span class="string">leadnews-user</span></span><br><span class="line"> <span class="attr">cloud:</span></span><br><span class="line"> <span class="attr">nacos:</span></span><br><span class="line"> <span class="attr">discovery:</span></span><br><span class="line"> <span class="attr">server-addr:</span> <span class="number">192.168</span><span class="number">.200</span><span class="number">.130</span><span class="string">:8848</span></span><br><span class="line"> <span class="attr">config:</span></span><br><span class="line"> <span class="attr">server-addr:</span> <span class="number">192.168</span><span class="number">.200</span><span class="number">.130</span><span class="string">:8848</span></span><br><span class="line"> <span class="attr">file-extension:</span> <span class="string">yml</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>在配置中心中添加数据库等相关的配置</p>
<p><img src="/pictures/image-20230812173024036.png" alt="image-20230812173024036"></p>
</li>
<li><p>在resources目录下添加日志的配置文件</p>
<p>logback.xml</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;?xml version=<span class="string">&quot;1.0&quot;</span> encoding=<span class="string">&quot;UTF-8&quot;</span>?&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">configuration</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--定义日志文件的存储地址,使用绝对路径--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">property</span> <span class="attr">name</span>=<span class="string">&quot;LOG_HOME&quot;</span> <span class="attr">value</span>=<span class="string">&quot;e:/logs&quot;</span>/&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- Console 输出设置 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender</span> <span class="attr">name</span>=<span class="string">&quot;CONSOLE&quot;</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.ConsoleAppender&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">encoder</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--格式化输出:%d表示日期%thread表示线程名%-5level级别从左显示5个字符宽度%msg日志消息%n是换行符--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">pattern</span>&gt;</span>%d&#123;yyyy-MM-dd HH:mm:ss.SSS&#125; [%thread] %-5level %logger&#123;36&#125; - %msg%n<span class="tag">&lt;/<span class="name">pattern</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">charset</span>&gt;</span>utf8<span class="tag">&lt;/<span class="name">charset</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">encoder</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">appender</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- 按照每天生成日志文件 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender</span> <span class="attr">name</span>=<span class="string">&quot;FILE&quot;</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.rolling.RollingFileAppender&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">rollingPolicy</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.core.rolling.TimeBasedRollingPolicy&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--日志文件输出的文件名--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">fileNamePattern</span>&gt;</span>$&#123;LOG_HOME&#125;/leadnews.%d&#123;yyyy-MM-dd&#125;.log<span class="tag">&lt;/<span class="name">fileNamePattern</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">rollingPolicy</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">encoder</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">pattern</span>&gt;</span>%d&#123;yyyy-MM-dd HH:mm:ss.SSS&#125; [%thread] %-5level %logger&#123;36&#125; - %msg%n<span class="tag">&lt;/<span class="name">pattern</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">encoder</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">appender</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- 异步输出 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender</span> <span class="attr">name</span>=<span class="string">&quot;ASYNC&quot;</span> <span class="attr">class</span>=<span class="string">&quot;ch.qos.logback.classic.AsyncAppender&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">discardingThreshold</span>&gt;</span>0<span class="tag">&lt;/<span class="name">discardingThreshold</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 更改默认的队列的深度,该值会影响性能.默认值为256 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">queueSize</span>&gt;</span>512<span class="tag">&lt;/<span class="name">queueSize</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 添加附加的appender,最多只能添加一个 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;FILE&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">appender</span>&gt;</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">logger</span> <span class="attr">name</span>=<span class="string">&quot;org.apache.ibatis.cache.decorators.LoggingCache&quot;</span> <span class="attr">level</span>=<span class="string">&quot;DEBUG&quot;</span> <span class="attr">additivity</span>=<span class="string">&quot;false&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;CONSOLE&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">logger</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">logger</span> <span class="attr">name</span>=<span class="string">&quot;org.springframework.boot&quot;</span> <span class="attr">level</span>=<span class="string">&quot;debug&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">root</span> <span class="attr">level</span>=<span class="string">&quot;info&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!--&lt;appender-ref ref=&quot;ASYNC&quot;/&gt;--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;FILE&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">appender-ref</span> <span class="attr">ref</span>=<span class="string">&quot;CONSOLE&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">root</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">configuration</span>&gt;</span></span><br></pre></td></tr></table></figure></li>
</ol>
<p><strong>遇到的问题:</strong></p>
<ol>
<li><p>问题一:引入@EnableDiscoveryClient注解的时候爆红</p>
<p>解决方案:在heima-leadnews-service父工程下加入如下的注解</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!-- Feign远程调用客户端 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-openfeign<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure></li>
</ol>
<h3 id="1-3-登录功能实现"><a href="#1-3-登录功能实现" class="headerlink" title="1.3 登录功能实现"></a>1.3 登录功能实现</h3><h4 id="1-3-1-接口定义"><a href="#1-3-1-接口定义" class="headerlink" title="1.3.1 接口定义"></a>1.3.1 接口定义</h4><table>
<thead>
<tr>
<th><strong>接口路径</strong></th>
<th>&#x2F;api&#x2F;v1&#x2F;login&#x2F;login_auth</th>
</tr>
</thead>
<tbody><tr>
<td>请求方式</td>
<td>POST</td>
</tr>
<tr>
<td>参数</td>
<td>LoginDto</td>
</tr>
<tr>
<td>响应结果</td>
<td>ResponseResult</td>
</tr>
</tbody></table>
<p>LoginDto </p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">LoginDto</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 手机号</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@ApiModelProperty(value = &quot;手机号&quot;,required = true)</span></span><br><span class="line"> <span class="keyword">private</span> String phone;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 密码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@ApiModelProperty(value = &quot;密码&quot;,required = true)</span></span><br><span class="line"> <span class="keyword">private</span> String password;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>统一返回结果类</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.model.common.dtos;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.fastjson.JSON;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.enums.AppHttpCodeEnum;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.Serializable;</span><br><span class="line"><span class="keyword">import</span> java.util.ArrayList;</span><br><span class="line"><span class="keyword">import</span> java.util.HashMap;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 通用的结果返回类</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> &lt;T&gt;</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ResponseResult</span>&lt;T&gt; <span class="keyword">implements</span> <span class="title class_">Serializable</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String host;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> Integer code;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String errorMessage;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> T data;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">ResponseResult</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.code = <span class="number">200</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">ResponseResult</span><span class="params">(Integer code, T data)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.code = code;</span><br><span class="line"> <span class="built_in">this</span>.data = data;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">ResponseResult</span><span class="params">(Integer code, String msg, T data)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.code = code;</span><br><span class="line"> <span class="built_in">this</span>.errorMessage = msg;</span><br><span class="line"> <span class="built_in">this</span>.data = data;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">ResponseResult</span><span class="params">(Integer code, String msg)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.code = code;</span><br><span class="line"> <span class="built_in">this</span>.errorMessage = msg;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> ResponseResult <span class="title function_">errorResult</span><span class="params">(<span class="type">int</span> code, String msg)</span> &#123;</span><br><span class="line"> <span class="type">ResponseResult</span> <span class="variable">result</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ResponseResult</span>();</span><br><span class="line"> <span class="keyword">return</span> result.error(code, msg);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> ResponseResult <span class="title function_">okResult</span><span class="params">(<span class="type">int</span> code, String msg)</span> &#123;</span><br><span class="line"> <span class="type">ResponseResult</span> <span class="variable">result</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ResponseResult</span>();</span><br><span class="line"> <span class="keyword">return</span> result.ok(code, <span class="literal">null</span>, msg);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> ResponseResult <span class="title function_">okResult</span><span class="params">(Object data)</span> &#123;</span><br><span class="line"> <span class="type">ResponseResult</span> <span class="variable">result</span> <span class="operator">=</span> setAppHttpCodeEnum(AppHttpCodeEnum.SUCCESS, AppHttpCodeEnum.SUCCESS.getErrorMessage());</span><br><span class="line"> <span class="keyword">if</span>(data!=<span class="literal">null</span>) &#123;</span><br><span class="line"> result.setData(data);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> result;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> ResponseResult <span class="title function_">errorResult</span><span class="params">(AppHttpCodeEnum enums)</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> setAppHttpCodeEnum(enums,enums.getErrorMessage());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> ResponseResult <span class="title function_">errorResult</span><span class="params">(AppHttpCodeEnum enums, String errorMessage)</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> setAppHttpCodeEnum(enums,errorMessage);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> ResponseResult <span class="title function_">setAppHttpCodeEnum</span><span class="params">(AppHttpCodeEnum enums)</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> okResult(enums.getCode(),enums.getErrorMessage());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> ResponseResult <span class="title function_">setAppHttpCodeEnum</span><span class="params">(AppHttpCodeEnum enums, String errorMessage)</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> okResult(enums.getCode(),errorMessage);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> ResponseResult&lt;?&gt; error(Integer code, String msg) &#123;</span><br><span class="line"> <span class="built_in">this</span>.code = code;</span><br><span class="line"> <span class="built_in">this</span>.errorMessage = msg;</span><br><span class="line"> <span class="keyword">return</span> <span class="built_in">this</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> ResponseResult&lt;?&gt; ok(Integer code, T data) &#123;</span><br><span class="line"> <span class="built_in">this</span>.code = code;</span><br><span class="line"> <span class="built_in">this</span>.data = data;</span><br><span class="line"> <span class="keyword">return</span> <span class="built_in">this</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> ResponseResult&lt;?&gt; ok(Integer code, T data, String msg) &#123;</span><br><span class="line"> <span class="built_in">this</span>.code = code;</span><br><span class="line"> <span class="built_in">this</span>.data = data;</span><br><span class="line"> <span class="built_in">this</span>.errorMessage = msg;</span><br><span class="line"> <span class="keyword">return</span> <span class="built_in">this</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> ResponseResult&lt;?&gt; ok(T data) &#123;</span><br><span class="line"> <span class="built_in">this</span>.data = data;</span><br><span class="line"> <span class="keyword">return</span> <span class="built_in">this</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> Integer <span class="title function_">getCode</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> code;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">setCode</span><span class="params">(Integer code)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.code = code;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">getErrorMessage</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> errorMessage;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">setErrorMessage</span><span class="params">(String errorMessage)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.errorMessage = errorMessage;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> T <span class="title function_">getData</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> data;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">setData</span><span class="params">(T data)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.data = data;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">getHost</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> host;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">setHost</span><span class="params">(String host)</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.host = host;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> <span class="comment">//前置</span></span><br><span class="line"> <span class="comment">/*AppHttpCodeEnum success = AppHttpCodeEnum.SUCCESS;</span></span><br><span class="line"><span class="comment"> System.out.println(success.getCode());</span></span><br><span class="line"><span class="comment"> System.out.println(success.getErrorMessage());*/</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//查询一个对象</span></span><br><span class="line"> <span class="comment">/*Map map = new HashMap();</span></span><br><span class="line"><span class="comment"> map.put(&quot;name&quot;,&quot;zhangsan&quot;);</span></span><br><span class="line"><span class="comment"> map.put(&quot;age&quot;,18);</span></span><br><span class="line"><span class="comment"> ResponseResult result = ResponseResult.okResult(map);</span></span><br><span class="line"><span class="comment"> System.out.println(JSON.toJSONString(result));*/</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">//新增,修改,删除 在项目中统一返回成功即可</span></span><br><span class="line"> <span class="comment">/* ResponseResult result = ResponseResult.errorResult(AppHttpCodeEnum.SUCCESS);</span></span><br><span class="line"><span class="comment"> System.out.println(JSON.toJSONString(result));*/</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">//根据不用的业务返回不同的提示信息 比如:当前操作需要登录、参数错误</span></span><br><span class="line"> <span class="comment">/*ResponseResult result = ResponseResult.errorResult(AppHttpCodeEnum.NEED_LOGIN);</span></span><br><span class="line"><span class="comment"> System.out.println(JSON.toJSONString(result));*/</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//查询分页信息</span></span><br><span class="line"> <span class="type">PageResponseResult</span> <span class="variable">responseResult</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PageResponseResult</span>(<span class="number">1</span>,<span class="number">5</span>,<span class="number">50</span>);</span><br><span class="line"> <span class="type">List</span> <span class="variable">list</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ArrayList</span>();</span><br><span class="line"> list.add(<span class="string">&quot;itcast&quot;</span>);</span><br><span class="line"> list.add(<span class="string">&quot;itheima&quot;</span>);</span><br><span class="line"> responseResult.setData(list);</span><br><span class="line"> System.out.println(JSON.toJSONString(responseResult));</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="1-3-2-登录思路分析"><a href="#1-3-2-登录思路分析" class="headerlink" title="1.3.2 登录思路分析"></a>1.3.2 登录思路分析</h4><p><img src="/pictures/image-20230812180918302.png" alt="image-20230812180918302"></p>
<h4 id="1-3-3-登录关键代码实现"><a href="#1-3-3-登录关键代码实现" class="headerlink" title="1.3.3 登录关键代码实现"></a>1.3.3 登录关键代码实现</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.user.service.impl;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.core.toolkit.Wrappers;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.dtos.ResponseResult;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.enums.AppHttpCodeEnum;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.user.dtos.LoginDto;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.user.pojos.ApUser;</span><br><span class="line"><span class="keyword">import</span> com.heima.user.mapper.ApUserMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.user.service.ApUserService;</span><br><span class="line"><span class="keyword">import</span> com.heima.utils.common.AppJwtUtil;</span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.apache.commons.lang3.StringUtils;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Service;</span><br><span class="line"><span class="keyword">import</span> org.springframework.transaction.annotation.Transactional;</span><br><span class="line"><span class="keyword">import</span> org.springframework.util.DigestUtils;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.HashMap;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/12</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Service</span></span><br><span class="line"><span class="meta">@Transactional</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ApUserServiceImpl</span> <span class="keyword">extends</span> <span class="title class_">ServiceImpl</span>&lt;ApUserMapper, ApUser&gt; <span class="keyword">implements</span> <span class="title class_">ApUserService</span> &#123;</span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> ResponseResult <span class="title function_">login</span><span class="params">(LoginDto loginDto)</span> &#123;</span><br><span class="line"> <span class="comment">//1 正常的登录 用户名和密码</span></span><br><span class="line"> <span class="keyword">if</span>(StringUtils.isNotBlank(loginDto.getPhone()) &amp;&amp; StringUtils.isNotBlank(loginDto.getPassword())) &#123;</span><br><span class="line"> <span class="comment">//1.1 根据手机号查询用户的信息</span></span><br><span class="line"> <span class="type">ApUser</span> <span class="variable">dbUser</span> <span class="operator">=</span> getOne(<span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;ApUser&gt;().eq(ApUser::getPhone, loginDto.getPhone()));</span><br><span class="line"> <span class="keyword">if</span>(dbUser == <span class="literal">null</span>)&#123;</span><br><span class="line"> <span class="keyword">return</span> ResponseResult.errorResult(AppHttpCodeEnum.DATA_NOT_EXIST,<span class="string">&quot;用户信息不存在&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">String</span> <span class="variable">salt</span> <span class="operator">=</span> dbUser.getSalt();</span><br><span class="line"> <span class="type">String</span> <span class="variable">password</span> <span class="operator">=</span> loginDto.getPassword();</span><br><span class="line"> <span class="type">String</span> <span class="variable">pwd</span> <span class="operator">=</span> DigestUtils.md5DigestAsHex((password + salt).getBytes());</span><br><span class="line"> <span class="comment">//1.2 比对密码</span></span><br><span class="line"> <span class="keyword">if</span>(!pwd.equals(dbUser.getPassword()))&#123;</span><br><span class="line"> <span class="keyword">return</span> ResponseResult.errorResult(AppHttpCodeEnum.LOGIN_PASSWORD_ERROR);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//1.3 生成token</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">token</span> <span class="operator">=</span> AppJwtUtil.getToken(dbUser.getId().longValue());</span><br><span class="line"> Map&lt;String,Object&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> map.put(<span class="string">&quot;token&quot;</span>,token);</span><br><span class="line"> dbUser.setSalt(<span class="string">&quot;&quot;</span>);</span><br><span class="line"> dbUser.setPassword(<span class="string">&quot;&quot;</span>);</span><br><span class="line"> map.put(<span class="string">&quot;user&quot;</span>,dbUser);</span><br><span class="line"> <span class="keyword">return</span> ResponseResult.okResult(map);</span><br><span class="line"> &#125;<span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//2.游客登录</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">token</span> <span class="operator">=</span> AppJwtUtil.getToken(<span class="number">0L</span>);</span><br><span class="line"> Map&lt;String,Object&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> map.put(<span class="string">&quot;token&quot;</span>,token);</span><br><span class="line"> <span class="keyword">return</span> ResponseResult.okResult(map);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="1-3-4-使用接口工具测试"><a href="#1-3-4-使用接口工具测试" class="headerlink" title="1.3.4 使用接口工具测试"></a>1.3.4 使用接口工具测试</h4><p>接口测试工具使用教程:<a href="https://qingling.icu/posts/35630.html">https://qingling.icu/posts/35630.html</a></p>
<p><img src="/pictures/image-20230813165436808.png" alt="image-20230813165436808"></p>
<h2 id="2-app端网关搭建"><a href="#2-app端网关搭建" class="headerlink" title="2. app端网关搭建"></a>2. app端网关搭建</h2><p>网关的概述</p>
<p><img src="/pictures/image-20230814142355139.png" alt="image-20230814142355139"></p>
<p>项目中搭建的网关</p>
<p><img src="/pictures/image-20230814142700349.png" alt="image-20230814142700349"></p>
<h3 id="2-1-搭建过程"><a href="#2-1-搭建过程" class="headerlink" title="2.1 搭建过程"></a>2.1 搭建过程</h3><p><strong>1.在heima-leadnews-gateway导入以下依赖</strong></p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependencies</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-gateway<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.alibaba.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-alibaba-nacos-discovery<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.alibaba.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-alibaba-nacos-config<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>io.jsonwebtoken<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>jjwt<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependencies</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><strong>2.创建网关的模块</strong></p>
<p><img src="/pictures/image-20230814143113564.png" alt="image-20230814143113564"></p>
<p><strong>3.创建启动类和bootstrap.yml配置文件</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@EnableDiscoveryClient</span></span><br><span class="line"><span class="meta">@SpringBootApplication</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">AppGatewayApplication</span> &#123;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> SpringApplication.run(AppGatewayApplication.class,args);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">server:</span></span><br><span class="line"> <span class="attr">port:</span> <span class="number">51601</span></span><br><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">application:</span></span><br><span class="line"> <span class="attr">name:</span> <span class="string">leadnews-app-gateway</span></span><br><span class="line"> <span class="attr">cloud:</span></span><br><span class="line"> <span class="attr">nacos:</span></span><br><span class="line"> <span class="attr">discovery:</span></span><br><span class="line"> <span class="attr">server-addr:</span> <span class="number">192.168</span><span class="number">.200</span><span class="number">.130</span><span class="string">:8848</span></span><br><span class="line"> <span class="attr">config:</span></span><br><span class="line"> <span class="attr">server-addr:</span> <span class="number">192.168</span><span class="number">.200</span><span class="number">.130</span><span class="string">:8848</span></span><br><span class="line"> <span class="attr">file-extension:</span> <span class="string">yml</span></span><br></pre></td></tr></table></figure>
<p><strong>4.在nacos中创建app端网关的配置</strong></p>
<p><img src="/pictures/image-20230814143939252.png" alt="image-20230814143939252"></p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">cloud:</span></span><br><span class="line"> <span class="attr">gateway:</span></span><br><span class="line"> <span class="attr">globalcors:</span></span><br><span class="line"> <span class="attr">add-to-simple-url-handler-mapping:</span> <span class="literal">true</span></span><br><span class="line"> <span class="attr">corsConfigurations:</span></span><br><span class="line"> <span class="string">&#x27;[/**]&#x27;</span><span class="string">:</span></span><br><span class="line"> <span class="attr">allowedHeaders:</span> <span class="string">&quot;*&quot;</span></span><br><span class="line"> <span class="attr">allowedOrigins:</span> <span class="string">&quot;*&quot;</span></span><br><span class="line"> <span class="attr">allowedMethods:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">GET</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">POST</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">DELETE</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">PUT</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">OPTION</span></span><br><span class="line"> <span class="attr">routes:</span></span><br><span class="line"> <span class="comment"># 平台管理</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">id:</span> <span class="string">user</span></span><br><span class="line"> <span class="attr">uri:</span> <span class="string">lb://leadnews-user</span></span><br><span class="line"> <span class="attr">predicates:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">Path=/user/**</span></span><br><span class="line"> <span class="attr">filters:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">StripPrefix=</span> <span class="number">1</span></span><br></pre></td></tr></table></figure>
<p><strong>5.使用Postman测试网关</strong></p>
<p><a href="http://localhost:51601/user/api/v1/login/login_auth">http://localhost:51601/user/api/v1/login/login_auth</a></p>
<p><img src="/pictures/image-20230814144314358.png" alt="image-20230814144314358"></p>
<h3 id="2-2-全局过滤器实现jwt校验"><a href="#2-2-全局过滤器实现jwt校验" class="headerlink" title="2.2 全局过滤器实现jwt校验"></a>2.2 全局过滤器实现jwt校验</h3><p>网关的过滤流程</p>
<p><img src="/pictures/image-20230814144806282.png" alt="image-20230814144806282"></p>
<p>思路分析:</p>
<ol>
<li>用户进入网关开始登陆,网关过滤器进行判断,如果是登录,则路由到后台管理微服务进行登录</li>
<li>用户登录成功后台管理微服务签发JWT TOKEN信息返回给用户</li>
<li>用户再次进入网关开始访问网关过滤器接收用户携带的TOKEN </li>
<li>网关过滤器解析TOKEN ,判断是否有权限,如果有,则放行,如果没有则返回未认证错误</li>
</ol>
<p><strong>JWT认证的过滤器</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/14</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 权限认证的过滤器</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">AuthorizeFilter</span> <span class="keyword">implements</span> <span class="title class_">Ordered</span>, GlobalFilter &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 过滤的设置</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> Mono&lt;Void&gt; <span class="title function_">filter</span><span class="params">(ServerWebExchange exchange, GatewayFilterChain chain)</span> &#123;</span><br><span class="line"> <span class="comment">//1.获取request和response对象</span></span><br><span class="line"> <span class="type">ServerHttpRequest</span> <span class="variable">request</span> <span class="operator">=</span> exchange.getRequest();</span><br><span class="line"> <span class="type">ServerHttpResponse</span> <span class="variable">response</span> <span class="operator">=</span> exchange.getResponse();</span><br><span class="line"></span><br><span class="line"> <span class="comment">//2.判断是否登录</span></span><br><span class="line"> <span class="comment">//通过请求的路径的url判断</span></span><br><span class="line"> <span class="keyword">if</span> (request.getURI().getPath().contains(<span class="string">&quot;/login&quot;</span>)) &#123;</span><br><span class="line"> <span class="comment">//放行</span></span><br><span class="line"> <span class="keyword">return</span> chain.filter(exchange);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//3.获取token</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">token</span> <span class="operator">=</span> request.getHeaders().getFirst(<span class="string">&quot;token&quot;</span>);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//4.判断token是否存在</span></span><br><span class="line"> <span class="keyword">if</span> (StringUtils.isBlank(token)) &#123;</span><br><span class="line"> <span class="comment">//设置401的状态码</span></span><br><span class="line"> response.setStatusCode(HttpStatus.UNAUTHORIZED);</span><br><span class="line"> <span class="keyword">return</span> response.setComplete();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//5.判断token是否有效</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//获取token中的数据</span></span><br><span class="line"> <span class="type">Claims</span> <span class="variable">claims</span> <span class="operator">=</span> AppJwtUtil.getClaimsBody(token);</span><br><span class="line"> <span class="comment">//判断token是否过期 -1有效0有效1过期2过期</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">res</span> <span class="operator">=</span> AppJwtUtil.verifyToken(claims);</span><br><span class="line"> <span class="keyword">if</span> (res == <span class="number">1</span> || res == <span class="number">2</span>) &#123;</span><br><span class="line"> <span class="comment">//设置401的状态码</span></span><br><span class="line"> response.setStatusCode(HttpStatus.UNAUTHORIZED);</span><br><span class="line"> <span class="keyword">return</span> response.setComplete();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="comment">//设置401的状态码</span></span><br><span class="line"> response.setStatusCode(HttpStatus.UNAUTHORIZED);</span><br><span class="line"> <span class="keyword">return</span> response.setComplete();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//6.放行</span></span><br><span class="line"> <span class="keyword">return</span> chain.filter(exchange);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 优先级设置 值越小 优先值越高</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">getOrder</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="3-app前端项目集成"><a href="#3-app前端项目集成" class="headerlink" title="3.app前端项目集成"></a>3.app前端项目集成</h2><p><img src="/pictures/image-20230814151319382.png" alt="image-20230814151319382"></p>
<p>通过nginx来进行配置功能如下</p>
<ul>
<li>通过nginx的反向代理功能访问后台的网关资源</li>
<li>通过nginx的静态服务器功能访问前端静态页面</li>
</ul>
<h3 id="3-1-Nginx集成前端项目步骤"><a href="#3-1-Nginx集成前端项目步骤" class="headerlink" title="3.1 Nginx集成前端项目步骤"></a>3.1 Nginx集成前端项目步骤</h3><p><strong>①解压资料文件夹中的压缩包nginx-1.18.0.zip</strong></p>
<p>cmd切换到nginx所有的目录输入nginx启动nginx</p>
<p><img src="/pictures/image-20230814152058708.png" alt="image-20230814152058708"></p>
<p><img src="/pictures/image-20230814152144765.png" alt="image-20230814152144765"></p>
<p><strong>②解压资料文件夹中的前端项目app-web.zip</strong></p>
<p>解压到一个没有中文的文件夹中后面nginx配置中会指向这个目录</p>
<p><strong>③配置nginx.conf文件</strong></p>
<p>在nginx安装的conf目录下新建一个文件夹<code>leadnews.conf</code>,在当前文件夹中新建<code>heima-leadnews-app.conf</code>文件</p>
<p>heima-leadnews-app.conf配置如下</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">upstream heima-app-gateway&#123;</span><br><span class="line"> #APP端网关所在的端口</span><br><span class="line"> server localhost:51601;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">server &#123;</span><br><span class="line"> listen 8801;</span><br><span class="line"> location / &#123;</span><br><span class="line"> root C:/Gong/data/app-web/;</span><br><span class="line"> index index.html;</span><br><span class="line"> &#125;</span><br><span class="line"> </span><br><span class="line"> location ~/app/(.*) &#123;</span><br><span class="line"> proxy_pass http://heima-app-gateway/$1;</span><br><span class="line"> proxy_set_header HOST $host; # 不改变源请求头的值</span><br><span class="line"> proxy_pass_request_body on; #开启获取请求体</span><br><span class="line"> proxy_pass_request_headers on; #开启获取请求头</span><br><span class="line"> proxy_set_header X-Real-IP $remote_addr; # 记录真实发出请求的客户端IP</span><br><span class="line"> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #记录代理信息</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>nginx.conf 把里面注释的内容和静态资源配置相关删除引入heima-leadnews-app.conf文件加载</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line">#user nobody;</span><br><span class="line">worker_processes <span class="number">1</span>;</span><br><span class="line"></span><br><span class="line">events &#123;</span><br><span class="line"> worker_connections <span class="number">1024</span>;</span><br><span class="line">&#125;</span><br><span class="line">http &#123;</span><br><span class="line"> include mime.<span class="property">types</span>;</span><br><span class="line"> default_type application/octet-stream;</span><br><span class="line"> sendfile on;</span><br><span class="line"> keepalive_timeout <span class="number">65</span>;</span><br><span class="line"> # 引入自定义配置文件</span><br><span class="line"> include leadnews.<span class="property">conf</span><span class="comment">/*.conf;</span></span><br><span class="line"><span class="comment">&#125;</span></span><br></pre></td></tr></table></figure>
<p><strong>④ 启动nginx</strong></p>
<p> 在nginx安装包中使用命令提示符打开输入命令nginx启动项目</p>
<p> 可查看进程检查nginx是否启动</p>
<p> 重新加载配置文件:<code>nginx -s reload</code></p>
<p><strong>⑤:打开前端项目进行测试 &gt; <a href="http://localhost:8801/">http://localhost:8801</a></strong></p>
<p> 用谷歌浏览器打开,调试移动端模式进行访问</p>
<p><img src="/pictures/image-20230814153335349.png" alt="image-20230814153335349"></p>
<h2 id="4-app端文章列表功能"><a href="#4-app端文章列表功能" class="headerlink" title="4.app端文章列表功能"></a>4.app端文章列表功能</h2><p><strong>开发前app的首页面</strong></p>
<p><img src="/pictures/image-20230814154205134.png" alt="image-20230814154205134"></p>
<p><strong>文章的布局展示</strong></p>
<p><img src="/pictures/image-20230814154405531.png" alt="image-20230814154405531"></p>
<h3 id="4-1-数据库表的创建"><a href="#4-1-数据库表的创建" class="headerlink" title="4.1 数据库表的创建"></a>4.1 数据库表的创建</h3><p><strong>文章的相关的数据库</strong></p>
<table>
<thead>
<tr>
<th><strong>表名称</strong></th>
<th><strong>说明</strong></th>
</tr>
</thead>
<tbody><tr>
<td>ap_article</td>
<td>文章信息表,存储已发布的文章</td>
</tr>
<tr>
<td>ap_article_config</td>
<td>APP已发布文章配置表</td>
</tr>
<tr>
<td>ap_article_content</td>
<td>APP已发布文章内容表</td>
</tr>
<tr>
<td>ap_author</td>
<td>APP文章作者信息表</td>
</tr>
<tr>
<td>ap_collection</td>
<td>APP收藏信息表</td>
</tr>
</tbody></table>
<p><strong>导入资料中的sql文件创建相关的数据库表</strong></p>
<p><img src="/pictures/image-20230814160312382.png" alt="image-20230814160312382"></p>
<p><strong>关键的数据库表</strong></p>
<p>文章基本信息表</p>
<p><img src="/pictures/image-20230814160547893.png" alt="image-20230814160547893"></p>
<p> APP已发布文章配置表 </p>
<p><img src="/pictures/image-20230814160652330.png" alt="image-20230814160652330"></p>
<p>APP已发布文章内容表 </p>
<p><img src="/pictures/image-20230814160728715.png" alt="image-20230814160728715"></p>
<p>APP文章作者信息表 </p>
<p><img src="/pictures/image-20230814160805398.png" alt="image-20230814160805398"></p>
<p>APP收藏信息表 </p>
<p><img src="/pictures/image-20230814160823771.png" alt="image-20230814160823771"></p>
<p><strong>垂直分表</strong></p>
<p>将文章相关的表分成文章配置表和文章内容表和文章信息表</p>
<p><img src="/pictures/image-20230814161909312.png" alt="image-20230814161909312"></p>
<p>垂直分表:将一个表的字段分散到多个表中,每个表存储其中一部分字段</p>
<p><strong>优势:</strong></p>
<ol>
<li><p>减少IO争抢减少锁表的几率查看文章概述与文章详情互不影响</p>
</li>
<li><p>充分发挥高频数据的操作效率,对文章概述数据操作的高效率不会被操作文章详情数据的低效率所拖累</p>
</li>
</ol>
<p><strong>拆分规则:</strong></p>
<p>1.把不常用的字段单独放在一张表</p>
<p>2.把textblob等大字段拆分出来单独放在一张表</p>
<p>3.经常组合查询的字段单独放在一张表中</p>
<h3 id="4-2-文章模块搭建"><a href="#4-2-文章模块搭建" class="headerlink" title="4.2 文章模块搭建"></a>4.2 文章模块搭建</h3><p><strong>导入资料中的模块</strong></p>
<p><img src="/pictures/image-20230815184540157.png" alt="image-20230815184540157"></p>
<p><strong>在nacos中添加配置</strong></p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">datasource:</span></span><br><span class="line"> <span class="attr">driver-class-name:</span> <span class="string">com.mysql.jdbc.Driver</span></span><br><span class="line"> <span class="attr">url:</span> <span class="string">jdbc:mysql://localhost:3306/leadnews_article?useUnicode=true&amp;characterEncoding=UTF-8&amp;serverTimezone=UTC</span></span><br><span class="line"> <span class="attr">username:</span> <span class="string">root</span></span><br><span class="line"> <span class="attr">password:</span> <span class="number">123456</span></span><br><span class="line"><span class="comment"># 设置Mapper接口所对应的XML文件位置如果你在Mapper接口中有自定义方法需要进行该配置</span></span><br><span class="line"><span class="attr">mybatis-plus:</span></span><br><span class="line"> <span class="attr">mapper-locations:</span> <span class="string">classpath*:mapper/*.xml</span></span><br><span class="line"> <span class="comment"># 设置别名包扫描路径,通过该属性可以给包中的类注册别名</span></span><br><span class="line"> <span class="attr">type-aliases-package:</span> <span class="string">com.heima.model.article.pojos</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230815162119814.png" alt="image-20230815162119814"></p>
<p><strong>踩坑</strong>: 在导入项目的时候提示Caused by: java.io.FileNotFoundException: class path resource [com&#x2F;heima&#x2F;apis&#x2F;article&#x2F;IArticleClient.class] cannot be opened because it does not exist ,先删除这个项目,手动创建这个项目,然后复制资料里面文件到这个项目即可,直接复制整个项目可能会报这个错!</p>
<h3 id="4-3-首页文章的列表显示"><a href="#4-3-首页文章的列表显示" class="headerlink" title="4.3 首页文章的列表显示"></a>4.3 首页文章的列表显示</h3><p><strong>首页上拉和下拉的实现思路</strong></p>
<p><img src="/pictures/image-20230814163019582.png" alt="image-20230814163019582"></p>
<p><strong>Sql语句实现</strong></p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line">#按照发布时间倒序查询十条文章</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> ap_article aa <span class="keyword">order</span> <span class="keyword">by</span> aa.publish_time <span class="keyword">desc</span> limit <span class="number">10</span></span><br><span class="line">#频道筛选</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> ap_article aa <span class="keyword">where</span> aa.channel_id <span class="operator">=</span> <span class="number">1</span> <span class="keyword">order</span> <span class="keyword">by</span> aa.publish_time <span class="keyword">desc</span> limit <span class="number">10</span></span><br><span class="line">#加载首页</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> ap_article aa <span class="keyword">where</span> aa.channel_id <span class="operator">=</span> <span class="number">1</span> <span class="keyword">and</span> aa.publish_time <span class="operator">&lt;</span> <span class="string">&#x27;2063-09-08 10:20:12&#x27;</span> <span class="keyword">order</span> <span class="keyword">by</span> aa.publish_time <span class="keyword">desc</span> limit <span class="number">10</span></span><br><span class="line">#加载更多</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> ap_article aa <span class="keyword">where</span> aa.channel_id <span class="operator">=</span> <span class="number">1</span> <span class="keyword">and</span> aa.publish_time <span class="operator">&lt;</span> <span class="string">&#x27;2020-09-07 22:30:09&#x27;</span> <span class="keyword">order</span> <span class="keyword">by</span> aa.publish_time <span class="keyword">desc</span> limit <span class="number">10</span></span><br><span class="line">#加载最新</span><br><span class="line"><span class="keyword">select</span> <span class="operator">*</span> <span class="keyword">from</span> ap_article aa <span class="keyword">where</span> aa.channel_id <span class="operator">=</span> <span class="number">1</span> <span class="keyword">and</span> aa.publish_time <span class="operator">&gt;</span> <span class="string">&#x27;2020-09-07 22:30:09&#x27;</span> <span class="keyword">order</span> <span class="keyword">by</span> aa.publish_time <span class="keyword">desc</span> limit <span class="number">10</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230815160034436.png" alt="image-20230815160034436"></p>
<h4 id="4-2-1-接口定义"><a href="#4-2-1-接口定义" class="headerlink" title="4.2.1 接口定义"></a>4.2.1 接口定义</h4><table>
<thead>
<tr>
<th></th>
<th><strong>加载首页</strong></th>
<th><strong>加载更多</strong></th>
<th><strong>加载最新</strong></th>
</tr>
</thead>
<tbody><tr>
<td>接口路径</td>
<td>&#x2F;api&#x2F;v1&#x2F;article&#x2F;load</td>
<td>&#x2F;api&#x2F;v1&#x2F;article&#x2F;loadmore</td>
<td>&#x2F;api&#x2F;v1&#x2F;article&#x2F;loadnew</td>
</tr>
<tr>
<td>请求方式</td>
<td>POST</td>
<td>POST</td>
<td>POST</td>
</tr>
<tr>
<td>参数</td>
<td>ArticleHomeDto</td>
<td>ArticleHomeDto</td>
<td>ArticleHomeDto</td>
</tr>
<tr>
<td>响应结果</td>
<td>ResponseResult</td>
<td>ResponseResult</td>
<td>ResponseResult</td>
</tr>
</tbody></table>
<p>ArticleHomeDto</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.model.article.dtos;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ArticleHomeDto</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 最大时间</span></span><br><span class="line"> Date maxBehotTime;</span><br><span class="line"> <span class="comment">// 最小时间</span></span><br><span class="line"> Date minBehotTime;</span><br><span class="line"> <span class="comment">// 分页size</span></span><br><span class="line"> Integer size;</span><br><span class="line"> <span class="comment">// 频道ID</span></span><br><span class="line"> String tag;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="4-2-2-实现思路"><a href="#4-2-2-实现思路" class="headerlink" title="4.2.2 实现思路"></a>4.2.2 实现思路</h4><p><strong>①导入heima-leadnews-article微服务资料在当天的文件夹中</strong></p>
<p> <strong>需要在nacos中添加对应的配置</strong></p>
<p><strong>②:定义接口</strong></p>
<p> <strong>接口路径、请求方式、入参、出参</strong></p>
<p><strong>③编写mapper文件</strong></p>
<p> <strong>文章表与文章配置表多表查询</strong></p>
<p><strong>④:编写业务层代码</strong></p>
<p><strong>⑤:编写控制器代码</strong></p>
<p><strong>⑥swagger测试或前后端联调测试</strong></p>
<h4 id="4-2-3-功能的关键代码实现"><a href="#4-2-3-功能的关键代码实现" class="headerlink" title="4.2.3 功能的关键代码实现"></a>4.2.3 功能的关键代码实现</h4><p>mapper层的代码</p>
<p><img src="/pictures/image-20230816142705510.png" alt="image-20230816142705510"></p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;?xml version=<span class="string">&quot;1.0&quot;</span> encoding=<span class="string">&quot;UTF-8&quot;</span>?&gt;</span></span><br><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">mapper</span> <span class="keyword">PUBLIC</span> <span class="string">&quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;</span> <span class="string">&quot;http://mybatis.org/dtd/mybatis-3-mapper.dtd&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">mapper</span> <span class="attr">namespace</span>=<span class="string">&quot;com.heima.article.mapper.ApArticleMapper&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">resultMap</span> <span class="attr">id</span>=<span class="string">&quot;resultMap&quot;</span> <span class="attr">type</span>=<span class="string">&quot;com.heima.model.article.pojos.ApArticle&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">id</span> <span class="attr">column</span>=<span class="string">&quot;id&quot;</span> <span class="attr">property</span>=<span class="string">&quot;id&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;title&quot;</span> <span class="attr">property</span>=<span class="string">&quot;title&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;author_id&quot;</span> <span class="attr">property</span>=<span class="string">&quot;authorId&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;author_name&quot;</span> <span class="attr">property</span>=<span class="string">&quot;authorName&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;channel_id&quot;</span> <span class="attr">property</span>=<span class="string">&quot;channelId&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;channel_name&quot;</span> <span class="attr">property</span>=<span class="string">&quot;channelName&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;layout&quot;</span> <span class="attr">property</span>=<span class="string">&quot;layout&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;flag&quot;</span> <span class="attr">property</span>=<span class="string">&quot;flag&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;images&quot;</span> <span class="attr">property</span>=<span class="string">&quot;images&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;labels&quot;</span> <span class="attr">property</span>=<span class="string">&quot;labels&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;likes&quot;</span> <span class="attr">property</span>=<span class="string">&quot;likes&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;collection&quot;</span> <span class="attr">property</span>=<span class="string">&quot;collection&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;comment&quot;</span> <span class="attr">property</span>=<span class="string">&quot;comment&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;views&quot;</span> <span class="attr">property</span>=<span class="string">&quot;views&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;province_id&quot;</span> <span class="attr">property</span>=<span class="string">&quot;provinceId&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;city_id&quot;</span> <span class="attr">property</span>=<span class="string">&quot;cityId&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;county_id&quot;</span> <span class="attr">property</span>=<span class="string">&quot;countyId&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;created_time&quot;</span> <span class="attr">property</span>=<span class="string">&quot;createdTime&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;publish_time&quot;</span> <span class="attr">property</span>=<span class="string">&quot;publishTime&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;sync_status&quot;</span> <span class="attr">property</span>=<span class="string">&quot;syncStatus&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">result</span> <span class="attr">column</span>=<span class="string">&quot;static_url&quot;</span> <span class="attr">property</span>=<span class="string">&quot;staticUrl&quot;</span>/&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">resultMap</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">select</span> <span class="attr">id</span>=<span class="string">&quot;loadArticleList&quot;</span> <span class="attr">resultMap</span>=<span class="string">&quot;resultMap&quot;</span>&gt;</span></span><br><span class="line"> SELECT</span><br><span class="line"> aa.*</span><br><span class="line"> FROM</span><br><span class="line"> `ap_article` aa</span><br><span class="line"> LEFT JOIN ap_article_config aac ON aa.id = aac.article_id</span><br><span class="line"> <span class="tag">&lt;<span class="name">where</span>&gt;</span></span><br><span class="line"> and aac.is_delete != 1</span><br><span class="line"> and aac.is_down != 1</span><br><span class="line"> <span class="comment">&lt;!-- loadmore --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">if</span> <span class="attr">test</span>=<span class="string">&quot;type != null and type == 1&quot;</span>&gt;</span></span><br><span class="line"> and aa.publish_time &lt;![CDATA[&lt;]]&gt; #&#123;dto.minBehotTime&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">if</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">if</span> <span class="attr">test</span>=<span class="string">&quot;type != null and type == 2&quot;</span>&gt;</span></span><br><span class="line"> and aa.publish_time &lt;![CDATA[&gt;]]&gt; #&#123;dto.maxBehotTime&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">if</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">if</span> <span class="attr">test</span>=<span class="string">&quot;dto.tag != &#x27;__all__&#x27;&quot;</span>&gt;</span></span><br><span class="line"> and aa.channel_id = #&#123;dto.tag&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">if</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">where</span>&gt;</span></span><br><span class="line"> order by aa.publish_time desc</span><br><span class="line"> limit #&#123;dto.size&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">select</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">mapper</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>service层的代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.article.service.Impl;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;</span><br><span class="line"><span class="keyword">import</span> com.heima.article.mapper.ApArticleMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.article.service.ApArticleService;</span><br><span class="line"><span class="keyword">import</span> com.heima.common.constants.ArticleConstants;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.article.dtos.ArticleHomeDto;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.article.pojos.ApArticle;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.dtos.ResponseResult;</span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.apache.commons.lang.StringUtils;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Service;</span><br><span class="line"><span class="keyword">import</span> org.springframework.transaction.annotation.Transactional;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/15</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Service</span></span><br><span class="line"><span class="meta">@Transactional</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ApArticleServiceImpl</span> <span class="keyword">extends</span> <span class="title class_">ServiceImpl</span>&lt;ApArticleMapper, ApArticle&gt; <span class="keyword">implements</span> <span class="title class_">ApArticleService</span> &#123;</span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> ApArticleMapper apArticleMapper;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">Integer</span> <span class="variable">MAX_PAGE_SIZE</span> <span class="operator">=</span> <span class="number">50</span>;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> ResponseResult <span class="title function_">load</span><span class="params">(ArticleHomeDto dto, Short type)</span> &#123;</span><br><span class="line"> <span class="comment">//1.参数校验</span></span><br><span class="line"> <span class="comment">//分页条数的校验</span></span><br><span class="line"> <span class="type">Integer</span> <span class="variable">size</span> <span class="operator">=</span> dto.getSize();</span><br><span class="line"> <span class="keyword">if</span> (size == <span class="literal">null</span> || size == <span class="number">0</span>) &#123;</span><br><span class="line"> size = <span class="number">0</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//最大分页条数的限制</span></span><br><span class="line"> size = Math.min(size, <span class="number">50</span>);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//type参数的校验</span></span><br><span class="line"> <span class="keyword">if</span> (!type.equals(ArticleConstants.LOADTYPE_LOAD_MORE) &amp;&amp; !type.equals(ArticleConstants.LOADTYPE_LOAD_NEW)) &#123;</span><br><span class="line"> type = <span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//频道参数校验</span></span><br><span class="line"> <span class="keyword">if</span> (StringUtils.isBlank(dto.getTag())) &#123;</span><br><span class="line"> dto.setTag(ArticleConstants.DEFAULT_TAG);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//时间检验</span></span><br><span class="line"> <span class="keyword">if</span> (dto.getMinBehotTime() == <span class="literal">null</span>) dto.setMinBehotTime(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> <span class="keyword">if</span> (dto.getMaxBehotTime() == <span class="literal">null</span>) dto.setMaxBehotTime(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"></span><br><span class="line"> <span class="comment">//2.查询</span></span><br><span class="line"> List&lt;ApArticle&gt; apArticles = apArticleMapper.loadArticleList(dto, type);</span><br><span class="line"> <span class="comment">//3.数据返回</span></span><br><span class="line"> <span class="keyword">return</span> ResponseResult.okResult(apArticles);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>controller层的代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.article.controller.v1;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.article.service.ApArticleService;</span><br><span class="line"><span class="keyword">import</span> com.heima.common.constants.ArticleConstants;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.article.dtos.ArticleHomeDto;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.dtos.ResponseResult;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.*;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/15</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RestController</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/api/v1/article&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ArticleHomeController</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> ApArticleService apArticleService;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 加载首页</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@PostMapping(&quot;/load&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> ResponseResult&lt;Object&gt; <span class="title function_">load</span><span class="params">(<span class="meta">@RequestBody</span> ArticleHomeDto articleHomeDto)</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> apArticleService.load(articleHomeDto, ArticleConstants.LOADTYPE_LOAD_MORE);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 加载更多</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@PostMapping(&quot;/loadmore&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> ResponseResult&lt;Object&gt; <span class="title function_">loadmore</span><span class="params">(<span class="meta">@RequestBody</span> ArticleHomeDto articleHomeDto)</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> apArticleService.load(articleHomeDto, ArticleConstants.LOADTYPE_LOAD_MORE);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 加载更新</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@PostMapping(&quot;/loadnew&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> ResponseResult&lt;Object&gt; <span class="title function_">loadnew</span><span class="params">(<span class="meta">@RequestBody</span> ArticleHomeDto articleHomeDto)</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> apArticleService.load(articleHomeDto, ArticleConstants.LOADTYPE_LOAD_NEW);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>网关中增加文章模块的路由</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">cloud:</span></span><br><span class="line"> <span class="attr">gateway:</span></span><br><span class="line"> <span class="attr">globalcors:</span></span><br><span class="line"> <span class="attr">add-to-simple-url-handler-mapping:</span> <span class="literal">true</span></span><br><span class="line"> <span class="attr">corsConfigurations:</span></span><br><span class="line"> <span class="string">&#x27;[/**]&#x27;</span><span class="string">:</span></span><br><span class="line"> <span class="attr">allowedHeaders:</span> <span class="string">&quot;*&quot;</span></span><br><span class="line"> <span class="attr">allowedOrigins:</span> <span class="string">&quot;*&quot;</span></span><br><span class="line"> <span class="attr">allowedMethods:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">GET</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">POST</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">DELETE</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">PUT</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">OPTION</span></span><br><span class="line"> <span class="attr">routes:</span></span><br><span class="line"> <span class="comment"># 平台管理</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">id:</span> <span class="string">user</span></span><br><span class="line"> <span class="attr">uri:</span> <span class="string">lb://leadnews-user</span></span><br><span class="line"> <span class="attr">predicates:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">Path=/user/**</span></span><br><span class="line"> <span class="attr">filters:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">StripPrefix=</span> <span class="number">1</span></span><br><span class="line"> <span class="comment"># 文章管理</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">id:</span> <span class="string">article</span></span><br><span class="line"> <span class="attr">uri:</span> <span class="string">lb://leadnews-article</span></span><br><span class="line"> <span class="attr">predicates:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">Path=/article/**</span></span><br><span class="line"> <span class="attr">filters:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">StripPrefix=</span> <span class="number">1</span></span><br></pre></td></tr></table></figure>
<h2 id="5-app端文章详情功能"><a href="#5-app端文章详情功能" class="headerlink" title="5. app端文章详情功能"></a>5. app端文章详情功能</h2><h3 id="5-1-需求分析"><a href="#5-1-需求分析" class="headerlink" title="5.1 需求分析"></a>5.1 需求分析</h3><p><img src="/pictures/image-20230816143201242.png" alt="image-20230816143201242"></p>
<h3 id="5-2-实现方案-静态模板展示"><a href="#5-2-实现方案-静态模板展示" class="headerlink" title="5.2 实现方案-静态模板展示"></a>5.2 实现方案-静态模板展示</h3><p><img src="/pictures/image-20230816143544351.png" alt="image-20230816143544351"></p>
<p><strong>静态模板展示关键技术-Freemarker</strong></p>
<p>Freemarker教程: <a href="https://qingling.icu/posts/29367.html">https://qingling.icu/posts/29367.html</a></p>
<h3 id="5-3-对象存储服务MinIO"><a href="#5-3-对象存储服务MinIO" class="headerlink" title="5.3 对象存储服务MinIO"></a>5.3 对象存储服务MinIO</h3><p>MinIO 教程: <a href="https://qingling.icu/posts/36397.html">https://qingling.icu/posts/36397.html</a></p>
<h3 id="5-4-实现思路以及代码实现"><a href="#5-4-实现思路以及代码实现" class="headerlink" title="5.4 实现思路以及代码实现"></a>5.4 实现思路以及代码实现</h3><p><img src="/pictures/image-20230818210507999.png" alt="image-20230818210507999"></p>
<p><img src="/pictures/image-20230818210638036.png" alt="image-20230818210638036"></p>
<p><strong>代码实现</strong></p>
<p>1.在文章模块的pom.xml文件中加入以下的依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependencies</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-freemarker<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.heima<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>heima-file-starter<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>1.0-SNAPSHOT<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependencies</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>2.在nacos中有关文章模块的配置中添加以下的内容</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">minio:</span></span><br><span class="line"> <span class="attr">accessKey:</span> <span class="string">minio</span></span><br><span class="line"> <span class="attr">secretKey:</span> <span class="string">minio123</span></span><br><span class="line"> <span class="attr">bucket:</span> <span class="string">leadnews</span></span><br><span class="line"> <span class="attr">endpoint:</span> <span class="string">http://192.168.200.130:9000</span></span><br><span class="line"> <span class="attr">readPath:</span> <span class="string">http://192.168.200.130:9000</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230818211310728.png" alt="image-20230818211310728"></p>
<p>3.将资料中的article.ftl文件拷贝到文章模块的templates目录下article.ftl文件内容如下</p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;utf-8&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;IE=edge&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">content</span>=<span class="string">&quot;width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">title</span>&gt;</span>黑马头条<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 引入样式文件 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">&quot;stylesheet&quot;</span> <span class="attr">href</span>=<span class="string">&quot;https://fastly.jsdelivr.net/npm/vant@2.12.20/lib/index.css&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 页面样式 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">&quot;stylesheet&quot;</span> <span class="attr">href</span>=<span class="string">&quot;../../../plugins/css/index.css&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">&quot;app&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;article&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-row</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;24&quot;</span> <span class="attr">class</span>=<span class="string">&quot;article-title&quot;</span> <span class="attr">v-html</span>=<span class="string">&quot;title&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-row</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-row</span> <span class="attr">type</span>=<span class="string">&quot;flex&quot;</span> <span class="attr">align</span>=<span class="string">&quot;center&quot;</span> <span class="attr">class</span>=<span class="string">&quot;article-header&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;3&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-image</span> <span class="attr">round</span> <span class="attr">class</span>=<span class="string">&quot;article-avatar&quot;</span> <span class="attr">src</span>=<span class="string">&quot;https://p3.pstatp.com/thumb/1480/7186611868&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-image</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;16&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">v-html</span>=<span class="string">&quot;authorName&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">div</span>&gt;</span>&#123;&#123; publishTime | timestampToDateTime &#125;&#125;<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;5&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-button</span> <span class="attr">round</span> <span class="attr">:icon</span>=<span class="string">&quot;relation.isfollow ? &#x27;&#x27; : &#x27;plus&#x27;&quot;</span> <span class="attr">type</span>=<span class="string">&quot;info&quot;</span> <span class="attr">class</span>=<span class="string">&quot;article-focus&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">:text</span>=<span class="string">&quot;relation.isfollow ? &#x27;取消关注&#x27; : &#x27;关注&#x27;&quot;</span> <span class="attr">:loading</span>=<span class="string">&quot;followLoading&quot;</span> @<span class="attr">click</span>=<span class="string">&quot;handleClickArticleFollow&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-row</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-row</span> <span class="attr">class</span>=<span class="string">&quot;article-content&quot;</span>&gt;</span></span><br><span class="line"> &lt;#if content??&gt;</span><br><span class="line"> &lt;#list content as item&gt;</span><br><span class="line"> &lt;#if item.type=&#x27;text&#x27;&gt;</span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;24&quot;</span> <span class="attr">class</span>=<span class="string">&quot;article-text&quot;</span>&gt;</span>$&#123;item.value&#125;<span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> &lt;#else&gt;</span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;24&quot;</span> <span class="attr">class</span>=<span class="string">&quot;article-image&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-image</span> <span class="attr">width</span>=<span class="string">&quot;100%&quot;</span> <span class="attr">src</span>=<span class="string">&quot;$&#123;item.value&#125;&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-image</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> &lt;/#if&gt;</span><br><span class="line"> &lt;/#list&gt;</span><br><span class="line"> &lt;/#if&gt;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-row</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-row</span> <span class="attr">type</span>=<span class="string">&quot;flex&quot;</span> <span class="attr">justify</span>=<span class="string">&quot;center&quot;</span> <span class="attr">class</span>=<span class="string">&quot;article-action&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-button</span> <span class="attr">round</span> <span class="attr">:icon</span>=<span class="string">&quot;relation.islike ? &#x27;good-job&#x27; : &#x27;good-job-o&#x27;&quot;</span> <span class="attr">class</span>=<span class="string">&quot;article-like&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">:loading</span>=<span class="string">&quot;likeLoading&quot;</span> <span class="attr">:text</span>=<span class="string">&quot;relation.islike ? &#x27;取消赞&#x27; : &#x27;点赞&#x27;&quot;</span> @<span class="attr">click</span>=<span class="string">&quot;handleClickArticleLike&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-button</span> <span class="attr">round</span> <span class="attr">:icon</span>=<span class="string">&quot;relation.isunlike ? &#x27;delete&#x27; : &#x27;delete-o&#x27;&quot;</span> <span class="attr">class</span>=<span class="string">&quot;article-unlike&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">:loading</span>=<span class="string">&quot;unlikeLoading&quot;</span> @<span class="attr">click</span>=<span class="string">&quot;handleClickArticleUnlike&quot;</span>&gt;</span>不喜欢<span class="tag">&lt;/<span class="name">van-button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-row</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- 文章评论列表 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-list</span> <span class="attr">v-model</span>=<span class="string">&quot;commentsLoading&quot;</span> <span class="attr">:finished</span>=<span class="string">&quot;commentsFinished&quot;</span> <span class="attr">finished-text</span>=<span class="string">&quot;没有更多了&quot;</span></span></span><br><span class="line"><span class="tag"> @<span class="attr">load</span>=<span class="string">&quot;onLoadArticleComments&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-row</span> <span class="attr">id</span>=<span class="string">&quot;#comment-view&quot;</span> <span class="attr">type</span>=<span class="string">&quot;flex&quot;</span> <span class="attr">class</span>=<span class="string">&quot;article-comment&quot;</span> <span class="attr">v-for</span>=<span class="string">&quot;(item, index) in comments&quot;</span> <span class="attr">:key</span>=<span class="string">&quot;index&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;3&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-image</span> <span class="attr">round</span> <span class="attr">src</span>=<span class="string">&quot;https://p3.pstatp.com/thumb/1480/7186611868&quot;</span> <span class="attr">class</span>=<span class="string">&quot;article-avatar&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-image</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;21&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-row</span> <span class="attr">type</span>=<span class="string">&quot;flex&quot;</span> <span class="attr">align</span>=<span class="string">&quot;center&quot;</span> <span class="attr">justify</span>=<span class="string">&quot;space-between&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">class</span>=<span class="string">&quot;comment-author&quot;</span> <span class="attr">v-html</span>=<span class="string">&quot;item.authorName&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-button</span> <span class="attr">round</span> <span class="attr">:icon</span>=<span class="string">&quot;item.operation === 0 ? &#x27;good-job&#x27; : &#x27;good-job-o&#x27;&quot;</span> <span class="attr">size</span>=<span class="string">&quot;normal&quot;</span></span></span><br><span class="line"><span class="tag"> @<span class="attr">click</span>=<span class="string">&quot;handleClickCommentLike(item)&quot;</span>&gt;</span>&#123;&#123; item.likes || &#x27;&#x27; &#125;&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-row</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-row</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">class</span>=<span class="string">&quot;comment-content&quot;</span> <span class="attr">v-html</span>=<span class="string">&quot;item.content&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-row</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-row</span> <span class="attr">type</span>=<span class="string">&quot;flex&quot;</span> <span class="attr">align</span>=<span class="string">&quot;center&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;10&quot;</span> <span class="attr">class</span>=<span class="string">&quot;comment-time&quot;</span>&gt;</span></span><br><span class="line"> &#123;&#123; item.createdTime | timestampToDateTime &#125;&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;3&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-button</span> <span class="attr">round</span> <span class="attr">size</span>=<span class="string">&quot;normal&quot;</span> <span class="attr">v-html</span>=<span class="string">&quot;item.reply&quot;</span> @<span class="attr">click</span>=<span class="string">&quot;showCommentRepliesPopup(item.id)&quot;</span>&gt;</span>回复 &#123;&#123;</span><br><span class="line"> item.reply || &#x27;&#x27; &#125;&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-row</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-row</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-list</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 文章底部栏 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-row</span> <span class="attr">type</span>=<span class="string">&quot;flex&quot;</span> <span class="attr">justify</span>=<span class="string">&quot;space-around&quot;</span> <span class="attr">align</span>=<span class="string">&quot;center&quot;</span> <span class="attr">class</span>=<span class="string">&quot;article-bottom-bar&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;13&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-field</span> <span class="attr">v-model</span>=<span class="string">&quot;commentValue&quot;</span> <span class="attr">placeholder</span>=<span class="string">&quot;写评论&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">template</span> #<span class="attr">button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-button</span> <span class="attr">icon</span>=<span class="string">&quot;back-top&quot;</span> @<span class="attr">click</span>=<span class="string">&quot;handleSaveComment&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">template</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-field</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;3&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-button</span> <span class="attr">icon</span>=<span class="string">&quot;comment-o&quot;</span> @<span class="attr">click</span>=<span class="string">&quot;handleScrollIntoCommentView&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;3&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-button</span> <span class="attr">:icon</span>=<span class="string">&quot;relation.iscollection ? &#x27;star&#x27; : &#x27;star-o&#x27;&quot;</span> <span class="attr">:loading</span>=<span class="string">&quot;collectionLoading&quot;</span></span></span><br><span class="line"><span class="tag"> @<span class="attr">click</span>=<span class="string">&quot;handleClickArticleCollection&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;3&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-button</span> <span class="attr">icon</span>=<span class="string">&quot;share-o&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-row</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">&lt;!-- 评论Popup 弹出层 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-popup</span> <span class="attr">v-model</span>=<span class="string">&quot;showPopup&quot;</span> <span class="attr">closeable</span> <span class="attr">position</span>=<span class="string">&quot;bottom&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">:style</span>=<span class="string">&quot;&#123; width: &#x27;750px&#x27;, height: &#x27;60%&#x27;, left: &#x27;50%&#x27;, &#x27;margin-left&#x27;: &#x27;-375px&#x27; &#125;&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 评论回复列表 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-list</span> <span class="attr">v-model</span>=<span class="string">&quot;commentRepliesLoading&quot;</span> <span class="attr">:finished</span>=<span class="string">&quot;commentRepliesFinished&quot;</span> <span class="attr">finished-text</span>=<span class="string">&quot;没有更多了&quot;</span></span></span><br><span class="line"><span class="tag"> @<span class="attr">load</span>=<span class="string">&quot;onLoadCommentReplies&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-row</span> <span class="attr">id</span>=<span class="string">&quot;#comment-reply-view&quot;</span> <span class="attr">type</span>=<span class="string">&quot;flex&quot;</span> <span class="attr">class</span>=<span class="string">&quot;article-comment-reply&quot;</span></span></span><br><span class="line"><span class="tag"> <span class="attr">v-for</span>=<span class="string">&quot;(item, index) in commentReplies&quot;</span> <span class="attr">:key</span>=<span class="string">&quot;index&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;3&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-image</span> <span class="attr">round</span> <span class="attr">src</span>=<span class="string">&quot;https://p3.pstatp.com/thumb/1480/7186611868&quot;</span> <span class="attr">class</span>=<span class="string">&quot;article-avatar&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-image</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;21&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-row</span> <span class="attr">type</span>=<span class="string">&quot;flex&quot;</span> <span class="attr">align</span>=<span class="string">&quot;center&quot;</span> <span class="attr">justify</span>=<span class="string">&quot;space-between&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">class</span>=<span class="string">&quot;comment-author&quot;</span> <span class="attr">v-html</span>=<span class="string">&quot;item.authorName&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-button</span> <span class="attr">round</span> <span class="attr">:icon</span>=<span class="string">&quot;item.operation === 0 ? &#x27;good-job&#x27; : &#x27;good-job-o&#x27;&quot;</span> <span class="attr">size</span>=<span class="string">&quot;normal&quot;</span></span></span><br><span class="line"><span class="tag"> @<span class="attr">click</span>=<span class="string">&quot;handleClickCommentReplyLike(item)&quot;</span>&gt;</span>&#123;&#123; item.likes || &#x27;&#x27; &#125;&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-row</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-row</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">class</span>=<span class="string">&quot;comment-content&quot;</span> <span class="attr">v-html</span>=<span class="string">&quot;item.content&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-row</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-row</span> <span class="attr">type</span>=<span class="string">&quot;flex&quot;</span> <span class="attr">align</span>=<span class="string">&quot;center&quot;</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- <span class="doctag">TODO:</span> js计算时间差 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;10&quot;</span> <span class="attr">class</span>=<span class="string">&quot;comment-time&quot;</span>&gt;</span></span><br><span class="line"> &#123;&#123; item.createdTime | timestampToDateTime &#125;&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-row</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-row</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-list</span>&gt;</span></span><br><span class="line"> <span class="comment">&lt;!-- 评论回复底部栏 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-row</span> <span class="attr">type</span>=<span class="string">&quot;flex&quot;</span> <span class="attr">justify</span>=<span class="string">&quot;space-around&quot;</span> <span class="attr">align</span>=<span class="string">&quot;center&quot;</span> <span class="attr">class</span>=<span class="string">&quot;comment-reply-bottom-bar&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;13&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-field</span> <span class="attr">v-model</span>=<span class="string">&quot;commentReplyValue&quot;</span> <span class="attr">placeholder</span>=<span class="string">&quot;写评论&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">template</span> #<span class="attr">button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-button</span> <span class="attr">icon</span>=<span class="string">&quot;back-top&quot;</span> @<span class="attr">click</span>=<span class="string">&quot;handleSaveCommentReply&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">template</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-field</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;3&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-button</span> <span class="attr">icon</span>=<span class="string">&quot;comment-o&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;3&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-button</span> <span class="attr">icon</span>=<span class="string">&quot;star-o&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-col</span> <span class="attr">span</span>=<span class="string">&quot;3&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">van-button</span> <span class="attr">icon</span>=<span class="string">&quot;share-o&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">van-button</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-col</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-row</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">van-popup</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">&lt;!-- 引入 Vue 和 Vant 的 JS 文件 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot; https://fastly.jsdelivr.net/npm/vue/dist/vue.min.js&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;https://fastly.jsdelivr.net/npm/vant@2.12.20/lib/vant.min.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- 引入 Axios 的 JS 文件 --&gt;</span></span><br><span class="line">&lt;#--<span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;https://unpkg.com/axios/dist/axios.min.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span>--&gt;</span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;../../../plugins/js/axios.min.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- 页面逻辑 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;../../../plugins/js/index.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>4.手动上传资料中index.js和index.css两个文件到MinIO中</p>
<p>上传index.js</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">testMinIO</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//读取一个文件</span></span><br><span class="line"> <span class="type">FileInputStream</span> <span class="variable">inputStream</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">FileInputStream</span>(<span class="string">&quot;C:\\Gong\\java\\黑马头条\\day02-app端文章查看静态化freemarker,分布式文件系统minIO\\资料\\模板文件\\plugins\\js\\index.js&quot;</span>);</span><br><span class="line"> <span class="comment">//1.获取MinIO的连接信息创建一个minio的客户端</span></span><br><span class="line"> <span class="type">MinioClient</span> <span class="variable">minioClient</span> <span class="operator">=</span> MinioClient.builder()</span><br><span class="line"> .credentials(<span class="string">&quot;minio&quot;</span>, <span class="string">&quot;minio123&quot;</span>)<span class="comment">//minio的账号密码</span></span><br><span class="line"> .endpoint(<span class="string">&quot;http://192.168.200.130:9000&quot;</span>)<span class="comment">//minio的地址</span></span><br><span class="line"> .build();</span><br><span class="line"> <span class="comment">//2.上传</span></span><br><span class="line"> <span class="type">PutObjectArgs</span> <span class="variable">putObjectArgs</span> <span class="operator">=</span> PutObjectArgs.builder()</span><br><span class="line"> .object(<span class="string">&quot;plugins/js/index.js&quot;</span>)<span class="comment">//文件的名称</span></span><br><span class="line"> .contentType(<span class="string">&quot;text/js&quot;</span>)<span class="comment">//文件的类型</span></span><br><span class="line"> .bucket(<span class="string">&quot;leadnews&quot;</span>)<span class="comment">//桶的名称与之前的minio管理界面创建的bucket名称一致即可</span></span><br><span class="line"> .stream(inputStream,inputStream.available(),-<span class="number">1</span>)</span><br><span class="line"> .build();</span><br><span class="line"> minioClient.putObject(putObjectArgs);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>上传index.css</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">testMinIO</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//读取一个文件</span></span><br><span class="line"> <span class="type">FileInputStream</span> <span class="variable">inputStream</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">FileInputStream</span>(<span class="string">&quot;C:\\Gong\\java\\黑马头条\\day02-app端文章查看静态化freemarker,分布式文件系统minIO\\资料\\模板文件\\plugins\\css\\index.css&quot;</span>);</span><br><span class="line"> <span class="comment">//1.获取MinIO的连接信息创建一个minio的客户端</span></span><br><span class="line"> <span class="type">MinioClient</span> <span class="variable">minioClient</span> <span class="operator">=</span> MinioClient.builder()</span><br><span class="line"> .credentials(<span class="string">&quot;minio&quot;</span>, <span class="string">&quot;minio123&quot;</span>)<span class="comment">//minio的账号密码</span></span><br><span class="line"> .endpoint(<span class="string">&quot;http://192.168.200.130:9000&quot;</span>)<span class="comment">//minio的地址</span></span><br><span class="line"> .build();</span><br><span class="line"> <span class="comment">//2.上传</span></span><br><span class="line"> <span class="type">PutObjectArgs</span> <span class="variable">putObjectArgs</span> <span class="operator">=</span> PutObjectArgs.builder()</span><br><span class="line"> .object(<span class="string">&quot;plugins/css/index.css&quot;</span>)<span class="comment">//文件的名称</span></span><br><span class="line"> .contentType(<span class="string">&quot;text/css&quot;</span>)<span class="comment">//文件的类型</span></span><br><span class="line"> .bucket(<span class="string">&quot;leadnews&quot;</span>)<span class="comment">//桶的名称与之前的minio管理界面创建的bucket名称一致即可</span></span><br><span class="line"> .stream(inputStream,inputStream.available(),-<span class="number">1</span>)</span><br><span class="line"> .build();</span><br><span class="line"> minioClient.putObject(putObjectArgs);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>5.测试根据文章的内容生成html文件上传到minio中</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.article.test;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.fastjson.JSONArray;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.article.ArticleApplication;</span><br><span class="line"><span class="keyword">import</span> com.heima.article.mapper.ApArticleContentMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.article.service.ApArticleService;</span><br><span class="line"><span class="keyword">import</span> com.heima.file.service.FileStorageService;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.article.pojos.ApArticle;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.article.pojos.ApArticleContent;</span><br><span class="line"><span class="keyword">import</span> freemarker.template.Configuration;</span><br><span class="line"><span class="keyword">import</span> freemarker.template.Template;</span><br><span class="line"><span class="keyword">import</span> freemarker.template.TemplateException;</span><br><span class="line"><span class="keyword">import</span> org.apache.commons.lang.StringUtils;</span><br><span class="line"><span class="keyword">import</span> org.junit.Test;</span><br><span class="line"><span class="keyword">import</span> org.junit.runner.RunWith;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.test.context.SpringBootTest;</span><br><span class="line"><span class="keyword">import</span> org.springframework.test.context.junit4.SpringRunner;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.ByteArrayInputStream;</span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.io.InputStream;</span><br><span class="line"><span class="keyword">import</span> java.io.StringWriter;</span><br><span class="line"><span class="keyword">import</span> java.util.HashMap;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/8/19</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@SpringBootTest(classes = ArticleApplication.class)</span></span><br><span class="line"><span class="meta">@RunWith(SpringRunner.class)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ArticleFreeMarkerTest</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> ApArticleContentMapper apArticleContentMapper;</span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> Configuration configuration;</span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> FileStorageService fileStorageService;</span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> ApArticleService apArticleService;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">createStaticUrlTest</span><span class="params">()</span> <span class="keyword">throws</span> IOException, TemplateException &#123;</span><br><span class="line"> <span class="comment">//已知文章的id</span></span><br><span class="line"> <span class="comment">//1.获取文章的内容</span></span><br><span class="line"> <span class="type">ApArticleContent</span> <span class="variable">apArticleContent</span> <span class="operator">=</span> apArticleContentMapper.selectOne(<span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;ApArticleContent&gt;().eq(ApArticleContent::getArticleId, <span class="string">&quot;1383827995813531650L&quot;</span>));</span><br><span class="line"> <span class="keyword">if</span> (apArticleContent != <span class="literal">null</span> &amp;&amp; StringUtils.isNotBlank(apArticleContent.getContent())) &#123;</span><br><span class="line"> <span class="comment">//2.文章内容通过freemarker生成html文件 详细教程见:https://qingling.icu/posts/29367.html</span></span><br><span class="line"> <span class="type">Template</span> <span class="variable">template</span> <span class="operator">=</span> configuration.getTemplate(<span class="string">&quot;article.ftl&quot;</span>);</span><br><span class="line"> <span class="comment">//构建数据模型</span></span><br><span class="line"> HashMap&lt;String, Object&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> map.put(<span class="string">&quot;content&quot;</span>, JSONArray.parseArray(apArticleContent.getContent()));</span><br><span class="line"> <span class="comment">//输出流</span></span><br><span class="line"> <span class="type">StringWriter</span> <span class="variable">out</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">StringWriter</span>();</span><br><span class="line"> <span class="comment">//合成html文件</span></span><br><span class="line"> template.process(map, out);</span><br><span class="line"> <span class="comment">//3.把html文件上传到minio中</span></span><br><span class="line"> <span class="comment">//构建一个输入流</span></span><br><span class="line"> <span class="type">InputStream</span> <span class="variable">in</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ByteArrayInputStream</span>(out.toString().getBytes());</span><br><span class="line"> <span class="comment">//上传到minio并返回访问的路径</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">path</span> <span class="operator">=</span> fileStorageService.uploadHtmlFile(<span class="string">&quot;&quot;</span>, apArticleContent.getArticleId() + <span class="string">&quot;.html&quot;</span>, in);</span><br><span class="line"> System.out.println(<span class="string">&quot;文件在minio中的路径:&quot;</span>+path);</span><br><span class="line"> <span class="comment">//4.修改ap_article表保存static_url字段</span></span><br><span class="line"> <span class="type">ApArticle</span> <span class="variable">apArticle</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ApArticle</span>();</span><br><span class="line"> apArticle.setId(apArticleContent.getArticleId());</span><br><span class="line"> apArticle.setStaticUrl(path);</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isSuccess</span> <span class="operator">=</span> apArticleService.updateById(apArticle);</span><br><span class="line"> System.out.println(isSuccess ? <span class="string">&quot;文件上传成功&quot;</span> : <span class="string">&quot;文件上传失败&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>6.实现效果</p>
<p><img src="/pictures/image-20230819153507360.png" alt="image-20230819153507360"></p>
<h1 id="四-自媒体端功能开发"><a href="#四-自媒体端功能开发" class="headerlink" title="四.自媒体端功能开发"></a>四.自媒体端功能开发</h1><h2 id="1-后端环境搭建"><a href="#1-后端环境搭建" class="headerlink" title="1.后端环境搭建"></a>1.后端环境搭建</h2><p><strong>需要搭建的模块</strong></p>
<p><img src="/pictures/image-20230819155333131.png" alt="image-20230819155333131"></p>
<p><strong>搭建步骤</strong></p>
<p><img src="/pictures/image-20230819155229550.png" alt="image-20230819155229550"></p>
<p>1.创建自媒体模块的数据库</p>
<p><img src="/pictures/image-20230819155853252.png" alt="image-20230819155853252"></p>
<p>2.导入相应的工程文件</p>
<p><img src="/pictures/image-20230819161650118.png" alt="image-20230819161650118"></p>
<p>3.配置自媒体模块和网关模块在nacos中的配置</p>
<p>自媒体模块的配置</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">datasource:</span></span><br><span class="line"> <span class="attr">driver-class-name:</span> <span class="string">com.mysql.jdbc.Driver</span></span><br><span class="line"> <span class="attr">url:</span> <span class="string">jdbc:mysql://localhost:3306/leadnews_wemedia?useUnicode=true&amp;characterEncoding=UTF-8&amp;serverTimezone=UTC</span></span><br><span class="line"> <span class="attr">username:</span> <span class="string">root</span></span><br><span class="line"> <span class="attr">password:</span> <span class="string">root</span></span><br><span class="line"><span class="comment"># 设置Mapper接口所对应的XML文件位置如果你在Mapper接口中有自定义方法需要进行该配置</span></span><br><span class="line"><span class="attr">mybatis-plus:</span></span><br><span class="line"> <span class="attr">mapper-locations:</span> <span class="string">classpath*:mapper/*.xml</span></span><br><span class="line"> <span class="comment"># 设置别名包扫描路径,通过该属性可以给包中的类注册别名</span></span><br><span class="line"> <span class="attr">type-aliases-package:</span> <span class="string">com.heima.model.media.pojos</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230819161148830.png" alt="image-20230819161148830"></p>
<p>网关模块的配置</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">cloud:</span></span><br><span class="line"> <span class="attr">gateway:</span></span><br><span class="line"> <span class="attr">globalcors:</span></span><br><span class="line"> <span class="attr">cors-configurations:</span></span><br><span class="line"> <span class="string">&#x27;[/**]&#x27;</span><span class="string">:</span> <span class="comment"># 匹配所有请求</span></span><br><span class="line"> <span class="attr">allowedOrigins:</span> <span class="string">&quot;*&quot;</span> <span class="comment">#跨域处理 允许所有的域</span></span><br><span class="line"> <span class="attr">allowedMethods:</span> <span class="comment"># 支持的方法</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">GET</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">POST</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">PUT</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">DELETE</span></span><br><span class="line"> <span class="attr">routes:</span></span><br><span class="line"> <span class="comment"># 平台管理</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">id:</span> <span class="string">wemedia</span></span><br><span class="line"> <span class="attr">uri:</span> <span class="string">lb://leadnews-wemedia</span></span><br><span class="line"> <span class="attr">predicates:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">Path=/wemedia/**</span></span><br><span class="line"> <span class="attr">filters:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">StripPrefix=</span> <span class="number">1</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230819161529210.png" alt="image-20230819161529210"></p>
<h2 id="2-前端环境搭建"><a href="#2-前端环境搭建" class="headerlink" title="2.前端环境搭建"></a>2.前端环境搭建</h2><p><strong>搭建思路</strong></p>
<p><img src="/pictures/image-20230819162116240.png" alt="image-20230819162116240"></p>
<p><strong>搭建步骤</strong></p>
<p><img src="/pictures/image-20230819162230133.png" alt="image-20230819162230133"></p>
<p><strong>heima-leadnews-wemedia配置文件</strong></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">upstream heima-wemedia-gateway&#123;</span><br><span class="line"> #APP端网关所在的端口</span><br><span class="line"> server localhost:51602;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">server &#123;</span><br><span class="line"> listen 8802;</span><br><span class="line"> location / &#123;</span><br><span class="line"> root C:/Gong/data/wemedia-web/;</span><br><span class="line"> index index.html;</span><br><span class="line"> &#125;</span><br><span class="line"> </span><br><span class="line"> location ~/wemedia/MEDIA/(.*) &#123;</span><br><span class="line"> proxy_pass http://heima-wemedia-gateway/$1;</span><br><span class="line"> proxy_set_header HOST $host; # 不改变源请求头的值</span><br><span class="line"> proxy_pass_request_body on; #开启获取请求体</span><br><span class="line"> proxy_pass_request_headers on; #开启获取请求头</span><br><span class="line"> proxy_set_header X-Real-IP $remote_addr; # 记录真实发出请求的客户端IP</span><br><span class="line"> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #记录代理信息</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>重启nginx访问</strong></p>
<p><img src="/pictures/image-20230902145814017.png" alt="image-20230902145814017"></p>
<h2 id="3-自媒体素材管理功能"><a href="#3-自媒体素材管理功能" class="headerlink" title="3.自媒体素材管理功能"></a>3.自媒体素材管理功能</h2><h3 id="3-1-素材管理-图片上传"><a href="#3-1-素材管理-图片上传" class="headerlink" title="3.1 素材管理-图片上传"></a>3.1 素材管理-图片上传</h3><p><strong>图片素材相关的实体类</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.model.wemedia.pojos;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.IdType;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableField;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableId;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableName;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.Serializable;</span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * &lt;p&gt;</span></span><br><span class="line"><span class="comment"> * 自媒体图文素材信息表</span></span><br><span class="line"><span class="comment"> * &lt;/p&gt;</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> itheima</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@TableName(&quot;wm_material&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WmMaterial</span> <span class="keyword">implements</span> <span class="title class_">Serializable</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">long</span> <span class="variable">serialVersionUID</span> <span class="operator">=</span> <span class="number">1L</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 主键</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableId(value = &quot;id&quot;, type = IdType.AUTO)</span></span><br><span class="line"> <span class="keyword">private</span> Integer id;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 自媒体用户ID</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;user_id&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Integer userId;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 图片地址</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;url&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String url;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 素材类型</span></span><br><span class="line"><span class="comment"> 0 图片</span></span><br><span class="line"><span class="comment"> 1 视频</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;type&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Short type;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 是否收藏</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;is_collection&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Short isCollection;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 创建时间</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;created_time&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Date createdTime;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="3-1-1-解决图片素材实体类中获取图片userId的问题"><a href="#3-1-1-解决图片素材实体类中获取图片userId的问题" class="headerlink" title="3.1.1 解决图片素材实体类中获取图片userId的问题"></a>3.1.1 解决图片素材实体类中获取图片userId的问题</h4><p><strong>实现思路</strong></p>
<p><img src="/pictures/image-20230902154806019.png" alt="image-20230902154806019"></p>
<p>1.token解析为用户存入header</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.wemedia.gateway.filter;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.gateway.util.AppJwtUtil;</span><br><span class="line"><span class="keyword">import</span> io.jsonwebtoken.Claims;</span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.apache.commons.lang.StringUtils;</span><br><span class="line"><span class="keyword">import</span> org.springframework.cloud.gateway.filter.GatewayFilterChain;</span><br><span class="line"><span class="keyword">import</span> org.springframework.cloud.gateway.filter.GlobalFilter;</span><br><span class="line"><span class="keyword">import</span> org.springframework.core.Ordered;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.HttpStatus;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.server.reactive.ServerHttpRequest;</span><br><span class="line"><span class="keyword">import</span> org.springframework.http.server.reactive.ServerHttpResponse;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Component;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.server.ServerWebExchange;</span><br><span class="line"><span class="keyword">import</span> reactor.core.publisher.Mono;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">AuthorizeFilter</span> <span class="keyword">implements</span> <span class="title class_">Ordered</span>, GlobalFilter &#123;</span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> Mono&lt;Void&gt; <span class="title function_">filter</span><span class="params">(ServerWebExchange exchange, GatewayFilterChain chain)</span> &#123;</span><br><span class="line"> <span class="comment">//1.获取request和response对象</span></span><br><span class="line"> <span class="type">ServerHttpRequest</span> <span class="variable">request</span> <span class="operator">=</span> exchange.getRequest();</span><br><span class="line"> <span class="type">ServerHttpResponse</span> <span class="variable">response</span> <span class="operator">=</span> exchange.getResponse();</span><br><span class="line"></span><br><span class="line"> <span class="comment">//2.判断是否是登录</span></span><br><span class="line"> <span class="keyword">if</span>(request.getURI().getPath().contains(<span class="string">&quot;/login&quot;</span>))&#123;</span><br><span class="line"> <span class="comment">//放行</span></span><br><span class="line"> <span class="keyword">return</span> chain.filter(exchange);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//3.获取token</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">token</span> <span class="operator">=</span> request.getHeaders().getFirst(<span class="string">&quot;token&quot;</span>);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//4.判断token是否存在</span></span><br><span class="line"> <span class="keyword">if</span>(StringUtils.isBlank(token))&#123;</span><br><span class="line"> response.setStatusCode(HttpStatus.UNAUTHORIZED);</span><br><span class="line"> <span class="keyword">return</span> response.setComplete();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//5.判断token是否有效</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">Claims</span> <span class="variable">claimsBody</span> <span class="operator">=</span> AppJwtUtil.getClaimsBody(token);</span><br><span class="line"> <span class="comment">//是否是过期</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">result</span> <span class="operator">=</span> AppJwtUtil.verifyToken(claimsBody);</span><br><span class="line"> <span class="keyword">if</span>(result == <span class="number">1</span> || result == <span class="number">2</span>)&#123;</span><br><span class="line"> response.setStatusCode(HttpStatus.UNAUTHORIZED);</span><br><span class="line"> <span class="keyword">return</span> response.setComplete();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//获取用户信息</span></span><br><span class="line"> <span class="type">Object</span> <span class="variable">userId</span> <span class="operator">=</span> claimsBody.get(<span class="string">&quot;id&quot;</span>);</span><br><span class="line"> <span class="comment">//存入header中</span></span><br><span class="line"> <span class="type">ServerHttpRequest</span> <span class="variable">serverHttpRequest</span> <span class="operator">=</span> request.mutate().headers(httpHeaders -&gt; &#123;</span><br><span class="line"> httpHeaders.add(<span class="string">&quot;userId&quot;</span>, userId + <span class="string">&quot;&quot;</span>);</span><br><span class="line"> &#125;).build();</span><br><span class="line"> <span class="comment">//重置请求</span></span><br><span class="line"> exchange.mutate().request(serverHttpRequest);</span><br><span class="line"></span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//6.放行</span></span><br><span class="line"> <span class="keyword">return</span> chain.filter(exchange);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 优先级设置 值越小 优先级越高</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">int</span> <span class="title function_">getOrder</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>2.创建拦截器</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.wemedia.interceptor;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.pojos.WmUser;</span><br><span class="line"><span class="keyword">import</span> com.heima.utils.thread.WmThreadLocalUtil;</span><br><span class="line"><span class="keyword">import</span> io.swagger.models.auth.In;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.servlet.HandlerInterceptor;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.servlet.ModelAndView;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletRequest;</span><br><span class="line"><span class="keyword">import</span> javax.servlet.http.HttpServletResponse;</span><br><span class="line"><span class="keyword">import</span> java.util.Enumeration;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/9/2</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WmTokenInterceptor</span> <span class="keyword">implements</span> <span class="title class_">HandlerInterceptor</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 获取header中的信息 存入当前的线程中</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="type">boolean</span> <span class="title function_">preHandle</span><span class="params">(HttpServletRequest request, HttpServletResponse response, Object handler)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="comment">//获取header中的userId信息</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">userId</span> <span class="operator">=</span> request.getHeader(<span class="string">&quot;userId&quot;</span>);</span><br><span class="line"> <span class="comment">//判断userId是否为空</span></span><br><span class="line"> <span class="keyword">if</span>(userId != <span class="literal">null</span>)&#123;</span><br><span class="line"> <span class="comment">//将userId存入当前的线程中我们可以在任何位置获取</span></span><br><span class="line"> <span class="type">WmUser</span> <span class="variable">wmUser</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">WmUser</span>();</span><br><span class="line"> wmUser.setId(Integer.valueOf(userId));</span><br><span class="line"> WmThreadLocalUtil.setUser(wmUser);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 清理线程中的数据</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">postHandle</span><span class="params">(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> WmThreadLocalUtil.clear();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>ThreadLocal工具类实现在线程中存储、获取、清理用户信息</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.utils.thread;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.pojos.WmUser;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WmThreadLocalUtil</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">final</span> <span class="keyword">static</span> ThreadLocal&lt;WmUser&gt; WM_USER_THREAD_LOCAL = <span class="keyword">new</span> <span class="title class_">ThreadLocal</span>&lt;&gt;();</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 添加用户</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> wmUser</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">setUser</span><span class="params">(WmUser wmUser)</span>&#123;</span><br><span class="line"> WM_USER_THREAD_LOCAL.set(wmUser);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 获取用户</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> WmUser <span class="title function_">getUser</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> WM_USER_THREAD_LOCAL.get();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 清理用户</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">clear</span><span class="params">()</span>&#123;</span><br><span class="line"> WM_USER_THREAD_LOCAL.remove();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>3.让拦截器生效</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.wemedia.config;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.interceptor.WmTokenInterceptor;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.servlet.config.annotation.InterceptorRegistry;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.servlet.config.annotation.WebMvcConfigurer;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/9/2</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WebMvcConfig</span> <span class="keyword">implements</span> <span class="title class_">WebMvcConfigurer</span> &#123;</span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">addInterceptors</span><span class="params">(InterceptorRegistry registry)</span> &#123;</span><br><span class="line"> registry.addInterceptor(<span class="keyword">new</span> <span class="title class_">WmTokenInterceptor</span>()).addPathPatterns(<span class="string">&quot;/**&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="3-1-2-图片上传接口的定义"><a href="#3-1-2-图片上传接口的定义" class="headerlink" title="3.1.2 图片上传接口的定义"></a>3.1.2 图片上传接口的定义</h4><table>
<thead>
<tr>
<th></th>
<th><strong>说明</strong></th>
</tr>
</thead>
<tbody><tr>
<td>接口路径</td>
<td>&#x2F;api&#x2F;v1&#x2F;material&#x2F;upload_picture</td>
</tr>
<tr>
<td>请求方式</td>
<td>POST</td>
</tr>
<tr>
<td>参数</td>
<td>MultipartFile</td>
</tr>
<tr>
<td>响应结果</td>
<td>ResponseResult</td>
</tr>
</tbody></table>
<h4 id="3-1-3-代码实现"><a href="#3-1-3-代码实现" class="headerlink" title="3.1.3 代码实现"></a>3.1.3 代码实现</h4><p>1.在pom.xml中引入自定义minio的starter依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.heima<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>heima-file-starter<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>1.0-SNAPSHOT<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>2.在项目中添加minio的配置(在nacos中配置)</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">minio:</span></span><br><span class="line"> <span class="attr">accessKey:</span> <span class="string">minio</span></span><br><span class="line"> <span class="attr">secretKey:</span> <span class="string">minio123</span></span><br><span class="line"> <span class="attr">bucket:</span> <span class="string">leadnews</span></span><br><span class="line"> <span class="attr">endpoint:</span> <span class="string">http://192.168.200.130:9000</span></span><br><span class="line"> <span class="attr">readPath:</span> <span class="string">http://192.168.200.130:9000</span></span><br></pre></td></tr></table></figure>
<p>3.上传图片的关键代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.wemedia.service.impl;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;</span><br><span class="line"><span class="keyword">import</span> com.heima.file.service.FileStorageService;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.dtos.ResponseResult;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.enums.AppHttpCodeEnum;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.pojos.WmMaterial;</span><br><span class="line"><span class="keyword">import</span> com.heima.utils.thread.WmThreadLocalUtil;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.mapper.WmMaterialMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.service.WmMaterialService;</span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Service;</span><br><span class="line"><span class="keyword">import</span> org.springframework.transaction.annotation.Transactional;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.multipart.MultipartFile;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"><span class="keyword">import</span> java.util.UUID;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@Service</span></span><br><span class="line"><span class="meta">@Transactional</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WmMaterialServiceImpl</span> <span class="keyword">extends</span> <span class="title class_">ServiceImpl</span>&lt;WmMaterialMapper, WmMaterial&gt; <span class="keyword">implements</span> <span class="title class_">WmMaterialService</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> FileStorageService fileStorageService; <span class="comment">//使用minio</span></span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> ResponseResult <span class="title function_">uploadPicture</span><span class="params">(MultipartFile multipartFile)</span> &#123;</span><br><span class="line"> <span class="comment">//1.检查参数</span></span><br><span class="line"> <span class="keyword">if</span>(multipartFile == <span class="literal">null</span> || multipartFile.getSize() == <span class="number">0</span>)&#123;</span><br><span class="line"> <span class="keyword">return</span> ResponseResult.errorResult(AppHttpCodeEnum.PARAM_INVALID);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//2.上传图片到minio中</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">fileName</span> <span class="operator">=</span> UUID.randomUUID().toString().replace(<span class="string">&quot;-&quot;</span>, <span class="string">&quot;&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">originalFilename</span> <span class="operator">=</span> multipartFile.getOriginalFilename();</span><br><span class="line"> <span class="type">String</span> <span class="variable">postfix</span> <span class="operator">=</span> originalFilename.substring(originalFilename.lastIndexOf(<span class="string">&quot;.&quot;</span>));</span><br><span class="line"> <span class="type">String</span> <span class="variable">fileId</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> fileId = fileStorageService.uploadImgFile(<span class="string">&quot;&quot;</span>, fileName + postfix, multipartFile.getInputStream());</span><br><span class="line"> log.info(<span class="string">&quot;上传图片到Minio中,fileId:&#123;&#125;&quot;</span>,fileId);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (IOException e) &#123;</span><br><span class="line"> log.info(<span class="string">&quot;WmMaterialServiceImpl-上传图片失败&quot;</span>);</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//3.将图片的信息保存在数据库中</span></span><br><span class="line"> <span class="type">WmMaterial</span> <span class="variable">wmMaterial</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">WmMaterial</span>();</span><br><span class="line"> wmMaterial.setUserId(WmThreadLocalUtil.getUser().getId());</span><br><span class="line"> wmMaterial.setUrl(fileId);</span><br><span class="line"> wmMaterial.setType((<span class="type">short</span>)<span class="number">0</span>);</span><br><span class="line"> wmMaterial.setIsCollection((<span class="type">short</span>)<span class="number">0</span>);</span><br><span class="line"> wmMaterial.setCreatedTime(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> save(wmMaterial);</span><br><span class="line"> <span class="comment">//4.返回参数</span></span><br><span class="line"> <span class="keyword">return</span> ResponseResult.okResult(wmMaterial);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>4.测试上传功能</p>
<p><img src="/pictures/image-20230902220022201.png" alt="image-20230902220022201"></p>
<h3 id="3-2-素材管理-图片列表"><a href="#3-2-素材管理-图片列表" class="headerlink" title="3.2 素材管理-图片列表"></a>3.2 素材管理-图片列表</h3><p><strong>接口定义</strong></p>
<table>
<thead>
<tr>
<th><strong>接口路径</strong></th>
<th><strong>&#x2F;api</strong>&#x2F;<strong>&#x2F;v1&#x2F;material&#x2F;list</strong></th>
</tr>
</thead>
<tbody><tr>
<td>请求方式</td>
<td>POST</td>
</tr>
<tr>
<td>参数</td>
<td>WmMaterialDto</td>
</tr>
<tr>
<td>响应结果</td>
<td>ResponseResult</td>
</tr>
</tbody></table>
<p><strong>请求参数的DTO</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WmMaterialDto</span> <span class="keyword">extends</span> <span class="title class_">PageRequestDto</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 1 收藏</span></span><br><span class="line"><span class="comment"> * 0 未收藏</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Short isCollection;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>关键代码</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 素材图片的列表显示</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="keyword">public</span> ResponseResult <span class="title function_">findList</span><span class="params">(WmMaterialDto wmMaterialDto)</span> &#123;</span><br><span class="line"> <span class="comment">//1.检查参数</span></span><br><span class="line"> wmMaterialDto.checkParam();</span><br><span class="line"> <span class="comment">//2.分页查询</span></span><br><span class="line"> <span class="type">IPage</span> <span class="variable">page</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Page</span>(wmMaterialDto.getPage(),wmMaterialDto.getSize());</span><br><span class="line"> LambdaQueryWrapper&lt;WmMaterial&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//是否收藏</span></span><br><span class="line"> <span class="keyword">if</span>(wmMaterialDto.getIsCollection() != <span class="literal">null</span> &amp;&amp; wmMaterialDto.getIsCollection() == <span class="number">1</span>)&#123;</span><br><span class="line"> queryWrapper.eq(WmMaterial::getIsCollection,wmMaterialDto.getIsCollection());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//按照用户查询</span></span><br><span class="line"> queryWrapper.eq(WmMaterial::getUserId,WmThreadLocalUtil.getUser().getId());</span><br><span class="line"> <span class="comment">//按照时间查询</span></span><br><span class="line"> queryWrapper.orderByDesc(WmMaterial::getCreatedTime);</span><br><span class="line"> page = page(page,queryWrapper);</span><br><span class="line"> <span class="comment">//3.结果返回</span></span><br><span class="line"> <span class="type">ResponseResult</span> <span class="variable">responseResult</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PageResponseResult</span>(wmMaterialDto.getPage(), wmMaterialDto.getSize(), (<span class="type">int</span>) page.getTotal());</span><br><span class="line"> responseResult.setData(page.getRecords());</span><br><span class="line"> <span class="keyword">return</span> responseResult;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>MP的配置</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Bean</span></span><br><span class="line"><span class="keyword">public</span> MybatisPlusInterceptor <span class="title function_">mybatisPlusInterceptor</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">MybatisPlusInterceptor</span> <span class="variable">interceptor</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">MybatisPlusInterceptor</span>();</span><br><span class="line"> interceptor.addInnerInterceptor(<span class="keyword">new</span> <span class="title class_">PaginationInnerInterceptor</span>(DbType.MYSQL));</span><br><span class="line"> <span class="keyword">return</span> interceptor;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>实现效果</strong></p>
<p><img src="/pictures/image-20230903125528872.png" alt="image-20230903125528872"></p>
<h2 id="4-自媒体文章管理功能"><a href="#4-自媒体文章管理功能" class="headerlink" title="4.自媒体文章管理功能"></a>4.自媒体文章管理功能</h2><h3 id="4-1-频道列表查询"><a href="#4-1-频道列表查询" class="headerlink" title="4.1 频道列表查询"></a>4.1 频道列表查询</h3><p><strong>频道对应的实体类</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.model.wemedia.pojos;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.IdType;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableField;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableId;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableName;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.Serializable;</span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * &lt;p&gt;</span></span><br><span class="line"><span class="comment"> * 频道信息表</span></span><br><span class="line"><span class="comment"> * &lt;/p&gt;</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> itheima</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@TableName(&quot;wm_channel&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WmChannel</span> <span class="keyword">implements</span> <span class="title class_">Serializable</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">long</span> <span class="variable">serialVersionUID</span> <span class="operator">=</span> <span class="number">1L</span>;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@TableId(value = &quot;id&quot;, type = IdType.AUTO)</span></span><br><span class="line"> <span class="keyword">private</span> Integer id;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 频道名称</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;name&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String name;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 频道描述</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;description&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String description;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 是否默认频道</span></span><br><span class="line"><span class="comment"> * 1默认 true</span></span><br><span class="line"><span class="comment"> * 0非默认 false</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;is_default&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Boolean isDefault;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 是否启用</span></span><br><span class="line"><span class="comment"> * 1启用 true</span></span><br><span class="line"><span class="comment"> * 0禁用 false</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;status&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Boolean status;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 默认排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;ord&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Integer ord;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 创建时间</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;created_time&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Date createdTime;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>接口定义</strong></p>
<table>
<thead>
<tr>
<th></th>
<th><strong>说明</strong></th>
</tr>
</thead>
<tbody><tr>
<td>接口路径</td>
<td>&#x2F;api&#x2F;v1&#x2F;channel&#x2F;channels</td>
</tr>
<tr>
<td>请求方式</td>
<td>GET</td>
</tr>
<tr>
<td>参数</td>
<td>无</td>
</tr>
<tr>
<td>响应结果</td>
<td>ResponseResult</td>
</tr>
</tbody></table>
<p><strong>关键代码</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查询所有的频道信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@GetMapping(&quot;/channels&quot;)</span></span><br><span class="line"><span class="keyword">public</span> ResponseResult <span class="title function_">findAllChannels</span><span class="params">()</span>&#123;</span><br><span class="line"> List&lt;WmChannel&gt; channels = wmChannelService.list();</span><br><span class="line"> <span class="keyword">return</span> ResponseResult.okResult(channels);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>实现效果</strong></p>
<p><img src="/pictures/image-20230903151216766.png" alt="image-20230903151216766"></p>
<h3 id="4-2-文章列表加载"><a href="#4-2-文章列表加载" class="headerlink" title="4.2 文章列表加载"></a>4.2 文章列表加载</h3><p><strong>文章表对应的实体类</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.model.wemedia.pojos;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.IdType;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableField;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableId;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableName;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"><span class="keyword">import</span> org.apache.ibatis.type.Alias;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.Serializable;</span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * &lt;p&gt;</span></span><br><span class="line"><span class="comment"> * 自媒体图文内容信息表</span></span><br><span class="line"><span class="comment"> * &lt;/p&gt;</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> itheima</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@TableName(&quot;wm_news&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WmNews</span> <span class="keyword">implements</span> <span class="title class_">Serializable</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">long</span> <span class="variable">serialVersionUID</span> <span class="operator">=</span> <span class="number">1L</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 主键</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableId(value = &quot;id&quot;, type = IdType.AUTO)</span></span><br><span class="line"> <span class="keyword">private</span> Integer id;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 自媒体用户ID</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;user_id&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Integer userId;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 标题</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;title&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String title;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 图文内容</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;content&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String content;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 文章布局</span></span><br><span class="line"><span class="comment"> 0 无图文章</span></span><br><span class="line"><span class="comment"> 1 单图文章</span></span><br><span class="line"><span class="comment"> 3 多图文章</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;type&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Short type;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 图文频道ID</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;channel_id&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Integer channelId;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@TableField(&quot;labels&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String labels;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 创建时间</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;created_time&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Date createdTime;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 提交时间</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;submited_time&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Date submitedTime;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 当前状态</span></span><br><span class="line"><span class="comment"> 0 草稿</span></span><br><span class="line"><span class="comment"> 1 提交(待审核)</span></span><br><span class="line"><span class="comment"> 2 审核失败</span></span><br><span class="line"><span class="comment"> 3 人工审核</span></span><br><span class="line"><span class="comment"> 4 人工审核通过</span></span><br><span class="line"><span class="comment"> 8 审核通过(待发布)</span></span><br><span class="line"><span class="comment"> 9 已发布</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;status&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Short status;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 定时发布时间,不定时则为空</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;publish_time&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Date publishTime;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 拒绝理由</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;reason&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String reason;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 发布库文章ID</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;article_id&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Long articleId;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * //图片用逗号分隔</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;images&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String images;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@TableField(&quot;enable&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Short enable;</span><br><span class="line"> </span><br><span class="line"> <span class="comment">//状态枚举类</span></span><br><span class="line"> <span class="meta">@Alias(&quot;WmNewsStatus&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">enum</span> <span class="title class_">Status</span>&#123;</span><br><span class="line"> NORMAL((<span class="type">short</span>)<span class="number">0</span>),SUBMIT((<span class="type">short</span>)<span class="number">1</span>),FAIL((<span class="type">short</span>)<span class="number">2</span>),ADMIN_AUTH((<span class="type">short</span>)<span class="number">3</span>),ADMIN_SUCCESS((<span class="type">short</span>)<span class="number">4</span>),SUCCESS((<span class="type">short</span>)<span class="number">8</span>),PUBLISHED((<span class="type">short</span>)<span class="number">9</span>);</span><br><span class="line"> <span class="type">short</span> code;</span><br><span class="line"> Status(<span class="type">short</span> code)&#123;</span><br><span class="line"> <span class="built_in">this</span>.code = code;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">public</span> <span class="type">short</span> <span class="title function_">getCode</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="built_in">this</span>.code;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>接口定义</strong></p>
<table>
<thead>
<tr>
<th><strong>接口路径</strong></th>
<th><strong>&#x2F;api</strong>&#x2F;<strong>&#x2F;v1&#x2F;news&#x2F;list</strong></th>
</tr>
</thead>
<tbody><tr>
<td>请求方式</td>
<td>POST</td>
</tr>
<tr>
<td>参数</td>
<td>WmNewsPageReqDto</td>
</tr>
<tr>
<td>响应结果</td>
<td>ResponseResult</td>
</tr>
</tbody></table>
<p><strong>关键代码</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="keyword">public</span> ResponseResult <span class="title function_">findNewsList</span><span class="params">(WmNewsPageReqDto wmNewsPageReqDto)</span> &#123;</span><br><span class="line"> <span class="comment">//1.检查参数</span></span><br><span class="line"> wmNewsPageReqDto.checkParam();</span><br><span class="line"> <span class="comment">//2.根据条件查询</span></span><br><span class="line"> <span class="type">IPage</span> <span class="variable">page</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Page</span>(wmNewsPageReqDto.getPage(), wmNewsPageReqDto.getSize());</span><br><span class="line"> LambdaQueryWrapper&lt;WmNews&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//状态</span></span><br><span class="line"> <span class="keyword">if</span>(wmNewsPageReqDto.getStatus() != <span class="literal">null</span>)&#123;</span><br><span class="line"> queryWrapper.eq(WmNews::getStatus,wmNewsPageReqDto.getStatus());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//开始时间 结束时间</span></span><br><span class="line"> <span class="keyword">if</span>(wmNewsPageReqDto.getBeginPubDate() != <span class="literal">null</span> &amp;&amp; wmNewsPageReqDto.getEndPubDate()!=<span class="literal">null</span>)&#123;</span><br><span class="line"> queryWrapper.between(WmNews::getPublishTime,wmNewsPageReqDto.getBeginPubDate(),wmNewsPageReqDto.getEndPubDate());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//所属频道id</span></span><br><span class="line"> <span class="keyword">if</span>(wmNewsPageReqDto.getChannelId() != <span class="literal">null</span>)&#123;</span><br><span class="line"> queryWrapper.eq(WmNews::getChannelId,wmNewsPageReqDto.getChannelId());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//关键字</span></span><br><span class="line"> <span class="keyword">if</span>(wmNewsPageReqDto.getKeyword() != <span class="literal">null</span>)&#123;</span><br><span class="line"> queryWrapper.like(WmNews::getTitle,wmNewsPageReqDto.getKeyword());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//查询当前登录人的文章</span></span><br><span class="line"> queryWrapper.eq(WmNews::getUserId, WmThreadLocalUtil.getUser().getId());</span><br><span class="line"> <span class="comment">//按照发布时间倒序查询</span></span><br><span class="line"> queryWrapper.orderByDesc(WmNews::getPublishTime);</span><br><span class="line"> page = page(page,queryWrapper);</span><br><span class="line"> <span class="comment">//3.结果返回</span></span><br><span class="line"> <span class="type">ResponseResult</span> <span class="variable">responseResult</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PageResponseResult</span>(wmNewsPageReqDto.getPage(), wmNewsPageReqDto.getSize(), (<span class="type">int</span>) page.getTotal());</span><br><span class="line"> responseResult.setData(page.getRecords());</span><br><span class="line"> <span class="keyword">return</span> responseResult;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>实现效果</strong></p>
<p><img src="/pictures/image-20230903185956428.png" alt="image-20230903185956428"></p>
<h3 id="4-3-发布文章功能-核心功能"><a href="#4-3-发布文章功能-核心功能" class="headerlink" title="4.3 发布文章功能(核心功能)"></a>4.3 发布文章功能(核心功能)</h3><p><strong>文章和素材对应关系表</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.model.wemedia.pojos;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.IdType;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableField;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableId;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableName;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.Serializable;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * &lt;p&gt;</span></span><br><span class="line"><span class="comment"> * 自媒体图文引用素材信息表</span></span><br><span class="line"><span class="comment"> * &lt;/p&gt;</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> itheima</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@TableName(&quot;wm_news_material&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WmNewsMaterial</span> <span class="keyword">implements</span> <span class="title class_">Serializable</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">long</span> <span class="variable">serialVersionUID</span> <span class="operator">=</span> <span class="number">1L</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 主键</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableId(value = &quot;id&quot;, type = IdType.AUTO)</span></span><br><span class="line"> <span class="keyword">private</span> Integer id;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 素材ID</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;material_id&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Integer materialId;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 图文ID</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;news_id&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Integer newsId;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 引用类型</span></span><br><span class="line"><span class="comment"> 0 内容引用</span></span><br><span class="line"><span class="comment"> 1 主图引用</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;type&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Short type;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 引用排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;ord&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Short ord;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>实现流程</strong></p>
<p><img src="/pictures/image-20230904151910210.png" alt="image-20230904151910210"></p>
<p><strong>接口定义</strong></p>
<table>
<thead>
<tr>
<th></th>
<th><strong>说明</strong></th>
</tr>
</thead>
<tbody><tr>
<td>接口路径</td>
<td>&#x2F;api&#x2F;v1&#x2F;news&#x2F;submit</td>
</tr>
<tr>
<td>请求方式</td>
<td>POST</td>
</tr>
<tr>
<td>参数</td>
<td>WmNewsDto</td>
</tr>
<tr>
<td>响应结果</td>
<td>ResponseResult</td>
</tr>
</tbody></table>
<p><strong>WmNewsDto</strong> </p>
<p>接收前端参数的dto</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.model.wemedia.dtos;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WmNewsDto</span> &#123;</span><br><span class="line"> </span><br><span class="line"> <span class="keyword">private</span> Integer id;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 标题</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String title;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 频道id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Integer channelId;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 标签</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String labels;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 发布时间</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Date publishTime;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 文章内容</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String content;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 文章封面类型 0 无图 1 单图 3 多图 -1 自动</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Short type;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 提交时间</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Date submitedTime; </span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 状态 提交为1 草稿为0</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Short status;</span><br><span class="line"> </span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 封面图片列表 多张图以逗号隔开</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> List&lt;String&gt; images;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>前端传递的json格式数据举例</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;title&quot;</span><span class="punctuation">:</span><span class="string">&quot;黑马头条项目背景&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span><span class="string">&quot;1&quot;</span><span class="punctuation">,</span><span class="comment">//这个 0 是无图 1 是单图 3 是多图 -1 是自动</span></span><br><span class="line"> <span class="attr">&quot;labels&quot;</span><span class="punctuation">:</span><span class="string">&quot;黑马头条&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;publishTime&quot;</span><span class="punctuation">:</span><span class="string">&quot;2020-03-14T11:35:49.000Z&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;channelId&quot;</span><span class="punctuation">:</span><span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;images&quot;</span><span class="punctuation">:</span><span class="punctuation">[</span></span><br><span class="line"> <span class="string">&quot;http://192.168.200.130/group1/M00/00/00/wKjIgl5swbGATaSAAAEPfZfx6Iw790.png&quot;</span></span><br><span class="line"> <span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;status&quot;</span><span class="punctuation">:</span><span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;content&quot;</span><span class="punctuation">:</span><span class="string">&quot;[</span></span><br><span class="line"><span class="string"> &#123;</span></span><br><span class="line"><span class="string"> &quot;</span>type<span class="string">&quot;:&quot;</span>text<span class="string">&quot;,</span></span><br><span class="line"><span class="string"> &quot;</span>value<span class="string">&quot;:&quot;</span>随着智能手机的普及,人们更加习惯于通过手机来看新闻。由于生活节奏的加快,很多人只能利用碎片时间来获取信息,因此,对于移动资讯客户端的需求也越来越高。黑马头条项目正是在这样背景下开发出来。黑马头条项目采用当下火热的微服务+大数据技术架构实现。本项目主要着手于获取最新最热新闻资讯,通过大数据分析用户喜好精确推送咨询新闻<span class="string">&quot;</span></span><br><span class="line"><span class="string"> &#125;,</span></span><br><span class="line"><span class="string"> &#123;</span></span><br><span class="line"><span class="string"> &quot;</span>type<span class="string">&quot;:&quot;</span>image<span class="string">&quot;,</span></span><br><span class="line"><span class="string"> &quot;</span>value<span class="string">&quot;:&quot;</span>http<span class="punctuation">:</span><span class="comment">//192.168.200.130/group1/M00/00/00/wKjIgl5swbGATaSAAAEPfZfx6Iw790.png&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">]</span><span class="string">&quot;</span></span><br><span class="line"><span class="string">&#125;</span></span><br></pre></td></tr></table></figure>
<p><strong>保存文章和素材对应关系mapper接口</strong></p>
<p>mapper接口</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Mapper</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">interface</span> <span class="title class_">WmNewsMaterialMapper</span> <span class="keyword">extends</span> <span class="title class_">BaseMapper</span>&lt;WmNewsMaterial&gt; &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 批量保存文章和素材之间的关系</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> materialIds 素材的id</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> newsId 文章的id</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> type 类型</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">void</span> <span class="title function_">saveRelations</span><span class="params">(<span class="meta">@Param(&quot;materialIds&quot;)</span> List&lt;Integer&gt; materialIds,<span class="meta">@Param(&quot;newsId&quot;)</span> Integer newsId, <span class="meta">@Param(&quot;type&quot;)</span>Short type)</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>mapper.xml文件</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="meta">&lt;?xml version=<span class="string">&quot;1.0&quot;</span> encoding=<span class="string">&quot;UTF-8&quot;</span>?&gt;</span></span><br><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">mapper</span> <span class="keyword">PUBLIC</span> <span class="string">&quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;</span> <span class="string">&quot;http://mybatis.org/dtd/mybatis-3-mapper.dtd&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">mapper</span> <span class="attr">namespace</span>=<span class="string">&quot;com.heima.wemedia.mapper.WmNewsMaterialMapper&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line"> <span class="tag">&lt;<span class="name">insert</span> <span class="attr">id</span>=<span class="string">&quot;saveRelations&quot;</span>&gt;</span></span><br><span class="line"> insert into wm_news_material (material_id,news_id,type,ord)</span><br><span class="line"> values</span><br><span class="line"> <span class="tag">&lt;<span class="name">foreach</span> <span class="attr">collection</span>=<span class="string">&quot;materialIds&quot;</span> <span class="attr">index</span>=<span class="string">&quot;ord&quot;</span> <span class="attr">item</span>=<span class="string">&quot;mid&quot;</span> <span class="attr">separator</span>=<span class="string">&quot;,&quot;</span>&gt;</span></span><br><span class="line"> (#&#123;mid&#125;,#&#123;newsId&#125;,#&#123;type&#125;,#&#123;ord&#125;)</span><br><span class="line"> <span class="tag">&lt;/<span class="name">foreach</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">insert</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">mapper</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><strong>使用到的常量类</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.common.constants;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WemediaConstants</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">Short</span> <span class="variable">COLLECT_MATERIAL</span> <span class="operator">=</span> <span class="number">1</span>;<span class="comment">//收藏</span></span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">Short</span> <span class="variable">CANCEL_COLLECT_MATERIAL</span> <span class="operator">=</span> <span class="number">0</span>;<span class="comment">//取消收藏</span></span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">String</span> <span class="variable">WM_NEWS_TYPE_IMAGE</span> <span class="operator">=</span> <span class="string">&quot;image&quot;</span>;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">Short</span> <span class="variable">WM_NEWS_NONE_IMAGE</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">Short</span> <span class="variable">WM_NEWS_SINGLE_IMAGE</span> <span class="operator">=</span> <span class="number">1</span>;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">Short</span> <span class="variable">WM_NEWS_MANY_IMAGE</span> <span class="operator">=</span> <span class="number">3</span>;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">Short</span> <span class="variable">WM_NEWS_TYPE_AUTO</span> <span class="operator">=</span> -<span class="number">1</span>;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">Short</span> <span class="variable">WM_CONTENT_REFERENCE</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">Short</span> <span class="variable">WM_COVER_REFERENCE</span> <span class="operator">=</span> <span class="number">1</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>发布文章功能的关键代码</strong></p>
<p>存在许多的bug</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.wemedia.service.impl;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.fastjson.JSON;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.core.metadata.IPage;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.extension.plugins.pagination.Page;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;</span><br><span class="line"><span class="keyword">import</span> com.heima.common.constants.WemediaConstants;</span><br><span class="line"><span class="keyword">import</span> com.heima.common.exception.CustomException;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.dtos.PageResponseResult;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.dtos.ResponseResult;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.enums.AppHttpCodeEnum;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.dtos.WmNewsDto;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.dtos.WmNewsPageReqDto;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.pojos.WmMaterial;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.pojos.WmNews;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.pojos.WmNewsMaterial;</span><br><span class="line"><span class="keyword">import</span> com.heima.utils.thread.WmThreadLocalUtil;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.mapper.WmMaterialMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.mapper.WmNewsMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.mapper.WmNewsMaterialMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.service.WmNewsService;</span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.apache.commons.lang.StringUtils;</span><br><span class="line"><span class="keyword">import</span> org.apache.jute.compiler.JString;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.BeanUtils;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Service;</span><br><span class="line"><span class="keyword">import</span> org.springframework.transaction.annotation.Transactional;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.ArrayList;</span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"><span class="keyword">import</span> java.util.stream.Collectors;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Service</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@Transactional</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WmNewsServiceImpl</span> <span class="keyword">extends</span> <span class="title class_">ServiceImpl</span>&lt;WmNewsMapper, WmNews&gt; <span class="keyword">implements</span> <span class="title class_">WmNewsService</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> WmNewsMaterialMapper wmNewsMaterialMapper;</span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> WmMaterialMapper wmMaterialMapper;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> ResponseResult <span class="title function_">findNewsList</span><span class="params">(WmNewsPageReqDto wmNewsPageReqDto)</span> &#123;</span><br><span class="line"> <span class="comment">//1.检查参数</span></span><br><span class="line"> wmNewsPageReqDto.checkParam();</span><br><span class="line"> <span class="comment">//2.根据条件查询</span></span><br><span class="line"> <span class="type">IPage</span> <span class="variable">page</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Page</span>(wmNewsPageReqDto.getPage(), wmNewsPageReqDto.getSize());</span><br><span class="line"> LambdaQueryWrapper&lt;WmNews&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//状态</span></span><br><span class="line"> <span class="keyword">if</span> (wmNewsPageReqDto.getStatus() != <span class="literal">null</span>) &#123;</span><br><span class="line"> queryWrapper.eq(WmNews::getStatus, wmNewsPageReqDto.getStatus());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//开始时间 结束时间</span></span><br><span class="line"> <span class="keyword">if</span> (wmNewsPageReqDto.getBeginPubDate() != <span class="literal">null</span> &amp;&amp; wmNewsPageReqDto.getEndPubDate() != <span class="literal">null</span>) &#123;</span><br><span class="line"> queryWrapper.between(WmNews::getPublishTime, wmNewsPageReqDto.getBeginPubDate(), wmNewsPageReqDto.getEndPubDate());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//所属频道id</span></span><br><span class="line"> <span class="keyword">if</span> (wmNewsPageReqDto.getChannelId() != <span class="literal">null</span>) &#123;</span><br><span class="line"> queryWrapper.eq(WmNews::getChannelId, wmNewsPageReqDto.getChannelId());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//关键字</span></span><br><span class="line"> <span class="keyword">if</span> (wmNewsPageReqDto.getKeyword() != <span class="literal">null</span>) &#123;</span><br><span class="line"> queryWrapper.like(WmNews::getTitle, wmNewsPageReqDto.getKeyword());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//查询当前登录人的文章</span></span><br><span class="line"> queryWrapper.eq(WmNews::getUserId, WmThreadLocalUtil.getUser().getId());</span><br><span class="line"> <span class="comment">//按照发布时间倒序查询</span></span><br><span class="line"> queryWrapper.orderByDesc(WmNews::getPublishTime);</span><br><span class="line"> page = page(page, queryWrapper);</span><br><span class="line"> <span class="comment">//3.结果返回</span></span><br><span class="line"> <span class="type">ResponseResult</span> <span class="variable">responseResult</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PageResponseResult</span>(wmNewsPageReqDto.getPage(), wmNewsPageReqDto.getSize(), (<span class="type">int</span>) page.getTotal());</span><br><span class="line"> responseResult.setData(page.getRecords());</span><br><span class="line"> <span class="keyword">return</span> responseResult;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> ResponseResult <span class="title function_">submitNews</span><span class="params">(WmNewsDto wmNewsDto)</span> &#123;</span><br><span class="line"> <span class="comment">//参数校验</span></span><br><span class="line"> <span class="keyword">if</span> (wmNewsDto == <span class="literal">null</span> || wmNewsDto.getContent() == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> ResponseResult.errorResult(AppHttpCodeEnum.PARAM_INVALID);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//保存或者修改文章</span></span><br><span class="line"> <span class="type">WmNews</span> <span class="variable">wmNews</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">WmNews</span>();</span><br><span class="line"> BeanUtils.copyProperties(wmNewsDto, wmNews);</span><br><span class="line"> <span class="comment">//封面图片从list集合转化成字符串(以,作为分割符号)</span></span><br><span class="line"> <span class="keyword">if</span> (wmNewsDto.getImages() != <span class="literal">null</span> &amp;&amp; wmNewsDto.getImages().size() &gt; <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">imageStr</span> <span class="operator">=</span> StringUtils.join(wmNewsDto.getImages(), <span class="string">&quot;,&quot;</span>);</span><br><span class="line"> wmNews.setImages(imageStr);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//设置封面的类型(数据库中封面的类型是无符号的,无法使用-1表示,所以我们先置空)</span></span><br><span class="line"> <span class="keyword">if</span> (wmNewsDto.getType().equals(WemediaConstants.WM_NEWS_TYPE_AUTO)) &#123;</span><br><span class="line"> wmNews.setType(<span class="literal">null</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//保存或者修改文章的方法</span></span><br><span class="line"> saveOrUpdateWmNews(wmNews);</span><br><span class="line"> <span class="comment">//判断是否为草稿,如果是草稿就退出该方法,草稿是不保存文章与素材的关系的</span></span><br><span class="line"> <span class="keyword">if</span> (wmNewsDto.getStatus().equals(WmNews.Status.NORMAL.getCode())) &#123;</span><br><span class="line"> <span class="keyword">return</span> ResponseResult.okResult(AppHttpCodeEnum.SUCCESS);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//不是草稿,保存文章内容与素材的关系</span></span><br><span class="line"> <span class="comment">//获取文章内容中的图片信息</span></span><br><span class="line"> List&lt;String&gt; materials = getUrlInfo(wmNewsDto.getContent());</span><br><span class="line"> <span class="comment">//保存文章和素材的关系</span></span><br><span class="line"> saveRelativeInfoContent(materials,wmNews.getId());</span><br><span class="line"> <span class="comment">//文章封面图片与素材的关系,布局是自动的,需要自动匹配图片</span></span><br><span class="line"> saveRelativeInfoForCover(wmNewsDto,wmNews,materials);</span><br><span class="line"> <span class="keyword">return</span> ResponseResult.okResult(AppHttpCodeEnum.SUCCESS);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存文章封面图片与素材的关系,布局是自动的,需要自动匹配图片</span></span><br><span class="line"><span class="comment"> * 1.如果内容图片大于等于1 小于3 单图 type 1</span></span><br><span class="line"><span class="comment"> * 2.如果内容图片大于3 多图 type 3</span></span><br><span class="line"><span class="comment"> * 3.如果内容没有图片 无图 type 0</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">void</span> <span class="title function_">saveRelativeInfoForCover</span><span class="params">(WmNewsDto wmNewsDto, WmNews wmNews, List&lt;String&gt; materials)</span> &#123;</span><br><span class="line"> List&lt;String&gt; images = wmNewsDto.getImages();</span><br><span class="line"> <span class="comment">//处理匹配规则</span></span><br><span class="line"> <span class="keyword">if</span>(wmNewsDto.getType().equals(WemediaConstants.WM_NEWS_TYPE_AUTO))&#123;</span><br><span class="line"> <span class="keyword">if</span>(materials.size() &gt;= <span class="number">3</span>)&#123;<span class="comment">//多图</span></span><br><span class="line"> wmNews.setType(WemediaConstants.WM_NEWS_MANY_IMAGE);</span><br><span class="line"> <span class="comment">//截取这篇文章中的三种图片给文章的封面</span></span><br><span class="line"> images = materials.stream().limit(<span class="number">3</span>).collect(Collectors.toList());</span><br><span class="line"> &#125;<span class="keyword">else</span> <span class="keyword">if</span> (materials.size() &gt; <span class="number">1</span> &amp;&amp; materials.size() &lt; <span class="number">3</span>)&#123;<span class="comment">//单图</span></span><br><span class="line"> wmNews.setType(WemediaConstants.WM_NEWS_SINGLE_IMAGE);</span><br><span class="line"> images = materials.stream().limit(<span class="number">1</span>).collect(Collectors.toList());</span><br><span class="line"> &#125;<span class="keyword">else</span> &#123;<span class="comment">//无图</span></span><br><span class="line"> wmNews.setType(WemediaConstants.WM_NEWS_NONE_IMAGE);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//修改文章</span></span><br><span class="line"> <span class="keyword">if</span> (images != <span class="literal">null</span> &amp;&amp; images.size() &gt; <span class="number">0</span>)&#123;</span><br><span class="line"> wmNews.setImages(StringUtils.join(images,<span class="string">&quot;,&quot;</span>));</span><br><span class="line"> &#125;</span><br><span class="line"> updateById(wmNews);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//保存封面与素材的关系</span></span><br><span class="line"> <span class="keyword">if</span> (images != <span class="literal">null</span> &amp;&amp; images.size() &gt; <span class="number">0</span>)&#123;</span><br><span class="line"> saveRelativeInfo(images,wmNews.getId(),WemediaConstants.WM_COVER_REFERENCE);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存文章和素材的对应关系</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> materials 同一篇文章的所有素材图片url</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> newsId 文章的id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">void</span> <span class="title function_">saveRelativeInfoContent</span><span class="params">(List&lt;String&gt; materials, Integer newsId)</span> &#123;</span><br><span class="line"> saveRelativeInfo(materials,newsId,WemediaConstants.WM_CONTENT_REFERENCE);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存文章图片与素材的关系到数据库中</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> materials 同一篇文章中所有的素材图片</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> newsId 文章的id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">void</span> <span class="title function_">saveRelativeInfo</span><span class="params">(List&lt;String&gt; materials, Integer newsId, Short type)</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (materials != <span class="literal">null</span> &amp;&amp; !materials.isEmpty())&#123;</span><br><span class="line"> <span class="comment">//根据图片的url查询素材的id</span></span><br><span class="line"> LambdaQueryWrapper&lt;WmMaterial&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> queryWrapper.in(WmMaterial::getUrl,materials);</span><br><span class="line"> List&lt;WmMaterial&gt; wmMaterials = wmMaterialMapper.selectList(queryWrapper);</span><br><span class="line"> <span class="comment">//判断素材是否被删除</span></span><br><span class="line"> <span class="keyword">if</span> (wmMaterials == <span class="literal">null</span> || wmMaterials.size() == <span class="number">0</span>)&#123;</span><br><span class="line"> <span class="comment">//手动的抛出异常,上面的操作可以回滚</span></span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">CustomException</span>(AppHttpCodeEnum.MATERIASL_REFERENCE);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (materials.size() != wmMaterials.size())&#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">CustomException</span>(AppHttpCodeEnum.MATERIASL_REFERENCE);</span><br><span class="line"> &#125;</span><br><span class="line"> List&lt;Integer&gt; idList = wmMaterials.stream().map(WmMaterial::getId).collect(Collectors.toList());</span><br><span class="line"> wmNewsMaterialMapper.saveRelations(idList,newsId,type);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 提取文章内容中的图片信息</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> content 文章的内容信息</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 图片url组成的集合</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> List&lt;String&gt; <span class="title function_">getUrlInfo</span><span class="params">(String content)</span> &#123;</span><br><span class="line"> ArrayList&lt;String&gt; materials = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> List&lt;Map&gt; maps = JSON.parseArray(content, Map.class);</span><br><span class="line"> <span class="keyword">for</span> (Map map : maps) &#123;</span><br><span class="line"> <span class="keyword">if</span> (map.get(<span class="string">&quot;type&quot;</span>).equals(<span class="string">&quot;image&quot;</span>))&#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">imgUrl</span> <span class="operator">=</span> (String) map.get(<span class="string">&quot;value&quot;</span>);</span><br><span class="line"> materials.add(imgUrl);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> materials;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存或者修改文章的方法</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> wmNews 文章实体类</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">void</span> <span class="title function_">saveOrUpdateWmNews</span><span class="params">(WmNews wmNews)</span> &#123;</span><br><span class="line"> <span class="comment">//补全属性</span></span><br><span class="line"> wmNews.setUserId(WmThreadLocalUtil.getUser().getId());</span><br><span class="line"> wmNews.setCreatedTime(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> wmNews.setSubmitedTime(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> wmNews.setEnable((<span class="type">short</span>) <span class="number">1</span>); <span class="comment">//设置默认上架</span></span><br><span class="line"> <span class="comment">//判断是保存还是修改操作,执行不同的处理逻辑</span></span><br><span class="line"> <span class="keyword">if</span> (wmNews.getId() == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="comment">//保存操作</span></span><br><span class="line"> save(wmNews);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//修改操作</span></span><br><span class="line"> <span class="comment">//删除文章与素材的关联关系</span></span><br><span class="line"> LambdaQueryWrapper&lt;WmNewsMaterial&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> queryWrapper.eq(WmNewsMaterial::getNewsId, wmNews.getId());</span><br><span class="line"> wmNewsMaterialMapper.delete(queryWrapper);</span><br><span class="line"> updateById(wmNews);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20231029220319010.png" alt="image-20231029220319010"></p>
<h3 id="4-4-文章的审核功能-未实现"><a href="#4-4-文章的审核功能-未实现" class="headerlink" title="4.4 文章的审核功能(未实现)"></a>4.4 文章的审核功能(未实现)</h3><h4 id="4-4-1-文章审核功能介绍"><a href="#4-4-1-文章审核功能介绍" class="headerlink" title="4.4.1 文章审核功能介绍"></a>4.4.1 文章审核功能介绍</h4><p>调用第三方的接口(阿里云内容安全审核接口)实现审核功能</p>
<p><strong>功能介绍</strong></p>
<p><img src="/pictures/image-20231029220622019.png" alt="image-20231029220622019"></p>
<p><img src="/pictures/image-20231029220707636.png" alt="image-20231029220707636"></p>
<p><strong>审核流程</strong></p>
<p><img src="/pictures/image-20231029221745020.png" alt="image-20231029221745020"></p>
<p>1 自媒体端发布文章后,开始审核文章</p>
<p>2 审核的主要是审核文章的内容(文本内容和图片)</p>
<p>3 借助第三方提供的接口审核文本</p>
<p>4 借助第三方提供的接口审核图片由于图片存储到minIO中需要先下载才能审核</p>
<p>5 如果审核失败则需要修改自媒体文章的状态status:2 审核失败 status:3 转到人工审核</p>
<p>6 如果审核成功则需要在文章微服务中创建app端需要的文章</p>
<h4 id="4-4-2-调用第三方的审核接口"><a href="#4-4-2-调用第三方的审核接口" class="headerlink" title="4.4.2 调用第三方的审核接口"></a>4.4.2 调用第三方的审核接口</h4><p><strong>第三方审核接口</strong></p>
<p>1.内容安全接口介绍:</p>
<p>内容安全是识别服务支持对图片、视频、文本、语音等对象进行多样化场景检测有效降低内容违规风险。目前很多平台都支持内容检测如阿里云、腾讯云、百度AI、网易云等国内大型互联网公司都对外提供了API。</p>
<p>2.文件检测和图片检测api文档</p>
<p>文本垃圾内容Java SDK: <a href="https://help.aliyun.com/document_detail/53427.html?spm=a2c4g.11186623.6.717.466d7544QbU8Lr">https://help.aliyun.com/document_detail/53427.html?spm=a2c4g.11186623.6.717.466d7544QbU8Lr</a></p>
<p>图片垃圾内容Java SDK: <a href="https://help.aliyun.com/document_detail/53424.html?spm=a2c4g.11186623.6.715.c8f69b12ey35j4">https://help.aliyun.com/document_detail/53424.html?spm=a2c4g.11186623.6.715.c8f69b12ey35j4</a></p>
<p><strong>项目中集成阿里云内容安全接口</strong></p>
<p>1.依赖导入</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.aliyun<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>aliyun-java-sdk-core<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.aliyun<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>aliyun-java-sdk-green<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>2.相关的工具类</p>
<p>GreenImageScan(图片审核的工具类)</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.common.aliyun;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.fastjson.JSON;</span><br><span class="line"><span class="keyword">import</span> com.alibaba.fastjson.JSONArray;</span><br><span class="line"><span class="keyword">import</span> com.alibaba.fastjson.JSONObject;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.DefaultAcsClient;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.IAcsClient;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.green.model.v20180509.ImageSyncScanRequest;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.http.FormatType;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.http.HttpResponse;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.http.MethodType;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.http.ProtocolType;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.profile.DefaultProfile;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.profile.IClientProfile;</span><br><span class="line"><span class="keyword">import</span> com.heima.common.aliyun.util.ClientUploader;</span><br><span class="line"><span class="keyword">import</span> lombok.Getter;</span><br><span class="line"><span class="keyword">import</span> lombok.Setter;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.context.properties.ConfigurationProperties;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.PropertySource;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Component;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.*;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Getter</span></span><br><span class="line"><span class="meta">@Setter</span></span><br><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="meta">@ConfigurationProperties(prefix = &quot;aliyun&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">GreenImageScan</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String accessKeyId;</span><br><span class="line"> <span class="keyword">private</span> String secret;</span><br><span class="line"> <span class="keyword">private</span> String scenes;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> Map <span class="title function_">imageScan</span><span class="params">(List&lt;<span class="type">byte</span>[]&gt; imageList)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="type">IClientProfile</span> <span class="variable">profile</span> <span class="operator">=</span> DefaultProfile</span><br><span class="line"> .getProfile(<span class="string">&quot;cn-shanghai&quot;</span>, accessKeyId, secret);</span><br><span class="line"> DefaultProfile</span><br><span class="line"> .addEndpoint(<span class="string">&quot;cn-shanghai&quot;</span>, <span class="string">&quot;cn-shanghai&quot;</span>, <span class="string">&quot;Green&quot;</span>, <span class="string">&quot;green.cn-shanghai.aliyuncs.com&quot;</span>);</span><br><span class="line"> <span class="type">IAcsClient</span> <span class="variable">client</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">DefaultAcsClient</span>(profile);</span><br><span class="line"> <span class="type">ImageSyncScanRequest</span> <span class="variable">imageSyncScanRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ImageSyncScanRequest</span>();</span><br><span class="line"> <span class="comment">// 指定api返回格式</span></span><br><span class="line"> imageSyncScanRequest.setAcceptFormat(FormatType.JSON);</span><br><span class="line"> <span class="comment">// 指定请求方法</span></span><br><span class="line"> imageSyncScanRequest.setMethod(MethodType.POST);</span><br><span class="line"> imageSyncScanRequest.setEncoding(<span class="string">&quot;utf-8&quot;</span>);</span><br><span class="line"> <span class="comment">//支持http和https</span></span><br><span class="line"> imageSyncScanRequest.setProtocol(ProtocolType.HTTP);</span><br><span class="line"> <span class="type">JSONObject</span> <span class="variable">httpBody</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">JSONObject</span>();</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 设置要检测的场景, 计费是按照该处传递的场景进行</span></span><br><span class="line"><span class="comment"> * 一次请求中可以同时检测多张图片,每张图片可以同时检测多个风险场景,计费按照场景计算</span></span><br><span class="line"><span class="comment"> * 例如检测2张图片场景传递porn、terrorism计费会按照2张图片鉴黄2张图片暴恐检测计算</span></span><br><span class="line"><span class="comment"> * porn: porn表示色情场景检测</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"> httpBody.put(<span class="string">&quot;scenes&quot;</span>, Arrays.asList(scenes.split(<span class="string">&quot;,&quot;</span>)));</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 如果您要检测的文件存于本地服务器上可以通过下述代码片生成url</span></span><br><span class="line"><span class="comment"> * 再将返回的url作为图片地址传递到服务端进行检测</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 设置待检测图片, 一张图片一个task</span></span><br><span class="line"><span class="comment"> * 多张图片同时检测时,处理的时间由最后一个处理完的图片决定</span></span><br><span class="line"><span class="comment"> * 通常情况下批量检测的平均rt比单张检测的要长, 一次批量提交的图片数越多rt被拉长的概率越高</span></span><br><span class="line"><span class="comment"> * 这里以单张图片检测作为示例, 如果是批量图片检测请自行构建多个task</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="type">ClientUploader</span> <span class="variable">clientUploader</span> <span class="operator">=</span> ClientUploader.getImageClientUploader(profile, <span class="literal">false</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">url</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> List&lt;JSONObject&gt; urlList = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;JSONObject&gt;();</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">byte</span>[] bytes : imageList) &#123;</span><br><span class="line"> url = clientUploader.uploadBytes(bytes);</span><br><span class="line"> <span class="type">JSONObject</span> <span class="variable">task</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">JSONObject</span>();</span><br><span class="line"> task.put(<span class="string">&quot;dataId&quot;</span>, UUID.randomUUID().toString());</span><br><span class="line"> <span class="comment">//设置图片链接为上传后的url</span></span><br><span class="line"> task.put(<span class="string">&quot;url&quot;</span>, url);</span><br><span class="line"> task.put(<span class="string">&quot;time&quot;</span>, <span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> urlList.add(task);</span><br><span class="line"> &#125;</span><br><span class="line"> httpBody.put(<span class="string">&quot;tasks&quot;</span>, urlList);</span><br><span class="line"> imageSyncScanRequest.setHttpContent(org.apache.commons.codec.binary.StringUtils.getBytesUtf8(httpBody.toJSONString()),</span><br><span class="line"> <span class="string">&quot;UTF-8&quot;</span>, FormatType.JSON);</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 请设置超时时间, 服务端全链路处理超时时间为10秒请做相应设置</span></span><br><span class="line"><span class="comment"> * 如果您设置的ReadTimeout小于服务端处理的时间程序中会获得一个read timeout异常</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> imageSyncScanRequest.setConnectTimeout(<span class="number">3000</span>);</span><br><span class="line"> imageSyncScanRequest.setReadTimeout(<span class="number">10000</span>);</span><br><span class="line"> <span class="type">HttpResponse</span> <span class="variable">httpResponse</span> <span class="operator">=</span> <span class="literal">null</span>;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> httpResponse = client.doAction(imageSyncScanRequest);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> Map&lt;String, String&gt; resultMap = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"></span><br><span class="line"> <span class="comment">//服务端接收到请求,并完成处理返回的结果</span></span><br><span class="line"> <span class="keyword">if</span> (httpResponse != <span class="literal">null</span> &amp;&amp; httpResponse.isSuccess()) &#123;</span><br><span class="line"> <span class="type">JSONObject</span> <span class="variable">scrResponse</span> <span class="operator">=</span> JSON.parseObject(org.apache.commons.codec.binary.StringUtils.newStringUtf8(httpResponse.getHttpContent()));</span><br><span class="line"> System.out.println(JSON.toJSONString(scrResponse, <span class="literal">true</span>));</span><br><span class="line"> <span class="type">int</span> <span class="variable">requestCode</span> <span class="operator">=</span> scrResponse.getIntValue(<span class="string">&quot;code&quot;</span>);</span><br><span class="line"> <span class="comment">//每一张图片的检测结果</span></span><br><span class="line"> <span class="type">JSONArray</span> <span class="variable">taskResults</span> <span class="operator">=</span> scrResponse.getJSONArray(<span class="string">&quot;data&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (<span class="number">200</span> == requestCode) &#123;</span><br><span class="line"> <span class="keyword">for</span> (Object taskResult : taskResults) &#123;</span><br><span class="line"> <span class="comment">//单张图片的处理结果</span></span><br><span class="line"> <span class="type">int</span> <span class="variable">taskCode</span> <span class="operator">=</span> ((JSONObject) taskResult).getIntValue(<span class="string">&quot;code&quot;</span>);</span><br><span class="line"> <span class="comment">//图片要检测的场景的处理结果, 如果是多个场景,则会有每个场景的结果</span></span><br><span class="line"> <span class="type">JSONArray</span> <span class="variable">sceneResults</span> <span class="operator">=</span> ((JSONObject) taskResult).getJSONArray(<span class="string">&quot;results&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (<span class="number">200</span> == taskCode) &#123;</span><br><span class="line"> <span class="keyword">for</span> (Object sceneResult : sceneResults) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">scene</span> <span class="operator">=</span> ((JSONObject) sceneResult).getString(<span class="string">&quot;scene&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">label</span> <span class="operator">=</span> ((JSONObject) sceneResult).getString(<span class="string">&quot;label&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">suggestion</span> <span class="operator">=</span> ((JSONObject) sceneResult).getString(<span class="string">&quot;suggestion&quot;</span>);</span><br><span class="line"> <span class="comment">//根据scene和suggetion做相关处理</span></span><br><span class="line"> <span class="comment">//do something</span></span><br><span class="line"> System.out.println(<span class="string">&quot;scene = [&quot;</span> + scene + <span class="string">&quot;]&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;suggestion = [&quot;</span> + suggestion + <span class="string">&quot;]&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;suggestion = [&quot;</span> + label + <span class="string">&quot;]&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!suggestion.equals(<span class="string">&quot;pass&quot;</span>)) &#123;</span><br><span class="line"> resultMap.put(<span class="string">&quot;suggestion&quot;</span>, suggestion);</span><br><span class="line"> resultMap.put(<span class="string">&quot;label&quot;</span>, label);</span><br><span class="line"> <span class="keyword">return</span> resultMap;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//单张图片处理失败, 原因视具体的情况详细分析</span></span><br><span class="line"> System.out.println(<span class="string">&quot;task process fail. task response:&quot;</span> + JSON.toJSONString(taskResult));</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> resultMap.put(<span class="string">&quot;suggestion&quot;</span>,<span class="string">&quot;pass&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span> resultMap;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 表明请求整体处理失败,原因视具体的情况详细分析</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> System.out.println(<span class="string">&quot;the whole image scan request failed. response:&quot;</span> + JSON.toJSONString(scrResponse));</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>GreenTextScan文字审核的工具类</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.common.aliyun;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.fastjson.JSON;</span><br><span class="line"><span class="keyword">import</span> com.alibaba.fastjson.JSONArray;</span><br><span class="line"><span class="keyword">import</span> com.alibaba.fastjson.JSONObject;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.DefaultAcsClient;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.IAcsClient;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.exceptions.ClientException;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.exceptions.ServerException;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.green.model.v20180509.TextScanRequest;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.http.FormatType;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.http.HttpResponse;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.profile.DefaultProfile;</span><br><span class="line"><span class="keyword">import</span> com.aliyuncs.profile.IClientProfile;</span><br><span class="line"><span class="keyword">import</span> lombok.Getter;</span><br><span class="line"><span class="keyword">import</span> lombok.Setter;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.context.properties.ConfigurationProperties;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.PropertySource;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Component;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.*;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Getter</span></span><br><span class="line"><span class="meta">@Setter</span></span><br><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="meta">@ConfigurationProperties(prefix = &quot;aliyun&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">GreenTextScan</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String accessKeyId;</span><br><span class="line"> <span class="keyword">private</span> String secret;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> Map <span class="title function_">greeTextScan</span><span class="params">(String content)</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> System.out.println(accessKeyId);</span><br><span class="line"> <span class="type">IClientProfile</span> <span class="variable">profile</span> <span class="operator">=</span> DefaultProfile</span><br><span class="line"> .getProfile(<span class="string">&quot;cn-shanghai&quot;</span>, accessKeyId, secret);</span><br><span class="line"> DefaultProfile.addEndpoint(<span class="string">&quot;cn-shanghai&quot;</span>, <span class="string">&quot;cn-shanghai&quot;</span>, <span class="string">&quot;Green&quot;</span>, <span class="string">&quot;green.cn-shanghai.aliyuncs.com&quot;</span>);</span><br><span class="line"> <span class="type">IAcsClient</span> <span class="variable">client</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">DefaultAcsClient</span>(profile);</span><br><span class="line"> <span class="type">TextScanRequest</span> <span class="variable">textScanRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">TextScanRequest</span>();</span><br><span class="line"> textScanRequest.setAcceptFormat(FormatType.JSON); <span class="comment">// 指定api返回格式</span></span><br><span class="line"> textScanRequest.setHttpContentType(FormatType.JSON);</span><br><span class="line"> textScanRequest.setMethod(com.aliyuncs.http.MethodType.POST); <span class="comment">// 指定请求方法</span></span><br><span class="line"> textScanRequest.setEncoding(<span class="string">&quot;UTF-8&quot;</span>);</span><br><span class="line"> textScanRequest.setRegionId(<span class="string">&quot;cn-shanghai&quot;</span>);</span><br><span class="line"> List&lt;Map&lt;String, Object&gt;&gt; tasks = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;Map&lt;String, Object&gt;&gt;();</span><br><span class="line"> Map&lt;String, Object&gt; task1 = <span class="keyword">new</span> <span class="title class_">LinkedHashMap</span>&lt;String, Object&gt;();</span><br><span class="line"> task1.put(<span class="string">&quot;dataId&quot;</span>, UUID.randomUUID().toString());</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 待检测的文本长度不超过10000个字符</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> task1.put(<span class="string">&quot;content&quot;</span>, content);</span><br><span class="line"> tasks.add(task1);</span><br><span class="line"> <span class="type">JSONObject</span> <span class="variable">data</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">JSONObject</span>();</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 检测场景文本垃圾检测传递antispam</span></span><br><span class="line"><span class="comment"> **/</span></span><br><span class="line"> data.put(<span class="string">&quot;scenes&quot;</span>, Arrays.asList(<span class="string">&quot;antispam&quot;</span>));</span><br><span class="line"> data.put(<span class="string">&quot;tasks&quot;</span>, tasks);</span><br><span class="line"> System.out.println(JSON.toJSONString(data, <span class="literal">true</span>));</span><br><span class="line"> textScanRequest.setHttpContent(data.toJSONString().getBytes(<span class="string">&quot;UTF-8&quot;</span>), <span class="string">&quot;UTF-8&quot;</span>, FormatType.JSON);</span><br><span class="line"> <span class="comment">// 请务必设置超时时间</span></span><br><span class="line"> textScanRequest.setConnectTimeout(<span class="number">3000</span>);</span><br><span class="line"> textScanRequest.setReadTimeout(<span class="number">6000</span>);</span><br><span class="line"></span><br><span class="line"> Map&lt;String, String&gt; resultMap = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">HttpResponse</span> <span class="variable">httpResponse</span> <span class="operator">=</span> client.doAction(textScanRequest);</span><br><span class="line"> <span class="keyword">if</span> (httpResponse.isSuccess()) &#123;</span><br><span class="line"> <span class="type">JSONObject</span> <span class="variable">scrResponse</span> <span class="operator">=</span> JSON.parseObject(<span class="keyword">new</span> <span class="title class_">String</span>(httpResponse.getHttpContent(), <span class="string">&quot;UTF-8&quot;</span>));</span><br><span class="line"> System.out.println(JSON.toJSONString(scrResponse, <span class="literal">true</span>));</span><br><span class="line"> <span class="keyword">if</span> (<span class="number">200</span> == scrResponse.getInteger(<span class="string">&quot;code&quot;</span>)) &#123;</span><br><span class="line"> <span class="type">JSONArray</span> <span class="variable">taskResults</span> <span class="operator">=</span> scrResponse.getJSONArray(<span class="string">&quot;data&quot;</span>);</span><br><span class="line"> <span class="keyword">for</span> (Object taskResult : taskResults) &#123;</span><br><span class="line"> <span class="keyword">if</span> (<span class="number">200</span> == ((JSONObject) taskResult).getInteger(<span class="string">&quot;code&quot;</span>)) &#123;</span><br><span class="line"> <span class="type">JSONArray</span> <span class="variable">sceneResults</span> <span class="operator">=</span> ((JSONObject) taskResult).getJSONArray(<span class="string">&quot;results&quot;</span>);</span><br><span class="line"> <span class="keyword">for</span> (Object sceneResult : sceneResults) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">scene</span> <span class="operator">=</span> ((JSONObject) sceneResult).getString(<span class="string">&quot;scene&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">label</span> <span class="operator">=</span> ((JSONObject) sceneResult).getString(<span class="string">&quot;label&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">suggestion</span> <span class="operator">=</span> ((JSONObject) sceneResult).getString(<span class="string">&quot;suggestion&quot;</span>);</span><br><span class="line"> System.out.println(<span class="string">&quot;suggestion = [&quot;</span> + label + <span class="string">&quot;]&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!suggestion.equals(<span class="string">&quot;pass&quot;</span>)) &#123;</span><br><span class="line"> resultMap.put(<span class="string">&quot;suggestion&quot;</span>, suggestion);</span><br><span class="line"> resultMap.put(<span class="string">&quot;label&quot;</span>, label);</span><br><span class="line"> <span class="keyword">return</span> resultMap;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> resultMap.put(<span class="string">&quot;suggestion&quot;</span>, <span class="string">&quot;pass&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span> resultMap;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">catch</span> (ServerException e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125; <span class="keyword">catch</span> (ClientException e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">null</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>3.在heima-leadnews-wemedia中的nacos配置中心添加以下配置</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">aliyun:</span></span><br><span class="line"> <span class="attr">accessKeyId:</span> <span class="string">xxxxxxxxxxxxxxxxxxx</span></span><br><span class="line"> <span class="attr">secret:</span> <span class="string">xxxxxxxxxxxxxxxxxxxxxxxx</span></span><br><span class="line"><span class="comment">#aliyun.scenes=porn,terrorism,ad,qrcode,live,logo</span></span><br><span class="line"> <span class="attr">scenes:</span> <span class="string">terrorism</span> <span class="comment">#检测的场景</span></span><br></pre></td></tr></table></figure>
<p>4.编写测试类测试</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">import</span> com.heima.common.aliyun.GreenImageScan;</span><br><span class="line"><span class="keyword">import</span> com.heima.common.aliyun.GreenTextScan;</span><br><span class="line"><span class="keyword">import</span> com.heima.file.service.FileStorageService;</span><br><span class="line"><span class="keyword">import</span> org.junit.Test;</span><br><span class="line"><span class="keyword">import</span> org.junit.runner.RunWith;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.test.context.SpringBootTest;</span><br><span class="line"><span class="keyword">import</span> org.springframework.test.context.junit4.SpringRunner;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.Arrays;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"></span><br><span class="line"><span class="meta">@SpringBootTest(classes = WemediaApplication.class)</span></span><br><span class="line"><span class="meta">@RunWith(SpringRunner.class)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">AliyunTest</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> GreenTextScan greenTextScan;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> GreenImageScan greenImageScan;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> FileStorageService fileStorageService;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">testScanText</span><span class="params">()</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="type">Map</span> <span class="variable">map</span> <span class="operator">=</span> greenTextScan.greeTextScan(<span class="string">&quot;我是一个好人,冰毒&quot;</span>);</span><br><span class="line"> System.out.println(map);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">testScanImage</span><span class="params">()</span> <span class="keyword">throws</span> Exception &#123;</span><br><span class="line"> <span class="type">byte</span>[] bytes = fileStorageService.downLoadFile(<span class="string">&quot;http://192.168.200.130:9000/leadnews/2021/04/26/ef3cbe458db249f7bd6fb4339e593e55.jpg&quot;</span>);</span><br><span class="line"> <span class="type">Map</span> <span class="variable">map</span> <span class="operator">=</span> greenImageScan.imageScan(Arrays.asList(bytes));</span><br><span class="line"> System.out.println(map);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="4-4-3-分布式ID的实现"><a href="#4-4-3-分布式ID的实现" class="headerlink" title="4.4.3 分布式ID的实现"></a>4.4.3 分布式ID的实现</h4><p>为什么使用分布式ID</p>
<p><img src="/pictures/image-20231116230439706.png" alt="image-20231116230439706"></p>
<p>分布式ID的技术选型</p>
<p><img src="/pictures/image-20231116230714014.png" alt="image-20231116230714014"></p>
<p>雪花算法的介绍</p>
<p><img src="/pictures/image-20231116230953909.png" alt="image-20231116230953909"></p>
<p>mybatis-plus已经集成了雪花算法完成以下两步即可在项目中集成雪花算法</p>
<p>第一在实体类中的id上加入如下配置指定类型为id_worker</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@TableId(value = &quot;id&quot;,type = IdType.ID_WORKER)</span></span><br><span class="line"><span class="keyword">private</span> Long id;</span><br></pre></td></tr></table></figure>
<p>第二在application.yml文件中配置数据中心id和机器id</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">mybatis-plus:</span></span><br><span class="line"> <span class="attr">mapper-locations:</span> <span class="string">classpath*:mapper/*.xml</span></span><br><span class="line"> <span class="comment"># 设置别名包扫描路径,通过该属性可以给包中的类注册别名</span></span><br><span class="line"> <span class="attr">type-aliases-package:</span> <span class="string">com.heima.model.article.pojos</span></span><br><span class="line"> <span class="attr">global-config:</span></span><br><span class="line"> <span class="attr">datacenter-id:</span> <span class="number">1</span></span><br><span class="line"> <span class="attr">workerId:</span> <span class="number">1</span></span><br></pre></td></tr></table></figure>
<p>datacenter-id:数据中心id(取值范围0-31) workerId:机器id(取值范围0-31)</p>
<h4 id="4-4-4-审核功能的具体实现"><a href="#4-4-4-审核功能的具体实现" class="headerlink" title="4.4.4 审核功能的具体实现"></a>4.4.4 审核功能的具体实现</h4><p>由于没有阿里云相关的ak和sk所以本部分默认每篇文章的文字和图片都审核通过中间会注释掉调用第三方审核接口的代码</p>
<p><img src="/pictures/image-20231202174634986.png" alt="image-20231202174634986"></p>
<p>service层代码实现</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.wemedia.service.impl;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.fastjson.JSON;</span><br><span class="line"><span class="keyword">import</span> com.heima.apis.article.IArticleClient;</span><br><span class="line"><span class="keyword">import</span> com.heima.common.aliyun.GreenImageScan;</span><br><span class="line"><span class="keyword">import</span> com.heima.common.aliyun.GreenTextScan;</span><br><span class="line"><span class="keyword">import</span> com.heima.file.service.FileStorageService;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.article.dtos.ArticleDto;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.dtos.ResponseResult;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.pojos.WmChannel;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.pojos.WmNews;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.pojos.WmUser;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.mapper.WmChannelMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.mapper.WmNewsMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.mapper.WmUserMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.service.WmNewsAutoScanService;</span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.apache.commons.lang.StringUtils;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.BeanUtils;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Value;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Service;</span><br><span class="line"><span class="keyword">import</span> org.springframework.transaction.annotation.Transactional;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.*;</span><br><span class="line"><span class="keyword">import</span> java.util.stream.Collectors;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/11/19</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Service</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@Transactional</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WmNewsAutoScanServiceImpl</span> <span class="keyword">implements</span> <span class="title class_">WmNewsAutoScanService</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//涉及文本内容的审核,需要调用第三方的服务,这里我们直接设置成测试环境,跳过调用第三方服务校验的过程</span></span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;check.env&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String environment;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> WmNewsMapper wmNewsMapper;</span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> GreenTextScan greenTextScan;</span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> GreenImageScan greenImageScan;</span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> FileStorageService fileStorageService;</span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> IArticleClient iArticleClient;</span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> WmChannelMapper wmChannelMapper;</span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> WmUserMapper wmUserMapper;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">autoScanWmNews</span><span class="params">(Integer id)</span> &#123;</span><br><span class="line"> <span class="comment">//1.查询自媒体文章的信息</span></span><br><span class="line"> <span class="type">WmNews</span> <span class="variable">wmNews</span> <span class="operator">=</span> wmNewsMapper.selectById(id);</span><br><span class="line"> <span class="comment">//文章不存在的话,直接抛出异常</span></span><br><span class="line"> <span class="keyword">if</span> (wmNews == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;文章不存在,无法审核!&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//判断文章是不是待审核的状态</span></span><br><span class="line"> <span class="keyword">if</span> (wmNews.getStatus().equals(WmNews.Status.SUBMIT.getCode())) &#123;</span><br><span class="line"> <span class="comment">//2.抽取文章内容中的文字和图片信息</span></span><br><span class="line"> Map&lt;String, Object&gt; textAndImages = getTextAndImages(wmNews);</span><br><span class="line"> <span class="comment">//3.调用阿里云的接口实现文章的审核功能</span></span><br><span class="line"> <span class="comment">//审核文本内容</span></span><br><span class="line"> <span class="type">Boolean</span> <span class="variable">isPassText</span> <span class="operator">=</span> checkText((String) textAndImages.get(<span class="string">&quot;content&quot;</span>), wmNews);</span><br><span class="line"> <span class="keyword">if</span> (!isPassText) <span class="keyword">return</span>;</span><br><span class="line"> <span class="comment">//审核图片内容</span></span><br><span class="line"> <span class="type">Boolean</span> <span class="variable">isPassImage</span> <span class="operator">=</span> checkImages((List&lt;String&gt;) textAndImages.get(<span class="string">&quot;images&quot;</span>), wmNews);</span><br><span class="line"> <span class="keyword">if</span> (!isPassImage) <span class="keyword">return</span>;</span><br><span class="line"> <span class="comment">//4.审核成功,保存app端的相关文章数据</span></span><br><span class="line"> <span class="type">ResponseResult</span> <span class="variable">responseResult</span> <span class="operator">=</span> saveAppArticle(wmNews);</span><br><span class="line"> <span class="keyword">if</span> (!responseResult.getCode().equals(<span class="number">200</span>)) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;文章审核-保存app端文章失败&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//回填article_id</span></span><br><span class="line"> wmNews.setArticleId((Long) responseResult.getData());</span><br><span class="line"> updateWmNews(wmNews, (<span class="type">short</span>) <span class="number">9</span>, <span class="string">&quot;审核成功&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存app端的相关文章数据</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> wmNews 文章相关的信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> ResponseResult <span class="title function_">saveAppArticle</span><span class="params">(WmNews wmNews)</span> &#123;</span><br><span class="line"> <span class="type">ArticleDto</span> <span class="variable">dto</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ArticleDto</span>();</span><br><span class="line"> BeanUtils.copyProperties(wmNews, dto);</span><br><span class="line"> <span class="comment">//文章布局</span></span><br><span class="line"> dto.setLayout(wmNews.getType());</span><br><span class="line"> <span class="comment">//频道</span></span><br><span class="line"> <span class="type">WmChannel</span> <span class="variable">wmChannel</span> <span class="operator">=</span> wmChannelMapper.selectById(wmNews.getChannelId());</span><br><span class="line"> <span class="keyword">if</span> (wmChannel != <span class="literal">null</span>) &#123;</span><br><span class="line"> dto.setChannelName(wmChannel.getName());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//作者</span></span><br><span class="line"> dto.setAuthorId(wmNews.getUserId().longValue());</span><br><span class="line"> <span class="type">WmUser</span> <span class="variable">wmUser</span> <span class="operator">=</span> wmUserMapper.selectById(wmNews.getUserId());</span><br><span class="line"> <span class="keyword">if</span> (wmUser != <span class="literal">null</span>) &#123;</span><br><span class="line"> dto.setAuthorName(wmUser.getName());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//设置文章的id</span></span><br><span class="line"> <span class="keyword">if</span> (wmNews.getArticleId() != <span class="literal">null</span>) &#123;</span><br><span class="line"> dto.setId(wmNews.getArticleId());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//设置创建时间</span></span><br><span class="line"> dto.setCreatedTime(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> <span class="keyword">return</span> iArticleClient.saveArticle(dto);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 审核文章的图片内容</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> images 文章的图片信息</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> wmNews 文章实体</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 是否通过校验</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Boolean <span class="title function_">checkImages</span><span class="params">(List&lt;String&gt; images, WmNews wmNews)</span> &#123;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">flag</span> <span class="operator">=</span> <span class="literal">true</span>;</span><br><span class="line"> <span class="keyword">if</span> (images == <span class="literal">null</span> || images.size() == <span class="number">0</span> || <span class="string">&quot;test&quot;</span>.equals(environment)) &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//下载图片</span></span><br><span class="line"> <span class="comment">//去重</span></span><br><span class="line"> images = images.stream().distinct().collect(Collectors.toList());</span><br><span class="line"> <span class="comment">//创建集合,用于存储下载的图片</span></span><br><span class="line"> ArrayList&lt;<span class="type">byte</span>[]&gt; byteList = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> <span class="keyword">for</span> (String image : images) &#123;</span><br><span class="line"> <span class="type">byte</span>[] bytes = fileStorageService.downLoadFile(image);</span><br><span class="line"> byteList.add(bytes);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//审核图片</span></span><br><span class="line"> <span class="comment">//调用方法正式审核</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//调用阿里云的接口对文字进行审核</span></span><br><span class="line"> <span class="type">Map</span> <span class="variable">map</span> <span class="operator">=</span> greenImageScan.imageScan(byteList);</span><br><span class="line"> <span class="comment">//根据审核反馈的结果做出不同的处理</span></span><br><span class="line"> <span class="keyword">if</span> (map != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="comment">//审核失败</span></span><br><span class="line"> <span class="keyword">if</span> (map.get(<span class="string">&quot;suggestion&quot;</span>).equals(<span class="string">&quot;block&quot;</span>)) &#123;</span><br><span class="line"> updateWmNews(wmNews, (<span class="type">short</span>) <span class="number">2</span>, <span class="string">&quot;图片存在违规内容!&quot;</span>);</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//不确定,需要人工审核</span></span><br><span class="line"> <span class="keyword">if</span> (map.get(<span class="string">&quot;suggestion&quot;</span>).equals(<span class="string">&quot;review&quot;</span>)) &#123;</span><br><span class="line"> updateWmNews(wmNews, (<span class="type">short</span>) <span class="number">3</span>, <span class="string">&quot;图片存在违规内容!&quot;</span>);</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;图片审核时出现异常!&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> flag;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 审核文章的文字内容</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> content 文章的文字信息</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> wmNews 文章实体</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 是否通过审核</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Boolean <span class="title function_">checkText</span><span class="params">(String content, WmNews wmNews)</span> &#123;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">flag</span> <span class="operator">=</span> <span class="literal">true</span>;</span><br><span class="line"> <span class="keyword">if</span> ((content + wmNews.getTitle()).length() == <span class="number">0</span> || <span class="string">&quot;test&quot;</span>.equals(environment)) &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//调用方法正式审核</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//调用阿里云的接口对文字进行审核</span></span><br><span class="line"> <span class="type">Map</span> <span class="variable">map</span> <span class="operator">=</span> greenTextScan.greeTextScan(content);</span><br><span class="line"> <span class="comment">//根据审核反馈的结果做出不同的处理</span></span><br><span class="line"> <span class="keyword">if</span> (map != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="comment">//审核失败</span></span><br><span class="line"> <span class="keyword">if</span> (map.get(<span class="string">&quot;suggestion&quot;</span>).equals(<span class="string">&quot;block&quot;</span>)) &#123;</span><br><span class="line"> updateWmNews(wmNews, (<span class="type">short</span>) <span class="number">2</span>, <span class="string">&quot;文章中的文字信息出现违规内容!&quot;</span>);</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//不确定,需要人工审核</span></span><br><span class="line"> <span class="keyword">if</span> (map.get(<span class="string">&quot;suggestion&quot;</span>).equals(<span class="string">&quot;review&quot;</span>)) &#123;</span><br><span class="line"> updateWmNews(wmNews, (<span class="type">short</span>) <span class="number">3</span>, <span class="string">&quot;文章中的文字信息在审核时有不确定的内容!&quot;</span>);</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;文字审核时出现异常!&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> flag;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 修改文章审核相关信息的方法</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> wmNews 文章实体</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> status 文章的审核状态</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> reason 审核不通过的原因</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">updateWmNews</span><span class="params">(WmNews wmNews, <span class="type">short</span> status, String reason)</span> &#123;</span><br><span class="line"> wmNews.setStatus(status);</span><br><span class="line"> wmNews.setReason(reason);</span><br><span class="line"> wmNewsMapper.updateById(wmNews);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 提取文章中的文字和图片信息</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> wmNews 文章</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 图片和文字组成的集合</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Map&lt;String, Object&gt; <span class="title function_">getTextAndImages</span><span class="params">(WmNews wmNews)</span> &#123;</span><br><span class="line"> <span class="comment">//存储文字信息</span></span><br><span class="line"> <span class="type">StringBuilder</span> <span class="variable">stringBuilder</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">StringBuilder</span>();</span><br><span class="line"> <span class="comment">//文章中图片信息组成的集合</span></span><br><span class="line"> ArrayList&lt;String&gt; images = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//从文章中提取文字和图片信息</span></span><br><span class="line"> <span class="keyword">if</span> (StringUtils.isNotBlank(wmNews.getContent())) &#123;</span><br><span class="line"> List&lt;Map&gt; maps = JSON.parseArray(wmNews.getContent(), Map.class);</span><br><span class="line"> <span class="keyword">for</span> (Map map : maps) &#123;</span><br><span class="line"> <span class="keyword">if</span> (map.get(<span class="string">&quot;type&quot;</span>).equals(<span class="string">&quot;text&quot;</span>)) &#123;</span><br><span class="line"> stringBuilder.append(map.get(<span class="string">&quot;value&quot;</span>));</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (map.get(<span class="string">&quot;type&quot;</span>).equals(<span class="string">&quot;image&quot;</span>)) &#123;</span><br><span class="line"> images.add((String) map.get(<span class="string">&quot;values&quot;</span>));</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//保存文章的封面信息到图片的集合中</span></span><br><span class="line"> <span class="keyword">if</span> (StringUtils.isNotBlank(wmNews.getImages())) &#123;</span><br><span class="line"> String[] split = wmNews.getImages().split(<span class="string">&quot;,&quot;</span>);</span><br><span class="line"> images.addAll(Arrays.asList(split));</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//创建返回的结果</span></span><br><span class="line"> HashMap&lt;String, Object&gt; resultMap = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> resultMap.put(<span class="string">&quot;content&quot;</span>, stringBuilder.toString());</span><br><span class="line"> resultMap.put(<span class="string">&quot;images&quot;</span>, images);</span><br><span class="line"> <span class="keyword">return</span> resultMap;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>单元测试</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.wemedia.service;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.WemediaApplication;</span><br><span class="line"><span class="keyword">import</span> org.junit.Test;</span><br><span class="line"><span class="keyword">import</span> org.junit.runner.RunWith;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.test.context.SpringBootTest;</span><br><span class="line"><span class="keyword">import</span> org.springframework.test.context.junit4.SpringRunner;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/12/2</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@SpringBootTest(classes = WemediaApplication.class)</span></span><br><span class="line"><span class="meta">@RunWith(SpringRunner.class)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WmNewsAutoScanServiceTest</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> WmNewsAutoScanService wmNewsAutoScanService;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Test</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">autoScanWmNews</span><span class="params">()</span> &#123;</span><br><span class="line"> wmNewsAutoScanService.autoScanWmNews(<span class="number">3</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20231202232643073.png" alt="image-20231202232643073"></p>
<p>实现步骤:</p>
<p>①在heima-leadnews-feign-api编写降级逻辑</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.apis.article.fallback;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.apis.article.IArticleClient;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.article.dtos.ArticleDto;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.dtos.ResponseResult;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.enums.AppHttpCodeEnum;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Component;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * feign失败配置</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> itheima</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">IArticleClientFallback</span> <span class="keyword">implements</span> <span class="title class_">IArticleClient</span> &#123;</span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> ResponseResult <span class="title function_">saveArticle</span><span class="params">(ArticleDto dto)</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR,<span class="string">&quot;获取数据失败&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>在自媒体微服务中添加类,扫描降级代码类的包</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.wemedia.config;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.ComponentScan;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="meta">@ComponentScan(&quot;com.heima.apis.article.fallback&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">InitConfig</span> &#123;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>②:远程接口中指向降级代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.apis.article;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.apis.article.fallback.IArticleClientFallback;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.article.dtos.ArticleDto;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.dtos.ResponseResult;</span><br><span class="line"><span class="keyword">import</span> org.springframework.cloud.openfeign.FeignClient;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.PostMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestBody;</span><br><span class="line"></span><br><span class="line"><span class="meta">@FeignClient(value = &quot;leadnews-article&quot;,fallback = IArticleClientFallback.class)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">interface</span> <span class="title class_">IArticleClient</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@PostMapping(&quot;/api/v1/article/save&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> ResponseResult <span class="title function_">saveArticle</span><span class="params">(<span class="meta">@RequestBody</span> ArticleDto dto)</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>③客户端开启降级heima-leadnews-wemedia</p>
<p>在wemedia的nacos配置中心里添加如下内容开启服务降级也可以指定服务响应的超时的时间</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">feign:</span></span><br><span class="line"> <span class="comment"># 开启feign对hystrix熔断降级的支持</span></span><br><span class="line"> <span class="attr">hystrix:</span></span><br><span class="line"> <span class="attr">enabled:</span> <span class="literal">true</span></span><br><span class="line"> <span class="comment"># 修改调用超时时间</span></span><br><span class="line"> <span class="attr">client:</span></span><br><span class="line"> <span class="attr">config:</span></span><br><span class="line"> <span class="attr">default:</span></span><br><span class="line"> <span class="attr">connectTimeout:</span> <span class="number">2000</span></span><br><span class="line"> <span class="attr">readTimeout:</span> <span class="number">2000</span></span><br></pre></td></tr></table></figure>
<p>④:测试</p>
<p>在ApArticleServiceImpl类中saveArticle方法添加代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">try</span> &#123;</span><br><span class="line"> Thread.sleep(<span class="number">3000</span>);</span><br><span class="line">&#125; <span class="keyword">catch</span> (InterruptedException e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>在自媒体端进行审核测试,会出现服务降级的现象</p>
<h3 id="4-5-app端文章保存功能"><a href="#4-5-app端文章保存功能" class="headerlink" title="4.5 app端文章保存功能"></a>4.5 app端文章保存功能</h3><p><strong>实现思路</strong></p>
<p>在文章审核成功以后需要在app的article库中新增文章数据</p>
<p>1.保存文章信息 ap_article</p>
<p>2.保存文章配置信息 ap_article_config</p>
<p>3.保存文章内容 ap_article_content</p>
<p><img src="/pictures/image-20231117221219911.png" alt="image-20231117221219911"></p>
<p><strong>保存文章的接口</strong></p>
<table>
<thead>
<tr>
<th></th>
<th><strong>说明</strong></th>
</tr>
</thead>
<tbody><tr>
<td>接口路径</td>
<td>&#x2F;api&#x2F;v1&#x2F;article&#x2F;save</td>
</tr>
<tr>
<td>请求方式</td>
<td>POST</td>
</tr>
<tr>
<td>参数</td>
<td>ArticleDto</td>
</tr>
<tr>
<td>响应结果</td>
<td>ResponseResult</td>
</tr>
</tbody></table>
<p>ArticleDto</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.model.article.dtos;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.model.article.pojos.ApArticle;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ArticleDto</span> <span class="keyword">extends</span> <span class="title class_">ApArticle</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 文章内容</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String content;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>成功:</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;code&quot;</span><span class="punctuation">:</span> <span class="number">200</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;errorMessage&quot;</span> <span class="punctuation">:</span> <span class="string">&quot;操作成功&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;data&quot;</span><span class="punctuation">:</span><span class="string">&quot;1302864436297442242&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p>失败:</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;code&quot;</span><span class="punctuation">:</span><span class="number">501</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;errorMessage&quot;</span><span class="punctuation">:</span><span class="string">&quot;参数失效&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;code&quot;</span><span class="punctuation">:</span><span class="number">501</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;errorMessage&quot;</span><span class="punctuation">:</span><span class="string">&quot;文章没有找到&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><strong>实现步骤</strong></p>
<p><img src="/pictures/image-20231117221333422.png" alt="image-20231117221333422"></p>
<p>功能实现:</p>
<p>①在heima-leadnews- feign-api中新增接口</p>
<p>第一线导入feign的依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-openfeign<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>第二:定义文章端的接口</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line">package com.heima.apis.article;</span><br><span class="line"></span><br><span class="line">import com.heima.model.article.dtos.ArticleDto;</span><br><span class="line">import com.heima.model.common.dtos.ResponseResult;</span><br><span class="line">import org.springframework.cloud.openfeign.FeignClient;</span><br><span class="line">import org.springframework.web.bind.annotation.PostMapping;</span><br><span class="line">import org.springframework.web.bind.annotation.RequestBody;</span><br><span class="line"></span><br><span class="line">import java.io.IOException;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">@FeignClient(value = <span class="string">&quot;leadnews-article&quot;</span>)</span><br><span class="line">public interface IArticleClient <span class="punctuation">&#123;</span></span><br><span class="line"></span><br><span class="line"> @PostMapping(<span class="string">&quot;/api/v1/article/save&quot;</span>)</span><br><span class="line"> public ResponseResult saveArticle(@RequestBody ArticleDto dto) ;</span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p>②在heima-leadnews-article中实现该方法</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.article.feign;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.apis.article.IArticleClient;</span><br><span class="line"><span class="keyword">import</span> com.heima.article.service.ApArticleService;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.article.dtos.ArticleDto;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.dtos.ResponseResult;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.*;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"></span><br><span class="line"><span class="meta">@RestController</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ArticleClient</span> <span class="keyword">implements</span> <span class="title class_">IArticleClient</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> ApArticleService apArticleService;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="meta">@PostMapping(&quot;/api/v1/article/save&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> ResponseResult <span class="title function_">saveArticle</span><span class="params">(<span class="meta">@RequestBody</span> ArticleDto dto)</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> apArticleService.saveArticle(dto);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>③拷贝mapper</p>
<p>在资料文件夹中拷贝ApArticleConfigMapper类到mapper文件夹中</p>
<p>同时修改ApArticleConfig类添加如下构造函数</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.model.article.pojos;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.IdType;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableField;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableId;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableName;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"><span class="keyword">import</span> lombok.NoArgsConstructor;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.Serializable;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * &lt;p&gt;</span></span><br><span class="line"><span class="comment"> * APP已发布文章配置表</span></span><br><span class="line"><span class="comment"> * &lt;/p&gt;</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> itheima</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@NoArgsConstructor</span></span><br><span class="line"><span class="meta">@TableName(&quot;ap_article_config&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ApArticleConfig</span> <span class="keyword">implements</span> <span class="title class_">Serializable</span> &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="title function_">ApArticleConfig</span><span class="params">(Long articleId)</span>&#123;</span><br><span class="line"> <span class="built_in">this</span>.articleId = articleId;</span><br><span class="line"> <span class="built_in">this</span>.isComment = <span class="literal">true</span>;</span><br><span class="line"> <span class="built_in">this</span>.isForward = <span class="literal">true</span>;</span><br><span class="line"> <span class="built_in">this</span>.isDelete = <span class="literal">false</span>;</span><br><span class="line"> <span class="built_in">this</span>.isDown = <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@TableId(value = &quot;id&quot;,type = IdType.ID_WORKER)</span></span><br><span class="line"> <span class="keyword">private</span> Long id;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 文章id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;article_id&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Long articleId;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 是否可评论</span></span><br><span class="line"><span class="comment"> * true: 可以评论 1</span></span><br><span class="line"><span class="comment"> * false: 不可评论 0</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;is_comment&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Boolean isComment;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 是否转发</span></span><br><span class="line"><span class="comment"> * true: 可以转发 1</span></span><br><span class="line"><span class="comment"> * false: 不可转发 0</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;is_forward&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Boolean isForward;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 是否下架</span></span><br><span class="line"><span class="comment"> * true: 下架 1</span></span><br><span class="line"><span class="comment"> * false: 没有下架 0</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;is_down&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Boolean isDown;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 是否已删除</span></span><br><span class="line"><span class="comment"> * true: 删除 1</span></span><br><span class="line"><span class="comment"> * false: 没有删除 0</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;is_delete&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Boolean isDelete;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>④在ApArticleService中新增方法</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存app端相关文章</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> dto</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line">ResponseResult <span class="title function_">saveArticle</span><span class="params">(ArticleDto dto)</span> ;</span><br></pre></td></tr></table></figure>
<p>实现类:</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Autowired</span></span><br><span class="line"><span class="keyword">private</span> ApArticleConfigMapper apArticleConfigMapper;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Autowired</span></span><br><span class="line"><span class="keyword">private</span> ApArticleContentMapper apArticleContentMapper;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存app端相关文章</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> dto</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="keyword">public</span> ResponseResult <span class="title function_">saveArticle</span><span class="params">(ArticleDto dto)</span> &#123;</span><br><span class="line"> <span class="comment">//1.检查参数</span></span><br><span class="line"> <span class="keyword">if</span>(dto == <span class="literal">null</span>)&#123;</span><br><span class="line"> <span class="keyword">return</span> ResponseResult.errorResult(AppHttpCodeEnum.PARAM_INVALID);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="type">ApArticle</span> <span class="variable">apArticle</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ApArticle</span>();</span><br><span class="line"> BeanUtils.copyProperties(dto,apArticle);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//2.判断是否存在id</span></span><br><span class="line"> <span class="keyword">if</span>(dto.getId() == <span class="literal">null</span>)&#123;</span><br><span class="line"> <span class="comment">//2.1 不存在id 保存 文章 文章配置 文章内容</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//保存文章</span></span><br><span class="line"> save(apArticle);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//保存配置</span></span><br><span class="line"> <span class="type">ApArticleConfig</span> <span class="variable">apArticleConfig</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ApArticleConfig</span>(apArticle.getId());</span><br><span class="line"> apArticleConfigMapper.insert(apArticleConfig);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//保存 文章内容</span></span><br><span class="line"> <span class="type">ApArticleContent</span> <span class="variable">apArticleContent</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ApArticleContent</span>();</span><br><span class="line"> apArticleContent.setArticleId(apArticle.getId());</span><br><span class="line"> apArticleContent.setContent(dto.getContent());</span><br><span class="line"> apArticleContentMapper.insert(apArticleContent);</span><br><span class="line"></span><br><span class="line"> &#125;<span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//2.2 存在id 修改 文章 文章内容</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//修改 文章</span></span><br><span class="line"> updateById(apArticle);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//修改文章内容</span></span><br><span class="line"> <span class="type">ApArticleContent</span> <span class="variable">apArticleContent</span> <span class="operator">=</span> apArticleContentMapper.selectOne(Wrappers.&lt;ApArticleContent&gt;lambdaQuery().eq(ApArticleContent::getArticleId, dto.getId()));</span><br><span class="line"> apArticleContent.setContent(dto.getContent());</span><br><span class="line"> apArticleContentMapper.updateById(apArticleContent);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">//3.结果返回 文章的id</span></span><br><span class="line"> <span class="keyword">return</span> ResponseResult.okResult(apArticle.getId());</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>⑤:测试</p>
<p>编写junit单元测试或使用postman进行测试</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;title&quot;</span><span class="punctuation">:</span><span class="string">&quot;黑马头条项目背景&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;authoId&quot;</span><span class="punctuation">:</span><span class="number">1102</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;layout&quot;</span><span class="punctuation">:</span><span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;labels&quot;</span><span class="punctuation">:</span><span class="string">&quot;黑马头条&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;publishTime&quot;</span><span class="punctuation">:</span><span class="string">&quot;2028-03-14T11:35:49.000Z&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;images&quot;</span><span class="punctuation">:</span> <span class="string">&quot;http://192.168.200.130:9000/leadnews/2021/04/26/5ddbdb5c68094ce393b08a47860da275.jpg&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;content&quot;</span><span class="punctuation">:</span><span class="string">&quot;黑马头条项目背景,黑马头条项目背景,黑马头条项目背景,黑马头条项目背景,黑马头条项目背景&quot;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20231119212628556.png" alt="image-20231119212628556"></p>
<h3 id="4-6-发布文章提交审核集成"><a href="#4-6-发布文章提交审核集成" class="headerlink" title="4.6 发布文章提交审核集成"></a>4.6 发布文章提交审核集成</h3><h4 id="4-6-1-同步调用与异步调用"><a href="#4-6-1-同步调用与异步调用" class="headerlink" title="4.6.1 同步调用与异步调用"></a>4.6.1 同步调用与异步调用</h4><p><img src="/pictures/image-20231202234439362.png" alt="image-20231202234439362"></p>
<h4 id="4-6-2-Springboot集成异步线程调用"><a href="#4-6-2-Springboot集成异步线程调用" class="headerlink" title="4.6.2 Springboot集成异步线程调用"></a>4.6.2 Springboot集成异步线程调用</h4><p>①:在自动审核的方法上加上@Async注解标明要异步调用</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="meta">@Async</span> <span class="comment">//标明当前方法是一个异步方法</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">autoScanWmNews</span><span class="params">(Integer id)</span> &#123;</span><br><span class="line"> <span class="comment">//代码略</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>②:在文章发布成功后调用审核的方法</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Autowired</span></span><br><span class="line"><span class="keyword">private</span> WmNewsAutoScanService wmNewsAutoScanService;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 发布修改文章或保存为草稿</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> dto</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="keyword">public</span> ResponseResult <span class="title function_">submitNews</span><span class="params">(WmNewsDto dto)</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//代码略</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//审核文章</span></span><br><span class="line"> wmNewsAutoScanService.autoScanWmNews(wmNews.getId());</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> ResponseResult.okResult(AppHttpCodeEnum.SUCCESS);</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>③:在自媒体引导类中使用@EnableAsync注解开启异步调用</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@SpringBootApplication</span></span><br><span class="line"><span class="meta">@EnableDiscoveryClient</span></span><br><span class="line"><span class="meta">@MapperScan(&quot;com.heima.wemedia.mapper&quot;)</span></span><br><span class="line"><span class="meta">@EnableFeignClients(basePackages = &quot;com.heima.apis&quot;)</span></span><br><span class="line"><span class="meta">@EnableAsync</span> <span class="comment">//开启异步调用</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WemediaApplication</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> SpringApplication.run(WemediaApplication.class,args);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> MybatisPlusInterceptor <span class="title function_">mybatisPlusInterceptor</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">MybatisPlusInterceptor</span> <span class="variable">interceptor</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">MybatisPlusInterceptor</span>();</span><br><span class="line"> interceptor.addInnerInterceptor(<span class="keyword">new</span> <span class="title class_">PaginationInnerInterceptor</span>(DbType.MYSQL));</span><br><span class="line"> <span class="keyword">return</span> interceptor;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="4-7-文章审核功能-综合测试"><a href="#4-7-文章审核功能-综合测试" class="headerlink" title="4.7 文章审核功能-综合测试"></a>4.7 文章审核功能-综合测试</h3><h4 id="4-7-1-服务启动列表"><a href="#4-7-1-服务启动列表" class="headerlink" title="4.7.1 服务启动列表"></a>4.7.1 服务启动列表</h4><p>1nacos服务端</p>
<p>2article微服务</p>
<p>3wemedia微服务</p>
<p>4启动wemedia网关微服务</p>
<p>5启动前端系统wemedia</p>
<h4 id="4-7-2-测试情况列表"><a href="#4-7-2-测试情况列表" class="headerlink" title="4.7.2 测试情况列表"></a>4.7.2 测试情况列表</h4><p>1自媒体前端发布一篇正常的文章</p>
<p> 审核成功后app端的article相关数据是否可以正常保存自媒体文章状态和app端文章id是否回显</p>
<p>2自媒体前端发布一篇包含敏感词的文章</p>
<p> 正常是审核失败, wm_news表中的状态是否改变成功和失败原因正常保存</p>
<p>3自媒体前端发布一篇包含敏感图片的文章</p>
<p> 正常是审核失败, wm_news表中的状态是否改变成功和失败原因正常保存</p>
<p><img src="/pictures/image-20231202235800149.png" alt="image-20231202235800149"></p>
<h3 id="4-8-自管理敏感词过滤"><a href="#4-8-自管理敏感词过滤" class="headerlink" title="4.8 自管理敏感词过滤"></a>4.8 自管理敏感词过滤</h3><h4 id="4-8-1-需求"><a href="#4-8-1-需求" class="headerlink" title="4.8.1 需求"></a>4.8.1 需求</h4><p><img src="/pictures/image-20231203000259877.png" alt="image-20231203000259877"></p>
<h4 id="4-8-2-可选方案"><a href="#4-8-2-可选方案" class="headerlink" title="4.8.2 可选方案"></a>4.8.2 可选方案</h4><table>
<thead>
<tr>
<th><strong>方案</strong></th>
<th><strong>说明</strong></th>
</tr>
</thead>
<tbody><tr>
<td>数据库模糊查询</td>
<td>效率太低</td>
</tr>
<tr>
<td>String.indexOf(“”)查找</td>
<td>数据库量大的话也是比较慢</td>
</tr>
<tr>
<td>全文检索</td>
<td>分词再匹配</td>
</tr>
<tr>
<td>DFA算法</td>
<td>确定有穷自动机(一种数据结构)</td>
</tr>
</tbody></table>
<h4 id="4-8-3-DFA算法"><a href="#4-8-3-DFA算法" class="headerlink" title="4.8.3 DFA算法"></a>4.8.3 DFA算法</h4><p><img src="/pictures/image-20231203130434677.png" alt="image-20231203130434677"></p>
<p><img src="/pictures/image-20231203130929391.png" alt="image-20231203130929391"></p>
<h4 id="4-8-4-工具类"><a href="#4-8-4-工具类" class="headerlink" title="4.8.4 工具类"></a>4.8.4 工具类</h4><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.utils.common;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.*;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">SensitiveWordUtil</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> Map&lt;String, Object&gt; dictionaryMap = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 生成关键词字典库</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> words</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">initMap</span><span class="params">(Collection&lt;String&gt; words)</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (words == <span class="literal">null</span>) &#123;</span><br><span class="line"> System.out.println(<span class="string">&quot;敏感词列表不能为空&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span> ;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// map初始长度words.size(),整个字典库的入口字数(小于words.size(),因为不同的词可能会有相同的首字)</span></span><br><span class="line"> Map&lt;String, Object&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;(words.size());</span><br><span class="line"> <span class="comment">// 遍历过程中当前层次的数据</span></span><br><span class="line"> Map&lt;String, Object&gt; curMap = <span class="literal">null</span>;</span><br><span class="line"> Iterator&lt;String&gt; iterator = words.iterator();</span><br><span class="line"></span><br><span class="line"> <span class="keyword">while</span> (iterator.hasNext()) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">word</span> <span class="operator">=</span> iterator.next();</span><br><span class="line"> curMap = map;</span><br><span class="line"> <span class="type">int</span> <span class="variable">len</span> <span class="operator">=</span> word.length();</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span><span class="number">0</span>; i &lt; len; i++) &#123;</span><br><span class="line"> <span class="comment">// 遍历每个词的字</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">key</span> <span class="operator">=</span> String.valueOf(word.charAt(i));</span><br><span class="line"> <span class="comment">// 当前字在当前层是否存在, 不存在则新建, 当前层数据指向下一个节点, 继续判断是否存在数据</span></span><br><span class="line"> Map&lt;String, Object&gt; wordMap = (Map&lt;String, Object&gt;) curMap.get(key);</span><br><span class="line"> <span class="keyword">if</span> (wordMap == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="comment">// 每个节点存在两个数据: 下一个节点和isEnd(是否结束标志)</span></span><br><span class="line"> wordMap = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;(<span class="number">2</span>);</span><br><span class="line"> wordMap.put(<span class="string">&quot;isEnd&quot;</span>, <span class="string">&quot;0&quot;</span>);</span><br><span class="line"> curMap.put(key, wordMap);</span><br><span class="line"> &#125;</span><br><span class="line"> curMap = wordMap;</span><br><span class="line"> <span class="comment">// 如果当前字是词的最后一个字则将isEnd标志置1</span></span><br><span class="line"> <span class="keyword">if</span> (i == len -<span class="number">1</span>) &#123;</span><br><span class="line"> curMap.put(<span class="string">&quot;isEnd&quot;</span>, <span class="string">&quot;1&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> dictionaryMap = map;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 搜索文本中某个文字是否匹配关键词</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> text</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> beginIndex</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="type">int</span> <span class="title function_">checkWord</span><span class="params">(String text, <span class="type">int</span> beginIndex)</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (dictionaryMap == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;字典不能为空&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isEnd</span> <span class="operator">=</span> <span class="literal">false</span>;</span><br><span class="line"> <span class="type">int</span> <span class="variable">wordLength</span> <span class="operator">=</span> <span class="number">0</span>;</span><br><span class="line"> Map&lt;String, Object&gt; curMap = dictionaryMap;</span><br><span class="line"> <span class="type">int</span> <span class="variable">len</span> <span class="operator">=</span> text.length();</span><br><span class="line"> <span class="comment">// 从文本的第beginIndex开始匹配</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> beginIndex; i &lt; len; i++) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">key</span> <span class="operator">=</span> String.valueOf(text.charAt(i));</span><br><span class="line"> <span class="comment">// 获取当前key的下一个节点</span></span><br><span class="line"> curMap = (Map&lt;String, Object&gt;) curMap.get(key);</span><br><span class="line"> <span class="keyword">if</span> (curMap == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">break</span>;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> wordLength ++;</span><br><span class="line"> <span class="keyword">if</span> (<span class="string">&quot;1&quot;</span>.equals(curMap.get(<span class="string">&quot;isEnd&quot;</span>))) &#123;</span><br><span class="line"> isEnd = <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (!isEnd) &#123;</span><br><span class="line"> wordLength = <span class="number">0</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> wordLength;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 获取匹配的关键词和命中次数</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> text</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> Map&lt;String, Integer&gt; <span class="title function_">matchWords</span><span class="params">(String text)</span> &#123;</span><br><span class="line"> Map&lt;String, Integer&gt; wordMap = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> <span class="type">int</span> <span class="variable">len</span> <span class="operator">=</span> text.length();</span><br><span class="line"> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable">i</span> <span class="operator">=</span> <span class="number">0</span>; i &lt; len; i++) &#123;</span><br><span class="line"> <span class="type">int</span> <span class="variable">wordLength</span> <span class="operator">=</span> checkWord(text, i);</span><br><span class="line"> <span class="keyword">if</span> (wordLength &gt; <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">word</span> <span class="operator">=</span> text.substring(i, i + wordLength);</span><br><span class="line"> <span class="comment">// 添加关键词匹配次数</span></span><br><span class="line"> <span class="keyword">if</span> (wordMap.containsKey(word)) &#123;</span><br><span class="line"> wordMap.put(word, wordMap.get(word) + <span class="number">1</span>);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> wordMap.put(word, <span class="number">1</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> i += wordLength - <span class="number">1</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> wordMap;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//测试工具类</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> List&lt;String&gt; list = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> list.add(<span class="string">&quot;法轮&quot;</span>);</span><br><span class="line"> list.add(<span class="string">&quot;法轮功&quot;</span>);</span><br><span class="line"> list.add(<span class="string">&quot;冰毒&quot;</span>);</span><br><span class="line"> <span class="comment">//初始hua敏感词库</span></span><br><span class="line"> initMap(list);</span><br><span class="line"> String content=<span class="string">&quot;我是一个好人,并不会卖冰毒,也不操练法轮功,我真的不卖冰毒&quot;</span>;</span><br><span class="line"> Map&lt;String, Integer&gt; map = matchWords(content);</span><br><span class="line"> System.out.println(map);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="4-8-5-项目中集成自管理敏感词过滤"><a href="#4-8-5-项目中集成自管理敏感词过滤" class="headerlink" title="4.8.5 项目中集成自管理敏感词过滤"></a>4.8.5 项目中集成自管理敏感词过滤</h4><p>①创建敏感词表导入资料中wm_sensitive到leadnews_wemedia库中并创建对应的实体类</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.model.wemedia.pojos;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.IdType;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableField;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableId;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableName;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.Serializable;</span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * &lt;p&gt;</span></span><br><span class="line"><span class="comment"> * 敏感词信息表</span></span><br><span class="line"><span class="comment"> * &lt;/p&gt;</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> itheima</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@TableName(&quot;wm_sensitive&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WmSensitive</span> <span class="keyword">implements</span> <span class="title class_">Serializable</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">long</span> <span class="variable">serialVersionUID</span> <span class="operator">=</span> <span class="number">1L</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 主键</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableId(value = &quot;id&quot;, type = IdType.AUTO)</span></span><br><span class="line"> <span class="keyword">private</span> Integer id;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 敏感词</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;sensitives&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String sensitives;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 创建时间</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableField(&quot;created_time&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> Date createdTime;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>②拷贝对应的wm_sensitive的mapper到项目中</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.wemedia.mapper;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.core.mapper.BaseMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.pojos.WmSensitive;</span><br><span class="line"><span class="keyword">import</span> org.apache.ibatis.annotations.Mapper;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="meta">@Mapper</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">interface</span> <span class="title class_">WmSensitiveMapper</span> <span class="keyword">extends</span> <span class="title class_">BaseMapper</span>&lt;WmSensitive&gt; &#123;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>③:在文章审核的代码中添加自管理敏感词审核</p>
<p>第一在WmNewsAutoScanServiceImpl中的autoScanWmNews方法上添加如下代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//从内容中提取纯文本内容和图片</span></span><br><span class="line"><span class="comment">//.....省略</span></span><br><span class="line"></span><br><span class="line"><span class="comment">//自管理的敏感词过滤</span></span><br><span class="line"><span class="type">boolean</span> <span class="variable">isSensitive</span> <span class="operator">=</span> handleSensitiveScan((String) textAndImages.get(<span class="string">&quot;content&quot;</span>), wmNews);</span><br><span class="line"><span class="keyword">if</span>(!isSensitive) <span class="keyword">return</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">//2.审核文本内容 阿里云接口</span></span><br><span class="line"><span class="comment">//.....省略</span></span><br></pre></td></tr></table></figure>
<p>新增自管理敏感词审核代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Autowired</span></span><br><span class="line"><span class="keyword">private</span> WmSensitiveMapper wmSensitiveMapper;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 自管理的敏感词审核</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> content</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> wmNews</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">private</span> <span class="type">boolean</span> <span class="title function_">handleSensitiveScan</span><span class="params">(String content, WmNews wmNews)</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">boolean</span> <span class="variable">flag</span> <span class="operator">=</span> <span class="literal">true</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//获取所有的敏感词</span></span><br><span class="line"> List&lt;WmSensitive&gt; wmSensitives = wmSensitiveMapper.selectList(Wrappers.&lt;WmSensitive&gt;lambdaQuery().select(WmSensitive::getSensitives));</span><br><span class="line"> List&lt;String&gt; sensitiveList = wmSensitives.stream().map(WmSensitive::getSensitives).collect(Collectors.toList());</span><br><span class="line"></span><br><span class="line"> <span class="comment">//初始化敏感词库</span></span><br><span class="line"> SensitiveWordUtil.initMap(sensitiveList);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//查看文章中是否包含敏感词</span></span><br><span class="line"> Map&lt;String, Integer&gt; map = SensitiveWordUtil.matchWords(content);</span><br><span class="line"> <span class="keyword">if</span>(map.size() &gt;<span class="number">0</span>)&#123;</span><br><span class="line"> updateWmNews(wmNews,(<span class="type">short</span>) <span class="number">2</span>,<span class="string">&quot;当前文章中存在违规内容&quot;</span>+map);</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> flag;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20231203161902523.png" alt="image-20231203161902523"></p>
<h3 id="4-9-图片识别文字审核敏感词"><a href="#4-9-图片识别文字审核敏感词" class="headerlink" title="4.9 图片识别文字审核敏感词"></a>4.9 图片识别文字审核敏感词</h3><p>详细教程: <a href="https://qingling.icu/posts/58456.html">https://qingling.icu/posts/58456.html</a></p>
<p>①在heima-leadnews-common中创建工具类简单封装一下tess4j</p>
<p>需要先导入pom</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>net.sourceforge.tess4j<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>tess4j<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>4.1.1<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>工具类</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.common.tess4j;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.Getter;</span><br><span class="line"><span class="keyword">import</span> lombok.Setter;</span><br><span class="line"><span class="keyword">import</span> net.sourceforge.tess4j.ITesseract;</span><br><span class="line"><span class="keyword">import</span> net.sourceforge.tess4j.Tesseract;</span><br><span class="line"><span class="keyword">import</span> net.sourceforge.tess4j.TesseractException;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.context.properties.ConfigurationProperties;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Component;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.awt.image.BufferedImage;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Getter</span></span><br><span class="line"><span class="meta">@Setter</span></span><br><span class="line"><span class="meta">@Component</span></span><br><span class="line"><span class="meta">@ConfigurationProperties(prefix = &quot;tess4j&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Tess4jClient</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String dataPath;</span><br><span class="line"> <span class="keyword">private</span> String language;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">doOCR</span><span class="params">(BufferedImage image)</span> <span class="keyword">throws</span> TesseractException &#123;</span><br><span class="line"> <span class="comment">//创建Tesseract对象</span></span><br><span class="line"> <span class="type">ITesseract</span> <span class="variable">tesseract</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Tesseract</span>();</span><br><span class="line"> <span class="comment">//设置字体库路径</span></span><br><span class="line"> tesseract.setDatapath(dataPath);</span><br><span class="line"> <span class="comment">//中文识别</span></span><br><span class="line"> tesseract.setLanguage(language);</span><br><span class="line"> <span class="comment">//执行ocr识别</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">result</span> <span class="operator">=</span> tesseract.doOCR(image);</span><br><span class="line"> <span class="comment">//替换回车和tal键 使结果为一行</span></span><br><span class="line"> result = result.replaceAll(<span class="string">&quot;\\r|\\n&quot;</span>, <span class="string">&quot;-&quot;</span>).replaceAll(<span class="string">&quot; &quot;</span>, <span class="string">&quot;&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span> result;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>在spring.factories配置中添加该类,完整如下:</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line">org.springframework.boot.autoconfigure.EnableAutoConfiguration=\</span><br><span class="line"> com.heima.common.exception.ExceptionCatch,\</span><br><span class="line"> com.heima.common.swagger.SwaggerConfiguration,\</span><br><span class="line"> com.heima.common.swagger.Swagger2Configuration,\</span><br><span class="line"> com.heima.common.aliyun.GreenTextScan,\</span><br><span class="line"> com.heima.common.aliyun.GreenImageScan,\</span><br><span class="line"> com.heima.common.tess4j.Tess4jClient</span><br></pre></td></tr></table></figure>
<p>②在heima-leadnews-wemedia中的配置中添加两个属性</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">tess4j:</span></span><br><span class="line"> <span class="attr">data-path:</span> <span class="string">D:\workspace\tessdata</span></span><br><span class="line"> <span class="attr">language:</span> <span class="string">chi_sim</span></span><br></pre></td></tr></table></figure>
<p>③在WmNewsAutoScanServiceImpl中的handleImageScan方法上添加如下代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="keyword">for</span> (String image : images) &#123;</span><br><span class="line"> <span class="type">byte</span>[] bytes = fileStorageService.downLoadFile(image);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//图片识别文字审核---begin-----</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//从byte[]转换为butteredImage</span></span><br><span class="line"> <span class="type">ByteArrayInputStream</span> <span class="variable">in</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ByteArrayInputStream</span>(bytes);</span><br><span class="line"> <span class="type">BufferedImage</span> <span class="variable">imageFile</span> <span class="operator">=</span> ImageIO.read(in);</span><br><span class="line"> <span class="comment">//识别图片的文字</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">result</span> <span class="operator">=</span> tess4jClient.doOCR(imageFile);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//审核是否包含自管理的敏感词</span></span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isSensitive</span> <span class="operator">=</span> handleSensitiveScan(result, wmNews);</span><br><span class="line"> <span class="keyword">if</span>(!isSensitive)&#123;</span><br><span class="line"> <span class="keyword">return</span> isSensitive;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//图片识别文字审核---end-----</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> imageList.add(bytes);</span><br><span class="line"></span><br><span class="line"> &#125; </span><br><span class="line">&#125;<span class="keyword">catch</span> (Exception e)&#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>最后附上文章审核的完整代码如下:</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.wemedia.service.impl;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.fastjson.JSONArray;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.core.toolkit.Wrappers;</span><br><span class="line"><span class="keyword">import</span> com.heima.apis.article.IArticleClient;</span><br><span class="line"><span class="keyword">import</span> com.heima.common.aliyun.GreenImageScan;</span><br><span class="line"><span class="keyword">import</span> com.heima.common.aliyun.GreenTextScan;</span><br><span class="line"><span class="keyword">import</span> com.heima.common.tess4j.Tess4jClient;</span><br><span class="line"><span class="keyword">import</span> com.heima.file.service.FileStorageService;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.article.dtos.ArticleDto;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.common.dtos.ResponseResult;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.pojos.WmChannel;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.pojos.WmNews;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.pojos.WmSensitive;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.wemedia.pojos.WmUser;</span><br><span class="line"><span class="keyword">import</span> com.heima.utils.common.SensitiveWordUtil;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.mapper.WmChannelMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.mapper.WmNewsMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.mapper.WmSensitiveMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.mapper.WmUserMapper;</span><br><span class="line"><span class="keyword">import</span> com.heima.wemedia.service.WmNewsAutoScanService;</span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.apache.commons.lang3.StringUtils;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.BeanUtils;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.scheduling.annotation.Async;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Service;</span><br><span class="line"><span class="keyword">import</span> org.springframework.transaction.annotation.Transactional;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.imageio.ImageIO;</span><br><span class="line"><span class="keyword">import</span> java.awt.image.BufferedImage;</span><br><span class="line"><span class="keyword">import</span> java.io.ByteArrayInputStream;</span><br><span class="line"><span class="keyword">import</span> java.util.*;</span><br><span class="line"><span class="keyword">import</span> java.util.stream.Collectors;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="meta">@Service</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@Transactional</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">WmNewsAutoScanServiceImpl</span> <span class="keyword">implements</span> <span class="title class_">WmNewsAutoScanService</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> WmNewsMapper wmNewsMapper;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 自媒体文章审核</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> id 自媒体文章id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="meta">@Async</span> <span class="comment">//标明当前方法是一个异步方法</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">autoScanWmNews</span><span class="params">(Integer id)</span> &#123;</span><br><span class="line"></span><br><span class="line"><span class="comment">// int a = 1/0;</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//1.查询自媒体文章</span></span><br><span class="line"> <span class="type">WmNews</span> <span class="variable">wmNews</span> <span class="operator">=</span> wmNewsMapper.selectById(id);</span><br><span class="line"> <span class="keyword">if</span> (wmNews == <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;WmNewsAutoScanServiceImpl-文章不存在&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (wmNews.getStatus().equals(WmNews.Status.SUBMIT.getCode())) &#123;</span><br><span class="line"> <span class="comment">//从内容中提取纯文本内容和图片</span></span><br><span class="line"> Map&lt;String, Object&gt; textAndImages = handleTextAndImages(wmNews);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//自管理的敏感词过滤</span></span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isSensitive</span> <span class="operator">=</span> handleSensitiveScan((String) textAndImages.get(<span class="string">&quot;content&quot;</span>), wmNews);</span><br><span class="line"> <span class="keyword">if</span>(!isSensitive) <span class="keyword">return</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//2.审核文本内容 阿里云接口</span></span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isTextScan</span> <span class="operator">=</span> handleTextScan((String) textAndImages.get(<span class="string">&quot;content&quot;</span>), wmNews);</span><br><span class="line"> <span class="keyword">if</span> (!isTextScan) <span class="keyword">return</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//3.审核图片 阿里云接口</span></span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isImageScan</span> <span class="operator">=</span> handleImageScan((List&lt;String&gt;) textAndImages.get(<span class="string">&quot;images&quot;</span>), wmNews);</span><br><span class="line"> <span class="keyword">if</span> (!isImageScan) <span class="keyword">return</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//4.审核成功保存app端的相关的文章数据</span></span><br><span class="line"> <span class="type">ResponseResult</span> <span class="variable">responseResult</span> <span class="operator">=</span> saveAppArticle(wmNews);</span><br><span class="line"> <span class="keyword">if</span> (!responseResult.getCode().equals(<span class="number">200</span>)) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(<span class="string">&quot;WmNewsAutoScanServiceImpl-文章审核保存app端相关文章数据失败&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//回填article_id</span></span><br><span class="line"> wmNews.setArticleId((Long) responseResult.getData());</span><br><span class="line"> updateWmNews(wmNews, (<span class="type">short</span>) <span class="number">9</span>, <span class="string">&quot;审核成功&quot;</span>);</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> WmSensitiveMapper wmSensitiveMapper;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 自管理的敏感词审核</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> content</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> wmNews</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">boolean</span> <span class="title function_">handleSensitiveScan</span><span class="params">(String content, WmNews wmNews)</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">boolean</span> <span class="variable">flag</span> <span class="operator">=</span> <span class="literal">true</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//获取所有的敏感词</span></span><br><span class="line"> List&lt;WmSensitive&gt; wmSensitives = wmSensitiveMapper.selectList(Wrappers.&lt;WmSensitive&gt;lambdaQuery().select(WmSensitive::getSensitives));</span><br><span class="line"> List&lt;String&gt; sensitiveList = wmSensitives.stream().map(WmSensitive::getSensitives).collect(Collectors.toList());</span><br><span class="line"></span><br><span class="line"> <span class="comment">//初始化敏感词库</span></span><br><span class="line"> SensitiveWordUtil.initMap(sensitiveList);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//查看文章中是否包含敏感词</span></span><br><span class="line"> Map&lt;String, Integer&gt; map = SensitiveWordUtil.matchWords(content);</span><br><span class="line"> <span class="keyword">if</span>(map.size() &gt;<span class="number">0</span>)&#123;</span><br><span class="line"> updateWmNews(wmNews,(<span class="type">short</span>) <span class="number">2</span>,<span class="string">&quot;当前文章中存在违规内容&quot;</span>+map);</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> flag;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> IArticleClient articleClient;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> WmChannelMapper wmChannelMapper;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> WmUserMapper wmUserMapper;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存app端相关的文章数据</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> wmNews</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> ResponseResult <span class="title function_">saveAppArticle</span><span class="params">(WmNews wmNews)</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">ArticleDto</span> <span class="variable">dto</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ArticleDto</span>();</span><br><span class="line"> <span class="comment">//属性的拷贝</span></span><br><span class="line"> BeanUtils.copyProperties(wmNews, dto);</span><br><span class="line"> <span class="comment">//文章的布局</span></span><br><span class="line"> dto.setLayout(wmNews.getType());</span><br><span class="line"> <span class="comment">//频道</span></span><br><span class="line"> <span class="type">WmChannel</span> <span class="variable">wmChannel</span> <span class="operator">=</span> wmChannelMapper.selectById(wmNews.getChannelId());</span><br><span class="line"> <span class="keyword">if</span> (wmChannel != <span class="literal">null</span>) &#123;</span><br><span class="line"> dto.setChannelName(wmChannel.getName());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//作者</span></span><br><span class="line"> dto.setAuthorId(wmNews.getUserId().longValue());</span><br><span class="line"> <span class="type">WmUser</span> <span class="variable">wmUser</span> <span class="operator">=</span> wmUserMapper.selectById(wmNews.getUserId());</span><br><span class="line"> <span class="keyword">if</span> (wmUser != <span class="literal">null</span>) &#123;</span><br><span class="line"> dto.setAuthorName(wmUser.getName());</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//设置文章id</span></span><br><span class="line"> <span class="keyword">if</span> (wmNews.getArticleId() != <span class="literal">null</span>) &#123;</span><br><span class="line"> dto.setId(wmNews.getArticleId());</span><br><span class="line"> &#125;</span><br><span class="line"> dto.setCreatedTime(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"></span><br><span class="line"> <span class="type">ResponseResult</span> <span class="variable">responseResult</span> <span class="operator">=</span> articleClient.saveArticle(dto);</span><br><span class="line"> <span class="keyword">return</span> responseResult;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> FileStorageService fileStorageService;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> GreenImageScan greenImageScan;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> Tess4jClient tess4jClient;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 审核图片</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> images</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> wmNews</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">boolean</span> <span class="title function_">handleImageScan</span><span class="params">(List&lt;String&gt; images, WmNews wmNews)</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">boolean</span> <span class="variable">flag</span> <span class="operator">=</span> <span class="literal">true</span>;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (images == <span class="literal">null</span> || images.size() == <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> flag;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//下载图片 minIO</span></span><br><span class="line"> <span class="comment">//图片去重</span></span><br><span class="line"> images = images.stream().distinct().collect(Collectors.toList());</span><br><span class="line"></span><br><span class="line"> List&lt;<span class="type">byte</span>[]&gt; imageList = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="keyword">for</span> (String image : images) &#123;</span><br><span class="line"> <span class="type">byte</span>[] bytes = fileStorageService.downLoadFile(image);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//图片识别文字审核---begin-----</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//从byte[]转换为butteredImage</span></span><br><span class="line"> <span class="type">ByteArrayInputStream</span> <span class="variable">in</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ByteArrayInputStream</span>(bytes);</span><br><span class="line"> <span class="type">BufferedImage</span> <span class="variable">imageFile</span> <span class="operator">=</span> ImageIO.read(in);</span><br><span class="line"> <span class="comment">//识别图片的文字</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">result</span> <span class="operator">=</span> tess4jClient.doOCR(imageFile);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//审核是否包含自管理的敏感词</span></span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isSensitive</span> <span class="operator">=</span> handleSensitiveScan(result, wmNews);</span><br><span class="line"> <span class="keyword">if</span>(!isSensitive)&#123;</span><br><span class="line"> <span class="keyword">return</span> isSensitive;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//图片识别文字审核---end-----</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> imageList.add(bytes);</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"> &#125;<span class="keyword">catch</span> (Exception e)&#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">//审核图片</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">Map</span> <span class="variable">map</span> <span class="operator">=</span> greenImageScan.imageScan(imageList);</span><br><span class="line"> <span class="keyword">if</span> (map != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="comment">//审核失败</span></span><br><span class="line"> <span class="keyword">if</span> (map.get(<span class="string">&quot;suggestion&quot;</span>).equals(<span class="string">&quot;block&quot;</span>)) &#123;</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> updateWmNews(wmNews, (<span class="type">short</span>) <span class="number">2</span>, <span class="string">&quot;当前文章中存在违规内容&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//不确定信息 需要人工审核</span></span><br><span class="line"> <span class="keyword">if</span> (map.get(<span class="string">&quot;suggestion&quot;</span>).equals(<span class="string">&quot;review&quot;</span>)) &#123;</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> updateWmNews(wmNews, (<span class="type">short</span>) <span class="number">3</span>, <span class="string">&quot;当前文章中存在不确定内容&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> flag;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> GreenTextScan greenTextScan;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 审核纯文本内容</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> content</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> wmNews</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">boolean</span> <span class="title function_">handleTextScan</span><span class="params">(String content, WmNews wmNews)</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="type">boolean</span> <span class="variable">flag</span> <span class="operator">=</span> <span class="literal">true</span>;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> ((wmNews.getTitle() + <span class="string">&quot;-&quot;</span> + content).length() == <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> flag;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">Map</span> <span class="variable">map</span> <span class="operator">=</span> greenTextScan.greeTextScan((wmNews.getTitle() + <span class="string">&quot;-&quot;</span> + content));</span><br><span class="line"> <span class="keyword">if</span> (map != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="comment">//审核失败</span></span><br><span class="line"> <span class="keyword">if</span> (map.get(<span class="string">&quot;suggestion&quot;</span>).equals(<span class="string">&quot;block&quot;</span>)) &#123;</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> updateWmNews(wmNews, (<span class="type">short</span>) <span class="number">2</span>, <span class="string">&quot;当前文章中存在违规内容&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//不确定信息 需要人工审核</span></span><br><span class="line"> <span class="keyword">if</span> (map.get(<span class="string">&quot;suggestion&quot;</span>).equals(<span class="string">&quot;review&quot;</span>)) &#123;</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> updateWmNews(wmNews, (<span class="type">short</span>) <span class="number">3</span>, <span class="string">&quot;当前文章中存在不确定内容&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> flag;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 修改文章内容</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> wmNews</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> status</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> reason</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">void</span> <span class="title function_">updateWmNews</span><span class="params">(WmNews wmNews, <span class="type">short</span> status, String reason)</span> &#123;</span><br><span class="line"> wmNews.setStatus(status);</span><br><span class="line"> wmNews.setReason(reason);</span><br><span class="line"> wmNewsMapper.updateById(wmNews);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 1。从自媒体文章的内容中提取文本和图片</span></span><br><span class="line"><span class="comment"> * 2.提取文章的封面图片</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> wmNews</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Map&lt;String, Object&gt; <span class="title function_">handleTextAndImages</span><span class="params">(WmNews wmNews)</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//存储纯文本内容</span></span><br><span class="line"> <span class="type">StringBuilder</span> <span class="variable">stringBuilder</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">StringBuilder</span>();</span><br><span class="line"></span><br><span class="line"> List&lt;String&gt; images = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"></span><br><span class="line"> <span class="comment">//1。从自媒体文章的内容中提取文本和图片</span></span><br><span class="line"> <span class="keyword">if</span> (StringUtils.isNotBlank(wmNews.getContent())) &#123;</span><br><span class="line"> List&lt;Map&gt; maps = JSONArray.parseArray(wmNews.getContent(), Map.class);</span><br><span class="line"> <span class="keyword">for</span> (Map map : maps) &#123;</span><br><span class="line"> <span class="keyword">if</span> (map.get(<span class="string">&quot;type&quot;</span>).equals(<span class="string">&quot;text&quot;</span>)) &#123;</span><br><span class="line"> stringBuilder.append(map.get(<span class="string">&quot;value&quot;</span>));</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (map.get(<span class="string">&quot;type&quot;</span>).equals(<span class="string">&quot;image&quot;</span>)) &#123;</span><br><span class="line"> images.add((String) map.get(<span class="string">&quot;value&quot;</span>));</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//2.提取文章的封面图片</span></span><br><span class="line"> <span class="keyword">if</span> (StringUtils.isNotBlank(wmNews.getImages())) &#123;</span><br><span class="line"> String[] split = wmNews.getImages().split(<span class="string">&quot;,&quot;</span>);</span><br><span class="line"> images.addAll(Arrays.asList(split));</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> Map&lt;String, Object&gt; resultMap = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> resultMap.put(<span class="string">&quot;content&quot;</span>, stringBuilder.toString());</span><br><span class="line"> resultMap.put(<span class="string">&quot;images&quot;</span>, images);</span><br><span class="line"> <span class="keyword">return</span> resultMap;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="4-10-文章详情-静态文件生成"><a href="#4-10-文章详情-静态文件生成" class="headerlink" title="4.10 文章详情-静态文件生成"></a>4.10 文章详情-静态文件生成</h3><p><img src="/pictures/image-20231209210352188.png" alt="image-20231209210352188"></p>
<p><strong>实现步骤</strong></p>
<p>1.新建ArticleFreemarkerService 定义创建静态文件并上传到minIO中方法</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.article.service;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.heima.model.article.pojos.ApArticle;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">interface</span> <span class="title class_">ArticleFreemarkerService</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 生成静态文件上传到minIO中</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> apArticle</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> content</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">buildArticleToMinIO</span><span class="params">(ApArticle apArticle,String content)</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.article.service.Impl;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.alibaba.fastjson.JSONArray;</span><br><span class="line"><span class="keyword">import</span> com.heima.article.service.ApArticleService;</span><br><span class="line"><span class="keyword">import</span> com.heima.article.service.ArticleFreemarkerService;</span><br><span class="line"><span class="keyword">import</span> com.heima.file.service.FileStorageService;</span><br><span class="line"><span class="keyword">import</span> com.heima.model.article.pojos.ApArticle;</span><br><span class="line"><span class="keyword">import</span> freemarker.template.Configuration;</span><br><span class="line"><span class="keyword">import</span> freemarker.template.Template;</span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.apache.commons.lang.StringUtils;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.scheduling.annotation.Async;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Service;</span><br><span class="line"><span class="keyword">import</span> org.springframework.transaction.annotation.Transactional;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.ByteArrayInputStream;</span><br><span class="line"><span class="keyword">import</span> java.io.InputStream;</span><br><span class="line"><span class="keyword">import</span> java.io.StringWriter;</span><br><span class="line"><span class="keyword">import</span> java.util.HashMap;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/12/9</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Service</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@Transactional</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ArticleFreemarkerServiceImpl</span> <span class="keyword">implements</span> <span class="title class_">ArticleFreemarkerService</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> Configuration configuration;</span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> FileStorageService fileStorageService;</span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> ApArticleService apArticleService;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Async</span> <span class="comment">//标记为一个异步调用的方法</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">buildArticleToMinio</span><span class="params">(ApArticle apArticle, String content)</span> &#123;</span><br><span class="line"> <span class="comment">//已知文章的id</span></span><br><span class="line"> <span class="comment">//1.获取文章的内容</span></span><br><span class="line"> <span class="keyword">if</span> (StringUtils.isNotBlank(content)) &#123;</span><br><span class="line"> <span class="type">StringWriter</span> <span class="variable">out</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">StringWriter</span>();</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//2.文章内容通过freemarker生成html文件 详细教程见:https://qingling.icu/posts/29367.html</span></span><br><span class="line"> <span class="type">Template</span> <span class="variable">template</span> <span class="operator">=</span> configuration.getTemplate(<span class="string">&quot;article.ftl&quot;</span>);</span><br><span class="line"> <span class="comment">//构建数据模型</span></span><br><span class="line"> HashMap&lt;String, Object&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> map.put(<span class="string">&quot;content&quot;</span>, JSONArray.parseArray(content));</span><br><span class="line"> <span class="comment">//输出流</span></span><br><span class="line"> out = <span class="keyword">new</span> <span class="title class_">StringWriter</span>();</span><br><span class="line"> <span class="comment">//合成html文件</span></span><br><span class="line"> template.process(map, out);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//3.把html文件上传到minio中</span></span><br><span class="line"> <span class="comment">//构建一个输入流</span></span><br><span class="line"> <span class="type">InputStream</span> <span class="variable">in</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ByteArrayInputStream</span>(out.toString().getBytes());</span><br><span class="line"> <span class="comment">//上传到minio并返回访问的路径</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">path</span> <span class="operator">=</span> fileStorageService.uploadHtmlFile(<span class="string">&quot;&quot;</span>, apArticle.getId() + <span class="string">&quot;.html&quot;</span>, in);</span><br><span class="line"> log.info(<span class="string">&quot;文件在minio中的路径:&quot;</span> + path);</span><br><span class="line"> <span class="comment">//4.修改ap_article表保存static_url字段</span></span><br><span class="line"> apArticle.setStaticUrl(path);</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">isSuccess</span> <span class="operator">=</span> apArticleService.updateById(apArticle);</span><br><span class="line"> log.info(isSuccess ? <span class="string">&quot;文件上传成功&quot;</span> : <span class="string">&quot;文件上传失败&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>2.在ApArticleService的saveArticle实现方法中添加调用生成文件的方法</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存app端相关文章</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> dto</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span></span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="keyword">public</span> ResponseResult <span class="title function_">saveArticle</span><span class="params">(ArticleDto dto)</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// try &#123;</span></span><br><span class="line"> <span class="comment">// Thread.sleep(3000);</span></span><br><span class="line"> <span class="comment">// &#125; catch (InterruptedException e) &#123;</span></span><br><span class="line"> <span class="comment">// e.printStackTrace();</span></span><br><span class="line"> <span class="comment">// &#125;</span></span><br><span class="line"> <span class="comment">//1.检查参数</span></span><br><span class="line"> <span class="keyword">if</span>(dto == <span class="literal">null</span>)&#123;</span><br><span class="line"> <span class="keyword">return</span> ResponseResult.errorResult(AppHttpCodeEnum.PARAM_INVALID);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="type">ApArticle</span> <span class="variable">apArticle</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ApArticle</span>();</span><br><span class="line"> BeanUtils.copyProperties(dto,apArticle);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//2.判断是否存在id</span></span><br><span class="line"> <span class="keyword">if</span>(dto.getId() == <span class="literal">null</span>)&#123;</span><br><span class="line"> <span class="comment">//2.1 不存在id 保存 文章 文章配置 文章内容</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//保存文章</span></span><br><span class="line"> save(apArticle);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//保存配置</span></span><br><span class="line"> <span class="type">ApArticleConfig</span> <span class="variable">apArticleConfig</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ApArticleConfig</span>(apArticle.getId());</span><br><span class="line"> apArticleConfigMapper.insert(apArticleConfig);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//保存 文章内容</span></span><br><span class="line"> <span class="type">ApArticleContent</span> <span class="variable">apArticleContent</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ApArticleContent</span>();</span><br><span class="line"> apArticleContent.setArticleId(apArticle.getId());</span><br><span class="line"> apArticleContent.setContent(dto.getContent());</span><br><span class="line"> apArticleContentMapper.insert(apArticleContent);</span><br><span class="line"></span><br><span class="line"> &#125;<span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//2.2 存在id 修改 文章 文章内容</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//修改 文章</span></span><br><span class="line"> updateById(apArticle);</span><br><span class="line"></span><br><span class="line"> <span class="comment">//修改文章内容</span></span><br><span class="line"> <span class="type">ApArticleContent</span> <span class="variable">apArticleContent</span> <span class="operator">=</span> apArticleContentMapper.selectOne(Wrappers.&lt;ApArticleContent&gt;lambdaQuery().eq(ApArticleContent::getArticleId, dto.getId()));</span><br><span class="line"> apArticleContent.setContent(dto.getContent());</span><br><span class="line"> apArticleContentMapper.updateById(apArticleContent);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//异步调用 生成静态文件上传到minio中</span></span><br><span class="line"> articleFreemarkerService.buildArticleToMinIO(apArticle,dto.getContent());</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">//3.结果返回 文章的id</span></span><br><span class="line"> <span class="keyword">return</span> ResponseResult.okResult(apArticle.getId());</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>3.文章微服务开启异步调用</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.heima.article;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.DbType;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;</span><br><span class="line"><span class="keyword">import</span> org.mybatis.spring.annotation.MapperScan;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.SpringApplication;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.autoconfigure.SpringBootApplication;</span><br><span class="line"><span class="keyword">import</span> org.springframework.cloud.client.discovery.EnableDiscoveryClient;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Bean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.scheduling.annotation.EnableAsync;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="meta">@SpringBootApplication</span></span><br><span class="line"><span class="meta">@EnableDiscoveryClient</span></span><br><span class="line"><span class="meta">@EnableAsync</span> <span class="comment">//开启异步调用</span></span><br><span class="line"><span class="meta">@MapperScan(&quot;com.heima.article.mapper&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">ArticleApplication</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title function_">main</span><span class="params">(String[] args)</span> &#123;</span><br><span class="line"> SpringApplication.run(ArticleApplication.class,args);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> MybatisPlusInterceptor <span class="title function_">mybatisPlusInterceptor</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="type">MybatisPlusInterceptor</span> <span class="variable">interceptor</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">MybatisPlusInterceptor</span>();</span><br><span class="line"> interceptor.addInnerInterceptor(<span class="keyword">new</span> <span class="title class_">PaginationInnerInterceptor</span>(DbType.MYSQL));</span><br><span class="line"> <span class="keyword">return</span> interceptor;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>测试</strong></p>
<p><img src="/pictures/image-20231209214205338.png" alt="image-20231209214205338"></p>
<p><img src="/pictures/image-20231209214309957.png" alt="image-20231209214309957"></p>
<h3 id="4-11-文章定时发布"><a href="#4-11-文章定时发布" class="headerlink" title="4.11 文章定时发布"></a>4.11 文章定时发布</h3>]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>项目实战</tag>
</tags>
</entry>
<entry>
<title>项目实战-谷粒商城</title>
<url>/posts/45726.html</url>
<content><![CDATA[<h1 id="一-项目简介"><a href="#一-项目简介" class="headerlink" title="一.项目简介"></a>一.项目简介</h1><h2 id="1-项目背景"><a href="#1-项目背景" class="headerlink" title="1.项目背景"></a>1.项目背景</h2><p><strong>电商模式</strong> 谷粒商城使用的B2C模式销售自营的商品给客户</p>
<p>市面上5种常见的电商模式B2B、B2C、C2B、C2C、O2O</p>
<p><strong>1、B2B模式</strong><br>business to business是指商家与商家建立的商业关系。如阿里巴巴。</p>
<p><strong>2、B2C模式</strong><br>business to consumer商对客模式。即通常说的商业零售供应商直接把商品卖给用户。如苏宁易购、京东、天猫、小米商城。</p>
<p><strong>3、C2B模式</strong><br>customer to business即消费者对企业。先有消费者需求而后有企业生产。例如众筹类的商城。</p>
<p><strong>4、C2C模式</strong><br>customer to consumer客户之间直接把东西放上网上去卖。如淘宝、闲鱼。</p>
<p><strong>5、O2O模式</strong><br>online to offline线上线下。线上快速支付线下优质服务。如饿了么、美团、京东到家。</p>
<h2 id="2-项目架构图"><a href="#2-项目架构图" class="headerlink" title="2.项目架构图"></a>2.项目架构图</h2><p><strong>项目的架构图</strong></p>
<p><img src="/pictures/image-20230518000727005.png"></p>
<p> <strong>微服务划分图</strong></p>
<p><img src="/pictures/image-20230518015831413.png" alt="image-20230518015831413"></p>
<h2 id="3-项目技术和特色"><a href="#3-项目技术和特色" class="headerlink" title="3.项目技术和特色"></a>3.项目技术和特色</h2><ul>
<li><strong>前后端分离开发开发基于VUE的后台管理系统</strong></li>
<li><strong>SpringCloud全新解决方案</strong></li>
<li><strong>应用监控、限流、网关、熔断降级等分布式方案 全方位涉及</strong></li>
<li><strong>包含分布式事务、分布式锁等技术难点</strong></li>
<li><strong>分析高并发场景的编码方式、线程池、异步编排等使用</strong></li>
<li><strong>压力测试与性能优化</strong></li>
<li><strong>各种集群技术的区别已经使用</strong></li>
<li><strong>CI&#x2F;CD的使用</strong></li>
</ul>
<h2 id="4-项目的前置要求"><a href="#4-项目的前置要求" class="headerlink" title="4.项目的前置要求"></a>4.项目的前置要求</h2><ul>
<li><strong>熟悉SpringBoot以及常见的整合方案</strong></li>
<li><strong>了解SpringCloud</strong></li>
<li><strong>熟悉Maven git</strong></li>
<li><strong>熟悉linux、redis、docker基本操作</strong></li>
<li><strong>了解html、css、js、vue</strong></li>
<li><strong>熟练使用idea开发项目</strong></li>
</ul>
<h1 id="二-分布式基础概念"><a href="#二-分布式基础概念" class="headerlink" title="二.分布式基础概念"></a>二.分布式基础概念</h1><h2 id="1-微服务"><a href="#1-微服务" class="headerlink" title="1.微服务"></a>1.微服务</h2><p>微服务架构风格,就像是一个<strong>单独的应用程序</strong>开发为<strong>一套小服务</strong>每个服务运行在自己的进程中并使用轻量级机制通信通常是HTTP API。这些服务围绕业务能力来构建并通过完全自动化部署机制来独立部署。这些服务使用不同的编程语言编写以及不同的数据存储技术并保持最低限度的集中式管理。</p>
<p><strong>简而言之:拒绝大型单体应用,基于业务边界进行服务微化拆分,各个应用独立部署运行。</strong></p>
<h2 id="2-集群-分布式-节点"><a href="#2-集群-分布式-节点" class="headerlink" title="2.集群|分布式|节点"></a>2.集群|分布式|节点</h2><p><strong>集群是一个物理形态 ,分布式是个工作方式</strong></p>
<p><strong>分布式:</strong> 将不同的业务分布在不同的地方</p>
<p><strong>集群:</strong> 集群指的是将几台服务器集中在一起,实现同一业务</p>
<p><strong>分布式中的每一个节点,都可以做集群。而集群不一定是分布式的。</strong></p>
<p><strong>节点:</strong> 集群中的一个服务器</p>
<h2 id="3-远程调用"><a href="#3-远程调用" class="headerlink" title="3.远程调用"></a>3.远程调用</h2><p><strong>在分布式系统中,各个服务可能处于不同主机,但是服务之间不可避免的需要相互调用,我们称之为远程调用。</strong></p>
<p>SpringCloud中使用HTTP+JSON的方式完成远程调用</p>
<p><img src="/pictures/image-20230518010847966.png" alt="image-20230518010847966"></p>
<h2 id="4-负载均衡"><a href="#4-负载均衡" class="headerlink" title="4.负载均衡"></a>4.负载均衡</h2><img src="/pictures/image-20230518011030343.png" alt="image-20230518011030343" style="zoom:150%;" />
<pre><code>分布式系统中A服务需要调用B服务B服务在多台机器上都存在A调用任意一个服务均可完成功能。为了使每一个服务器都不要太忙或者太闲我们可以使用负载均衡的调用每一个服务器提升网站的健壮性。
</code></pre>
<p><strong>常见的负载均衡算法:</strong></p>
<p><strong>轮询:</strong> 为第一个请求选择健康池中的第一台后端服务器,然后按顺序往后依次选择,直到最后一个,然后循环。</p>
<p><strong>最小连接:</strong> 有限选择连接数量少,也就是压力最小的后端服务器,在会话较长的情况下可以考虑采取这种方式。</p>
<p><strong>随机法:</strong>通过系统的随机算法,根据后端服务器的列表大小值来随机选取其中的一台服务器进行访问。由概率统计理论可以得知,随着客户端调用服务端的次数增多,其实际效果越来越接近于平均分配调用量到后端的每一台服务器,也就是轮询的结果。</p>
<p><strong>源地址哈希法:</strong>源地址哈希的思想是根据获取客户端的IP地址通过哈希函数计算得到的一个数值用该数值对服务器列表的大小进行取模运算得到的结果便是客服端要访问服务器的序号。采用源地址哈希法进行负载均衡同一IP地址的客户端当后端服务器列表不变时它每次都会映射到同一台后端服务器进行访问。</p>
<p><strong>加权轮询法:</strong>不同的后端服务器可能机器的配置和当前系统的负载并不相同,因此它们的抗压能力也不相同。给配置高、负载低的机器配置更高的权重,让其处理更多的请;而配置低、负载高的机器,给其分配较低的权重,降低其系统负载,加权轮询能很好地处理这一问题,并将请求顺序且按照权重分配到后端。</p>
<p><strong>加权随机法:</strong>与加权轮询法一样,加权随机法也根据后端机器的配置,系统的负载分配不同的权重。不同的是,它是按照权重随机请求后端服务器,而非顺序。</p>
<h2 id="5-服务注册-发现-注册中心"><a href="#5-服务注册-发现-注册中心" class="headerlink" title="5.服务注册|发现|注册中心"></a>5.服务注册|发现|注册中心</h2><p><img src="/pictures/image-20230518012211042.png" alt="image-20230518012211042"></p>
<h2 id="6-配置中心"><a href="#6-配置中心" class="headerlink" title="6.配置中心"></a>6.配置中心</h2><pre><code>每一个服务最终会有大量的配置,并且每个服务都可能部署在多台机器上。我们经常需要变更配置,我们可以让每个服务在配置中心获取自己的配置。
</code></pre>
<p><img src="/pictures/image-20230518012538349.png" alt="image-20230518012538349"></p>
<h2 id="7-服务熔断和服务降级"><a href="#7-服务熔断和服务降级" class="headerlink" title="7.服务熔断和服务降级"></a>7.服务熔断和服务降级</h2><pre><code>在微服务的架构中,微服务之间通过网络进行通信,存在相互依赖,当其中的一个服务不可用时,有可能会造成雪崩效应。要防止这样的情况,必须要有容错机制来保护服务。
</code></pre>
<p><strong>服务熔断:</strong> 设置服务的超时,当被调用的服务经常失败到达某个阈值,我们可以开启短路保护机制,后来的请求不再去调用这个服务。本地直接返回默认的数据。</p>
<p><strong>服务降级:</strong> 在运维期间,当系统处于高峰期,系统资源紧张,我们可以让非核心的业务降级运行。降级:某些业务不处理,或者简单处理[抛异常、返回NULL、调用mock数据、调用Fallback处理逻辑]。</p>
<p><img src="/pictures/image-20230518013254404.png" alt="image-20230518013254404"></p>
<p><img src="/pictures/image-20230518013624395.png" alt="image-20230518013624395"></p>
<h2 id="8-API网关"><a href="#8-API网关" class="headerlink" title="8.API网关"></a>8.API网关</h2><pre><code>在微服务的架构中API Gateway作为整体架构的重要组件他抽象了微服务中都需要的公共功能同时提供了客户端的负载均衡服务自动熔断灰度发布、统一认证、限流流控、日志统计等丰富功能帮助我们解决很多API管理难题。
</code></pre>
<img src="/pictures/image-20230518014732955.png" alt="image-20230518014732955" style="zoom:150%;" />
<h1 id="三-环境搭建"><a href="#三-环境搭建" class="headerlink" title="三.环境搭建"></a>三.环境搭建</h1><h2 id="1-安装虚拟机"><a href="#1-安装虚拟机" class="headerlink" title="1.安装虚拟机"></a>1.<strong>安装虚拟机</strong></h2><p>需要使用虚拟机安装相关的软件和部署集群</p>
<p><strong><a href="https://qingling.icu/posts/47407.html">VMWare虚拟机安装Linux教程 | The Blog (qingling.icu)</a></strong></p>
<p>将Linxu的IP地址固定下来</p>
<p><strong><a href="https://qingling.icu/posts/21883.html">Linux设置静态IP | The Blog (qingling.icu)</a></strong></p>
<h2 id="2-Docker安装与配置"><a href="#2-Docker安装与配置" class="headerlink" title="2.Docker安装与配置"></a>2.Docker安装与配置</h2><p>包含docker安装、开启开机自启动、配置镜像加速服务</p>
<p><strong><a href="https://qingling.icu/posts/19306.html">Docker容器化技术 | The Blog (qingling.icu)</a></strong><img src="/pictures/image-20230518141429712.png" alt="image-20230518141429712"></p>
<p><img src="/pictures/image-20230518145456236.png" alt="image-20230518145456236"></p>
<h2 id="3-Docker安装mysql"><a href="#3-Docker安装mysql" class="headerlink" title="3.Docker安装mysql"></a>3.Docker安装mysql</h2><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">下载mysql的镜像文件 这里以下载mysql5.7为例</span></span><br><span class="line">docker pull mysql:5.7</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看是否下载成功</span></span><br><span class="line">docker images</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">使用MySQL的镜像启动一个容器</span></span><br><span class="line"> docker run -p 3306:3306 --name mysql \</span><br><span class="line">-v /mydata/mysql/log:/var/log/mysql \</span><br><span class="line">-v /mydata/mysql/data:/var/lib/mysql \</span><br><span class="line">-v /mydata/mysql/conf:/etc/mysql \</span><br><span class="line">-e MYSQL_ROOT_PASSWORD=root \</span><br><span class="line">-d mysql:5.7</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">参数说明</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">-p 3306:3306将容器的 3306 端口映射到主机的 3306 端口</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">-v /mydata/mysql/conf:/etc/mysql将配置文件夹挂载到主机</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">-v /mydata/mysql/log:/var/log/mysql将日志文件夹挂载到主机</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">-v /mydata/mysql/data:/var/lib/mysql/:将配置文件夹挂载到主机</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">-e MYSQL_ROOT_PASSWORD=root初始化 root 用户的密码</span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看是否运行成功 这时使用Navicat就可以连接上了 连接不上 关闭防火墙</span></span><br><span class="line">docker ps #查看正在运行的容器</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">进入容器的内部</span></span><br><span class="line">docker exec -it mysql /bin/bash</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看容器内部的目录结构 我们可以看到容器的内部是一个小小的linux系统</span></span><br><span class="line">ls / #注意中间有一个空格</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看与mysql相关的目录</span></span><br><span class="line">whereis mysql</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">退出容器</span></span><br><span class="line">exit;</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">在容器外部查看mysql挂载在本地的三个文件</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">容器内部文件的变化会同步在这三个文件中 conf data <span class="built_in">log</span></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">外部修改 也会同步到内部</span></span><br><span class="line">cd /mydata/mysql</span><br><span class="line">ls</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">创建一个mysql的配置文件设置字符编码 将下面的内容粘贴到配置文件中</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">1.创建配置文件</span></span><br><span class="line">vi /mydata/mysql/conf/my.cnf</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">2.将以下的内容粘贴到配置文件配置文件内容</span></span><br><span class="line">[client]</span><br><span class="line">default-character-set=utf8</span><br><span class="line">[mysql]</span><br><span class="line">default-character-set=utf8</span><br><span class="line">[mysqld]</span><br><span class="line">init_connect=&#x27;SET collation_connection = utf8_unicode_ci&#x27;</span><br><span class="line">init_connect=&#x27;SET NAMES utf8&#x27;</span><br><span class="line">character-set-server=utf8</span><br><span class="line">collation-server=utf8_unicode_ci</span><br><span class="line">skip-character-set-client-handshake</span><br><span class="line">skip-name-resolve</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">3.重启MySQl的服务 让配置文件生效 这个配置文件也会同步到容器内部</span></span><br><span class="line">docker restart mysql</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">设置开机自启动</span></span><br><span class="line">docker update mysql --restart=always</span><br></pre></td></tr></table></figure>
<h2 id="4-Docker安装redis"><a href="#4-Docker安装redis" class="headerlink" title="4.Docker安装redis"></a>4.Docker安装redis</h2><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">下载redis的镜像文件 直接下载最新的</span></span><br><span class="line">docker pull redis</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">创建redis挂载在宿主机的配置文件和目录</span></span><br><span class="line">mkdir -p /mydata/redis/conf #创建目录</span><br><span class="line">touch /mydata/redis/conf/redis.conf #创建配置文件</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">创建并启动容器 这是以配置文件的方式启动 \前面有一个空格</span></span><br><span class="line">docker run -p 6379:6379 --name redis \</span><br><span class="line">-v /mydata/redis/data:/data \</span><br><span class="line">-v /mydata/redis/conf/redis.conf:/etc/redis/redis.conf \</span><br><span class="line">-d redis redis-server /etc/redis/redis.conf</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">检查容器的运行情况</span></span><br><span class="line">docker ps</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">测试客户端的使用</span></span><br><span class="line">docker exec -it redis redis-cli</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">可以在redis客户端中使用如下命令</span></span><br><span class="line">127.0.0.1:6379&gt; set name tom #存值</span><br><span class="line">OK</span><br><span class="line">127.0.0.1:6379&gt; get name #取值</span><br><span class="line">&quot;tom&quot;</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">redis中的数据不能持久化 关机重启之后数据会丢失</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">通过以下的配置 实现redis的持久化操作 AOF的持久化</span></span><br><span class="line">vi /mydata/redis/conf/redis.conf #修改之前创建的配置文件</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">添加如下配置</span></span><br><span class="line">appendonly yes</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">重启redis 让配置生效</span></span><br><span class="line">docker restart redis</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">设置开机自启动</span></span><br><span class="line">docker update redis --restart=always</span><br></pre></td></tr></table></figure>
<h2 id="5-统一开发环境"><a href="#5-统一开发环境" class="headerlink" title="5.统一开发环境"></a>5.统一开发环境</h2><p><strong>其中Java使用的是java8及以上</strong></p>
<p><strong>Maven 配置阿里云的镜像 profiles</strong></p>
<p><strong><a href="https://qingling.icu/posts/63333.html">开发环境的搭建 | The Blog (qingling.icu)</a></strong></p>
<p><strong>IDEA中修改使用自己安装的Maven</strong></p>
<p><strong>IDEA插件:Lombok|MybatisX</strong></p>
<p><strong>VSCode插件:</strong></p>
<p><img src="/pictures/image-20230518160444927.png" alt="image-20230518160444927"></p>
<p><img src="/pictures/image-20230518155308167.png" alt="image-20230518155308167"></p>
<h2 id="6-配置Git"><a href="#6-配置Git" class="headerlink" title="6.配置Git"></a>6.配置Git</h2><p><strong>官网下载:<a href="https://git-scm.com/downloads">https://git-scm.com/downloads</a></strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">以下的操作在下载安装完毕之后进行</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">1.鼠标在桌面右键 选择Git Bash Here 打开控制台</span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">2.配置用户名和邮箱</span></span><br><span class="line">git config --global user.name &quot;用户名&quot; #随意</span><br><span class="line">git config --global user.email &quot;邮箱&quot; #自己的邮箱</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">3.配置SSH免密连接</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">生成密钥</span></span><br><span class="line">ssh-keygen -t rsa -C &quot;在码云上注册的邮箱地址&quot; #连续三次回车</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看密钥并复制公钥的内容</span></span><br><span class="line">cat ~/.ssh/id_rsa.pub</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">4.将密钥的复制到码云的SSH公钥中</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">4.1添加公钥 公钥名随意 公钥内容就是上面复制的内容</span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">5.测试</span></span><br><span class="line">ssh -T git@gitee.com</span><br></pre></td></tr></table></figure>
<p><strong>常用命令</strong></p>
<img src="/pictures/image-20230518161145808.png" alt="image-20230518161145808" style="zoom: 200%;" />
<h2 id="7-从Gitee上初始化一个项目"><a href="#7-从Gitee上初始化一个项目" class="headerlink" title="7.从Gitee上初始化一个项目"></a>7.从Gitee上初始化一个项目</h2><p>我们是先从码云上初始化一个项目 然后拉取到本地</p>
<p><strong>创建一个仓库</strong></p>
<p><img src="/pictures/image-20230518163703370.png" alt="image-20230518163703370"></p>
<p><strong>复制刚才创建仓库的地址</strong></p>
<p><img src="/pictures/image-20230518163838162.png" alt="image-20230518163838162"></p>
<p><strong>将工程导入到IDEA中</strong></p>
<p><img src="/pictures/image-20230518164005690.png" alt="image-20230518164005690"></p>
<p><strong>导入成功</strong></p>
<p><img src="/pictures/image-20230518164217773.png" alt="image-20230518164217773"></p>
<h2 id="8-创建微服务模块"><a href="#8-创建微服务模块" class="headerlink" title="8.创建微服务模块"></a>8.创建微服务模块</h2><img src="/pictures/image-20230518171355588.png" alt="image-20230518171355588" style="zoom:150%;" />
<h2 id="9-数据库设计"><a href="#9-数据库设计" class="headerlink" title="9.数据库设计"></a>9.数据库设计</h2><p><img src="/pictures/image-20230518171546236.png" alt="image-20230518171546236"></p>
<img src="/pictures/image-20230518173203605.png" alt="image-20230518173203605" style="zoom:200%;" />
<h2 id="10-后台管理系统的搭建"><a href="#10-后台管理系统的搭建" class="headerlink" title="10.后台管理系统的搭建"></a>10.后台管理系统的搭建</h2><h3 id="10-1-后端的搭建"><a href="#10-1-后端的搭建" class="headerlink" title="10.1.后端的搭建"></a>10.1.后端的搭建</h3><p><strong>后台管理系统使用的是人人开源提供的一个脚手架:</strong></p>
<p><strong>仓库的地址信息:</strong></p>
<p><strong>仓库主页:<a href="https://gitee.com/renrenio">https://gitee.com/renrenio</a></strong></p>
<p><strong>后端renren-fast<a href="https://gitee.com/renrenio/renren-fast.git">https://gitee.com/renrenio/renren-fast.git</a></strong></p>
<p><strong>前端renren-fast-vue<a href="https://gitee.com/renrenio/renren-fast-vue.git">https://gitee.com/renrenio/renren-fast-vue.git</a></strong></p>
<p>将其作为一个模块集成到gulimall中</p>
<p><img src="/pictures/image-20230518221222845.png" alt="image-20230518221222845"></p>
<p>同时创建好这个脚手架需要的数据库</p>
<p><img src="/pictures/image-20230518221433314.png" alt="image-20230518221433314"></p>
<p><strong>修改配置文件中数据库账号密码ip的设置启动项目看有没有报错</strong></p>
<h3 id="10-2-前端的搭建"><a href="#10-2-前端的搭建" class="headerlink" title="10.2 前端的搭建"></a>10.2 前端的搭建</h3><p><strong>安装node.js 和 npm包管理工具 (node.js自带npm包管理工具)</strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">检查是否安装成功</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">出现版本号就是安装成功了</span></span><br><span class="line">node -v</span><br><span class="line">npm -v</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">npm配置淘宝的镜像 下载依赖的速度更快</span></span><br><span class="line">npm config set registry https://registry.npmmirror.com</span><br></pre></td></tr></table></figure>
<p><strong>将项目导入到vscode中并安装依赖</strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">安装依赖的命令</span></span><br><span class="line">npm install</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230518223021928.png" alt="image-20230518223021928"></p>
<p><strong>下载完成之后,运行前端的项目</strong></p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">运行命令</span></span><br><span class="line">npm run dev</span><br></pre></td></tr></table></figure>
<p><strong>运行成功过之后访问 <a href="http://localhost:8001/">http://localhost:8001</a></strong></p>
<p><strong>成功的页面显示如下</strong></p>
<p><img src="/pictures/image-20230518223525151.png" alt="image-20230518223525151"></p>
<p>**使用账号:admin密码:admin 登录 **</p>
<p><strong>可以登录成功并显示以下的页面说明前后端的联调通过</strong></p>
<p><img src="/pictures/image-20230518223921179.png" alt="image-20230518223921179"></p>
<h2 id="11-快速开发-逆向工程的搭建"><a href="#11-快速开发-逆向工程的搭建" class="headerlink" title="11.快速开发-逆向工程的搭建"></a>11.快速开发-逆向工程的搭建</h2><h3 id="1-代码生成器快速使用案例"><a href="#1-代码生成器快速使用案例" class="headerlink" title="1.代码生成器快速使用案例"></a>1.代码生成器快速使用案例</h3><p><strong>人人开源代码生成器的地址:<a href="https://gitee.com/renrenio/renren-generator.git">https://gitee.com/renrenio/renren-generator.git</a></strong></p>
<p><strong>集成代码生成器</strong></p>
<p><img src="/pictures/image-20230518230016421.png" alt="image-20230518230016421"></p>
<p><strong>修改代码生成器的配置文件</strong></p>
<p><strong>1.修改yml配置文件中数据库的连接信息</strong></p>
<p><strong>2.修改properties中与代码生成相关的配置信息</strong></p>
<p>配置举例 根据不同的模块 不同的数据库 配置不同</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment">#代码生成器配置信息</span></span><br><span class="line"></span><br><span class="line"><span class="attr">mainPath</span>=<span class="string">com.atguigu</span></span><br><span class="line"><span class="comment">#包名</span></span><br><span class="line"><span class="attr">package</span>=<span class="string">com.atguigu.gulimall</span></span><br><span class="line"><span class="attr">moduleName</span>=<span class="string">product</span></span><br><span class="line"><span class="comment">#作者</span></span><br><span class="line"><span class="attr">author</span>=<span class="string">JasonGong</span></span><br><span class="line"><span class="comment">#Email</span></span><br><span class="line"><span class="attr">email</span>=<span class="string">JasonGong@gmail.com</span></span><br><span class="line"><span class="comment">#表前缀(类名不会包含表前缀)</span></span><br><span class="line"><span class="attr">tablePrefix</span>=<span class="string">pms_</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">#以下的配置信息一般不动</span></span><br><span class="line"><span class="comment">#类型转换配置信息</span></span><br><span class="line"><span class="attr">tinyint</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">smallint</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">mediumint</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">int</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">integer</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">bigint</span>=<span class="string">Long</span></span><br><span class="line"><span class="attr">float</span>=<span class="string">Float</span></span><br><span class="line"><span class="attr">double</span>=<span class="string">Double</span></span><br><span class="line"><span class="attr">decimal</span>=<span class="string">BigDecimal</span></span><br><span class="line"><span class="attr">bit</span>=<span class="string">Boolean</span></span><br><span class="line"></span><br><span class="line"><span class="attr">char</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">varchar</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">tinytext</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">text</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">mediumtext</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">longtext</span>=<span class="string">String</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="attr">date</span>=<span class="string">Date</span></span><br><span class="line"><span class="attr">datetime</span>=<span class="string">Date</span></span><br><span class="line"><span class="attr">timestamp</span>=<span class="string">Date</span></span><br><span class="line"></span><br><span class="line"><span class="attr">NUMBER</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">INT</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">INTEGER</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">BINARY_INTEGER</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">LONG</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">FLOAT</span>=<span class="string">Float</span></span><br><span class="line"><span class="attr">BINARY_FLOAT</span>=<span class="string">Float</span></span><br><span class="line"><span class="attr">DOUBLE</span>=<span class="string">Double</span></span><br><span class="line"><span class="attr">BINARY_DOUBLE</span>=<span class="string">Double</span></span><br><span class="line"><span class="attr">DECIMAL</span>=<span class="string">BigDecimal</span></span><br><span class="line"><span class="attr">CHAR</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">VARCHAR</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">VARCHAR2</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">NVARCHAR</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">NVARCHAR2</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">CLOB</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">BLOB</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">DATE</span>=<span class="string">Date</span></span><br><span class="line"><span class="attr">DATETIME</span>=<span class="string">Date</span></span><br><span class="line"><span class="attr">TIMESTAMP</span>=<span class="string">Date</span></span><br><span class="line"><span class="attr">TIMESTAMP(6)</span>=<span class="string">Date</span></span><br><span class="line"></span><br><span class="line"><span class="attr">int8</span>=<span class="string">Long</span></span><br><span class="line"><span class="attr">int4</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">int2</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">numeric</span>=<span class="string">BigDecimal</span></span><br><span class="line"></span><br><span class="line"><span class="attr">nvarchar</span>=<span class="string">String</span></span><br></pre></td></tr></table></figure>
<p><strong>3.运行项目</strong></p>
<p><strong>通过<a href="http://localhost:81/">http://localhost:81</a> 访问</strong></p>
<p><img src="/pictures/image-20230518234030568.png" alt="image-20230518234030568"></p>
<p><strong>4.使用生成代码的功能生成代码</strong></p>
<p><img src="/pictures/image-20230518234311272.png" alt="image-20230518234311272"></p>
<p>解压之后的文件如下</p>
<p><img src="/pictures/image-20230518234941961.png" alt="image-20230518234941961"></p>
<p>压缩包中的文件如下所示</p>
<p><img src="/pictures/image-20230518234922087.png" alt="image-20230518234922087"></p>
<p><strong>由于项目中没有使用shiro安全框架我们注释掉安全框架的注解生成模板</strong></p>
<p><img src="/pictures/image-20230519002146272.png" alt="image-20230519002146272"></p>
<p><strong>配置每个模块的配置文件</strong></p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">server:</span></span><br><span class="line"> <span class="attr">port:</span> <span class="number">8080</span></span><br><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">datasource:</span></span><br><span class="line"> <span class="attr">url:</span> <span class="string">jdbc:mysql://192.168.111.100:3306/gulimall_pms?useUnicode=true&amp;characterEncoding=UTF-8&amp;useSSL=false&amp;serverTimezone=Asia/Shanghai</span></span><br><span class="line"> <span class="attr">username:</span> <span class="string">root</span></span><br><span class="line"> <span class="attr">password:</span> <span class="string">root</span></span><br><span class="line"> <span class="attr">driver-class-name:</span> <span class="string">com.mysql.cj.jdbc.Driver</span></span><br><span class="line"><span class="attr">mybatis-plus:</span></span><br><span class="line"> <span class="attr">mapper-locations:</span> <span class="string">classpath*:/mapper/**/*.xml</span> <span class="comment">#定义mapper.xml文件的位置</span></span><br><span class="line"> <span class="attr">global-config:</span></span><br><span class="line"> <span class="attr">db-config:</span></span><br><span class="line"> <span class="attr">id-type:</span> <span class="string">auto</span> <span class="comment">#主键的生成规则</span></span><br></pre></td></tr></table></figure>
<p><strong>测试生成的代码</strong></p>
<p><img src="/pictures/image-20230519005131468.png" alt="image-20230519005131468"></p>
<h3 id="2-代码生成器的使用步骤"><a href="#2-代码生成器的使用步骤" class="headerlink" title="2.代码生成器的使用步骤"></a>2.代码生成器的使用步骤</h3><p><strong>1.修改代码生成器的配置文件generator.properties</strong></p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment">#代码生成器配置信息</span></span><br><span class="line"></span><br><span class="line"><span class="attr">mainPath</span>=<span class="string">com.atguigu</span></span><br><span class="line"><span class="comment">#包名</span></span><br><span class="line"><span class="attr">package</span>=<span class="string">com.atguigu.gulimall</span></span><br><span class="line"><span class="attr">moduleName</span>=<span class="string">ware #1.修改模块名 </span></span><br><span class="line"><span class="comment">#作者</span></span><br><span class="line"><span class="attr">author</span>=<span class="string">JasonGong</span></span><br><span class="line"><span class="comment">#Email</span></span><br><span class="line"><span class="attr">email</span>=<span class="string">JasonGong@gmail.com</span></span><br><span class="line"><span class="comment">#表前缀(类名不会包含表前缀)</span></span><br><span class="line"><span class="attr">tablePrefix</span>=<span class="string">wms_ #2.数据库表的前缀</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">#以下的配置信息一般不动</span></span><br><span class="line"><span class="comment">#类型转换配置信息</span></span><br><span class="line"><span class="attr">tinyint</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">smallint</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">mediumint</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">int</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">integer</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">bigint</span>=<span class="string">Long</span></span><br><span class="line"><span class="attr">float</span>=<span class="string">Float</span></span><br><span class="line"><span class="attr">double</span>=<span class="string">Double</span></span><br><span class="line"><span class="attr">decimal</span>=<span class="string">BigDecimal</span></span><br><span class="line"><span class="attr">bit</span>=<span class="string">Boolean</span></span><br><span class="line"></span><br><span class="line"><span class="attr">char</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">varchar</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">tinytext</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">text</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">mediumtext</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">longtext</span>=<span class="string">String</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="attr">date</span>=<span class="string">Date</span></span><br><span class="line"><span class="attr">datetime</span>=<span class="string">Date</span></span><br><span class="line"><span class="attr">timestamp</span>=<span class="string">Date</span></span><br><span class="line"></span><br><span class="line"><span class="attr">NUMBER</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">INT</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">INTEGER</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">BINARY_INTEGER</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">LONG</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">FLOAT</span>=<span class="string">Float</span></span><br><span class="line"><span class="attr">BINARY_FLOAT</span>=<span class="string">Float</span></span><br><span class="line"><span class="attr">DOUBLE</span>=<span class="string">Double</span></span><br><span class="line"><span class="attr">BINARY_DOUBLE</span>=<span class="string">Double</span></span><br><span class="line"><span class="attr">DECIMAL</span>=<span class="string">BigDecimal</span></span><br><span class="line"><span class="attr">CHAR</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">VARCHAR</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">VARCHAR2</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">NVARCHAR</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">NVARCHAR2</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">CLOB</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">BLOB</span>=<span class="string">String</span></span><br><span class="line"><span class="attr">DATE</span>=<span class="string">Date</span></span><br><span class="line"><span class="attr">DATETIME</span>=<span class="string">Date</span></span><br><span class="line"><span class="attr">TIMESTAMP</span>=<span class="string">Date</span></span><br><span class="line"><span class="attr">TIMESTAMP(6)</span>=<span class="string">Date</span></span><br><span class="line"></span><br><span class="line"><span class="attr">int8</span>=<span class="string">Long</span></span><br><span class="line"><span class="attr">int4</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">int2</span>=<span class="string">Integer</span></span><br><span class="line"><span class="attr">numeric</span>=<span class="string">BigDecimal</span></span><br><span class="line"></span><br><span class="line"><span class="attr">nvarchar</span>=<span class="string">String</span></span><br></pre></td></tr></table></figure>
<p><strong>2修改要生成增删改查代码的数据库的连接配置application.yml</strong></p>
<p>只用配置数据库的连接信息即可</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">server:</span></span><br><span class="line"> <span class="attr">port:</span> <span class="number">81</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># mysql</span></span><br><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">main:</span></span><br><span class="line"> <span class="attr">allow-circular-references:</span> <span class="literal">true</span></span><br><span class="line"> <span class="attr">datasource:</span></span><br><span class="line"> <span class="attr">type:</span> <span class="string">com.alibaba.druid.pool.DruidDataSource</span></span><br><span class="line"> <span class="comment">#MySQL配置</span></span><br><span class="line"> <span class="attr">driverClassName:</span> <span class="string">com.mysql.cj.jdbc.Driver</span></span><br><span class="line"> <span class="attr">url:</span> <span class="string">jdbc:mysql://192.168.111.100:3306/gulimall_wms?useUnicode=true&amp;characterEncoding=UTF-8&amp;useSSL=false&amp;serverTimezone=Asia/Shanghai</span></span><br><span class="line"> <span class="attr">username:</span> <span class="string">root</span></span><br><span class="line"> <span class="attr">password:</span> <span class="string">root</span></span><br><span class="line"> <span class="comment">#oracle配置</span></span><br><span class="line"> <span class="comment"># driverClassName: oracle.jdbc.OracleDriver</span></span><br><span class="line"> <span class="comment"># url: jdbc:oracle:thin:@47.100.206.162:1521:xe</span></span><br><span class="line"> <span class="comment"># username: renren</span></span><br><span class="line"> <span class="comment"># password: 123456</span></span><br><span class="line"> <span class="comment">#SQLServer配置</span></span><br><span class="line"> <span class="comment"># driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver</span></span><br><span class="line"> <span class="comment"># url: jdbc:sqlserver://192.168.10.10:1433;DatabaseName=renren_fast</span></span><br><span class="line"> <span class="comment"># username: sa</span></span><br><span class="line"> <span class="comment"># password: 123456</span></span><br><span class="line"> <span class="comment">#PostgreSQL配置</span></span><br><span class="line"> <span class="comment"># driverClassName: org.postgresql.Driver</span></span><br><span class="line"> <span class="comment"># url: jdbc:postgresql://192.168.10.10:5432/renren_fast</span></span><br><span class="line"> <span class="comment"># username: postgres</span></span><br><span class="line"> <span class="comment"># password: 123456</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="attr">jackson:</span></span><br><span class="line"> <span class="attr">time-zone:</span> <span class="string">GMT+8</span></span><br><span class="line"> <span class="attr">date-format:</span> <span class="string">yyyy-MM-dd</span> <span class="string">HH:mm:ss</span></span><br><span class="line"> <span class="attr">web:</span></span><br><span class="line"> <span class="attr">resources:</span></span><br><span class="line"> <span class="attr">static-locations:</span> <span class="string">classpath:/static/,classpath:/views/</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#mongodb:</span></span><br><span class="line"><span class="comment"># host: localhost</span></span><br><span class="line"><span class="comment"># port: 27017</span></span><br><span class="line"><span class="comment"># auth: false #是否使用密码验证</span></span><br><span class="line"><span class="comment"># username: tincery</span></span><br><span class="line"><span class="comment"># password: renren</span></span><br><span class="line"><span class="comment"># source: 123456</span></span><br><span class="line"><span class="comment"># database: test</span></span><br><span class="line"></span><br><span class="line"><span class="attr">mybatis-plus:</span></span><br><span class="line"> <span class="attr">mapperLocations:</span> <span class="string">classpath:mapper/**/*.xml</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="attr">pagehelper:</span></span><br><span class="line"> <span class="attr">reasonable:</span> <span class="literal">true</span></span><br><span class="line"> <span class="attr">supportMethodsArguments:</span> <span class="literal">true</span></span><br><span class="line"> <span class="attr">params:</span> <span class="string">count=countSql</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">#指定数据库可选值有【mysql、oracle、sqlserver、postgresql、mongodb】</span></span><br><span class="line"><span class="attr">renren:</span></span><br><span class="line"> <span class="attr">database:</span> <span class="string">mysql</span></span><br></pre></td></tr></table></figure>
<p><strong>3.启动服务生成代码,将生成的代码解压并粘贴到对应的模块中去</strong></p>
<p>将main这个目录替换原来模块中的main目录即可sql文件暂时不用管</p>
<p><strong>4.创建模块的配置文件</strong></p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">server:</span></span><br><span class="line"> <span class="attr">port:</span> <span class="number">8080</span></span><br><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">datasource:</span></span><br><span class="line"> <span class="attr">url:</span> <span class="string">jdbc:mysql://192.168.111.100:3306/gulimall_pms?useUnicode=true&amp;characterEncoding=UTF-8&amp;useSSL=false&amp;serverTimezone=Asia/Shanghai</span></span><br><span class="line"> <span class="attr">username:</span> <span class="string">root</span></span><br><span class="line"> <span class="attr">password:</span> <span class="string">root</span></span><br><span class="line"> <span class="attr">driver-class-name:</span> <span class="string">com.mysql.cj.jdbc.Driver</span></span><br><span class="line"><span class="attr">mybatis-plus:</span></span><br><span class="line"> <span class="attr">mapper-locations:</span> <span class="string">classpath*:/mapper/**/*.xml</span> <span class="comment">#定义mapper.xml文件的位置</span></span><br><span class="line"> <span class="attr">global-config:</span></span><br><span class="line"> <span class="attr">db-config:</span></span><br><span class="line"> <span class="attr">id-type:</span> <span class="string">auto</span> <span class="comment">#主键的生成规则</span></span><br></pre></td></tr></table></figure>
<p><strong>5.启动测试生成的代码</strong></p>
<pre><code>在启动的时候,我们要处理好代码依赖的包,这些包都存在与生成代码的模块中,我们在生成代码的模块中复制过来即可,然后手动的引入相应的包,处理好报错信息。
</code></pre>
<h3 id="3-后台搭建完成之后的项目树"><a href="#3-后台搭建完成之后的项目树" class="headerlink" title="3.后台搭建完成之后的项目树"></a>3.后台搭建完成之后的项目树</h3><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">C:.</span><br><span class="line">│ .gitignore</span><br><span class="line">│ LICENSE</span><br><span class="line">│ pom.xml</span><br><span class="line">│</span><br><span class="line">├─.idea</span><br><span class="line">│ │ .gitignore</span><br><span class="line">│ │ compiler.xml</span><br><span class="line">│ │ encodings.xml</span><br><span class="line">│ │ jarRepositories.xml</span><br><span class="line">│ │ misc.xml</span><br><span class="line">│ │ uiDesigner.xml</span><br><span class="line">│ │ vcs.xml</span><br><span class="line">│ │ workspace.xml</span><br><span class="line">│ │</span><br><span class="line">│ └─codeStyles</span><br><span class="line">│ codeStyleConfig.xml</span><br><span class="line">│ Project.xml</span><br><span class="line">│</span><br><span class="line">├─gulimall-common</span><br><span class="line">│ │ pom.xml</span><br><span class="line">│ │</span><br><span class="line">│ ├─src</span><br><span class="line">│ │ ├─main</span><br><span class="line">│ │ │ ├─java</span><br><span class="line">│ │ │ │ └─com</span><br><span class="line">│ │ │ │ └─atguigu</span><br><span class="line">│ │ │ │ └─common</span><br><span class="line">│ │ │ │ ├─exception</span><br><span class="line">│ │ │ │ │ RRException.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─utils</span><br><span class="line">│ │ │ │ │ Constant.java</span><br><span class="line">│ │ │ │ │ PageUtils.java</span><br><span class="line">│ │ │ │ │ Query.java</span><br><span class="line">│ │ │ │ │ R.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─xss</span><br><span class="line">│ │ │ │ HTMLFilter.java</span><br><span class="line">│ │ │ │ SQLFilter.java</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─resources</span><br><span class="line">│ │ └─test</span><br><span class="line">│ │ └─java</span><br><span class="line">│ └─target</span><br><span class="line">│ ├─classes</span><br><span class="line">│ │ └─com</span><br><span class="line">│ │ └─atguigu</span><br><span class="line">│ │ └─common</span><br><span class="line">│ │ ├─exception</span><br><span class="line">│ │ │ RRException.class</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─utils</span><br><span class="line">│ │ │ Constant$MenuType.class</span><br><span class="line">│ │ │ Constant$ScheduleStatus.class</span><br><span class="line">│ │ │ Constant.class</span><br><span class="line">│ │ │ PageUtils.class</span><br><span class="line">│ │ │ Query.class</span><br><span class="line">│ │ │ R.class</span><br><span class="line">│ │ │</span><br><span class="line">│ │ └─xss</span><br><span class="line">│ │ HTMLFilter.class</span><br><span class="line">│ │ SQLFilter.class</span><br><span class="line">│ │</span><br><span class="line">│ └─generated-sources</span><br><span class="line">│ └─annotations</span><br><span class="line">├─gulimall-coupon</span><br><span class="line">│ │ .gitignore</span><br><span class="line">│ │ gulimall-coupon.iml</span><br><span class="line">│ │ HELP.md</span><br><span class="line">│ │ mvnw</span><br><span class="line">│ │ mvnw.cmd</span><br><span class="line">│ │ pom.xml</span><br><span class="line">│ │</span><br><span class="line">│ ├─.mvn</span><br><span class="line">│ │ └─wrapper</span><br><span class="line">│ │ maven-wrapper.jar</span><br><span class="line">│ │ maven-wrapper.properties</span><br><span class="line">│ │</span><br><span class="line">│ ├─src</span><br><span class="line">│ │ ├─main</span><br><span class="line">│ │ │ ├─java</span><br><span class="line">│ │ │ │ └─com</span><br><span class="line">│ │ │ │ └─atguigu</span><br><span class="line">│ │ │ │ └─gulimall</span><br><span class="line">│ │ │ │ └─coupon</span><br><span class="line">│ │ │ │ │ GulimallCouponApplication.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─controller</span><br><span class="line">│ │ │ │ │ CouponController.java</span><br><span class="line">│ │ │ │ │ CouponHistoryController.java</span><br><span class="line">│ │ │ │ │ CouponSpuCategoryRelationController.java</span><br><span class="line">│ │ │ │ │ CouponSpuRelationController.java</span><br><span class="line">│ │ │ │ │ HomeAdvController.java</span><br><span class="line">│ │ │ │ │ HomeSubjectController.java</span><br><span class="line">│ │ │ │ │ HomeSubjectSpuController.java</span><br><span class="line">│ │ │ │ │ MemberPriceController.java</span><br><span class="line">│ │ │ │ │ SeckillPromotionController.java</span><br><span class="line">│ │ │ │ │ SeckillSessionController.java</span><br><span class="line">│ │ │ │ │ SeckillSkuNoticeController.java</span><br><span class="line">│ │ │ │ │ SeckillSkuRelationController.java</span><br><span class="line">│ │ │ │ │ SkuFullReductionController.java</span><br><span class="line">│ │ │ │ │ SkuLadderController.java</span><br><span class="line">│ │ │ │ │ SpuBoundsController.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─dao</span><br><span class="line">│ │ │ │ │ CouponDao.java</span><br><span class="line">│ │ │ │ │ CouponHistoryDao.java</span><br><span class="line">│ │ │ │ │ CouponSpuCategoryRelationDao.java</span><br><span class="line">│ │ │ │ │ CouponSpuRelationDao.java</span><br><span class="line">│ │ │ │ │ HomeAdvDao.java</span><br><span class="line">│ │ │ │ │ HomeSubjectDao.java</span><br><span class="line">│ │ │ │ │ HomeSubjectSpuDao.java</span><br><span class="line">│ │ │ │ │ MemberPriceDao.java</span><br><span class="line">│ │ │ │ │ SeckillPromotionDao.java</span><br><span class="line">│ │ │ │ │ SeckillSessionDao.java</span><br><span class="line">│ │ │ │ │ SeckillSkuNoticeDao.java</span><br><span class="line">│ │ │ │ │ SeckillSkuRelationDao.java</span><br><span class="line">│ │ │ │ │ SkuFullReductionDao.java</span><br><span class="line">│ │ │ │ │ SkuLadderDao.java</span><br><span class="line">│ │ │ │ │ SpuBoundsDao.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─entity</span><br><span class="line">│ │ │ │ │ CouponEntity.java</span><br><span class="line">│ │ │ │ │ CouponHistoryEntity.java</span><br><span class="line">│ │ │ │ │ CouponSpuCategoryRelationEntity.java</span><br><span class="line">│ │ │ │ │ CouponSpuRelationEntity.java</span><br><span class="line">│ │ │ │ │ HomeAdvEntity.java</span><br><span class="line">│ │ │ │ │ HomeSubjectEntity.java</span><br><span class="line">│ │ │ │ │ HomeSubjectSpuEntity.java</span><br><span class="line">│ │ │ │ │ MemberPriceEntity.java</span><br><span class="line">│ │ │ │ │ SeckillPromotionEntity.java</span><br><span class="line">│ │ │ │ │ SeckillSessionEntity.java</span><br><span class="line">│ │ │ │ │ SeckillSkuNoticeEntity.java</span><br><span class="line">│ │ │ │ │ SeckillSkuRelationEntity.java</span><br><span class="line">│ │ │ │ │ SkuFullReductionEntity.java</span><br><span class="line">│ │ │ │ │ SkuLadderEntity.java</span><br><span class="line">│ │ │ │ │ SpuBoundsEntity.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─service</span><br><span class="line">│ │ │ │ │ CouponHistoryService.java</span><br><span class="line">│ │ │ │ │ CouponService.java</span><br><span class="line">│ │ │ │ │ CouponSpuCategoryRelationService.java</span><br><span class="line">│ │ │ │ │ CouponSpuRelationService.java</span><br><span class="line">│ │ │ │ │ HomeAdvService.java</span><br><span class="line">│ │ │ │ │ HomeSubjectService.java</span><br><span class="line">│ │ │ │ │ HomeSubjectSpuService.java</span><br><span class="line">│ │ │ │ │ MemberPriceService.java</span><br><span class="line">│ │ │ │ │ SeckillPromotionService.java</span><br><span class="line">│ │ │ │ │ SeckillSessionService.java</span><br><span class="line">│ │ │ │ │ SeckillSkuNoticeService.java</span><br><span class="line">│ │ │ │ │ SeckillSkuRelationService.java</span><br><span class="line">│ │ │ │ │ SkuFullReductionService.java</span><br><span class="line">│ │ │ │ │ SkuLadderService.java</span><br><span class="line">│ │ │ │ │ SpuBoundsService.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─impl</span><br><span class="line">│ │ │ │ CouponHistoryServiceImpl.java</span><br><span class="line">│ │ │ │ CouponServiceImpl.java</span><br><span class="line">│ │ │ │ CouponSpuCategoryRelationServiceImpl.java</span><br><span class="line">│ │ │ │ CouponSpuRelationServiceImpl.java</span><br><span class="line">│ │ │ │ HomeAdvServiceImpl.java</span><br><span class="line">│ │ │ │ HomeSubjectServiceImpl.java</span><br><span class="line">│ │ │ │ HomeSubjectSpuServiceImpl.java</span><br><span class="line">│ │ │ │ MemberPriceServiceImpl.java</span><br><span class="line">│ │ │ │ SeckillPromotionServiceImpl.java</span><br><span class="line">│ │ │ │ SeckillSessionServiceImpl.java</span><br><span class="line">│ │ │ │ SeckillSkuNoticeServiceImpl.java</span><br><span class="line">│ │ │ │ SeckillSkuRelationServiceImpl.java</span><br><span class="line">│ │ │ │ SkuFullReductionServiceImpl.java</span><br><span class="line">│ │ │ │ SkuLadderServiceImpl.java</span><br><span class="line">│ │ │ │ SpuBoundsServiceImpl.java</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─resources</span><br><span class="line">│ │ │ │ application.properties</span><br><span class="line">│ │ │ │ application.yml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─mapper</span><br><span class="line">│ │ │ │ └─coupon</span><br><span class="line">│ │ │ │ CouponDao.xml</span><br><span class="line">│ │ │ │ CouponHistoryDao.xml</span><br><span class="line">│ │ │ │ CouponSpuCategoryRelationDao.xml</span><br><span class="line">│ │ │ │ CouponSpuRelationDao.xml</span><br><span class="line">│ │ │ │ HomeAdvDao.xml</span><br><span class="line">│ │ │ │ HomeSubjectDao.xml</span><br><span class="line">│ │ │ │ HomeSubjectSpuDao.xml</span><br><span class="line">│ │ │ │ MemberPriceDao.xml</span><br><span class="line">│ │ │ │ SeckillPromotionDao.xml</span><br><span class="line">│ │ │ │ SeckillSessionDao.xml</span><br><span class="line">│ │ │ │ SeckillSkuNoticeDao.xml</span><br><span class="line">│ │ │ │ SeckillSkuRelationDao.xml</span><br><span class="line">│ │ │ │ SkuFullReductionDao.xml</span><br><span class="line">│ │ │ │ SkuLadderDao.xml</span><br><span class="line">│ │ │ │ SpuBoundsDao.xml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─src</span><br><span class="line">│ │ │ │ └─views</span><br><span class="line">│ │ │ │ └─modules</span><br><span class="line">│ │ │ │ └─coupon</span><br><span class="line">│ │ │ │ coupon-add-or-update.vue</span><br><span class="line">│ │ │ │ coupon.vue</span><br><span class="line">│ │ │ │ couponhistory-add-or-update.vue</span><br><span class="line">│ │ │ │ couponhistory.vue</span><br><span class="line">│ │ │ │ couponspucategoryrelation-add-or-update.vue</span><br><span class="line">│ │ │ │ couponspucategoryrelation.vue</span><br><span class="line">│ │ │ │ couponspurelation-add-or-update.vue</span><br><span class="line">│ │ │ │ couponspurelation.vue</span><br><span class="line">│ │ │ │ homeadv-add-or-update.vue</span><br><span class="line">│ │ │ │ homeadv.vue</span><br><span class="line">│ │ │ │ homesubject-add-or-update.vue</span><br><span class="line">│ │ │ │ homesubject.vue</span><br><span class="line">│ │ │ │ homesubjectspu-add-or-update.vue</span><br><span class="line">│ │ │ │ homesubjectspu.vue</span><br><span class="line">│ │ │ │ memberprice-add-or-update.vue</span><br><span class="line">│ │ │ │ memberprice.vue</span><br><span class="line">│ │ │ │ seckillpromotion-add-or-update.vue</span><br><span class="line">│ │ │ │ seckillpromotion.vue</span><br><span class="line">│ │ │ │ seckillsession-add-or-update.vue</span><br><span class="line">│ │ │ │ seckillsession.vue</span><br><span class="line">│ │ │ │ seckillskunotice-add-or-update.vue</span><br><span class="line">│ │ │ │ seckillskunotice.vue</span><br><span class="line">│ │ │ │ seckillskurelation-add-or-update.vue</span><br><span class="line">│ │ │ │ seckillskurelation.vue</span><br><span class="line">│ │ │ │ skufullreduction-add-or-update.vue</span><br><span class="line">│ │ │ │ skufullreduction.vue</span><br><span class="line">│ │ │ │ skuladder-add-or-update.vue</span><br><span class="line">│ │ │ │ skuladder.vue</span><br><span class="line">│ │ │ │ spubounds-add-or-update.vue</span><br><span class="line">│ │ │ │ spubounds.vue</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─static</span><br><span class="line">│ │ │ └─templates</span><br><span class="line">│ │ └─test</span><br><span class="line">│ │ └─java</span><br><span class="line">│ │ └─com</span><br><span class="line">│ │ └─atguigu</span><br><span class="line">│ │ └─gulimall</span><br><span class="line">│ │ └─coupon</span><br><span class="line">│ │ GulimallCouponApplicationTests.java</span><br><span class="line">│ │</span><br><span class="line">│ └─target</span><br><span class="line">│ ├─classes</span><br><span class="line">│ │ │ application.properties</span><br><span class="line">│ │ │ application.yml</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─com</span><br><span class="line">│ │ │ └─atguigu</span><br><span class="line">│ │ │ └─gulimall</span><br><span class="line">│ │ │ └─coupon</span><br><span class="line">│ │ │ │ GulimallCouponApplication.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─controller</span><br><span class="line">│ │ │ │ CouponController.class</span><br><span class="line">│ │ │ │ CouponHistoryController.class</span><br><span class="line">│ │ │ │ CouponSpuCategoryRelationController.class</span><br><span class="line">│ │ │ │ CouponSpuRelationController.class</span><br><span class="line">│ │ │ │ HomeAdvController.class</span><br><span class="line">│ │ │ │ HomeSubjectController.class</span><br><span class="line">│ │ │ │ HomeSubjectSpuController.class</span><br><span class="line">│ │ │ │ MemberPriceController.class</span><br><span class="line">│ │ │ │ SeckillPromotionController.class</span><br><span class="line">│ │ │ │ SeckillSessionController.class</span><br><span class="line">│ │ │ │ SeckillSkuNoticeController.class</span><br><span class="line">│ │ │ │ SeckillSkuRelationController.class</span><br><span class="line">│ │ │ │ SkuFullReductionController.class</span><br><span class="line">│ │ │ │ SkuLadderController.class</span><br><span class="line">│ │ │ │ SpuBoundsController.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─dao</span><br><span class="line">│ │ │ │ CouponDao.class</span><br><span class="line">│ │ │ │ CouponHistoryDao.class</span><br><span class="line">│ │ │ │ CouponSpuCategoryRelationDao.class</span><br><span class="line">│ │ │ │ CouponSpuRelationDao.class</span><br><span class="line">│ │ │ │ HomeAdvDao.class</span><br><span class="line">│ │ │ │ HomeSubjectDao.class</span><br><span class="line">│ │ │ │ HomeSubjectSpuDao.class</span><br><span class="line">│ │ │ │ MemberPriceDao.class</span><br><span class="line">│ │ │ │ SeckillPromotionDao.class</span><br><span class="line">│ │ │ │ SeckillSessionDao.class</span><br><span class="line">│ │ │ │ SeckillSkuNoticeDao.class</span><br><span class="line">│ │ │ │ SeckillSkuRelationDao.class</span><br><span class="line">│ │ │ │ SkuFullReductionDao.class</span><br><span class="line">│ │ │ │ SkuLadderDao.class</span><br><span class="line">│ │ │ │ SpuBoundsDao.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─entity</span><br><span class="line">│ │ │ │ CouponEntity.class</span><br><span class="line">│ │ │ │ CouponHistoryEntity.class</span><br><span class="line">│ │ │ │ CouponSpuCategoryRelationEntity.class</span><br><span class="line">│ │ │ │ CouponSpuRelationEntity.class</span><br><span class="line">│ │ │ │ HomeAdvEntity.class</span><br><span class="line">│ │ │ │ HomeSubjectEntity.class</span><br><span class="line">│ │ │ │ HomeSubjectSpuEntity.class</span><br><span class="line">│ │ │ │ MemberPriceEntity.class</span><br><span class="line">│ │ │ │ SeckillPromotionEntity.class</span><br><span class="line">│ │ │ │ SeckillSessionEntity.class</span><br><span class="line">│ │ │ │ SeckillSkuNoticeEntity.class</span><br><span class="line">│ │ │ │ SeckillSkuRelationEntity.class</span><br><span class="line">│ │ │ │ SkuFullReductionEntity.class</span><br><span class="line">│ │ │ │ SkuLadderEntity.class</span><br><span class="line">│ │ │ │ SpuBoundsEntity.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─service</span><br><span class="line">│ │ │ │ CouponHistoryService.class</span><br><span class="line">│ │ │ │ CouponService.class</span><br><span class="line">│ │ │ │ CouponSpuCategoryRelationService.class</span><br><span class="line">│ │ │ │ CouponSpuRelationService.class</span><br><span class="line">│ │ │ │ HomeAdvService.class</span><br><span class="line">│ │ │ │ HomeSubjectService.class</span><br><span class="line">│ │ │ │ HomeSubjectSpuService.class</span><br><span class="line">│ │ │ │ MemberPriceService.class</span><br><span class="line">│ │ │ │ SeckillPromotionService.class</span><br><span class="line">│ │ │ │ SeckillSessionService.class</span><br><span class="line">│ │ │ │ SeckillSkuNoticeService.class</span><br><span class="line">│ │ │ │ SeckillSkuRelationService.class</span><br><span class="line">│ │ │ │ SkuFullReductionService.class</span><br><span class="line">│ │ │ │ SkuLadderService.class</span><br><span class="line">│ │ │ │ SpuBoundsService.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─impl</span><br><span class="line">│ │ │ CouponHistoryServiceImpl.class</span><br><span class="line">│ │ │ CouponServiceImpl.class</span><br><span class="line">│ │ │ CouponSpuCategoryRelationServiceImpl.class</span><br><span class="line">│ │ │ CouponSpuRelationServiceImpl.class</span><br><span class="line">│ │ │ HomeAdvServiceImpl.class</span><br><span class="line">│ │ │ HomeSubjectServiceImpl.class</span><br><span class="line">│ │ │ HomeSubjectSpuServiceImpl.class</span><br><span class="line">│ │ │ MemberPriceServiceImpl.class</span><br><span class="line">│ │ │ SeckillPromotionServiceImpl.class</span><br><span class="line">│ │ │ SeckillSessionServiceImpl.class</span><br><span class="line">│ │ │ SeckillSkuNoticeServiceImpl.class</span><br><span class="line">│ │ │ SeckillSkuRelationServiceImpl.class</span><br><span class="line">│ │ │ SkuFullReductionServiceImpl.class</span><br><span class="line">│ │ │ SkuLadderServiceImpl.class</span><br><span class="line">│ │ │ SpuBoundsServiceImpl.class</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─mapper</span><br><span class="line">│ │ │ └─coupon</span><br><span class="line">│ │ │ CouponDao.xml</span><br><span class="line">│ │ │ CouponHistoryDao.xml</span><br><span class="line">│ │ │ CouponSpuCategoryRelationDao.xml</span><br><span class="line">│ │ │ CouponSpuRelationDao.xml</span><br><span class="line">│ │ │ HomeAdvDao.xml</span><br><span class="line">│ │ │ HomeSubjectDao.xml</span><br><span class="line">│ │ │ HomeSubjectSpuDao.xml</span><br><span class="line">│ │ │ MemberPriceDao.xml</span><br><span class="line">│ │ │ SeckillPromotionDao.xml</span><br><span class="line">│ │ │ SeckillSessionDao.xml</span><br><span class="line">│ │ │ SeckillSkuNoticeDao.xml</span><br><span class="line">│ │ │ SeckillSkuRelationDao.xml</span><br><span class="line">│ │ │ SkuFullReductionDao.xml</span><br><span class="line">│ │ │ SkuLadderDao.xml</span><br><span class="line">│ │ │ SpuBoundsDao.xml</span><br><span class="line">│ │ │</span><br><span class="line">│ │ └─src</span><br><span class="line">│ │ └─views</span><br><span class="line">│ │ └─modules</span><br><span class="line">│ │ └─coupon</span><br><span class="line">│ │ coupon-add-or-update.vue</span><br><span class="line">│ │ coupon.vue</span><br><span class="line">│ │ couponhistory-add-or-update.vue</span><br><span class="line">│ │ couponhistory.vue</span><br><span class="line">│ │ couponspucategoryrelation-add-or-update.vue</span><br><span class="line">│ │ couponspucategoryrelation.vue</span><br><span class="line">│ │ couponspurelation-add-or-update.vue</span><br><span class="line">│ │ couponspurelation.vue</span><br><span class="line">│ │ homeadv-add-or-update.vue</span><br><span class="line">│ │ homeadv.vue</span><br><span class="line">│ │ homesubject-add-or-update.vue</span><br><span class="line">│ │ homesubject.vue</span><br><span class="line">│ │ homesubjectspu-add-or-update.vue</span><br><span class="line">│ │ homesubjectspu.vue</span><br><span class="line">│ │ memberprice-add-or-update.vue</span><br><span class="line">│ │ memberprice.vue</span><br><span class="line">│ │ seckillpromotion-add-or-update.vue</span><br><span class="line">│ │ seckillpromotion.vue</span><br><span class="line">│ │ seckillsession-add-or-update.vue</span><br><span class="line">│ │ seckillsession.vue</span><br><span class="line">│ │ seckillskunotice-add-or-update.vue</span><br><span class="line">│ │ seckillskunotice.vue</span><br><span class="line">│ │ seckillskurelation-add-or-update.vue</span><br><span class="line">│ │ seckillskurelation.vue</span><br><span class="line">│ │ skufullreduction-add-or-update.vue</span><br><span class="line">│ │ skufullreduction.vue</span><br><span class="line">│ │ skuladder-add-or-update.vue</span><br><span class="line">│ │ skuladder.vue</span><br><span class="line">│ │ spubounds-add-or-update.vue</span><br><span class="line">│ │ spubounds.vue</span><br><span class="line">│ │</span><br><span class="line">│ ├─generated-sources</span><br><span class="line">│ │ └─annotations</span><br><span class="line">│ └─maven-status</span><br><span class="line">│ └─maven-compiler-plugin</span><br><span class="line">│ └─compile</span><br><span class="line">│ └─default-compile</span><br><span class="line">│ createdFiles.lst</span><br><span class="line">│ inputFiles.lst</span><br><span class="line">│</span><br><span class="line">├─gulimall-member</span><br><span class="line">│ │ .gitignore</span><br><span class="line">│ │ gulimall-member.iml</span><br><span class="line">│ │ HELP.md</span><br><span class="line">│ │ mvnw</span><br><span class="line">│ │ mvnw.cmd</span><br><span class="line">│ │ pom.xml</span><br><span class="line">│ │</span><br><span class="line">│ ├─.mvn</span><br><span class="line">│ │ └─wrapper</span><br><span class="line">│ │ maven-wrapper.jar</span><br><span class="line">│ │ maven-wrapper.properties</span><br><span class="line">│ │</span><br><span class="line">│ ├─src</span><br><span class="line">│ │ ├─main</span><br><span class="line">│ │ │ ├─java</span><br><span class="line">│ │ │ │ └─com</span><br><span class="line">│ │ │ │ └─atguigu</span><br><span class="line">│ │ │ │ └─gulimall</span><br><span class="line">│ │ │ │ └─member</span><br><span class="line">│ │ │ │ │ GulimallMemberApplication.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─controller</span><br><span class="line">│ │ │ │ │ GrowthChangeHistoryController.java</span><br><span class="line">│ │ │ │ │ IntegrationChangeHistoryController.java</span><br><span class="line">│ │ │ │ │ MemberCollectSpuController.java</span><br><span class="line">│ │ │ │ │ MemberCollectSubjectController.java</span><br><span class="line">│ │ │ │ │ MemberController.java</span><br><span class="line">│ │ │ │ │ MemberLevelController.java</span><br><span class="line">│ │ │ │ │ MemberLoginLogController.java</span><br><span class="line">│ │ │ │ │ MemberReceiveAddressController.java</span><br><span class="line">│ │ │ │ │ MemberStatisticsInfoController.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─dao</span><br><span class="line">│ │ │ │ │ GrowthChangeHistoryDao.java</span><br><span class="line">│ │ │ │ │ IntegrationChangeHistoryDao.java</span><br><span class="line">│ │ │ │ │ MemberCollectSpuDao.java</span><br><span class="line">│ │ │ │ │ MemberCollectSubjectDao.java</span><br><span class="line">│ │ │ │ │ MemberDao.java</span><br><span class="line">│ │ │ │ │ MemberLevelDao.java</span><br><span class="line">│ │ │ │ │ MemberLoginLogDao.java</span><br><span class="line">│ │ │ │ │ MemberReceiveAddressDao.java</span><br><span class="line">│ │ │ │ │ MemberStatisticsInfoDao.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─entity</span><br><span class="line">│ │ │ │ │ GrowthChangeHistoryEntity.java</span><br><span class="line">│ │ │ │ │ IntegrationChangeHistoryEntity.java</span><br><span class="line">│ │ │ │ │ MemberCollectSpuEntity.java</span><br><span class="line">│ │ │ │ │ MemberCollectSubjectEntity.java</span><br><span class="line">│ │ │ │ │ MemberEntity.java</span><br><span class="line">│ │ │ │ │ MemberLevelEntity.java</span><br><span class="line">│ │ │ │ │ MemberLoginLogEntity.java</span><br><span class="line">│ │ │ │ │ MemberReceiveAddressEntity.java</span><br><span class="line">│ │ │ │ │ MemberStatisticsInfoEntity.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─service</span><br><span class="line">│ │ │ │ │ GrowthChangeHistoryService.java</span><br><span class="line">│ │ │ │ │ IntegrationChangeHistoryService.java</span><br><span class="line">│ │ │ │ │ MemberCollectSpuService.java</span><br><span class="line">│ │ │ │ │ MemberCollectSubjectService.java</span><br><span class="line">│ │ │ │ │ MemberLevelService.java</span><br><span class="line">│ │ │ │ │ MemberLoginLogService.java</span><br><span class="line">│ │ │ │ │ MemberReceiveAddressService.java</span><br><span class="line">│ │ │ │ │ MemberService.java</span><br><span class="line">│ │ │ │ │ MemberStatisticsInfoService.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─impl</span><br><span class="line">│ │ │ │ GrowthChangeHistoryServiceImpl.java</span><br><span class="line">│ │ │ │ IntegrationChangeHistoryServiceImpl.java</span><br><span class="line">│ │ │ │ MemberCollectSpuServiceImpl.java</span><br><span class="line">│ │ │ │ MemberCollectSubjectServiceImpl.java</span><br><span class="line">│ │ │ │ MemberLevelServiceImpl.java</span><br><span class="line">│ │ │ │ MemberLoginLogServiceImpl.java</span><br><span class="line">│ │ │ │ MemberReceiveAddressServiceImpl.java</span><br><span class="line">│ │ │ │ MemberServiceImpl.java</span><br><span class="line">│ │ │ │ MemberStatisticsInfoServiceImpl.java</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─resources</span><br><span class="line">│ │ │ │ application.properties</span><br><span class="line">│ │ │ │ application.yml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─mapper</span><br><span class="line">│ │ │ │ └─member</span><br><span class="line">│ │ │ │ GrowthChangeHistoryDao.xml</span><br><span class="line">│ │ │ │ IntegrationChangeHistoryDao.xml</span><br><span class="line">│ │ │ │ MemberCollectSpuDao.xml</span><br><span class="line">│ │ │ │ MemberCollectSubjectDao.xml</span><br><span class="line">│ │ │ │ MemberDao.xml</span><br><span class="line">│ │ │ │ MemberLevelDao.xml</span><br><span class="line">│ │ │ │ MemberLoginLogDao.xml</span><br><span class="line">│ │ │ │ MemberReceiveAddressDao.xml</span><br><span class="line">│ │ │ │ MemberStatisticsInfoDao.xml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─src</span><br><span class="line">│ │ │ │ └─views</span><br><span class="line">│ │ │ │ └─modules</span><br><span class="line">│ │ │ │ └─member</span><br><span class="line">│ │ │ │ growthchangehistory-add-or-update.vue</span><br><span class="line">│ │ │ │ growthchangehistory.vue</span><br><span class="line">│ │ │ │ integrationchangehistory-add-or-update.vue</span><br><span class="line">│ │ │ │ integrationchangehistory.vue</span><br><span class="line">│ │ │ │ member-add-or-update.vue</span><br><span class="line">│ │ │ │ member.vue</span><br><span class="line">│ │ │ │ membercollectspu-add-or-update.vue</span><br><span class="line">│ │ │ │ membercollectspu.vue</span><br><span class="line">│ │ │ │ membercollectsubject-add-or-update.vue</span><br><span class="line">│ │ │ │ membercollectsubject.vue</span><br><span class="line">│ │ │ │ memberlevel-add-or-update.vue</span><br><span class="line">│ │ │ │ memberlevel.vue</span><br><span class="line">│ │ │ │ memberloginlog-add-or-update.vue</span><br><span class="line">│ │ │ │ memberloginlog.vue</span><br><span class="line">│ │ │ │ memberreceiveaddress-add-or-update.vue</span><br><span class="line">│ │ │ │ memberreceiveaddress.vue</span><br><span class="line">│ │ │ │ memberstatisticsinfo-add-or-update.vue</span><br><span class="line">│ │ │ │ memberstatisticsinfo.vue</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─static</span><br><span class="line">│ │ │ └─templates</span><br><span class="line">│ │ └─test</span><br><span class="line">│ │ └─java</span><br><span class="line">│ │ └─com</span><br><span class="line">│ │ └─atguigu</span><br><span class="line">│ │ └─gulimall</span><br><span class="line">│ │ └─member</span><br><span class="line">│ │ GulimallMemberApplicationTests.java</span><br><span class="line">│ │</span><br><span class="line">│ └─target</span><br><span class="line">│ ├─classes</span><br><span class="line">│ │ │ application.properties</span><br><span class="line">│ │ │ application.yml</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─com</span><br><span class="line">│ │ │ └─atguigu</span><br><span class="line">│ │ │ └─gulimall</span><br><span class="line">│ │ │ └─member</span><br><span class="line">│ │ │ │ GulimallMemberApplication.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─controller</span><br><span class="line">│ │ │ │ GrowthChangeHistoryController.class</span><br><span class="line">│ │ │ │ IntegrationChangeHistoryController.class</span><br><span class="line">│ │ │ │ MemberCollectSpuController.class</span><br><span class="line">│ │ │ │ MemberCollectSubjectController.class</span><br><span class="line">│ │ │ │ MemberController.class</span><br><span class="line">│ │ │ │ MemberLevelController.class</span><br><span class="line">│ │ │ │ MemberLoginLogController.class</span><br><span class="line">│ │ │ │ MemberReceiveAddressController.class</span><br><span class="line">│ │ │ │ MemberStatisticsInfoController.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─dao</span><br><span class="line">│ │ │ │ GrowthChangeHistoryDao.class</span><br><span class="line">│ │ │ │ IntegrationChangeHistoryDao.class</span><br><span class="line">│ │ │ │ MemberCollectSpuDao.class</span><br><span class="line">│ │ │ │ MemberCollectSubjectDao.class</span><br><span class="line">│ │ │ │ MemberDao.class</span><br><span class="line">│ │ │ │ MemberLevelDao.class</span><br><span class="line">│ │ │ │ MemberLoginLogDao.class</span><br><span class="line">│ │ │ │ MemberReceiveAddressDao.class</span><br><span class="line">│ │ │ │ MemberStatisticsInfoDao.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─entity</span><br><span class="line">│ │ │ │ GrowthChangeHistoryEntity.class</span><br><span class="line">│ │ │ │ IntegrationChangeHistoryEntity.class</span><br><span class="line">│ │ │ │ MemberCollectSpuEntity.class</span><br><span class="line">│ │ │ │ MemberCollectSubjectEntity.class</span><br><span class="line">│ │ │ │ MemberEntity.class</span><br><span class="line">│ │ │ │ MemberLevelEntity.class</span><br><span class="line">│ │ │ │ MemberLoginLogEntity.class</span><br><span class="line">│ │ │ │ MemberReceiveAddressEntity.class</span><br><span class="line">│ │ │ │ MemberStatisticsInfoEntity.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─service</span><br><span class="line">│ │ │ │ GrowthChangeHistoryService.class</span><br><span class="line">│ │ │ │ IntegrationChangeHistoryService.class</span><br><span class="line">│ │ │ │ MemberCollectSpuService.class</span><br><span class="line">│ │ │ │ MemberCollectSubjectService.class</span><br><span class="line">│ │ │ │ MemberLevelService.class</span><br><span class="line">│ │ │ │ MemberLoginLogService.class</span><br><span class="line">│ │ │ │ MemberReceiveAddressService.class</span><br><span class="line">│ │ │ │ MemberService.class</span><br><span class="line">│ │ │ │ MemberStatisticsInfoService.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─impl</span><br><span class="line">│ │ │ GrowthChangeHistoryServiceImpl.class</span><br><span class="line">│ │ │ IntegrationChangeHistoryServiceImpl.class</span><br><span class="line">│ │ │ MemberCollectSpuServiceImpl.class</span><br><span class="line">│ │ │ MemberCollectSubjectServiceImpl.class</span><br><span class="line">│ │ │ MemberLevelServiceImpl.class</span><br><span class="line">│ │ │ MemberLoginLogServiceImpl.class</span><br><span class="line">│ │ │ MemberReceiveAddressServiceImpl.class</span><br><span class="line">│ │ │ MemberServiceImpl.class</span><br><span class="line">│ │ │ MemberStatisticsInfoServiceImpl.class</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─mapper</span><br><span class="line">│ │ │ └─member</span><br><span class="line">│ │ │ GrowthChangeHistoryDao.xml</span><br><span class="line">│ │ │ IntegrationChangeHistoryDao.xml</span><br><span class="line">│ │ │ MemberCollectSpuDao.xml</span><br><span class="line">│ │ │ MemberCollectSubjectDao.xml</span><br><span class="line">│ │ │ MemberDao.xml</span><br><span class="line">│ │ │ MemberLevelDao.xml</span><br><span class="line">│ │ │ MemberLoginLogDao.xml</span><br><span class="line">│ │ │ MemberReceiveAddressDao.xml</span><br><span class="line">│ │ │ MemberStatisticsInfoDao.xml</span><br><span class="line">│ │ │</span><br><span class="line">│ │ └─src</span><br><span class="line">│ │ └─views</span><br><span class="line">│ │ └─modules</span><br><span class="line">│ │ └─member</span><br><span class="line">│ │ growthchangehistory-add-or-update.vue</span><br><span class="line">│ │ growthchangehistory.vue</span><br><span class="line">│ │ integrationchangehistory-add-or-update.vue</span><br><span class="line">│ │ integrationchangehistory.vue</span><br><span class="line">│ │ member-add-or-update.vue</span><br><span class="line">│ │ member.vue</span><br><span class="line">│ │ membercollectspu-add-or-update.vue</span><br><span class="line">│ │ membercollectspu.vue</span><br><span class="line">│ │ membercollectsubject-add-or-update.vue</span><br><span class="line">│ │ membercollectsubject.vue</span><br><span class="line">│ │ memberlevel-add-or-update.vue</span><br><span class="line">│ │ memberlevel.vue</span><br><span class="line">│ │ memberloginlog-add-or-update.vue</span><br><span class="line">│ │ memberloginlog.vue</span><br><span class="line">│ │ memberreceiveaddress-add-or-update.vue</span><br><span class="line">│ │ memberreceiveaddress.vue</span><br><span class="line">│ │ memberstatisticsinfo-add-or-update.vue</span><br><span class="line">│ │ memberstatisticsinfo.vue</span><br><span class="line">│ │</span><br><span class="line">│ ├─generated-sources</span><br><span class="line">│ │ └─annotations</span><br><span class="line">│ └─maven-status</span><br><span class="line">│ └─maven-compiler-plugin</span><br><span class="line">│ └─compile</span><br><span class="line">│ └─default-compile</span><br><span class="line">│ createdFiles.lst</span><br><span class="line">│ inputFiles.lst</span><br><span class="line">│</span><br><span class="line">├─gulimall-order</span><br><span class="line">│ │ .gitignore</span><br><span class="line">│ │ gulimall-order.iml</span><br><span class="line">│ │ HELP.md</span><br><span class="line">│ │ mvnw</span><br><span class="line">│ │ mvnw.cmd</span><br><span class="line">│ │ pom.xml</span><br><span class="line">│ │</span><br><span class="line">│ ├─.mvn</span><br><span class="line">│ │ └─wrapper</span><br><span class="line">│ │ maven-wrapper.jar</span><br><span class="line">│ │ maven-wrapper.properties</span><br><span class="line">│ │</span><br><span class="line">│ ├─src</span><br><span class="line">│ │ ├─main</span><br><span class="line">│ │ │ ├─java</span><br><span class="line">│ │ │ │ └─com</span><br><span class="line">│ │ │ │ └─atguigu</span><br><span class="line">│ │ │ │ └─gulimall</span><br><span class="line">│ │ │ │ └─order</span><br><span class="line">│ │ │ │ │ GulimallOrderApplication.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─controller</span><br><span class="line">│ │ │ │ │ OrderController.java</span><br><span class="line">│ │ │ │ │ OrderItemController.java</span><br><span class="line">│ │ │ │ │ OrderOperateHistoryController.java</span><br><span class="line">│ │ │ │ │ OrderReturnApplyController.java</span><br><span class="line">│ │ │ │ │ OrderReturnReasonController.java</span><br><span class="line">│ │ │ │ │ OrderSettingController.java</span><br><span class="line">│ │ │ │ │ PaymentInfoController.java</span><br><span class="line">│ │ │ │ │ RefundInfoController.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─dao</span><br><span class="line">│ │ │ │ │ OrderDao.java</span><br><span class="line">│ │ │ │ │ OrderItemDao.java</span><br><span class="line">│ │ │ │ │ OrderOperateHistoryDao.java</span><br><span class="line">│ │ │ │ │ OrderReturnApplyDao.java</span><br><span class="line">│ │ │ │ │ OrderReturnReasonDao.java</span><br><span class="line">│ │ │ │ │ OrderSettingDao.java</span><br><span class="line">│ │ │ │ │ PaymentInfoDao.java</span><br><span class="line">│ │ │ │ │ RefundInfoDao.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─entity</span><br><span class="line">│ │ │ │ │ OrderEntity.java</span><br><span class="line">│ │ │ │ │ OrderItemEntity.java</span><br><span class="line">│ │ │ │ │ OrderOperateHistoryEntity.java</span><br><span class="line">│ │ │ │ │ OrderReturnApplyEntity.java</span><br><span class="line">│ │ │ │ │ OrderReturnReasonEntity.java</span><br><span class="line">│ │ │ │ │ OrderSettingEntity.java</span><br><span class="line">│ │ │ │ │ PaymentInfoEntity.java</span><br><span class="line">│ │ │ │ │ RefundInfoEntity.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─service</span><br><span class="line">│ │ │ │ │ OrderItemService.java</span><br><span class="line">│ │ │ │ │ OrderOperateHistoryService.java</span><br><span class="line">│ │ │ │ │ OrderReturnApplyService.java</span><br><span class="line">│ │ │ │ │ OrderReturnReasonService.java</span><br><span class="line">│ │ │ │ │ OrderService.java</span><br><span class="line">│ │ │ │ │ OrderSettingService.java</span><br><span class="line">│ │ │ │ │ PaymentInfoService.java</span><br><span class="line">│ │ │ │ │ RefundInfoService.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─impl</span><br><span class="line">│ │ │ │ OrderItemServiceImpl.java</span><br><span class="line">│ │ │ │ OrderOperateHistoryServiceImpl.java</span><br><span class="line">│ │ │ │ OrderReturnApplyServiceImpl.java</span><br><span class="line">│ │ │ │ OrderReturnReasonServiceImpl.java</span><br><span class="line">│ │ │ │ OrderServiceImpl.java</span><br><span class="line">│ │ │ │ OrderSettingServiceImpl.java</span><br><span class="line">│ │ │ │ PaymentInfoServiceImpl.java</span><br><span class="line">│ │ │ │ RefundInfoServiceImpl.java</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─resources</span><br><span class="line">│ │ │ │ application.properties</span><br><span class="line">│ │ │ │ application.yml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─mapper</span><br><span class="line">│ │ │ │ └─order</span><br><span class="line">│ │ │ │ OrderDao.xml</span><br><span class="line">│ │ │ │ OrderItemDao.xml</span><br><span class="line">│ │ │ │ OrderOperateHistoryDao.xml</span><br><span class="line">│ │ │ │ OrderReturnApplyDao.xml</span><br><span class="line">│ │ │ │ OrderReturnReasonDao.xml</span><br><span class="line">│ │ │ │ OrderSettingDao.xml</span><br><span class="line">│ │ │ │ PaymentInfoDao.xml</span><br><span class="line">│ │ │ │ RefundInfoDao.xml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─src</span><br><span class="line">│ │ │ │ └─views</span><br><span class="line">│ │ │ │ └─modules</span><br><span class="line">│ │ │ │ └─order</span><br><span class="line">│ │ │ │ order-add-or-update.vue</span><br><span class="line">│ │ │ │ order.vue</span><br><span class="line">│ │ │ │ orderitem-add-or-update.vue</span><br><span class="line">│ │ │ │ orderitem.vue</span><br><span class="line">│ │ │ │ orderoperatehistory-add-or-update.vue</span><br><span class="line">│ │ │ │ orderoperatehistory.vue</span><br><span class="line">│ │ │ │ orderreturnapply-add-or-update.vue</span><br><span class="line">│ │ │ │ orderreturnapply.vue</span><br><span class="line">│ │ │ │ orderreturnreason-add-or-update.vue</span><br><span class="line">│ │ │ │ orderreturnreason.vue</span><br><span class="line">│ │ │ │ ordersetting-add-or-update.vue</span><br><span class="line">│ │ │ │ ordersetting.vue</span><br><span class="line">│ │ │ │ paymentinfo-add-or-update.vue</span><br><span class="line">│ │ │ │ paymentinfo.vue</span><br><span class="line">│ │ │ │ refundinfo-add-or-update.vue</span><br><span class="line">│ │ │ │ refundinfo.vue</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─static</span><br><span class="line">│ │ │ └─templates</span><br><span class="line">│ │ └─test</span><br><span class="line">│ │ └─java</span><br><span class="line">│ │ └─com</span><br><span class="line">│ │ └─atguigu</span><br><span class="line">│ │ └─gulimall</span><br><span class="line">│ │ └─order</span><br><span class="line">│ │ GulimallOrderApplicationTests.java</span><br><span class="line">│ │</span><br><span class="line">│ └─target</span><br><span class="line">│ ├─classes</span><br><span class="line">│ │ │ application.properties</span><br><span class="line">│ │ │ application.yml</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─com</span><br><span class="line">│ │ │ └─atguigu</span><br><span class="line">│ │ │ └─gulimall</span><br><span class="line">│ │ │ ├─gulimallorder</span><br><span class="line">│ │ │ │ GulimallOrderApplication.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─order</span><br><span class="line">│ │ │ │ GulimallOrderApplication.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─controller</span><br><span class="line">│ │ │ │ OrderController.class</span><br><span class="line">│ │ │ │ OrderItemController.class</span><br><span class="line">│ │ │ │ OrderOperateHistoryController.class</span><br><span class="line">│ │ │ │ OrderReturnApplyController.class</span><br><span class="line">│ │ │ │ OrderReturnReasonController.class</span><br><span class="line">│ │ │ │ OrderSettingController.class</span><br><span class="line">│ │ │ │ PaymentInfoController.class</span><br><span class="line">│ │ │ │ RefundInfoController.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─dao</span><br><span class="line">│ │ │ │ OrderDao.class</span><br><span class="line">│ │ │ │ OrderItemDao.class</span><br><span class="line">│ │ │ │ OrderOperateHistoryDao.class</span><br><span class="line">│ │ │ │ OrderReturnApplyDao.class</span><br><span class="line">│ │ │ │ OrderReturnReasonDao.class</span><br><span class="line">│ │ │ │ OrderSettingDao.class</span><br><span class="line">│ │ │ │ PaymentInfoDao.class</span><br><span class="line">│ │ │ │ RefundInfoDao.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─entity</span><br><span class="line">│ │ │ │ OrderEntity.class</span><br><span class="line">│ │ │ │ OrderItemEntity.class</span><br><span class="line">│ │ │ │ OrderOperateHistoryEntity.class</span><br><span class="line">│ │ │ │ OrderReturnApplyEntity.class</span><br><span class="line">│ │ │ │ OrderReturnReasonEntity.class</span><br><span class="line">│ │ │ │ OrderSettingEntity.class</span><br><span class="line">│ │ │ │ PaymentInfoEntity.class</span><br><span class="line">│ │ │ │ RefundInfoEntity.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─service</span><br><span class="line">│ │ │ │ OrderItemService.class</span><br><span class="line">│ │ │ │ OrderOperateHistoryService.class</span><br><span class="line">│ │ │ │ OrderReturnApplyService.class</span><br><span class="line">│ │ │ │ OrderReturnReasonService.class</span><br><span class="line">│ │ │ │ OrderService.class</span><br><span class="line">│ │ │ │ OrderSettingService.class</span><br><span class="line">│ │ │ │ PaymentInfoService.class</span><br><span class="line">│ │ │ │ RefundInfoService.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─impl</span><br><span class="line">│ │ │ OrderItemServiceImpl.class</span><br><span class="line">│ │ │ OrderOperateHistoryServiceImpl.class</span><br><span class="line">│ │ │ OrderReturnApplyServiceImpl.class</span><br><span class="line">│ │ │ OrderReturnReasonServiceImpl.class</span><br><span class="line">│ │ │ OrderServiceImpl.class</span><br><span class="line">│ │ │ OrderSettingServiceImpl.class</span><br><span class="line">│ │ │ PaymentInfoServiceImpl.class</span><br><span class="line">│ │ │ RefundInfoServiceImpl.class</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─mapper</span><br><span class="line">│ │ │ └─order</span><br><span class="line">│ │ │ OrderDao.xml</span><br><span class="line">│ │ │ OrderItemDao.xml</span><br><span class="line">│ │ │ OrderOperateHistoryDao.xml</span><br><span class="line">│ │ │ OrderReturnApplyDao.xml</span><br><span class="line">│ │ │ OrderReturnReasonDao.xml</span><br><span class="line">│ │ │ OrderSettingDao.xml</span><br><span class="line">│ │ │ PaymentInfoDao.xml</span><br><span class="line">│ │ │ RefundInfoDao.xml</span><br><span class="line">│ │ │</span><br><span class="line">│ │ └─src</span><br><span class="line">│ │ └─views</span><br><span class="line">│ │ └─modules</span><br><span class="line">│ │ └─order</span><br><span class="line">│ │ order-add-or-update.vue</span><br><span class="line">│ │ order.vue</span><br><span class="line">│ │ orderitem-add-or-update.vue</span><br><span class="line">│ │ orderitem.vue</span><br><span class="line">│ │ orderoperatehistory-add-or-update.vue</span><br><span class="line">│ │ orderoperatehistory.vue</span><br><span class="line">│ │ orderreturnapply-add-or-update.vue</span><br><span class="line">│ │ orderreturnapply.vue</span><br><span class="line">│ │ orderreturnreason-add-or-update.vue</span><br><span class="line">│ │ orderreturnreason.vue</span><br><span class="line">│ │ ordersetting-add-or-update.vue</span><br><span class="line">│ │ ordersetting.vue</span><br><span class="line">│ │ paymentinfo-add-or-update.vue</span><br><span class="line">│ │ paymentinfo.vue</span><br><span class="line">│ │ refundinfo-add-or-update.vue</span><br><span class="line">│ │ refundinfo.vue</span><br><span class="line">│ │</span><br><span class="line">│ ├─generated-sources</span><br><span class="line">│ │ └─annotations</span><br><span class="line">│ └─maven-status</span><br><span class="line">│ └─maven-compiler-plugin</span><br><span class="line">│ └─compile</span><br><span class="line">│ └─default-compile</span><br><span class="line">│ createdFiles.lst</span><br><span class="line">│ inputFiles.lst</span><br><span class="line">│</span><br><span class="line">├─gulimall-product</span><br><span class="line">│ │ .gitignore</span><br><span class="line">│ │ gulimall-product.iml</span><br><span class="line">│ │ HELP.md</span><br><span class="line">│ │ mvnw</span><br><span class="line">│ │ mvnw.cmd</span><br><span class="line">│ │ pom.xml</span><br><span class="line">│ │</span><br><span class="line">│ ├─.mvn</span><br><span class="line">│ │ └─wrapper</span><br><span class="line">│ │ maven-wrapper.jar</span><br><span class="line">│ │ maven-wrapper.properties</span><br><span class="line">│ │</span><br><span class="line">│ ├─src</span><br><span class="line">│ │ ├─main</span><br><span class="line">│ │ │ ├─java</span><br><span class="line">│ │ │ │ └─com</span><br><span class="line">│ │ │ │ └─atguigu</span><br><span class="line">│ │ │ │ └─gulimall</span><br><span class="line">│ │ │ │ └─product</span><br><span class="line">│ │ │ │ │ GulimallProductApplication.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─controller</span><br><span class="line">│ │ │ │ │ AttrAttrgroupRelationController.java</span><br><span class="line">│ │ │ │ │ AttrController.java</span><br><span class="line">│ │ │ │ │ AttrGroupController.java</span><br><span class="line">│ │ │ │ │ BrandController.java</span><br><span class="line">│ │ │ │ │ CategoryBrandRelationController.java</span><br><span class="line">│ │ │ │ │ CategoryController.java</span><br><span class="line">│ │ │ │ │ CommentReplayController.java</span><br><span class="line">│ │ │ │ │ ProductAttrValueController.java</span><br><span class="line">│ │ │ │ │ SkuImagesController.java</span><br><span class="line">│ │ │ │ │ SkuInfoController.java</span><br><span class="line">│ │ │ │ │ SkuSaleAttrValueController.java</span><br><span class="line">│ │ │ │ │ SpuCommentController.java</span><br><span class="line">│ │ │ │ │ SpuImagesController.java</span><br><span class="line">│ │ │ │ │ SpuInfoController.java</span><br><span class="line">│ │ │ │ │ SpuInfoDescController.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─dao</span><br><span class="line">│ │ │ │ │ AttrAttrgroupRelationDao.java</span><br><span class="line">│ │ │ │ │ AttrDao.java</span><br><span class="line">│ │ │ │ │ AttrGroupDao.java</span><br><span class="line">│ │ │ │ │ BrandDao.java</span><br><span class="line">│ │ │ │ │ CategoryBrandRelationDao.java</span><br><span class="line">│ │ │ │ │ CategoryDao.java</span><br><span class="line">│ │ │ │ │ CommentReplayDao.java</span><br><span class="line">│ │ │ │ │ ProductAttrValueDao.java</span><br><span class="line">│ │ │ │ │ SkuImagesDao.java</span><br><span class="line">│ │ │ │ │ SkuInfoDao.java</span><br><span class="line">│ │ │ │ │ SkuSaleAttrValueDao.java</span><br><span class="line">│ │ │ │ │ SpuCommentDao.java</span><br><span class="line">│ │ │ │ │ SpuImagesDao.java</span><br><span class="line">│ │ │ │ │ SpuInfoDao.java</span><br><span class="line">│ │ │ │ │ SpuInfoDescDao.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─entity</span><br><span class="line">│ │ │ │ │ AttrAttrgroupRelationEntity.java</span><br><span class="line">│ │ │ │ │ AttrEntity.java</span><br><span class="line">│ │ │ │ │ AttrGroupEntity.java</span><br><span class="line">│ │ │ │ │ BrandEntity.java</span><br><span class="line">│ │ │ │ │ CategoryBrandRelationEntity.java</span><br><span class="line">│ │ │ │ │ CategoryEntity.java</span><br><span class="line">│ │ │ │ │ CommentReplayEntity.java</span><br><span class="line">│ │ │ │ │ ProductAttrValueEntity.java</span><br><span class="line">│ │ │ │ │ SkuImagesEntity.java</span><br><span class="line">│ │ │ │ │ SkuInfoEntity.java</span><br><span class="line">│ │ │ │ │ SkuSaleAttrValueEntity.java</span><br><span class="line">│ │ │ │ │ SpuCommentEntity.java</span><br><span class="line">│ │ │ │ │ SpuImagesEntity.java</span><br><span class="line">│ │ │ │ │ SpuInfoDescEntity.java</span><br><span class="line">│ │ │ │ │ SpuInfoEntity.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─service</span><br><span class="line">│ │ │ │ │ AttrAttrgroupRelationService.java</span><br><span class="line">│ │ │ │ │ AttrGroupService.java</span><br><span class="line">│ │ │ │ │ AttrService.java</span><br><span class="line">│ │ │ │ │ BrandService.java</span><br><span class="line">│ │ │ │ │ CategoryBrandRelationService.java</span><br><span class="line">│ │ │ │ │ CategoryService.java</span><br><span class="line">│ │ │ │ │ CommentReplayService.java</span><br><span class="line">│ │ │ │ │ ProductAttrValueService.java</span><br><span class="line">│ │ │ │ │ SkuImagesService.java</span><br><span class="line">│ │ │ │ │ SkuInfoService.java</span><br><span class="line">│ │ │ │ │ SkuSaleAttrValueService.java</span><br><span class="line">│ │ │ │ │ SpuCommentService.java</span><br><span class="line">│ │ │ │ │ SpuImagesService.java</span><br><span class="line">│ │ │ │ │ SpuInfoDescService.java</span><br><span class="line">│ │ │ │ │ SpuInfoService.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─impl</span><br><span class="line">│ │ │ │ AttrAttrgroupRelationServiceImpl.java</span><br><span class="line">│ │ │ │ AttrGroupServiceImpl.java</span><br><span class="line">│ │ │ │ AttrServiceImpl.java</span><br><span class="line">│ │ │ │ BrandServiceImpl.java</span><br><span class="line">│ │ │ │ CategoryBrandRelationServiceImpl.java</span><br><span class="line">│ │ │ │ CategoryServiceImpl.java</span><br><span class="line">│ │ │ │ CommentReplayServiceImpl.java</span><br><span class="line">│ │ │ │ ProductAttrValueServiceImpl.java</span><br><span class="line">│ │ │ │ SkuImagesServiceImpl.java</span><br><span class="line">│ │ │ │ SkuInfoServiceImpl.java</span><br><span class="line">│ │ │ │ SkuSaleAttrValueServiceImpl.java</span><br><span class="line">│ │ │ │ SpuCommentServiceImpl.java</span><br><span class="line">│ │ │ │ SpuImagesServiceImpl.java</span><br><span class="line">│ │ │ │ SpuInfoDescServiceImpl.java</span><br><span class="line">│ │ │ │ SpuInfoServiceImpl.java</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─resources</span><br><span class="line">│ │ │ │ application.properties</span><br><span class="line">│ │ │ │ application.yml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─mapper</span><br><span class="line">│ │ │ │ └─product</span><br><span class="line">│ │ │ │ AttrAttrgroupRelationDao.xml</span><br><span class="line">│ │ │ │ AttrDao.xml</span><br><span class="line">│ │ │ │ AttrGroupDao.xml</span><br><span class="line">│ │ │ │ BrandDao.xml</span><br><span class="line">│ │ │ │ CategoryBrandRelationDao.xml</span><br><span class="line">│ │ │ │ CategoryDao.xml</span><br><span class="line">│ │ │ │ CommentReplayDao.xml</span><br><span class="line">│ │ │ │ ProductAttrValueDao.xml</span><br><span class="line">│ │ │ │ SkuImagesDao.xml</span><br><span class="line">│ │ │ │ SkuInfoDao.xml</span><br><span class="line">│ │ │ │ SkuSaleAttrValueDao.xml</span><br><span class="line">│ │ │ │ SpuCommentDao.xml</span><br><span class="line">│ │ │ │ SpuImagesDao.xml</span><br><span class="line">│ │ │ │ SpuInfoDao.xml</span><br><span class="line">│ │ │ │ SpuInfoDescDao.xml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─src</span><br><span class="line">│ │ │ │ └─views</span><br><span class="line">│ │ │ │ └─modules</span><br><span class="line">│ │ │ │ └─product</span><br><span class="line">│ │ │ │ attr-add-or-update.vue</span><br><span class="line">│ │ │ │ attr.vue</span><br><span class="line">│ │ │ │ attrattrgrouprelation-add-or-update.vue</span><br><span class="line">│ │ │ │ attrattrgrouprelation.vue</span><br><span class="line">│ │ │ │ attrgroup-add-or-update.vue</span><br><span class="line">│ │ │ │ attrgroup.vue</span><br><span class="line">│ │ │ │ brand-add-or-update.vue</span><br><span class="line">│ │ │ │ brand.vue</span><br><span class="line">│ │ │ │ category-add-or-update.vue</span><br><span class="line">│ │ │ │ category.vue</span><br><span class="line">│ │ │ │ categorybrandrelation-add-or-update.vue</span><br><span class="line">│ │ │ │ categorybrandrelation.vue</span><br><span class="line">│ │ │ │ commentreplay-add-or-update.vue</span><br><span class="line">│ │ │ │ commentreplay.vue</span><br><span class="line">│ │ │ │ productattrvalue-add-or-update.vue</span><br><span class="line">│ │ │ │ productattrvalue.vue</span><br><span class="line">│ │ │ │ skuimages-add-or-update.vue</span><br><span class="line">│ │ │ │ skuimages.vue</span><br><span class="line">│ │ │ │ skuinfo-add-or-update.vue</span><br><span class="line">│ │ │ │ skuinfo.vue</span><br><span class="line">│ │ │ │ skusaleattrvalue-add-or-update.vue</span><br><span class="line">│ │ │ │ skusaleattrvalue.vue</span><br><span class="line">│ │ │ │ spucomment-add-or-update.vue</span><br><span class="line">│ │ │ │ spucomment.vue</span><br><span class="line">│ │ │ │ spuimages-add-or-update.vue</span><br><span class="line">│ │ │ │ spuimages.vue</span><br><span class="line">│ │ │ │ spuinfo-add-or-update.vue</span><br><span class="line">│ │ │ │ spuinfo.vue</span><br><span class="line">│ │ │ │ spuinfodesc-add-or-update.vue</span><br><span class="line">│ │ │ │ spuinfodesc.vue</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─static</span><br><span class="line">│ │ │ └─templates</span><br><span class="line">│ │ └─test</span><br><span class="line">│ │ └─java</span><br><span class="line">│ │ └─com</span><br><span class="line">│ │ └─atguigu</span><br><span class="line">│ │ └─gulimall</span><br><span class="line">│ │ └─product</span><br><span class="line">│ │ GulimallProductApplicationTests.java</span><br><span class="line">│ │</span><br><span class="line">│ └─target</span><br><span class="line">│ ├─classes</span><br><span class="line">│ │ │ application.properties</span><br><span class="line">│ │ │ application.yml</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─com</span><br><span class="line">│ │ │ └─atguigu</span><br><span class="line">│ │ │ └─gulimall</span><br><span class="line">│ │ │ └─product</span><br><span class="line">│ │ │ │ GulimallProductApplication.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─controller</span><br><span class="line">│ │ │ │ AttrAttrgroupRelationController.class</span><br><span class="line">│ │ │ │ AttrController.class</span><br><span class="line">│ │ │ │ AttrGroupController.class</span><br><span class="line">│ │ │ │ BrandController.class</span><br><span class="line">│ │ │ │ CategoryBrandRelationController.class</span><br><span class="line">│ │ │ │ CategoryController.class</span><br><span class="line">│ │ │ │ CommentReplayController.class</span><br><span class="line">│ │ │ │ ProductAttrValueController.class</span><br><span class="line">│ │ │ │ SkuImagesController.class</span><br><span class="line">│ │ │ │ SkuInfoController.class</span><br><span class="line">│ │ │ │ SkuSaleAttrValueController.class</span><br><span class="line">│ │ │ │ SpuCommentController.class</span><br><span class="line">│ │ │ │ SpuImagesController.class</span><br><span class="line">│ │ │ │ SpuInfoController.class</span><br><span class="line">│ │ │ │ SpuInfoDescController.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─dao</span><br><span class="line">│ │ │ │ AttrAttrgroupRelationDao.class</span><br><span class="line">│ │ │ │ AttrDao.class</span><br><span class="line">│ │ │ │ AttrGroupDao.class</span><br><span class="line">│ │ │ │ BrandDao.class</span><br><span class="line">│ │ │ │ CategoryBrandRelationDao.class</span><br><span class="line">│ │ │ │ CategoryDao.class</span><br><span class="line">│ │ │ │ CommentReplayDao.class</span><br><span class="line">│ │ │ │ ProductAttrValueDao.class</span><br><span class="line">│ │ │ │ SkuImagesDao.class</span><br><span class="line">│ │ │ │ SkuInfoDao.class</span><br><span class="line">│ │ │ │ SkuSaleAttrValueDao.class</span><br><span class="line">│ │ │ │ SpuCommentDao.class</span><br><span class="line">│ │ │ │ SpuImagesDao.class</span><br><span class="line">│ │ │ │ SpuInfoDao.class</span><br><span class="line">│ │ │ │ SpuInfoDescDao.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─entity</span><br><span class="line">│ │ │ │ AttrAttrgroupRelationEntity.class</span><br><span class="line">│ │ │ │ AttrEntity.class</span><br><span class="line">│ │ │ │ AttrGroupEntity.class</span><br><span class="line">│ │ │ │ BrandEntity.class</span><br><span class="line">│ │ │ │ CategoryBrandRelationEntity.class</span><br><span class="line">│ │ │ │ CategoryEntity.class</span><br><span class="line">│ │ │ │ CommentReplayEntity.class</span><br><span class="line">│ │ │ │ ProductAttrValueEntity.class</span><br><span class="line">│ │ │ │ SkuImagesEntity.class</span><br><span class="line">│ │ │ │ SkuInfoEntity.class</span><br><span class="line">│ │ │ │ SkuSaleAttrValueEntity.class</span><br><span class="line">│ │ │ │ SpuCommentEntity.class</span><br><span class="line">│ │ │ │ SpuImagesEntity.class</span><br><span class="line">│ │ │ │ SpuInfoDescEntity.class</span><br><span class="line">│ │ │ │ SpuInfoEntity.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─service</span><br><span class="line">│ │ │ │ AttrAttrgroupRelationService.class</span><br><span class="line">│ │ │ │ AttrGroupService.class</span><br><span class="line">│ │ │ │ AttrService.class</span><br><span class="line">│ │ │ │ BrandService.class</span><br><span class="line">│ │ │ │ CategoryBrandRelationService.class</span><br><span class="line">│ │ │ │ CategoryService.class</span><br><span class="line">│ │ │ │ CommentReplayService.class</span><br><span class="line">│ │ │ │ ProductAttrValueService.class</span><br><span class="line">│ │ │ │ SkuImagesService.class</span><br><span class="line">│ │ │ │ SkuInfoService.class</span><br><span class="line">│ │ │ │ SkuSaleAttrValueService.class</span><br><span class="line">│ │ │ │ SpuCommentService.class</span><br><span class="line">│ │ │ │ SpuImagesService.class</span><br><span class="line">│ │ │ │ SpuInfoDescService.class</span><br><span class="line">│ │ │ │ SpuInfoService.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─impl</span><br><span class="line">│ │ │ AttrAttrgroupRelationServiceImpl.class</span><br><span class="line">│ │ │ AttrGroupServiceImpl.class</span><br><span class="line">│ │ │ AttrServiceImpl.class</span><br><span class="line">│ │ │ BrandServiceImpl.class</span><br><span class="line">│ │ │ CategoryBrandRelationServiceImpl.class</span><br><span class="line">│ │ │ CategoryServiceImpl.class</span><br><span class="line">│ │ │ CommentReplayServiceImpl.class</span><br><span class="line">│ │ │ ProductAttrValueServiceImpl.class</span><br><span class="line">│ │ │ SkuImagesServiceImpl.class</span><br><span class="line">│ │ │ SkuInfoServiceImpl.class</span><br><span class="line">│ │ │ SkuSaleAttrValueServiceImpl.class</span><br><span class="line">│ │ │ SpuCommentServiceImpl.class</span><br><span class="line">│ │ │ SpuImagesServiceImpl.class</span><br><span class="line">│ │ │ SpuInfoDescServiceImpl.class</span><br><span class="line">│ │ │ SpuInfoServiceImpl.class</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─mapper</span><br><span class="line">│ │ │ └─product</span><br><span class="line">│ │ │ AttrAttrgroupRelationDao.xml</span><br><span class="line">│ │ │ AttrDao.xml</span><br><span class="line">│ │ │ AttrGroupDao.xml</span><br><span class="line">│ │ │ BrandDao.xml</span><br><span class="line">│ │ │ CategoryBrandRelationDao.xml</span><br><span class="line">│ │ │ CategoryDao.xml</span><br><span class="line">│ │ │ CommentReplayDao.xml</span><br><span class="line">│ │ │ ProductAttrValueDao.xml</span><br><span class="line">│ │ │ SkuImagesDao.xml</span><br><span class="line">│ │ │ SkuInfoDao.xml</span><br><span class="line">│ │ │ SkuSaleAttrValueDao.xml</span><br><span class="line">│ │ │ SpuCommentDao.xml</span><br><span class="line">│ │ │ SpuImagesDao.xml</span><br><span class="line">│ │ │ SpuInfoDao.xml</span><br><span class="line">│ │ │ SpuInfoDescDao.xml</span><br><span class="line">│ │ │</span><br><span class="line">│ │ └─src</span><br><span class="line">│ │ └─views</span><br><span class="line">│ │ └─modules</span><br><span class="line">│ │ └─product</span><br><span class="line">│ │ attr-add-or-update.vue</span><br><span class="line">│ │ attr.vue</span><br><span class="line">│ │ attrattrgrouprelation-add-or-update.vue</span><br><span class="line">│ │ attrattrgrouprelation.vue</span><br><span class="line">│ │ attrgroup-add-or-update.vue</span><br><span class="line">│ │ attrgroup.vue</span><br><span class="line">│ │ brand-add-or-update.vue</span><br><span class="line">│ │ brand.vue</span><br><span class="line">│ │ category-add-or-update.vue</span><br><span class="line">│ │ category.vue</span><br><span class="line">│ │ categorybrandrelation-add-or-update.vue</span><br><span class="line">│ │ categorybrandrelation.vue</span><br><span class="line">│ │ commentreplay-add-or-update.vue</span><br><span class="line">│ │ commentreplay.vue</span><br><span class="line">│ │ productattrvalue-add-or-update.vue</span><br><span class="line">│ │ productattrvalue.vue</span><br><span class="line">│ │ skuimages-add-or-update.vue</span><br><span class="line">│ │ skuimages.vue</span><br><span class="line">│ │ skuinfo-add-or-update.vue</span><br><span class="line">│ │ skuinfo.vue</span><br><span class="line">│ │ skusaleattrvalue-add-or-update.vue</span><br><span class="line">│ │ skusaleattrvalue.vue</span><br><span class="line">│ │ spucomment-add-or-update.vue</span><br><span class="line">│ │ spucomment.vue</span><br><span class="line">│ │ spuimages-add-or-update.vue</span><br><span class="line">│ │ spuimages.vue</span><br><span class="line">│ │ spuinfo-add-or-update.vue</span><br><span class="line">│ │ spuinfo.vue</span><br><span class="line">│ │ spuinfodesc-add-or-update.vue</span><br><span class="line">│ │ spuinfodesc.vue</span><br><span class="line">│ │</span><br><span class="line">│ ├─generated-sources</span><br><span class="line">│ │ └─annotations</span><br><span class="line">│ ├─generated-test-sources</span><br><span class="line">│ │ └─test-annotations</span><br><span class="line">│ ├─maven-status</span><br><span class="line">│ │ └─maven-compiler-plugin</span><br><span class="line">│ │ └─compile</span><br><span class="line">│ │ └─default-compile</span><br><span class="line">│ │ createdFiles.lst</span><br><span class="line">│ │ inputFiles.lst</span><br><span class="line">│ │</span><br><span class="line">│ └─test-classes</span><br><span class="line">│ └─com</span><br><span class="line">│ └─atguigu</span><br><span class="line">│ └─gulimall</span><br><span class="line">│ └─product</span><br><span class="line">│ GulimallProductApplicationTests.class</span><br><span class="line">│</span><br><span class="line">├─gulimall-ware</span><br><span class="line">│ │ .gitignore</span><br><span class="line">│ │ gulimall-ware.iml</span><br><span class="line">│ │ HELP.md</span><br><span class="line">│ │ mvnw</span><br><span class="line">│ │ mvnw.cmd</span><br><span class="line">│ │ pom.xml</span><br><span class="line">│ │</span><br><span class="line">│ ├─.mvn</span><br><span class="line">│ │ └─wrapper</span><br><span class="line">│ │ maven-wrapper.jar</span><br><span class="line">│ │ maven-wrapper.properties</span><br><span class="line">│ │</span><br><span class="line">│ ├─src</span><br><span class="line">│ │ ├─main</span><br><span class="line">│ │ │ ├─java</span><br><span class="line">│ │ │ │ └─com</span><br><span class="line">│ │ │ │ └─atguigu</span><br><span class="line">│ │ │ │ └─gulimall</span><br><span class="line">│ │ │ │ └─ware</span><br><span class="line">│ │ │ │ │ GulimallWareApplication.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─controller</span><br><span class="line">│ │ │ │ │ WareInfoController.java</span><br><span class="line">│ │ │ │ │ WareOrderTaskController.java</span><br><span class="line">│ │ │ │ │ WareOrderTaskDetailController.java</span><br><span class="line">│ │ │ │ │ WareSkuController.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─dao</span><br><span class="line">│ │ │ │ │ WareInfoDao.java</span><br><span class="line">│ │ │ │ │ WareOrderTaskDao.java</span><br><span class="line">│ │ │ │ │ WareOrderTaskDetailDao.java</span><br><span class="line">│ │ │ │ │ WareSkuDao.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─entity</span><br><span class="line">│ │ │ │ │ WareInfoEntity.java</span><br><span class="line">│ │ │ │ │ WareOrderTaskDetailEntity.java</span><br><span class="line">│ │ │ │ │ WareOrderTaskEntity.java</span><br><span class="line">│ │ │ │ │ WareSkuEntity.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─service</span><br><span class="line">│ │ │ │ │ WareInfoService.java</span><br><span class="line">│ │ │ │ │ WareOrderTaskDetailService.java</span><br><span class="line">│ │ │ │ │ WareOrderTaskService.java</span><br><span class="line">│ │ │ │ │ WareSkuService.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─impl</span><br><span class="line">│ │ │ │ WareInfoServiceImpl.java</span><br><span class="line">│ │ │ │ WareOrderTaskDetailServiceImpl.java</span><br><span class="line">│ │ │ │ WareOrderTaskServiceImpl.java</span><br><span class="line">│ │ │ │ WareSkuServiceImpl.java</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─resources</span><br><span class="line">│ │ │ │ application.yml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─mapper</span><br><span class="line">│ │ │ │ └─ware</span><br><span class="line">│ │ │ │ WareInfoDao.xml</span><br><span class="line">│ │ │ │ WareOrderTaskDao.xml</span><br><span class="line">│ │ │ │ WareOrderTaskDetailDao.xml</span><br><span class="line">│ │ │ │ WareSkuDao.xml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─src</span><br><span class="line">│ │ │ └─views</span><br><span class="line">│ │ │ └─modules</span><br><span class="line">│ │ │ └─ware</span><br><span class="line">│ │ │ wareinfo-add-or-update.vue</span><br><span class="line">│ │ │ wareinfo.vue</span><br><span class="line">│ │ │ wareordertask-add-or-update.vue</span><br><span class="line">│ │ │ wareordertask.vue</span><br><span class="line">│ │ │ wareordertaskdetail-add-or-update.vue</span><br><span class="line">│ │ │ wareordertaskdetail.vue</span><br><span class="line">│ │ │ waresku-add-or-update.vue</span><br><span class="line">│ │ │ waresku.vue</span><br><span class="line">│ │ │</span><br><span class="line">│ │ └─test</span><br><span class="line">│ │ └─java</span><br><span class="line">│ │ └─com</span><br><span class="line">│ │ └─atguigu</span><br><span class="line">│ │ └─gulimall</span><br><span class="line">│ │ └─gulimallware</span><br><span class="line">│ │ GulimallWareApplicationTests.java</span><br><span class="line">│ │</span><br><span class="line">│ └─target</span><br><span class="line">│ ├─classes</span><br><span class="line">│ │ │ application.yml</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─com</span><br><span class="line">│ │ │ └─atguigu</span><br><span class="line">│ │ │ └─gulimall</span><br><span class="line">│ │ │ ├─gulimallware</span><br><span class="line">│ │ │ │ GulimallWareApplication.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─ware</span><br><span class="line">│ │ │ │ GulimallWareApplication.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─controller</span><br><span class="line">│ │ │ │ WareInfoController.class</span><br><span class="line">│ │ │ │ WareOrderTaskController.class</span><br><span class="line">│ │ │ │ WareOrderTaskDetailController.class</span><br><span class="line">│ │ │ │ WareSkuController.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─dao</span><br><span class="line">│ │ │ │ WareInfoDao.class</span><br><span class="line">│ │ │ │ WareOrderTaskDao.class</span><br><span class="line">│ │ │ │ WareOrderTaskDetailDao.class</span><br><span class="line">│ │ │ │ WareSkuDao.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─entity</span><br><span class="line">│ │ │ │ WareInfoEntity.class</span><br><span class="line">│ │ │ │ WareOrderTaskDetailEntity.class</span><br><span class="line">│ │ │ │ WareOrderTaskEntity.class</span><br><span class="line">│ │ │ │ WareSkuEntity.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─service</span><br><span class="line">│ │ │ │ WareInfoService.class</span><br><span class="line">│ │ │ │ WareOrderTaskDetailService.class</span><br><span class="line">│ │ │ │ WareOrderTaskService.class</span><br><span class="line">│ │ │ │ WareSkuService.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─impl</span><br><span class="line">│ │ │ WareInfoServiceImpl.class</span><br><span class="line">│ │ │ WareOrderTaskDetailServiceImpl.class</span><br><span class="line">│ │ │ WareOrderTaskServiceImpl.class</span><br><span class="line">│ │ │ WareSkuServiceImpl.class</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─mapper</span><br><span class="line">│ │ │ └─ware</span><br><span class="line">│ │ │ WareInfoDao.xml</span><br><span class="line">│ │ │ WareOrderTaskDao.xml</span><br><span class="line">│ │ │ WareOrderTaskDetailDao.xml</span><br><span class="line">│ │ │ WareSkuDao.xml</span><br><span class="line">│ │ │</span><br><span class="line">│ │ └─src</span><br><span class="line">│ │ └─views</span><br><span class="line">│ │ └─modules</span><br><span class="line">│ │ └─ware</span><br><span class="line">│ │ wareinfo-add-or-update.vue</span><br><span class="line">│ │ wareinfo.vue</span><br><span class="line">│ │ wareordertask-add-or-update.vue</span><br><span class="line">│ │ wareordertask.vue</span><br><span class="line">│ │ wareordertaskdetail-add-or-update.vue</span><br><span class="line">│ │ wareordertaskdetail.vue</span><br><span class="line">│ │ waresku-add-or-update.vue</span><br><span class="line">│ │ waresku.vue</span><br><span class="line">│ │</span><br><span class="line">│ ├─generated-sources</span><br><span class="line">│ │ └─annotations</span><br><span class="line">│ ├─generated-test-sources</span><br><span class="line">│ │ └─test-annotations</span><br><span class="line">│ ├─maven-status</span><br><span class="line">│ │ └─maven-compiler-plugin</span><br><span class="line">│ │ └─compile</span><br><span class="line">│ │ └─default-compile</span><br><span class="line">│ │ createdFiles.lst</span><br><span class="line">│ │ inputFiles.lst</span><br><span class="line">│ │</span><br><span class="line">│ └─test-classes</span><br><span class="line">│ └─com</span><br><span class="line">│ └─atguigu</span><br><span class="line">│ └─gulimall</span><br><span class="line">│ └─gulimallware</span><br><span class="line">│ GulimallWareApplicationTests.class</span><br><span class="line">│</span><br><span class="line">├─renren-fast</span><br><span class="line">│ │ .gitignore</span><br><span class="line">│ │ docker-compose.yml</span><br><span class="line">│ │ Dockerfile</span><br><span class="line">│ │ LICENSE</span><br><span class="line">│ │ pom.xml</span><br><span class="line">│ │ README.md</span><br><span class="line">│ │ renren-fast.iml</span><br><span class="line">│ │</span><br><span class="line">│ ├─db</span><br><span class="line">│ │ mysql.sql</span><br><span class="line">│ │ oracle.sql</span><br><span class="line">│ │ postgresql.sql</span><br><span class="line">│ │ sqlserver.sql</span><br><span class="line">│ │</span><br><span class="line">│ ├─src</span><br><span class="line">│ │ ├─main</span><br><span class="line">│ │ │ ├─java</span><br><span class="line">│ │ │ │ └─io</span><br><span class="line">│ │ │ │ └─renren</span><br><span class="line">│ │ │ │ │ RenrenApplication.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─common</span><br><span class="line">│ │ │ │ │ ├─annotation</span><br><span class="line">│ │ │ │ │ │ SysLog.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─aspect</span><br><span class="line">│ │ │ │ │ │ RedisAspect.java</span><br><span class="line">│ │ │ │ │ │ SysLogAspect.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─exception</span><br><span class="line">│ │ │ │ │ │ RRException.java</span><br><span class="line">│ │ │ │ │ │ RRExceptionHandler.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─utils</span><br><span class="line">│ │ │ │ │ │ ConfigConstant.java</span><br><span class="line">│ │ │ │ │ │ Constant.java</span><br><span class="line">│ │ │ │ │ │ DateUtils.java</span><br><span class="line">│ │ │ │ │ │ HttpContextUtils.java</span><br><span class="line">│ │ │ │ │ │ IPUtils.java</span><br><span class="line">│ │ │ │ │ │ MapUtils.java</span><br><span class="line">│ │ │ │ │ │ PageUtils.java</span><br><span class="line">│ │ │ │ │ │ Query.java</span><br><span class="line">│ │ │ │ │ │ R.java</span><br><span class="line">│ │ │ │ │ │ RedisKeys.java</span><br><span class="line">│ │ │ │ │ │ RedisUtils.java</span><br><span class="line">│ │ │ │ │ │ ShiroUtils.java</span><br><span class="line">│ │ │ │ │ │ SpringContextUtils.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─validator</span><br><span class="line">│ │ │ │ │ │ │ Assert.java</span><br><span class="line">│ │ │ │ │ │ │ ValidatorUtils.java</span><br><span class="line">│ │ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ │ └─group</span><br><span class="line">│ │ │ │ │ │ AddGroup.java</span><br><span class="line">│ │ │ │ │ │ AliyunGroup.java</span><br><span class="line">│ │ │ │ │ │ Group.java</span><br><span class="line">│ │ │ │ │ │ QcloudGroup.java</span><br><span class="line">│ │ │ │ │ │ QiniuGroup.java</span><br><span class="line">│ │ │ │ │ │ UpdateGroup.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ └─xss</span><br><span class="line">│ │ │ │ │ HTMLFilter.java</span><br><span class="line">│ │ │ │ │ SQLFilter.java</span><br><span class="line">│ │ │ │ │ XssFilter.java</span><br><span class="line">│ │ │ │ │ XssHttpServletRequestWrapper.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─config</span><br><span class="line">│ │ │ │ │ CorsConfig.java</span><br><span class="line">│ │ │ │ │ FilterConfig.java</span><br><span class="line">│ │ │ │ │ KaptchaConfig.java</span><br><span class="line">│ │ │ │ │ MybatisPlusConfig.java</span><br><span class="line">│ │ │ │ │ RedisConfig.java</span><br><span class="line">│ │ │ │ │ ShiroConfig.java</span><br><span class="line">│ │ │ │ │ SwaggerConfig.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─datasource</span><br><span class="line">│ │ │ │ │ ├─annotation</span><br><span class="line">│ │ │ │ │ │ DataSource.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─aspect</span><br><span class="line">│ │ │ │ │ │ DataSourceAspect.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─config</span><br><span class="line">│ │ │ │ │ │ DynamicContextHolder.java</span><br><span class="line">│ │ │ │ │ │ DynamicDataSource.java</span><br><span class="line">│ │ │ │ │ │ DynamicDataSourceConfig.java</span><br><span class="line">│ │ │ │ │ │ DynamicDataSourceFactory.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ └─properties</span><br><span class="line">│ │ │ │ │ DataSourceProperties.java</span><br><span class="line">│ │ │ │ │ DynamicDataSourceProperties.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─modules</span><br><span class="line">│ │ │ │ ├─app</span><br><span class="line">│ │ │ │ │ ├─annotation</span><br><span class="line">│ │ │ │ │ │ Login.java</span><br><span class="line">│ │ │ │ │ │ LoginUser.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─config</span><br><span class="line">│ │ │ │ │ │ WebMvcConfig.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─controller</span><br><span class="line">│ │ │ │ │ │ AppLoginController.java</span><br><span class="line">│ │ │ │ │ │ AppRegisterController.java</span><br><span class="line">│ │ │ │ │ │ AppTestController.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─dao</span><br><span class="line">│ │ │ │ │ │ UserDao.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─entity</span><br><span class="line">│ │ │ │ │ │ UserEntity.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─form</span><br><span class="line">│ │ │ │ │ │ LoginForm.java</span><br><span class="line">│ │ │ │ │ │ RegisterForm.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─interceptor</span><br><span class="line">│ │ │ │ │ │ AuthorizationInterceptor.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─resolver</span><br><span class="line">│ │ │ │ │ │ LoginUserHandlerMethodArgumentResolver.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─service</span><br><span class="line">│ │ │ │ │ │ │ UserService.java</span><br><span class="line">│ │ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ │ └─impl</span><br><span class="line">│ │ │ │ │ │ UserServiceImpl.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ └─utils</span><br><span class="line">│ │ │ │ │ JwtUtils.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─job</span><br><span class="line">│ │ │ │ │ ├─config</span><br><span class="line">│ │ │ │ │ │ ScheduleConfig.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─controller</span><br><span class="line">│ │ │ │ │ │ ScheduleJobController.java</span><br><span class="line">│ │ │ │ │ │ ScheduleJobLogController.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─dao</span><br><span class="line">│ │ │ │ │ │ ScheduleJobDao.java</span><br><span class="line">│ │ │ │ │ │ ScheduleJobLogDao.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─entity</span><br><span class="line">│ │ │ │ │ │ ScheduleJobEntity.java</span><br><span class="line">│ │ │ │ │ │ ScheduleJobLogEntity.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─service</span><br><span class="line">│ │ │ │ │ │ │ ScheduleJobLogService.java</span><br><span class="line">│ │ │ │ │ │ │ ScheduleJobService.java</span><br><span class="line">│ │ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ │ └─impl</span><br><span class="line">│ │ │ │ │ │ ScheduleJobLogServiceImpl.java</span><br><span class="line">│ │ │ │ │ │ ScheduleJobServiceImpl.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─task</span><br><span class="line">│ │ │ │ │ │ ITask.java</span><br><span class="line">│ │ │ │ │ │ TestTask.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ └─utils</span><br><span class="line">│ │ │ │ │ ScheduleJob.java</span><br><span class="line">│ │ │ │ │ ScheduleUtils.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─oss</span><br><span class="line">│ │ │ │ │ ├─cloud</span><br><span class="line">│ │ │ │ │ │ AliyunCloudStorageService.java</span><br><span class="line">│ │ │ │ │ │ CloudStorageConfig.java</span><br><span class="line">│ │ │ │ │ │ CloudStorageService.java</span><br><span class="line">│ │ │ │ │ │ OSSFactory.java</span><br><span class="line">│ │ │ │ │ │ QcloudCloudStorageService.java</span><br><span class="line">│ │ │ │ │ │ QiniuCloudStorageService.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─controller</span><br><span class="line">│ │ │ │ │ │ SysOssController.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─dao</span><br><span class="line">│ │ │ │ │ │ SysOssDao.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ ├─entity</span><br><span class="line">│ │ │ │ │ │ SysOssEntity.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ └─service</span><br><span class="line">│ │ │ │ │ │ SysOssService.java</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ └─impl</span><br><span class="line">│ │ │ │ │ SysOssServiceImpl.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─sys</span><br><span class="line">│ │ │ │ ├─controller</span><br><span class="line">│ │ │ │ │ AbstractController.java</span><br><span class="line">│ │ │ │ │ SysConfigController.java</span><br><span class="line">│ │ │ │ │ SysLogController.java</span><br><span class="line">│ │ │ │ │ SysLoginController.java</span><br><span class="line">│ │ │ │ │ SysMenuController.java</span><br><span class="line">│ │ │ │ │ SysRoleController.java</span><br><span class="line">│ │ │ │ │ SysUserController.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─dao</span><br><span class="line">│ │ │ │ │ SysCaptchaDao.java</span><br><span class="line">│ │ │ │ │ SysConfigDao.java</span><br><span class="line">│ │ │ │ │ SysLogDao.java</span><br><span class="line">│ │ │ │ │ SysMenuDao.java</span><br><span class="line">│ │ │ │ │ SysRoleDao.java</span><br><span class="line">│ │ │ │ │ SysRoleMenuDao.java</span><br><span class="line">│ │ │ │ │ SysUserDao.java</span><br><span class="line">│ │ │ │ │ SysUserRoleDao.java</span><br><span class="line">│ │ │ │ │ SysUserTokenDao.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─entity</span><br><span class="line">│ │ │ │ │ SysCaptchaEntity.java</span><br><span class="line">│ │ │ │ │ SysConfigEntity.java</span><br><span class="line">│ │ │ │ │ SysLogEntity.java</span><br><span class="line">│ │ │ │ │ SysMenuEntity.java</span><br><span class="line">│ │ │ │ │ SysRoleEntity.java</span><br><span class="line">│ │ │ │ │ SysRoleMenuEntity.java</span><br><span class="line">│ │ │ │ │ SysUserEntity.java</span><br><span class="line">│ │ │ │ │ SysUserRoleEntity.java</span><br><span class="line">│ │ │ │ │ SysUserTokenEntity.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─form</span><br><span class="line">│ │ │ │ │ PasswordForm.java</span><br><span class="line">│ │ │ │ │ SysLoginForm.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─oauth2</span><br><span class="line">│ │ │ │ │ OAuth2Filter.java</span><br><span class="line">│ │ │ │ │ OAuth2Realm.java</span><br><span class="line">│ │ │ │ │ OAuth2Token.java</span><br><span class="line">│ │ │ │ │ TokenGenerator.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─redis</span><br><span class="line">│ │ │ │ │ SysConfigRedis.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─service</span><br><span class="line">│ │ │ │ │ ShiroService.java</span><br><span class="line">│ │ │ │ │ SysCaptchaService.java</span><br><span class="line">│ │ │ │ │ SysConfigService.java</span><br><span class="line">│ │ │ │ │ SysLogService.java</span><br><span class="line">│ │ │ │ │ SysMenuService.java</span><br><span class="line">│ │ │ │ │ SysRoleMenuService.java</span><br><span class="line">│ │ │ │ │ SysRoleService.java</span><br><span class="line">│ │ │ │ │ SysUserRoleService.java</span><br><span class="line">│ │ │ │ │ SysUserService.java</span><br><span class="line">│ │ │ │ │ SysUserTokenService.java</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─impl</span><br><span class="line">│ │ │ │ ShiroServiceImpl.java</span><br><span class="line">│ │ │ │ SysCaptchaServiceImpl.java</span><br><span class="line">│ │ │ │ SysConfigServiceImpl.java</span><br><span class="line">│ │ │ │ SysLogServiceImpl.java</span><br><span class="line">│ │ │ │ SysMenuServiceImpl.java</span><br><span class="line">│ │ │ │ SysRoleMenuServiceImpl.java</span><br><span class="line">│ │ │ │ SysRoleServiceImpl.java</span><br><span class="line">│ │ │ │ SysUserRoleServiceImpl.java</span><br><span class="line">│ │ │ │ SysUserServiceImpl.java</span><br><span class="line">│ │ │ │ SysUserTokenServiceImpl.java</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─resources</span><br><span class="line">│ │ │ │ application-dev.yml</span><br><span class="line">│ │ │ │ application-prod.yml</span><br><span class="line">│ │ │ │ application-test.yml</span><br><span class="line">│ │ │ │ application.yml</span><br><span class="line">│ │ │ │ banner.txt</span><br><span class="line">│ │ │ │ logback-spring.xml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─mapper</span><br><span class="line">│ │ │ │ ├─app</span><br><span class="line">│ │ │ │ │ UserDao.xml</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─job</span><br><span class="line">│ │ │ │ │ ScheduleJobDao.xml</span><br><span class="line">│ │ │ │ │ ScheduleJobLogDao.xml</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─oss</span><br><span class="line">│ │ │ │ │ SysOssDao.xml</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─sys</span><br><span class="line">│ │ │ │ SysConfigDao.xml</span><br><span class="line">│ │ │ │ SysLogDao.xml</span><br><span class="line">│ │ │ │ SysMenuDao.xml</span><br><span class="line">│ │ │ │ SysRoleDao.xml</span><br><span class="line">│ │ │ │ SysRoleMenuDao.xml</span><br><span class="line">│ │ │ │ SysUserDao.xml</span><br><span class="line">│ │ │ │ SysUserRoleDao.xml</span><br><span class="line">│ │ │ │ SysUserTokenDao.xml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─static</span><br><span class="line">│ │ │ │ favicon.ico</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─swagger</span><br><span class="line">│ │ │ │ favicon-16x16.png</span><br><span class="line">│ │ │ │ favicon-32x32.png</span><br><span class="line">│ │ │ │ index.html</span><br><span class="line">│ │ │ │ index.yaml</span><br><span class="line">│ │ │ │ o2c.html</span><br><span class="line">│ │ │ │ oauth2-redirect.html</span><br><span class="line">│ │ │ │ swagger-ui-bundle.js</span><br><span class="line">│ │ │ │ swagger-ui-bundle.js.map</span><br><span class="line">│ │ │ │ swagger-ui-standalone-preset.js</span><br><span class="line">│ │ │ │ swagger-ui-standalone-preset.js.map</span><br><span class="line">│ │ │ │ swagger-ui.css</span><br><span class="line">│ │ │ │ swagger-ui.css.map</span><br><span class="line">│ │ │ │ swagger-ui.js</span><br><span class="line">│ │ │ │ swagger-ui.js.map</span><br><span class="line">│ │ │ │ swagger-ui.min.js</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─css</span><br><span class="line">│ │ │ │ print.css</span><br><span class="line">│ │ │ │ reset.css</span><br><span class="line">│ │ │ │ screen.css</span><br><span class="line">│ │ │ │ style.css</span><br><span class="line">│ │ │ │ typography.css</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─fonts</span><br><span class="line">│ │ │ │ DroidSans-Bold.ttf</span><br><span class="line">│ │ │ │ DroidSans.ttf</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─images</span><br><span class="line">│ │ │ │ collapse.gif</span><br><span class="line">│ │ │ │ expand.gif</span><br><span class="line">│ │ │ │ explorer_icons.png</span><br><span class="line">│ │ │ │ favicon-16x16.png</span><br><span class="line">│ │ │ │ favicon-32x32.png</span><br><span class="line">│ │ │ │ favicon.ico</span><br><span class="line">│ │ │ │ logo_small.png</span><br><span class="line">│ │ │ │ pet_store_api.png</span><br><span class="line">│ │ │ │ throbber.gif</span><br><span class="line">│ │ │ │ wordnik_api.png</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─lang</span><br><span class="line">│ │ │ │ en.js</span><br><span class="line">│ │ │ │ translator.js</span><br><span class="line">│ │ │ │ zh-cn.js</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─lib</span><br><span class="line">│ │ │ backbone-min.js</span><br><span class="line">│ │ │ es5-shim.js</span><br><span class="line">│ │ │ handlebars-4.0.5.js</span><br><span class="line">│ │ │ highlight.9.1.0.pack.js</span><br><span class="line">│ │ │ highlight.9.1.0.pack_extended.js</span><br><span class="line">│ │ │ jquery-1.8.0.min.js</span><br><span class="line">│ │ │ jquery.ba-bbq.min.js</span><br><span class="line">│ │ │ jquery.slideto.min.js</span><br><span class="line">│ │ │ jquery.wiggle.min.js</span><br><span class="line">│ │ │ js-yaml.min.js</span><br><span class="line">│ │ │ jsoneditor.min.js</span><br><span class="line">│ │ │ lodash.min.js</span><br><span class="line">│ │ │ marked.js</span><br><span class="line">│ │ │ object-assign-pollyfill.js</span><br><span class="line">│ │ │ sanitize-html.min.js</span><br><span class="line">│ │ │ swagger-oauth.js</span><br><span class="line">│ │ │</span><br><span class="line">│ │ └─test</span><br><span class="line">│ │ └─java</span><br><span class="line">│ │ └─io</span><br><span class="line">│ │ └─renren</span><br><span class="line">│ │ │ DynamicDataSourceTest.java</span><br><span class="line">│ │ │ JwtTest.java</span><br><span class="line">│ │ │ RedisTest.java</span><br><span class="line">│ │ │</span><br><span class="line">│ │ └─service</span><br><span class="line">│ │ DynamicDataSourceTestService.java</span><br><span class="line">│ │</span><br><span class="line">│ └─target</span><br><span class="line">│ ├─classes</span><br><span class="line">│ │ │ application-dev.yml</span><br><span class="line">│ │ │ application-prod.yml</span><br><span class="line">│ │ │ application-test.yml</span><br><span class="line">│ │ │ application.yml</span><br><span class="line">│ │ │ banner.txt</span><br><span class="line">│ │ │ logback-spring.xml</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─io</span><br><span class="line">│ │ │ └─renren</span><br><span class="line">│ │ │ │ RenrenApplication.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─common</span><br><span class="line">│ │ │ │ ├─annotation</span><br><span class="line">│ │ │ │ │ SysLog.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─aspect</span><br><span class="line">│ │ │ │ │ RedisAspect.class</span><br><span class="line">│ │ │ │ │ SysLogAspect.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─exception</span><br><span class="line">│ │ │ │ │ RRException.class</span><br><span class="line">│ │ │ │ │ RRExceptionHandler.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─utils</span><br><span class="line">│ │ │ │ │ ConfigConstant.class</span><br><span class="line">│ │ │ │ │ Constant$CloudService.class</span><br><span class="line">│ │ │ │ │ Constant$MenuType.class</span><br><span class="line">│ │ │ │ │ Constant$ScheduleStatus.class</span><br><span class="line">│ │ │ │ │ Constant.class</span><br><span class="line">│ │ │ │ │ DateUtils.class</span><br><span class="line">│ │ │ │ │ HttpContextUtils.class</span><br><span class="line">│ │ │ │ │ IPUtils.class</span><br><span class="line">│ │ │ │ │ MapUtils.class</span><br><span class="line">│ │ │ │ │ PageUtils.class</span><br><span class="line">│ │ │ │ │ Query.class</span><br><span class="line">│ │ │ │ │ R.class</span><br><span class="line">│ │ │ │ │ RedisKeys.class</span><br><span class="line">│ │ │ │ │ RedisUtils.class</span><br><span class="line">│ │ │ │ │ ShiroUtils.class</span><br><span class="line">│ │ │ │ │ SpringContextUtils.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─validator</span><br><span class="line">│ │ │ │ │ │ Assert.class</span><br><span class="line">│ │ │ │ │ │ ValidatorUtils.class</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ └─group</span><br><span class="line">│ │ │ │ │ AddGroup.class</span><br><span class="line">│ │ │ │ │ AliyunGroup.class</span><br><span class="line">│ │ │ │ │ Group.class</span><br><span class="line">│ │ │ │ │ QcloudGroup.class</span><br><span class="line">│ │ │ │ │ QiniuGroup.class</span><br><span class="line">│ │ │ │ │ UpdateGroup.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─xss</span><br><span class="line">│ │ │ │ HTMLFilter.class</span><br><span class="line">│ │ │ │ SQLFilter.class</span><br><span class="line">│ │ │ │ XssFilter.class</span><br><span class="line">│ │ │ │ XssHttpServletRequestWrapper$1.class</span><br><span class="line">│ │ │ │ XssHttpServletRequestWrapper.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─config</span><br><span class="line">│ │ │ │ CorsConfig.class</span><br><span class="line">│ │ │ │ FilterConfig.class</span><br><span class="line">│ │ │ │ KaptchaConfig.class</span><br><span class="line">│ │ │ │ MybatisPlusConfig.class</span><br><span class="line">│ │ │ │ RedisConfig.class</span><br><span class="line">│ │ │ │ ShiroConfig.class</span><br><span class="line">│ │ │ │ SwaggerConfig.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─datasource</span><br><span class="line">│ │ │ │ ├─annotation</span><br><span class="line">│ │ │ │ │ DataSource.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─aspect</span><br><span class="line">│ │ │ │ │ DataSourceAspect.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─config</span><br><span class="line">│ │ │ │ │ DynamicContextHolder$1.class</span><br><span class="line">│ │ │ │ │ DynamicContextHolder.class</span><br><span class="line">│ │ │ │ │ DynamicDataSource.class</span><br><span class="line">│ │ │ │ │ DynamicDataSourceConfig.class</span><br><span class="line">│ │ │ │ │ DynamicDataSourceFactory.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─properties</span><br><span class="line">│ │ │ │ DataSourceProperties.class</span><br><span class="line">│ │ │ │ DynamicDataSourceProperties.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─modules</span><br><span class="line">│ │ │ ├─app</span><br><span class="line">│ │ │ │ ├─annotation</span><br><span class="line">│ │ │ │ │ Login.class</span><br><span class="line">│ │ │ │ │ LoginUser.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─config</span><br><span class="line">│ │ │ │ │ WebMvcConfig.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─controller</span><br><span class="line">│ │ │ │ │ AppLoginController.class</span><br><span class="line">│ │ │ │ │ AppRegisterController.class</span><br><span class="line">│ │ │ │ │ AppTestController.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─dao</span><br><span class="line">│ │ │ │ │ UserDao.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─entity</span><br><span class="line">│ │ │ │ │ UserEntity.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─form</span><br><span class="line">│ │ │ │ │ LoginForm.class</span><br><span class="line">│ │ │ │ │ RegisterForm.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─interceptor</span><br><span class="line">│ │ │ │ │ AuthorizationInterceptor.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─resolver</span><br><span class="line">│ │ │ │ │ LoginUserHandlerMethodArgumentResolver.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─service</span><br><span class="line">│ │ │ │ │ │ UserService.class</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ └─impl</span><br><span class="line">│ │ │ │ │ UserServiceImpl.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─utils</span><br><span class="line">│ │ │ │ JwtUtils.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─job</span><br><span class="line">│ │ │ │ ├─config</span><br><span class="line">│ │ │ │ │ ScheduleConfig.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─controller</span><br><span class="line">│ │ │ │ │ ScheduleJobController.class</span><br><span class="line">│ │ │ │ │ ScheduleJobLogController.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─dao</span><br><span class="line">│ │ │ │ │ ScheduleJobDao.class</span><br><span class="line">│ │ │ │ │ ScheduleJobLogDao.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─entity</span><br><span class="line">│ │ │ │ │ ScheduleJobEntity.class</span><br><span class="line">│ │ │ │ │ ScheduleJobLogEntity.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─service</span><br><span class="line">│ │ │ │ │ │ ScheduleJobLogService.class</span><br><span class="line">│ │ │ │ │ │ ScheduleJobService.class</span><br><span class="line">│ │ │ │ │ │</span><br><span class="line">│ │ │ │ │ └─impl</span><br><span class="line">│ │ │ │ │ ScheduleJobLogServiceImpl.class</span><br><span class="line">│ │ │ │ │ ScheduleJobServiceImpl.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─task</span><br><span class="line">│ │ │ │ │ ITask.class</span><br><span class="line">│ │ │ │ │ TestTask.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─utils</span><br><span class="line">│ │ │ │ ScheduleJob.class</span><br><span class="line">│ │ │ │ ScheduleUtils.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─oss</span><br><span class="line">│ │ │ │ ├─cloud</span><br><span class="line">│ │ │ │ │ AliyunCloudStorageService.class</span><br><span class="line">│ │ │ │ │ CloudStorageConfig.class</span><br><span class="line">│ │ │ │ │ CloudStorageService.class</span><br><span class="line">│ │ │ │ │ OSSFactory.class</span><br><span class="line">│ │ │ │ │ QcloudCloudStorageService.class</span><br><span class="line">│ │ │ │ │ QiniuCloudStorageService.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─controller</span><br><span class="line">│ │ │ │ │ SysOssController.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─dao</span><br><span class="line">│ │ │ │ │ SysOssDao.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ ├─entity</span><br><span class="line">│ │ │ │ │ SysOssEntity.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─service</span><br><span class="line">│ │ │ │ │ SysOssService.class</span><br><span class="line">│ │ │ │ │</span><br><span class="line">│ │ │ │ └─impl</span><br><span class="line">│ │ │ │ SysOssServiceImpl.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─sys</span><br><span class="line">│ │ │ ├─controller</span><br><span class="line">│ │ │ │ AbstractController.class</span><br><span class="line">│ │ │ │ SysConfigController.class</span><br><span class="line">│ │ │ │ SysLogController.class</span><br><span class="line">│ │ │ │ SysLoginController.class</span><br><span class="line">│ │ │ │ SysMenuController.class</span><br><span class="line">│ │ │ │ SysRoleController.class</span><br><span class="line">│ │ │ │ SysUserController.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─dao</span><br><span class="line">│ │ │ │ SysCaptchaDao.class</span><br><span class="line">│ │ │ │ SysConfigDao.class</span><br><span class="line">│ │ │ │ SysLogDao.class</span><br><span class="line">│ │ │ │ SysMenuDao.class</span><br><span class="line">│ │ │ │ SysRoleDao.class</span><br><span class="line">│ │ │ │ SysRoleMenuDao.class</span><br><span class="line">│ │ │ │ SysUserDao.class</span><br><span class="line">│ │ │ │ SysUserRoleDao.class</span><br><span class="line">│ │ │ │ SysUserTokenDao.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─entity</span><br><span class="line">│ │ │ │ SysCaptchaEntity.class</span><br><span class="line">│ │ │ │ SysConfigEntity.class</span><br><span class="line">│ │ │ │ SysLogEntity.class</span><br><span class="line">│ │ │ │ SysMenuEntity.class</span><br><span class="line">│ │ │ │ SysRoleEntity.class</span><br><span class="line">│ │ │ │ SysRoleMenuEntity.class</span><br><span class="line">│ │ │ │ SysUserEntity.class</span><br><span class="line">│ │ │ │ SysUserRoleEntity.class</span><br><span class="line">│ │ │ │ SysUserTokenEntity.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─form</span><br><span class="line">│ │ │ │ PasswordForm.class</span><br><span class="line">│ │ │ │ SysLoginForm.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─oauth2</span><br><span class="line">│ │ │ │ OAuth2Filter.class</span><br><span class="line">│ │ │ │ OAuth2Realm.class</span><br><span class="line">│ │ │ │ OAuth2Token.class</span><br><span class="line">│ │ │ │ TokenGenerator.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─redis</span><br><span class="line">│ │ │ │ SysConfigRedis.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─service</span><br><span class="line">│ │ │ │ ShiroService.class</span><br><span class="line">│ │ │ │ SysCaptchaService.class</span><br><span class="line">│ │ │ │ SysConfigService.class</span><br><span class="line">│ │ │ │ SysLogService.class</span><br><span class="line">│ │ │ │ SysMenuService.class</span><br><span class="line">│ │ │ │ SysRoleMenuService.class</span><br><span class="line">│ │ │ │ SysRoleService.class</span><br><span class="line">│ │ │ │ SysUserRoleService.class</span><br><span class="line">│ │ │ │ SysUserService.class</span><br><span class="line">│ │ │ │ SysUserTokenService.class</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─impl</span><br><span class="line">│ │ │ ShiroServiceImpl.class</span><br><span class="line">│ │ │ SysCaptchaServiceImpl.class</span><br><span class="line">│ │ │ SysConfigServiceImpl.class</span><br><span class="line">│ │ │ SysLogServiceImpl.class</span><br><span class="line">│ │ │ SysMenuServiceImpl.class</span><br><span class="line">│ │ │ SysRoleMenuServiceImpl.class</span><br><span class="line">│ │ │ SysRoleServiceImpl.class</span><br><span class="line">│ │ │ SysUserRoleServiceImpl.class</span><br><span class="line">│ │ │ SysUserServiceImpl.class</span><br><span class="line">│ │ │ SysUserTokenServiceImpl.class</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─mapper</span><br><span class="line">│ │ │ ├─app</span><br><span class="line">│ │ │ │ UserDao.xml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─job</span><br><span class="line">│ │ │ │ ScheduleJobDao.xml</span><br><span class="line">│ │ │ │ ScheduleJobLogDao.xml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ ├─oss</span><br><span class="line">│ │ │ │ SysOssDao.xml</span><br><span class="line">│ │ │ │</span><br><span class="line">│ │ │ └─sys</span><br><span class="line">│ │ │ SysConfigDao.xml</span><br><span class="line">│ │ │ SysLogDao.xml</span><br><span class="line">│ │ │ SysMenuDao.xml</span><br><span class="line">│ │ │ SysRoleDao.xml</span><br><span class="line">│ │ │ SysRoleMenuDao.xml</span><br><span class="line">│ │ │ SysUserDao.xml</span><br><span class="line">│ │ │ SysUserRoleDao.xml</span><br><span class="line">│ │ │ SysUserTokenDao.xml</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─META-INF</span><br><span class="line">│ │ │ spring-configuration-metadata.json</span><br><span class="line">│ │ │</span><br><span class="line">│ │ └─static</span><br><span class="line">│ │ │ favicon.ico</span><br><span class="line">│ │ │</span><br><span class="line">│ │ └─swagger</span><br><span class="line">│ │ │ favicon-16x16.png</span><br><span class="line">│ │ │ favicon-32x32.png</span><br><span class="line">│ │ │ index.html</span><br><span class="line">│ │ │ index.yaml</span><br><span class="line">│ │ │ o2c.html</span><br><span class="line">│ │ │ oauth2-redirect.html</span><br><span class="line">│ │ │ swagger-ui-bundle.js</span><br><span class="line">│ │ │ swagger-ui-bundle.js.map</span><br><span class="line">│ │ │ swagger-ui-standalone-preset.js</span><br><span class="line">│ │ │ swagger-ui-standalone-preset.js.map</span><br><span class="line">│ │ │ swagger-ui.css</span><br><span class="line">│ │ │ swagger-ui.css.map</span><br><span class="line">│ │ │ swagger-ui.js</span><br><span class="line">│ │ │ swagger-ui.js.map</span><br><span class="line">│ │ │ swagger-ui.min.js</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─css</span><br><span class="line">│ │ │ print.css</span><br><span class="line">│ │ │ reset.css</span><br><span class="line">│ │ │ screen.css</span><br><span class="line">│ │ │ style.css</span><br><span class="line">│ │ │ typography.css</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─fonts</span><br><span class="line">│ │ │ DroidSans-Bold.ttf</span><br><span class="line">│ │ │ DroidSans.ttf</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─images</span><br><span class="line">│ │ │ collapse.gif</span><br><span class="line">│ │ │ expand.gif</span><br><span class="line">│ │ │ explorer_icons.png</span><br><span class="line">│ │ │ favicon-16x16.png</span><br><span class="line">│ │ │ favicon-32x32.png</span><br><span class="line">│ │ │ favicon.ico</span><br><span class="line">│ │ │ logo_small.png</span><br><span class="line">│ │ │ pet_store_api.png</span><br><span class="line">│ │ │ throbber.gif</span><br><span class="line">│ │ │ wordnik_api.png</span><br><span class="line">│ │ │</span><br><span class="line">│ │ ├─lang</span><br><span class="line">│ │ │ en.js</span><br><span class="line">│ │ │ translator.js</span><br><span class="line">│ │ │ zh-cn.js</span><br><span class="line">│ │ │</span><br><span class="line">│ │ └─lib</span><br><span class="line">│ │ backbone-min.js</span><br><span class="line">│ │ es5-shim.js</span><br><span class="line">│ │ handlebars-4.0.5.js</span><br><span class="line">│ │ highlight.9.1.0.pack.js</span><br><span class="line">│ │ highlight.9.1.0.pack_extended.js</span><br><span class="line">│ │ jquery-1.8.0.min.js</span><br><span class="line">│ │ jquery.ba-bbq.min.js</span><br><span class="line">│ │ jquery.slideto.min.js</span><br><span class="line">│ │ jquery.wiggle.min.js</span><br><span class="line">│ │ js-yaml.min.js</span><br><span class="line">│ │ jsoneditor.min.js</span><br><span class="line">│ │ lodash.min.js</span><br><span class="line">│ │ marked.js</span><br><span class="line">│ │ object-assign-pollyfill.js</span><br><span class="line">│ │ sanitize-html.min.js</span><br><span class="line">│ │ swagger-oauth.js</span><br><span class="line">│ │</span><br><span class="line">│ └─generated-sources</span><br><span class="line">│ └─annotations</span><br><span class="line">└─renren-generator</span><br><span class="line"> │ .gitignore</span><br><span class="line"> │ LICENSE</span><br><span class="line"> │ pom.xml</span><br><span class="line"> │ README.md</span><br><span class="line"> │ renren-generator.iml</span><br><span class="line"> │</span><br><span class="line"> ├─src</span><br><span class="line"> │ ├─main</span><br><span class="line"> │ │ ├─java</span><br><span class="line"> │ │ │ └─io</span><br><span class="line"> │ │ │ └─renren</span><br><span class="line"> │ │ │ │ RenrenApplicationGenerator.java</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ ├─adaptor</span><br><span class="line"> │ │ │ │ MongoTableInfoAdaptor.java</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ ├─config</span><br><span class="line"> │ │ │ │ DbConfig.java</span><br><span class="line"> │ │ │ │ MongoCondition.java</span><br><span class="line"> │ │ │ │ MongoConfig.java</span><br><span class="line"> │ │ │ │ MongoManager.java</span><br><span class="line"> │ │ │ │ MongoNullCondition.java</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ ├─controller</span><br><span class="line"> │ │ │ │ SysGeneratorController.java</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ ├─dao</span><br><span class="line"> │ │ │ │ GeneratorDao.java</span><br><span class="line"> │ │ │ │ MongoDBGeneratorDao.java</span><br><span class="line"> │ │ │ │ MySQLGeneratorDao.java</span><br><span class="line"> │ │ │ │ OracleGeneratorDao.java</span><br><span class="line"> │ │ │ │ PostgreSQLGeneratorDao.java</span><br><span class="line"> │ │ │ │ SQLServerGeneratorDao.java</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ ├─entity</span><br><span class="line"> │ │ │ │ │ ColumnEntity.java</span><br><span class="line"> │ │ │ │ │ TableEntity.java</span><br><span class="line"> │ │ │ │ │</span><br><span class="line"> │ │ │ │ └─mongo</span><br><span class="line"> │ │ │ │ MongoDefinition.java</span><br><span class="line"> │ │ │ │ MongoGeneratorEntity.java</span><br><span class="line"> │ │ │ │ Type.java</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ ├─factory</span><br><span class="line"> │ │ │ │ MongoDBCollectionFactory.java</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ ├─service</span><br><span class="line"> │ │ │ │ SysGeneratorService.java</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ └─utils</span><br><span class="line"> │ │ │ Constant.java</span><br><span class="line"> │ │ │ DateUtils.java</span><br><span class="line"> │ │ │ GenUtils.java</span><br><span class="line"> │ │ │ MongoScanner.java</span><br><span class="line"> │ │ │ PageUtils.java</span><br><span class="line"> │ │ │ Query.java</span><br><span class="line"> │ │ │ R.java</span><br><span class="line"> │ │ │ RRException.java</span><br><span class="line"> │ │ │ RRExceptionHandler.java</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ └─resources</span><br><span class="line"> │ │ │ application.yml</span><br><span class="line"> │ │ │ generator.properties</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─mapper</span><br><span class="line"> │ │ │ MySQLGeneratorDao.xml</span><br><span class="line"> │ │ │ OracleGeneratorDao.xml</span><br><span class="line"> │ │ │ PostgreSQLGeneratorDao.xml</span><br><span class="line"> │ │ │ SQLServerGeneratorDao.xml</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─static</span><br><span class="line"> │ │ │ │ favicon.ico</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ ├─css</span><br><span class="line"> │ │ │ │ AdminLTE.min.css</span><br><span class="line"> │ │ │ │ all-skins.min.css</span><br><span class="line"> │ │ │ │ bootstrap.min.css</span><br><span class="line"> │ │ │ │ font-awesome.min.css</span><br><span class="line"> │ │ │ │ main.css</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ ├─fonts</span><br><span class="line"> │ │ │ │ fontawesome-webfont.eot</span><br><span class="line"> │ │ │ │ fontawesome-webfont.svg</span><br><span class="line"> │ │ │ │ fontawesome-webfont.ttf</span><br><span class="line"> │ │ │ │ fontawesome-webfont.woff</span><br><span class="line"> │ │ │ │ fontawesome-webfont.woff2</span><br><span class="line"> │ │ │ │ FontAwesome.otf</span><br><span class="line"> │ │ │ │ glyphicons-halflings-regular.eot</span><br><span class="line"> │ │ │ │ glyphicons-halflings-regular.svg</span><br><span class="line"> │ │ │ │ glyphicons-halflings-regular.ttf</span><br><span class="line"> │ │ │ │ glyphicons-halflings-regular.woff</span><br><span class="line"> │ │ │ │ glyphicons-halflings-regular.woff2</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ ├─js</span><br><span class="line"> │ │ │ │ common.js</span><br><span class="line"> │ │ │ │ generator.js</span><br><span class="line"> │ │ │ │ index.js</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ ├─libs</span><br><span class="line"> │ │ │ │ app.js</span><br><span class="line"> │ │ │ │ app.min.js</span><br><span class="line"> │ │ │ │ bootstrap.min.js</span><br><span class="line"> │ │ │ │ fastclick.min.js</span><br><span class="line"> │ │ │ │ jquery.min.js</span><br><span class="line"> │ │ │ │ jquery.slimscroll.min.js</span><br><span class="line"> │ │ │ │ router.js</span><br><span class="line"> │ │ │ │ vue.min.js</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ └─plugins</span><br><span class="line"> │ │ │ ├─jqgrid</span><br><span class="line"> │ │ │ │ grid.locale-cn.js</span><br><span class="line"> │ │ │ │ jquery.jqGrid.min.js</span><br><span class="line"> │ │ │ │ ui.jqgrid-bootstrap-ui.css</span><br><span class="line"> │ │ │ │ ui.jqgrid-bootstrap.css</span><br><span class="line"> │ │ │ │ ui.jqgrid.css</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ └─layer</span><br><span class="line"> │ │ │ │ layer.js</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ ├─mobile</span><br><span class="line"> │ │ │ │ │ layer.js</span><br><span class="line"> │ │ │ │ │</span><br><span class="line"> │ │ │ │ └─need</span><br><span class="line"> │ │ │ │ layer.css</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ └─skin</span><br><span class="line"> │ │ │ ├─default</span><br><span class="line"> │ │ │ │ icon-ext.png</span><br><span class="line"> │ │ │ │ icon.png</span><br><span class="line"> │ │ │ │ layer.css</span><br><span class="line"> │ │ │ │ loading-0.gif</span><br><span class="line"> │ │ │ │ loading-1.gif</span><br><span class="line"> │ │ │ │ loading-2.gif</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ └─moon</span><br><span class="line"> │ │ │ default.png</span><br><span class="line"> │ │ │ style.css</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─template</span><br><span class="line"> │ │ │ add-or-update.vue.vm</span><br><span class="line"> │ │ │ Controller.java.vm</span><br><span class="line"> │ │ │ Dao.java.vm</span><br><span class="line"> │ │ │ Dao.xml.vm</span><br><span class="line"> │ │ │ Entity.java.vm</span><br><span class="line"> │ │ │ index.vue.vm</span><br><span class="line"> │ │ │ menu.sql.vm</span><br><span class="line"> │ │ │ MongoChildrenEntity.java.vm</span><br><span class="line"> │ │ │ MongoEntity.java.vm</span><br><span class="line"> │ │ │ Service.java.vm</span><br><span class="line"> │ │ │ ServiceImpl.java.vm</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ └─views</span><br><span class="line"> │ │ generator.html</span><br><span class="line"> │ │ index.html</span><br><span class="line"> │ │ main.html</span><br><span class="line"> │ │</span><br><span class="line"> │ └─test</span><br><span class="line"> │ └─java</span><br><span class="line"> │ └─io</span><br><span class="line"> │ └─renren</span><br><span class="line"> │ RenrenApplicationTests.java</span><br><span class="line"> │</span><br><span class="line"> └─target</span><br><span class="line"> ├─classes</span><br><span class="line"> │ │ application.yml</span><br><span class="line"> │ │ generator.properties</span><br><span class="line"> │ │</span><br><span class="line"> │ ├─io</span><br><span class="line"> │ │ └─renren</span><br><span class="line"> │ │ │ RenrenApplicationGenerator.class</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─adaptor</span><br><span class="line"> │ │ │ MongoTableInfoAdaptor.class</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─config</span><br><span class="line"> │ │ │ DbConfig.class</span><br><span class="line"> │ │ │ MongoCondition.class</span><br><span class="line"> │ │ │ MongoConfig.class</span><br><span class="line"> │ │ │ MongoManager.class</span><br><span class="line"> │ │ │ MongoNullCondition.class</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─controller</span><br><span class="line"> │ │ │ SysGeneratorController.class</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─dao</span><br><span class="line"> │ │ │ GeneratorDao.class</span><br><span class="line"> │ │ │ MongoDBGeneratorDao.class</span><br><span class="line"> │ │ │ MySQLGeneratorDao.class</span><br><span class="line"> │ │ │ OracleGeneratorDao.class</span><br><span class="line"> │ │ │ PostgreSQLGeneratorDao.class</span><br><span class="line"> │ │ │ SQLServerGeneratorDao.class</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─entity</span><br><span class="line"> │ │ │ │ ColumnEntity.class</span><br><span class="line"> │ │ │ │ TableEntity.class</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ └─mongo</span><br><span class="line"> │ │ │ MongoDefinition.class</span><br><span class="line"> │ │ │ MongoGeneratorEntity.class</span><br><span class="line"> │ │ │ Type.class</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─factory</span><br><span class="line"> │ │ │ MongoDBCollectionFactory.class</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─service</span><br><span class="line"> │ │ │ SysGeneratorService.class</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ └─utils</span><br><span class="line"> │ │ Constant.class</span><br><span class="line"> │ │ DateUtils.class</span><br><span class="line"> │ │ GenUtils.class</span><br><span class="line"> │ │ MongoScanner$ForkJoinGetProcessName.class</span><br><span class="line"> │ │ MongoScanner$ForkJoinProcessType.class</span><br><span class="line"> │ │ MongoScanner.class</span><br><span class="line"> │ │ PageUtils.class</span><br><span class="line"> │ │ Query.class</span><br><span class="line"> │ │ R.class</span><br><span class="line"> │ │ RRException.class</span><br><span class="line"> │ │ RRExceptionHandler.class</span><br><span class="line"> │ │</span><br><span class="line"> │ ├─mapper</span><br><span class="line"> │ │ MySQLGeneratorDao.xml</span><br><span class="line"> │ │ OracleGeneratorDao.xml</span><br><span class="line"> │ │ PostgreSQLGeneratorDao.xml</span><br><span class="line"> │ │ SQLServerGeneratorDao.xml</span><br><span class="line"> │ │</span><br><span class="line"> │ ├─static</span><br><span class="line"> │ │ │ favicon.ico</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─css</span><br><span class="line"> │ │ │ AdminLTE.min.css</span><br><span class="line"> │ │ │ all-skins.min.css</span><br><span class="line"> │ │ │ bootstrap.min.css</span><br><span class="line"> │ │ │ font-awesome.min.css</span><br><span class="line"> │ │ │ main.css</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─fonts</span><br><span class="line"> │ │ │ fontawesome-webfont.eot</span><br><span class="line"> │ │ │ fontawesome-webfont.svg</span><br><span class="line"> │ │ │ fontawesome-webfont.ttf</span><br><span class="line"> │ │ │ fontawesome-webfont.woff</span><br><span class="line"> │ │ │ fontawesome-webfont.woff2</span><br><span class="line"> │ │ │ FontAwesome.otf</span><br><span class="line"> │ │ │ glyphicons-halflings-regular.eot</span><br><span class="line"> │ │ │ glyphicons-halflings-regular.svg</span><br><span class="line"> │ │ │ glyphicons-halflings-regular.ttf</span><br><span class="line"> │ │ │ glyphicons-halflings-regular.woff</span><br><span class="line"> │ │ │ glyphicons-halflings-regular.woff2</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─js</span><br><span class="line"> │ │ │ common.js</span><br><span class="line"> │ │ │ generator.js</span><br><span class="line"> │ │ │ index.js</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─libs</span><br><span class="line"> │ │ │ app.js</span><br><span class="line"> │ │ │ app.min.js</span><br><span class="line"> │ │ │ bootstrap.min.js</span><br><span class="line"> │ │ │ fastclick.min.js</span><br><span class="line"> │ │ │ jquery.min.js</span><br><span class="line"> │ │ │ jquery.slimscroll.min.js</span><br><span class="line"> │ │ │ router.js</span><br><span class="line"> │ │ │ vue.min.js</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ └─plugins</span><br><span class="line"> │ │ ├─jqgrid</span><br><span class="line"> │ │ │ grid.locale-cn.js</span><br><span class="line"> │ │ │ jquery.jqGrid.min.js</span><br><span class="line"> │ │ │ ui.jqgrid-bootstrap-ui.css</span><br><span class="line"> │ │ │ ui.jqgrid-bootstrap.css</span><br><span class="line"> │ │ │ ui.jqgrid.css</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ └─layer</span><br><span class="line"> │ │ │ layer.js</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ ├─mobile</span><br><span class="line"> │ │ │ │ layer.js</span><br><span class="line"> │ │ │ │</span><br><span class="line"> │ │ │ └─need</span><br><span class="line"> │ │ │ layer.css</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ └─skin</span><br><span class="line"> │ │ ├─default</span><br><span class="line"> │ │ │ icon-ext.png</span><br><span class="line"> │ │ │ icon.png</span><br><span class="line"> │ │ │ layer.css</span><br><span class="line"> │ │ │ loading-0.gif</span><br><span class="line"> │ │ │ loading-1.gif</span><br><span class="line"> │ │ │ loading-2.gif</span><br><span class="line"> │ │ │</span><br><span class="line"> │ │ └─moon</span><br><span class="line"> │ │ default.png</span><br><span class="line"> │ │ style.css</span><br><span class="line"> │ │</span><br><span class="line"> │ ├─template</span><br><span class="line"> │ │ add-or-update.vue.vm</span><br><span class="line"> │ │ Controller.java.vm</span><br><span class="line"> │ │ Dao.java.vm</span><br><span class="line"> │ │ Dao.xml.vm</span><br><span class="line"> │ │ Entity.java.vm</span><br><span class="line"> │ │ index.vue.vm</span><br><span class="line"> │ │ menu.sql.vm</span><br><span class="line"> │ │ MongoChildrenEntity.java.vm</span><br><span class="line"> │ │ MongoEntity.java.vm</span><br><span class="line"> │ │ Service.java.vm</span><br><span class="line"> │ │ ServiceImpl.java.vm</span><br><span class="line"> │ │</span><br><span class="line"> │ └─views</span><br><span class="line"> │ generator.html</span><br><span class="line"> │ index.html</span><br><span class="line"> │ main.html</span><br><span class="line"> │</span><br><span class="line"> └─generated-sources</span><br><span class="line"> └─annotations</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h1 id="四-项目前置知识"><a href="#四-项目前置知识" class="headerlink" title="四.项目前置知识"></a>四.项目前置知识</h1><h2 id="1-SpringCloud-Alibaba"><a href="#1-SpringCloud-Alibaba" class="headerlink" title="1.SpringCloud Alibaba"></a>1.SpringCloud Alibaba</h2><h3 id="1-1简介"><a href="#1-1简介" class="headerlink" title="1.1简介"></a>1.1简介</h3><pre><code>SpringCloud Alibaba致力于提供微服务开发的一站式解决方案。此项目包含开发分布式应用微服务必须的组件方便开发者通过SpringCloud编程模型轻松使用这些组件来开发分布式的应用服务。
依托SpringCloud Alibaba你只需要添加一些注解和少量的配置就可以将SpringCloud应用接入阿里微服务解决方案通过阿里中间件来迅速搭建分布式应用系统。
</code></pre>
<p>github的地址:<a href="https://github.com/alibaba/spring-cloud-alibaba">https://github.com/alibaba/spring-cloud-alibaba</a></p>
<h3 id="1-2为什么使用SpringCloud-Alibaba"><a href="#1-2为什么使用SpringCloud-Alibaba" class="headerlink" title="1.2为什么使用SpringCloud Alibaba"></a>1.2为什么使用SpringCloud Alibaba</h3><p><strong>SpringCloud的不足:</strong></p>
<ul>
<li>部分组件停止维护,给开发带来不便</li>
<li>环境搭建复杂,没有完善的可视化界面,需要大量的二次开发和定制</li>
<li>配置复杂,难以上手,部分配置差别难以区分和合理应用</li>
</ul>
<p><strong>SpringCloud Alibaba的优势:</strong></p>
<p>阿里使用过的组件经历了考验,性能强悍,设计合理,开源成套的搭配和可视化的界面给开发带来极大的便利,搭建简单,学习成本低。</p>
<h3 id="1-3-SpringCloud-Alibaba最终的技术搭配方案"><a href="#1-3-SpringCloud-Alibaba最终的技术搭配方案" class="headerlink" title="1.3 SpringCloud Alibaba最终的技术搭配方案"></a>1.3 SpringCloud Alibaba最终的技术搭配方案</h3><p><strong>SpringCloud Alibaba - Nacos :注册中心(服务发现&#x2F;注册)</strong></p>
<p><strong>SpringCloud Alibaba - Nacos :配置中心(动态的配置管理)</strong></p>
<p><strong>SpringCloud - Ribbon: 负载均衡</strong></p>
<p><strong>SpringCloud - Feign: 声明式HTTP客户端远程调用服务&#x2F;服务调用)</strong></p>
<p><strong>SpringCloud Alibaba - Sentinel服务容错限流、降级、熔断</strong></p>
<p><strong>SpringCloud - Gateway: API网关webflux编程模式</strong></p>
<p><strong>SpringCloud - Sleuth调用链监控</strong></p>
<p><strong>SpringCloud Alibaba - Seata原Fescar即分布式事务解决方案</strong></p>
<img src="/pictures/image-20230519161707857.png" alt="image-20230519161707857" style="zoom:150%;" />
<h3 id="1-4-项目中使用SpringCloud-Alibaba"><a href="#1-4-项目中使用SpringCloud-Alibaba" class="headerlink" title="1.4 项目中使用SpringCloud Alibaba"></a>1.4 项目中使用SpringCloud Alibaba</h3><p>在common模块中添加如下的依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependencyManagement</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependencies</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.alibaba.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-alibaba-dependencies<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.2.0.RELEASE<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">type</span>&gt;</span>pom<span class="tag">&lt;/<span class="name">type</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">scope</span>&gt;</span>import<span class="tag">&lt;/<span class="name">scope</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">dependencies</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependencyManagement</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="1-5-SpringCloud-Alibaba的组件"><a href="#1-5-SpringCloud-Alibaba的组件" class="headerlink" title="1.5 SpringCloud Alibaba的组件"></a>1.5 SpringCloud Alibaba的组件</h3><h4 id="1-Nacos注册中心"><a href="#1-Nacos注册中心" class="headerlink" title="1.Nacos注册中心"></a>1.Nacos注册中心</h4><img src="/pictures/image-20230519162859782.png" alt="image-20230519162859782" style="zoom:150%;" />
<p><strong>简介</strong></p>
<p>Nacos 是阿里巴巴推出来的一个新开源项目,这是一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台。</p>
<p>Nacos 致力于帮助您发现、配置和管理微服务。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据及流量管理。</p>
<p>Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。 Nacos 是构建以“服务”为中心的现代应用架构 (例如微服务范式、云原生范式) 的服务基础设施</p>
<p><strong>Nacos 支持如下核心特性</strong></p>
<p>1服务发现 支持 DNS 与 RPC 服务发现,也提供原生 SDK 、OpenAPI 等多种服务注册方式和 DNS、HTTP 与 API 等多种服务发现方式。<br>2服务健康监测 Nacos 提供对服务的实时的健康检查,阻止向不健康的主机或服务实例发送请求。<br>3动态配置服务 Nacos 提供配置统一管理功能,能够帮助我们将配置以中心化、外部化和动态化的方式管理所有环境的应用配置和服务配置。<br>4动态 DNS 服务: Nacos 支持动态 DNS 服务权重路由,能够让我们很容易地实现中间层负载均衡、更灵活的路由策略、流量控制以及数据中心内网的简单 DNS 解析服务。<br>5服务及其元数据管理 Nacos 支持从微服务平台建设的视角管理数据中心的所有服务及元数据,包括管理服务的描述、生命周期、服务的静态依赖分析、服务的健康状态、服务的流量管理、路由及安全策略、服务的 SLA 以及最首要的 metrics 统计数据。</p>
<p><strong>使用nacos</strong></p>
<p>使用之前需要下载nacos并启动nacos的服务</p>
<p><img src="/pictures/image-20230519164012950.png" alt="image-20230519164012950"></p>
<p>在common工程中添加依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.alibaba.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-alibaba-nacos-discovery<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>配置中心中配置Nacos的地址</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">application:</span></span><br><span class="line"> <span class="attr">name:</span> <span class="string">gulimall-coupon</span> <span class="comment">#指定服务的名字,指定了名字才能注册到注册中心中</span></span><br><span class="line"> <span class="attr">cloud:</span></span><br><span class="line"> <span class="attr">nacos:</span></span><br><span class="line"> <span class="attr">server-addr:</span> <span class="number">127.0</span><span class="number">.0</span><span class="number">.1</span><span class="string">:8848</span> <span class="comment">#指定注册中心的地址信息</span></span><br></pre></td></tr></table></figure>
<p>在每个启动类上使用注解开启服务的注册与发现功能</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//开启服务的注册与发现功能</span></span><br><span class="line"><span class="meta">@EnableDiscoveryClient</span></span><br></pre></td></tr></table></figure>
<p>查看注册服务列表</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">通过访问: http://localhost:8848/nacos</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230519165606784.png" alt="image-20230519165606784"></p>
<h4 id="2-Feign声明式远程调用"><a href="#2-Feign声明式远程调用" class="headerlink" title="2.Feign声明式远程调用"></a>2.Feign声明式远程调用</h4><p><strong>简介</strong></p>
<pre><code>Feign是一个声明式的HTTP客户端它的目的是让远程调用变得更简单。Feign提供了HTTP请求的模板通过**编写简单的接口和插入注解**就可以定义好HTTP请求的参数、格式、地址等信息。
Feign整合了Ribbon负载均衡和Hystrix服务熔断可以让我们不再需要显式的使用这两个组件。
</code></pre>
<p><strong>使用</strong></p>
<p>引入依赖,每个模块都需要引入这个依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"> <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-openfeign<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>编写代码测试远程调用,这里我们以用户模块调用优惠卷模块来获取用户的拥有的优惠卷为例来测试远程调用。</p>
<p><em><strong>会员模块提供获取用户名下优惠卷的方法</strong></em></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 获取用户明名下的优惠卷</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;member/list&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">membercoupons</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="type">CouponEntity</span> <span class="variable">couponEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">CouponEntity</span>();</span><br><span class="line"> couponEntity.setCouponName(<span class="string">&quot;满一百减五十&quot;</span>);</span><br><span class="line"> <span class="keyword">return</span> R.ok().put(<span class="string">&quot;coupons&quot;</span>,Arrays.asList(couponEntity));</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><em><strong>用户模块远程调用优惠卷模块</strong></em></p>
<p>远程调用别的服务端步骤</p>
<ol>
<li><p>引入open-feign的依赖</p>
</li>
<li><p>调用端编写一个接口告诉SpringCloud这个接口需要调用远程服务</p>
<p>声明接口的每一个方法都是调用哪个远程服务的那个请求</p>
</li>
<li><p>开启远程调用的功能,在调用端的启动类上添加**@EnableFeignClients**注解</p>
</li>
</ol>
<p><em><strong>在用户模块创建一个Feign包(维护的时候见名知义),声明调用的接口,在启动类上添加注解</strong></em></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//注解</span></span><br><span class="line"><span class="comment">//basePackages声明的远程调用的接口所在的包</span></span><br><span class="line"><span class="meta">@EnableFeignClients(basePackages = &quot;com.atguigu.gulimall.member.feign&quot;)</span></span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.member.feign;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.atguigu.common.utils.R;</span><br><span class="line"><span class="keyword">import</span> org.springframework.cloud.openfeign.FeignClient;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestMapping;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/19</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 远程调用优惠卷服务</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@FeignClient(&quot;gulimall-coupon&quot;)</span><span class="comment">//告诉springCloud这是一个远程客户端并指定要调用服务的服务名</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">interface</span> <span class="title class_">CouponFeignService</span> &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 这里需要写全路径</span></span><br><span class="line"><span class="comment"> * 远程调用优惠卷模块中获取优惠卷信息的方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@RequestMapping(&quot;/coupon/coupon/member/list&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> R <span class="title function_">membercoupons</span><span class="params">()</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><em><strong>测试远程调用</strong></em></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Autowired</span></span><br><span class="line"><span class="keyword">private</span> CouponFeignService couponFeignService;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 测试远程调用优惠卷模块的服务</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/coupons&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">test</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="type">MemberEntity</span> <span class="variable">memberEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">MemberEntity</span>();</span><br><span class="line"> memberEntity.setNickname(<span class="string">&quot;张三&quot;</span>);</span><br><span class="line"> <span class="type">R</span> <span class="variable">membercoupons</span> <span class="operator">=</span> couponFeignService.membercoupons();</span><br><span class="line"> <span class="keyword">return</span> R.ok().put(<span class="string">&quot;member&quot;</span>, memberEntity).put(<span class="string">&quot;coupons&quot;</span>, membercoupons.get(<span class="string">&quot;coupons&quot;</span>));</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>测试的时候出现的小问题</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc</span></span><br><span class="line"><span class="comment">出现这个问题是没有loadbalanc,但是nacos中ribbon会造成loadbalanc包失效,在common的pom中的依赖改成如下的依赖--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.alibaba.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-alibaba-nacos-discovery<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">exclusions</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">exclusion</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-netflix-ribbon<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">exclusion</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">exclusions</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-loadbalancer<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.2.2.RELEASE<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>处理完上面的报错之后,浏览器访问 <a href="http://localhost:8000/member/member/coupons">http://localhost:8000/member/member/coupons</a> ,显示如下的内容,说明远程调用成功</p>
<p><img src="/pictures/image-20230519210917423.png" alt="image-20230519210917423"></p>
<h4 id="3-Nacos配置中心"><a href="#3-Nacos配置中心" class="headerlink" title="3.Nacos配置中心"></a>3.Nacos配置中心</h4><p><strong>简介</strong></p>
<p>简介见上面的nacos注册中心这里的Nacos配置中心和上面的nacos注册中心是同一个东西</p>
<p><strong>使用</strong></p>
<p>1.在common中引入nacos配置中心的依赖和上面的注册中心的依赖不一样</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.alibaba.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-alibaba-nacos-config<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>2.给需要配置中心管理的模块下创建配置文件<strong>bootstrap.properties</strong>这个文件会优先于application.properties读取</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment">#服务名</span></span><br><span class="line"><span class="attr">spring.application.name</span>=<span class="string">gulimall-coupon</span></span><br><span class="line"><span class="comment">#Nacos配置中心的地址的地址</span></span><br><span class="line"><span class="comment">#注意看这里多了一个config和模块中nacos的地址还是有区别的</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.server-addr</span>=<span class="string">127.0.0.1:8848</span></span><br></pre></td></tr></table></figure>
<p>3.测试</p>
<p>3.1.在application.properties配置文件中添加如下的配置</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="attr">coupon.user.name</span>=<span class="string">zhansan</span></span><br><span class="line"><span class="attr">coupon.user.age</span>=<span class="string">18</span></span><br></pre></td></tr></table></figure>
<p>3.2 编写接口并访问测试</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 获取配置文件中的配置信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Value(&quot;$&#123;user.name&#125;&quot;)</span></span><br><span class="line"><span class="keyword">private</span> String name;</span><br><span class="line"><span class="meta">@Value(&quot;$&#123;user.age&#125;&quot;)</span></span><br><span class="line"><span class="keyword">private</span> Integer age;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 测试优先获取哪个配置文件的值</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/test&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">test</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> R.ok().put(<span class="string">&quot;name&quot;</span>,name).put(<span class="string">&quot;age&quot;</span>,age);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>测试的结果如下:</p>
<img src="/pictures/image-20230519213945320.png" alt="image-20230519213945320" style="zoom: 200%;" />
<p>3.3 需求:应用不重启,实时的修改配置文件中的值</p>
<p>3.3.1 在Nacos配置中心中创建一个名为 <strong>应用名.properties</strong>(例如:gulimall-coupon.properties 的配置文件</p>
<p>进入nacos管理的可视化页面点击<strong>配置列表</strong>,点击 <strong>+</strong> ,新建一个配置 同时将配置文件中name值改为lihua</p>
<p><img src="/pictures/image-20230519215420623.png" alt="image-20230519215420623"></p>
<p>发布之后,就可以在配置列表中看到这个配置了</p>
<p><img src="/pictures/image-20230519215232782.png" alt="image-20230519215232782"></p>
<p>重启项目测试,配置中心的配置是否生效</p>
<p>没有生效的话添加这个依赖springBoot2.4以上的版本需要</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-bootstrap<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>4.0.1<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>生效的话这时刷新页面可以看到name已经由zhangsan变成lihua了</p>
<img src="/pictures/image-20230519220357933.png" alt="image-20230519220357933" style="zoom:150%;" />
<p>3.3.2 想让配置文件实时生效的话,这时我们还要添加以下的注解,然后重启应用,让注解生效</p>
<p>注意: <strong>@RefreshScope</strong> 这里的注解添加在<strong>Controller</strong>上,不是添加在启动类上</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//给需要配置中心统一配置的模块的Controller上上添加@RefreshScope的注解</span></span><br><span class="line"><span class="meta">@RefreshScope</span></span><br></pre></td></tr></table></figure>
<p><strong>最终测试</strong></p>
<p>这时我们在配置中心中修改配置并发布,这些配置就可以实时的生效了</p>
<p>我们在配置中心修改name和age的值并发布</p>
<p><img src="/pictures/image-20230519220922701.png" alt="image-20230519220922701"></p>
<p>这时刷新请求接口的页面,我们可以看到页面中的数据发生了实时的变化</p>
<img src="/pictures/image-20230519223403139.png" alt="image-20230519223403139" style="zoom:150%;" />
<p><strong>总结</strong></p>
<p>实现nacos配置中心统一配置的流程</p>
<ol>
<li><p>引入依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.alibaba.cloud<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-cloud-starter-alibaba-nacos-config<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure></li>
<li><p>创建一个bootstrap.properties的配置文件添加如下的内容:</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment">#服务名</span></span><br><span class="line"><span class="attr">spring.application.name</span>=<span class="string">gulimall-coupon</span></span><br><span class="line"><span class="comment">#Nacos配置中心的地址</span></span><br><span class="line"><span class="comment">#注意看这里多了一个config和模块中nacos的地址还是有区别的</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.server-addr</span>=<span class="string">127.0.0.1:8848</span></span><br></pre></td></tr></table></figure></li>
<li><p>需要给配置中心中新建一个数据集(Data Id)为 <strong>应用名.properties</strong>(例如:gulimall-coupon.properties的配置。默认规则: 应用名.properties</p>
</li>
<li><p>给 应用名.properties 添加任何配置 这些配置都可以在配置中心配置生效</p>
</li>
<li><p>在Controller上添加**@RefreshScope**注解就可以实时的动态刷新配置,配置中心更新了配置并发布了之后,配置实时的生效。</p>
</li>
</ol>
<p><strong>注意</strong></p>
<p><em>如果配置中心和当前应用的配置文件都配置了相同的项,优先使用配置中心的配置</em></p>
<p><strong>细节</strong></p>
<p><strong>命名空间:</strong> 配置隔离</p>
<p>默认public保留空间</p>
<p>1.可以分别设置开发、测试、生产环境的命名空间,不同的环境下使用不同的命名空间中的配置</p>
<p>通过命令空间实现环境隔离</p>
<p>在<strong>bootstrap.properties</strong>设置使用哪个命名空间,可以在配置文件中添加如下的配置</p>
<p><img src="/pictures/image-20230519225637848.png" alt="image-20230519225637848"></p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment"># 切换名称空间</span></span><br><span class="line"><span class="comment"># 可以选择对应的命名空间 # 写上对应环境的命名空间ID</span></span><br><span class="line"><span class="comment"># 使用唯一的命名空间ID</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.namespace</span>=<span class="string">8a84e478-92d0-4581-a316-b0274fc76eb8</span></span><br></pre></td></tr></table></figure>
<p>2.可以为每一个微服务可以创建自己的命名空间,让每个服务的配置放在每个服务的命名空间下</p>
<p><strong>配置集:</strong>所有的配置的集合</p>
<p><strong>配置集ID:</strong> 类似文件名</p>
<pre><code>Data Id: 就是配置集ID
</code></pre>
<p><strong>配置分组:</strong></p>
<p>默认所有的配置集都属于 : DEFAULT_GROUP</p>
<p>例如在<strong>生产环境的命名空间</strong>下,淘宝的<strong>配置分组</strong>有以下几个: 双十一688平时</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment">#指定配置分组</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.group</span>=<span class="string">1111</span></span><br></pre></td></tr></table></figure>
<p><strong>Tips同一个命名空间下可能会有不同的配置分组</strong></p>
<p><strong>每个微服务创建自己的命令空间,使用配置分组区分环境 dev、test、prod</strong></p>
<p><em><strong>从配置中心中读取多个配置集(配置文件):</strong></em></p>
<p>可以在bootstrap.properties添加以下的配置</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment">#第一个配置文件</span></span><br><span class="line"><span class="comment">#配置文件名</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.ext-config[0].data-id</span>=<span class="string">datasource.yml </span></span><br><span class="line"><span class="comment">#配置文件的对应的配置分组</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.ext-config[0].group</span>=<span class="string">dev</span></span><br><span class="line"><span class="comment">#是否动态的刷新</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.ext-config[0].refresh</span>=<span class="string">true</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">#第二个配置文件</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.ext-config[1].data-id</span>=<span class="string">mybatis.yml</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.ext-config[1].group</span>=<span class="string">dev</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.ext-config[1].refresh</span>=<span class="string">true</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">#第三个配置文件</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.ext-config[2].data-id</span>=<span class="string">others.yml</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.ext-config[2].group</span>=<span class="string">dev</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.ext-config[2].refresh</span>=<span class="string">true</span></span><br></pre></td></tr></table></figure>
<p><strong>总结:</strong></p>
<p>1.微服务的任何配置信息,任何配置文件都可以放在配置中心中</p>
<p>2.加载配置中心的哪些配置文件只需要在bootstrap.properties说明加载哪些配置文件即可</p>
<p>3.如果配置中心和当前应用的配置文件都配置了相同的项,优先使用配置中心的配置</p>
<h4 id="4-Gateway网关"><a href="#4-Gateway网关" class="headerlink" title="4.Gateway网关"></a>4.Gateway网关</h4><img src="/pictures/image-20230519233741029.png" alt="image-20230519233741029" style="zoom:150%;" />
<p><strong>简介</strong></p>
<pre><code>网关最为流量的入口,常用的功能包括**路由转发**、**权限校验**、**限流控制**等。SpringCloud gateway是springcloud官方提供的第二代网关框架取代了Zull网关。
</code></pre>
<p><strong>网关的功能</strong></p>
<ul>
<li>针对所有请求进行登陆<strong>统一鉴权(登录态)</strong>、<strong>限流</strong>、<strong>缓存</strong>、<strong>日志(用户打点)</strong>。</li>
<li>可以根据不同的请求路径pattern来进行请求的鉴权、转发、和拒绝。</li>
<li><strong>协议转化</strong>。针对后段多种不同的协议在网关层统一处理后以HTTP对外提供服务。</li>
<li>提供<strong>统一的错误码</strong>。</li>
<li>请求转发,并且可以基于网关实现<strong>内网与外网的隔离</strong>。</li>
</ul>
<p><strong>使用</strong></p>
<ol>
<li><p>创建一个springboot initializr的工程 勾选上Gateway的依赖</p>
</li>
<li><p>在网关模块的pom.xml文件中添加上对common工程的依赖</p>
</li>
<li><p>在网关的启动类上添加上**@EnableDiscoveryClient**的注解,把网关注册到注册中心</p>
</li>
<li><p>配置nacos的地址和服务名信息</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment">#配置网关的地址</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.server-addr</span>=<span class="string">127.0.0.1:8848</span></span><br><span class="line"><span class="comment">#服务名</span></span><br><span class="line"><span class="attr">spring.application.name</span>=<span class="string">gulimall-gateway</span></span><br></pre></td></tr></table></figure></li>
<li><p>创建<strong>bootstrap.properties</strong>配置文件将网关模块的配置通过交给nacos配置中心管理</p>
<p><img src="/pictures/image-20230520205015056.png" alt="image-20230520205015056"></p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring.application.name</span>=<span class="string">gulimall-gateway</span></span><br><span class="line"><span class="comment">#配置配置中心的地址</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.server-addr</span>=<span class="string">127.0.0.1:8848</span></span><br><span class="line"><span class="comment">#名称空间</span></span><br><span class="line"><span class="attr">spring.cloud.nacos.config.namespace</span>=<span class="string">4a8e80ba-3d3c-40ef-897f-d400797c4676</span></span><br></pre></td></tr></table></figure></li>
<li><p>启动测试</p>
<p>启动之后出现的问题及解决方案:</p>
<p><strong>a</strong>.单元测试@Test注解爆红,是我们更换了springboot的版本的原因删除爆红的地方重新导包即可</p>
<p><strong>b</strong>.数据库相关的报错,是因为网关中没有使用数据库,就没有配置数据库的配置,我们通过@SpringBootApplication(exclude &#x3D; {DataSourceAutoConfiguration.class})解决。</p>
</li>
<li><p>转发测试</p>
<p><strong>测试案例:</strong>我们在浏览器的地址栏输入localhost:88?url&#x3D;baidu就给我们转发到百度,输入localhost:88?url&#x3D;qq就给我们转发到腾讯qq</p>
<p><strong>实现:</strong>创建一个yml的配置文件在配置文件中添加如下的配置</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">cloud:</span></span><br><span class="line"> <span class="attr">gateway:</span></span><br><span class="line"> <span class="attr">routes:</span></span><br><span class="line"> <span class="comment"># 路由的唯一id</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">id:</span> <span class="string">baidu_route</span></span><br><span class="line"> <span class="attr">uri:</span> <span class="string">https://www.baidu.com</span></span><br><span class="line"> <span class="comment"># 断言什么时候去上面那个url</span></span><br><span class="line"> <span class="attr">predicates:</span></span><br><span class="line"> <span class="comment"># 下面的这句话的意思是如果请求中存在请求参数url=baidu我们就去 https://www.baidu.com这个url</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">Query=url,baidu</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">id:</span> <span class="string">qq_route</span></span><br><span class="line"> <span class="attr">uri:</span> <span class="string">https://www.qq.com</span></span><br><span class="line"> <span class="attr">predicates:</span></span><br><span class="line"> <span class="comment"># 下面的这句话的意思是如果请求中存在请求参数url=qq我们就去 https://www.qq.com这个url</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">Query=url,qq</span></span><br></pre></td></tr></table></figure>
<img src="/pictures/image-20230520212001874.png" alt="image-20230520212001874" style="zoom:150%;" /></li>
</ol>
<h2 id="2-前端开发的基础知识"><a href="#2-前端开发的基础知识" class="headerlink" title="2.前端开发的基础知识"></a>2.前端开发的基础知识</h2><p><strong><a href="https://qingling.icu/posts/432.html">前端基础知识 | The Blog (qingling.icu)</a></strong></p>
<p><strong>前后端技术类比</strong></p>
<p><img src="/pictures/image-20230520212351174.png" alt="image-20230520212351174"></p>
<h1 id="五-基础篇程序设计"><a href="#五-基础篇程序设计" class="headerlink" title="五.基础篇程序设计"></a>五.基础篇程序设计</h1><p><strong>提示</strong>:所有的API路径一定要和老师的一样不然在后面会吃亏!!!</p>
<h2 id="1-商品服务"><a href="#1-商品服务" class="headerlink" title="1.商品服务"></a>1.商品服务</h2><h3 id="1-1-三级分类"><a href="#1-1-三级分类" class="headerlink" title="1.1 三级分类"></a>1.1 三级分类</h3><h4 id="1-1-1-查询-递归树形结构数据获取"><a href="#1-1-1-查询-递归树形结构数据获取" class="headerlink" title="1.1.1 查询-递归树形结构数据获取"></a>1.1.1 查询-递归树形结构数据获取</h4><p><strong>controller</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查询所有的分类以及子分类,以树形结构组装起来</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@RequestMapping(&quot;/list/tree&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> R <span class="title function_">list</span><span class="params">()</span>&#123;</span><br><span class="line"> List&lt;CategoryEntity&gt; entities = categoryService.listWithTree();</span><br><span class="line"> <span class="keyword">return</span> R.ok().put(<span class="string">&quot;data&quot;</span>, entities);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p><strong>service</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.product.service.impl;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.stereotype.Service;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"><span class="keyword">import</span> java.util.stream.Collectors;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.core.metadata.IPage;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.common.utils.PageUtils;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.common.utils.Query;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.atguigu.gulimall.product.dao.CategoryDao;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.gulimall.product.entity.CategoryEntity;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.gulimall.product.service.CategoryService;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="meta">@Service(&quot;categoryService&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">CategoryServiceImpl</span> <span class="keyword">extends</span> <span class="title class_">ServiceImpl</span>&lt;CategoryDao, CategoryEntity&gt; <span class="keyword">implements</span> <span class="title class_">CategoryService</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> <span class="keyword">private</span> CategoryDao categoryDao;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> PageUtils <span class="title function_">queryPage</span><span class="params">(Map&lt;String, Object&gt; params)</span> &#123;</span><br><span class="line"> IPage&lt;CategoryEntity&gt; page = <span class="built_in">this</span>.page(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">Query</span>&lt;CategoryEntity&gt;().getPage(params),</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">QueryWrapper</span>&lt;CategoryEntity&gt;()</span><br><span class="line"> );</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">PageUtils</span>(page);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查询所有分类,以树形结构显示</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> List&lt;CategoryEntity&gt; <span class="title function_">listWithTree</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//查出所有的分类</span></span><br><span class="line"> List&lt;CategoryEntity&gt; entities = categoryDao.selectList(<span class="literal">null</span>);</span><br><span class="line"> <span class="comment">//组装成父子的树形结构</span></span><br><span class="line"> <span class="comment">//找到所有的一级分类</span></span><br><span class="line"> List&lt;CategoryEntity&gt; level1List = entities.stream().filter(categoryEntity -&gt;</span><br><span class="line"> <span class="comment">//父级分类的id等于0的就是一级分类</span></span><br><span class="line"> categoryEntity.getParentCid() == <span class="number">0</span></span><br><span class="line"> ).map((menu) -&gt; &#123;</span><br><span class="line"> <span class="comment">//为当前分类的子分类赋值</span></span><br><span class="line"> menu.setChildren(getChildren(menu, entities));</span><br><span class="line"> <span class="keyword">return</span> menu;</span><br><span class="line"> &#125;).sorted((menu1, menu2) -&gt; &#123;</span><br><span class="line"> <span class="comment">//排序</span></span><br><span class="line"> <span class="keyword">return</span> (menu1.getSort() == <span class="literal">null</span> ? <span class="number">0</span> : menu1.getSort()) - (menu2.getSort() == <span class="literal">null</span> ? <span class="number">0</span> : menu2.getSort());</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> level1List;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 递归查询所有菜单的子菜单</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> root 当前分类</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> all 所有的分类数据</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 子菜单的集合</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> List&lt;CategoryEntity&gt; <span class="title function_">getChildren</span><span class="params">(CategoryEntity root, List&lt;CategoryEntity&gt; all)</span> &#123;</span><br><span class="line"> List&lt;CategoryEntity&gt; children = all.stream().filter(categoryEntity -&gt; &#123;</span><br><span class="line"> <span class="keyword">return</span> categoryEntity.getParentCid().equals(root.getCatId());</span><br><span class="line"> &#125;).map(categoryEntity -&gt; &#123;</span><br><span class="line"> <span class="comment">//1.递归找子菜单</span></span><br><span class="line"> categoryEntity.setChildren(getChildren(categoryEntity, all));</span><br><span class="line"> <span class="keyword">return</span> categoryEntity;</span><br><span class="line"> &#125;).sorted((menu1, menu2) -&gt; &#123;</span><br><span class="line"> <span class="comment">//2.菜单的排序</span></span><br><span class="line"> <span class="keyword">return</span> (menu1.getSort() == <span class="literal">null</span> ? <span class="number">0</span> : menu1.getSort()) - (menu2.getSort() == <span class="literal">null</span> ? <span class="number">0</span> : menu2.getSort());</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> <span class="keyword">return</span> children;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="1-1-2-配置路由和网关和路径重写"><a href="#1-1-2-配置路由和网关和路径重写" class="headerlink" title="1.1.2 配置路由和网关和路径重写"></a>1.1.2 配置路由和网关和路径重写</h4><p>前端访问的地址</p>
<p><img src="/pictures/image-20230529170214769.png" alt="image-20230529170214769"></p>
<p>前端代码中的配置</p>
<p><img src="/pictures/image-20230529170149102.png" alt="image-20230529170149102"></p>
<p>修改访问的基准路径统一访问网关再由网关做请求的转发转发到指定的服务中去renren-fast-vue\static\config\index.js文件</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 开发环境</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line">;(<span class="keyword">function</span> (<span class="params"></span>) &#123;</span><br><span class="line"> <span class="variable language_">window</span>.<span class="property">SITE_CONFIG</span> = &#123;&#125;;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// api接口请求地址</span></span><br><span class="line"> <span class="variable language_">window</span>.<span class="property">SITE_CONFIG</span>[<span class="string">&#x27;baseUrl&#x27;</span>] = <span class="string">&#x27;http://localhost:88&#x27;</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// cdn地址 = 域名 + 版本号</span></span><br><span class="line"> <span class="variable language_">window</span>.<span class="property">SITE_CONFIG</span>[<span class="string">&#x27;domain&#x27;</span>] = <span class="string">&#x27;./&#x27;</span>; <span class="comment">// 域名</span></span><br><span class="line"> <span class="variable language_">window</span>.<span class="property">SITE_CONFIG</span>[<span class="string">&#x27;version&#x27;</span>] = <span class="string">&#x27;&#x27;</span>; <span class="comment">// 版本号(年月日时分)</span></span><br><span class="line"> <span class="variable language_">window</span>.<span class="property">SITE_CONFIG</span>[<span class="string">&#x27;cdnUrl&#x27;</span>] = <span class="variable language_">window</span>.<span class="property">SITE_CONFIG</span>.<span class="property">domain</span> + <span class="variable language_">window</span>.<span class="property">SITE_CONFIG</span>.<span class="property">version</span>;</span><br><span class="line">&#125;)();</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>将renren-fast注册到注册中心中去</p>
<p>修改pom.xml中的依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 修改springBoot的版本 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">parent</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-parent<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.2.6.RELEASE<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">relativePath</span>/&gt;</span> </span><br><span class="line"><span class="tag">&lt;/<span class="name">parent</span>&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- 依赖common文件,获取nacos相关的注解 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.atguigu<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>gulimall-common<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>1.0-SNAPSHOT<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>在启动类上添加@EnableDiscoveryClient注解在配置文件中添加上nacos地址的配置</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">cloud:</span></span><br><span class="line"> <span class="attr">nacos:</span></span><br><span class="line"> <span class="attr">discovery:</span></span><br><span class="line"> <span class="attr">server-addr:</span> <span class="number">127.0</span><span class="number">.0</span><span class="number">.1</span><span class="string">:8848</span></span><br></pre></td></tr></table></figure>
<p>修改网关中的断言,让前台的请求转发到正确的路径上</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">cloud:</span></span><br><span class="line"> <span class="attr">gateway:</span></span><br><span class="line"> <span class="attr">routes:</span></span><br><span class="line"> <span class="comment"># 路由的唯一id</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">id:</span> <span class="string">admin_route</span></span><br><span class="line"> <span class="attr">uri:</span> <span class="string">lb://renren-fast</span></span><br><span class="line"> <span class="attr">predicates:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">Path=/api/**</span></span><br><span class="line"> <span class="comment"># 路径重写</span></span><br><span class="line"> <span class="attr">filters:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">RewritePath=/api/(?&lt;segment&gt;.*),/renren-fast/$\&#123;segment&#125;</span></span><br><span class="line"><span class="comment"># 前端项目中的基准路径 http://localhost:88/api</span></span><br><span class="line"><span class="comment"># http://localhost:88/api/captcha.jpg 路径重写为 http://localhost:8080/renren-fast/captcha.jpg</span></span><br></pre></td></tr></table></figure>
<p>解决登录的时候的跨域问题</p>
<p>浏览器中的跨域的报错信息</p>
<p><img src="/pictures/image-20230530111856491.png" alt="image-20230530111856491"></p>
<p>跨域问题的介绍</p>
<p><img src="/pictures/image-20230530112115261.png" alt="image-20230530112115261"></p>
<p> 跨域流程</p>
<p><a href="https://developer.mozilla.org/zh-CN/docs/Web/HTTP/CORS">文档介绍</a></p>
<p><img src="/pictures/image-20230530112630678.png" alt="image-20230530112630678"></p>
<p>跨域的解决方案</p>
<ol>
<li>使用nginx部署为同一域</li>
<li>配置当前请求允许跨域 (在网关中通过过滤器给请求添加响应头)</li>
</ol>
<p>跨域的配置</p>
<p>添加跨域的配置类</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.eatguigu.gulimall.gateway.config;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Bean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.cors.CorsConfiguration;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.cors.reactive.CorsWebFilter;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> GongChangjiang</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/5/30</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 跨域配置类</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">CorsConfig</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> <span class="keyword">public</span> CorsWebFilter <span class="title function_">corsWebFilter</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="type">UrlBasedCorsConfigurationSource</span> <span class="variable">source</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">UrlBasedCorsConfigurationSource</span>();</span><br><span class="line"> <span class="type">CorsConfiguration</span> <span class="variable">corsConfiguration</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">CorsConfiguration</span>();</span><br><span class="line"> <span class="comment">//1.配置跨域</span></span><br><span class="line"> <span class="comment">//允许所有的请求头跨域</span></span><br><span class="line"> corsConfiguration.addAllowedHeader(<span class="string">&quot;*&quot;</span>);</span><br><span class="line"> <span class="comment">//允许所有的请求方式跨域</span></span><br><span class="line"> corsConfiguration.addAllowedMethod(<span class="string">&quot;*&quot;</span>);</span><br><span class="line"> <span class="comment">//任意请求来源都可以跨域</span></span><br><span class="line"> <span class="comment">//corsConfiguration.addAllowedOrigin(&quot;*&quot;); 老版本的springBoot使用这个新版本的使用下面这个</span></span><br><span class="line"> corsConfiguration.addAllowedOriginPattern(<span class="string">&quot;*&quot;</span>);</span><br><span class="line"> <span class="comment">//允许携带cookie跨域</span></span><br><span class="line"> corsConfiguration.setAllowCredentials(<span class="literal">true</span>);</span><br><span class="line"> source.registerCorsConfiguration(<span class="string">&quot;/**&quot;</span>,corsConfiguration);</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">CorsWebFilter</span>(source);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>注掉renren-fast工程中的跨域配置避免产生两次跨域的问题</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Copyright (c) 2016-2019 人人开源 All rights reserved.</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * https://www.renren.io</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * 版权所有,侵权必究!</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">package</span> io.renren.config;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.servlet.config.annotation.CorsRegistry;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.servlet.config.annotation.WebMvcConfigurer;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">CorsConfig</span> <span class="keyword">implements</span> <span class="title class_">WebMvcConfigurer</span> &#123;</span><br><span class="line"></span><br><span class="line"><span class="comment">// @Override</span></span><br><span class="line"><span class="comment">// public void addCorsMappings(CorsRegistry registry) &#123;</span></span><br><span class="line"><span class="comment">// registry.addMapping(&quot;/**&quot;)</span></span><br><span class="line"><span class="comment">// .allowedOrigins(&quot;*&quot;)</span></span><br><span class="line"><span class="comment">// .allowCredentials(true)</span></span><br><span class="line"><span class="comment">// .allowedMethods(&quot;GET&quot;, &quot;POST&quot;, &quot;PUT&quot;, &quot;DELETE&quot;, &quot;OPTIONS&quot;)</span></span><br><span class="line"><span class="comment">// .maxAge(3600);</span></span><br><span class="line"><span class="comment">// &#125;</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>再次测试,成功的进入后台管理系统</p>
<h4 id="1-2-3-查询-页面中树形显示"><a href="#1-2-3-查询-页面中树形显示" class="headerlink" title="1.2.3 查询-页面中树形显示"></a>1.2.3 查询-页面中树形显示</h4><p><strong>新增一个商品系统的目录,并在该目录下创建一个分类维护的二级分类</strong></p>
<p>1.添加一个一级分类</p>
<p><img src="/pictures/image-20230529161308671.png" alt="image-20230529161308671"></p>
<p><img src="/pictures/image-20230529161317694.png" alt="image-20230529161317694"></p>
<p>2.在商品系统的一级分类下添加一个分类维护的二级分类</p>
<p><img src="/pictures/image-20230529161648257.png" alt="image-20230529161648257"></p>
<p>3.路径的问题</p>
<p><img src="/pictures/image-20230529162235482.png" alt="image-20230529162235482"></p>
<p>4.路径与文件的对应关系</p>
<p><img src="/pictures/image-20230529162946584.png" alt="image-20230529162946584"></p>
<p>5.发送请求的示例</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;div&gt;</span><br><span class="line"> &lt;!-- 树形控件 --&gt;</span><br><span class="line"> &lt;el-tree</span><br><span class="line"> :data=&quot;data&quot;</span><br><span class="line"> :props=&quot;defaultProps&quot;</span><br><span class="line"> @node-click=&quot;handleNodeClick&quot;</span><br><span class="line"> &gt;&lt;/el-tree&gt;</span><br><span class="line"> &lt;/div&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line">export default &#123;</span><br><span class="line"> //定义变量</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> data: [],</span><br><span class="line"> defaultProps: &#123;</span><br><span class="line"> children: &quot;children&quot;,</span><br><span class="line"> label: &quot;label&quot;,</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> //钩子函数</span><br><span class="line"> created() &#123;</span><br><span class="line"> this.getMenus();</span><br><span class="line"> &#125;,</span><br><span class="line"></span><br><span class="line"> //方法</span><br><span class="line"> methods: &#123;</span><br><span class="line"> handleNodeClick(data) &#123;</span><br><span class="line"> console.log(data);</span><br><span class="line"> &#125;,</span><br><span class="line"> //获取所有的菜单</span><br><span class="line"> getMenus() &#123;</span><br><span class="line"> //正式的发送请求</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/list/tree&quot;),</span><br><span class="line"> method: &quot;get&quot;,</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> console.log(data);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;,</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br><span class="line">&lt;style&gt;</span><br><span class="line">&lt;/style&gt;</span><br></pre></td></tr></table></figure>
<p>6.树形显示商品的分类信息</p>
<p>前端修改网关商品模块的路由(注意:匹配精确的路由放在模糊的路由的上面)</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">cloud:</span></span><br><span class="line"> <span class="attr">gateway:</span></span><br><span class="line"> <span class="attr">routes:</span></span><br><span class="line"> <span class="comment">#这个路由精确一些,放在上面,避免被下面模糊的路由吞掉</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">id:</span> <span class="string">product_route</span></span><br><span class="line"> <span class="attr">uri:</span> <span class="string">lb://gulimall-product</span></span><br><span class="line"> <span class="attr">predicates:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">Path=/api/product/**</span></span><br><span class="line"> <span class="attr">filters:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">RewritePath=/api/(?&lt;segment&gt;.*),/$\&#123;segment&#125;</span></span><br><span class="line"> </span><br><span class="line"> <span class="comment"># 路由的唯一id</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">id:</span> <span class="string">admin_route</span></span><br><span class="line"> <span class="attr">uri:</span> <span class="string">lb://renren-fast</span></span><br><span class="line"> <span class="attr">predicates:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">Path=/api/**</span></span><br><span class="line"> <span class="comment"># 路径重写</span></span><br><span class="line"> <span class="attr">filters:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">RewritePath=/api/(?&lt;segment&gt;.*),/renren-fast/$\&#123;segment&#125;</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 前端项目中的基准路径 http://localhost:88/api</span></span><br><span class="line"><span class="comment"># http://localhost:88/api/captcha.jpg 路径重写为 http://localhost:8080/renren-fast/captcha.jpg</span></span><br></pre></td></tr></table></figure>
<p>前端发送请求,正确地获取数据</p>
<p><img src="/pictures/image-20230530172846989.png" alt="image-20230530172846989"></p>
<p>在页面上显示数据</p>
<p>Element的配置</p>
<p><img src="/pictures/image-20230530173658950.png" alt="image-20230530173658950"></p>
<p>前端代码</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;div&gt;</span><br><span class="line"> &lt;!-- 树形控件 --&gt;</span><br><span class="line"> &lt;el-tree</span><br><span class="line"> :data=&quot;menus&quot;</span><br><span class="line"> :props=&quot;defaultProps&quot;</span><br><span class="line"> @node-click=&quot;handleNodeClick&quot;</span><br><span class="line"> &gt;&lt;/el-tree&gt;</span><br><span class="line"> &lt;/div&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line">export default &#123;</span><br><span class="line"> //定义变量</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> menus: [],</span><br><span class="line"> defaultProps: &#123;//这里的配置看官方的文档</span><br><span class="line"> children: &quot;children&quot;,//父节点上的子节点</span><br><span class="line"> label: &quot;name&quot;,//每个对象要显示的属性值,比如我们当前要显示商品分类中的分类名的值这里就改成name</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> //钩子函数</span><br><span class="line"> created() &#123;</span><br><span class="line"> //调用获取商品分类数据的方法</span><br><span class="line"> this.getMenus();</span><br><span class="line"> &#125;,</span><br><span class="line"></span><br><span class="line"> //方法</span><br><span class="line"> methods: &#123;</span><br><span class="line"> handleNodeClick(data) &#123;</span><br><span class="line"> console.log(data);</span><br><span class="line"> &#125;,</span><br><span class="line"> //获取所有的菜单</span><br><span class="line"> getMenus() &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/list/tree&quot;),</span><br><span class="line"> method: &quot;get&quot;,</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.menus = data.data;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;,</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br><span class="line"></span><br><span class="line">&lt;style&gt;</span><br><span class="line">&lt;/style&gt;</span><br></pre></td></tr></table></figure>
<p>显示的效果</p>
<p><img src="/pictures/image-20230530173801824.png" alt="image-20230530173801824"></p>
<h4 id="1-2-4-删除-删除商品分类"><a href="#1-2-4-删除-删除商品分类" class="headerlink" title="1.2.4 删除-删除商品分类"></a>1.2.4 删除-删除商品分类</h4><p>前端页面修改</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;!-- 树形控件--&gt;</span><br><span class="line"> &lt;!-- :expand-on-click-node=&quot;false&quot;设置为点击箭头的时候才会展开,避免点击删除的按钮的时候展开 --&gt;</span><br><span class="line"> &lt;!-- show-checkbox表示开启选择框批量选择--&gt;</span><br><span class="line"> &lt;!-- node-key表示在整个树中唯一的表示 --&gt;</span><br><span class="line"> &lt;el-tree</span><br><span class="line"> :data=&quot;menus&quot;</span><br><span class="line"> :props=&quot;defaultProps&quot;</span><br><span class="line"> :expand-on-click-node=&quot;false&quot;</span><br><span class="line"> show-checkbox</span><br><span class="line"> node-key=&quot;catId&quot;</span><br><span class="line"> :default-expanded-keys=&quot;expandedKey&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;span class=&quot;custom-tree-node&quot; slot-scope=&quot;&#123; node, data &#125;&quot;&gt;</span><br><span class="line"> &lt;span&gt;&#123;&#123; node.label &#125;&#125;&lt;/span&gt;</span><br><span class="line"> &lt;span&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;node.level &lt;= 2&quot;</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;mini&quot;</span><br><span class="line"> @click=&quot;() =&gt; append(data)&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> 添加</span><br><span class="line"> &lt;/el-button&gt;</span><br><span class="line"> &lt;!-- 添加判断,没有下一级节点的时候就显示删除的按钮 --&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;data.children.length &lt;= 0&quot;</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;mini&quot;</span><br><span class="line"> @click=&quot;() =&gt; remove(node, data)&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> 删除</span><br><span class="line"> &lt;/el-button&gt;</span><br><span class="line"> &lt;/span&gt;</span><br><span class="line"> &lt;/span&gt;&lt;/el-tree</span><br><span class="line"> &gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line">export default &#123;</span><br><span class="line"> //定义变量</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> menus: [],</span><br><span class="line"> defaultProps: &#123;</span><br><span class="line"> //这里的配置看官方的文档</span><br><span class="line"> children: &quot;children&quot;, //父节点上的子节点</span><br><span class="line"> label: &quot;name&quot;, //每个对象要显示的属性值,比如我们当前要显示商品分类中的分类名的值这里就改成name</span><br><span class="line"> &#125;,</span><br><span class="line"> expandedKey:[] //需要展开的数组,用于删除之后树形控件仍然展开</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> //钩子函数</span><br><span class="line"> created() &#123;</span><br><span class="line"> //调用获取商品分类数据的方法</span><br><span class="line"> this.getMenus();</span><br><span class="line"> &#125;,</span><br><span class="line"></span><br><span class="line"> //方法</span><br><span class="line"> methods: &#123;</span><br><span class="line"> append(data) &#123;</span><br><span class="line"> console.log(&quot;append: &quot;, data);</span><br><span class="line"> &#125;,</span><br><span class="line"> //删除节点的方法</span><br><span class="line"> remove(node, data) &#123;</span><br><span class="line"> var ids = [data.catId];</span><br><span class="line"> this.$confirm(`是否要删除[$&#123;data.name&#125;]菜单?`, &quot;提示&quot;, &#123;</span><br><span class="line"> confirmButtonText: &quot;确定&quot;,</span><br><span class="line"> cancelButtonText: &quot;取消&quot;,</span><br><span class="line"> type: &quot;warning&quot;,</span><br><span class="line"> &#125;)</span><br><span class="line"> .then(() =&gt; &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/delete&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(ids, false),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;菜单删除成功&quot;,</span><br><span class="line"> type: &quot;success&quot;,</span><br><span class="line"> &#125;);</span><br><span class="line"> //刷新一下页面</span><br><span class="line"> this.getMenus();</span><br><span class="line"> //设置需要默认展开的菜单(依然展开刚才删除的节点)</span><br><span class="line"> this.expandedKey = [node.parent.data.catId]</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;)</span><br><span class="line"> .catch(() =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> type: &quot;info&quot;,</span><br><span class="line"> message: &quot;已取消删除&quot;,</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> //获取所有的菜单</span><br><span class="line"> getMenus() &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/list/tree&quot;),</span><br><span class="line"> method: &quot;get&quot;,</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.menus = data.data;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;,</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br><span class="line"></span><br><span class="line">&lt;style&gt;</span><br><span class="line">&lt;/style&gt;</span><br></pre></td></tr></table></figure>
<p><strong>配置逻辑删除</strong></p>
<p>配置全局的逻辑删除规则</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">mybatis-plus:</span></span><br><span class="line"> <span class="attr">global-config:</span></span><br><span class="line"> <span class="attr">db-config:</span></span><br><span class="line"> <span class="attr">logic-delete-value:</span> <span class="number">1</span> <span class="comment"># 逻辑已删除值(默认为 1)</span></span><br><span class="line"> <span class="attr">logic-not-delete-value:</span> <span class="number">0</span> <span class="comment"># 逻辑未删除值(默认为 0)</span></span><br></pre></td></tr></table></figure>
<p>在showStatus上添加上逻辑删除的注解</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@TableLogic(value = &quot;1&quot;,delval = &quot;0&quot;)</span></span><br></pre></td></tr></table></figure>
<p>后端代码的实现</p>
<p>controlller</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 删除</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/delete&quot;)</span></span><br><span class="line"><span class="comment">//@RequiresPermissions(&quot;product:category:delete&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">delete</span><span class="params">(<span class="meta">@RequestBody</span> Long[] catIds)</span> &#123;</span><br><span class="line"> <span class="comment">//检查当前删除的菜单,是否被别的地方引用</span></span><br><span class="line"> <span class="comment">//categoryService.removeByIds(Arrays.asList(catIds));</span></span><br><span class="line"> categoryService.removeMenuByIds(Arrays.asList(catIds));</span><br><span class="line"> <span class="keyword">return</span> R.ok();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>service 这里后面需要优化</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 删除分类的方法</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> list 分类id的集合</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">removeMenuByIds</span><span class="params">(List&lt;Long&gt; list)</span> &#123;</span><br><span class="line"> <span class="comment">//TODO 检查当前删除的菜单是否被其他的地方引用 后面优化</span></span><br><span class="line"> <span class="comment">//逻辑删除</span></span><br><span class="line"> categoryDao.deleteBatchIds(list);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="1-2-5-添加-添加商品分类"><a href="#1-2-5-添加-添加商品分类" class="headerlink" title="1.2.5 添加-添加商品分类"></a>1.2.5 添加-添加商品分类</h4><p>前端代码</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;div&gt;</span><br><span class="line"> &lt;!-- 树形控件--&gt;</span><br><span class="line"> &lt;!-- :expand-on-click-node=&quot;false&quot;设置为点击箭头的时候才会展开,避免点击删除的按钮的时候展开 --&gt;</span><br><span class="line"> &lt;!-- show-checkbox表示开启选择框批量选择--&gt;</span><br><span class="line"> &lt;!-- node-key表示在整个树中唯一的表示 --&gt;</span><br><span class="line"> &lt;el-tree</span><br><span class="line"> :data=&quot;menus&quot;</span><br><span class="line"> :props=&quot;defaultProps&quot;</span><br><span class="line"> :expand-on-click-node=&quot;false&quot;</span><br><span class="line"> show-checkbox</span><br><span class="line"> node-key=&quot;catId&quot;</span><br><span class="line"> :default-expanded-keys=&quot;expandedKey&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;span class=&quot;custom-tree-node&quot; slot-scope=&quot;&#123; node, data &#125;&quot;&gt;</span><br><span class="line"> &lt;span&gt;&#123;&#123; node.label &#125;&#125;&lt;/span&gt;</span><br><span class="line"> &lt;span&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;node.level &lt;= 2&quot;</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;mini&quot;</span><br><span class="line"> @click=&quot;() =&gt; append(data)&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> 添加</span><br><span class="line"> &lt;/el-button&gt;</span><br><span class="line"> &lt;!-- 添加判断,没有下一级节点的时候就显示删除的按钮 --&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;data.children.length &lt;= 0&quot;</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;mini&quot;</span><br><span class="line"> @click=&quot;() =&gt; remove(node, data)&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> 删除</span><br><span class="line"> &lt;/el-button&gt;</span><br><span class="line"> &lt;/span&gt;</span><br><span class="line"> &lt;/span&gt;&lt;/el-tree</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;!-- 添加分类的时候弹出的对话框 --&gt;</span><br><span class="line"> &lt;el-dialog title=&quot;提示&quot; :visible.sync=&quot;dialogVisible&quot; width=&quot;30%&quot;&gt;</span><br><span class="line"> &lt;el-form :model=&quot;category&quot;&gt;</span><br><span class="line"> &lt;el-form-item label=&quot;分类名称&quot;&gt;</span><br><span class="line"> &lt;el-input v-model=&quot;category.name&quot; autocomplete=&quot;off&quot;&gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;/el-form&gt;</span><br><span class="line"> &lt;span slot=&quot;footer&quot; class=&quot;dialog-footer&quot;&gt;</span><br><span class="line"> &lt;el-button @click=&quot;dialogVisible = false&quot;&gt;取 消&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button type=&quot;primary&quot; @click=&quot;addCategory&quot;&gt;确 定&lt;/el-button&gt;</span><br><span class="line"> &lt;/span&gt;</span><br><span class="line"> &lt;/el-dialog&gt;</span><br><span class="line"> &lt;/div&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line">export default &#123;</span><br><span class="line"> //定义变量</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> menus: [],</span><br><span class="line"> defaultProps: &#123;</span><br><span class="line"> //这里的配置看官方的文档</span><br><span class="line"> children: &quot;children&quot;, //父节点上的子节点</span><br><span class="line"> label: &quot;name&quot;, //每个对象要显示的属性值,比如我们当前要显示商品分类中的分类名的值这里就改成name</span><br><span class="line"> &#125;,</span><br><span class="line"> expandedKey: [], //需要展开的数组,用于删除之后树形控件仍然展开</span><br><span class="line"> dialogVisible: false, //添加菜单的对话框的开启或者关闭</span><br><span class="line"> //表单绑定的对象</span><br><span class="line"> category: &#123;</span><br><span class="line"> name: &quot;&quot;, //分类的名称</span><br><span class="line"> parentCid: 0, //父类的id</span><br><span class="line"> catLevel: 0, //分类的级别</span><br><span class="line"> showStatus: 1, //是否显示该分类</span><br><span class="line"> sort: 0, //排序</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> //钩子函数</span><br><span class="line"> created() &#123;</span><br><span class="line"> //调用获取商品分类数据的方法</span><br><span class="line"> this.getMenus();</span><br><span class="line"> &#125;,</span><br><span class="line"></span><br><span class="line"> //方法</span><br><span class="line"> methods: &#123;</span><br><span class="line"> //添加分类(弹出的对话框确定按钮执行的方法)</span><br><span class="line"> addCategory() &#123;</span><br><span class="line"> console.log(&quot;提交的数据:&quot;, this.category);</span><br><span class="line"> //将添加的数据返回给后端</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/save&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(this.category, false),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;菜单添加成功&quot;,</span><br><span class="line"> type: &quot;success&quot;,</span><br><span class="line"> &#125;);</span><br><span class="line"> //刷新一下页面</span><br><span class="line"> this.getMenus()</span><br><span class="line"> //设置需要默认展开的菜单(依然展开刚才添加的节点)</span><br><span class="line"> this.expandedKey = [this.category.parentCid];</span><br><span class="line"> &#125;);</span><br><span class="line"> //关闭对话框</span><br><span class="line"> this.dialogVisible = false;</span><br><span class="line"> &#125;,</span><br><span class="line"> //添加分类的方法</span><br><span class="line"> append(data) &#123;</span><br><span class="line"> //清空一下表单的数据</span><br><span class="line"> this.category.name = &quot;&quot;;</span><br><span class="line"> //打开添加的对话框</span><br><span class="line"> this.dialogVisible = true;</span><br><span class="line"> //为分类的对象赋值</span><br><span class="line"> this.category.parentCid = data.catId;</span><br><span class="line"> this.category.catLevel = data.catLevel * 1 + 1; //防止catLevel是一个字符串</span><br><span class="line"> &#125;,</span><br><span class="line"> //删除节点的方法</span><br><span class="line"> remove(node, data) &#123;</span><br><span class="line"> var ids = [data.catId];</span><br><span class="line"> this.$confirm(`是否要删除[$&#123;data.name&#125;]菜单?`, &quot;提示&quot;, &#123;</span><br><span class="line"> confirmButtonText: &quot;确定&quot;,</span><br><span class="line"> cancelButtonText: &quot;取消&quot;,</span><br><span class="line"> type: &quot;warning&quot;,</span><br><span class="line"> &#125;)</span><br><span class="line"> .then(() =&gt; &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/delete&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(ids, false),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;菜单删除成功&quot;,</span><br><span class="line"> type: &quot;success&quot;,</span><br><span class="line"> &#125;);</span><br><span class="line"> //刷新一下页面</span><br><span class="line"> this.getMenus();</span><br><span class="line"> //设置需要默认展开的菜单(依然展开刚才删除的节点)</span><br><span class="line"> this.expandedKey = [node.parent.data.catId];</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;)</span><br><span class="line"> .catch(() =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> type: &quot;info&quot;,</span><br><span class="line"> message: &quot;已取消删除&quot;,</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> //获取所有的菜单</span><br><span class="line"> getMenus() &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/list/tree&quot;),</span><br><span class="line"> method: &quot;get&quot;,</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.menus = data.data;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;,</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br><span class="line"></span><br><span class="line">&lt;style&gt;</span><br><span class="line">&lt;/style&gt;</span><br></pre></td></tr></table></figure>
<p>后端代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/save&quot;)</span></span><br><span class="line"><span class="comment">//@RequiresPermissions(&quot;product:category:save&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">save</span><span class="params">(<span class="meta">@RequestBody</span> CategoryEntity category)</span> &#123;</span><br><span class="line"> categoryService.save(category);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> R.ok();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>实现的效果</p>
<p><img src="/pictures/image-20230605163004850.png" alt="image-20230605163004850"></p>
<h4 id="1-2-6-修改-修改商品的分类"><a href="#1-2-6-修改-修改商品的分类" class="headerlink" title="1.2.6 修改-修改商品的分类"></a>1.2.6 修改-修改商品的分类</h4><p>前端的代码(太复杂了,没有写完)</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;div&gt;</span><br><span class="line"> &lt;!-- 树形控件--&gt;</span><br><span class="line"> &lt;!-- :expand-on-click-node=&quot;false&quot;设置为点击箭头的时候才会展开,避免点击删除的按钮的时候展开 --&gt;</span><br><span class="line"> &lt;!-- show-checkbox表示开启选择框批量选择--&gt;</span><br><span class="line"> &lt;!-- node-key表示在整个树中唯一的表示 --&gt;</span><br><span class="line"> &lt;!-- draggable 实现节点自由拖拽的效果 --&gt;</span><br><span class="line"> &lt;el-tree</span><br><span class="line"> :data=&quot;menus&quot;</span><br><span class="line"> :props=&quot;defaultProps&quot;</span><br><span class="line"> :expand-on-click-node=&quot;false&quot;</span><br><span class="line"> show-checkbox</span><br><span class="line"> node-key=&quot;catId&quot;</span><br><span class="line"> :default-expanded-keys=&quot;expandedKey&quot;</span><br><span class="line"> draggable</span><br><span class="line"> :allow-drop=&quot;allowDrop&quot;</span><br><span class="line"> @node-drop=&quot;handleDrop&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;span class=&quot;custom-tree-node&quot; slot-scope=&quot;&#123; node, data &#125;&quot;&gt;</span><br><span class="line"> &lt;span&gt;&#123;&#123; node.label &#125;&#125;&lt;/span&gt;</span><br><span class="line"> &lt;span&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;node.level &lt;= 2&quot;</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;mini&quot;</span><br><span class="line"> @click=&quot;() =&gt; append(data)&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> 添加</span><br><span class="line"> &lt;/el-button&gt;</span><br><span class="line"> &lt;el-button type=&quot;text&quot; size=&quot;mini&quot; @click=&quot;() =&gt; edit(data)&quot;&gt;</span><br><span class="line"> 修改</span><br><span class="line"> &lt;/el-button&gt;</span><br><span class="line"> &lt;!-- 添加判断,没有下一级节点的时候就显示删除的按钮 --&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;data.children.length &lt;= 0&quot;</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;mini&quot;</span><br><span class="line"> @click=&quot;() =&gt; remove(node, data)&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> 删除</span><br><span class="line"> &lt;/el-button&gt;</span><br><span class="line"> &lt;/span&gt;</span><br><span class="line"> &lt;/span&gt;&lt;/el-tree</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;!-- 添加分类的时候弹出的对话框 --&gt;</span><br><span class="line"> &lt;el-dialog</span><br><span class="line"> :title=&quot;title&quot;</span><br><span class="line"> :visible.sync=&quot;dialogVisible&quot;</span><br><span class="line"> width=&quot;30%&quot;</span><br><span class="line"> :close-on-click-modal=&quot;false&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-form :model=&quot;category&quot;&gt;</span><br><span class="line"> &lt;el-form-item label=&quot;分类名称&quot;&gt;</span><br><span class="line"> &lt;el-input v-model=&quot;category.name&quot; autocomplete=&quot;off&quot;&gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item label=&quot;图标&quot;&gt;</span><br><span class="line"> &lt;el-input v-model=&quot;category.icon&quot; autocomplete=&quot;off&quot;&gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item label=&quot;计量单位&quot;&gt;</span><br><span class="line"> &lt;el-input</span><br><span class="line"> v-model=&quot;category.productUnit&quot;</span><br><span class="line"> autocomplete=&quot;off&quot;</span><br><span class="line"> &gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;/el-form&gt;</span><br><span class="line"> &lt;span slot=&quot;footer&quot; class=&quot;dialog-footer&quot;&gt;</span><br><span class="line"> &lt;el-button @click=&quot;dialogVisible = false&quot;&gt;取 消&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button type=&quot;primary&quot; @click=&quot;submitDate&quot;&gt;确 定&lt;/el-button&gt;</span><br><span class="line"> &lt;/span&gt;</span><br><span class="line"> &lt;/el-dialog&gt;</span><br><span class="line"> &lt;/div&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line">export default &#123;</span><br><span class="line"> //定义变量</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> updateNodes: [], //经过修改之后的节点的信息</span><br><span class="line"> maxLevel: 0, //最大的层级</span><br><span class="line"> title: &quot;&quot;, //弹出框的提示信息</span><br><span class="line"> dialogType: &quot;&quot;, //弹出的对话框的类型 edit/add</span><br><span class="line"> menus: [],</span><br><span class="line"> defaultProps: &#123;</span><br><span class="line"> //这里的配置看官方的文档</span><br><span class="line"> children: &quot;children&quot;, //父节点上的子节点</span><br><span class="line"> label: &quot;name&quot;, //每个对象要显示的属性值,比如我们当前要显示商品分类中的分类名的值这里就改成name</span><br><span class="line"> &#125;,</span><br><span class="line"> expandedKey: [], //需要展开的数组,用于删除之后树形控件仍然展开</span><br><span class="line"> dialogVisible: false, //添加菜单的对话框的开启或者关闭</span><br><span class="line"> //表单绑定的对象</span><br><span class="line"> category: &#123;</span><br><span class="line"> name: &quot;&quot;, //分类的名称</span><br><span class="line"> parentCid: 0, //父类的id</span><br><span class="line"> catLevel: 0, //分类的级别</span><br><span class="line"> showStatus: 1, //是否显示该分类</span><br><span class="line"> sort: 0, //排序</span><br><span class="line"> catId: null, //分类的id信息</span><br><span class="line"> icon: &quot;&quot;, //商品分类的图标</span><br><span class="line"> productUnit: &quot;&quot;, //计量单位</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> //钩子函数</span><br><span class="line"> created() &#123;</span><br><span class="line"> //调用获取商品分类数据的方法</span><br><span class="line"> this.getMenus();</span><br><span class="line"> &#125;,</span><br><span class="line"></span><br><span class="line"> //方法</span><br><span class="line"> methods: &#123;</span><br><span class="line"> //拖拽成功之后调用这个函数进行回调的处理</span><br><span class="line"> handleDrop(draggingNode, dropNode, dropType, ev) &#123;</span><br><span class="line"> console.log(&quot;handleDrop: &quot;, draggingNode, dropNode, dropType);</span><br><span class="line"> //当前的节点的最新父节点id</span><br><span class="line"> let pCid = 0; //当前节点的组最新父节点id</span><br><span class="line"> let siblings = null; //当前的节点的兄弟节点</span><br><span class="line"> //判断的节点的进入的方式</span><br><span class="line"> if (dropType == &quot;before&quot; || dropType == &quot;after&quot;) &#123;</span><br><span class="line"> pCid =</span><br><span class="line"> dropNode.parent.data.catId == undefined</span><br><span class="line"> ? 0</span><br><span class="line"> : dropNode.parent.data.catId;</span><br><span class="line"> siblings = dropNode.parent.childNodes;</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> pCid = dropNode.data.catId;</span><br><span class="line"> siblings = dropNode.childNodes;</span><br><span class="line"> &#125;</span><br><span class="line"> //当前的节点的最新的顺序</span><br><span class="line"> for (let i = 0; i &lt; siblings.length; i++) &#123;</span><br><span class="line"> if (siblings[i].data.catId == draggingNode.data.catId) &#123;</span><br><span class="line"> //如果当前遍历的是正在拖拽的节点</span><br><span class="line"> let catLevel = draggingNode.catLevel;</span><br><span class="line"> if (siblings[i].level != draggingNode.level) &#123;</span><br><span class="line"> //当前的节点的层级发生的变化</span><br><span class="line"> catLevel = siblings[i].level;</span><br><span class="line"> //修改子节点的层级</span><br><span class="line"> this.updateChildNodeLevel(siblings[i]);</span><br><span class="line"> &#125;</span><br><span class="line"> this.updateNodes.push(&#123;</span><br><span class="line"> catId: siblings[i].data.catId,</span><br><span class="line"> sort: i,</span><br><span class="line"> parentCid: pCid,</span><br><span class="line"> catLevel: catLevel,</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> this.updateNodes.push(&#123; catId: siblings[i].data.catId, sort: i &#125;);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> //当前的拖拽节点的最新的层级</span><br><span class="line"> console.log(&quot;updateNodes:&quot;, this.updateNodes);</span><br><span class="line"> &#125;,</span><br><span class="line"> //递归修改子节点的层级</span><br><span class="line"> updateChildNodeLevel(node) &#123;</span><br><span class="line"> if ((node.childNodes, length &gt; 0)) &#123;</span><br><span class="line"> for (let i = 0; i &lt; node.childNodes.length; i++) &#123;</span><br><span class="line"> var cNode = node.childNodes[i].data;</span><br><span class="line"> this.updateNodes.push(&#123;</span><br><span class="line"> catId: cNode.catId,</span><br><span class="line"> catLevel: node.childNodes[i].level,</span><br><span class="line"> &#125;);</span><br><span class="line"> //递归调用</span><br><span class="line"> this.updateChildNodeLevel(node.childNodes[i]);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;,</span><br><span class="line"> //拖拽之后节点的位置的判断 是否的可以放在该位置上面</span><br><span class="line"> allowDrop(draggingNode, dropNode, type) &#123;</span><br><span class="line"> //判断被拖动的当前节点以及所在的父节点的总层数不能大于三</span><br><span class="line"> //被拖动的当前节点的总层数</span><br><span class="line"> console.log(&quot;allowDrop:&quot;, draggingNode, dropNode, type);</span><br><span class="line"> //获取当前节点的总层数</span><br><span class="line"> this.countNodeLevel(draggingNode.data);</span><br><span class="line"> let deep = this.maxLevel - draggingNode.data.catLevel + 1;</span><br><span class="line"> console.log(&quot;深度:&quot;, deep);</span><br><span class="line"> if ((type = &quot;inner&quot;)) &#123;</span><br><span class="line"> return deep + dropNode.level &lt;= 3;</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> return deep + dropNode.parent.level &lt;= 3;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;,</span><br><span class="line"> //统计当前的节点的总层数</span><br><span class="line"> countNodeLevel(node) &#123;</span><br><span class="line"> //找到所有子节点 求出最大深度</span><br><span class="line"> if (node.children != null &amp;&amp; node.children.length &gt; 0) &#123;</span><br><span class="line"> for (let i = 0; i &lt; node.children.length; i++) &#123;</span><br><span class="line"> if (node.children[i].catLevel &gt; this.maxLevel) &#123;</span><br><span class="line"> this.maxLevel = node.children[i].catLevel;</span><br><span class="line"> &#125;</span><br><span class="line"> //递归一下</span><br><span class="line"> this.countNodeLevel(node.children[i]);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;,</span><br><span class="line"> //弹出修改的对话框,并做数据的回显</span><br><span class="line"> edit(data) &#123;</span><br><span class="line"> //修改的title</span><br><span class="line"> this.title = &quot;修改分类&quot;;</span><br><span class="line"> //设置弹出的对话框为修改的类型</span><br><span class="line"> this.dialogType = &quot;edit&quot;;</span><br><span class="line"> //发送请求回显数据</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(`/product/category/info/$&#123;data.catId&#125;`),</span><br><span class="line"> method: &quot;get&quot;,</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> //请求成功 回显数据</span><br><span class="line"> console.log(&quot;回显的数据:&quot;, data);</span><br><span class="line"> this.category.name = data.data.name;</span><br><span class="line"> this.category.catId = data.data.catId;</span><br><span class="line"> this.category.icon = data.data.icon;</span><br><span class="line"> this.category.productUnit = data.data.productUnit;</span><br><span class="line"> this.category.parentCid = data.data.parentCid;</span><br><span class="line"> &#125;);</span><br><span class="line"> //弹出对话框</span><br><span class="line"> this.dialogVisible = true;</span><br><span class="line"> &#125;,</span><br><span class="line"> //保存或者添加数据</span><br><span class="line"> submitDate() &#123;</span><br><span class="line"> if (this.dialogType == &quot;add&quot;) &#123;</span><br><span class="line"> //调用添加的方法</span><br><span class="line"> this.addCategory();</span><br><span class="line"> &#125;</span><br><span class="line"> if (this.dialogType == &quot;edit&quot;) &#123;</span><br><span class="line"> //修改的方法</span><br><span class="line"> this.editCategory();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;,</span><br><span class="line"> //修改商品的分类信息</span><br><span class="line"> editCategory() &#123;</span><br><span class="line"> //只发送我们要修改的数据</span><br><span class="line"> var &#123; catId, name, icon, productUnit &#125; = this.category;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/update&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(&#123; catId, name, icon, productUnit &#125;, false),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;分类修改成功&quot;,</span><br><span class="line"> type: &quot;success&quot;,</span><br><span class="line"> &#125;);</span><br><span class="line"> //关闭弹出框</span><br><span class="line"> this.dialogVisible = false;</span><br><span class="line"> //刷新一下表单</span><br><span class="line"> this.getMenus();</span><br><span class="line"> //设置默认展开的菜单</span><br><span class="line"> this.expandedKey = [this.category.parentCid];</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> //添加分类(弹出的对话框确定按钮执行的方法)</span><br><span class="line"> addCategory() &#123;</span><br><span class="line"> console.log(&quot;提交的数据:&quot;, this.category);</span><br><span class="line"> //将添加的数据返回给后端</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/save&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(this.category, false),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;分类添加成功&quot;,</span><br><span class="line"> type: &quot;success&quot;,</span><br><span class="line"> &#125;);</span><br><span class="line"> //刷新一下页面</span><br><span class="line"> this.getMenus();</span><br><span class="line"> //设置需要默认展开的菜单(依然展开刚才添加的节点)</span><br><span class="line"> this.expandedKey = [this.category.parentCid];</span><br><span class="line"> &#125;);</span><br><span class="line"> //关闭对话框</span><br><span class="line"> this.dialogVisible = false;</span><br><span class="line"> &#125;,</span><br><span class="line"> //添加分类的方法</span><br><span class="line"> append(data) &#123;</span><br><span class="line"> //添加的title</span><br><span class="line"> this.title = &quot;添加分类&quot;;</span><br><span class="line"> //设置当前提交的对话框为添加的对话框</span><br><span class="line"> this.dialogType = &quot;add&quot;;</span><br><span class="line"> //清空一下表单的数据</span><br><span class="line"> this.category.name = &quot;&quot;;</span><br><span class="line"> //打开添加的对话框</span><br><span class="line"> this.dialogVisible = true;</span><br><span class="line"> //为分类的对象赋值</span><br><span class="line"> this.category.parentCid = data.catId;</span><br><span class="line"> this.category.catLevel = data.catLevel * 1 + 1; //防止catLevel是一个字符串</span><br><span class="line"> this.catId = null;</span><br><span class="line"> this.category.icon = &quot;&quot;;</span><br><span class="line"> this.category.productUnit = &quot;&quot;;</span><br><span class="line"> this.category.sort = 0;</span><br><span class="line"> this.category.showStatus = 1;</span><br><span class="line"> &#125;,</span><br><span class="line"> //删除节点的方法</span><br><span class="line"> remove(node, data) &#123;</span><br><span class="line"> var ids = [data.catId];</span><br><span class="line"> this.$confirm(`是否要删除[$&#123;data.name&#125;]菜单?`, &quot;提示&quot;, &#123;</span><br><span class="line"> confirmButtonText: &quot;确定&quot;,</span><br><span class="line"> cancelButtonText: &quot;取消&quot;,</span><br><span class="line"> type: &quot;warning&quot;,</span><br><span class="line"> &#125;)</span><br><span class="line"> .then(() =&gt; &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/delete&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(ids, false),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;菜单删除成功&quot;,</span><br><span class="line"> type: &quot;success&quot;,</span><br><span class="line"> &#125;);</span><br><span class="line"> //刷新一下页面</span><br><span class="line"> this.getMenus();</span><br><span class="line"> //设置需要默认展开的菜单(依然展开刚才删除的节点)</span><br><span class="line"> this.expandedKey = [node.parent.data.catId];</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;)</span><br><span class="line"> .catch(() =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> type: &quot;info&quot;,</span><br><span class="line"> message: &quot;已取消删除&quot;,</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> //获取所有的菜单</span><br><span class="line"> getMenus() &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/list/tree&quot;),</span><br><span class="line"> method: &quot;get&quot;,</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.menus = data.data;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;,</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br><span class="line"></span><br><span class="line">&lt;style&gt;</span><br><span class="line">&lt;/style&gt;</span><br></pre></td></tr></table></figure>
<p>老师的前端的代码</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;div&gt;</span><br><span class="line"> &lt;el-switch v-model=&quot;draggable&quot; active-text=&quot;开启拖拽&quot; inactive-text=&quot;关闭拖拽&quot;&gt;&lt;/el-switch&gt;</span><br><span class="line"> &lt;el-button v-if=&quot;draggable&quot; @click=&quot;batchSave&quot;&gt;批量保存&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button type=&quot;danger&quot; @click=&quot;batchDelete&quot;&gt;批量删除&lt;/el-button&gt;</span><br><span class="line"> &lt;el-tree</span><br><span class="line"> :data=&quot;menus&quot;</span><br><span class="line"> :props=&quot;defaultProps&quot;</span><br><span class="line"> :expand-on-click-node=&quot;false&quot;</span><br><span class="line"> show-checkbox</span><br><span class="line"> node-key=&quot;catId&quot;</span><br><span class="line"> :default-expanded-keys=&quot;expandedKey&quot;</span><br><span class="line"> :draggable=&quot;draggable&quot;</span><br><span class="line"> :allow-drop=&quot;allowDrop&quot;</span><br><span class="line"> @node-drop=&quot;handleDrop&quot;</span><br><span class="line"> ref=&quot;menuTree&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;span class=&quot;custom-tree-node&quot; slot-scope=&quot;&#123; node, data &#125;&quot;&gt;</span><br><span class="line"> &lt;span&gt;&#123;&#123; node.label &#125;&#125;&lt;/span&gt;</span><br><span class="line"> &lt;span&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;node.level &lt;=2&quot;</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;mini&quot;</span><br><span class="line"> @click=&quot;() =&gt; append(data)&quot;</span><br><span class="line"> &gt;Append&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button type=&quot;text&quot; size=&quot;mini&quot; @click=&quot;edit(data)&quot;&gt;edit&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;node.childNodes.length==0&quot;</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;mini&quot;</span><br><span class="line"> @click=&quot;() =&gt; remove(node, data)&quot;</span><br><span class="line"> &gt;Delete&lt;/el-button&gt;</span><br><span class="line"> &lt;/span&gt;</span><br><span class="line"> &lt;/span&gt;</span><br><span class="line"> &lt;/el-tree&gt;</span><br><span class="line"></span><br><span class="line"> &lt;el-dialog</span><br><span class="line"> :title=&quot;title&quot;</span><br><span class="line"> :visible.sync=&quot;dialogVisible&quot;</span><br><span class="line"> width=&quot;30%&quot;</span><br><span class="line"> :close-on-click-modal=&quot;false&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-form :model=&quot;category&quot;&gt;</span><br><span class="line"> &lt;el-form-item label=&quot;分类名称&quot;&gt;</span><br><span class="line"> &lt;el-input v-model=&quot;category.name&quot; autocomplete=&quot;off&quot;&gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item label=&quot;图标&quot;&gt;</span><br><span class="line"> &lt;el-input v-model=&quot;category.icon&quot; autocomplete=&quot;off&quot;&gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item label=&quot;计量单位&quot;&gt;</span><br><span class="line"> &lt;el-input v-model=&quot;category.productUnit&quot; autocomplete=&quot;off&quot;&gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;/el-form&gt;</span><br><span class="line"> &lt;span slot=&quot;footer&quot; class=&quot;dialog-footer&quot;&gt;</span><br><span class="line"> &lt;el-button @click=&quot;dialogVisible = false&quot;&gt;取 消&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button type=&quot;primary&quot; @click=&quot;submitData&quot;&gt;确 定&lt;/el-button&gt;</span><br><span class="line"> &lt;/span&gt;</span><br><span class="line"> &lt;/el-dialog&gt;</span><br><span class="line"> &lt;/div&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line">//这里可以导入其他文件比如组件工具js第三方插件jsjson文件图片文件等等</span><br><span class="line">//例如import 《组件名称》 from &#x27;《组件路径》&#x27;;</span><br><span class="line"></span><br><span class="line">export default &#123;</span><br><span class="line"> //import引入的组件需要注入到对象中才能使用</span><br><span class="line"> components: &#123;&#125;,</span><br><span class="line"> props: &#123;&#125;,</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> pCid: [],</span><br><span class="line"> draggable: false,</span><br><span class="line"> updateNodes: [],</span><br><span class="line"> maxLevel: 0,</span><br><span class="line"> title: &quot;&quot;,</span><br><span class="line"> dialogType: &quot;&quot;, //edit,add</span><br><span class="line"> category: &#123;</span><br><span class="line"> name: &quot;&quot;,</span><br><span class="line"> parentCid: 0,</span><br><span class="line"> catLevel: 0,</span><br><span class="line"> showStatus: 1,</span><br><span class="line"> sort: 0,</span><br><span class="line"> productUnit: &quot;&quot;,</span><br><span class="line"> icon: &quot;&quot;,</span><br><span class="line"> catId: null</span><br><span class="line"> &#125;,</span><br><span class="line"> dialogVisible: false,</span><br><span class="line"> menus: [],</span><br><span class="line"> expandedKey: [],</span><br><span class="line"> defaultProps: &#123;</span><br><span class="line"> children: &quot;children&quot;,</span><br><span class="line"> label: &quot;name&quot;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"></span><br><span class="line"> //计算属性 类似于data概念</span><br><span class="line"> computed: &#123;&#125;,</span><br><span class="line"> //监控data中的数据变化</span><br><span class="line"> watch: &#123;&#125;,</span><br><span class="line"> //方法集合</span><br><span class="line"> methods: &#123;</span><br><span class="line"> getMenus() &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/list/tree&quot;),</span><br><span class="line"> method: &quot;get&quot;</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> console.log(&quot;成功获取到菜单数据...&quot;, data.data);</span><br><span class="line"> this.menus = data.data;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> batchDelete() &#123;</span><br><span class="line"> let catIds = [];</span><br><span class="line"> let checkedNodes = this.$refs.menuTree.getCheckedNodes();</span><br><span class="line"> console.log(&quot;被选中的元素&quot;, checkedNodes);</span><br><span class="line"> for (let i = 0; i &lt; checkedNodes.length; i++) &#123;</span><br><span class="line"> catIds.push(checkedNodes[i].catId);</span><br><span class="line"> &#125;</span><br><span class="line"> this.$confirm(`是否批量删除【$&#123;catIds&#125;】菜单?`, &quot;提示&quot;, &#123;</span><br><span class="line"> confirmButtonText: &quot;确定&quot;,</span><br><span class="line"> cancelButtonText: &quot;取消&quot;,</span><br><span class="line"> type: &quot;warning&quot;</span><br><span class="line"> &#125;)</span><br><span class="line"> .then(() =&gt; &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/delete&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(catIds, false)</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;菜单批量删除成功&quot;,</span><br><span class="line"> type: &quot;success&quot;</span><br><span class="line"> &#125;);</span><br><span class="line"> this.getMenus();</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;)</span><br><span class="line"> .catch(() =&gt; &#123;&#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> batchSave() &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/update/sort&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(this.updateNodes, false)</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;菜单顺序等修改成功&quot;,</span><br><span class="line"> type: &quot;success&quot;</span><br><span class="line"> &#125;);</span><br><span class="line"> //刷新出新的菜单</span><br><span class="line"> this.getMenus();</span><br><span class="line"> //设置需要默认展开的菜单</span><br><span class="line"> this.expandedKey = this.pCid;</span><br><span class="line"> this.updateNodes = [];</span><br><span class="line"> this.maxLevel = 0;</span><br><span class="line"> // this.pCid = 0;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> handleDrop(draggingNode, dropNode, dropType, ev) &#123;</span><br><span class="line"> console.log(&quot;handleDrop: &quot;, draggingNode, dropNode, dropType);</span><br><span class="line"> //1、当前节点最新的父节点id</span><br><span class="line"> let pCid = 0;</span><br><span class="line"> let siblings = null;</span><br><span class="line"> if (dropType == &quot;before&quot; || dropType == &quot;after&quot;) &#123;</span><br><span class="line"> pCid =</span><br><span class="line"> dropNode.parent.data.catId == undefined</span><br><span class="line"> ? 0</span><br><span class="line"> : dropNode.parent.data.catId;</span><br><span class="line"> siblings = dropNode.parent.childNodes;</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> pCid = dropNode.data.catId;</span><br><span class="line"> siblings = dropNode.childNodes;</span><br><span class="line"> &#125;</span><br><span class="line"> this.pCid.push(pCid);</span><br><span class="line"></span><br><span class="line"> //2、当前拖拽节点的最新顺序</span><br><span class="line"> for (let i = 0; i &lt; siblings.length; i++) &#123;</span><br><span class="line"> if (siblings[i].data.catId == draggingNode.data.catId) &#123;</span><br><span class="line"> //如果遍历的是当前正在拖拽的节点</span><br><span class="line"> let catLevel = draggingNode.level;</span><br><span class="line"> if (siblings[i].level != draggingNode.level) &#123;</span><br><span class="line"> //当前节点的层级发生变化</span><br><span class="line"> catLevel = siblings[i].level;</span><br><span class="line"> //修改他子节点的层级</span><br><span class="line"> this.updateChildNodeLevel(siblings[i]);</span><br><span class="line"> &#125;</span><br><span class="line"> this.updateNodes.push(&#123;</span><br><span class="line"> catId: siblings[i].data.catId,</span><br><span class="line"> sort: i,</span><br><span class="line"> parentCid: pCid,</span><br><span class="line"> catLevel: catLevel</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> this.updateNodes.push(&#123; catId: siblings[i].data.catId, sort: i &#125;);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> //3、当前拖拽节点的最新层级</span><br><span class="line"> console.log(&quot;updateNodes&quot;, this.updateNodes);</span><br><span class="line"> &#125;,</span><br><span class="line"> updateChildNodeLevel(node) &#123;</span><br><span class="line"> if (node.childNodes.length &gt; 0) &#123;</span><br><span class="line"> for (let i = 0; i &lt; node.childNodes.length; i++) &#123;</span><br><span class="line"> var cNode = node.childNodes[i].data;</span><br><span class="line"> this.updateNodes.push(&#123;</span><br><span class="line"> catId: cNode.catId,</span><br><span class="line"> catLevel: node.childNodes[i].level</span><br><span class="line"> &#125;);</span><br><span class="line"> this.updateChildNodeLevel(node.childNodes[i]);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;,</span><br><span class="line"> allowDrop(draggingNode, dropNode, type) &#123;</span><br><span class="line"> //1、被拖动的当前节点以及所在的父节点总层数不能大于3</span><br><span class="line"></span><br><span class="line"> //1、被拖动的当前节点总层数</span><br><span class="line"> console.log(&quot;allowDrop:&quot;, draggingNode, dropNode, type);</span><br><span class="line"> //</span><br><span class="line"> this.countNodeLevel(draggingNode);</span><br><span class="line"> //当前正在拖动的节点+父节点所在的深度不大于3即可</span><br><span class="line"> let deep = Math.abs(this.maxLevel - draggingNode.level) + 1;</span><br><span class="line"> console.log(&quot;深度:&quot;, deep);</span><br><span class="line"></span><br><span class="line"> // this.maxLevel</span><br><span class="line"> if (type == &quot;inner&quot;) &#123;</span><br><span class="line"> // console.log(</span><br><span class="line"> // `this.maxLevel$&#123;this.maxLevel&#125;draggingNode.data.catLevel$&#123;draggingNode.data.catLevel&#125;dropNode.level$&#123;dropNode.level&#125;`</span><br><span class="line"> // );</span><br><span class="line"> return deep + dropNode.level &lt;= 3;</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> return deep + dropNode.parent.level &lt;= 3;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;,</span><br><span class="line"> countNodeLevel(node) &#123;</span><br><span class="line"> //找到所有子节点,求出最大深度</span><br><span class="line"> if (node.childNodes != null &amp;&amp; node.childNodes.length &gt; 0) &#123;</span><br><span class="line"> for (let i = 0; i &lt; node.childNodes.length; i++) &#123;</span><br><span class="line"> if (node.childNodes[i].level &gt; this.maxLevel) &#123;</span><br><span class="line"> this.maxLevel = node.childNodes[i].level;</span><br><span class="line"> &#125;</span><br><span class="line"> this.countNodeLevel(node.childNodes[i]);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;,</span><br><span class="line"> edit(data) &#123;</span><br><span class="line"> console.log(&quot;要修改的数据&quot;, data);</span><br><span class="line"> this.dialogType = &quot;edit&quot;;</span><br><span class="line"> this.title = &quot;修改分类&quot;;</span><br><span class="line"> this.dialogVisible = true;</span><br><span class="line"></span><br><span class="line"> //发送请求获取当前节点最新的数据</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(`/product/category/info/$&#123;data.catId&#125;`),</span><br><span class="line"> method: &quot;get&quot;</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> //请求成功</span><br><span class="line"> console.log(&quot;要回显的数据&quot;, data);</span><br><span class="line"> this.category.name = data.data.name;</span><br><span class="line"> this.category.catId = data.data.catId;</span><br><span class="line"> this.category.icon = data.data.icon;</span><br><span class="line"> this.category.productUnit = data.data.productUnit;</span><br><span class="line"> this.category.parentCid = data.data.parentCid;</span><br><span class="line"> this.category.catLevel = data.data.catLevel;</span><br><span class="line"> this.category.sort = data.data.sort;</span><br><span class="line"> this.category.showStatus = data.data.showStatus;</span><br><span class="line"> /**</span><br><span class="line"> * parentCid: 0,</span><br><span class="line"> catLevel: 0,</span><br><span class="line"> showStatus: 1,</span><br><span class="line"> sort: 0,</span><br><span class="line"> */</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> append(data) &#123;</span><br><span class="line"> console.log(&quot;append&quot;, data);</span><br><span class="line"> this.dialogType = &quot;add&quot;;</span><br><span class="line"> this.title = &quot;添加分类&quot;;</span><br><span class="line"> this.dialogVisible = true;</span><br><span class="line"> this.category.parentCid = data.catId;</span><br><span class="line"> this.category.catLevel = data.catLevel * 1 + 1;</span><br><span class="line"> this.category.catId = null;</span><br><span class="line"> this.category.name = &quot;&quot;;</span><br><span class="line"> this.category.icon = &quot;&quot;;</span><br><span class="line"> this.category.productUnit = &quot;&quot;;</span><br><span class="line"> this.category.sort = 0;</span><br><span class="line"> this.category.showStatus = 1;</span><br><span class="line"> &#125;,</span><br><span class="line"></span><br><span class="line"> submitData() &#123;</span><br><span class="line"> if (this.dialogType == &quot;add&quot;) &#123;</span><br><span class="line"> this.addCategory();</span><br><span class="line"> &#125;</span><br><span class="line"> if (this.dialogType == &quot;edit&quot;) &#123;</span><br><span class="line"> this.editCategory();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;,</span><br><span class="line"> //修改三级分类数据</span><br><span class="line"> editCategory() &#123;</span><br><span class="line"> var &#123; catId, name, icon, productUnit &#125; = this.category;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/update&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(&#123; catId, name, icon, productUnit &#125;, false)</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;菜单修改成功&quot;,</span><br><span class="line"> type: &quot;success&quot;</span><br><span class="line"> &#125;);</span><br><span class="line"> //关闭对话框</span><br><span class="line"> this.dialogVisible = false;</span><br><span class="line"> //刷新出新的菜单</span><br><span class="line"> this.getMenus();</span><br><span class="line"> //设置需要默认展开的菜单</span><br><span class="line"> this.expandedKey = [this.category.parentCid];</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> //添加三级分类</span><br><span class="line"> addCategory() &#123;</span><br><span class="line"> console.log(&quot;提交的三级分类数据&quot;, this.category);</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/save&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(this.category, false)</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;菜单保存成功&quot;,</span><br><span class="line"> type: &quot;success&quot;</span><br><span class="line"> &#125;);</span><br><span class="line"> //关闭对话框</span><br><span class="line"> this.dialogVisible = false;</span><br><span class="line"> //刷新出新的菜单</span><br><span class="line"> this.getMenus();</span><br><span class="line"> //设置需要默认展开的菜单</span><br><span class="line"> this.expandedKey = [this.category.parentCid];</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"></span><br><span class="line"> remove(node, data) &#123;</span><br><span class="line"> var ids = [data.catId];</span><br><span class="line"> this.$confirm(`是否删除【$&#123;data.name&#125;】菜单?`, &quot;提示&quot;, &#123;</span><br><span class="line"> confirmButtonText: &quot;确定&quot;,</span><br><span class="line"> cancelButtonText: &quot;取消&quot;,</span><br><span class="line"> type: &quot;warning&quot;</span><br><span class="line"> &#125;)</span><br><span class="line"> .then(() =&gt; &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/delete&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(ids, false)</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;菜单删除成功&quot;,</span><br><span class="line"> type: &quot;success&quot;</span><br><span class="line"> &#125;);</span><br><span class="line"> //刷新出新的菜单</span><br><span class="line"> this.getMenus();</span><br><span class="line"> //设置需要默认展开的菜单</span><br><span class="line"> this.expandedKey = [node.parent.data.catId];</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;)</span><br><span class="line"> .catch(() =&gt; &#123;&#125;);</span><br><span class="line"></span><br><span class="line"> console.log(&quot;remove&quot;, node, data);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;,</span><br><span class="line"> //生命周期 - 创建完成可以访问当前this实例</span><br><span class="line"> created() &#123;</span><br><span class="line"> this.getMenus();</span><br><span class="line"> &#125;,</span><br><span class="line"> //生命周期 - 挂载完成可以访问DOM元素</span><br><span class="line"> mounted() &#123;&#125;,</span><br><span class="line"> beforeCreate() &#123;&#125;, //生命周期 - 创建之前</span><br><span class="line"> beforeMount() &#123;&#125;, //生命周期 - 挂载之前</span><br><span class="line"> beforeUpdate() &#123;&#125;, //生命周期 - 更新之前</span><br><span class="line"> updated() &#123;&#125;, //生命周期 - 更新之后</span><br><span class="line"> beforeDestroy() &#123;&#125;, //生命周期 - 销毁之前</span><br><span class="line"> destroyed() &#123;&#125;, //生命周期 - 销毁完成</span><br><span class="line"> activated() &#123;&#125; //如果页面有keep-alive缓存功能这个函数会触发</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br><span class="line">&lt;style scoped&gt;</span><br><span class="line">&lt;/style&gt;</span><br></pre></td></tr></table></figure>
<p>后端的代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 批量修改商品的分类信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/update/sort&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">updateSort</span><span class="params">(<span class="meta">@RequestBody</span> CategoryEntity[] categoryEntities)</span> &#123;</span><br><span class="line"> categoryService.updateBatchById(Arrays.asList(categoryEntities));</span><br><span class="line"> <span class="keyword">return</span> R.ok();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="1-2-品牌管理"><a href="#1-2-品牌管理" class="headerlink" title="1.2 品牌管理"></a>1.2 品牌管理</h3><h4 id="1-2-1-品牌的增删改查功能"><a href="#1-2-1-品牌的增删改查功能" class="headerlink" title="1.2.1 品牌的增删改查功能"></a>1.2.1 品牌的增删改查功能</h4><p>这里前端的代码是和先前生成的后端的代码一起生成的</p>
<p><img src="/pictures/image-20230611111440999.png" alt="image-20230611111440999"></p>
<p><strong>商品品牌的列表显示</strong></p>
<p>优化之后的前端的代码 (表头的优化 需要按钮显示的使用按钮进行显示)</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;div class=&quot;mod-config&quot;&gt;</span><br><span class="line"> &lt;el-form</span><br><span class="line"> :inline=&quot;true&quot;</span><br><span class="line"> :model=&quot;dataForm&quot;</span><br><span class="line"> @keyup.enter.native=&quot;getDataList()&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-form-item&gt;</span><br><span class="line"> &lt;el-input</span><br><span class="line"> v-model=&quot;dataForm.key&quot;</span><br><span class="line"> placeholder=&quot;参数名&quot;</span><br><span class="line"> clearable</span><br><span class="line"> &gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item&gt;</span><br><span class="line"> &lt;el-button @click=&quot;getDataList()&quot;&gt;查询&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;isAuth(&#x27;product:brand:save&#x27;)&quot;</span><br><span class="line"> type=&quot;primary&quot;</span><br><span class="line"> @click=&quot;addOrUpdateHandle()&quot;</span><br><span class="line"> &gt;新增&lt;/el-button</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;isAuth(&#x27;product:brand:delete&#x27;)&quot;</span><br><span class="line"> type=&quot;danger&quot;</span><br><span class="line"> @click=&quot;deleteHandle()&quot;</span><br><span class="line"> :disabled=&quot;dataListSelections.length &lt;= 0&quot;</span><br><span class="line"> &gt;批量删除&lt;/el-button</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;/el-form&gt;</span><br><span class="line"> &lt;el-table</span><br><span class="line"> :data=&quot;dataList&quot;</span><br><span class="line"> border</span><br><span class="line"> v-loading=&quot;dataListLoading&quot;</span><br><span class="line"> @selection-change=&quot;selectionChangeHandle&quot;</span><br><span class="line"> style=&quot;width: 100%&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> type=&quot;selection&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> width=&quot;50&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;brandId&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;品牌id&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;name&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;品牌名&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;logo&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;品牌logo地址&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;descript&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;介绍&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;showStatus&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;显示状态&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;template slot-scope=&quot;scope&quot;&gt;</span><br><span class="line"> &lt;el-switch</span><br><span class="line"> v-model=&quot;scope.row.showStatus&quot;</span><br><span class="line"> active-color=&quot;#13ce66&quot;</span><br><span class="line"> inactive-color=&quot;#ff4949&quot;</span><br><span class="line"> :active-value=&quot;1&quot;</span><br><span class="line"> :inactive-value=&quot;0&quot;</span><br><span class="line"> @change=&quot;updateBrandStatus(scope.row)&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-switch&gt;</span><br><span class="line"> &lt;/template&gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;firstLetter&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;检索首字母&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;sort&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;排序&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> fixed=&quot;right&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> width=&quot;150&quot;</span><br><span class="line"> label=&quot;操作&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;template slot-scope=&quot;scope&quot;&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;small&quot;</span><br><span class="line"> @click=&quot;addOrUpdateHandle(scope.row.brandId)&quot;</span><br><span class="line"> &gt;修改&lt;/el-button</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;small&quot;</span><br><span class="line"> @click=&quot;deleteHandle(scope.row.brandId)&quot;</span><br><span class="line"> &gt;删除&lt;/el-button</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/template&gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;/el-table&gt;</span><br><span class="line"> &lt;el-pagination</span><br><span class="line"> @size-change=&quot;sizeChangeHandle&quot;</span><br><span class="line"> @current-change=&quot;currentChangeHandle&quot;</span><br><span class="line"> :current-page=&quot;pageIndex&quot;</span><br><span class="line"> :page-sizes=&quot;[10, 20, 50, 100]&quot;</span><br><span class="line"> :page-size=&quot;pageSize&quot;</span><br><span class="line"> :total=&quot;totalPage&quot;</span><br><span class="line"> layout=&quot;total, sizes, prev, pager, next, jumper&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-pagination&gt;</span><br><span class="line"> &lt;!-- 弹窗, 新增 / 修改 --&gt;</span><br><span class="line"> &lt;add-or-update</span><br><span class="line"> v-if=&quot;addOrUpdateVisible&quot;</span><br><span class="line"> ref=&quot;addOrUpdate&quot;</span><br><span class="line"> @refreshDataList=&quot;getDataList&quot;</span><br><span class="line"> &gt;&lt;/add-or-update&gt;</span><br><span class="line"> &lt;/div&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line">import AddOrUpdate from &quot;./brand-add-or-update&quot;;</span><br><span class="line">export default &#123;</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> dataForm: &#123;</span><br><span class="line"> key: &quot;&quot;,</span><br><span class="line"> &#125;,</span><br><span class="line"> dataList: [],</span><br><span class="line"> pageIndex: 1,</span><br><span class="line"> pageSize: 10,</span><br><span class="line"> totalPage: 0,</span><br><span class="line"> dataListLoading: false,</span><br><span class="line"> dataListSelections: [],</span><br><span class="line"> addOrUpdateVisible: false,</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> components: &#123;</span><br><span class="line"> AddOrUpdate,</span><br><span class="line"> &#125;,</span><br><span class="line"> activated() &#123;</span><br><span class="line"> this.getDataList();</span><br><span class="line"> &#125;,</span><br><span class="line"> methods: &#123;</span><br><span class="line"> //修改品牌的显示的状态的</span><br><span class="line"> updateBrandStatus(data) &#123;</span><br><span class="line"> console.log(&quot;修改的状态信息:&quot;, data);</span><br><span class="line"> let &#123; brandId, showStatus &#125; = data;</span><br><span class="line"> //发送修改状态的请求</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(`/product/brand/update`),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(</span><br><span class="line"> &#123; brandId: brandId, showStatus: showStatus &#125;,</span><br><span class="line"> false</span><br><span class="line"> ),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;状态更新成功&quot;,</span><br><span class="line"> type: &quot;success&quot;,</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> // 获取数据列表</span><br><span class="line"> getDataList() &#123;</span><br><span class="line"> this.dataListLoading = true;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/brand/list&quot;),</span><br><span class="line"> method: &quot;get&quot;,</span><br><span class="line"> params: this.$http.adornParams(&#123;</span><br><span class="line"> page: this.pageIndex,</span><br><span class="line"> limit: this.pageSize,</span><br><span class="line"> key: this.dataForm.key,</span><br><span class="line"> &#125;),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> if (data &amp;&amp; data.code === 0) &#123;</span><br><span class="line"> this.dataList = data.page.list;</span><br><span class="line"> this.totalPage = data.page.totalCount;</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> this.dataList = [];</span><br><span class="line"> this.totalPage = 0;</span><br><span class="line"> &#125;</span><br><span class="line"> this.dataListLoading = false;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> // 每页数</span><br><span class="line"> sizeChangeHandle(val) &#123;</span><br><span class="line"> this.pageSize = val;</span><br><span class="line"> this.pageIndex = 1;</span><br><span class="line"> this.getDataList();</span><br><span class="line"> &#125;,</span><br><span class="line"> // 当前页</span><br><span class="line"> currentChangeHandle(val) &#123;</span><br><span class="line"> this.pageIndex = val;</span><br><span class="line"> this.getDataList();</span><br><span class="line"> &#125;,</span><br><span class="line"> // 多选</span><br><span class="line"> selectionChangeHandle(val) &#123;</span><br><span class="line"> this.dataListSelections = val;</span><br><span class="line"> &#125;,</span><br><span class="line"> // 新增 / 修改</span><br><span class="line"> addOrUpdateHandle(id) &#123;</span><br><span class="line"> this.addOrUpdateVisible = true;</span><br><span class="line"> this.$nextTick(() =&gt; &#123;</span><br><span class="line"> this.$refs.addOrUpdate.init(id);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> // 删除</span><br><span class="line"> deleteHandle(id) &#123;</span><br><span class="line"> var ids = id</span><br><span class="line"> ? [id]</span><br><span class="line"> : this.dataListSelections.map((item) =&gt; &#123;</span><br><span class="line"> return item.brandId;</span><br><span class="line"> &#125;);</span><br><span class="line"> this.$confirm(</span><br><span class="line"> `确定对[id=$&#123;ids.join(&quot;,&quot;)&#125;]进行[$&#123;id ? &quot;删除&quot; : &quot;批量删除&quot;&#125;]操作?`,</span><br><span class="line"> &quot;提示&quot;,</span><br><span class="line"> &#123;</span><br><span class="line"> confirmButtonText: &quot;确定&quot;,</span><br><span class="line"> cancelButtonText: &quot;取消&quot;,</span><br><span class="line"> type: &quot;warning&quot;,</span><br><span class="line"> &#125;</span><br><span class="line"> ).then(() =&gt; &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/brand/delete&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(ids, false),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> if (data &amp;&amp; data.code === 0) &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;操作成功&quot;,</span><br><span class="line"> type: &quot;success&quot;,</span><br><span class="line"> duration: 1500,</span><br><span class="line"> onClose: () =&gt; &#123;</span><br><span class="line"> this.getDataList();</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> this.$message.error(data.msg);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;,</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br></pre></td></tr></table></figure>
<p>后端代码(修改品牌的显示状态)</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 修改</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/update&quot;)</span></span><br><span class="line"><span class="comment">//@RequiresPermissions(&quot;product:brand:update&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">update</span><span class="params">(<span class="meta">@RequestBody</span> BrandEntity brand)</span>&#123;</span><br><span class="line"> brandService.updateById(brand);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> R.ok();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>品牌添加功能</strong></p>
<p><strong><a href="https://qingling.icu/posts/6319.html">阿里云对象存储OSS | The Blog (qingling.icu)</a></strong></p>
<p><img src="/pictures/image-20230611153418426.png" alt="image-20230611153418426"></p>
<p><strong>前端的代码</strong></p>
<p>品牌管理的列表页面</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;div class=&quot;mod-config&quot;&gt;</span><br><span class="line"> &lt;el-form</span><br><span class="line"> :inline=&quot;true&quot;</span><br><span class="line"> :model=&quot;dataForm&quot;</span><br><span class="line"> @keyup.enter.native=&quot;getDataList()&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-form-item&gt;</span><br><span class="line"> &lt;el-input</span><br><span class="line"> v-model=&quot;dataForm.key&quot;</span><br><span class="line"> placeholder=&quot;参数名&quot;</span><br><span class="line"> clearable</span><br><span class="line"> &gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item&gt;</span><br><span class="line"> &lt;el-button @click=&quot;getDataList()&quot;&gt;查询&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;isAuth(&#x27;product:brand:save&#x27;)&quot;</span><br><span class="line"> type=&quot;primary&quot;</span><br><span class="line"> @click=&quot;addOrUpdateHandle()&quot;</span><br><span class="line"> &gt;新增&lt;/el-button</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;isAuth(&#x27;product:brand:delete&#x27;)&quot;</span><br><span class="line"> type=&quot;danger&quot;</span><br><span class="line"> @click=&quot;deleteHandle()&quot;</span><br><span class="line"> :disabled=&quot;dataListSelections.length &lt;= 0&quot;</span><br><span class="line"> &gt;批量删除&lt;/el-button</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;/el-form&gt;</span><br><span class="line"> &lt;el-table</span><br><span class="line"> :data=&quot;dataList&quot;</span><br><span class="line"> border</span><br><span class="line"> v-loading=&quot;dataListLoading&quot;</span><br><span class="line"> @selection-change=&quot;selectionChangeHandle&quot;</span><br><span class="line"> style=&quot;width: 100%&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> type=&quot;selection&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> width=&quot;50&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;brandId&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;品牌id&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;name&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;品牌名&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;logo&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;品牌logo地址&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;template slot-scope=&quot;scope&quot;&gt;</span><br><span class="line"> &lt;img :src=&quot;scope.row.logo&quot; style=&quot;width: 100px; height: 80px&quot;&gt;</span><br><span class="line"> &lt;/template&gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;descript&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;介绍&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;showStatus&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;显示状态&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;template slot-scope=&quot;scope&quot;&gt;</span><br><span class="line"> &lt;el-switch</span><br><span class="line"> v-model=&quot;scope.row.showStatus&quot;</span><br><span class="line"> active-color=&quot;#13ce66&quot;</span><br><span class="line"> inactive-color=&quot;#ff4949&quot;</span><br><span class="line"> :active-value=&quot;1&quot;</span><br><span class="line"> :inactive-value=&quot;0&quot;</span><br><span class="line"> @change=&quot;updateBrandStatus(scope.row)&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-switch&gt;</span><br><span class="line"> &lt;/template&gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;firstLetter&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;检索首字母&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;sort&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;排序&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> fixed=&quot;right&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> width=&quot;150&quot;</span><br><span class="line"> label=&quot;操作&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;template slot-scope=&quot;scope&quot;&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;small&quot;</span><br><span class="line"> @click=&quot;addOrUpdateHandle(scope.row.brandId)&quot;</span><br><span class="line"> &gt;修改&lt;/el-button</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;small&quot;</span><br><span class="line"> @click=&quot;deleteHandle(scope.row.brandId)&quot;</span><br><span class="line"> &gt;删除&lt;/el-button</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/template&gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;/el-table&gt;</span><br><span class="line"> &lt;el-pagination</span><br><span class="line"> @size-change=&quot;sizeChangeHandle&quot;</span><br><span class="line"> @current-change=&quot;currentChangeHandle&quot;</span><br><span class="line"> :current-page=&quot;pageIndex&quot;</span><br><span class="line"> :page-sizes=&quot;[10, 20, 50, 100]&quot;</span><br><span class="line"> :page-size=&quot;pageSize&quot;</span><br><span class="line"> :total=&quot;totalPage&quot;</span><br><span class="line"> layout=&quot;total, sizes, prev, pager, next, jumper&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-pagination&gt;</span><br><span class="line"> &lt;!-- 弹窗, 新增 / 修改 --&gt;</span><br><span class="line"> &lt;add-or-update</span><br><span class="line"> v-if=&quot;addOrUpdateVisible&quot;</span><br><span class="line"> ref=&quot;addOrUpdate&quot;</span><br><span class="line"> @refreshDataList=&quot;getDataList&quot;</span><br><span class="line"> &gt;&lt;/add-or-update&gt;</span><br><span class="line"> &lt;/div&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line">import AddOrUpdate from &quot;./brand-add-or-update&quot;;</span><br><span class="line">export default &#123;</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> dataForm: &#123;</span><br><span class="line"> key: &quot;&quot;,</span><br><span class="line"> &#125;,</span><br><span class="line"> dataList: [],</span><br><span class="line"> pageIndex: 1,</span><br><span class="line"> pageSize: 10,</span><br><span class="line"> totalPage: 0,</span><br><span class="line"> dataListLoading: false,</span><br><span class="line"> dataListSelections: [],</span><br><span class="line"> addOrUpdateVisible: false,</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> components: &#123;</span><br><span class="line"> AddOrUpdate,</span><br><span class="line"> &#125;,</span><br><span class="line"> activated() &#123;</span><br><span class="line"> this.getDataList();</span><br><span class="line"> &#125;,</span><br><span class="line"> methods: &#123;</span><br><span class="line"> //修改品牌的显示的状态的</span><br><span class="line"> updateBrandStatus(data) &#123;</span><br><span class="line"> console.log(&quot;修改的状态信息:&quot;, data);</span><br><span class="line"> let &#123; brandId, showStatus &#125; = data;</span><br><span class="line"> //发送修改状态的请求</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(`/product/brand/update`),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(</span><br><span class="line"> &#123; brandId: brandId, showStatus: showStatus &#125;,</span><br><span class="line"> false</span><br><span class="line"> ),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;状态更新成功&quot;,</span><br><span class="line"> type: &quot;success&quot;,</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> // 获取数据列表</span><br><span class="line"> getDataList() &#123;</span><br><span class="line"> this.dataListLoading = true;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/brand/list&quot;),</span><br><span class="line"> method: &quot;get&quot;,</span><br><span class="line"> params: this.$http.adornParams(&#123;</span><br><span class="line"> page: this.pageIndex,</span><br><span class="line"> limit: this.pageSize,</span><br><span class="line"> key: this.dataForm.key,</span><br><span class="line"> &#125;),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> if (data &amp;&amp; data.code === 0) &#123;</span><br><span class="line"> this.dataList = data.page.list;</span><br><span class="line"> this.totalPage = data.page.totalCount;</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> this.dataList = [];</span><br><span class="line"> this.totalPage = 0;</span><br><span class="line"> &#125;</span><br><span class="line"> this.dataListLoading = false;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> // 每页数</span><br><span class="line"> sizeChangeHandle(val) &#123;</span><br><span class="line"> this.pageSize = val;</span><br><span class="line"> this.pageIndex = 1;</span><br><span class="line"> this.getDataList();</span><br><span class="line"> &#125;,</span><br><span class="line"> // 当前页</span><br><span class="line"> currentChangeHandle(val) &#123;</span><br><span class="line"> this.pageIndex = val;</span><br><span class="line"> this.getDataList();</span><br><span class="line"> &#125;,</span><br><span class="line"> // 多选</span><br><span class="line"> selectionChangeHandle(val) &#123;</span><br><span class="line"> this.dataListSelections = val;</span><br><span class="line"> &#125;,</span><br><span class="line"> // 新增 / 修改</span><br><span class="line"> addOrUpdateHandle(id) &#123;</span><br><span class="line"> this.addOrUpdateVisible = true;</span><br><span class="line"> this.$nextTick(() =&gt; &#123;</span><br><span class="line"> this.$refs.addOrUpdate.init(id);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> // 删除</span><br><span class="line"> deleteHandle(id) &#123;</span><br><span class="line"> var ids = id</span><br><span class="line"> ? [id]</span><br><span class="line"> : this.dataListSelections.map((item) =&gt; &#123;</span><br><span class="line"> return item.brandId;</span><br><span class="line"> &#125;);</span><br><span class="line"> this.$confirm(</span><br><span class="line"> `确定对[id=$&#123;ids.join(&quot;,&quot;)&#125;]进行[$&#123;id ? &quot;删除&quot; : &quot;批量删除&quot;&#125;]操作?`,</span><br><span class="line"> &quot;提示&quot;,</span><br><span class="line"> &#123;</span><br><span class="line"> confirmButtonText: &quot;确定&quot;,</span><br><span class="line"> cancelButtonText: &quot;取消&quot;,</span><br><span class="line"> type: &quot;warning&quot;,</span><br><span class="line"> &#125;</span><br><span class="line"> ).then(() =&gt; &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/brand/delete&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(ids, false),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> if (data &amp;&amp; data.code === 0) &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;操作成功&quot;,</span><br><span class="line"> type: &quot;success&quot;,</span><br><span class="line"> duration: 1500,</span><br><span class="line"> onClose: () =&gt; &#123;</span><br><span class="line"> this.getDataList();</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> this.$message.error(data.msg);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;,</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>品牌管理的添加和修改组件</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;el-dialog</span><br><span class="line"> :title=&quot;!dataForm.brandId ? &#x27;新增&#x27; : &#x27;修改&#x27;&quot;</span><br><span class="line"> :close-on-click-modal=&quot;false&quot;</span><br><span class="line"> :visible.sync=&quot;visible&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-form</span><br><span class="line"> :model=&quot;dataForm&quot;</span><br><span class="line"> :rules=&quot;dataRule&quot;</span><br><span class="line"> ref=&quot;dataForm&quot;</span><br><span class="line"> @keyup.enter.native=&quot;dataFormSubmit()&quot;</span><br><span class="line"> label-width=&quot;140px&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-form-item label=&quot;品牌名&quot; prop=&quot;name&quot;&gt;</span><br><span class="line"> &lt;el-input v-model=&quot;dataForm.name&quot; placeholder=&quot;品牌名&quot;&gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item label=&quot;品牌logo地址&quot; prop=&quot;logo&quot;&gt;</span><br><span class="line"> &lt;!-- &lt;el-input v-model=&quot;dataForm.logo&quot; placeholder=&quot;品牌logo地址&quot;&gt;&lt;/el-input&gt; --&gt;</span><br><span class="line"> &lt;!-- 自定义的组件 --&gt;</span><br><span class="line"> &lt;SingleUpload v-model=&quot;dataForm.logo&quot;&gt;&lt;/SingleUpload&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item label=&quot;介绍&quot; prop=&quot;descript&quot;&gt;</span><br><span class="line"> &lt;el-input v-model=&quot;dataForm.descript&quot; placeholder=&quot;介绍&quot;&gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item label=&quot;显示状态&quot; prop=&quot;showStatus&quot;&gt;</span><br><span class="line"> &lt;el-switch</span><br><span class="line"> v-model=&quot;dataForm.showStatus&quot;</span><br><span class="line"> active-color=&quot;#13ce66&quot;</span><br><span class="line"> inactive-color=&quot;#ff4949&quot;</span><br><span class="line"> :active-value=&quot;1&quot;</span><br><span class="line"> :inactive-value=&quot;0&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-switch&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item label=&quot;检索首字母&quot; prop=&quot;firstLetter&quot;&gt;</span><br><span class="line"> &lt;el-input</span><br><span class="line"> v-model=&quot;dataForm.firstLetter&quot;</span><br><span class="line"> placeholder=&quot;检索首字母&quot;</span><br><span class="line"> &gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item label=&quot;排序&quot; prop=&quot;sort&quot;&gt;</span><br><span class="line"> &lt;el-input v-model.number=&quot;dataForm.sort&quot; placeholder=&quot;排序&quot;&gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;/el-form&gt;</span><br><span class="line"> &lt;span slot=&quot;footer&quot; class=&quot;dialog-footer&quot;&gt;</span><br><span class="line"> &lt;el-button @click=&quot;visible = false&quot;&gt;取消&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button type=&quot;primary&quot; @click=&quot;dataFormSubmit()&quot;&gt;确定&lt;/el-button&gt;</span><br><span class="line"> &lt;/span&gt;</span><br><span class="line"> &lt;/el-dialog&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line">import SingleUpload from &quot;@/components/upload/singleUpload&quot;;</span><br><span class="line">export default &#123;</span><br><span class="line"> components: &#123; SingleUpload &#125;, //声明一下组件</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> visible: false,</span><br><span class="line"> dataForm: &#123;</span><br><span class="line"> brandId: 0,</span><br><span class="line"> name: &quot;&quot;,</span><br><span class="line"> logo: &quot;&quot;,</span><br><span class="line"> descript: &quot;&quot;,</span><br><span class="line"> showStatus: 1,</span><br><span class="line"> firstLetter: &quot;&quot;,</span><br><span class="line"> sort: 0,</span><br><span class="line"> &#125;,</span><br><span class="line"> dataRule: &#123;</span><br><span class="line"> name: [&#123; required: true, message: &quot;品牌名不能为空&quot;, trigger: &quot;blur&quot; &#125;],</span><br><span class="line"> logo: [</span><br><span class="line"> &#123; required: true, message: &quot;品牌logo地址不能为空&quot;, trigger: &quot;blur&quot; &#125;,</span><br><span class="line"> ],</span><br><span class="line"> descript: [</span><br><span class="line"> &#123; required: true, message: &quot;介绍不能为空&quot;, trigger: &quot;blur&quot; &#125;,</span><br><span class="line"> ],</span><br><span class="line"> showStatus: [</span><br><span class="line"> &#123;</span><br><span class="line"> required: true,</span><br><span class="line"> message: &quot;显示状态[0-不显示1-显示]不能为空&quot;,</span><br><span class="line"> trigger: &quot;blur&quot;,</span><br><span class="line"> &#125;,</span><br><span class="line"> ],</span><br><span class="line"> firstLetter: [</span><br><span class="line"> &#123;</span><br><span class="line"> validator: (rule, value, callback) =&gt; &#123;</span><br><span class="line"> if (value == &quot;&quot;) &#123;</span><br><span class="line"> //检测是不是空串</span><br><span class="line"> callback(new Error(&quot;检索首字母不能为空&quot;));</span><br><span class="line"> &#125; else if (!/^[a-zA-Z]$/.test(value)) &#123;</span><br><span class="line"> //检测输入的是不是字母</span><br><span class="line"> callback(new Error(&quot;首字母必须是a-z或者A-Z&quot;));</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> //成功</span><br><span class="line"> callback();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;,</span><br><span class="line"> trigger: &quot;blur&quot;,</span><br><span class="line"> &#125;,</span><br><span class="line"> ],</span><br><span class="line"> sort: [</span><br><span class="line"> &#123;</span><br><span class="line"> validator: (rule, value, callback) =&gt; &#123;</span><br><span class="line"> if (value === &quot;&quot;) &#123;</span><br><span class="line"> //检测是不是空串</span><br><span class="line"> callback(new Error(&quot;排序不能为空&quot;));</span><br><span class="line"> &#125; else if (!Number.isInteger(value) || value &lt; 0) &#123;</span><br><span class="line"> //检测输入的是不是字母</span><br><span class="line"> callback(new Error(&quot;排序必须为整数并且大于0&quot;));</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> //成功</span><br><span class="line"> callback();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;,</span><br><span class="line"> trigger: &quot;blur&quot;,</span><br><span class="line"> &#125;,</span><br><span class="line"> ],</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> methods: &#123;</span><br><span class="line"> init(id) &#123;</span><br><span class="line"> this.dataForm.brandId = id || 0;</span><br><span class="line"> this.visible = true;</span><br><span class="line"> this.$nextTick(() =&gt; &#123;</span><br><span class="line"> this.$refs[&quot;dataForm&quot;].resetFields();</span><br><span class="line"> if (this.dataForm.brandId) &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(</span><br><span class="line"> `/product/brand/info/$&#123;this.dataForm.brandId&#125;`</span><br><span class="line"> ),</span><br><span class="line"> method: &quot;get&quot;,</span><br><span class="line"> params: this.$http.adornParams(),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> if (data &amp;&amp; data.code === 0) &#123;</span><br><span class="line"> this.dataForm.name = data.brand.name;</span><br><span class="line"> this.dataForm.logo = data.brand.logo;</span><br><span class="line"> this.dataForm.descript = data.brand.descript;</span><br><span class="line"> this.dataForm.showStatus = data.brand.showStatus;</span><br><span class="line"> this.dataForm.firstLetter = data.brand.firstLetter;</span><br><span class="line"> this.dataForm.sort = data.brand.sort;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> // 表单提交</span><br><span class="line"> dataFormSubmit() &#123;</span><br><span class="line"> this.$refs[&quot;dataForm&quot;].validate((valid) =&gt; &#123;</span><br><span class="line"> if (valid) &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(</span><br><span class="line"> `/product/brand/$&#123;!this.dataForm.brandId ? &quot;save&quot; : &quot;update&quot;&#125;`</span><br><span class="line"> ),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(&#123;</span><br><span class="line"> brandId: this.dataForm.brandId || undefined,</span><br><span class="line"> name: this.dataForm.name,</span><br><span class="line"> logo: this.dataForm.logo,</span><br><span class="line"> descript: this.dataForm.descript,</span><br><span class="line"> showStatus: this.dataForm.showStatus,</span><br><span class="line"> firstLetter: this.dataForm.firstLetter,</span><br><span class="line"> sort: this.dataForm.sort,</span><br><span class="line"> &#125;),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> if (data &amp;&amp; data.code === 0) &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;操作成功&quot;,</span><br><span class="line"> type: &quot;success&quot;,</span><br><span class="line"> duration: 1500,</span><br><span class="line"> onClose: () =&gt; &#123;</span><br><span class="line"> this.visible = false;</span><br><span class="line"> this.$emit(&quot;refreshDataList&quot;);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> this.$message.error(data.msg);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;,</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br></pre></td></tr></table></figure>
<p><strong>后端的代码</strong></p>
<p><em>图片上传相关的后台接口</em></p>
<p>配置文件<br>apllication.yml</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">cloud:</span></span><br><span class="line"> <span class="attr">nacos:</span></span><br><span class="line"> <span class="attr">discovery:</span></span><br><span class="line"> <span class="attr">server-addr:</span> <span class="number">127.0</span><span class="number">.0</span><span class="number">.1</span><span class="string">:8848</span></span><br><span class="line"> <span class="attr">alicloud:</span></span><br><span class="line"> <span class="attr">access-key:</span> <span class="string">XXXXXXXXXXXXXXXXXXXX</span></span><br><span class="line"> <span class="attr">secret-key:</span> <span class="string">XXXXXXXXXXXXXXXXXXXX</span></span><br><span class="line"> <span class="attr">oss:</span></span><br><span class="line"> <span class="attr">endpoint:</span> <span class="string">oss-cn-beijing.aliyuncs.com</span> </span><br><span class="line"> <span class="attr">bucket:</span> <span class="string">gulimall-0611</span> <span class="comment">#因为是公用的配置,这个配置是自己配置的</span></span><br><span class="line"></span><br><span class="line"> <span class="attr">application:</span></span><br><span class="line"> <span class="attr">name:</span> <span class="string">gulimall-third-party</span></span><br><span class="line"></span><br><span class="line"><span class="attr">server:</span></span><br><span class="line"> <span class="attr">port:</span> <span class="number">30000</span></span><br></pre></td></tr></table></figure>
<p>Controller</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.thirdparty.controller;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSS;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.OSSClientBuilder;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.common.utils.BinaryUtil;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.model.MatchMode;</span><br><span class="line"><span class="keyword">import</span> com.aliyun.oss.model.PolicyConditions;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.common.utils.R;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Autowired;</span><br><span class="line"><span class="keyword">import</span> org.springframework.beans.factory.annotation.Value;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RequestMapping;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RestController;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.text.SimpleDateFormat;</span><br><span class="line"><span class="keyword">import</span> java.util.Date;</span><br><span class="line"><span class="keyword">import</span> java.util.LinkedHashMap;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/6/11</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 阿里云对象存储的控制器方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"></span><br><span class="line"><span class="meta">@RestController</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">OSSController</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Autowired</span></span><br><span class="line"> OSS ossClient;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;spring.cloud.alicloud.oss.endpoint&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String endpoint;</span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;spring.cloud.alicloud.oss.bucket&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String bucket;</span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;spring.cloud.alicloud.access-key&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String accessId;</span><br><span class="line"> <span class="meta">@Value(&quot;$&#123;spring.cloud.alicloud.secret-key&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">private</span> String accessKey;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@RequestMapping(&quot;/oss/policy&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> R <span class="title function_">policy</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">// 填写Host地址格式为https://bucketname.endpoint。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">host</span> <span class="operator">=</span> <span class="string">&quot;https://&quot;</span>+bucket+<span class="string">&quot;.&quot;</span>+endpoint;</span><br><span class="line"> <span class="comment">// 设置上传回调URL即回调服务器地址用于处理应用服务器与OSS之间的通信。OSS会在文件上传完成后把文件上传信息通过此回调URL发送给应用服务器。</span></span><br><span class="line"> <span class="comment">//String callbackUrl = &quot;https://192.168.0.0:8888&quot;;</span></span><br><span class="line"> <span class="comment">// 设置上传到OSS文件的前缀可置空此项。置空后文件将上传至Bucket的根目录下。</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">format</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SimpleDateFormat</span>(<span class="string">&quot;yyyy/MM/dd&quot;</span>).format(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> <span class="type">String</span> <span class="variable">dir</span> <span class="operator">=</span> format+<span class="string">&quot;/&quot;</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// 创建ossClient实例。</span></span><br><span class="line"> <span class="type">OSS</span> <span class="variable">ossClient</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">OSSClientBuilder</span>().build(endpoint, accessId, accessKey);</span><br><span class="line"> Map&lt;String, String&gt; respMap = <span class="literal">null</span>;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">long</span> <span class="variable">expireTime</span> <span class="operator">=</span> <span class="number">30</span>;</span><br><span class="line"> <span class="type">long</span> <span class="variable">expireEndTime</span> <span class="operator">=</span> System.currentTimeMillis() + expireTime * <span class="number">1000</span>;</span><br><span class="line"> <span class="type">Date</span> <span class="variable">expiration</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Date</span>(expireEndTime);</span><br><span class="line"> <span class="type">PolicyConditions</span> <span class="variable">policyConds</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PolicyConditions</span>();</span><br><span class="line"> policyConds.addConditionItem(PolicyConditions.COND_CONTENT_LENGTH_RANGE, <span class="number">0</span>, <span class="number">1048576000</span>);</span><br><span class="line"> policyConds.addConditionItem(MatchMode.StartWith, PolicyConditions.COND_KEY, dir);</span><br><span class="line"></span><br><span class="line"> <span class="type">String</span> <span class="variable">postPolicy</span> <span class="operator">=</span> ossClient.generatePostPolicy(expiration, policyConds);</span><br><span class="line"> <span class="type">byte</span>[] binaryData = postPolicy.getBytes(<span class="string">&quot;utf-8&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">encodedPolicy</span> <span class="operator">=</span> BinaryUtil.toBase64String(binaryData);</span><br><span class="line"> <span class="type">String</span> <span class="variable">postSignature</span> <span class="operator">=</span> ossClient.calculatePostSignature(postPolicy);</span><br><span class="line"></span><br><span class="line"> respMap = <span class="keyword">new</span> <span class="title class_">LinkedHashMap</span>&lt;String, String&gt;();</span><br><span class="line"> respMap.put(<span class="string">&quot;accessId&quot;</span>, accessId);</span><br><span class="line"> respMap.put(<span class="string">&quot;policy&quot;</span>, encodedPolicy);</span><br><span class="line"> respMap.put(<span class="string">&quot;signature&quot;</span>, postSignature);</span><br><span class="line"> respMap.put(<span class="string">&quot;dir&quot;</span>, dir);</span><br><span class="line"> respMap.put(<span class="string">&quot;host&quot;</span>, host);</span><br><span class="line"> respMap.put(<span class="string">&quot;expire&quot;</span>, String.valueOf(expireEndTime / <span class="number">1000</span>));</span><br><span class="line"> <span class="comment">// respMap.put(&quot;expire&quot;, formatISO8601Date(expiration));</span></span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> System.out.println(e.getMessage());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> R.ok().put(<span class="string">&quot;data&quot;</span>,respMap);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>配置网关,通过网关访问到该接口</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="bullet">-</span> <span class="attr">id:</span> <span class="string">third_party_route</span></span><br><span class="line"> <span class="attr">uri:</span> <span class="string">lb://gulimall-third-party</span></span><br><span class="line"> <span class="attr">predicates:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">Path=/api/thirdparty/**</span></span><br><span class="line"> <span class="attr">filters:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">RewritePath=/api/thirdparty/(?&lt;segment&gt;.*),/$\&#123;segment&#125;</span></span><br></pre></td></tr></table></figure>
<h4 id="1-2-2-JSR303-数据校验"><a href="#1-2-2-JSR303-数据校验" class="headerlink" title="1.2.2 JSR303-数据校验"></a>1.2.2 JSR303-数据校验</h4><p><strong><a href="https://qingling.icu/posts/27166.html">数据校验 | The Blog (qingling.icu)</a></strong></p>
<p>1.依赖文件</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.hibernate<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>hibernate-validator<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>6.0.7.Final<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>2.在实体类上添加上校验的规则</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.product.entity;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableId;</span><br><span class="line"><span class="keyword">import</span> com.baomidou.mybatisplus.annotation.TableName;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.Serializable;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"><span class="keyword">import</span> org.hibernate.validator.constraints.URL;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> javax.validation.constraints.*;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 品牌</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> JasonGong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@email</span> JasonGong@gmail.com</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@date</span> 2023-05-19 00:23:36</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@TableName(&quot;pms_brand&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">BrandEntity</span> <span class="keyword">implements</span> <span class="title class_">Serializable</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="type">long</span> <span class="variable">serialVersionUID</span> <span class="operator">=</span> <span class="number">1L</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 品牌id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@TableId</span></span><br><span class="line"> <span class="keyword">private</span> Long brandId;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 品牌名</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@NotBlank(message = &quot;品牌名必须提交&quot;)</span> <span class="comment">//非空的校验</span></span><br><span class="line"> <span class="keyword">private</span> String name;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 品牌logo地址</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@NotEmpty</span></span><br><span class="line"> <span class="meta">@URL(message = &quot;logo必须是一个合法的URL地址&quot;)</span><span class="comment">//URL的校验</span></span><br><span class="line"> <span class="keyword">private</span> String logo;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 介绍</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String descript;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 显示状态[0-不显示1-显示]</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Integer showStatus;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 检索首字母</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@NotEmpty</span></span><br><span class="line"> <span class="meta">@Pattern(regexp = &quot;^[a-zA-Z]$&quot;, message = &quot;检索首字母必须是一个字母&quot;)</span><span class="comment">//正则表达式的校验</span></span><br><span class="line"> <span class="keyword">private</span> String firstLetter;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 排序</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@NotNull</span></span><br><span class="line"> <span class="meta">@Min(value = 0, message = &quot;排序必须大于等于0&quot;)</span><span class="comment">//最小值是0</span></span><br><span class="line"> <span class="keyword">private</span> Integer sort;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>3.接口上开启检验,并自定义校验出错时的返回值</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存</span></span><br><span class="line"><span class="comment"> *&quot;<span class="doctag">@Valid</span>&quot; 开启校验</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> result 检验之后响应的结果信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@RequestMapping(&quot;/save&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">save</span><span class="params">(<span class="meta">@Valid</span> <span class="meta">@RequestBody</span> BrandEntity brand, BindingResult result)</span>&#123;</span><br><span class="line"> <span class="keyword">if</span>(result.hasErrors())&#123;</span><br><span class="line"> Map&lt;String,String&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//获取检验的错误结果</span></span><br><span class="line"> <span class="keyword">for</span> (FieldError fieldError : result.getFieldErrors()) &#123;</span><br><span class="line"> <span class="comment">//获取到错误的提示</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">defaultMessage</span> <span class="operator">=</span> fieldError.getDefaultMessage();</span><br><span class="line"> <span class="comment">//获取错误的属性的名字</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">field</span> <span class="operator">=</span> fieldError.getField();</span><br><span class="line"> map.put(field,defaultMessage);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> R.error(<span class="number">400</span>,<span class="string">&quot;提交的数据不合法&quot;</span>).put(<span class="string">&quot;data&quot;</span>,map);</span><br><span class="line"> &#125;<span class="keyword">else</span> &#123;</span><br><span class="line"> brandService.save(brand);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> R.ok();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>返回的json格式示例</p>
<p><img src="/pictures/image-20230612165021780.png" alt="image-20230612165021780"></p>
<h4 id="1-2-3-统一异常处理"><a href="#1-2-3-统一异常处理" class="headerlink" title="1.2.3 统一异常处理"></a>1.2.3 统一异常处理</h4><p><strong><a href="https://qingling.icu/posts/31385.html">统一异常处理 | The Blog (qingling.icu)</a></strong></p>
<p>统一异常返回状态码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.common.exception;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/6/12</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 返回的状态码信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">enum</span> <span class="title class_">BizCodeEnum</span> &#123;</span><br><span class="line"> UNKNOWN_EXCEPTION(<span class="number">10000</span>,<span class="string">&quot;系统未知异常&quot;</span>),</span><br><span class="line"> VALID_EXCEPTION(<span class="number">10001</span>,<span class="string">&quot;参数格式校验&quot;</span>);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> Integer code;</span><br><span class="line"> <span class="keyword">private</span> String msg;</span><br><span class="line"></span><br><span class="line"> BizCodeEnum(Integer code, String msg) &#123;</span><br><span class="line"> <span class="built_in">this</span>.code = code;</span><br><span class="line"> <span class="built_in">this</span>.msg = msg;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> Integer <span class="title function_">getCode</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> code;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">getMsg</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> msg;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>创建异常处理类</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.product.exception;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.atguigu.common.exception.BizCodeEnum;</span><br><span class="line"><span class="keyword">import</span> com.atguigu.common.utils.R;</span><br><span class="line"><span class="keyword">import</span> lombok.extern.slf4j.Slf4j;</span><br><span class="line"><span class="keyword">import</span> org.springframework.validation.BindingResult;</span><br><span class="line"><span class="keyword">import</span> org.springframework.validation.FieldError;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.MethodArgumentNotValidException;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.ExceptionHandler;</span><br><span class="line"><span class="keyword">import</span> org.springframework.web.bind.annotation.RestControllerAdvice;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.HashMap;</span><br><span class="line"><span class="keyword">import</span> java.util.Map;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/6/12</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 异常处理类</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Slf4j</span></span><br><span class="line"><span class="meta">@RestControllerAdvice(basePackages = &quot;com.atguigu.gulimall.product.controller&quot;)</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">GulimallExceptionControllerAdvice</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 统一处理数据校验的异常</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> e 数据校验的异常</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@ExceptionHandler(value = MethodArgumentNotValidException.class)</span></span><br><span class="line"> <span class="keyword">public</span> R <span class="title function_">handleValidException</span><span class="params">(MethodArgumentNotValidException e)</span>&#123;</span><br><span class="line"> log.error(<span class="string">&quot;数据校验出现问题:&#123;&#125;,异常类型:&#123;&#125;&quot;</span>,e.getMessage(),e.getClass());</span><br><span class="line"> Map&lt;String,String&gt; map = <span class="keyword">new</span> <span class="title class_">HashMap</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//获取检验的错误结果</span></span><br><span class="line"> <span class="type">BindingResult</span> <span class="variable">result</span> <span class="operator">=</span> e.getBindingResult();</span><br><span class="line"> <span class="keyword">for</span> (FieldError fieldError : result.getFieldErrors()) &#123;</span><br><span class="line"> <span class="comment">//获取到错误的提示</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">defaultMessage</span> <span class="operator">=</span> fieldError.getDefaultMessage();</span><br><span class="line"> <span class="comment">//获取错误的属性的名字</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">field</span> <span class="operator">=</span> fieldError.getField();</span><br><span class="line"> map.put(field,defaultMessage);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> R.error(BizCodeEnum.VALID_EXCEPTION.getCode(),BizCodeEnum.VALID_EXCEPTION.getMsg()).put(<span class="string">&quot;data&quot;</span>,map);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 捕获任意的异常</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@ExceptionHandler(value = Throwable.class)</span></span><br><span class="line"> <span class="keyword">public</span> R <span class="title function_">handleException</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> R.error(BizCodeEnum.UNKNOWN_EXCEPTION.getCode(), BizCodeEnum.UNKNOWN_EXCEPTION.getMsg());</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="1-2-4-关联分类功能"><a href="#1-2-4-关联分类功能" class="headerlink" title="1.2.4 关联分类功能"></a>1.2.4 关联分类功能</h4><p>功能截图</p>
<p><img src="/pictures/image-20230618232437618.png" alt="image-20230618232437618"></p>
<p>后端代码的实现</p>
<p>查询品牌和分类的关联关系</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查询商品的关联分类数据</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> brandId 品牌的id</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 关联的分类数据</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/catelog/list&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> R <span class="title function_">catelogList</span><span class="params">(<span class="meta">@RequestParam(&quot;brandId&quot;)</span> Long brandId)</span>&#123;</span><br><span class="line"> LambdaQueryWrapper&lt;CategoryBrandRelationEntity&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> queryWrapper.eq(CategoryBrandRelationEntity::getBrandId,brandId);</span><br><span class="line"> List&lt;CategoryBrandRelationEntity&gt; categoryBrandRelationEntityList = categoryBrandRelationService.list(queryWrapper);</span><br><span class="line"> <span class="keyword">return</span> R.ok().put(<span class="string">&quot;data&quot;</span>, categoryBrandRelationEntityList);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>新增品牌和商品的关联关系</p>
<p>controller</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存商品的关联的分类数据信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@PostMapping(&quot;/save&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> R <span class="title function_">saveCategoryBrandRelation</span><span class="params">(<span class="meta">@RequestBody</span> CategoryBrandRelationEntity categoryBrandRelation)</span>&#123;</span><br><span class="line"> categoryBrandRelationService.saveDetail(categoryBrandRelation);</span><br><span class="line"> <span class="keyword">return</span> R.ok();</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>service</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存商品和分类的关联数据</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> categoryBrandRelation 商品和分类的关联数据表</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">saveDetail</span><span class="params">(CategoryBrandRelationEntity categoryBrandRelation)</span> &#123;</span><br><span class="line"> <span class="comment">//获取品牌的id和关联分类的id</span></span><br><span class="line"> <span class="type">Long</span> <span class="variable">brandId</span> <span class="operator">=</span> categoryBrandRelation.getBrandId();</span><br><span class="line"> <span class="type">Long</span> <span class="variable">catelogId</span> <span class="operator">=</span> categoryBrandRelation.getCatelogId();</span><br><span class="line"> <span class="comment">//根据id查询对应的品牌名和分类名</span></span><br><span class="line"> <span class="type">BrandEntity</span> <span class="variable">brand</span> <span class="operator">=</span> brandDao.selectById(brandId);</span><br><span class="line"> <span class="type">CategoryEntity</span> <span class="variable">category</span> <span class="operator">=</span> categoryDao.selectById(catelogId);</span><br><span class="line"> <span class="comment">//设置值并保存</span></span><br><span class="line"> categoryBrandRelation.setBrandName(brand.getName());</span><br><span class="line"> categoryBrandRelation.setCatelogName(category.getName());</span><br><span class="line"> <span class="built_in">this</span>.save(categoryBrandRelation);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p><strong>注意</strong>:这里品牌和关联分类之间的关系表中使用了冗余的字段,所以在修改品牌的时候,关系表中的字段也要修改一下</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">updateDetail</span><span class="params">(BrandEntity brand)</span> &#123;</span><br><span class="line"> <span class="comment">//保证冗余字段的数据的一致性</span></span><br><span class="line"> <span class="comment">//更新品牌表中的数据</span></span><br><span class="line"> <span class="built_in">this</span>.updateById(brand);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(brand.getName())) &#123;</span><br><span class="line"> <span class="comment">//同步更新关联表中的数据</span></span><br><span class="line"> categoryBrandRelationService.updateBrand(brand.getBrandId(),brand.getName());</span><br><span class="line"> <span class="comment">//TODO 更新其他的关联</span></span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>关联的分类也是冗余的字段 也要同步修改</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 级联更新所有的关联的数据</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> category 商品分类的实体</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">updateCascade</span><span class="params">(CategoryEntity category)</span> &#123;</span><br><span class="line"> <span class="comment">//更新分类表中的数据</span></span><br><span class="line"> <span class="built_in">this</span>.updateById(category);</span><br><span class="line"> <span class="comment">//更新分类与品牌名关联表中分类的名称</span></span><br><span class="line"> categoryBrandRelationService.updateCategory(category.getCatId(),category.getName());</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>功能实现之后的截图</p>
<p><img src="/pictures/image-20230619111515367.png" alt="image-20230619111515367"></p>
<h3 id="1-3-平台属性"><a href="#1-3-平台属性" class="headerlink" title="1.3 平台属性"></a>1.3 平台属性</h3><p>创建属性管理的菜单(通过sql导入所有的菜单,导入所有以后需要使用的菜单)</p>
<p>资料中的sys_menus.sql文件保存的是所有的菜单信息</p>
<p><img src="/pictures/image-20230616152846339.png" alt="image-20230616152846339"></p>
<p><strong>谷粒商城的接口的在线文档:<a href="https://easydoc.net/s/78237135">https://easydoc.net/s/78237135</a></strong></p>
<p><img src="/pictures/image-20230616153304953.png" alt="image-20230616153304953"></p>
<p><strong>Object的划分</strong></p>
<ol>
<li><p>PO 持久对象</p>
<p>PO就是对应数据库中某个表的一条记录多个记录可以用PO的集合。PO中应该不包含对数据库的操作。</p>
</li>
<li><p>DO 领域对象</p>
<p>就是从现实世界中抽象出来的有形或者无形的业务实体。</p>
</li>
<li><p>TO 数据传输对象</p>
<p>不同的应用程序之间传输的对象</p>
</li>
<li><p>DTO 数据传输对象</p>
<p>泛指展示层与服务层之间的数据传输对象</p>
</li>
<li><p>VO 值对象</p>
<p>视图对象 接收页面传入过来的数据,封装对象;将业务处理完成的对象,封装成页面需要的数据</p>
</li>
<li><p>BO 业务对象</p>
</li>
<li><p>POJO 简单无规则的java对象</p>
</li>
<li><p>DAO 数据访问对象</p>
</li>
</ol>
<h4 id="1-3-1-属性分组功能"><a href="#1-3-1-属性分组功能" class="headerlink" title="1.3.1 属性分组功能"></a>1.3.1 属性分组功能</h4><p>实现一个分类 联动的显示相应的分组信息</p>
<p>抽取商品分类的组件</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;el-tree</span><br><span class="line"> :data=&quot;menus&quot;</span><br><span class="line"> :props=&quot;defaultProps&quot;</span><br><span class="line"> node-key=&quot;catId&quot;</span><br><span class="line"> ref=&quot;menuTree&quot;</span><br><span class="line"> &gt;&lt;/el-tree&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"> &lt;script&gt;</span><br><span class="line">export default &#123;</span><br><span class="line"> components: &#123;&#125;,</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> menus: [],</span><br><span class="line"> expandedKey: [],</span><br><span class="line"> defaultProps: &#123;</span><br><span class="line"> children: &quot;children&quot;,</span><br><span class="line"> label: &quot;name&quot;,</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> created() &#123;</span><br><span class="line"> this.getMenus();</span><br><span class="line"> &#125;,</span><br><span class="line"> methods: &#123;</span><br><span class="line"> getMenus() &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/list/tree&quot;),</span><br><span class="line"> method: &quot;get&quot;,</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> console.log(&quot;商品分类数据:&quot;, data.data);</span><br><span class="line"> this.menus = data.data;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;,</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br><span class="line"> </span><br><span class="line"> &lt;style&gt;</span><br><span class="line">&lt;/style&gt;</span><br></pre></td></tr></table></figure>
<p>属性分组页面</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;el-row :gutter=&quot;20&quot;&gt;</span><br><span class="line"> &lt;el-col :span=&quot;6&quot;&gt; &lt;category&gt;&lt;/category&gt;&lt;/el-col&gt;</span><br><span class="line"> &lt;el-col :span=&quot;18&quot;&gt;</span><br><span class="line"> &lt;div class=&quot;mod-config&quot;&gt;</span><br><span class="line"> &lt;el-form :inline=&quot;true&quot; :model=&quot;dataForm&quot; @keyup.enter.native=&quot;getDataList()&quot;&gt;</span><br><span class="line"> &lt;el-form-item&gt;</span><br><span class="line"> &lt;el-input v-model=&quot;dataForm.key&quot; placeholder=&quot;参数名&quot; clearable&gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item&gt;</span><br><span class="line"> &lt;el-button @click=&quot;getDataList()&quot;&gt;查询&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button v-if=&quot;isAuth(&#x27;product:attrgroup:save&#x27;)&quot; type=&quot;primary&quot; @click=&quot;addOrUpdateHandle()&quot;&gt;新增&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button v-if=&quot;isAuth(&#x27;product:attrgroup:delete&#x27;)&quot; type=&quot;danger&quot; @click=&quot;deleteHandle()&quot; :disabled=&quot;dataListSelections.length &lt;= 0&quot;&gt;批量删除&lt;/el-button&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;/el-form&gt;</span><br><span class="line"> &lt;el-table</span><br><span class="line"> :data=&quot;dataList&quot;</span><br><span class="line"> border</span><br><span class="line"> v-loading=&quot;dataListLoading&quot;</span><br><span class="line"> @selection-change=&quot;selectionChangeHandle&quot;</span><br><span class="line"> style=&quot;width: 100%;&quot;&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> type=&quot;selection&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> width=&quot;50&quot;&gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;attrGroupId&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;分组id&quot;&gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;attrGroupName&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;组名&quot;&gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;sort&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;排序&quot;&gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;descript&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;描述&quot;&gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;icon&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;组图标&quot;&gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;catelogId&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;所属分类id&quot;&gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> fixed=&quot;right&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> width=&quot;150&quot;</span><br><span class="line"> label=&quot;操作&quot;&gt;</span><br><span class="line"> &lt;template slot-scope=&quot;scope&quot;&gt;</span><br><span class="line"> &lt;el-button type=&quot;text&quot; size=&quot;small&quot; @click=&quot;addOrUpdateHandle(scope.row.attrGroupId)&quot;&gt;修改&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button type=&quot;text&quot; size=&quot;small&quot; @click=&quot;deleteHandle(scope.row.attrGroupId)&quot;&gt;删除&lt;/el-button&gt;</span><br><span class="line"> &lt;/template&gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;/el-table&gt;</span><br><span class="line"> &lt;el-pagination</span><br><span class="line"> @size-change=&quot;sizeChangeHandle&quot;</span><br><span class="line"> @current-change=&quot;currentChangeHandle&quot;</span><br><span class="line"> :current-page=&quot;pageIndex&quot;</span><br><span class="line"> :page-sizes=&quot;[10, 20, 50, 100]&quot;</span><br><span class="line"> :page-size=&quot;pageSize&quot;</span><br><span class="line"> :total=&quot;totalPage&quot;</span><br><span class="line"> layout=&quot;total, sizes, prev, pager, next, jumper&quot;&gt;</span><br><span class="line"> &lt;/el-pagination&gt;</span><br><span class="line"> &lt;!-- 弹窗, 新增 / 修改 --&gt;</span><br><span class="line"> &lt;add-or-update v-if=&quot;addOrUpdateVisible&quot; ref=&quot;addOrUpdate&quot; @refreshDataList=&quot;getDataList&quot;&gt;&lt;/add-or-update&gt;</span><br><span class="line"> &lt;/div&gt;&lt;/el-col&gt;</span><br><span class="line"> &lt;/el-row&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line">&lt;script&gt;</span><br><span class="line">import Category from &quot;../common/category.vue&quot;;</span><br><span class="line">import AddOrUpdate from &#x27;./attrgroup-add-or-update&#x27;</span><br><span class="line">export default &#123;</span><br><span class="line"> data () &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> dataForm: &#123;</span><br><span class="line"> key: &#x27;&#x27;</span><br><span class="line"> &#125;,</span><br><span class="line"> dataList: [],</span><br><span class="line"> pageIndex: 1,</span><br><span class="line"> pageSize: 10,</span><br><span class="line"> totalPage: 0,</span><br><span class="line"> dataListLoading: false,</span><br><span class="line"> dataListSelections: [],</span><br><span class="line"> addOrUpdateVisible: false</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;,</span><br><span class="line"> components: &#123;</span><br><span class="line"> AddOrUpdate,Category</span><br><span class="line"> &#125;,</span><br><span class="line"> activated () &#123;</span><br><span class="line"> this.getDataList()</span><br><span class="line"> &#125;,</span><br><span class="line"> methods: &#123;</span><br><span class="line"> // 获取数据列表</span><br><span class="line"> getDataList () &#123;</span><br><span class="line"> this.dataListLoading = true</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&#x27;/product/attrgroup/list&#x27;),</span><br><span class="line"> method: &#x27;get&#x27;,</span><br><span class="line"> params: this.$http.adornParams(&#123;</span><br><span class="line"> &#x27;page&#x27;: this.pageIndex,</span><br><span class="line"> &#x27;limit&#x27;: this.pageSize,</span><br><span class="line"> &#x27;key&#x27;: this.dataForm.key</span><br><span class="line"> &#125;)</span><br><span class="line"> &#125;).then((&#123;data&#125;) =&gt; &#123;</span><br><span class="line"> if (data &amp;&amp; data.code === 0) &#123;</span><br><span class="line"> this.dataList = data.page.list</span><br><span class="line"> this.totalPage = data.page.totalCount</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> this.dataList = []</span><br><span class="line"> this.totalPage = 0</span><br><span class="line"> &#125;</span><br><span class="line"> this.dataListLoading = false</span><br><span class="line"> &#125;)</span><br><span class="line"> &#125;,</span><br><span class="line"> // 每页数</span><br><span class="line"> sizeChangeHandle (val) &#123;</span><br><span class="line"> this.pageSize = val</span><br><span class="line"> this.pageIndex = 1</span><br><span class="line"> this.getDataList()</span><br><span class="line"> &#125;,</span><br><span class="line"> // 当前页</span><br><span class="line"> currentChangeHandle (val) &#123;</span><br><span class="line"> this.pageIndex = val</span><br><span class="line"> this.getDataList()</span><br><span class="line"> &#125;,</span><br><span class="line"> // 多选</span><br><span class="line"> selectionChangeHandle (val) &#123;</span><br><span class="line"> this.dataListSelections = val</span><br><span class="line"> &#125;,</span><br><span class="line"> // 新增 / 修改</span><br><span class="line"> addOrUpdateHandle (id) &#123;</span><br><span class="line"> this.addOrUpdateVisible = true</span><br><span class="line"> this.$nextTick(() =&gt; &#123;</span><br><span class="line"> this.$refs.addOrUpdate.init(id)</span><br><span class="line"> &#125;)</span><br><span class="line"> &#125;,</span><br><span class="line"> // 删除</span><br><span class="line"> deleteHandle (id) &#123;</span><br><span class="line"> var ids = id ? [id] : this.dataListSelections.map(item =&gt; &#123;</span><br><span class="line"> return item.attrGroupId</span><br><span class="line"> &#125;)</span><br><span class="line"> this.$confirm(`确定对[id=$&#123;ids.join(&#x27;,&#x27;)&#125;]进行[$&#123;id ? &#x27;删除&#x27; : &#x27;批量删除&#x27;&#125;]操作?`, &#x27;提示&#x27;, &#123;</span><br><span class="line"> confirmButtonText: &#x27;确定&#x27;,</span><br><span class="line"> cancelButtonText: &#x27;取消&#x27;,</span><br><span class="line"> type: &#x27;warning&#x27;</span><br><span class="line"> &#125;).then(() =&gt; &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&#x27;/product/attrgroup/delete&#x27;),</span><br><span class="line"> method: &#x27;post&#x27;,</span><br><span class="line"> data: this.$http.adornData(ids, false)</span><br><span class="line"> &#125;).then((&#123;data&#125;) =&gt; &#123;</span><br><span class="line"> if (data &amp;&amp; data.code === 0) &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &#x27;操作成功&#x27;,</span><br><span class="line"> type: &#x27;success&#x27;,</span><br><span class="line"> duration: 1500,</span><br><span class="line"> onClose: () =&gt; &#123;</span><br><span class="line"> this.getDataList()</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;)</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> this.$message.error(data.msg)</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;)</span><br><span class="line"> &#125;)</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&lt;/script&gt;</span><br><span class="line">&lt;style&gt;</span><br><span class="line">&lt;/style&gt;</span><br></pre></td></tr></table></figure>
<p>页面效果</p>
<p><img src="/pictures/image-20230617173759895.png" alt="image-20230617173759895"></p>
<p><strong>父子组件中数据的传递</strong></p>
<p>子组件给父组件传递的数据,事件传递,子组件给父组件发送一个事件,事件传递</p>
<p>子组件调整</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;el-tree</span><br><span class="line"> :data=&quot;menus&quot;</span><br><span class="line"> :props=&quot;defaultProps&quot;</span><br><span class="line"> node-key=&quot;catId&quot;</span><br><span class="line"> ref=&quot;menuTree&quot;</span><br><span class="line"> @node-click=&quot;nodeclick&quot;</span><br><span class="line"> &gt;&lt;/el-tree&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"> &lt;script&gt;</span><br><span class="line">export default &#123;</span><br><span class="line"> components: &#123;&#125;,</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> menus: [],</span><br><span class="line"> expandedKey: [],</span><br><span class="line"> defaultProps: &#123;</span><br><span class="line"> children: &quot;children&quot;,</span><br><span class="line"> label: &quot;name&quot;,</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> created() &#123;</span><br><span class="line"> this.getMenus();</span><br><span class="line"> &#125;,</span><br><span class="line"> methods: &#123;</span><br><span class="line"> getMenus() &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/category/list/tree&quot;),</span><br><span class="line"> method: &quot;get&quot;,</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> console.log(&quot;商品分类数据:&quot;, data.data);</span><br><span class="line"> this.menus = data.data;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> nodeclick(data,node,component) &#123;</span><br><span class="line"> console.log(&quot;子组件被点击,传递的数据有:data:&quot;,data,&quot;node:&quot;,node,&quot;component:&quot;,component);</span><br><span class="line"> //子组件向父组件传递数据</span><br><span class="line"> this.$emit(&quot;tree-node-click&quot;,data,node,component);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;,</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br><span class="line"> </span><br><span class="line"> &lt;style&gt;</span><br><span class="line">&lt;/style&gt;</span><br></pre></td></tr></table></figure>
<p>父组件接受相应的数据</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;el-row :gutter=&quot;20&quot;&gt;</span><br><span class="line"> &lt;el-col :span=&quot;6&quot;&gt;</span><br><span class="line"> &lt;category @tree-node-click=&quot;treeNodeClick&quot;&gt;&lt;/category</span><br><span class="line"> &gt;&lt;/el-col&gt;</span><br><span class="line"> &lt;el-col :span=&quot;18&quot;&gt;</span><br><span class="line"> &lt;div class=&quot;mod-config&quot;&gt;</span><br><span class="line"> &lt;el-form</span><br><span class="line"> :inline=&quot;true&quot;</span><br><span class="line"> :model=&quot;dataForm&quot;</span><br><span class="line"> @keyup.enter.native=&quot;getDataList()&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-form-item&gt;</span><br><span class="line"> &lt;el-input</span><br><span class="line"> v-model=&quot;dataForm.key&quot;</span><br><span class="line"> placeholder=&quot;参数名&quot;</span><br><span class="line"> clearable</span><br><span class="line"> &gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item&gt;</span><br><span class="line"> &lt;el-button @click=&quot;getDataList()&quot;&gt;查询&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;isAuth(&#x27;product:attrgroup:save&#x27;)&quot;</span><br><span class="line"> type=&quot;primary&quot;</span><br><span class="line"> @click=&quot;addOrUpdateHandle()&quot;</span><br><span class="line"> &gt;新增&lt;/el-button</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> v-if=&quot;isAuth(&#x27;product:attrgroup:delete&#x27;)&quot;</span><br><span class="line"> type=&quot;danger&quot;</span><br><span class="line"> @click=&quot;deleteHandle()&quot;</span><br><span class="line"> :disabled=&quot;dataListSelections.length &lt;= 0&quot;</span><br><span class="line"> &gt;批量删除&lt;/el-button</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;/el-form&gt;</span><br><span class="line"> &lt;el-table</span><br><span class="line"> :data=&quot;dataList&quot;</span><br><span class="line"> border</span><br><span class="line"> v-loading=&quot;dataListLoading&quot;</span><br><span class="line"> @selection-change=&quot;selectionChangeHandle&quot;</span><br><span class="line"> style=&quot;width: 100%&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> type=&quot;selection&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> width=&quot;50&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;attrGroupId&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;分组id&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;attrGroupName&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;组名&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;sort&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;排序&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;descript&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;描述&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;icon&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;组图标&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> prop=&quot;catelogId&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> label=&quot;所属分类id&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;el-table-column</span><br><span class="line"> fixed=&quot;right&quot;</span><br><span class="line"> header-align=&quot;center&quot;</span><br><span class="line"> align=&quot;center&quot;</span><br><span class="line"> width=&quot;150&quot;</span><br><span class="line"> label=&quot;操作&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;template slot-scope=&quot;scope&quot;&gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;small&quot;</span><br><span class="line"> @click=&quot;addOrUpdateHandle(scope.row.attrGroupId)&quot;</span><br><span class="line"> &gt;修改&lt;/el-button</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-button</span><br><span class="line"> type=&quot;text&quot;</span><br><span class="line"> size=&quot;small&quot;</span><br><span class="line"> @click=&quot;deleteHandle(scope.row.attrGroupId)&quot;</span><br><span class="line"> &gt;删除&lt;/el-button</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/template&gt;</span><br><span class="line"> &lt;/el-table-column&gt;</span><br><span class="line"> &lt;/el-table&gt;</span><br><span class="line"> &lt;el-pagination</span><br><span class="line"> @size-change=&quot;sizeChangeHandle&quot;</span><br><span class="line"> @current-change=&quot;currentChangeHandle&quot;</span><br><span class="line"> :current-page=&quot;pageIndex&quot;</span><br><span class="line"> :page-sizes=&quot;[10, 20, 50, 100]&quot;</span><br><span class="line"> :page-size=&quot;pageSize&quot;</span><br><span class="line"> :total=&quot;totalPage&quot;</span><br><span class="line"> layout=&quot;total, sizes, prev, pager, next, jumper&quot;</span><br><span class="line"> &gt;</span><br><span class="line"> &lt;/el-pagination&gt;</span><br><span class="line"> &lt;!-- 弹窗, 新增 / 修改 --&gt;</span><br><span class="line"> &lt;add-or-update</span><br><span class="line"> v-if=&quot;addOrUpdateVisible&quot;</span><br><span class="line"> ref=&quot;addOrUpdate&quot;</span><br><span class="line"> @refreshDataList=&quot;getDataList&quot;</span><br><span class="line"> &gt;&lt;/add-or-update&gt;&lt;/div</span><br><span class="line"> &gt;&lt;/el-col&gt;</span><br><span class="line"> &lt;/el-row&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line">&lt;script&gt;</span><br><span class="line">import Category from &quot;../common/category.vue&quot;;</span><br><span class="line">import AddOrUpdate from &quot;./attrgroup-add-or-update&quot;;</span><br><span class="line">export default &#123;</span><br><span class="line"> data() &#123;</span><br><span class="line"> return &#123;</span><br><span class="line"> catId: 0,</span><br><span class="line"> dataForm: &#123;</span><br><span class="line"> key: &quot;&quot;,</span><br><span class="line"> &#125;,</span><br><span class="line"> dataList: [],</span><br><span class="line"> pageIndex: 1,</span><br><span class="line"> pageSize: 10,</span><br><span class="line"> totalPage: 0,</span><br><span class="line"> dataListLoading: false,</span><br><span class="line"> dataListSelections: [],</span><br><span class="line"> addOrUpdateVisible: false,</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> components: &#123;</span><br><span class="line"> AddOrUpdate,</span><br><span class="line"> Category,</span><br><span class="line"> &#125;,</span><br><span class="line"> activated() &#123;</span><br><span class="line"> this.getDataList();</span><br><span class="line"> &#125;,</span><br><span class="line"> methods: &#123;</span><br><span class="line"> treeNodeClick(data, node, component) &#123;</span><br><span class="line"> //获取子组件传递过来的值</span><br><span class="line"> console.log(</span><br><span class="line"> &quot;获取子组件传递过来的值:data:&quot;,</span><br><span class="line"> data,</span><br><span class="line"> &quot;node&quot;,</span><br><span class="line"> node,</span><br><span class="line"> &quot;component:&quot;,</span><br><span class="line"> component</span><br><span class="line"> );</span><br><span class="line"> //查询三级分类信息 当点击三级分类id的时候 才查询相关的信息</span><br><span class="line"> if(node.level == 3)&#123;</span><br><span class="line"> this.catId = data.catId;</span><br><span class="line"> this.getDataList();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;,</span><br><span class="line"> // 获取数据列表</span><br><span class="line"> getDataList() &#123;</span><br><span class="line"> this.dataListLoading = true;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(`/product/attrgroup/list/$&#123;this.catId&#125;`),</span><br><span class="line"> method: &quot;get&quot;,</span><br><span class="line"> params: this.$http.adornParams(&#123;</span><br><span class="line"> page: this.pageIndex,</span><br><span class="line"> limit: this.pageSize,</span><br><span class="line"> key: this.dataForm.key,</span><br><span class="line"> &#125;),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> if (data &amp;&amp; data.code === 0) &#123;</span><br><span class="line"> this.dataList = data.page.list;</span><br><span class="line"> this.totalPage = data.page.totalCount;</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> this.dataList = [];</span><br><span class="line"> this.totalPage = 0;</span><br><span class="line"> &#125;</span><br><span class="line"> this.dataListLoading = false;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> // 每页数</span><br><span class="line"> sizeChangeHandle(val) &#123;</span><br><span class="line"> this.pageSize = val;</span><br><span class="line"> this.pageIndex = 1;</span><br><span class="line"> this.getDataList();</span><br><span class="line"> &#125;,</span><br><span class="line"> // 当前页</span><br><span class="line"> currentChangeHandle(val) &#123;</span><br><span class="line"> this.pageIndex = val;</span><br><span class="line"> this.getDataList();</span><br><span class="line"> &#125;,</span><br><span class="line"> // 多选</span><br><span class="line"> selectionChangeHandle(val) &#123;</span><br><span class="line"> this.dataListSelections = val;</span><br><span class="line"> &#125;,</span><br><span class="line"> // 新增 / 修改</span><br><span class="line"> addOrUpdateHandle(id) &#123;</span><br><span class="line"> this.addOrUpdateVisible = true;</span><br><span class="line"> this.$nextTick(() =&gt; &#123;</span><br><span class="line"> this.$refs.addOrUpdate.init(id);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> // 删除</span><br><span class="line"> deleteHandle(id) &#123;</span><br><span class="line"> var ids = id</span><br><span class="line"> ? [id]</span><br><span class="line"> : this.dataListSelections.map((item) =&gt; &#123;</span><br><span class="line"> return item.attrGroupId;</span><br><span class="line"> &#125;);</span><br><span class="line"> this.$confirm(</span><br><span class="line"> `确定对[id=$&#123;ids.join(&quot;,&quot;)&#125;]进行[$&#123;id ? &quot;删除&quot; : &quot;批量删除&quot;&#125;]操作?`,</span><br><span class="line"> &quot;提示&quot;,</span><br><span class="line"> &#123;</span><br><span class="line"> confirmButtonText: &quot;确定&quot;,</span><br><span class="line"> cancelButtonText: &quot;取消&quot;,</span><br><span class="line"> type: &quot;warning&quot;,</span><br><span class="line"> &#125;</span><br><span class="line"> ).then(() =&gt; &#123;</span><br><span class="line"> this.$http(&#123;</span><br><span class="line"> url: this.$http.adornUrl(&quot;/product/attrgroup/delete&quot;),</span><br><span class="line"> method: &quot;post&quot;,</span><br><span class="line"> data: this.$http.adornData(ids, false),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> if (data &amp;&amp; data.code === 0) &#123;</span><br><span class="line"> this.$message(&#123;</span><br><span class="line"> message: &quot;操作成功&quot;,</span><br><span class="line"> type: &quot;success&quot;,</span><br><span class="line"> duration: 1500,</span><br><span class="line"> onClose: () =&gt; &#123;</span><br><span class="line"> this.getDataList();</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> this.$message.error(data.msg);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;,</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br><span class="line"></span><br><span class="line">&lt;style&gt;</span><br><span class="line">&lt;/style&gt;</span><br></pre></td></tr></table></figure>
<p>后端代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> PageUtils <span class="title function_">queryPage</span><span class="params">(Map&lt;String, Object&gt; params, Long catelogId)</span> &#123;</span><br><span class="line"> <span class="comment">//首先先判断catelogId是不是0 如果是0的话就查询所有的属性分组信息</span></span><br><span class="line"> <span class="keyword">if</span> (catelogId == <span class="number">0</span>) &#123;</span><br><span class="line"> IPage&lt;AttrGroupEntity&gt; page = <span class="built_in">this</span>.page(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">Query</span>&lt;AttrGroupEntity&gt;().getPage(params),</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">QueryWrapper</span>&lt;AttrGroupEntity&gt;()</span><br><span class="line"> );</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">PageUtils</span>(page);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//查询的时候传递过来的关键词</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">key</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;key&quot;</span>);</span><br><span class="line"> <span class="comment">//SQL语句:select * from pms_attr_group where catelog_id = ? and (attr_group_id = key or attr_group_name = %key%)</span></span><br><span class="line"> LambdaQueryWrapper&lt;AttrGroupEntity&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> queryWrapper.eq(AttrGroupEntity::getCatelogId, catelogId);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(key)) &#123;</span><br><span class="line"> queryWrapper.and((obj) -&gt; &#123;</span><br><span class="line"> obj.eq(AttrGroupEntity::getAttrGroupId, key).or().like(AttrGroupEntity::getAttrGroupName, key);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;</span><br><span class="line"> IPage&lt;AttrGroupEntity&gt; page = <span class="built_in">this</span>.page(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">Query</span>&lt;AttrGroupEntity&gt;().getPage(params),</span><br><span class="line"> queryWrapper</span><br><span class="line"> );</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">PageUtils</span>(page);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p><strong>属性分组的添加功能</strong></p>
<p>前端代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line"> &lt;el-dialog</span><br><span class="line"> :title=<span class="string">&quot;!dataForm.attrGroupId ? &#x27;新增&#x27; : &#x27;修改&#x27;&quot;</span></span><br><span class="line"> :close-on-click-modal=<span class="string">&quot;false&quot;</span></span><br><span class="line"> :visible.sync=<span class="string">&quot;visible&quot;</span></span><br><span class="line"> <span class="meta">@closed</span>=<span class="string">&quot;dialogClose&quot;</span></span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-form</span><br><span class="line"> :model=<span class="string">&quot;dataForm&quot;</span></span><br><span class="line"> :rules=<span class="string">&quot;dataRule&quot;</span></span><br><span class="line"> ref=<span class="string">&quot;dataForm&quot;</span></span><br><span class="line"> <span class="meta">@keyup</span>.enter.<span class="keyword">native</span>=<span class="string">&quot;dataFormSubmit()&quot;</span></span><br><span class="line"> label-width=<span class="string">&quot;100px&quot;</span></span><br><span class="line"> &gt;</span><br><span class="line"> &lt;el-form-item label=<span class="string">&quot;组名&quot;</span> prop=<span class="string">&quot;attrGroupName&quot;</span>&gt;</span><br><span class="line"> &lt;el-input</span><br><span class="line"> v-model=<span class="string">&quot;dataForm.attrGroupName&quot;</span></span><br><span class="line"> placeholder=<span class="string">&quot;组名&quot;</span></span><br><span class="line"> &gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item label=<span class="string">&quot;排序&quot;</span> prop=<span class="string">&quot;sort&quot;</span>&gt;</span><br><span class="line"> &lt;el-input v-model=<span class="string">&quot;dataForm.sort&quot;</span> placeholder=<span class="string">&quot;排序&quot;</span>&gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item label=<span class="string">&quot;描述&quot;</span> prop=<span class="string">&quot;descript&quot;</span>&gt;</span><br><span class="line"> &lt;el-input v-model=<span class="string">&quot;dataForm.descript&quot;</span> placeholder=<span class="string">&quot;描述&quot;</span>&gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item label=<span class="string">&quot;组图标&quot;</span> prop=<span class="string">&quot;icon&quot;</span>&gt;</span><br><span class="line"> &lt;el-input v-model=<span class="string">&quot;dataForm.icon&quot;</span> placeholder=<span class="string">&quot;组图标&quot;</span>&gt;&lt;/el-input&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;el-form-item label=<span class="string">&quot;所属分类id&quot;</span> prop=<span class="string">&quot;catelogId&quot;</span>&gt;</span><br><span class="line"> &lt;!-- &lt;el-input v-model=<span class="string">&quot;dataForm.catelogId&quot;</span> placeholder=<span class="string">&quot;所属分类id&quot;</span>&gt;&lt;/el-input&gt; --&gt;</span><br><span class="line"> &lt;el-cascader</span><br><span class="line"> v-model=<span class="string">&quot;dataForm.catelogPath&quot;</span></span><br><span class="line"> :options=<span class="string">&quot;categorys&quot;</span></span><br><span class="line"> :props=<span class="string">&quot;props&quot;</span></span><br><span class="line"> placeholder=<span class="string">&quot;试试搜索:手机&quot;</span></span><br><span class="line"> filterable</span><br><span class="line"> &gt;&lt;/el-cascader&gt;</span><br><span class="line"> &lt;/el-form-item&gt;</span><br><span class="line"> &lt;/el-form&gt;</span><br><span class="line"> &lt;span slot=<span class="string">&quot;footer&quot;</span> class=<span class="string">&quot;dialog-footer&quot;</span>&gt;</span><br><span class="line"> &lt;el-button <span class="meta">@click</span>=<span class="string">&quot;visible = false&quot;</span>&gt;取消&lt;/el-button&gt;</span><br><span class="line"> &lt;el-button type=<span class="string">&quot;primary&quot;</span> <span class="meta">@click</span>=<span class="string">&quot;dataFormSubmit()&quot;</span>&gt;确定&lt;/el-button&gt;</span><br><span class="line"> &lt;/span&gt;</span><br><span class="line"> &lt;/el-dialog&gt;</span><br><span class="line">&lt;/template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line"><span class="keyword">import</span> Category from <span class="string">&quot;../common/category.vue&quot;</span>;</span><br><span class="line"></span><br><span class="line">export <span class="keyword">default</span> &#123;</span><br><span class="line"> data() &#123;</span><br><span class="line"> <span class="keyword">return</span> &#123;</span><br><span class="line"> props: &#123;</span><br><span class="line"> value: <span class="string">&quot;catId&quot;</span>,</span><br><span class="line"> label: <span class="string">&quot;name&quot;</span>,</span><br><span class="line"> children: <span class="string">&quot;children&quot;</span>,</span><br><span class="line"> &#125;,</span><br><span class="line"> categorys: [], <span class="comment">//所有的三级分类信息</span></span><br><span class="line"> visible: <span class="literal">false</span>,</span><br><span class="line"> dataForm: &#123;</span><br><span class="line"> attrGroupId: <span class="number">0</span>,</span><br><span class="line"> attrGroupName: <span class="string">&quot;&quot;</span>,</span><br><span class="line"> sort: <span class="string">&quot;&quot;</span>,</span><br><span class="line"> descript: <span class="string">&quot;&quot;</span>,</span><br><span class="line"> icon: <span class="string">&quot;&quot;</span>,</span><br><span class="line"> catelogPath: [],</span><br><span class="line"> catelogId: <span class="number">0</span>,</span><br><span class="line"> &#125;,</span><br><span class="line"> dataRule: &#123;</span><br><span class="line"> attrGroupName: [</span><br><span class="line"> &#123; required: <span class="literal">true</span>, message: <span class="string">&quot;组名不能为空&quot;</span>, trigger: <span class="string">&quot;blur&quot;</span> &#125;,</span><br><span class="line"> ],</span><br><span class="line"> sort: [&#123; required: <span class="literal">true</span>, message: <span class="string">&quot;排序不能为空&quot;</span>, trigger: <span class="string">&quot;blur&quot;</span> &#125;],</span><br><span class="line"> descript: [</span><br><span class="line"> &#123; required: <span class="literal">true</span>, message: <span class="string">&quot;描述不能为空&quot;</span>, trigger: <span class="string">&quot;blur&quot;</span> &#125;,</span><br><span class="line"> ],</span><br><span class="line"> icon: [&#123; required: <span class="literal">true</span>, message: <span class="string">&quot;组图标不能为空&quot;</span>, trigger: <span class="string">&quot;blur&quot;</span> &#125;],</span><br><span class="line"> catelogId: [</span><br><span class="line"> &#123; required: <span class="literal">true</span>, message: <span class="string">&quot;所属分类id不能为空&quot;</span>, trigger: <span class="string">&quot;blur&quot;</span> &#125;,</span><br><span class="line"> ],</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;;</span><br><span class="line"> &#125;,</span><br><span class="line"> created() &#123;</span><br><span class="line"> <span class="built_in">this</span>.getCategorys();</span><br><span class="line"> &#125;,</span><br><span class="line"> methods: &#123;</span><br><span class="line"> dialogClose() &#123;</span><br><span class="line"> <span class="built_in">this</span>.dataForm.catelogPath = [];</span><br><span class="line"> &#125;,</span><br><span class="line"> getCategorys() &#123;</span><br><span class="line"> <span class="built_in">this</span>.$http(&#123;</span><br><span class="line"> url: <span class="built_in">this</span>.$http.adornUrl(<span class="string">&quot;/product/category/list/tree&quot;</span>),</span><br><span class="line"> method: <span class="string">&quot;get&quot;</span>,</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> <span class="built_in">this</span>.categorys = data.data;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> init(id) &#123;</span><br><span class="line"> <span class="built_in">this</span>.dataForm.attrGroupId = id || <span class="number">0</span>;</span><br><span class="line"> <span class="built_in">this</span>.visible = <span class="literal">true</span>;</span><br><span class="line"> <span class="built_in">this</span>.$nextTick(() =&gt; &#123;</span><br><span class="line"> <span class="built_in">this</span>.$refs[<span class="string">&quot;dataForm&quot;</span>].resetFields();</span><br><span class="line"> <span class="keyword">if</span> (<span class="built_in">this</span>.dataForm.attrGroupId) &#123;</span><br><span class="line"> <span class="built_in">this</span>.$http(&#123;</span><br><span class="line"> url: <span class="built_in">this</span>.$http.adornUrl(</span><br><span class="line"> `/product/attrgroup/info/$&#123;<span class="built_in">this</span>.dataForm.attrGroupId&#125;`</span><br><span class="line"> ),</span><br><span class="line"> method: <span class="string">&quot;get&quot;</span>,</span><br><span class="line"> params: <span class="built_in">this</span>.$http.adornParams(),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> <span class="keyword">if</span> (data &amp;&amp; data.code === <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="built_in">this</span>.dataForm.attrGroupName = data.attrGroup.attrGroupName;</span><br><span class="line"> <span class="built_in">this</span>.dataForm.sort = data.attrGroup.sort;</span><br><span class="line"> <span class="built_in">this</span>.dataForm.descript = data.attrGroup.descript;</span><br><span class="line"> <span class="built_in">this</span>.dataForm.icon = data.attrGroup.icon;</span><br><span class="line"> <span class="built_in">this</span>.dataForm.catelogId = data.attrGroup.catelogId;</span><br><span class="line"> <span class="comment">//查出catelog的完整路径</span></span><br><span class="line"> <span class="built_in">this</span>.dataForm.catelogPath = data.attrGroup.catelogPath;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> <span class="comment">// 表单提交</span></span><br><span class="line"> dataFormSubmit() &#123;</span><br><span class="line"> <span class="built_in">this</span>.$refs[<span class="string">&quot;dataForm&quot;</span>].validate((valid) =&gt; &#123;</span><br><span class="line"> <span class="keyword">if</span> (valid) &#123;</span><br><span class="line"> <span class="built_in">this</span>.$http(&#123;</span><br><span class="line"> url: <span class="built_in">this</span>.$http.adornUrl(</span><br><span class="line"> `/product/attrgroup/$&#123;</span><br><span class="line"> !<span class="built_in">this</span>.dataForm.attrGroupId ? <span class="string">&quot;save&quot;</span> : <span class="string">&quot;update&quot;</span></span><br><span class="line"> &#125;`</span><br><span class="line"> ),</span><br><span class="line"> method: <span class="string">&quot;post&quot;</span>,</span><br><span class="line"> data: <span class="built_in">this</span>.$http.adornData(&#123;</span><br><span class="line"> attrGroupId: <span class="built_in">this</span>.dataForm.attrGroupId || undefined,</span><br><span class="line"> attrGroupName: <span class="built_in">this</span>.dataForm.attrGroupName,</span><br><span class="line"> sort: <span class="built_in">this</span>.dataForm.sort,</span><br><span class="line"> descript: <span class="built_in">this</span>.dataForm.descript,</span><br><span class="line"> icon: <span class="built_in">this</span>.dataForm.icon,</span><br><span class="line"> catelogId:</span><br><span class="line"> <span class="built_in">this</span>.dataForm.catelogPath[<span class="built_in">this</span>.dataForm.catelogPath.length - <span class="number">1</span>],</span><br><span class="line"> &#125;),</span><br><span class="line"> &#125;).then((&#123; data &#125;) =&gt; &#123;</span><br><span class="line"> <span class="keyword">if</span> (data &amp;&amp; data.code === <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="built_in">this</span>.$message(&#123;</span><br><span class="line"> message: <span class="string">&quot;操作成功&quot;</span>,</span><br><span class="line"> type: <span class="string">&quot;success&quot;</span>,</span><br><span class="line"> duration: <span class="number">1500</span>,</span><br><span class="line"> onClose: () =&gt; &#123;</span><br><span class="line"> <span class="built_in">this</span>.visible = <span class="literal">false</span>;</span><br><span class="line"> <span class="built_in">this</span>.$emit(<span class="string">&quot;refreshDataList&quot;</span>);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="built_in">this</span>.$message.error(data.msg);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;,</span><br><span class="line"> &#125;,</span><br><span class="line">&#125;;</span><br><span class="line">&lt;/script&gt;</span><br></pre></td></tr></table></figure>
<p>后端代码</p>
<p>在商品分类的children上加上@JsonInclude注解解决后面的级联选择多出一个空白的选择的问题</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@JsonInclude(JsonInclude.Include.NON_EMPTY)</span></span><br><span class="line"><span class="meta">@TableField(exist = false)</span><span class="comment">//这个注解要加,因为这个属性不是数据库中的字段</span></span><br><span class="line"><span class="keyword">private</span> List&lt;CategoryEntity&gt; children;<span class="comment">//这里的属性名不是瞎起的,与ElementUI中的显示相对应,这里改了,前端也要改</span></span><br></pre></td></tr></table></figure>
<p>修改的时候,级联选择部分数据的回显</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">/**</span><br><span class="line"> * 找到catelog的完整路径</span><br><span class="line"> * @param catelogId 路径的最后一个catelog的id</span><br><span class="line"> * @return 完整的路径</span><br><span class="line"> */</span><br><span class="line"> @Override</span><br><span class="line"> public Long[] findCatelogPath(Long catelogId) &#123;</span><br><span class="line"> List&lt;Long&gt; paths = new ArrayList&lt;&gt;();</span><br><span class="line"> List&lt;Long&gt; parentPath = findParentPath(catelogId, paths);</span><br><span class="line"> Collections.reverse(parentPath);</span><br><span class="line"> return (Long[]) parentPath.toArray(new Long[parentPath.size()]);</span><br><span class="line"> &#125;</span><br><span class="line"> /**</span><br><span class="line"> * 递归找出所有的路径</span><br><span class="line"> */</span><br><span class="line"> private List&lt;Long&gt; findParentPath(Long catelogId,List&lt;Long&gt; paths)&#123;</span><br><span class="line"> paths.add(catelogId);</span><br><span class="line"> //根据id查询相关的信息</span><br><span class="line"> CategoryEntity category = this.getById(catelogId);</span><br><span class="line"> if(category.getParentCid()!=0)&#123;</span><br><span class="line"> findParentPath(category.getParentCid(),paths);</span><br><span class="line"> &#125;</span><br><span class="line"> return paths;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>属性关联商品的规格参数和基本属性信息</p>
<p>功能描述</p>
<p><img src="/pictures/image-20230625090118059.png" alt="image-20230625090118059"></p>
<p>查询商品下关联的属性分组信息</p>
<p>查询商品关联属性分组的后端关键代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 根据分组的id查询关联的所有属性</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> attrgroupId 分组的id</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 关联的所有属性组成集合</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> List&lt;AttrEntity&gt; <span class="title function_">getRelationAttr</span><span class="params">(Long attrgroupId)</span> &#123;</span><br><span class="line"> <span class="comment">//根据中间表查询出属性分组的id信息</span></span><br><span class="line"> List&lt;AttrAttrgroupRelationEntity&gt; relationEntityList = relationDao.selectList(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;AttrAttrgroupRelationEntity&gt;().eq(AttrAttrgroupRelationEntity::getAttrGroupId, attrgroupId));</span><br><span class="line"> List&lt;Long&gt; attrIds = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> <span class="keyword">for</span> (AttrAttrgroupRelationEntity relationEntity : relationEntityList) &#123;</span><br><span class="line"> attrIds.add(relationEntity.getAttrId());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//根据属性分组的id查询属性分组的详细信息</span></span><br><span class="line"> <span class="keyword">return</span> (List&lt;AttrEntity&gt;) <span class="built_in">this</span>.listByIds(attrIds);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>移除关联属性分组的功能后端的关键代码</p>
<p>service层的代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 批量删除商品关联的属性分组信息</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> vos 属性id和属性分组id组成的集合</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">deleteRelation</span><span class="params">(AttrGroupRelationVo[] vos)</span> &#123;</span><br><span class="line"> List&lt;AttrAttrgroupRelationEntity&gt; entities = Arrays.asList(vos).stream().map((item) -&gt; &#123;</span><br><span class="line"> <span class="type">AttrAttrgroupRelationEntity</span> <span class="variable">relationEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">AttrAttrgroupRelationEntity</span>();</span><br><span class="line"> BeanUtils.copyProperties(item, relationEntity);</span><br><span class="line"> <span class="keyword">return</span> relationEntity;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> relationDao.deleteBatchRelation(entities);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>dao层的代码</p>
<p>使用动态的sql批量的删除属性和分组的关联关系</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--void deleteBatchRelation(List&lt;AttrAttrgroupRelationEntity&gt; entities);--&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">delete</span> <span class="attr">id</span>=<span class="string">&quot;deleteBatchRelation&quot;</span>&gt;</span></span><br><span class="line"> delete from `pms_attr_attrgroup_relation` where</span><br><span class="line"> <span class="tag">&lt;<span class="name">foreach</span> <span class="attr">collection</span>=<span class="string">&quot;entities&quot;</span> <span class="attr">item</span>=<span class="string">&quot;item&quot;</span> <span class="attr">separator</span>=<span class="string">&quot; OR &quot;</span>&gt;</span></span><br><span class="line"> (attr_id = #&#123;item.attrId&#125;) and attr_group_id = #&#123;item.attrGroupId&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">foreach</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">delete</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>查询属性分组没有关联的属性</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 获取当前分组没有关联的所有属性</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> params 分页相关的参数</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> attrgroupId 属性分组的id</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 分页相关的数据</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> PageUtils <span class="title function_">getNoRelationAttr</span><span class="params">(Map&lt;String, Object&gt; params, Long attrgroupId)</span> &#123;</span><br><span class="line"> <span class="comment">//当前的分组只能关联自己所属的分类里面的所有属性 例如手机的分类里面只能关联手机的所有属性</span></span><br><span class="line"> <span class="type">AttrGroupEntity</span> <span class="variable">attrGroupEntity</span> <span class="operator">=</span> attrGroupDao.selectById(attrgroupId);</span><br><span class="line"> <span class="type">Long</span> <span class="variable">catelogId</span> <span class="operator">=</span> attrGroupEntity.getCatelogId();</span><br><span class="line"> <span class="comment">//当前分组只能关联别的分组没有引用的属性</span></span><br><span class="line"> List&lt;AttrGroupEntity&gt; groups = attrGroupDao.selectList(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;AttrGroupEntity&gt;().eq(AttrGroupEntity::getCatelogId, catelogId));</span><br><span class="line"> List&lt;Long&gt; collect = groups.stream().map((item) -&gt; &#123;</span><br><span class="line"> <span class="keyword">return</span> item.getAttrGroupId();</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> List&lt;AttrAttrgroupRelationEntity&gt; groupId = relationDao.selectList(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;AttrAttrgroupRelationEntity&gt;().in(AttrAttrgroupRelationEntity::getAttrGroupId, collect));</span><br><span class="line"> List&lt;Long&gt; attrIds = groupId.stream().map((item) -&gt; &#123;</span><br><span class="line"> <span class="keyword">return</span> item.getAttrId();</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> LambdaQueryWrapper&lt;AttrEntity&gt; queryWrapper =</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;AttrEntity&gt;().eq(AttrEntity::getCatelogId, catelogId).eq(AttrEntity::getAttrType,ProductConstant.AttrEnum.ATTR_TYPE_BASE.getCode());</span><br><span class="line"> <span class="keyword">if</span> (attrIds != <span class="literal">null</span> &amp;&amp; attrIds.size() &gt; <span class="number">0</span>) &#123;</span><br><span class="line"> queryWrapper.notIn(AttrEntity::getAttrId, attrIds);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">String</span> <span class="variable">key</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;key&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(key)) &#123;</span><br><span class="line"> queryWrapper.eq(AttrEntity::getAttrId, key).or().like(AttrEntity::getAttrName, key);</span><br><span class="line"> &#125;</span><br><span class="line"> IPage&lt;AttrEntity&gt; page = <span class="built_in">this</span>.page(<span class="keyword">new</span> <span class="title class_">Query</span>&lt;AttrEntity&gt;().getPage(params), queryWrapper);</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">PageUtils</span>(page);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>给属性关联相关的规格参数和销售属性</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">saveBatch</span><span class="params">(List&lt;AttrGroupRelationVo&gt; vos)</span> &#123;</span><br><span class="line"> List&lt;AttrAttrgroupRelationEntity&gt; entities = vos.stream().map((item) -&gt; &#123;</span><br><span class="line"> <span class="type">AttrAttrgroupRelationEntity</span> <span class="variable">relationEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">AttrAttrgroupRelationEntity</span>();</span><br><span class="line"> BeanUtils.copyProperties(item, relationEntity);</span><br><span class="line"> <span class="keyword">return</span> relationEntity;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> <span class="built_in">this</span>.saveBatch(entities);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h4 id="1-3-2-规格参数功能"><a href="#1-3-2-规格参数功能" class="headerlink" title="1.3.2 规格参数功能"></a>1.3.2 规格参数功能</h4><p>功能截图</p>
<p><img src="/pictures/image-20230619111338153.png" alt="image-20230619111338153"></p>
<p>新增功能的后端关键代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 保存规格参数信息</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> attr 页面中提交的规格参数相关的信息组成的实体</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Transactional</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">saveAttr</span><span class="params">(AttrVo attr)</span> &#123;</span><br><span class="line"> <span class="type">AttrEntity</span> <span class="variable">attrEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">AttrEntity</span>();</span><br><span class="line"> BeanUtils.copyProperties(attr,attrEntity);</span><br><span class="line"> <span class="comment">//保存基本的数据</span></span><br><span class="line"> <span class="built_in">this</span>.save(attrEntity);</span><br><span class="line"> <span class="comment">//保存关联关系</span></span><br><span class="line"> <span class="type">AttrAttrgroupRelationEntity</span> <span class="variable">relationEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">AttrAttrgroupRelationEntity</span>();</span><br><span class="line"> relationEntity.setAttrGroupId(attr.getAttrGroupId());</span><br><span class="line"> relationEntity.setAttrId(attrEntity.getAttrId());</span><br><span class="line"> relationDao.insert(relationEntity);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>查询列表后端的关键代码</p>
<p>这里使用的stream流处理数据没有使用多表联合查询来查询数据</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> PageUtils <span class="title function_">queryBaseAttrPage</span><span class="params">(Map&lt;String, Object&gt; params, Long catelogId)</span> &#123;</span><br><span class="line"> LambdaQueryWrapper&lt;AttrEntity&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> <span class="keyword">if</span> (catelogId != <span class="number">0</span>) &#123;<span class="comment">//等于0就是查询所有的分类信息下的规格参数信息</span></span><br><span class="line"> queryWrapper.eq(AttrEntity::getCatelogId, catelogId);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//获取检索的条件</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">key</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;key&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(key)) &#123;</span><br><span class="line"> queryWrapper.like(AttrEntity::getAttrName, key).or().eq(AttrEntity::getAttrId, key);</span><br><span class="line"> &#125;</span><br><span class="line"> IPage&lt;AttrEntity&gt; page = <span class="built_in">this</span>.page(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">Query</span>&lt;AttrEntity&gt;().getPage(params),</span><br><span class="line"> queryWrapper</span><br><span class="line"> );</span><br><span class="line"> <span class="type">PageUtils</span> <span class="variable">pageUtils</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PageUtils</span>(page);</span><br><span class="line"> List&lt;AttrEntity&gt; records = page.getRecords();</span><br><span class="line"> List&lt;AttrRespVo&gt; respVos = records.stream().map((attrEntity) -&gt; &#123;</span><br><span class="line"> <span class="type">AttrRespVo</span> <span class="variable">attrRespVo</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">AttrRespVo</span>();</span><br><span class="line"> BeanUtils.copyProperties(attrEntity, attrRespVo);</span><br><span class="line"> <span class="comment">//设置三级商品分类名和分组名</span></span><br><span class="line"> <span class="comment">//设置所属的商品的分类名</span></span><br><span class="line"> <span class="type">CategoryEntity</span> <span class="variable">categoryEntity</span> <span class="operator">=</span> categoryDao.selectById(attrRespVo.getCatelogId());</span><br><span class="line"> <span class="keyword">if</span> (categoryEntity != <span class="literal">null</span>) &#123;</span><br><span class="line"> attrRespVo.setCatelogName(categoryEntity.getName());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//设置分组名需要从中间表查询分组的id再查询分组名</span></span><br><span class="line"> <span class="comment">//先从中间表查询到分组的id</span></span><br><span class="line"> <span class="type">AttrAttrgroupRelationEntity</span> <span class="variable">relationEntity</span> <span class="operator">=</span> relationDao.selectOne(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;AttrAttrgroupRelationEntity&gt;().eq(AttrAttrgroupRelationEntity::getAttrId, attrRespVo.getAttrId()));</span><br><span class="line"> <span class="comment">//从分组的表中查询分组名</span></span><br><span class="line"> <span class="keyword">if</span> (relationEntity != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="type">AttrGroupEntity</span> <span class="variable">attrGroupEntity</span> <span class="operator">=</span> attrGroupDao.selectById(relationEntity.getAttrGroupId());</span><br><span class="line"> attrRespVo.setGroupName(attrGroupEntity.getAttrGroupName());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> attrRespVo;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> pageUtils.setList(respVos);</span><br><span class="line"> <span class="keyword">return</span> pageUtils;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>规格参数修改功能后端的关键代码</p>
<p>修改前的数据回显</p>
<p>查询属性的详情信息</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查询属性的详细信息</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> attrId 属性的id</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 属性的详细信息封装的集合</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> AttrRespVo <span class="title function_">getAttrInfo</span><span class="params">(Long attrId)</span> &#123;</span><br><span class="line"> <span class="type">AttrRespVo</span> <span class="variable">attrRespVo</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">AttrRespVo</span>();</span><br><span class="line"> <span class="comment">//查询属性的基本信息</span></span><br><span class="line"> <span class="type">AttrEntity</span> <span class="variable">attr</span> <span class="operator">=</span> <span class="built_in">this</span>.getById(attrId);</span><br><span class="line"> BeanUtils.copyProperties(attr, attrRespVo);</span><br><span class="line"> <span class="comment">//查询分组id和分类的详细路径</span></span><br><span class="line"> <span class="comment">//分组信息的设置</span></span><br><span class="line"> <span class="type">AttrAttrgroupRelationEntity</span> <span class="variable">relationEntity</span> <span class="operator">=</span> relationDao.selectOne(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;AttrAttrgroupRelationEntity&gt;().eq(AttrAttrgroupRelationEntity::getAttrId, attrRespVo.getAttrId()));</span><br><span class="line"> <span class="keyword">if</span> (relationEntity != <span class="literal">null</span>) &#123;</span><br><span class="line"> attrRespVo.setAttrGroupId(relationEntity.getAttrGroupId());</span><br><span class="line"> <span class="type">AttrGroupEntity</span> <span class="variable">attrGroupEntity</span> <span class="operator">=</span> attrGroupDao.selectById(relationEntity.getAttrGroupId());</span><br><span class="line"> <span class="keyword">if</span> (attrGroupEntity != <span class="literal">null</span>) &#123;</span><br><span class="line"> attrRespVo.setGroupName(attrGroupEntity.getAttrGroupName());</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//设置分类信息</span></span><br><span class="line"> <span class="type">Long</span> <span class="variable">catelogId</span> <span class="operator">=</span> attr.getCatelogId();</span><br><span class="line"> <span class="comment">//查询分类的完整路径</span></span><br><span class="line"> Long[] catelogPath = categoryService.findCatelogPath(catelogId);</span><br><span class="line"> <span class="keyword">if</span> (catelogPath != <span class="literal">null</span>) &#123;</span><br><span class="line"> attrRespVo.setCatelogPath(catelogPath);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//设置分类名</span></span><br><span class="line"> <span class="type">CategoryEntity</span> <span class="variable">category</span> <span class="operator">=</span> categoryDao.selectById(catelogId);</span><br><span class="line"> <span class="keyword">if</span> (category != <span class="literal">null</span>) &#123;</span><br><span class="line"> attrRespVo.setCatelogName(category.getName());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> attrRespVo;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>修改的时候页面回显的效果</p>
<p><img src="/pictures/image-20230624192906124.png" alt="image-20230624192906124"></p>
<p>修改功能后端的关键代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 修改属性的方法</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> attr 页面传输过来的商品属性的实体</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Transactional</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">updateAttr</span><span class="params">(AttrVo attr)</span> &#123;</span><br><span class="line"> <span class="comment">//修改基本的数据</span></span><br><span class="line"> <span class="type">AttrEntity</span> <span class="variable">attrEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">AttrEntity</span>();</span><br><span class="line"> BeanUtils.copyProperties(attr, attrEntity);</span><br><span class="line"> <span class="built_in">this</span>.updateById(attrEntity);</span><br><span class="line"> <span class="comment">//修改关联表的数据</span></span><br><span class="line"> <span class="type">AttrAttrgroupRelationEntity</span> <span class="variable">relationEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">AttrAttrgroupRelationEntity</span>();</span><br><span class="line"> BeanUtils.copyProperties(attr, relationEntity);</span><br><span class="line"> LambdaQueryWrapper&lt;AttrAttrgroupRelationEntity&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> queryWrapper.eq(AttrAttrgroupRelationEntity::getAttrId, relationEntity.getAttrId());</span><br><span class="line"> <span class="type">Integer</span> <span class="variable">count</span> <span class="operator">=</span> relationDao.selectCount(queryWrapper);</span><br><span class="line"> <span class="keyword">if</span> (count &gt; <span class="number">0</span>) &#123;<span class="comment">//判断是修改还是添加的操作</span></span><br><span class="line"> relationDao.update(relationEntity, queryWrapper);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> relationDao.insert(relationEntity);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h4 id="1-3-3-销售属性功能"><a href="#1-3-3-销售属性功能" class="headerlink" title="1.3.3 销售属性功能"></a>1.3.3 销售属性功能</h4><p>分类属性列表显示</p>
<p>controller层的代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * /product/attr/sale/list/&#123;catelogId&#125;</span></span><br><span class="line"><span class="comment"> * 路径 /product/attr/base/list/&#123;catelogId&#125;</span></span><br><span class="line"><span class="comment"> * 规格参数的列表显示</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> params 条件查询的参数</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> catelogId 商品分类的id</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 规格参数的分页数据</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/&#123;attrType&#125;/list/&#123;catelogId&#125;&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> R <span class="title function_">baseAttrList</span><span class="params">(<span class="meta">@RequestParam</span> Map&lt;String, Object&gt; params, <span class="meta">@PathVariable</span> Long catelogId, <span class="meta">@PathVariable(&quot;attrType&quot;)</span> String type)</span> &#123;</span><br><span class="line"> log.warn(<span class="string">&quot;规格参数分页的查询条件:&#123;&#125;,商品分类的id:&#123;&#125;&quot;</span>, params, catelogId);</span><br><span class="line"> <span class="type">PageUtils</span> <span class="variable">page</span> <span class="operator">=</span> attrService.queryBaseAttrPage(params, catelogId,type);</span><br><span class="line"> <span class="keyword">return</span> R.ok().put(<span class="string">&quot;page&quot;</span>, page);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>service层的代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> PageUtils <span class="title function_">queryBaseAttrPage</span><span class="params">(Map&lt;String, Object&gt; params, Long catelogId, String type)</span> &#123;</span><br><span class="line"> LambdaQueryWrapper&lt;AttrEntity&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//路径中属性的attrType是base就是基本属性否则就代表的是销售属性</span></span><br><span class="line"> queryWrapper.eq(AttrEntity::getAttrType, <span class="string">&quot;base&quot;</span>.equalsIgnoreCase(type) ? <span class="number">1</span> : <span class="number">0</span>);</span><br><span class="line"> <span class="keyword">if</span> (catelogId != <span class="number">0</span>) &#123;<span class="comment">//等于0就是查询所有的分类信息下的规格参数信息</span></span><br><span class="line"> queryWrapper.eq(AttrEntity::getCatelogId, catelogId);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//获取检索的条件</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">key</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;key&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(key)) &#123;</span><br><span class="line"> queryWrapper.like(AttrEntity::getAttrName, key).or().eq(AttrEntity::getAttrId, key);</span><br><span class="line"> &#125;</span><br><span class="line"> IPage&lt;AttrEntity&gt; page = <span class="built_in">this</span>.page(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">Query</span>&lt;AttrEntity&gt;().getPage(params),</span><br><span class="line"> queryWrapper</span><br><span class="line"> );</span><br><span class="line"> <span class="type">PageUtils</span> <span class="variable">pageUtils</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PageUtils</span>(page);</span><br><span class="line"> List&lt;AttrEntity&gt; records = page.getRecords();</span><br><span class="line"> List&lt;AttrRespVo&gt; respVos = records.stream().map((attrEntity) -&gt; &#123;</span><br><span class="line"> <span class="type">AttrRespVo</span> <span class="variable">attrRespVo</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">AttrRespVo</span>();</span><br><span class="line"> BeanUtils.copyProperties(attrEntity, attrRespVo);</span><br><span class="line"> <span class="comment">//设置三级商品分类名和分组名</span></span><br><span class="line"> <span class="comment">//设置所属的商品的分类名</span></span><br><span class="line"> <span class="type">CategoryEntity</span> <span class="variable">categoryEntity</span> <span class="operator">=</span> categoryDao.selectById(attrRespVo.getCatelogId());</span><br><span class="line"> <span class="keyword">if</span> (categoryEntity != <span class="literal">null</span>) &#123;</span><br><span class="line"> attrRespVo.setCatelogName(categoryEntity.getName());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//设置分组名需要从中间表查询分组的id再查询分组名</span></span><br><span class="line"> <span class="comment">//先从中间表查询到分组的id</span></span><br><span class="line"> <span class="type">AttrAttrgroupRelationEntity</span> <span class="variable">relationEntity</span> <span class="operator">=</span> relationDao.selectOne(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;AttrAttrgroupRelationEntity&gt;().eq(AttrAttrgroupRelationEntity::getAttrId, attrRespVo.getAttrId()));</span><br><span class="line"> <span class="comment">//从分组的表中查询分组名</span></span><br><span class="line"> <span class="keyword">if</span> (relationEntity != <span class="literal">null</span>) &#123;</span><br><span class="line"> <span class="type">AttrGroupEntity</span> <span class="variable">attrGroupEntity</span> <span class="operator">=</span> attrGroupDao.selectById(relationEntity.getAttrGroupId());</span><br><span class="line"> <span class="keyword">if</span> (attrGroupEntity != <span class="literal">null</span>) &#123;</span><br><span class="line"> attrRespVo.setGroupName(attrGroupEntity.getAttrGroupName());</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> attrRespVo;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> pageUtils.setList(respVos);</span><br><span class="line"> <span class="keyword">return</span> pageUtils;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>完整的功能展示</p>
<p><img src="/pictures/image-20230625090037616.png" alt="image-20230625090037616"></p>
<h3 id="1-4-商品维护"><a href="#1-4-商品维护" class="headerlink" title="1.4 商品维护"></a>1.4 商品维护</h3><h4 id="1-4-1-SPU管理"><a href="#1-4-1-SPU管理" class="headerlink" title="1.4.1 SPU管理"></a>1.4.1 SPU管理</h4><p><strong>条件查询功能Spu检索</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Spu检索功能</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> params 分页相关的数据</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 分页对象</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> PageUtils <span class="title function_">queryPageByCondition</span><span class="params">(Map&lt;String, Object&gt; params)</span> &#123;</span><br><span class="line"> LambdaQueryWrapper&lt;SpuInfoEntity&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//关键字检索</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">key</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;key&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(key)) &#123;</span><br><span class="line"> <span class="comment">//这里使用了or为了和下面的区分开来,要使用and,将下面这个条件用括号括起来</span></span><br><span class="line"> <span class="comment">//SELECT COUNT(1) FROM pms_spu_info WHERE (((spu_name LIKE ? OR id = ?)) AND catalog_id = ? AND brand_id = ? AND publish_status = ?)</span></span><br><span class="line"> queryWrapper.and((wrapper) -&gt; &#123;</span><br><span class="line"> wrapper.like(SpuInfoEntity::getSpuName, key).or().eq(SpuInfoEntity::getId, key);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//分类</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">catelogId</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;catelogId&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(catelogId)) &#123;</span><br><span class="line"> queryWrapper.eq(SpuInfoEntity::getCatalogId, catelogId);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//品牌</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">brandId</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;brandId&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(brandId)) &#123;</span><br><span class="line"> queryWrapper.eq(SpuInfoEntity::getBrandId, brandId);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//状态</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">status</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;status&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(status)) &#123;</span><br><span class="line"> queryWrapper.eq(SpuInfoEntity::getPublishStatus, status);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> IPage&lt;SpuInfoEntity&gt; page = <span class="built_in">this</span>.page(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">Query</span>&lt;SpuInfoEntity&gt;().getPage(params),</span><br><span class="line"> queryWrapper</span><br><span class="line"> );</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">PageUtils</span>(page);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>实现的功能</p>
<p><img src="/pictures/image-20230627102918192.png" alt="image-20230627102918192"></p>
<p>前端显示时间格式的数据有问题</p>
<p>配置文件中的配置</p>
<figure class="highlight yml"><table><tr><td class="code"><pre><span class="line"><span class="attr">jackson:</span></span><br><span class="line"> <span class="attr">date-format:</span> <span class="string">yyyy-MM-dd</span> <span class="string">HH:mm:ss</span></span><br><span class="line"> <span class="attr">time-zone:</span> <span class="string">GMT+8</span></span><br></pre></td></tr></table></figure>
<p><strong>商品规格的回显</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查询商品的规格属性</span></span><br><span class="line"><span class="comment"> * /product/attr/base/listforspu/&#123;spuId&#125;</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@GetMapping(&quot;/base/listforspu/&#123;spuId&#125;&quot;)</span></span><br><span class="line"><span class="keyword">public</span> R <span class="title function_">baseAttrList</span><span class="params">(<span class="meta">@PathVariable(&quot;spuId&quot;)</span> Long spuId)</span>&#123;</span><br><span class="line"> List&lt;ProductAttrValueEntity&gt; entities = productAttrValueService.baseAttrListForSpu(spuId);</span><br><span class="line"> <span class="keyword">return</span> R.ok().put(<span class="string">&quot;data&quot;</span>,entities);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>修改商品的规格</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 修改商品的规格参数</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> spuId 商品的id</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> productAttrValueEntities 提交的修改之后的商品规格参数组成的集合</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Transactional</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">updateSpuAttr</span><span class="params">(Long spuId, List&lt;ProductAttrValueEntity&gt; productAttrValueEntities)</span> &#123;</span><br><span class="line"> <span class="comment">//1.删除这个spuId之前对应的所有属性</span></span><br><span class="line"> <span class="built_in">this</span>.baseMapper.delete(<span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;ProductAttrValueEntity&gt;().eq(ProductAttrValueEntity::getSpuId,spuId));</span><br><span class="line"> <span class="comment">//2.添加修改之后的商品的属性信息</span></span><br><span class="line"> List&lt;ProductAttrValueEntity&gt; collect = productAttrValueEntities.stream().map(item -&gt; &#123;</span><br><span class="line"> item.setSpuId(spuId);</span><br><span class="line"> <span class="keyword">return</span> item;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> <span class="built_in">this</span>.saveBatch(collect);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>实现的功能</p>
<p><img src="/pictures/image-20230628165931139.png" alt="image-20230628165931139"></p>
<p>中间遇到的问题,点击规格页面显示400的问题</p>
<p><img src="/pictures/image-20230628171558364.png" alt="image-20230628171558364"></p>
<p>解决方案</p>
<p>第一步:在gulimall-admin数据库中执行以下的sql语句</p>
<figure class="highlight sql"><table><tr><td class="code"><pre><span class="line"><span class="keyword">INSERT</span> <span class="keyword">INTO</span> sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num) <span class="keyword">VALUES</span> (<span class="number">76</span>, <span class="number">37</span>, <span class="string">&#x27;规格维护&#x27;</span>, <span class="string">&#x27;product/attrupdate&#x27;</span>, <span class="string">&#x27;&#x27;</span>, <span class="number">2</span>, <span class="string">&#x27;log&#x27;</span>, <span class="number">0</span>);</span><br></pre></td></tr></table></figure>
<p>第二步:将前端src&#x2F;router&#x2F;index.js替换成如下的内容</p>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 全站路由配置</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * 建议:</span></span><br><span class="line"><span class="comment"> * 1. 代码中路由统一使用name属性跳转(不使用path属性)</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">import</span> <span class="title class_">Vue</span> <span class="keyword">from</span> <span class="string">&#x27;vue&#x27;</span></span><br><span class="line"><span class="keyword">import</span> <span class="title class_">Router</span> <span class="keyword">from</span> <span class="string">&#x27;vue-router&#x27;</span></span><br><span class="line"><span class="keyword">import</span> http <span class="keyword">from</span> <span class="string">&#x27;@/utils/httpRequest&#x27;</span></span><br><span class="line"><span class="keyword">import</span> &#123; isURL &#125; <span class="keyword">from</span> <span class="string">&#x27;@/utils/validate&#x27;</span></span><br><span class="line"><span class="keyword">import</span> &#123; clearLoginInfo &#125; <span class="keyword">from</span> <span class="string">&#x27;@/utils&#x27;</span></span><br><span class="line"></span><br><span class="line"><span class="title class_">Vue</span>.<span class="title function_">use</span>(<span class="title class_">Router</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment">// 开发环境不使用懒加载, 因为懒加载页面太多的话会造成webpack热更新太慢, 所以只有生产环境使用懒加载</span></span><br><span class="line"><span class="keyword">const</span> _import = <span class="built_in">require</span>(<span class="string">&#x27;./import-&#x27;</span> + process.<span class="property">env</span>.<span class="property">NODE_ENV</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment">// 全局路由(无需嵌套上左右整体布局)</span></span><br><span class="line"><span class="keyword">const</span> globalRoutes = [</span><br><span class="line"> &#123; <span class="attr">path</span>: <span class="string">&#x27;/404&#x27;</span>, <span class="attr">component</span>: <span class="title function_">_import</span>(<span class="string">&#x27;common/404&#x27;</span>), <span class="attr">name</span>: <span class="string">&#x27;404&#x27;</span>, <span class="attr">meta</span>: &#123; <span class="attr">title</span>: <span class="string">&#x27;404未找到&#x27;</span> &#125; &#125;,</span><br><span class="line"> &#123; <span class="attr">path</span>: <span class="string">&#x27;/login&#x27;</span>, <span class="attr">component</span>: <span class="title function_">_import</span>(<span class="string">&#x27;common/login&#x27;</span>), <span class="attr">name</span>: <span class="string">&#x27;login&#x27;</span>, <span class="attr">meta</span>: &#123; <span class="attr">title</span>: <span class="string">&#x27;登录&#x27;</span> &#125; &#125;</span><br><span class="line">]</span><br><span class="line"></span><br><span class="line"><span class="comment">// 主入口路由(需嵌套上左右整体布局)</span></span><br><span class="line"><span class="keyword">const</span> mainRoutes = &#123;</span><br><span class="line"> <span class="attr">path</span>: <span class="string">&#x27;/&#x27;</span>,</span><br><span class="line"> <span class="attr">component</span>: <span class="title function_">_import</span>(<span class="string">&#x27;main&#x27;</span>),</span><br><span class="line"> <span class="attr">name</span>: <span class="string">&#x27;main&#x27;</span>,</span><br><span class="line"> <span class="attr">redirect</span>: &#123; <span class="attr">name</span>: <span class="string">&#x27;home&#x27;</span> &#125;,</span><br><span class="line"> <span class="attr">meta</span>: &#123; <span class="attr">title</span>: <span class="string">&#x27;主入口整体布局&#x27;</span> &#125;,</span><br><span class="line"> <span class="attr">children</span>: [</span><br><span class="line"> <span class="comment">// 通过meta对象设置路由展示方式</span></span><br><span class="line"> <span class="comment">// 1. isTab: 是否通过tab展示内容, true: 是, false: 否</span></span><br><span class="line"> <span class="comment">// 2. iframeUrl: 是否通过iframe嵌套展示内容, &#x27;以http[s]://开头&#x27;: 是, &#x27;&#x27;: 否</span></span><br><span class="line"> <span class="comment">// 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理!</span></span><br><span class="line"> &#123; <span class="attr">path</span>: <span class="string">&#x27;/home&#x27;</span>, <span class="attr">component</span>: <span class="title function_">_import</span>(<span class="string">&#x27;common/home&#x27;</span>), <span class="attr">name</span>: <span class="string">&#x27;home&#x27;</span>, <span class="attr">meta</span>: &#123; <span class="attr">title</span>: <span class="string">&#x27;首页&#x27;</span> &#125; &#125;,</span><br><span class="line"> &#123; <span class="attr">path</span>: <span class="string">&#x27;/theme&#x27;</span>, <span class="attr">component</span>: <span class="title function_">_import</span>(<span class="string">&#x27;common/theme&#x27;</span>), <span class="attr">name</span>: <span class="string">&#x27;theme&#x27;</span>, <span class="attr">meta</span>: &#123; <span class="attr">title</span>: <span class="string">&#x27;主题&#x27;</span> &#125; &#125;,</span><br><span class="line"> &#123; <span class="attr">path</span>: <span class="string">&#x27;/demo-echarts&#x27;</span>, <span class="attr">component</span>: <span class="title function_">_import</span>(<span class="string">&#x27;demo/echarts&#x27;</span>), <span class="attr">name</span>: <span class="string">&#x27;demo-echarts&#x27;</span>, <span class="attr">meta</span>: &#123; <span class="attr">title</span>: <span class="string">&#x27;demo-echarts&#x27;</span>, <span class="attr">isTab</span>: <span class="literal">true</span> &#125; &#125;,</span><br><span class="line"> &#123; <span class="attr">path</span>: <span class="string">&#x27;/demo-ueditor&#x27;</span>, <span class="attr">component</span>: <span class="title function_">_import</span>(<span class="string">&#x27;demo/ueditor&#x27;</span>), <span class="attr">name</span>: <span class="string">&#x27;demo-ueditor&#x27;</span>, <span class="attr">meta</span>: &#123; <span class="attr">title</span>: <span class="string">&#x27;demo-ueditor&#x27;</span>, <span class="attr">isTab</span>: <span class="literal">true</span> &#125; &#125;,</span><br><span class="line"> &#123; <span class="attr">path</span>: <span class="string">&#x27;/product-attrupdate&#x27;</span>, <span class="attr">component</span>: <span class="title function_">_import</span>(<span class="string">&#x27;modules/product/attrupdate&#x27;</span>), <span class="attr">name</span>: <span class="string">&#x27;attr-update&#x27;</span>, <span class="attr">meta</span>: &#123; <span class="attr">title</span>: <span class="string">&#x27;规格维护&#x27;</span>, <span class="attr">isTab</span>: <span class="literal">true</span> &#125; &#125;</span><br><span class="line"> ],</span><br><span class="line"> <span class="title function_">beforeEnter</span>(<span class="params">to, <span class="keyword">from</span>, next</span>) &#123;</span><br><span class="line"> <span class="keyword">let</span> token = <span class="title class_">Vue</span>.<span class="property">cookie</span>.<span class="title function_">get</span>(<span class="string">&#x27;token&#x27;</span>)</span><br><span class="line"> <span class="keyword">if</span> (!token || !<span class="regexp">/\S/</span>.<span class="title function_">test</span>(token)) &#123;</span><br><span class="line"> <span class="title function_">clearLoginInfo</span>()</span><br><span class="line"> <span class="title function_">next</span>(&#123; <span class="attr">name</span>: <span class="string">&#x27;login&#x27;</span> &#125;)</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="title function_">next</span>()</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">const</span> router = <span class="keyword">new</span> <span class="title class_">Router</span>(&#123;</span><br><span class="line"> <span class="attr">mode</span>: <span class="string">&#x27;hash&#x27;</span>,</span><br><span class="line"> <span class="attr">scrollBehavior</span>: <span class="function">() =&gt;</span> (&#123; <span class="attr">y</span>: <span class="number">0</span> &#125;),</span><br><span class="line"> <span class="attr">isAddDynamicMenuRoutes</span>: <span class="literal">false</span>, <span class="comment">// 是否已经添加动态(菜单)路由</span></span><br><span class="line"> <span class="attr">routes</span>: globalRoutes.<span class="title function_">concat</span>(mainRoutes)</span><br><span class="line">&#125;)</span><br><span class="line"></span><br><span class="line">router.<span class="title function_">beforeEach</span>(<span class="function">(<span class="params">to, <span class="keyword">from</span>, next</span>) =&gt;</span> &#123;</span><br><span class="line"> <span class="comment">// 添加动态(菜单)路由</span></span><br><span class="line"> <span class="comment">// 1. 已经添加 or 全局路由, 直接访问</span></span><br><span class="line"> <span class="comment">// 2. 获取菜单列表, 添加并保存本地存储</span></span><br><span class="line"> <span class="keyword">if</span> (router.<span class="property">options</span>.<span class="property">isAddDynamicMenuRoutes</span> || <span class="title function_">fnCurrentRouteType</span>(to, globalRoutes) === <span class="string">&#x27;global&#x27;</span>) &#123;</span><br><span class="line"> <span class="title function_">next</span>()</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="title function_">http</span>(&#123;</span><br><span class="line"> <span class="attr">url</span>: http.<span class="title function_">adornUrl</span>(<span class="string">&#x27;/sys/menu/nav&#x27;</span>),</span><br><span class="line"> <span class="attr">method</span>: <span class="string">&#x27;get&#x27;</span>,</span><br><span class="line"> <span class="attr">params</span>: http.<span class="title function_">adornParams</span>()</span><br><span class="line"> &#125;).<span class="title function_">then</span>(<span class="function">(<span class="params">&#123; data &#125;</span>) =&gt;</span> &#123;</span><br><span class="line"> <span class="keyword">if</span> (data &amp;&amp; data.<span class="property">code</span> === <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="title function_">fnAddDynamicMenuRoutes</span>(data.<span class="property">menuList</span>)</span><br><span class="line"> router.<span class="property">options</span>.<span class="property">isAddDynamicMenuRoutes</span> = <span class="literal">true</span></span><br><span class="line"> <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&#x27;menuList&#x27;</span>, <span class="title class_">JSON</span>.<span class="title function_">stringify</span>(data.<span class="property">menuList</span> || <span class="string">&#x27;[]&#x27;</span>))</span><br><span class="line"> <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&#x27;permissions&#x27;</span>, <span class="title class_">JSON</span>.<span class="title function_">stringify</span>(data.<span class="property">permissions</span> || <span class="string">&#x27;[]&#x27;</span>))</span><br><span class="line"> <span class="title function_">next</span>(&#123; ...to, <span class="attr">replace</span>: <span class="literal">true</span> &#125;)</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&#x27;menuList&#x27;</span>, <span class="string">&#x27;[]&#x27;</span>)</span><br><span class="line"> <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&#x27;permissions&#x27;</span>, <span class="string">&#x27;[]&#x27;</span>)</span><br><span class="line"> <span class="title function_">next</span>()</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;).<span class="title function_">catch</span>(<span class="function">(<span class="params">e</span>) =&gt;</span> &#123;</span><br><span class="line"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">`%c<span class="subst">$&#123;e&#125;</span> 请求菜单列表和权限失败,跳转至登录页!!`</span>, <span class="string">&#x27;color:blue&#x27;</span>)</span><br><span class="line"> router.<span class="title function_">push</span>(&#123; <span class="attr">name</span>: <span class="string">&#x27;login&#x27;</span> &#125;)</span><br><span class="line"> &#125;)</span><br><span class="line"> &#125;</span><br><span class="line">&#125;)</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 判断当前路由类型, global: 全局路由, main: 主入口路由</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> &#123;<span class="type">*</span>&#125; route 当前路由</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">fnCurrentRouteType</span>(<span class="params">route, globalRoutes = []</span>) &#123;</span><br><span class="line"> <span class="keyword">var</span> temp = []</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; globalRoutes.<span class="property">length</span>; i++) &#123;</span><br><span class="line"> <span class="keyword">if</span> (route.<span class="property">path</span> === globalRoutes[i].<span class="property">path</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&#x27;global&#x27;</span></span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (globalRoutes[i].<span class="property">children</span> &amp;&amp; globalRoutes[i].<span class="property">children</span>.<span class="property">length</span> &gt;= <span class="number">1</span>) &#123;</span><br><span class="line"> temp = temp.<span class="title function_">concat</span>(globalRoutes[i].<span class="property">children</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> temp.<span class="property">length</span> &gt;= <span class="number">1</span> ? <span class="title function_">fnCurrentRouteType</span>(route, temp) : <span class="string">&#x27;main&#x27;</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 添加动态(菜单)路由</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> &#123;<span class="type">*</span>&#125; menuList 菜单列表</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> &#123;<span class="type">*</span>&#125; routes 递归创建的动态(菜单)路由</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">fnAddDynamicMenuRoutes</span>(<span class="params">menuList = [], routes = []</span>) &#123;</span><br><span class="line"> <span class="keyword">var</span> temp = []</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; menuList.<span class="property">length</span>; i++) &#123;</span><br><span class="line"> <span class="keyword">if</span> (menuList[i].<span class="property">list</span> &amp;&amp; menuList[i].<span class="property">list</span>.<span class="property">length</span> &gt;= <span class="number">1</span>) &#123;</span><br><span class="line"> temp = temp.<span class="title function_">concat</span>(menuList[i].<span class="property">list</span>)</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (menuList[i].<span class="property">url</span> &amp;&amp; <span class="regexp">/\S/</span>.<span class="title function_">test</span>(menuList[i].<span class="property">url</span>)) &#123;</span><br><span class="line"> menuList[i].<span class="property">url</span> = menuList[i].<span class="property">url</span>.<span class="title function_">replace</span>(<span class="regexp">/^\//</span>, <span class="string">&#x27;&#x27;</span>)</span><br><span class="line"> <span class="keyword">var</span> route = &#123;</span><br><span class="line"> <span class="attr">path</span>: menuList[i].<span class="property">url</span>.<span class="title function_">replace</span>(<span class="string">&#x27;/&#x27;</span>, <span class="string">&#x27;-&#x27;</span>),</span><br><span class="line"> <span class="attr">component</span>: <span class="literal">null</span>,</span><br><span class="line"> <span class="attr">name</span>: menuList[i].<span class="property">url</span>.<span class="title function_">replace</span>(<span class="string">&#x27;/&#x27;</span>, <span class="string">&#x27;-&#x27;</span>),</span><br><span class="line"> <span class="attr">meta</span>: &#123;</span><br><span class="line"> <span class="attr">menuId</span>: menuList[i].<span class="property">menuId</span>,</span><br><span class="line"> <span class="attr">title</span>: menuList[i].<span class="property">name</span>,</span><br><span class="line"> <span class="attr">isDynamic</span>: <span class="literal">true</span>,</span><br><span class="line"> <span class="attr">isTab</span>: <span class="literal">true</span>,</span><br><span class="line"> <span class="attr">iframeUrl</span>: <span class="string">&#x27;&#x27;</span></span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">// url以http[s]://开头, 通过iframe展示</span></span><br><span class="line"> <span class="keyword">if</span> (<span class="title function_">isURL</span>(menuList[i].<span class="property">url</span>)) &#123;</span><br><span class="line"> route[<span class="string">&#x27;path&#x27;</span>] = <span class="string">`i-<span class="subst">$&#123;menuList[i].menuId&#125;</span>`</span></span><br><span class="line"> route[<span class="string">&#x27;name&#x27;</span>] = <span class="string">`i-<span class="subst">$&#123;menuList[i].menuId&#125;</span>`</span></span><br><span class="line"> route[<span class="string">&#x27;meta&#x27;</span>][<span class="string">&#x27;iframeUrl&#x27;</span>] = menuList[i].<span class="property">url</span></span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> route[<span class="string">&#x27;component&#x27;</span>] = <span class="title function_">_import</span>(<span class="string">`modules/<span class="subst">$&#123;menuList[i].url&#125;</span>`</span>) || <span class="literal">null</span></span><br><span class="line"> &#125; <span class="keyword">catch</span> (e) &#123; &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> routes.<span class="title function_">push</span>(route)</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (temp.<span class="property">length</span> &gt;= <span class="number">1</span>) &#123;</span><br><span class="line"> <span class="title function_">fnAddDynamicMenuRoutes</span>(temp, routes)</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> mainRoutes.<span class="property">name</span> = <span class="string">&#x27;main-dynamic&#x27;</span></span><br><span class="line"> mainRoutes.<span class="property">children</span> = routes</span><br><span class="line"> router.<span class="title function_">addRoutes</span>([</span><br><span class="line"> mainRoutes,</span><br><span class="line"> &#123; <span class="attr">path</span>: <span class="string">&#x27;*&#x27;</span>, <span class="attr">redirect</span>: &#123; <span class="attr">name</span>: <span class="string">&#x27;404&#x27;</span> &#125; &#125;</span><br><span class="line"> ])</span><br><span class="line"> <span class="variable language_">sessionStorage</span>.<span class="title function_">setItem</span>(<span class="string">&#x27;dynamicMenuRoutes&#x27;</span>, <span class="title class_">JSON</span>.<span class="title function_">stringify</span>(mainRoutes.<span class="property">children</span> || <span class="string">&#x27;[]&#x27;</span>))</span><br><span class="line"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&#x27;\n&#x27;</span>)</span><br><span class="line"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&#x27;%c!&lt;-------------------- 动态(菜单)路由 s --------------------&gt;&#x27;</span>, <span class="string">&#x27;color:blue&#x27;</span>)</span><br><span class="line"> <span class="variable language_">console</span>.<span class="title function_">log</span>(mainRoutes.<span class="property">children</span>)</span><br><span class="line"> <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&#x27;%c!&lt;-------------------- 动态(菜单)路由 e --------------------&gt;&#x27;</span>, <span class="string">&#x27;color:blue&#x27;</span>)</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">export</span> <span class="keyword">default</span> router</span><br></pre></td></tr></table></figure>
<h4 id="1-4-2-发布商品"><a href="#1-4-2-发布商品" class="headerlink" title="1.4.2 发布商品"></a>1.4.2 发布商品</h4><p><strong>根据商品的分类联动的查询商品的品牌</strong></p>
<p><img src="/pictures/image-20230626101113941.png" alt="image-20230626101113941"></p>
<p>后端关键部分的代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查询商品分类关联的品牌信息</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 某一商品分类下关联的品牌信息组成的集合</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> List&lt;BrandEntity&gt; <span class="title function_">getBrandsByCatId</span><span class="params">(Long catId)</span> &#123;</span><br><span class="line"> List&lt;CategoryBrandRelationEntity&gt; categoryBrandRelationEntityList = relationDao.selectList(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;CategoryBrandRelationEntity&gt;().eq(CategoryBrandRelationEntity::getCatelogId, catId));</span><br><span class="line"> List&lt;BrandEntity&gt; brandEntityList = categoryBrandRelationEntityList.stream().map(item -&gt; &#123;</span><br><span class="line"> <span class="type">Long</span> <span class="variable">brandId</span> <span class="operator">=</span> item.getBrandId();</span><br><span class="line"> <span class="keyword">return</span> brandService.getById(brandId);</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> <span class="keyword">return</span> brandEntityList;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p><strong>根据JSON数据生成实体类</strong></p>
<p>生成工具: <a href="https://www.bejson.com/">https://www.bejson.com/</a></p>
<p><img src="/pictures/image-20230626142854091.png" alt="image-20230626142854091"></p>
<p>前端提交的发布商品的详细信息</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;spuName&quot;</span><span class="punctuation">:</span> <span class="string">&quot;华为Mate30 Pro&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;spuDescription&quot;</span><span class="punctuation">:</span> <span class="string">&quot;华为手机&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;catalogId&quot;</span><span class="punctuation">:</span> <span class="number">225</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;brandId&quot;</span><span class="punctuation">:</span> <span class="number">1</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;weight&quot;</span><span class="punctuation">:</span> <span class="number">0.198</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;publishStatus&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;decript&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/7b9f237d-9d37-4087-83bd-13d0ea76eda4_73366cc235d68202.jpg&quot;</span><span class="punctuation">,</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/e5c4fbe5-0685-4a12-8623-a4972c623d6c_528211b97272d88a.jpg&quot;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;images&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/7627fc94-1ac7-4406-8e1c-3866a002918b_0d40c24b264aa511.jpg&quot;</span><span class="punctuation">,</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/e5364a2e-9f46-433b-827b-33c1ff8c991c_919c850652e98031.jpg&quot;</span><span class="punctuation">,</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/997dd5dd-be60-4547-871c-23b1273df596_1f15cdbcf9e1273c.jpg&quot;</span><span class="punctuation">,</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/788f45d7-d399-4482-88db-4dd939a51f4a_2b1837c6c50add30.jpg&quot;</span><span class="punctuation">,</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/b18dd3f9-3a38-4e9a-86a0-8c24db552a09_3c24f9cd69534030.jpg&quot;</span><span class="punctuation">,</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/d19426e9-c518-4fc8-85dd-7fae758a4000_23d9fbb256ea5d4a.jpg&quot;</span><span class="punctuation">,</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/7200dec5-af25-4264-87dc-19985c4cbe23_335b2c690e43a8f8.jpg&quot;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;bounds&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;buyBounds&quot;</span><span class="punctuation">:</span> <span class="number">500</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;growBounds&quot;</span><span class="punctuation">:</span> <span class="number">500</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;baseAttrs&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attrId&quot;</span><span class="punctuation">:</span> <span class="number">3</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrValues&quot;</span><span class="punctuation">:</span> <span class="string">&quot;2019&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showDesc&quot;</span><span class="punctuation">:</span> <span class="number">1</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attrId&quot;</span><span class="punctuation">:</span> <span class="number">4</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrValues&quot;</span><span class="punctuation">:</span> <span class="string">&quot;mate30pro&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showDesc&quot;</span><span class="punctuation">:</span> <span class="number">1</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attrId&quot;</span><span class="punctuation">:</span> <span class="number">10</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrValues&quot;</span><span class="punctuation">:</span> <span class="string">&quot;45W&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showDesc&quot;</span><span class="punctuation">:</span> <span class="number">1</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attrId&quot;</span><span class="punctuation">:</span> <span class="number">11</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrValues&quot;</span><span class="punctuation">:</span> <span class="string">&quot;LCD;OLED&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showDesc&quot;</span><span class="punctuation">:</span> <span class="number">1</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attrId&quot;</span><span class="punctuation">:</span> <span class="number">8</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrValues&quot;</span><span class="punctuation">:</span> <span class="string">&quot;16GB&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;showDesc&quot;</span><span class="punctuation">:</span> <span class="number">1</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skus&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attr&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attrId&quot;</span><span class="punctuation">:</span> <span class="number">7</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrName&quot;</span><span class="punctuation">:</span> <span class="string">&quot;手机颜色&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrValue&quot;</span><span class="punctuation">:</span> <span class="string">&quot;星河银&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attrId&quot;</span><span class="punctuation">:</span> <span class="number">9</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrName&quot;</span><span class="punctuation">:</span> <span class="string">&quot;商品产地&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrValue&quot;</span><span class="punctuation">:</span> <span class="string">&quot;中国&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuName&quot;</span><span class="punctuation">:</span> <span class="string">&quot;华为Mate30 Pro 星河银 中国&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;price&quot;</span><span class="punctuation">:</span> <span class="string">&quot;5799&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuTitle&quot;</span><span class="punctuation">:</span> <span class="string">&quot;华为HUAWEI 华为Mate30 Pro全网通智能手机 (5G/4G)&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuSubtitle&quot;</span><span class="punctuation">:</span> <span class="string">&quot;星河银的副标题&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;images&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/7627fc94-1ac7-4406-8e1c-3866a002918b_0d40c24b264aa511.jpg&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">1</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/e5364a2e-9f46-433b-827b-33c1ff8c991c_919c850652e98031.jpg&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/788f45d7-d399-4482-88db-4dd939a51f4a_2b1837c6c50add30.jpg&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/b18dd3f9-3a38-4e9a-86a0-8c24db552a09_3c24f9cd69534030.jpg&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;descar&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="string">&quot;星河银&quot;</span><span class="punctuation">,</span> <span class="string">&quot;中国&quot;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;fullCount&quot;</span><span class="punctuation">:</span> <span class="number">3</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;discount&quot;</span><span class="punctuation">:</span> <span class="number">0.98</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;countStatus&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;fullPrice&quot;</span><span class="punctuation">:</span> <span class="number">10000</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;reducePrice&quot;</span><span class="punctuation">:</span> <span class="number">50</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;priceStatus&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;memberPrice&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;id&quot;</span><span class="punctuation">:</span> <span class="number">2</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;铜牌会员&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;price&quot;</span><span class="punctuation">:</span> <span class="number">5788</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;id&quot;</span><span class="punctuation">:</span> <span class="number">3</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;银牌会员&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;price&quot;</span><span class="punctuation">:</span> <span class="number">5699</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attr&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attrId&quot;</span><span class="punctuation">:</span> <span class="number">7</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrName&quot;</span><span class="punctuation">:</span> <span class="string">&quot;手机颜色&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrValue&quot;</span><span class="punctuation">:</span> <span class="string">&quot;亮黑色&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attrId&quot;</span><span class="punctuation">:</span> <span class="number">9</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrName&quot;</span><span class="punctuation">:</span> <span class="string">&quot;商品产地&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrValue&quot;</span><span class="punctuation">:</span> <span class="string">&quot;中国&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuName&quot;</span><span class="punctuation">:</span> <span class="string">&quot;华为Mate30 Pro 亮黑色 中国&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;price&quot;</span><span class="punctuation">:</span> <span class="string">&quot;6299&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuTitle&quot;</span><span class="punctuation">:</span> <span class="string">&quot;华为HUAWEI 华为Mate30 Pro全网通智能手机 (5G/4G)&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuSubtitle&quot;</span><span class="punctuation">:</span> <span class="string">&quot;亮黑色的副标题&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;images&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">1</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/997dd5dd-be60-4547-871c-23b1273df596_1f15cdbcf9e1273c.jpg&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/7200dec5-af25-4264-87dc-19985c4cbe23_335b2c690e43a8f8.jpg&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;descar&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="string">&quot;亮黑色&quot;</span><span class="punctuation">,</span> <span class="string">&quot;中国&quot;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;fullCount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;discount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;countStatus&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;fullPrice&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;reducePrice&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;priceStatus&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;memberPrice&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;id&quot;</span><span class="punctuation">:</span> <span class="number">2</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;铜牌会员&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;price&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;id&quot;</span><span class="punctuation">:</span> <span class="number">3</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;银牌会员&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;price&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attr&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attrId&quot;</span><span class="punctuation">:</span> <span class="number">7</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrName&quot;</span><span class="punctuation">:</span> <span class="string">&quot;手机颜色&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrValue&quot;</span><span class="punctuation">:</span> <span class="string">&quot;翡冷翠&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attrId&quot;</span><span class="punctuation">:</span> <span class="number">9</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrName&quot;</span><span class="punctuation">:</span> <span class="string">&quot;商品产地&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrValue&quot;</span><span class="punctuation">:</span> <span class="string">&quot;中国&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuName&quot;</span><span class="punctuation">:</span> <span class="string">&quot;华为Mate30 Pro 翡冷翠 中国&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;price&quot;</span><span class="punctuation">:</span> <span class="string">&quot;6299&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuTitle&quot;</span><span class="punctuation">:</span> <span class="string">&quot;华为HUAWEI 华为Mate30 Pro全网通智能手机 (5G/4G)&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuSubtitle&quot;</span><span class="punctuation">:</span> <span class="string">&quot;翡冷翠的副标题&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;images&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/997dd5dd-be60-4547-871c-23b1273df596_1f15cdbcf9e1273c.jpg&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/d19426e9-c518-4fc8-85dd-7fae758a4000_23d9fbb256ea5d4a.jpg&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">1</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;descar&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="string">&quot;翡冷翠&quot;</span><span class="punctuation">,</span> <span class="string">&quot;中国&quot;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;fullCount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;discount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;countStatus&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;fullPrice&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;reducePrice&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;priceStatus&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;memberPrice&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;id&quot;</span><span class="punctuation">:</span> <span class="number">2</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;铜牌会员&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;price&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;id&quot;</span><span class="punctuation">:</span> <span class="number">3</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;银牌会员&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;price&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attr&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attrId&quot;</span><span class="punctuation">:</span> <span class="number">7</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrName&quot;</span><span class="punctuation">:</span> <span class="string">&quot;手机颜色&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrValue&quot;</span><span class="punctuation">:</span> <span class="string">&quot;罗兰紫&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attrId&quot;</span><span class="punctuation">:</span> <span class="number">9</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrName&quot;</span><span class="punctuation">:</span> <span class="string">&quot;商品产地&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrValue&quot;</span><span class="punctuation">:</span> <span class="string">&quot;中国&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuName&quot;</span><span class="punctuation">:</span> <span class="string">&quot;华为Mate30 Pro 罗兰紫 中国&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;price&quot;</span><span class="punctuation">:</span> <span class="string">&quot;5799&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuTitle&quot;</span><span class="punctuation">:</span> <span class="string">&quot;华为HUAWEI 华为Mate30 Pro全网通智能手机 (5G/4G)&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuSubtitle&quot;</span><span class="punctuation">:</span> <span class="string">&quot;罗兰紫的副标题&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;images&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/e5364a2e-9f46-433b-827b-33c1ff8c991c_919c850652e98031.jpg&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;https://gulimall-0611.oss-cn-beijing.aliyuncs.com/2023/06/26/997dd5dd-be60-4547-871c-23b1273df596_1f15cdbcf9e1273c.jpg&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">1</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;imgUrl&quot;</span><span class="punctuation">:</span> <span class="string">&quot;&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;defaultImg&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;descar&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="string">&quot;罗兰紫&quot;</span><span class="punctuation">,</span> <span class="string">&quot;中国&quot;</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;fullCount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;discount&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;countStatus&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;fullPrice&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;reducePrice&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;priceStatus&quot;</span><span class="punctuation">:</span> <span class="number">0</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;memberPrice&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;id&quot;</span><span class="punctuation">:</span> <span class="number">2</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;铜牌会员&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;price&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;id&quot;</span><span class="punctuation">:</span> <span class="number">3</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;name&quot;</span><span class="punctuation">:</span> <span class="string">&quot;银牌会员&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;price&quot;</span><span class="punctuation">:</span> <span class="number">0</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">]</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p>下载生成的实体类代码</p>
<p><img src="/pictures/image-20230626143051042.png" alt="image-20230626143051042"></p>
<p>生成的实体类(将生成的实体类复制到项目中指定的位置)</p>
<p><img src="/pictures/image-20230626143228035.png" alt="image-20230626143228035"></p>
<p><strong>发布商品信息(核心业务)</strong></p>
<p>后端关键代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 发布商品的功能</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> vo 需要保存的商品信息封装的数据</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Transactional</span></span><br><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">saveSpuInfo</span><span class="params">(SpuSaveVo vo)</span> &#123;</span><br><span class="line"> <span class="comment">//保存spu的基本信息 pms_spu_info</span></span><br><span class="line"> <span class="type">SpuInfoEntity</span> <span class="variable">infoEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SpuInfoEntity</span>();</span><br><span class="line"> BeanUtils.copyProperties(vo, infoEntity);</span><br><span class="line"> infoEntity.setCreateTime(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> infoEntity.setUpdateTime(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> <span class="built_in">this</span>.saveBaseSpuInfo(infoEntity);</span><br><span class="line"> <span class="comment">//保存spu的描述图片 pms_spu_info_desc</span></span><br><span class="line"> List&lt;String&gt; decript = vo.getDecript();</span><br><span class="line"> <span class="type">SpuInfoDescEntity</span> <span class="variable">descEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SpuInfoDescEntity</span>();</span><br><span class="line"> descEntity.setSpuId(infoEntity.getId());</span><br><span class="line"> descEntity.setDecript(String.join(<span class="string">&quot;,&quot;</span>, decript));</span><br><span class="line"> spuInfoDescService.saveSpuInfoDecript(descEntity);</span><br><span class="line"> <span class="comment">//保存spu的图片集 pms_spu_images</span></span><br><span class="line"> List&lt;String&gt; images = vo.getImages();</span><br><span class="line"> spuImagesService.saveImages(infoEntity.getId(), images);</span><br><span class="line"> <span class="comment">//保存spu的规格参数 pms_product_attr_value</span></span><br><span class="line"> List&lt;BaseAttrs&gt; baseAttrs = vo.getBaseAttrs();</span><br><span class="line"> List&lt;ProductAttrValueEntity&gt; collect = baseAttrs.stream().map(attr -&gt; &#123;</span><br><span class="line"> <span class="type">ProductAttrValueEntity</span> <span class="variable">valueEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ProductAttrValueEntity</span>();</span><br><span class="line"> valueEntity.setAttrId(attr.getAttrId());</span><br><span class="line"> <span class="type">AttrEntity</span> <span class="variable">attrEntity</span> <span class="operator">=</span> attrService.getById(attr.getAttrId());</span><br><span class="line"> valueEntity.setAttrName(attrEntity.getAttrName());</span><br><span class="line"> valueEntity.setAttrValue(attr.getAttrValues());</span><br><span class="line"> valueEntity.setQuickShow(attr.getShowDesc());</span><br><span class="line"> valueEntity.setSpuId(infoEntity.getId());</span><br><span class="line"> <span class="keyword">return</span> valueEntity;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> productAttrValueService.saveProductAttr(collect);</span><br><span class="line"> <span class="comment">//保存spu的积分信息</span></span><br><span class="line"> <span class="type">Bounds</span> <span class="variable">bounds</span> <span class="operator">=</span> vo.getBounds();</span><br><span class="line"> <span class="type">SpuBoundTo</span> <span class="variable">spuBoundTo</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SpuBoundTo</span>();</span><br><span class="line"> spuBoundTo.setSpuId(infoEntity.getId());</span><br><span class="line"> BeanUtils.copyProperties(bounds, spuBoundTo);</span><br><span class="line"> <span class="type">R</span> <span class="variable">r</span> <span class="operator">=</span> couponFeignService.saveSpuBounds(spuBoundTo);</span><br><span class="line"> <span class="keyword">if</span> (r.getCode() != <span class="number">0</span>) &#123;</span><br><span class="line"> log.error(<span class="string">&quot;远程保存spu的积分信息失败&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//保存当前spu对应的sku信息</span></span><br><span class="line"> List&lt;Skus&gt; skus = vo.getSkus();</span><br><span class="line"> <span class="keyword">if</span> (skus != <span class="literal">null</span> &amp;&amp; skus.size() != <span class="number">0</span>) &#123;</span><br><span class="line"> skus.forEach(item -&gt; &#123;</span><br><span class="line"> <span class="type">String</span> <span class="variable">defaultImg</span> <span class="operator">=</span> <span class="string">&quot;&quot;</span>;</span><br><span class="line"> <span class="keyword">for</span> (Images img : item.getImages()) &#123;</span><br><span class="line"> <span class="keyword">if</span> (img.getDefaultImg() == <span class="number">1</span>) &#123;</span><br><span class="line"> defaultImg = img.getImgUrl();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">SkuInfoEntity</span> <span class="variable">skuInfoEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SkuInfoEntity</span>();</span><br><span class="line"> BeanUtils.copyProperties(item, skuInfoEntity);</span><br><span class="line"> skuInfoEntity.setBrandId(infoEntity.getBrandId());</span><br><span class="line"> skuInfoEntity.setCatalogId(infoEntity.getCatalogId());</span><br><span class="line"> skuInfoEntity.setSaleCount(<span class="number">0L</span>);</span><br><span class="line"> skuInfoEntity.setSpuId(infoEntity.getId());</span><br><span class="line"> skuInfoEntity.setSkuDefaultImg(defaultImg);</span><br><span class="line"> <span class="comment">// 保存sku的基本信息pms_sku_info</span></span><br><span class="line"> skuInfoService.saveSkuInfo(skuInfoEntity);</span><br><span class="line"> <span class="type">Long</span> <span class="variable">skuId</span> <span class="operator">=</span> skuInfoEntity.getSkuId();</span><br><span class="line"> List&lt;SkuImagesEntity&gt; imagesEntities = item.getImages().stream().map(img -&gt; &#123;</span><br><span class="line"> <span class="type">SkuImagesEntity</span> <span class="variable">skuImagesEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SkuImagesEntity</span>();</span><br><span class="line"> skuImagesEntity.setSkuId(skuId);</span><br><span class="line"> skuImagesEntity.setImgUrl(img.getImgUrl());</span><br><span class="line"> skuImagesEntity.setDefaultImg(img.getDefaultImg());</span><br><span class="line"> <span class="keyword">return</span> skuImagesEntity;</span><br><span class="line"> &#125;).filter(entity -&gt; &#123;</span><br><span class="line"> <span class="comment">//返回true就添加上去</span></span><br><span class="line"> <span class="keyword">return</span> !StringUtils.isEmpty(entity.getImgUrl());</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> <span class="comment">// 保存sku的图片信息pms_sku_images</span></span><br><span class="line"> skuImagesService.saveBatch(imagesEntities);</span><br><span class="line"> <span class="comment">// sku的销售属性信息pms_sku_sale_attr_value</span></span><br><span class="line"> List&lt;Attr&gt; attrs = item.getAttr();</span><br><span class="line"> List&lt;SkuSaleAttrValueEntity&gt; skuSaleAttrValueEntities = attrs.stream().map(attr -&gt; &#123;</span><br><span class="line"> <span class="type">SkuSaleAttrValueEntity</span> <span class="variable">skuSaleAttrValueEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SkuSaleAttrValueEntity</span>();</span><br><span class="line"> BeanUtils.copyProperties(attr, skuSaleAttrValueEntity);</span><br><span class="line"> skuSaleAttrValueEntity.setSkuId(skuId);</span><br><span class="line"> <span class="keyword">return</span> skuSaleAttrValueEntity;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> skuSaleAttrValueService.saveBatch(skuSaleAttrValueEntities);</span><br><span class="line"> <span class="comment">// sku的优惠信息、满减等信息gulimall_sms-&gt;sms_sku_ladder\sms_sku_full_reduction\sms_member_price</span></span><br><span class="line"> <span class="type">SkuReductionTo</span> <span class="variable">skuReductionTo</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SkuReductionTo</span>();</span><br><span class="line"> BeanUtils.copyProperties(item, skuReductionTo);</span><br><span class="line"> List&lt;MemberPrice&gt; memberPrices = item.getMemberPrice().stream().map(memberPrice -&gt; &#123;</span><br><span class="line"> <span class="type">MemberPrice</span> <span class="variable">memberPriceTo</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">MemberPrice</span>();</span><br><span class="line"> BeanUtils.copyProperties(memberPrice, memberPriceTo);</span><br><span class="line"> <span class="keyword">return</span> memberPriceTo;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> skuReductionTo.setMemberPrice(memberPrices);</span><br><span class="line"> skuReductionTo.setSkuId(skuId);</span><br><span class="line"> <span class="keyword">if</span> (skuReductionTo.getFullCount() &gt; <span class="number">0</span> || skuReductionTo.getFullPrice().compareTo(<span class="keyword">new</span> <span class="title class_">BigDecimal</span>(<span class="string">&quot;0&quot;</span>)) == <span class="number">1</span>) &#123;</span><br><span class="line"> <span class="type">R</span> <span class="variable">r1</span> <span class="operator">=</span> couponFeignService.saveSkuReduction(skuReductionTo);</span><br><span class="line"> <span class="keyword">if</span> (r1.getCode() != <span class="number">0</span>) &#123;</span><br><span class="line"> log.error(<span class="string">&quot;远程调用sku的优惠信息、满减信息失败&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>最终的实现效果</p>
<p><img src="/pictures/image-20230626184303186.png" alt="image-20230626184303186"></p>
<p><img src="/pictures/image-20230626182832804.png" alt="image-20230626182832804"></p>
<h4 id="1-4-3-商品管理"><a href="#1-4-3-商品管理" class="headerlink" title="1.4.3 商品管理"></a>1.4.3 商品管理</h4><p><strong>Sku检索</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 检索条件</span></span><br><span class="line"><span class="comment"> * &#123;</span></span><br><span class="line"><span class="comment"> * page: 1,//当前页码</span></span><br><span class="line"><span class="comment"> * limit: 10,//每页记录数</span></span><br><span class="line"><span class="comment"> * sidx: &#x27;id&#x27;,//排序字段</span></span><br><span class="line"><span class="comment"> * order: &#x27;asc/desc&#x27;,//排序方式</span></span><br><span class="line"><span class="comment"> * key: &#x27;华为&#x27;,//检索关键字</span></span><br><span class="line"><span class="comment"> * catelogId: 0,</span></span><br><span class="line"><span class="comment"> * brandId: 0,</span></span><br><span class="line"><span class="comment"> * min: 0,</span></span><br><span class="line"><span class="comment"> * max: 0</span></span><br><span class="line"><span class="comment"> * &#125;</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> PageUtils <span class="title function_">queryPageByCondition</span><span class="params">(Map&lt;String, Object&gt; params)</span> &#123;</span><br><span class="line"> LambdaQueryWrapper&lt;SkuInfoEntity&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> <span class="comment">//Preparing: SELECT sku_id,sku_name,sku_title,catalog_id,sale_count,price,brand_id,sku_default_img,sku_subtitle,sku_desc,spu_id</span></span><br><span class="line"> <span class="comment">// FROM pms_sku_info</span></span><br><span class="line"> <span class="comment">// WHERE (( (sku_id = ? OR sku_name LIKE ?) ) AND catalog_id = ? AND brand_id = ? AND price &gt;= ? AND price &lt;= ?) LIMIT ?,?</span></span><br><span class="line"> <span class="comment">//检索关键字</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">key</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;key&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(key)) &#123;</span><br><span class="line"> queryWrapper.and((wrapper) -&gt; &#123;</span><br><span class="line"> wrapper.eq(SkuInfoEntity::getSkuId, key).or().like(SkuInfoEntity::getSkuName, key);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//分类</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">catelogId</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;catelogId&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(catelogId) &amp;&amp; !<span class="string">&quot;0&quot;</span>.equalsIgnoreCase(catelogId)) &#123;</span><br><span class="line"> queryWrapper.eq(SkuInfoEntity::getCatalogId, catelogId);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//品牌</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">brandId</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;brandId&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(brandId) &amp;&amp; !<span class="string">&quot;0&quot;</span>.equalsIgnoreCase(brandId)) &#123;</span><br><span class="line"> queryWrapper.eq(SkuInfoEntity::getBrandId, brandId);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//价格区间</span></span><br><span class="line"> <span class="type">String</span> <span class="variable">min</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;min&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(min)) &#123;</span><br><span class="line"> queryWrapper.ge(SkuInfoEntity::getPrice, min);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">String</span> <span class="variable">max</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;max&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(max)) &#123;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">BigDecimal</span> <span class="variable">bigDecimal</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">BigDecimal</span>(max);</span><br><span class="line"> <span class="keyword">if</span>(bigDecimal.compareTo(<span class="keyword">new</span> <span class="title class_">BigDecimal</span>(<span class="string">&quot;0&quot;</span>))==<span class="number">1</span>)&#123;<span class="comment">//说明大于0</span></span><br><span class="line"> queryWrapper.le(SkuInfoEntity::getPrice, max);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> log.error(<span class="string">&quot;com/atguigu/gulimall/product/service/impl/SkuInfoServiceImpl&quot;</span>);</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(e);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> IPage&lt;SkuInfoEntity&gt; page = <span class="built_in">this</span>.page(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">Query</span>&lt;SkuInfoEntity&gt;().getPage(params),</span><br><span class="line"> queryWrapper</span><br><span class="line"> );</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">PageUtils</span>(page);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>实现的效果</p>
<p><img src="/pictures/image-20230627112218894.png" alt="image-20230627112218894"></p>
<h2 id="2-库存系统"><a href="#2-库存系统" class="headerlink" title="2.库存系统"></a>2.库存系统</h2><h3 id="2-1-仓库维护"><a href="#2-1-仓库维护" class="headerlink" title="2.1 仓库维护"></a>2.1 仓库维护</h3><p><strong>仓库的分页加条件查询</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> PageUtils <span class="title function_">queryPage</span><span class="params">(Map&lt;String, Object&gt; params)</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">//分页查询的条件</span></span><br><span class="line"> LambdaQueryWrapper&lt;WareInfoEntity&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> <span class="type">String</span> <span class="variable">key</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;key&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(key)) &#123;</span><br><span class="line"> queryWrapper.like(WareInfoEntity::getName, key).or()</span><br><span class="line"> .eq(WareInfoEntity::getId, key)</span><br><span class="line"> .or().like(WareInfoEntity::getAddress, key)</span><br><span class="line"> .or().like(WareInfoEntity::getAreacode, key);</span><br><span class="line"> &#125;</span><br><span class="line"> IPage&lt;WareInfoEntity&gt; page = <span class="built_in">this</span>.page(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">Query</span>&lt;WareInfoEntity&gt;().getPage(params),</span><br><span class="line"> queryWrapper</span><br><span class="line"> );</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">PageUtils</span>(page);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>实现的效果</p>
<p><img src="/pictures/image-20230627153518692.png" alt="image-20230627153518692"></p>
<h3 id="2-2-库存工作单"><a href="#2-2-库存工作单" class="headerlink" title="2.2 库存工作单"></a>2.2 库存工作单</h3><h3 id="2-3-商品库存"><a href="#2-3-商品库存" class="headerlink" title="2.3 商品库存"></a>2.3 商品库存</h3><p><strong>商品库存的条件查询</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * &#123;</span></span><br><span class="line"><span class="comment"> * page: 1,//当前页码</span></span><br><span class="line"><span class="comment"> * limit: 10,//每页记录数</span></span><br><span class="line"><span class="comment"> * sidx: &#x27;id&#x27;,//排序字段</span></span><br><span class="line"><span class="comment"> * order: &#x27;asc/desc&#x27;,//排序方式</span></span><br><span class="line"><span class="comment"> * wareId: 123,//仓库id</span></span><br><span class="line"><span class="comment"> * skuId: 123//商品id</span></span><br><span class="line"><span class="comment"> * &#125;</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> PageUtils <span class="title function_">queryPage</span><span class="params">(Map&lt;String, Object&gt; params)</span> &#123;</span><br><span class="line"> LambdaQueryWrapper&lt;WareSkuEntity&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> <span class="type">String</span> <span class="variable">wareId</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;wareId&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(wareId)) &#123;</span><br><span class="line"> queryWrapper.eq(WareSkuEntity::getWareId, wareId);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">String</span> <span class="variable">skuId</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;skuId&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(skuId)) &#123;</span><br><span class="line"> queryWrapper.eq(WareSkuEntity::getSkuId, skuId);</span><br><span class="line"> &#125;</span><br><span class="line"> IPage&lt;WareSkuEntity&gt; page = <span class="built_in">this</span>.page(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">Query</span>&lt;WareSkuEntity&gt;().getPage(params),</span><br><span class="line"> queryWrapper</span><br><span class="line"> );</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">PageUtils</span>(page);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>实现的效果</p>
<p><img src="/pictures/image-20230627160605717.png" alt="image-20230627160605717"></p>
<h3 id="2-4-采购单维护"><a href="#2-4-采购单维护" class="headerlink" title="2.4 采购单维护"></a>2.4 采购单维护</h3><h4 id="2-4-1-采购需求"><a href="#2-4-1-采购需求" class="headerlink" title="2.4.1 采购需求"></a>2.4.1 采购需求</h4><p><strong>采购需求的分页加条件查询</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * status: 0,//状态</span></span><br><span class="line"><span class="comment"> * wareId: 1,//仓库id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> PageUtils <span class="title function_">queryPage</span><span class="params">(Map&lt;String, Object&gt; params)</span> &#123;</span><br><span class="line"> LambdaQueryWrapper&lt;PurchaseDetailEntity&gt; queryWrapper = <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;&gt;();</span><br><span class="line"> <span class="type">String</span> <span class="variable">status</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;status&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(status)) &#123;</span><br><span class="line"> queryWrapper.eq(PurchaseDetailEntity::getStatus, status);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">String</span> <span class="variable">wareId</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;wareId&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(wareId)) &#123;</span><br><span class="line"> queryWrapper.eq(PurchaseDetailEntity::getWareId, wareId);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">String</span> <span class="variable">key</span> <span class="operator">=</span> (String) params.get(<span class="string">&quot;key&quot;</span>);</span><br><span class="line"> <span class="keyword">if</span> (!StringUtils.isEmpty(key)) &#123;</span><br><span class="line"> queryWrapper.and((wrapper-&gt;&#123;</span><br><span class="line"> wrapper.eq(PurchaseDetailEntity::getPurchaseId, key).or().like(PurchaseDetailEntity::getSkuId,key);</span><br><span class="line"> &#125;));</span><br><span class="line"> &#125;</span><br><span class="line"> IPage&lt;PurchaseDetailEntity&gt; page = <span class="built_in">this</span>.page(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">Query</span>&lt;PurchaseDetailEntity&gt;().getPage(params),</span><br><span class="line"> queryWrapper</span><br><span class="line"> );</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">PageUtils</span>(page);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>实现的效果</p>
<p><img src="/pictures/image-20230627161955351.png" alt="image-20230627161955351"></p>
<p><strong>合并采购单</strong></p>
<p>业务需求介绍</p>
<p><img src="/pictures/image-20230627162707377.png" alt="image-20230627162707377"></p>
<p>获取没有领取的采购单,将采购需求合并到这个采购单</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 获取没有领取的采购单</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> PageUtils <span class="title function_">queryPageUnreceivePurchase</span><span class="params">(Map&lt;String, Object&gt; params)</span> &#123;</span><br><span class="line"> IPage&lt;PurchaseEntity&gt; page = <span class="built_in">this</span>.page(</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">Query</span>&lt;PurchaseEntity&gt;().getPage(params),</span><br><span class="line"> <span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;PurchaseEntity&gt;().eq(PurchaseEntity::getStatus,<span class="number">0</span>).or().eq(PurchaseEntity::getStatus,<span class="number">1</span>)</span><br><span class="line"> );</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">new</span> <span class="title class_">PageUtils</span>(page);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p><strong>合并采购需求</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 合并采购需求</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> mergeVo 前端传递的需要合并的采购需求</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Transactional</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">mergePurchase</span><span class="params">(MergeVo mergeVo)</span> &#123;</span><br><span class="line"> <span class="comment">//判断采购单是不是存在</span></span><br><span class="line"> <span class="type">Long</span> <span class="variable">purchaseId</span> <span class="operator">=</span> mergeVo.getPurchaseId();</span><br><span class="line"> <span class="keyword">if</span> (purchaseId == <span class="literal">null</span>) &#123;<span class="comment">//说明没有选择需要合并的采购单,需要先创建一个采购单</span></span><br><span class="line"> <span class="type">PurchaseEntity</span> <span class="variable">purchaseEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PurchaseEntity</span>();</span><br><span class="line"> purchaseEntity.setStatus(WareConstant.PurchaseStatesEnum.CREATED.getCode());</span><br><span class="line"> purchaseEntity.setCreateTime(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> purchaseEntity.setUpdateTime(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> <span class="built_in">this</span>.save(purchaseEntity);</span><br><span class="line"> purchaseId = purchaseEntity.getId();</span><br><span class="line"> &#125;</span><br><span class="line"> List&lt;Long&gt; items = mergeVo.getItems();</span><br><span class="line"> <span class="type">Long</span> <span class="variable">finalPurchaseId</span> <span class="operator">=</span> purchaseId;</span><br><span class="line"> List&lt;PurchaseDetailEntity&gt; detailEntityList = items.stream().map(item -&gt; &#123;</span><br><span class="line"> <span class="type">PurchaseDetailEntity</span> <span class="variable">detailEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PurchaseDetailEntity</span>();</span><br><span class="line"> detailEntity.setId(item);</span><br><span class="line"> detailEntity.setPurchaseId(finalPurchaseId);</span><br><span class="line"> detailEntity.setStatus(WareConstant.PurchaseDeatilStatesEnum.ASSIGNED.getCode());</span><br><span class="line"> <span class="keyword">return</span> detailEntity;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> detailService.updateBatchById(detailEntityList);</span><br><span class="line"> <span class="comment">//更新一下时间</span></span><br><span class="line"> <span class="type">PurchaseEntity</span> <span class="variable">purchaseEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PurchaseEntity</span>();</span><br><span class="line"> purchaseEntity.setId(purchaseId);</span><br><span class="line"> purchaseEntity.setUpdateTime(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> <span class="built_in">this</span>.updateById(purchaseEntity);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h4 id="2-4-2-采购单"><a href="#2-4-2-采购单" class="headerlink" title="2.4.2 采购单"></a>2.4.2 采购单</h4><p><strong>领取采购单</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> ids 采购单id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">received</span><span class="params">(List&lt;Long&gt; ids)</span> &#123;</span><br><span class="line"> <span class="comment">//确认当前的采购单是新建或者分配状态</span></span><br><span class="line"> List&lt;PurchaseEntity&gt; purchaseEntities = ids.stream().map(id -&gt; &#123;</span><br><span class="line"> <span class="type">PurchaseEntity</span> <span class="variable">byId</span> <span class="operator">=</span> <span class="built_in">this</span>.getById(id);</span><br><span class="line"> <span class="keyword">return</span> byId;</span><br><span class="line"> &#125;).filter(item -&gt; &#123;</span><br><span class="line"> <span class="keyword">if</span> (item.getStatus() == WareConstant.PurchaseStatesEnum.CREATED.getCode() ||</span><br><span class="line"> item.getStatus() == WareConstant.PurchaseDeatilStatesEnum.ASSIGNED.getCode()) &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line"> &#125;).map(item-&gt;&#123;</span><br><span class="line"> <span class="comment">//改变采购单状态</span></span><br><span class="line"> item.setStatus(WareConstant.PurchaseStatesEnum.RECEIVE.getCode());</span><br><span class="line"> item.setUpdateTime(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> <span class="keyword">return</span> item;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> <span class="built_in">this</span>.updateBatchById(purchaseEntities);</span><br><span class="line"> <span class="comment">//改变采购项状态</span></span><br><span class="line"> purchaseEntities.forEach(item-&gt;&#123;</span><br><span class="line"> List&lt;PurchaseDetailEntity&gt; entities = detailService.listDetailByPurchaseId(item.getId());</span><br><span class="line"> List&lt;PurchaseDetailEntity&gt; detailEntityList = entities.stream().map(entity -&gt; &#123;</span><br><span class="line"> <span class="type">PurchaseDetailEntity</span> <span class="variable">purchaseDetailEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PurchaseDetailEntity</span>();</span><br><span class="line"> purchaseDetailEntity.setId(entity.getId());</span><br><span class="line"> purchaseDetailEntity.setStatus(WareConstant.PurchaseDeatilStatesEnum.BUYING.getCode());</span><br><span class="line"> <span class="keyword">return</span> purchaseDetailEntity;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> detailService.updateBatchById(detailEntityList);</span><br><span class="line"> &#125;);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p><strong>完成采购的功能</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Transactional</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">done</span><span class="params">(PurchaseDoneVo doneVo)</span> &#123;</span><br><span class="line"> <span class="type">Long</span> <span class="variable">id</span> <span class="operator">=</span> doneVo.getId();</span><br><span class="line"> <span class="comment">//改变采购项的状态</span></span><br><span class="line"> <span class="type">Boolean</span> <span class="variable">flag</span> <span class="operator">=</span> <span class="literal">true</span>;</span><br><span class="line"> List&lt;PurchaseItemDoneVo&gt; items = doneVo.getItems();</span><br><span class="line"> List&lt;PurchaseDetailEntity&gt; purchaseItemDoneVos = <span class="keyword">new</span> <span class="title class_">ArrayList</span>&lt;&gt;();</span><br><span class="line"> <span class="keyword">for</span> (PurchaseItemDoneVo item : items) &#123;</span><br><span class="line"> <span class="type">PurchaseDetailEntity</span> <span class="variable">detailEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PurchaseDetailEntity</span>();</span><br><span class="line"> <span class="keyword">if</span> (item.getStatus() == WareConstant.PurchaseDeatilStatesEnum.HASERROR.getCode()) &#123;</span><br><span class="line"> flag = <span class="literal">false</span>;</span><br><span class="line"> detailEntity.setStatus(item.getStatus());</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> detailEntity.setStatus(WareConstant.PurchaseDeatilStatesEnum.FINISH.getCode());</span><br><span class="line"> <span class="comment">//将成功采购的进行入库</span></span><br><span class="line"> <span class="type">PurchaseDetailEntity</span> <span class="variable">purchaseDetailEntity</span> <span class="operator">=</span> detailService.getById(item.getItemId());</span><br><span class="line"> wareSkuService.addStock(purchaseDetailEntity.getSkuId(),purchaseDetailEntity.getWareId(),purchaseDetailEntity.getSkuNum());</span><br><span class="line"> &#125;</span><br><span class="line"> detailEntity.setId(item.getItemId());</span><br><span class="line"> purchaseItemDoneVos.add(detailEntity);</span><br><span class="line"> &#125;</span><br><span class="line"> detailService.updateBatchById(purchaseItemDoneVos);</span><br><span class="line"> <span class="comment">//改变采购单的状态</span></span><br><span class="line"> <span class="type">PurchaseEntity</span> <span class="variable">purchaseEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">PurchaseEntity</span>();</span><br><span class="line"> purchaseEntity.setId(id);</span><br><span class="line"> purchaseEntity.setStatus(flag ? WareConstant.PurchaseStatesEnum.FINISH.getCode() : WareConstant.PurchaseStatesEnum.HASERROR.getCode());</span><br><span class="line"> purchaseEntity.setUpdateTime(<span class="keyword">new</span> <span class="title class_">Date</span>());</span><br><span class="line"> <span class="built_in">this</span>.updateById(purchaseEntity);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p><strong>修改库存的功能</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Transactional</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">addStock</span><span class="params">(Long skuId, Long wareId, Integer skuNum)</span> &#123;</span><br><span class="line"> <span class="comment">//判断是添加的操作还是修改的操作</span></span><br><span class="line"> List&lt;WareSkuEntity&gt; wareSkuEntities = wareSkuDao.selectList(<span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;WareSkuEntity&gt;().eq(WareSkuEntity::getSkuId, skuId).eq(WareSkuEntity::getWareId, wareId));</span><br><span class="line"> <span class="keyword">if</span> (wareSkuEntities == <span class="literal">null</span> || wareSkuEntities.size() == <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="type">WareSkuEntity</span> <span class="variable">wareSkuEntity</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">WareSkuEntity</span>();</span><br><span class="line"> wareSkuEntity.setSkuId(skuId);</span><br><span class="line"> wareSkuEntity.setWareId(wareId);</span><br><span class="line"> wareSkuEntity.setStock(skuNum);</span><br><span class="line"> wareSkuEntity.setStockLocked(<span class="number">0</span>);</span><br><span class="line"> <span class="comment">//远程查询sku的名字</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">R</span> <span class="variable">r</span> <span class="operator">=</span> productFeignService.info(skuId);</span><br><span class="line"> <span class="keyword">if</span>(r.getCode() == <span class="number">0</span>)&#123;</span><br><span class="line"> Map&lt;String,Object&gt; skuInfo = (Map&lt;String, Object&gt;) r.get(<span class="string">&quot;skuInfo&quot;</span>);</span><br><span class="line"> wareSkuEntity.setSkuName((String) skuInfo.get(<span class="string">&quot;skuName&quot;</span>));</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> log.warn(<span class="string">&quot;远程获取商品的Sku信息失败!&quot;</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> wareSkuDao.insert(wareSkuEntity);</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> wareSkuDao.addStock(skuId, wareId, skuNum);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>sql语句</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"> <span class="comment">&lt;!--void addStock(@Param(&quot;skuId&quot;) Long skuId, @Param(&quot;wareId&quot;) Long wareId, @Param(&quot;skuNum&quot;) Integer skuNum);--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">insert</span> <span class="attr">id</span>=<span class="string">&quot;addStock&quot;</span>&gt;</span></span><br><span class="line"> update `wms_ware_sku`</span><br><span class="line"> set stock = stock + #&#123;skuNum&#125;</span><br><span class="line"> where sku_id = #&#123;skuId&#125;</span><br><span class="line"> and ware_id = #&#123;wareId&#125;</span><br><span class="line"><span class="tag">&lt;/<span class="name">insert</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h2 id="3-基础篇总结"><a href="#3-基础篇总结" class="headerlink" title="3.基础篇总结"></a><strong>3.基础篇总结</strong></h2><img src="/pictures/image-20230628170218776.png" alt="image-20230628170218776" style="zoom:150%;" />
<p>个人总结:</p>
<ul>
<li>细节很重要,编写代码的时候要注意细节问题(比如网关的配置,模糊路径和精确路径先后配置的问题)</li>
<li>要有良好的编码习惯,注意代码解耦和代码复用</li>
<li>业务逻辑很重要,编码之前要搞懂了业务逻辑之后再开始写代码</li>
<li>学习技术的时候要融会贯通,学习编程的思想</li>
<li>学技术一定要学会看开发文档技术说明书可以先从开发文档提供的demo开始</li>
</ul>
<h1 id="六-高级篇程序设计"><a href="#六-高级篇程序设计" class="headerlink" title="六.高级篇程序设计"></a>六.高级篇程序设计</h1><h2 id="1-ElasticSearch"><a href="#1-ElasticSearch" class="headerlink" title="1.ElasticSearch"></a>1.ElasticSearch</h2><p><strong>详细的教程</strong></p>
<p><strong><a href="https://qingling.icu/posts/22654.html">ElasticSearch | The Blog (qingling.icu)</a></strong></p>
<h2 id="2-商城业务"><a href="#2-商城业务" class="headerlink" title="2.商城业务"></a>2.商城业务</h2><h3 id="2-1-商品上架"><a href="#2-1-商品上架" class="headerlink" title="2.1 商品上架"></a>2.1 商品上架</h3><p><strong>1.商品Mapping</strong></p>
<p>创建一个product索引和指定映射关系</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line">PUT product</span><br><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;mappings&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;properties&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;skuId&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;long&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;spuId&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuTitle&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;text&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;analyzer&quot;</span><span class="punctuation">:</span> <span class="string">&quot;ik_smart&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuPrice&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;skuImg&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;index&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">false</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;doc_values&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">false</span></span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;saleCount&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;long&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;hasStock&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;boolean&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;hotScore&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;long&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;brandId&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;long&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;catalogId&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;long&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;brandName&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;index&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">false</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;doc_values&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">false</span></span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;brandImg&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;index&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">false</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;doc_values&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">false</span></span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;catalogName&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;index&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">false</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;doc_values&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">false</span></span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrs&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;nested&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;properties&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;attrId&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;long&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrName&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;index&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">false</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;doc_values&quot;</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">false</span></span></span><br><span class="line"> <span class="punctuation">&#125;</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">&quot;attrValue&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line"> <span class="attr">&quot;type&quot;</span><span class="punctuation">:</span> <span class="string">&quot;keyword&quot;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"> <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>
<p><strong>2.上架功能后端代码</strong></p>
<p>所需的实体类</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.common.to.es;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.math.BigDecimal;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/7/5</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 对应ES中保存的文档的实体类</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">SkuEsModel</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> Long skuId;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> Long spuId;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String skuTitle;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> BigDecimal skuPrice;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String skuImg;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> Long saleCount;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> Boolean hasStock;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> Long hotScore;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> Long brandId;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> Long catalogId;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String brandName;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String brandImg;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String catalogName;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> List&lt;Attrs&gt; attrs;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Data</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">class</span> <span class="title class_">Attrs</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> Long attrId;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String attrName;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String attrValue;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>商品上架的后端关键代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 商品上架的功能</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">void</span> <span class="title function_">up</span><span class="params">(Long spuId)</span> &#123;</span><br><span class="line"> <span class="comment">//查询当前spuId对应的所有sku信息</span></span><br><span class="line"> List&lt;SkuInfoEntity&gt; skus = skuInfoService.getSkusBySpuId(spuId);</span><br><span class="line"> List&lt;Long&gt; skuIds = skus.stream().map(SkuInfoEntity::getSkuId).collect(Collectors.toList());</span><br><span class="line"> <span class="comment">//规格属性信息的封装(可以被检索的规格属性信息)</span></span><br><span class="line"> List&lt;ProductAttrValueEntity&gt; baseAttrs = productAttrValueService.baseAttrListForSpu(spuId);</span><br><span class="line"> List&lt;Long&gt; attrIds = baseAttrs.stream().map(attr -&gt; &#123;</span><br><span class="line"> <span class="keyword">return</span> attr.getAttrId();</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> <span class="comment">//获取可以检索的属性id的集合</span></span><br><span class="line"> List&lt;Long&gt; searchAttrIds = attrService.selectSearchAttrs(attrIds);</span><br><span class="line"> <span class="comment">//将其转换成set集合</span></span><br><span class="line"> Set&lt;Long&gt; idSet = <span class="keyword">new</span> <span class="title class_">HashSet</span>&lt;&gt;(searchAttrIds);</span><br><span class="line"> <span class="comment">//最终需要封装的attrs</span></span><br><span class="line"> List&lt;SkuEsModel.Attrs&gt; attrs = baseAttrs.stream().filter(item -&gt; &#123;</span><br><span class="line"> <span class="keyword">return</span> idSet.contains(item.getAttrId());</span><br><span class="line"> &#125;).map(item -&gt; &#123;</span><br><span class="line"> SkuEsModel.<span class="type">Attrs</span> <span class="variable">skuAttr</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SkuEsModel</span>.Attrs();</span><br><span class="line"> BeanUtils.copyProperties(item, skuAttr);</span><br><span class="line"> <span class="keyword">return</span> skuAttr;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> <span class="comment">//库存</span></span><br><span class="line"> Map&lt;Long, Boolean&gt; stockMap = <span class="literal">null</span>;</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="type">R</span> <span class="variable">r</span> <span class="operator">=</span> wareFeignService.getSkusHasStock(skuIds);</span><br><span class="line"> List&lt;SkuHasStockVo&gt; skuHasStockVos = r.getData(<span class="keyword">new</span> <span class="title class_">TypeReference</span>&lt;List&lt;SkuHasStockVo&gt;&gt;()&#123;&#125;);</span><br><span class="line"> stockMap = skuHasStockVos.stream().collect(Collectors.toMap(SkuHasStockVo::getSkuId, item -&gt; item.getHasStock()));</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> log.error(<span class="string">&quot;库存服务查询异常:原因&#123;&#125;&quot;</span>,e);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//封装sku的信息</span></span><br><span class="line"> Map&lt;Long, Boolean&gt; finalStockMap = stockMap;</span><br><span class="line"> List&lt;SkuEsModel&gt; upProducts = skus.stream().map(sku -&gt; &#123;</span><br><span class="line"> <span class="comment">//组装需要的数据</span></span><br><span class="line"> <span class="type">SkuEsModel</span> <span class="variable">skuEsModel</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SkuEsModel</span>();</span><br><span class="line"> BeanUtils.copyProperties(sku, skuEsModel);</span><br><span class="line"> <span class="comment">//价格 图片</span></span><br><span class="line"> skuEsModel.setSkuPrice(sku.getPrice());</span><br><span class="line"> skuEsModel.setSkuImg(sku.getSkuDefaultImg());</span><br><span class="line"> <span class="comment">//设置库存信息</span></span><br><span class="line"> <span class="keyword">if</span>(finalStockMap == <span class="literal">null</span>)&#123;</span><br><span class="line"> skuEsModel.setHasStock(<span class="literal">true</span>);</span><br><span class="line"> &#125;<span class="keyword">else</span> &#123;</span><br><span class="line"> skuEsModel.setHasStock(finalStockMap.get(sku.getSkuId()));</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">//热度评分信息</span></span><br><span class="line"> skuEsModel.setHotScore(<span class="number">0L</span>);</span><br><span class="line"> <span class="comment">//品牌名 分类名 品牌价格</span></span><br><span class="line"> <span class="type">BrandEntity</span> <span class="variable">brand</span> <span class="operator">=</span> brandService.getById(sku.getBrandId());</span><br><span class="line"> skuEsModel.setBrandName(brand.getName());</span><br><span class="line"> skuEsModel.setBrandImg(brand.getLogo());</span><br><span class="line"> <span class="type">CategoryEntity</span> <span class="variable">category</span> <span class="operator">=</span> categoryService.getById(sku.getCatalogId());</span><br><span class="line"> skuEsModel.setCatalogName(category.getName());</span><br><span class="line"> <span class="comment">//设置attrs</span></span><br><span class="line"> skuEsModel.setAttrs(attrs);</span><br><span class="line"> <span class="keyword">return</span> skuEsModel;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> <span class="type">R</span> <span class="variable">r</span> <span class="operator">=</span> searchFeignService.productStatusUp(upProducts);</span><br><span class="line"> <span class="keyword">if</span>(r.getCode() == <span class="number">0</span>)&#123;</span><br><span class="line"> <span class="comment">//远程调用成功</span></span><br><span class="line"> spuInfoDao.updateSpuStatus(spuId, ProductConstant.StatusEnum.SPU_UP.getCode());</span><br><span class="line"> &#125;<span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="comment">//远程调用失败</span></span><br><span class="line"> <span class="comment">//TODO 重复调用的问题</span></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * feign的调用流程</span></span><br><span class="line"><span class="comment"> * 1.构造请求的数据将对象转化成json</span></span><br><span class="line"><span class="comment"> * 2.发送请求进行执行(执行成功之后会解码响应数据)</span></span><br><span class="line"><span class="comment"> * 3.执行请求会有重试机制</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 过滤出属性id中可以被检索的属性的id</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> attrIds 原属性id的集合</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> 可以被检索的属性id的集合</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> List&lt;Long&gt; <span class="title function_">selectSearchAttrs</span><span class="params">(List&lt;Long&gt; attrIds)</span> &#123;</span><br><span class="line"> <span class="comment">//select attr_id from `pms_attr` where attr_id in (?) and search_type=1</span></span><br><span class="line"> <span class="keyword">return</span> attrDao.selectSearchAttrs(attrIds);</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">select</span> <span class="attr">id</span>=<span class="string">&quot;selectSearchAttrs&quot;</span> <span class="attr">resultType</span>=<span class="string">&quot;java.lang.Long&quot;</span>&gt;</span></span><br><span class="line"> select `attr_id`from `pms_attr` where `attr_id` in</span><br><span class="line"> <span class="tag">&lt;<span class="name">foreach</span> <span class="attr">collection</span>=<span class="string">&quot;attrIds&quot;</span> <span class="attr">item</span>=<span class="string">&quot;attr&quot;</span> <span class="attr">separator</span>=<span class="string">&quot;,&quot;</span> <span class="attr">open</span>=<span class="string">&quot;(&quot;</span> <span class="attr">close</span>=<span class="string">&quot;)&quot;</span>&gt;</span></span><br><span class="line"> #&#123;attr&#125;</span><br><span class="line"> <span class="tag">&lt;/<span class="name">foreach</span>&gt;</span></span><br><span class="line"> and `search_type`=1</span><br><span class="line"><span class="tag">&lt;/<span class="name">select</span>&gt;</span></span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查询库存的方法</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> List&lt;SkuHasStockVo&gt; <span class="title function_">getSkusHasStock</span><span class="params">(List&lt;Long&gt; skuIds)</span> &#123;</span><br><span class="line"> List&lt;SkuHasStockVo&gt; skuHasStockVos = skuIds.stream().map(skuId -&gt; &#123;</span><br><span class="line"> <span class="type">SkuHasStockVo</span> <span class="variable">skuHasStockVo</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SkuHasStockVo</span>();</span><br><span class="line"> <span class="type">Long</span> <span class="variable">count</span> <span class="operator">=</span> wareSkuDao.getSkuStock(skuId);</span><br><span class="line"> skuHasStockVo.setSkuId(skuId);</span><br><span class="line"> <span class="keyword">if</span>(count != <span class="literal">null</span>)&#123;</span><br><span class="line"> skuHasStockVo.setHasStock(count &gt; <span class="number">0</span>);</span><br><span class="line"> &#125;<span class="keyword">else</span> &#123;</span><br><span class="line"> skuHasStockVo.setHasStock(<span class="literal">false</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> skuHasStockVo;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> <span class="keyword">return</span> skuHasStockVos;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 存储商品数据</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> Boolean <span class="title function_">productStatusUp</span><span class="params">(List&lt;SkuEsModel&gt; skuEsModels)</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="comment">//将数据保存到ES中</span></span><br><span class="line"> <span class="comment">//在ES中建立好索引</span></span><br><span class="line"> <span class="type">BulkRequest</span> <span class="variable">bulkRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">BulkRequest</span>();</span><br><span class="line"> <span class="keyword">for</span> (SkuEsModel skuEsModel : skuEsModels) &#123;</span><br><span class="line"> <span class="type">IndexRequest</span> <span class="variable">indexRequest</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">IndexRequest</span>(EsConstant.PRODUCT_INDEX);</span><br><span class="line"> indexRequest.id(skuEsModel.getSkuId().toString());</span><br><span class="line"> indexRequest.source(JSON.toJSONString(skuEsModel), XContentType.JSON);</span><br><span class="line"> bulkRequest.add(indexRequest);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="type">BulkResponse</span> <span class="variable">bulk</span> <span class="operator">=</span> restHighLevelClient.bulk(bulkRequest, GulimallElasticSearchConfig.COMMON_OPTIONS);</span><br><span class="line"> <span class="type">boolean</span> <span class="variable">hasFailure</span> <span class="operator">=</span> bulk.hasFailures();</span><br><span class="line"> List&lt;String&gt; ids = Arrays.stream(bulk.getItems()).map(item -&gt; &#123;</span><br><span class="line"> <span class="keyword">return</span> item.getId();</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> log.info(<span class="string">&quot;上架商品的id:&#123;&#125;&quot;</span>,ids);</span><br><span class="line"> <span class="keyword">return</span> !hasFailure;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h3 id="2-2-首页"><a href="#2-2-首页" class="headerlink" title="2.2 首页"></a>2.2 首页</h3><p>项目的页面视图部署在对应的微服务项目的静态资源中</p>
<p><img src="/pictures/image-20230706112521327.png" alt="image-20230706112521327"></p>
<h4 id="2-2-1整合thymeleaf"><a href="#2-2-1整合thymeleaf" class="headerlink" title="2.2.1整合thymeleaf"></a>2.2.1整合thymeleaf</h4><p>添加thymeleaf的依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!-- thymeleaf--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-thymeleaf<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>将资料中的静态资源放在微服务工程的对应位置,并在配置文件中加入对应的配置</p>
<p><img src="/pictures/image-20230706114304695.png" alt="image-20230706114304695"></p>
<p>首页页面</p>
<p><img src="/pictures/image-20230706145050684.png" alt="image-20230706145050684"></p>
<p>在index.html上加上thymeleaf的名称空间</p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">xmlns:th</span>=<span class="string">&quot;http://www.thymeleaf.org&quot;</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>修改页面的时候需要频繁的重启项目,使用热更新来解决该问题</p>
<p>导入devtools的依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--devtools--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-devtools<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">optional</span>&gt;</span>true<span class="tag">&lt;/<span class="name">optional</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>重启项目之后会显示如下的效果</p>
<p><img src="/pictures/image-20230706154112026.png" alt="image-20230706154112026"></p>
<p>这时我们在每次修改页面之后使用Ctrl+Shift+F9键可以热更新</p>
<p><img src="/pictures/image-20230706161401528.png" alt="image-20230706161401528"></p>
<h4 id="2-2-2-首页面三级分类显示"><a href="#2-2-2-首页面三级分类显示" class="headerlink" title="2.2.2 首页面三级分类显示"></a>2.2.2 首页面三级分类显示</h4><p>首页面的跳转以及一级分类的显示</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 首页面的跳转</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@GetMapping(&#123;&quot;/&quot;,&quot;index.html&quot;&#125;)</span></span><br><span class="line"><span class="keyword">public</span> String <span class="title function_">indexPage</span><span class="params">(Model model)</span>&#123;</span><br><span class="line"> <span class="comment">//查询所有的一级分类</span></span><br><span class="line"> List&lt;CategoryEntity&gt; categorys = categoryService.getLevelOneCategorys();</span><br><span class="line"> model.addAttribute(<span class="string">&quot;categorys&quot;</span>,categorys);</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;index&quot;</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>用于用户端首页面三级分类封装的数据</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.product.vo;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.AllArgsConstructor;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"><span class="keyword">import</span> lombok.NoArgsConstructor;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/7/7</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 用户端首页面三级分类封装的数据</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="meta">@AllArgsConstructor</span></span><br><span class="line"><span class="meta">@NoArgsConstructor</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Catelog2Vo</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 一级父分类的id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String catalog1Id;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 三级子分类</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> List&lt;Category3Vo&gt; catalog3List;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String id;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String name;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 三级分类vo</span></span><br><span class="line"><span class="comment"> * 静态内部类</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Data</span></span><br><span class="line"> <span class="meta">@AllArgsConstructor</span></span><br><span class="line"> <span class="meta">@NoArgsConstructor</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">class</span> <span class="title class_">Category3Vo</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 父分类、二级分类id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String catalog2Id;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String id;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String name;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>前端相关的修改</p>
<figure class="highlight html"><table><tr><td class="code"><pre><span class="line"> <span class="tag">&lt;<span class="name">li</span> <span class="attr">th:each</span>=<span class="string">&quot; category:$&#123;categorys&#125;&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span> <span class="attr">class</span>=<span class="string">&quot;header_main_left_a&quot;</span> <span class="attr">ctg-data</span>=<span class="string">&quot;3&quot;</span> <span class="attr">th:attr</span>=<span class="string">&quot;ctg-data=$&#123;category.catId&#125;&quot;</span>&gt;</span><span class="tag">&lt;<span class="name">b</span> <span class="attr">th:text</span>=<span class="string">&quot;$&#123;category.name&#125;&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230707151505310.png" alt="image-20230707151505310"></p>
<p>controller层代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 首页面的商品分分类信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@ResponseBody</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/index/catalog.json&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> Map&lt;String, List&lt;Catelog2Vo&gt;&gt; <span class="title function_">getCatalogJson</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="keyword">return</span> categoryService.getCatalogJson();</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>service层代码</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line"> <span class="keyword">public</span> Map&lt;String, List&lt;Catelog2Vo&gt;&gt; <span class="title function_">getCatalogJson</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//查出所有的一级分类</span></span><br><span class="line"> List&lt;CategoryEntity&gt; levelOneCategorys = getLevelOneCategorys();</span><br><span class="line"> <span class="comment">//封装数据</span></span><br><span class="line"> Map&lt;String, List&lt;Catelog2Vo&gt;&gt; catelog2VoMap = levelOneCategorys.stream().collect(Collectors.toMap(k -&gt; k.getCatId().toString(), v -&gt; &#123;</span><br><span class="line"> <span class="comment">//查询以及分类下的二级分类</span></span><br><span class="line"> List&lt;CategoryEntity&gt; categoryEntities = categoryDao.selectList(<span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;CategoryEntity&gt;().eq(CategoryEntity::getParentCid, v.getCatId()));</span><br><span class="line"> List&lt;Catelog2Vo&gt; catelog2Vos = <span class="literal">null</span>;</span><br><span class="line"> <span class="keyword">if</span> (categoryEntities != <span class="literal">null</span>) &#123;</span><br><span class="line"> catelog2Vos = categoryEntities.stream().map(item -&gt; &#123;</span><br><span class="line"> <span class="type">Catelog2Vo</span> <span class="variable">catelog2Vo</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Catelog2Vo</span>(v.getCatId().toString(), <span class="literal">null</span>, item.getCatId().toString(), item.getName());</span><br><span class="line"> <span class="comment">//当前二级分类的三级分类</span></span><br><span class="line"> List&lt;CategoryEntity&gt; levelThreeCatelog = categoryDao.selectList(<span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;CategoryEntity&gt;().eq(CategoryEntity::getParentCid, item.getCatId()));</span><br><span class="line"> <span class="keyword">if</span>(levelThreeCatelog != <span class="literal">null</span>)&#123;</span><br><span class="line"> <span class="comment">//封装成指定的数据</span></span><br><span class="line"> List&lt;Catelog2Vo.Category3Vo&gt; category3VoList = levelThreeCatelog.stream().map(threeCatelog -&gt; &#123;</span><br><span class="line"> Catelog2Vo.<span class="type">Category3Vo</span> <span class="variable">category3Vo</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Catelog2Vo</span>.Category3Vo();</span><br><span class="line"> category3Vo.setCatalog2Id(item.getCatId().toString());</span><br><span class="line"> category3Vo.setName(threeCatelog.getName());</span><br><span class="line"> category3Vo.setId(threeCatelog.getCatId().toString());</span><br><span class="line"> <span class="keyword">return</span> category3Vo;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> catelog2Vo.setCatalog3List(category3VoList);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> catelog2Vo;</span><br><span class="line"> &#125;).collect(Collectors.toList());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> catelog2Vos;</span><br><span class="line"> &#125;));</span><br><span class="line"> <span class="keyword">return</span> catelog2VoMap;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>页面实现的效果</p>
<p><img src="/pictures/image-20230707151543593.png" alt="image-20230707151543593"></p>
<h3 id="2-3-搭建域名访问环境"><a href="#2-3-搭建域名访问环境" class="headerlink" title="2.3 搭建域名访问环境"></a>2.3 搭建域名访问环境</h3><p><strong>1.安装SwitchHosts软件</strong></p>
<p>可以快捷的编辑操作hosts文件</p>
<p>打开的时候以管理员的身份打开</p>
<p><img src="/pictures/image-20230707153628394.png" alt="image-20230707153628394"></p>
<p><img src="/pictures/image-20230707154052952.png" alt="image-20230707154052952"></p>
<p>在添加的方案中添加如下的内容点击右下角的保存按钮保存保存失败的更改hosts文件的权限,将只读勾选掉)</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">192.168.195.100 gulimall.com</span><br></pre></td></tr></table></figure>
<p>保存成功之后可以直接访问域名,解析到虚拟机的ip</p>
<p><strong>Tips:有科学上网的测试的时候要先关闭科学上网的软件</strong></p>
<p> 安装了ES的访问gulimall.com:9200可以看到相应的内容</p>
<p><img src="/pictures/image-20230707160328001.png" alt="image-20230707160328001"></p>
<p><strong>2.正式搭建项目的域名访问环境</strong></p>
<p><img src="/pictures/image-20230708092745456.png" alt="image-20230708092745456"></p>
<p>nginx的配置文件</p>
<p><img src="/pictures/image-20230708093600923.png" alt="image-20230708093600923"></p>
<p>配置nginx</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">切换到nginx挂载在本机的配置文件所在的目录</span></span><br><span class="line">cd /mydata/nginx/conf</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">切换到nginx的分配置文件下复制一份 定义gulimall的配置,主配置文件中有include /etc/nginx/conf.d/*.conf;这么一段配置,主配置文件</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">会包含conf.d目录下的所有配置</span></span><br><span class="line">cd /mydata/nginx/conf/conf.d</span><br><span class="line">cp default.conf gulimall.conf 复制一份</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">在gulimall.conf配置文件中配置我们的配置</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">配置如下配置</span></span><br></pre></td></tr></table></figure>
<p>niginx的配置文件如下</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">server &#123;</span><br><span class="line"> listen 80;</span><br><span class="line"> server_name gulimall.com;</span><br><span class="line"></span><br><span class="line"> location / &#123;</span><br><span class="line"> #服务的IP 192.168.0.112</span><br><span class="line"> #服务的端口: 10000</span><br><span class="line"> proxy_pass http://192.168.0.112:10000;</span><br><span class="line"> &#125;</span><br><span class="line"> error_page 500 502 503 504 /50x.html;</span><br><span class="line"> location = /50x.html &#123;</span><br><span class="line"> root /usr/share/nginx/html;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>这时我们在访问gulimall.com的时候就可以访问一下的页面了</p>
<p><img src="/pictures/image-20230708095940126.png" alt="image-20230708095940126"></p>
<p><strong>3.让nginx代理到网关</strong></p>
<p>在nginx.conf配置文件中加上如下的配置</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">#配置上游服务器</span><br><span class="line"> #gulimall是上游服务器的组名</span><br><span class="line"> upstream gulimall&#123;</span><br><span class="line"> #网关的地址</span><br><span class="line"> server 192.168.0.112:88;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>修改gulimall.conf中的配置</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">server &#123;</span><br><span class="line"> listen 80;</span><br><span class="line"> server_name gulimall.com;</span><br><span class="line"></span><br><span class="line"> location / &#123;</span><br><span class="line"> proxy_pass http://gulimall;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> error_page 500 502 503 504 /50x.html;</span><br><span class="line"> location = /50x.html &#123;</span><br><span class="line"> root /usr/share/nginx/html;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>在网关的配置文件中加上一下的配置</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="comment"># nginx代理相关的断言</span></span><br><span class="line"><span class="bullet">-</span> <span class="attr">id:</span> <span class="string">gulimall_host_route</span></span><br><span class="line"> <span class="attr">uri:</span> <span class="string">lb://gulimall-product</span></span><br><span class="line"> <span class="attr">predicates:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">Host=**.gulimall.com,gulimall.com</span></span><br></pre></td></tr></table></figure>
<p>这时我们重启网关的时候发现无法访问到相应的页面 是由于nginx访问网关的时候丢了host</p>
<p>这时我们需要加上如下的配置</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">proxy_set_header Host $host;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230708104321024.png" alt="image-20230708104321024"></p>
<img src="/pictures/image-20230708104848501.png" alt="image-20230708104848501" style="zoom:150%;" />
<h3 id="2-4-性能压测"><a href="#2-4-性能压测" class="headerlink" title="2.4 性能压测"></a>2.4 性能压测</h3><p><strong><a href="https://qingling.icu/posts/1416.html">压力测试与性能监控 | The Blog (qingling.icu)</a></strong></p>
<p>JMeter压力测试</p>
<p><img src="/pictures/image-20230708152102009.png" alt="image-20230708152102009"></p>
<p>性能监控</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">jconsole</span><br><span class="line">jvisualvm</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230709155555491.png" alt="image-20230709155555491"></p>
<h4 id="2-4-1优化中间件对性能的影响"><a href="#2-4-1优化中间件对性能的影响" class="headerlink" title="2.4.1优化中间件对性能的影响"></a>2.4.1优化中间件对性能的影响</h4><p>网关的优化、数据库索引的优化、thymeleaf的优化、静态资源的优化、nginx动静分离</p>
<p><img src="/pictures/image-20230710111805705.png" alt="image-20230710111805705"></p>
<h3 id="2-5-缓存使用"><a href="#2-5-缓存使用" class="headerlink" title="2.5 缓存使用"></a>2.5 缓存使用</h3><h4 id="2-5-1-本地缓存与分布式缓存"><a href="#2-5-1-本地缓存与分布式缓存" class="headerlink" title="2.5.1 本地缓存与分布式缓存"></a>2.5.1 本地缓存与分布式缓存</h4><p>为了系统性能的提升,我们一般都会将部分数据放入缓存中,加速访问。而 db 承担数据落盘工作。<br><strong>哪些数据适合放入缓存?</strong><br>1.即时性、数据一致性要求不高的<br>2.访问量大且更新频率不高的数据(读多,写少)</p>
<p><strong>本地缓存</strong></p>
<p><img src="/pictures/image-20230710143906286.png" alt="image-20230710143906286"></p>
<p><strong>分布式缓存</strong></p>
<p><img src="/pictures/image-20230710143341531.png" alt="image-20230710143341531"></p>
<h4 id="2-5-2-整合redis"><a href="#2-5-2-整合redis" class="headerlink" title="2.5.2 整合redis"></a>2.5.2 整合redis</h4><p><strong>1.安装Redis</strong></p>
<p><img src="/pictures/image-20230710144052877.png" alt="image-20230710144052877"></p>
<p><strong>2.项目中使用Redis</strong></p>
<p><strong><a href="https://qingling.icu/posts/13813.html">SpringBoot整合Redis | The Blog (qingling.icu)</a></strong></p>
<p>2.1 引入依赖</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-data-redis<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>2.2 添加配置</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">redis:</span></span><br><span class="line"> <span class="attr">host:</span> <span class="number">192.168</span><span class="number">.195</span><span class="number">.100</span></span><br><span class="line"> <span class="attr">port:</span> <span class="number">6379</span></span><br></pre></td></tr></table></figure>
<p>2.3 测试使用</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Autowired</span></span><br><span class="line"><span class="keyword">private</span> StringRedisTemplate stringRedisTemplate;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">void</span> <span class="title function_">testRedis</span><span class="params">()</span>&#123;</span><br><span class="line"> ValueOperations&lt;String, String&gt; ops = stringRedisTemplate.opsForValue();</span><br><span class="line"> ops.set(<span class="string">&quot;hello&quot;</span>,<span class="string">&quot;word_&quot;</span>+ UUID.randomUUID().toString());</span><br><span class="line"> <span class="type">String</span> <span class="variable">hello</span> <span class="operator">=</span> ops.get(<span class="string">&quot;hello&quot;</span>);</span><br><span class="line"> System.out.println(hello);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230710145648233.png" alt="image-20230710145648233"></p>
<p><strong>lettuce堆外内存溢出bug</strong></p>
<p>产生原因:</p>
<p>1)、springboot2.0以后<strong>默认</strong>使用 <code>lettuce</code>作为操作redis的客户端它使用netty进行网络通信</p>
<p>2)、lettuce的bug导致netty堆外内存溢出。netty如果没有指定堆外内存默认使用Xms的值可以使用-Dio.netty.maxDirectMemory进行设置</p>
<p>解决方案由于是lettuce的bug造成不要直接使用-Dio.netty.maxDirectMemory去调大虚拟机堆外内存治标不治本。</p>
<ul>
<li>1)、升级lettuce客户端</li>
<li>2)、切换使用jedis</li>
</ul>
<p>修改依赖文件使用jedis作为客户端工具</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-data-redis<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">exclusions</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">exclusion</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>io.lettuce<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>lettuce-core<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">exclusion</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">exclusions</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>redis.clients<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>jedis<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="2-5-3-高并发下缓存失效问题"><a href="#2-5-3-高并发下缓存失效问题" class="headerlink" title="2.5.3 高并发下缓存失效问题"></a>2.5.3 高并发下缓存失效问题</h4><p><strong>缓存穿透</strong></p>
<img src="/pictures/image-20230710153635804.png" alt="image-20230710153635804" style="zoom:150%;" />
<p><strong>缓存雪崩</strong></p>
<img src="/pictures/image-20230710153651752.png" alt="image-20230710153651752" style="zoom:150%;" />
<p><strong>缓存击穿</strong></p>
<img src="/pictures/image-20230710153709464.png" alt="image-20230710153709464" style="zoom:150%;" />
<p><strong>分布式下如何加锁?</strong></p>
<img src="/pictures/image-20230710163735955.png" alt="image-20230710163735955" style="zoom:150%;" />
<p><strong>锁-时序问题</strong></p>
<img src="/pictures/image-20230710165738655.png" alt="image-20230710165738655" style="zoom:150%;" />
<p><strong>分布式锁演进-基本原理</strong></p>
<p><img src="/pictures/image-20230714163437984.png" alt="image-20230714163437984"></p>
<p><strong>分布式锁的最终形态</strong></p>
<p><img src="/pictures/image-20230714171221296.png" alt="image-20230714171221296"></p>
<h4 id="2-5-4-分布式锁-Redisson"><a href="#2-5-4-分布式锁-Redisson" class="headerlink" title="2.5.4 分布式锁-Redisson"></a>2.5.4 分布式锁-Redisson</h4><p>github地址: <a href="https://github.com/redisson/redisson">https://github.com/redisson/redisson</a></p>
<p><strong>1.引入依赖</strong></p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--redisson--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.redisson<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>redisson<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">version</span>&gt;</span>3.12.0<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><strong>2.配置redisson</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.product.config;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.redisson.Redisson;</span><br><span class="line"><span class="keyword">import</span> org.redisson.api.RedissonClient;</span><br><span class="line"><span class="keyword">import</span> org.redisson.config.Config;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Bean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.io.IOException;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/7/14</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> Redisson的配置</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MyRedissonConfig</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 所有对redisson的操作通过RedissonClient</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@Bean(destroyMethod = &quot;shutdown&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> RedissonClient <span class="title function_">redisson</span><span class="params">()</span> <span class="keyword">throws</span> IOException &#123;</span><br><span class="line"> <span class="comment">//创建配置</span></span><br><span class="line"> <span class="type">Config</span> <span class="variable">config</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Config</span>();</span><br><span class="line"> config.useSingleServer().setAddress(<span class="string">&quot;redis://192.168.195.100:6379&quot;</span>);</span><br><span class="line"> <span class="comment">//根据配置config创建RedissonClient实例</span></span><br><span class="line"> <span class="keyword">return</span> Redisson.create(config);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>3.测试使用</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Autowired</span></span><br><span class="line"><span class="keyword">private</span> RedissonClient redissonClient;</span><br><span class="line"></span><br><span class="line"><span class="meta">@Test</span></span><br><span class="line"><span class="keyword">void</span> <span class="title function_">testRedisson</span><span class="params">()</span>&#123;</span><br><span class="line"> System.out.println(redissonClient);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230714175205635.png" alt="image-20230714175205635"></p>
<p><strong>4.简单的使用分布式锁</strong></p>
<p>上一个线程加锁之后没有解锁的话,后面的线程会一直等待前面的线程释放锁,自己再加锁。</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@ResponseBody</span></span><br><span class="line"><span class="meta">@GetMapping(&quot;/hello&quot;)</span></span><br><span class="line"><span class="keyword">public</span> String <span class="title function_">hello</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="comment">//打印时间需要</span></span><br><span class="line"> <span class="type">SimpleDateFormat</span> <span class="variable">sdf</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">SimpleDateFormat</span>();<span class="comment">// 格式化时间</span></span><br><span class="line"> sdf.applyPattern(<span class="string">&quot;yyyy-MM-dd HH:mm:ss&quot;</span>);<span class="comment">// a为am/pm的标记</span></span><br><span class="line"> <span class="type">Date</span> <span class="variable">date</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">Date</span>();<span class="comment">// 获取当前时间</span></span><br><span class="line"></span><br><span class="line"> <span class="comment">//获取同一把锁,只要锁的名字一样,就是同一把锁</span></span><br><span class="line"> <span class="type">RLock</span> <span class="variable">lock</span> <span class="operator">=</span> redissonClient.getLock(<span class="string">&quot;my-lock&quot;</span>);</span><br><span class="line"> <span class="comment">//加锁</span></span><br><span class="line"> lock.lock();<span class="comment">//阻塞式等待,锁没有释放的情况下会一直等待下去</span></span><br><span class="line"> <span class="comment">//1.锁的自动续期如果业务耗费的时间超长运行时会自动给锁续上新的30s默认时续期30s不必担心业务时间长锁自动过期被删掉</span></span><br><span class="line"> <span class="comment">//2.加锁的业务只要运行完成就不会给当前锁续期即使不手动解锁锁默认在30s以后自动s</span></span><br><span class="line"> System.out.println(<span class="string">&quot;现在时间:&quot;</span> + sdf.format(date));</span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> <span class="comment">//执行业务</span></span><br><span class="line"> System.out.println(<span class="string">&quot;加锁成功,执行业务,线程Id:&quot;</span>+Thread.currentThread().getId());</span><br><span class="line"> Thread.sleep(<span class="number">10000</span>);<span class="comment">//等待10秒</span></span><br><span class="line"> &#125; <span class="keyword">catch</span> (InterruptedException e) &#123;</span><br><span class="line"> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="title class_">RuntimeException</span>(e);</span><br><span class="line"> &#125; <span class="keyword">finally</span> &#123;</span><br><span class="line"> <span class="comment">//解锁</span></span><br><span class="line"> System.out.println(<span class="string">&quot;释放锁,线程Id:&quot;</span>+Thread.currentThread().getId());</span><br><span class="line"> lock.unlock();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;hello&quot;</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230714181620263.png" alt="image-20230714181620263"></p>
<p>my-lock对应的值会跟随线程的变化而变化</p>
<p><img src="/pictures/image-20230714182057982.png" alt="image-20230714182057982"></p>
<p><strong>读写锁</strong></p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 写锁没有释放的情况下,读锁必须等待写锁的释放,才能进行读的操作</span></span><br><span class="line"><span class="comment"> * 读写锁的测试</span></span><br><span class="line"><span class="comment"> * 写锁</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@ResponseBody</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/write&quot;)</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">writeValue</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="type">RReadWriteLock</span> <span class="variable">lock</span> <span class="operator">=</span> redissonClient.getReadWriteLock(<span class="string">&quot;rw-lock&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">s</span> <span class="operator">=</span> <span class="string">&quot;&quot;</span>;</span><br><span class="line"> <span class="type">RLock</span> <span class="variable">rLock</span> <span class="operator">=</span> lock.writeLock();<span class="comment">//写锁</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> rLock.lock();</span><br><span class="line"> s = UUID.randomUUID().toString();</span><br><span class="line"> Thread.sleep(<span class="number">30000</span>);</span><br><span class="line"> <span class="comment">//写的操作</span></span><br><span class="line"> redisTemplate.opsForValue().set(<span class="string">&quot;writeValue&quot;</span>,s);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (InterruptedException e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;<span class="keyword">finally</span> &#123;</span><br><span class="line"> rLock.unlock();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> s;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 读写锁的测试</span></span><br><span class="line"><span class="comment"> * 读锁</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="meta">@GetMapping(&quot;/read&quot;)</span></span><br><span class="line"> <span class="meta">@ResponseBody</span></span><br><span class="line"> <span class="keyword">public</span> String <span class="title function_">readValue</span><span class="params">()</span>&#123;</span><br><span class="line"> <span class="type">RReadWriteLock</span> <span class="variable">lock</span> <span class="operator">=</span> redissonClient.getReadWriteLock(<span class="string">&quot;rw-lock&quot;</span>);</span><br><span class="line"> <span class="type">String</span> <span class="variable">s</span> <span class="operator">=</span> <span class="string">&quot;&quot;</span>;</span><br><span class="line"> <span class="type">RLock</span> <span class="variable">rLock</span> <span class="operator">=</span> lock.readLock();<span class="comment">//读锁</span></span><br><span class="line"> <span class="keyword">try</span> &#123;</span><br><span class="line"> rLock.lock();</span><br><span class="line"> <span class="comment">//读的操作</span></span><br><span class="line"> s = redisTemplate.opsForValue().get(<span class="string">&quot;writeValue&quot;</span>);</span><br><span class="line"> &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> &#125;<span class="keyword">finally</span> &#123;</span><br><span class="line"> rLock.unlock();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> s;</span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<h4 id="2-5-5-分布式缓存一致性问题"><a href="#2-5-5-分布式缓存一致性问题" class="headerlink" title="2.5.5 分布式缓存一致性问题"></a>2.5.5 分布式缓存一致性问题</h4><p><strong>双写模式</strong></p>
<p><img src="/pictures/image-20230716100845389.png" alt="image-20230716100845389"></p>
<p><strong>失效模式</strong></p>
<p><img src="/pictures/image-20230716100909465.png" alt="image-20230716100909465"></p>
<p><strong>缓存数据一致性-解决方案</strong></p>
<p><img src="/pictures/image-20230716101939869.png" alt="image-20230716101939869"></p>
<p><strong>缓存数据一致性-解决-Canal</strong></p>
<p><img src="/pictures/image-20230716102510738.png" alt="image-20230716102510738"></p>
<h4 id="2-5-6-缓存-SpringCache"><a href="#2-5-6-缓存-SpringCache" class="headerlink" title="2.5.6 缓存-SpringCache"></a>2.5.6 缓存-SpringCache</h4><p><strong>1、简介</strong></p>
<ul>
<li><p>Spring 从 3.1 开始定义了 org.springframework.cache.Cache和 org.springframework.cache.CacheManager 接口来统一不同的缓存技术;并支持使用 JCacheJSR-107注解简化我们开发</p>
</li>
<li><p>Cache 接口为缓存的组件规范定义,包含缓存的各种操作集合;<br>Cache 接 口 下 Spring 提 供 了 各 种 xxxCache 的 实 现 如 RedisCache EhCacheCache ,ConcurrentMapCache 等;</p>
</li>
<li><p>每次调用需要缓存功能的方法时Spring 会检查检查指定参数的指定的目标方法是否已经被调用过;如果有就直接从缓存中获取方法调用后的结果,如果没有就调用方法并缓存结果后返回给用户。下次调用直接从缓存中获取。</p>
</li>
<li><p>使用 Spring 缓存抽象时我们需要关注以下两点;</p>
<p>1、确定方法需要被缓存以及他们的缓存策略</p>
<p>2、从缓存中读取之前缓存存储的数据</p>
</li>
</ul>
<p><strong>2.以前的笔记教程</strong></p>
<p><strong><a href="https://qingling.icu/posts/13813.html">SpringBoot整合Redis | The Blog (qingling.icu)</a></strong></p>
<p><strong>3.项目中整合SpringCache简化开发</strong></p>
<p><strong>3.1.引入依赖</strong></p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!--我们使redis作为缓存的使用场景在前面我们还要引入redis的依赖--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-starter-cache<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p><strong>3.2.编写配置文件</strong></p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment">#使用缓存的类型</span></span><br><span class="line"><span class="attr">spring.cache.type</span>=<span class="string">redis</span></span><br></pre></td></tr></table></figure>
<p><strong>3.3.测试使用缓存</strong></p>
<p>常用的缓存注解</p>
<p>@Cacheable 触发将数据保存到缓存的操作</p>
<p>@CachePut 不影响方法执行更新缓存</p>
<p>@CacheEvict 触发将数据从缓存中删除的操作</p>
<p>@Caching 组合多个缓存操作</p>
<p>@CacheConfig 在类级别上共享缓存的相关配置</p>
<p>1.在启动类上添加缓存的注解</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@EnableCaching</span> <span class="comment">//开启缓存功能</span></span><br></pre></td></tr></table></figure>
<p>2.测试使用</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="comment">//每一个需要缓存的数据需要我们指定放到那个名字的缓存[缓存的分区(按照业务类型分)]</span></span><br><span class="line"><span class="meta">@Cacheable(&#123;&quot;category&quot;&#125;)</span> <span class="comment">//代表当前方法的结果需要缓存,如果缓存中有,方法就不需要调用了,如果缓存中没有,就会调用方法,将方法的结果放入到缓存</span></span><br><span class="line"><span class="meta">@Override</span></span><br><span class="line"><span class="keyword">public</span> List&lt;CategoryEntity&gt; <span class="title function_">getLevelOneCategorys</span><span class="params">()</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> categoryDao.selectList(<span class="keyword">new</span> <span class="title class_">LambdaQueryWrapper</span>&lt;CategoryEntity&gt;().eq(CategoryEntity::getParentCid, <span class="number">0</span>));</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230716112105848.png" alt="image-20230716112105848"></p>
<p><strong>自定义数据的存储</strong></p>
<p>设置自定义的key值</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Cacheable(value = &#123;&quot;category&quot;&#125;,key = &quot;&#x27;levelOneCategorys&#x27;&quot;)</span> <span class="comment">//自定义key值</span></span><br></pre></td></tr></table></figure>
<p>tips: #root.method.name是SpEL表达式</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="meta">@Cacheable(value = &#123;&quot;category&quot;&#125;,key = &quot;#root.method.name&quot;)</span> <span class="comment">//使用方法名作为key值</span></span><br></pre></td></tr></table></figure>
<p>设置缓存数据的存活时间</p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment">#设置一个小时的存活时间</span></span><br><span class="line"><span class="attr">spring.cache.redis.time-to-live</span>=<span class="string">3600000</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230716152821097.png" alt="image-20230716152821097"></p>
<p><strong>将数据保存为json的格式</strong></p>
<p>添加配置类</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.product.config;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.autoconfigure.cache.CacheProperties;</span><br><span class="line"><span class="keyword">import</span> org.springframework.boot.context.properties.EnableConfigurationProperties;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Bean;</span><br><span class="line"><span class="keyword">import</span> org.springframework.context.annotation.Configuration;</span><br><span class="line"><span class="keyword">import</span> org.springframework.data.redis.cache.RedisCacheConfiguration;</span><br><span class="line"><span class="keyword">import</span> org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;</span><br><span class="line"><span class="keyword">import</span> org.springframework.data.redis.serializer.RedisSerializationContext;</span><br><span class="line"><span class="keyword">import</span> org.springframework.data.redis.serializer.StringRedisSerializer;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/7/16</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 缓存的序列化的配置</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@EnableConfigurationProperties(CacheProperties.class)</span></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">MyCacheConfig</span> &#123;</span><br><span class="line"> <span class="meta">@Bean</span></span><br><span class="line"> RedisCacheConfiguration <span class="title function_">redisCacheConfiguration</span><span class="params">(CacheProperties cacheProperties)</span> &#123;</span><br><span class="line"> <span class="type">RedisCacheConfiguration</span> <span class="variable">config</span> <span class="operator">=</span> RedisCacheConfiguration.defaultCacheConfig();</span><br><span class="line"> config = config.serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(<span class="keyword">new</span> <span class="title class_">StringRedisSerializer</span>()));</span><br><span class="line"> config = config.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(<span class="keyword">new</span> <span class="title class_">GenericJackson2JsonRedisSerializer</span>()));</span><br><span class="line"> <span class="comment">//让配置文件中所有的配置生效(下面的不配置的话,缓存的时间会失效)</span></span><br><span class="line"> CacheProperties.<span class="type">Redis</span> <span class="variable">redisProperties</span> <span class="operator">=</span> cacheProperties.getRedis();</span><br><span class="line"> <span class="keyword">if</span> (redisProperties.getTimeToLive() != <span class="literal">null</span>) &#123;</span><br><span class="line"> config = config.entryTtl(redisProperties.getTimeToLive());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (redisProperties.getKeyPrefix() != <span class="literal">null</span>) &#123;</span><br><span class="line"> config = config.prefixCacheNameWith(redisProperties.getKeyPrefix());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (!redisProperties.isCacheNullValues()) &#123;</span><br><span class="line"> config = config.disableCachingNullValues();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (!redisProperties.isUseKeyPrefix()) &#123;</span><br><span class="line"> config = config.disableKeyPrefix();</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> config;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>效果</p>
<p><img src="/pictures/image-20230716160027391.png" alt="image-20230716160027391"></p>
<p><strong>其它的常用配置</strong></p>
<figure class="highlight properties"><table><tr><td class="code"><pre><span class="line"><span class="comment">#缓存的前缀,如果指定了前缀就使用指定的前缀,没有指定前缀就使用缓存的名字作为前缀</span></span><br><span class="line"><span class="attr">spring.cache.redis.key-prefix</span>=<span class="string">CACHE_</span></span><br><span class="line"><span class="comment">#是否使用缓存的前缀</span></span><br><span class="line"><span class="attr">spring.cache.redis.use-key-prefix</span>=<span class="string">true</span></span><br><span class="line"><span class="comment">#是否缓存空值(缓存穿透的问题的解决)</span></span><br><span class="line"><span class="attr">spring.cache.redis.cache-null-values</span>=<span class="string">true</span></span><br></pre></td></tr></table></figure>
<h3 id="2-6-检索服务"><a href="#2-6-检索服务" class="headerlink" title="2.6 检索服务"></a>2.6 检索服务</h3><h4 id="2-6-1-整合页面"><a href="#2-6-1-整合页面" class="headerlink" title="2.6.1 整合页面"></a>2.6.1 整合页面</h4><p><img src="/pictures/image-20230716173751202.png" alt="image-20230716173751202"></p>
<h4 id="2-6-2-配置域名访问"><a href="#2-6-2-配置域名访问" class="headerlink" title="2.6.2 配置域名访问"></a>2.6.2 配置域名访问</h4><p><img src="/pictures/image-20230716173453604.png" alt="image-20230716173453604"></p>
<p>Nginx的配置</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">server &#123;</span><br><span class="line"> listen 80;</span><br><span class="line"> server_name *.gulimall.com;</span><br><span class="line"></span><br><span class="line"> location / &#123;</span><br><span class="line"> proxy_set_header Host $host;</span><br><span class="line"> proxy_pass http://gulimall;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> error_page 500 502 503 504 /50x.html;</span><br><span class="line"> location = /50x.html &#123;</span><br><span class="line"> root /usr/share/nginx/html;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>网关中配置断言</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="comment">#搜索</span></span><br><span class="line"><span class="bullet">-</span> <span class="attr">id:</span> <span class="string">gulimall_search_route</span></span><br><span class="line"> <span class="attr">uri:</span> <span class="string">lb://gulimall-search</span></span><br><span class="line"> <span class="attr">predicates:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">Host=search.gulimall.com</span></span><br></pre></td></tr></table></figure>
<p><img src="/pictures/image-20230716173628024.png" alt="image-20230716173628024"></p>
<h4 id="2-6-3-首页和搜索页相互跳转"><a href="#2-6-3-首页和搜索页相互跳转" class="headerlink" title="2.6.3 首页和搜索页相互跳转"></a>2.6.3 首页和搜索页相互跳转</h4><p><strong>首页无法跳转到搜索页的原因gumall改为gulimall即可</strong></p>
<p><img src="/pictures/image-20230716181052580.png" alt="image-20230716181052580"></p>
<p><strong>搜索框跳转到搜索页,修改页面中的代码</strong></p>
<p><img src="/pictures/image-20230717094656565.png" alt="image-20230717094656565"></p>
<h4 id="2-6-4-商品的检索"><a href="#2-6-4-商品的检索" class="headerlink" title="2.6.4 商品的检索"></a>2.6.4 商品的检索</h4><p><img src="/pictures/image-20230717095740594.png" alt="image-20230717095740594"></p>
<p>检索条件的VO</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.search.vo;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/7/17</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 检索条件的vo</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">SearchParam</span> &#123;</span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 页面传递过来的全文匹配关键字</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String keyword;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 品牌id,可以多选</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> List&lt;Long&gt; brandId;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 三级分类id</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Long catalog3Id;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 排序条件sort=price/salecount/hotscore_desc/asc</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String sort;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 是否显示有货</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Integer hasStock;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 价格区间查询</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String skuPrice;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 按照属性进行筛选</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> List&lt;String&gt; attrs;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 页码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> <span class="type">Integer</span> <span class="variable">pageNum</span> <span class="operator">=</span> <span class="number">1</span>;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 原生的所有查询条件</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> String _queryString;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>检索的结果</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">package</span> com.atguigu.gulimall.search.vo;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> com.atguigu.common.to.es.SkuEsModel;</span><br><span class="line"><span class="keyword">import</span> lombok.Data;</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> java.util.ArrayList;</span><br><span class="line"><span class="keyword">import</span> java.util.List;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Jason Gong</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 1.0</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@website</span> https://qingling.icu</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Date</span> 2023/7/17</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@Description</span> 根据检索条件返回给页面的商品信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Data</span></span><br><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">SearchResult</span> &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 查询到的所有商品信息</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> List&lt;SkuEsModel&gt; product;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 当前页码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Integer pageNum;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 总记录数</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Long total;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 总页码</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> Integer totalPages;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> List&lt;Integer&gt; pageNavs;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 当前查询到的结果,所有涉及到的品牌</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> List&lt;BrandVo&gt; brands;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 当前查询到的结果,所有涉及到的所有属性</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> List&lt;AttrVo&gt; attrs;</span><br><span class="line"></span><br><span class="line"> <span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 当前查询到的结果,所有涉及到的所有分类</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> <span class="keyword">private</span> List&lt;CatalogVo&gt; catalogs;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> List&lt;NavVo&gt; navs;</span><br><span class="line"></span><br><span class="line"> <span class="meta">@Data</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">class</span> <span class="title class_">NavVo</span> &#123;</span><br><span class="line"> <span class="keyword">private</span> String navName;</span><br><span class="line"> <span class="keyword">private</span> String navValue;</span><br><span class="line"> <span class="keyword">private</span> String link;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="meta">@Data</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">class</span> <span class="title class_">BrandVo</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> Long brandId;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String brandName;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String brandImg;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="meta">@Data</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">class</span> <span class="title class_">AttrVo</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> Long attrId;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String attrName;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> List&lt;String&gt; attrValue;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> <span class="meta">@Data</span></span><br><span class="line"> <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">class</span> <span class="title class_">CatalogVo</span> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> Long catalogId;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span> String catalogName;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>未完待续(学习到177)……</strong></p>
]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>项目实战</tag>
</tags>
</entry>
</search>