单身信息补充,第一版本提交
This commit is contained in:
parent
8bdf51f953
commit
2887c46fbc
|
|
@ -0,0 +1,127 @@
|
|||
package com.ruoyi.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.domain.TbUserSingle;
|
||||
import com.ruoyi.system.service.ITbUserSingleService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 用户单身信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-08
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/single")
|
||||
public class TbUserSingleController extends BaseController
|
||||
{
|
||||
private String prefix = "system/single";
|
||||
|
||||
@Autowired
|
||||
private ITbUserSingleService tbUserSingleService;
|
||||
|
||||
@RequiresPermissions("system:single:view")
|
||||
@GetMapping()
|
||||
public String single()
|
||||
{
|
||||
return prefix + "/single";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户单身信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:single:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(TbUserSingle tbUserSingle)
|
||||
{
|
||||
startPage();
|
||||
List<TbUserSingle> list = tbUserSingleService.selectTbUserSingleList(tbUserSingle);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出用户单身信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:single:export")
|
||||
@Log(title = "用户单身信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(TbUserSingle tbUserSingle)
|
||||
{
|
||||
List<TbUserSingle> list = tbUserSingleService.selectTbUserSingleList(tbUserSingle);
|
||||
ExcelUtil<TbUserSingle> util = new ExcelUtil<TbUserSingle>(TbUserSingle.class);
|
||||
return util.exportExcel(list, "用户单身信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户单身信息
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存用户单身信息
|
||||
*/
|
||||
@RequiresPermissions("system:single:add")
|
||||
@Log(title = "用户单身信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(TbUserSingle tbUserSingle)
|
||||
{
|
||||
return toAjax(tbUserSingleService.insertTbUserSingle(tbUserSingle));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户单身信息
|
||||
*/
|
||||
@RequiresPermissions("system:single:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
TbUserSingle tbUserSingle = tbUserSingleService.selectTbUserSingleById(id);
|
||||
mmap.put("tbUserSingle", tbUserSingle);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存用户单身信息
|
||||
*/
|
||||
@RequiresPermissions("system:single:edit")
|
||||
@Log(title = "用户单身信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(TbUserSingle tbUserSingle)
|
||||
{
|
||||
return toAjax(tbUserSingleService.updateTbUserSingle(tbUserSingle));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户单身信息
|
||||
*/
|
||||
@RequiresPermissions("system:single:remove")
|
||||
@Log(title = "用户单身信息", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(tbUserSingleService.deleteTbUserSingleByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ ruoyi:
|
|||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为80
|
||||
port: 80
|
||||
port: 18000
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 20 KiB |
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="renderer" content="webkit">
|
||||
<title>若依系统首页</title>
|
||||
<title>全民脱单系统首页</title>
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link th:href="@{favicon.ico}" rel="shortcut icon"/>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
</div>
|
||||
<a th:href="@{/index}">
|
||||
<li class="logo hidden-xs">
|
||||
<span class="logo-lg">RuoYi</span>
|
||||
<span class="logo-lg">全民脱单</span>
|
||||
</li>
|
||||
</a>
|
||||
<div class="sidebar-collapse tab-content" id="side-menu">
|
||||
|
|
@ -246,7 +246,6 @@
|
|||
</div>
|
||||
<!-- 右侧栏 -->
|
||||
<ul class="nav navbar-top-links navbar-right welcome-message">
|
||||
<li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="开发文档" href="http://doc.ruoyi.vip/ruoyi" target="_blank"><i class="fa fa-question-circle"></i> 文档</a></li>
|
||||
<li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="锁定屏幕" href="javascript:;" id="lockScreen"><i class="fa fa-lock"></i> 锁屏</a></li>
|
||||
<li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="全屏显示" href="javascript:;" id="fullScreen"><i class="fa fa-arrows-alt"></i> 全屏</a></li>
|
||||
|
||||
|
|
@ -305,7 +304,7 @@
|
|||
</div>
|
||||
|
||||
<div th:if="${footer}" class="footer">
|
||||
<div class="pull-right">© [[${copyrightYear}]] RuoYi Copyright </div>
|
||||
<div class="pull-right">© [[${copyrightYear}]] QuHe Copyright </div>
|
||||
</div>
|
||||
</div>
|
||||
<!--右侧部分结束-->
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="renderer" content="webkit">
|
||||
<title>若依系统首页</title>
|
||||
<title>全民脱单系统首页</title>
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link th:href="@{favicon.ico}" rel="shortcut icon"/>
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
</div>
|
||||
<a th:href="@{/index}">
|
||||
<li class="logo hidden-xs">
|
||||
<span class="logo-lg">RuoYi</span>
|
||||
<span class="logo-lg">全民脱单</span>
|
||||
</li>
|
||||
</a>
|
||||
<div class="sidebar-collapse">
|
||||
|
|
@ -71,113 +71,6 @@
|
|||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li th:if="${demoEnabled}">
|
||||
<a href="javascript:;"><i class="fa fa-desktop"></i><span class="nav-label">实例演示</span><span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li> <a>表单<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
<li><a class="menuItem" th:href="@{/demo/form/button}">按钮</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/grid}">栅格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/select}">下拉框</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/timeline}">时间轴</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/progress_bars}">进度条</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/basic}">基本表单</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/cards}">卡片列表</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/jasny}">功能扩展</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/sortable}">拖动排序</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/invoice}">单据打印</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/labels_tips}">标签 & 提示</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/tabs_panels}">选项卡 & 面板</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/validate}">表单校验</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/wizard}">表单向导</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/upload}">文件上传</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/datetime}">日期和时间</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/summernote}">富文本编辑器</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/duallistbox}">左右互选组件</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/autocomplete}">搜索自动补全</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/cxselect}">多级联动下拉</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/localrefresh}">Ajax局部刷新</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <a>表格<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
<li><a class="menuItem" th:href="@{/demo/table/search}">查询条件</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/footer}">数据汇总</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/groupHeader}">组合表头</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/export}">表格导出</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/exportSelected}">导出选择列</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/remember}">翻页记住选择</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/pageGo}">跳转至指定页</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/params}">自定义查询参数</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/multi}">初始多表格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/button}">点击按钮加载表格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/data}">直接加载表格数据</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/fixedColumns}">表格冻结列</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/event}">自定义触发事件</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/headerStyle}">表格标题格式化</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/detail}">表格细节视图</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/child}">表格父子视图</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/image}">表格图片预览</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/curd}">动态增删改查</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/reorderRows}">表格行拖拽操作</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/reorderColumns}">表格列拖拽操作</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/resizable}">表格列宽拖动</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/editable}">表格行内编辑</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/subdata}">主子表提交</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/refresh}">表格自动刷新</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/print}">表格打印配置</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/dynamicColumns}">表格动态列</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/customView}">自定义视图分页</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/asynTree}">异步加载表格树</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/other}">表格其他操作</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <a>弹框<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
<li><a class="menuItem" th:href="@{/demo/modal/dialog}">模态窗口</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/modal/layer}">弹层组件</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/modal/table}">弹层表格</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <a>操作<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
<li><a class="menuItem" th:href="@{/demo/operate/table}">表格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/operate/other}">其他</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <a>报表<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
<li><a class="menuItem" th:href="@{/demo/report/echarts}">百度ECharts</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/report/peity}">peity</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/report/sparkline}">sparkline</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/report/metrics}">图表组合</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <a>图标<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
<li><a class="menuItem" th:href="@{/demo/icon/fontawesome}">Font Awesome</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/icon/glyphicons}">Glyphicons</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:;"><i class="fa fa-sitemap"></i>四层菜单<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level collapse">
|
||||
<li>
|
||||
<a href="javascript:;" id="damian">三级菜单1<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
<li>
|
||||
<a href="javascript:;">四级菜单1</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:;">四级菜单2</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="javascript:;">三级菜单2</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
@ -193,7 +86,6 @@
|
|||
</a>
|
||||
</div>
|
||||
<ul class="nav navbar-top-links navbar-right welcome-message">
|
||||
<li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="开发文档" href="http://doc.ruoyi.vip/ruoyi" target="_blank"><i class="fa fa-question-circle"></i> 文档</a></li>
|
||||
<li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="锁定屏幕" href="javascript:;" id="lockScreen"><i class="fa fa-lock"></i> 锁屏</a></li>
|
||||
<li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="全屏显示" href="javascript:;" id="fullScreen"><i class="fa fa-arrows-alt"></i> 全屏</a></li>
|
||||
<li class="dropdown user-menu">
|
||||
|
|
@ -251,7 +143,7 @@
|
|||
</div>
|
||||
|
||||
<div th:if="${footer}" class="footer">
|
||||
<div class="pull-right">© [[${copyrightYear}]] RuoYi Copyright </div>
|
||||
<div class="pull-right">© [[${copyrightYear}]] QuHe Copyright </div>
|
||||
</div>
|
||||
</div>
|
||||
<!--右侧部分结束-->
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
<title>登录若依系统</title>
|
||||
<meta name="description" content="若依后台管理框架">
|
||||
<title>登录全民脱单管理系统</title>
|
||||
<meta name="description" content="全民脱单管理系统">
|
||||
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/style.min.css" th:href="@{/css/style.min.css}" rel="stylesheet"/>
|
||||
|
|
@ -25,11 +25,8 @@
|
|||
<div class="row">
|
||||
<div class="col-sm-7">
|
||||
<div class="signin-info">
|
||||
<div class="logopanel m-b">
|
||||
<h1><img alt="[ 若依 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}"></h1>
|
||||
</div>
|
||||
<div class="m-b"></div>
|
||||
<h4>欢迎使用 <strong>若依 后台管理系统</strong></h4>
|
||||
<h4>欢迎使用 <strong>全民脱单 后台管理系统</strong></h4>
|
||||
<ul class="m-b">
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> SpringBoot</li>
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Mybatis</li>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,163 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改用户单身信息')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-single-edit" th:object="${tbUserSingle}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">用户id【tb_user.id】:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userId" th:field="*{userId}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">昵称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="nickName" th:field="*{nickName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">真实姓名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="realName" th:field="*{realName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">出生年月:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="birthday" th:value="${#dates.format(tbUserSingle.birthday, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">身高(单位cm):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="height" th:field="*{height}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">体重(单位KG):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="weight" th:field="*{weight}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">学历 0.大专以下 1.大专 2.本科 3.研究生 4.博士:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="education" th:field="*{education}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">毕业院校:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="school" th:field="*{school}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">婚姻状况 0.未婚 1.离异:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="marriage" th:field="*{marriage}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">职业:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="job" th:field="*{job}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">收入(元/年):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="income" th:field="*{income}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">籍贯:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="nativePlace" th:field="*{nativePlace}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">省份:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="provinceId" th:field="*{provinceId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">城市:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="cityId" th:field="*{cityId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否有房产 0.无房 1.有房:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="houseProperty" th:field="*{houseProperty}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否有车 0.无车 1.有车:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="carProperty" th:field="*{carProperty}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">自我介绍:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="selfIntroduce" th:field="*{selfIntroduce}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">家庭背景:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="familyBackground" th:field="*{familyBackground}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">业务爱好:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="hobby" th:field="*{hobby}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">择偶标准:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="choosingStandard" th:field="*{choosingStandard}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">内心独白:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="remark" th:field="*{remark}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/single";
|
||||
$("#form-single-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-single-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='birthday']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('用户单身信息列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>学历:</label>
|
||||
<input type="text" name="education"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>婚姻状况:</label>
|
||||
<input type="text" name="marriage"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>收入:</label>
|
||||
<input type="text" name="income"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>省份:</label>
|
||||
<input type="text" name="provinceId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>城市:</label>
|
||||
<input type="text" name="cityId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>房产:</label>
|
||||
<input type="text" name="houseProperty"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>轿车:</label>
|
||||
<input type="text" name="carProperty"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:single:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:single:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:single:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('system:single:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:single:remove')}]];
|
||||
var prefix = ctx + "system/single";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "用户单身信息",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'userId',
|
||||
title: '用户id【tb_user.id】',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'nickName',
|
||||
title: '昵称'
|
||||
},
|
||||
{
|
||||
field: 'realName',
|
||||
title: '真实姓名'
|
||||
},
|
||||
{
|
||||
field: 'sex',
|
||||
title: '性别:'
|
||||
},
|
||||
{
|
||||
field: 'birthday',
|
||||
title: '出生年月'
|
||||
},
|
||||
{
|
||||
field: 'height',
|
||||
title: '身高(单位cm)'
|
||||
},
|
||||
{
|
||||
field: 'weight',
|
||||
title: '体重(单位KG)'
|
||||
},
|
||||
{
|
||||
field: 'education',
|
||||
title: '学历'
|
||||
},
|
||||
{
|
||||
field: 'school',
|
||||
title: '毕业院校'
|
||||
},
|
||||
{
|
||||
field: 'marriage',
|
||||
title: '婚姻状况'
|
||||
},
|
||||
{
|
||||
field: 'job',
|
||||
title: '职业'
|
||||
},
|
||||
{
|
||||
field: 'income',
|
||||
title: '收入(元/年)'
|
||||
},
|
||||
{
|
||||
field: 'nativePlace',
|
||||
title: '籍贯'
|
||||
},
|
||||
{
|
||||
field: 'provinceId',
|
||||
title: '省份'
|
||||
},
|
||||
{
|
||||
field: 'cityId',
|
||||
title: '城市'
|
||||
},
|
||||
{
|
||||
field: 'houseProperty',
|
||||
title: '房产'
|
||||
},
|
||||
{
|
||||
field: 'carProperty',
|
||||
title: '轿车'
|
||||
},
|
||||
{
|
||||
field: 'selfIntroduce',
|
||||
title: '自我介绍'
|
||||
},
|
||||
{
|
||||
field: 'familyBackground',
|
||||
title: '家庭背景'
|
||||
},
|
||||
{
|
||||
field: 'hobby',
|
||||
title: '业务爱好'
|
||||
},
|
||||
{
|
||||
field: 'choosingStandard',
|
||||
title: '择偶标准'
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '内心独白'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 用户单身信息对象 tb_user_single
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "tb_user_single")
|
||||
public class TbUserSingle extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 用户id【tb_user.id】 */
|
||||
@Excel(name = "用户id【tb_user.id】")
|
||||
private Long userId;
|
||||
|
||||
/** 昵称 */
|
||||
@Excel(name = "昵称")
|
||||
private String nickName;
|
||||
|
||||
/** 真实姓名 */
|
||||
@Excel(name = "真实姓名")
|
||||
private String realName;
|
||||
|
||||
/** 性别: 0.未知 1.男 2.女 */
|
||||
@Excel(name = "性别: 0.未知 1.男 2.女")
|
||||
private Long sex;
|
||||
|
||||
/** 出生年月 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "出生年月", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date birthday;
|
||||
|
||||
/** 身高(单位cm) */
|
||||
@Excel(name = "身高(单位cm)")
|
||||
private Long height;
|
||||
|
||||
/** 体重(单位KG) */
|
||||
@Excel(name = "体重(单位KG)")
|
||||
private Long weight;
|
||||
|
||||
/** 学历 0.大专以下 1.大专 2.本科 3.研究生 4.博士 */
|
||||
@Excel(name = "学历 0.大专以下 1.大专 2.本科 3.研究生 4.博士")
|
||||
private Long education;
|
||||
|
||||
/** 毕业院校 */
|
||||
@Excel(name = "毕业院校")
|
||||
private String school;
|
||||
|
||||
/** 婚姻状况 0.未婚 1.离异 */
|
||||
@Excel(name = "婚姻状况 0.未婚 1.离异")
|
||||
private Long marriage;
|
||||
|
||||
/** 职业 */
|
||||
@Excel(name = "职业")
|
||||
private String job;
|
||||
|
||||
/** 收入(元/年) */
|
||||
@Excel(name = "收入(元/年)")
|
||||
private Long income;
|
||||
|
||||
/** 籍贯 */
|
||||
@Excel(name = "籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
/** 省份 */
|
||||
@Excel(name = "省份")
|
||||
private Long provinceId;
|
||||
|
||||
/** 城市 */
|
||||
@Excel(name = "城市")
|
||||
private Long cityId;
|
||||
|
||||
/** 是否有房产 0.无房 1.有房 */
|
||||
@Excel(name = "是否有房产 0.无房 1.有房")
|
||||
private Long houseProperty;
|
||||
|
||||
/** 是否有车 0.无车 1.有车 */
|
||||
@Excel(name = "是否有车 0.无车 1.有车")
|
||||
private Long carProperty;
|
||||
|
||||
/** 自我介绍 */
|
||||
@Excel(name = "自我介绍")
|
||||
private String selfIntroduce;
|
||||
|
||||
/** 家庭背景 */
|
||||
@Excel(name = "家庭背景")
|
||||
private String familyBackground;
|
||||
|
||||
/** 业务爱好 */
|
||||
@Excel(name = "业务爱好")
|
||||
private String hobby;
|
||||
|
||||
/** 择偶标准 */
|
||||
@Excel(name = "择偶标准")
|
||||
private String choosingStandard;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.TbUserSingle;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 用户单身信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-08
|
||||
*/
|
||||
public interface TbUserSingleMapper extends BaseMapper<TbUserSingle>
|
||||
{
|
||||
/**
|
||||
* 查询用户单身信息
|
||||
*
|
||||
* @param id 用户单身信息主键
|
||||
* @return 用户单身信息
|
||||
*/
|
||||
public TbUserSingle selectTbUserSingleById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户单身信息列表
|
||||
*
|
||||
* @param tbUserSingle 用户单身信息
|
||||
* @return 用户单身信息集合
|
||||
*/
|
||||
public List<TbUserSingle> selectTbUserSingleList(TbUserSingle tbUserSingle);
|
||||
|
||||
/**
|
||||
* 新增用户单身信息
|
||||
*
|
||||
* @param tbUserSingle 用户单身信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTbUserSingle(TbUserSingle tbUserSingle);
|
||||
|
||||
/**
|
||||
* 修改用户单身信息
|
||||
*
|
||||
* @param tbUserSingle 用户单身信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTbUserSingle(TbUserSingle tbUserSingle);
|
||||
|
||||
/**
|
||||
* 删除用户单身信息
|
||||
*
|
||||
* @param id 用户单身信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbUserSingleById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除用户单身信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbUserSingleByIds(String[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.TbUserSingle;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 用户单身信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-08
|
||||
*/
|
||||
public interface ITbUserSingleService extends IService<TbUserSingle>
|
||||
{
|
||||
/**
|
||||
* 查询用户单身信息
|
||||
*
|
||||
* @param id 用户单身信息主键
|
||||
* @return 用户单身信息
|
||||
*/
|
||||
public TbUserSingle selectTbUserSingleById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户单身信息列表
|
||||
*
|
||||
* @param tbUserSingle 用户单身信息
|
||||
* @return 用户单身信息集合
|
||||
*/
|
||||
public List<TbUserSingle> selectTbUserSingleList(TbUserSingle tbUserSingle);
|
||||
|
||||
/**
|
||||
* 新增用户单身信息
|
||||
*
|
||||
* @param tbUserSingle 用户单身信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTbUserSingle(TbUserSingle tbUserSingle);
|
||||
|
||||
/**
|
||||
* 修改用户单身信息
|
||||
*
|
||||
* @param tbUserSingle 用户单身信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTbUserSingle(TbUserSingle tbUserSingle);
|
||||
|
||||
/**
|
||||
* 批量删除用户单身信息
|
||||
*
|
||||
* @param ids 需要删除的用户单身信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbUserSingleByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除用户单身信息信息
|
||||
*
|
||||
* @param id 用户单身信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbUserSingleById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.TbUserSingleMapper;
|
||||
import com.ruoyi.system.domain.TbUserSingle;
|
||||
import com.ruoyi.system.service.ITbUserSingleService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* 用户单身信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-08
|
||||
*/
|
||||
@Service
|
||||
public class TbUserSingleServiceImpl extends ServiceImpl<TbUserSingleMapper, TbUserSingle> implements ITbUserSingleService
|
||||
{
|
||||
@Autowired
|
||||
private TbUserSingleMapper tbUserSingleMapper;
|
||||
|
||||
/**
|
||||
* 查询用户单身信息
|
||||
*
|
||||
* @param id 用户单身信息主键
|
||||
* @return 用户单身信息
|
||||
*/
|
||||
@Override
|
||||
public TbUserSingle selectTbUserSingleById(Long id)
|
||||
{
|
||||
return tbUserSingleMapper.selectTbUserSingleById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户单身信息列表
|
||||
*
|
||||
* @param tbUserSingle 用户单身信息
|
||||
* @return 用户单身信息
|
||||
*/
|
||||
@Override
|
||||
public List<TbUserSingle> selectTbUserSingleList(TbUserSingle tbUserSingle)
|
||||
{
|
||||
return tbUserSingleMapper.selectTbUserSingleList(tbUserSingle);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户单身信息
|
||||
*
|
||||
* @param tbUserSingle 用户单身信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTbUserSingle(TbUserSingle tbUserSingle)
|
||||
{
|
||||
return tbUserSingleMapper.insertTbUserSingle(tbUserSingle);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户单身信息
|
||||
*
|
||||
* @param tbUserSingle 用户单身信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTbUserSingle(TbUserSingle tbUserSingle)
|
||||
{
|
||||
return tbUserSingleMapper.updateTbUserSingle(tbUserSingle);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户单身信息
|
||||
*
|
||||
* @param ids 需要删除的用户单身信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTbUserSingleByIds(String ids)
|
||||
{
|
||||
return tbUserSingleMapper.deleteTbUserSingleByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户单身信息信息
|
||||
*
|
||||
* @param id 用户单身信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTbUserSingleById(Long id)
|
||||
{
|
||||
return tbUserSingleMapper.deleteTbUserSingleById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,169 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.TbUserSingleMapper">
|
||||
|
||||
<resultMap type="TbUserSingle" id="TbUserSingleResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="realName" column="real_name" />
|
||||
<result property="sex" column="sex" />
|
||||
<result property="birthday" column="birthday" />
|
||||
<result property="height" column="height" />
|
||||
<result property="weight" column="weight" />
|
||||
<result property="education" column="education" />
|
||||
<result property="school" column="school" />
|
||||
<result property="marriage" column="marriage" />
|
||||
<result property="job" column="job" />
|
||||
<result property="income" column="income" />
|
||||
<result property="nativePlace" column="native_place" />
|
||||
<result property="provinceId" column="province_id" />
|
||||
<result property="cityId" column="city_id" />
|
||||
<result property="houseProperty" column="house_property" />
|
||||
<result property="carProperty" column="car_property" />
|
||||
<result property="selfIntroduce" column="self_introduce" />
|
||||
<result property="familyBackground" column="family_background" />
|
||||
<result property="hobby" column="hobby" />
|
||||
<result property="choosingStandard" column="choosing_standard" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTbUserSingleVo">
|
||||
select id, user_id, nick_name, real_name, sex, birthday, height, weight, education, school, marriage, job, income, native_place, province_id, city_id, house_property, car_property, self_introduce, family_background, hobby, choosing_standard, create_time, update_time, remark from tb_user_single
|
||||
</sql>
|
||||
|
||||
<select id="selectTbUserSingleList" parameterType="TbUserSingle" resultMap="TbUserSingleResult">
|
||||
<include refid="selectTbUserSingleVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
||||
<if test="realName != null and realName != ''"> and real_name like concat('%', #{realName}, '%')</if>
|
||||
<if test="sex != null "> and sex = #{sex}</if>
|
||||
<if test="birthday != null "> and birthday = #{birthday}</if>
|
||||
<if test="height != null "> and height = #{height}</if>
|
||||
<if test="weight != null "> and weight = #{weight}</if>
|
||||
<if test="education != null "> and education = #{education}</if>
|
||||
<if test="school != null and school != ''"> and school = #{school}</if>
|
||||
<if test="marriage != null "> and marriage = #{marriage}</if>
|
||||
<if test="job != null and job != ''"> and job = #{job}</if>
|
||||
<if test="income != null "> and income = #{income}</if>
|
||||
<if test="nativePlace != null and nativePlace != ''"> and native_place = #{nativePlace}</if>
|
||||
<if test="provinceId != null "> and province_id = #{provinceId}</if>
|
||||
<if test="cityId != null "> and city_id = #{cityId}</if>
|
||||
<if test="houseProperty != null "> and house_property = #{houseProperty}</if>
|
||||
<if test="carProperty != null "> and car_property = #{carProperty}</if>
|
||||
<if test="selfIntroduce != null and selfIntroduce != ''"> and self_introduce = #{selfIntroduce}</if>
|
||||
<if test="familyBackground != null and familyBackground != ''"> and family_background = #{familyBackground}</if>
|
||||
<if test="hobby != null and hobby != ''"> and hobby = #{hobby}</if>
|
||||
<if test="choosingStandard != null and choosingStandard != ''"> and choosing_standard = #{choosingStandard}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTbUserSingleById" parameterType="Long" resultMap="TbUserSingleResult">
|
||||
<include refid="selectTbUserSingleVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertTbUserSingle" parameterType="TbUserSingle" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into tb_user_single
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="nickName != null">nick_name,</if>
|
||||
<if test="realName != null">real_name,</if>
|
||||
<if test="sex != null">sex,</if>
|
||||
<if test="birthday != null">birthday,</if>
|
||||
<if test="height != null">height,</if>
|
||||
<if test="weight != null">weight,</if>
|
||||
<if test="education != null">education,</if>
|
||||
<if test="school != null">school,</if>
|
||||
<if test="marriage != null">marriage,</if>
|
||||
<if test="job != null">job,</if>
|
||||
<if test="income != null">income,</if>
|
||||
<if test="nativePlace != null">native_place,</if>
|
||||
<if test="provinceId != null">province_id,</if>
|
||||
<if test="cityId != null">city_id,</if>
|
||||
<if test="houseProperty != null">house_property,</if>
|
||||
<if test="carProperty != null">car_property,</if>
|
||||
<if test="selfIntroduce != null">self_introduce,</if>
|
||||
<if test="familyBackground != null">family_background,</if>
|
||||
<if test="hobby != null">hobby,</if>
|
||||
<if test="choosingStandard != null">choosing_standard,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="nickName != null">#{nickName},</if>
|
||||
<if test="realName != null">#{realName},</if>
|
||||
<if test="sex != null">#{sex},</if>
|
||||
<if test="birthday != null">#{birthday},</if>
|
||||
<if test="height != null">#{height},</if>
|
||||
<if test="weight != null">#{weight},</if>
|
||||
<if test="education != null">#{education},</if>
|
||||
<if test="school != null">#{school},</if>
|
||||
<if test="marriage != null">#{marriage},</if>
|
||||
<if test="job != null">#{job},</if>
|
||||
<if test="income != null">#{income},</if>
|
||||
<if test="nativePlace != null">#{nativePlace},</if>
|
||||
<if test="provinceId != null">#{provinceId},</if>
|
||||
<if test="cityId != null">#{cityId},</if>
|
||||
<if test="houseProperty != null">#{houseProperty},</if>
|
||||
<if test="carProperty != null">#{carProperty},</if>
|
||||
<if test="selfIntroduce != null">#{selfIntroduce},</if>
|
||||
<if test="familyBackground != null">#{familyBackground},</if>
|
||||
<if test="hobby != null">#{hobby},</if>
|
||||
<if test="choosingStandard != null">#{choosingStandard},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTbUserSingle" parameterType="TbUserSingle">
|
||||
update tb_user_single
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="nickName != null">nick_name = #{nickName},</if>
|
||||
<if test="realName != null">real_name = #{realName},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
<if test="birthday != null">birthday = #{birthday},</if>
|
||||
<if test="height != null">height = #{height},</if>
|
||||
<if test="weight != null">weight = #{weight},</if>
|
||||
<if test="education != null">education = #{education},</if>
|
||||
<if test="school != null">school = #{school},</if>
|
||||
<if test="marriage != null">marriage = #{marriage},</if>
|
||||
<if test="job != null">job = #{job},</if>
|
||||
<if test="income != null">income = #{income},</if>
|
||||
<if test="nativePlace != null">native_place = #{nativePlace},</if>
|
||||
<if test="provinceId != null">province_id = #{provinceId},</if>
|
||||
<if test="cityId != null">city_id = #{cityId},</if>
|
||||
<if test="houseProperty != null">house_property = #{houseProperty},</if>
|
||||
<if test="carProperty != null">car_property = #{carProperty},</if>
|
||||
<if test="selfIntroduce != null">self_introduce = #{selfIntroduce},</if>
|
||||
<if test="familyBackground != null">family_background = #{familyBackground},</if>
|
||||
<if test="hobby != null">hobby = #{hobby},</if>
|
||||
<if test="choosingStandard != null">choosing_standard = #{choosingStandard},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTbUserSingleById" parameterType="Long">
|
||||
delete from tb_user_single where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTbUserSingleByIds" parameterType="String">
|
||||
delete from tb_user_single where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
86
ry.sh
86
ry.sh
|
|
@ -1,86 +0,0 @@
|
|||
#!/bin/sh
|
||||
# ./ry.sh start 启动 stop 停止 restart 重启 status 状态
|
||||
AppName=ruoyi-admin.jar
|
||||
|
||||
# JVM参数
|
||||
JVM_OPTS="-Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC"
|
||||
APP_HOME=`pwd`
|
||||
LOG_PATH=$APP_HOME/logs/$AppName.log
|
||||
|
||||
if [ "$1" = "" ];
|
||||
then
|
||||
echo -e "\033[0;31m 未输入操作名 \033[0m \033[0;34m {start|stop|restart|status} \033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$AppName" = "" ];
|
||||
then
|
||||
echo -e "\033[0;31m 未输入应用名 \033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function start()
|
||||
{
|
||||
PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'`
|
||||
|
||||
if [ x"$PID" != x"" ]; then
|
||||
echo "$AppName is running..."
|
||||
else
|
||||
nohup java $JVM_OPTS -jar $AppName > /dev/null 2>&1 &
|
||||
echo "Start $AppName success..."
|
||||
fi
|
||||
}
|
||||
|
||||
function stop()
|
||||
{
|
||||
echo "Stop $AppName"
|
||||
|
||||
PID=""
|
||||
query(){
|
||||
PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'`
|
||||
}
|
||||
|
||||
query
|
||||
if [ x"$PID" != x"" ]; then
|
||||
kill -TERM $PID
|
||||
echo "$AppName (pid:$PID) exiting..."
|
||||
while [ x"$PID" != x"" ]
|
||||
do
|
||||
sleep 1
|
||||
query
|
||||
done
|
||||
echo "$AppName exited."
|
||||
else
|
||||
echo "$AppName already stopped."
|
||||
fi
|
||||
}
|
||||
|
||||
function restart()
|
||||
{
|
||||
stop
|
||||
sleep 2
|
||||
start
|
||||
}
|
||||
|
||||
function status()
|
||||
{
|
||||
PID=`ps -ef |grep java|grep $AppName|grep -v grep|wc -l`
|
||||
if [ $PID != 0 ];then
|
||||
echo "$AppName is running..."
|
||||
else
|
||||
echo "$AppName is not running..."
|
||||
fi
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
start;;
|
||||
stop)
|
||||
stop;;
|
||||
restart)
|
||||
restart;;
|
||||
status)
|
||||
status;;
|
||||
*)
|
||||
|
||||
esac
|
||||
Loading…
Reference in New Issue