商家管理

This commit is contained in:
wanghongya 2020-05-24 12:26:06 +08:00
parent cd98c56594
commit 6fa7d8cd78
30 changed files with 1114 additions and 474 deletions

View File

@ -0,0 +1,142 @@
package com.ruoyi.web.controller.system;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
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.Address;
import com.ruoyi.system.service.IAddressService;
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 2020-05-23
*/
@Controller
@RequestMapping("/system/address")
public class AddressController extends BaseController
{
private final static String PREFIX = "system/address";
private final static String ROOT = "0";
@Autowired
private IAddressService addressService;
@RequiresPermissions("system:address:view")
@GetMapping()
public String address()
{
return PREFIX + "/address";
}
@RequiresPermissions("system:address:list")
@GetMapping("/childrenList")
@ResponseBody
public List<Address> selectAddressByParentCode(String code) {
return addressService.selectAddressByParentCode(code);
}
/**
* 查询地区信息列表
*/
@RequiresPermissions("system:address:list")
@GetMapping("/list")
@ResponseBody
public TableDataInfo list(Address address)
{
startPage();
if (StringUtils.isBlank(address.getAreaCode())
|| StringUtils.isBlank(address.getAreaName())
|| StringUtils.isBlank(address.getParentCode())
|| address.getId() == null) {
address.setParentCode(ROOT);
}
List<Address> list = addressService.selectAddressList(address);
return getDataTable(list);
}
/**
* 导出地区信息列表
*/
@RequiresPermissions("system:address:export")
@Log(title = "地区信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(Address address)
{
List<Address> list = addressService.selectAddressList(address);
ExcelUtil<Address> util = new ExcelUtil<Address>(Address.class);
return util.exportExcel(list, "address");
}
/**
* 新增地区信息
*/
@GetMapping("/add")
public String add()
{
return PREFIX + "/add";
}
/**
* 新增保存地区信息
*/
@RequiresPermissions("system:address:add")
@Log(title = "地区信息", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(Address address)
{
return toAjax(addressService.insertAddress(address));
}
/**
* 修改地区信息
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
Address address = addressService.selectAddressById(id);
mmap.put("address", address);
return PREFIX + "/edit";
}
/**
* 修改保存地区信息
*/
@RequiresPermissions("system:address:edit")
@Log(title = "地区信息", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(Address address)
{
return toAjax(addressService.updateAddress(address));
}
/**
* 删除地区信息
*/
@RequiresPermissions("system:address:remove")
@Log(title = "地区信息", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(addressService.deleteAddressByIds(ids));
}
}

View File

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增地区信息')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-address-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">地区编码:</label>
<div class="col-sm-8">
<input name="areaCode" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">地区名称:</label>
<div class="col-sm-8">
<input name="areaName" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">父节点CODE</label>
<div class="col-sm-8">
<input name="parentCode" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/address"
$("#form-address-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-address-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,102 @@
<!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="areaCode"/>
</li>
<li>
<label>地区名称:</label>
<input type="text" name="areaName"/>
</li>
<li>
<label>父节点CODE</label>
<input type="text" name="parentCode"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:address:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:address:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:address:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:address: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:address:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:address:remove')}]];
var prefix = ctx + "system/address";
$(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: '父节点CODE',
visible: false
},
{
field: 'areaCode',
title: '地区编码'
},
{
field: 'areaName',
title: '地区名称'
},
{
field: 'parentCode',
title: '父节点CODE'
},
{
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>

View File

@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改地区信息')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-address-edit" th:object="${address}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">地区编码:</label>
<div class="col-sm-8">
<input name="areaCode" th:field="*{areaCode}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">地区名称:</label>
<div class="col-sm-8">
<input name="areaName" th:field="*{areaName}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">父节点CODE</label>
<div class="col-sm-8">
<input name="parentCode" th:field="*{parentCode}" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/address";
$("#form-address-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-address-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -13,7 +13,7 @@
<input name="businessCode" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label is-required">登录账号:</label>
<div class="col-sm-8">
<input name="loginName" class="form-control" type="text" required>
@ -47,9 +47,10 @@
<label class="col-sm-3 control-label">用户性别:</label>
<div class="col-sm-8">
<select name="sex" class="form-control m-b" required>
<option value="">所有</option>
<option value="0"></option>
<option value="1"></option>
<option value="2">未知</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
@ -59,13 +60,13 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">身份证证件地址:</label>
<label class="col-sm-3 control-label is-required">身份证地址:</label>
<div class="col-sm-8">
<input name="idCard" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">房产、合同等证件地址,json串</label>
<label class="col-sm-3 control-label is-required">证件信息</label>
<div class="col-sm-8">
<input name="credentials" class="form-control" type="text" required>
</div>
@ -76,103 +77,73 @@
<input name="password" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">盐加密:</label>
<div class="form-group">
<label class="col-sm-3 control-label is-required">质保金:</label>
<div class="col-sm-8">
<input name="salt" class="form-control" type="text" required>
<input name="guaranteeMoney" class="form-control" type="text" >
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">帐号状态</label>
<div class="form-group">
<label class="col-sm-3 control-label">商家类型</label>
<div class="col-sm-8">
<div class="radio-box">
<input type="radio" name="status" value="" required>
<label th:for="status" th:text="未知"></label>
</div>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">质保金金额:</label>
<div class="col-sm-8">
<input name="guaranteeMoney" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">已退质保金金额:</label>
<div class="col-sm-8">
<input name="refundGuaranteeMoney" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">商家类型0个人 1商家</label>
<div class="col-sm-8">
<select name="bussinessType" class="form-control m-b" required>
<option value="">所有</option>
<select name="businessType" class="form-control m-b" required>
<option value="0">个人</option>
<option value="1">商家</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">id</label>
<div class="form-group">
<label class="col-sm-3 control-label">省:</label>
<div class="col-sm-8">
<input name="provinceCode" class="form-control" type="text" required>
<select id="provinceSelect" name="provinceCode" class="form-control m-b" th:onchange="changeAreaCode('provinceSelect')"
th:with="areas=${@iAddressService.selectAddressByParentCode('0')}">
<option value="0">--请选择--</option>
<option th:each="area : ${areas}"
th:text="${area.areaName}"
th:value="${area.areaCode}" onclick="alert(0)"/>
</select>
<input id="provinceName" name="provinceName" type="text" style="display:none" value="">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">省名称:</label>
<label class="col-sm-3 control-label is-required">市:</label>
<div class="col-sm-8">
<input name="provinceName" class="form-control" type="text" required>
<select id="citySelect" name="cityCode" class="form-control m-b" th:onchange="changeAreaCode('citySelect')">
<option value="0">--请选择--</option>
</select>
<input id="cityName" name="cityName" type="text" style="display:none" value="">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">市ID</label>
<label class="col-sm-3 control-label is-required"></label>
<div class="col-sm-8">
<input name="cityCode" class="form-control" type="text" required>
<select id="countrySelect" name="countryCode" class="form-control m-b" th:onchange="changeAreaCode('countrySelect')">
<option value="0">--请选择--</option>
</select>
<input id="countryName" name="countryName" type="text" style="display:none" value="">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">市名称</label>
<label class="col-sm-3 control-label is-required">乡/镇</label>
<div class="col-sm-8">
<input name="ciityName" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">县ID</label>
<div class="col-sm-8">
<input name="countyCode" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">县名称:</label>
<div class="col-sm-8">
<input name="countyName" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">乡/镇ID</label>
<div class="col-sm-8">
<input name="townCode" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">乡/镇名称:</label>
<div class="col-sm-8">
<input name="townName" class="form-control" type="text" required>
<select id="townSelect" name="townCode" class="form-control m-b" th:onchange="changeAreaCode('townSelect')">
<option value="0">--请选择--</option>
</select>
<input id="townName" name="townName" type="text" style="display:none" value="">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">详细地址信息:</label>
<div class="col-sm-8">
<input name="adress" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">坐标地址:</label>
<div class="col-sm-8">
<input name="coordinatePoint" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">开户行名称:</label>
<div class="col-sm-8">
@ -185,33 +156,10 @@
<input name="bankCardNo" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">删除标志:</label>
<div class="col-sm-8">
<input name="delFlag" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">最后登陆ip</label>
<div class="col-sm-8">
<input name="loginIp" 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">
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="loginDate" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">版本号:</label>
<div class="col-sm-8">
<input name="version" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
@ -233,6 +181,44 @@
minView: "month",
autoclose: true
});
function changeAreaCode(selectId) {
var code = '0';
var nextSelectId = "";
if ("provinceSelect" == selectId) {
$("#citySelect").empty();
$("#countrySelect").empty();
$("#townSelect").empty();
code = $("#provinceSelect").find("option:selected").attr("value");
nextSelectId = "citySelect";
$("#provinceName").val($("#provinceSelect").find("option:selected").text());
} else if ("citySelect" == selectId) {
code = $("#citySelect").find("option:selected").attr("value");
nextSelectId = "countrySelect";
$("#cityName").val($("#citySelect").find("option:selected").text());
} else if ("countrySelect" == selectId) {
code = $("#countrySelect").find("option:selected").attr("value");
nextSelectId = "townSelect";
$("#countryName").val($("#countrySelect").find("option:selected").text());
} else if ("townSelect" == selectId) {
$("#townName").val($("#townSelect").find("option:selected").text());
}
$.ajax({
url: '/system/address/childrenList',
dataType : "json",
async:true,
data:{code:code},
success:function (result) {
var str='<option value="">--请选择--</option>';
for (var i = 0; i < result.length; i++) {
str+='<option value='+result[i].areaCode+'>'+result[i].areaName+'</option>';
}
$("#" + nextSelectId + "").html(str);
}
});
}
</script>
</body>
</html>

View File

@ -48,9 +48,10 @@
<label class="col-sm-3 control-label">用户性别:</label>
<div class="col-sm-8">
<select name="sex" class="form-control m-b" required>
<option value="">所有</option>
<<option value="0" th:field="*{sex}"></option>
<<option value="1" th:field="*{sex}"></option>
<option value="2" th:field="*{sex}">未知</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
@ -60,39 +61,18 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">身份证证件地址</label>
<label class="col-sm-3 control-label is-required">身份证信息</label>
<div class="col-sm-8">
<input name="idCard" th:field="*{idCard}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">房产、合同等证件地址,json串</label>
<label class="col-sm-3 control-label is-required">资质信息</label>
<div class="col-sm-8">
<input name="credentials" th:field="*{credentials}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">密码:</label>
<div class="col-sm-8">
<input name="password" th:field="*{password}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">盐加密:</label>
<div class="col-sm-8">
<input name="salt" th:field="*{salt}" 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">
<div class="radio-box">
<input type="radio" name="status" value="" required>
<label th:for="status" th:text="未知"></label>
</div>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">质保金金额:</label>
<div class="col-sm-8">
@ -108,72 +88,64 @@
<div class="form-group">
<label class="col-sm-3 control-label">商家类型0个人 1商家</label>
<div class="col-sm-8">
<select name="bussinessType" class="form-control m-b" required>
<option value="">所有</option>
<select name="businessType" class="form-control m-b" required>
<option value="0" th:field="*{businessType}">个人</option>
<option value="1" th:field="*{businessType}">商家</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">省id</label>
<div class="form-group">
<label class="col-sm-3 control-label">省:</label>
<div class="col-sm-8">
<input name="provinceCode" th:field="*{provinceCode}" class="form-control" type="text" required>
<select id="provinceSelect" name="provinceCode" class="form-control m-b" th:onchange="changeAreaCode('provinceSelect')"
th:with="areas=${@iAddressService.selectAddressByParentCode('0')}">
<option th:each="area : ${areas}"
th:text="${area.areaName}"
th:value="${area.areaCode}"
th:field="*{provinceCode}"/>
</select>
<input id="provinceName" name="provinceName" type="text" style="display:none" value="">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">省名称:</label>
<div class="form-group">
<label class="col-sm-3 control-label is-required">市:</label>
<div class="col-sm-8">
<input name="provinceName" th:field="*{provinceName}" class="form-control" type="text" required>
<select id="citySelect" name="cityCode" class="form-control m-b" th:onchange="changeAreaCode('citySelect')">
</select>
<input id="cityName" name="cityName" type="text" style="display:none" value="">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">市ID</label>
<div class="form-group">
<label class="col-sm-3 control-label is-required">县:</label>
<div class="col-sm-8">
<input name="cityCode" th:field="*{cityCode}" class="form-control" type="text" required>
<select id="countrySelect" name="countryCode" class="form-control m-b" th:onchange="changeAreaCode('countrySelect')">
</select>
<input id="countryName" name="countryName" type="text" style="display:none" value="">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">市名称:</label>
<div class="form-group">
<label class="col-sm-3 control-label is-required">乡/镇:</label>
<div class="col-sm-8">
<input name="ciityName" th:field="*{ciityName}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">县ID</label>
<div class="col-sm-8">
<input name="countyCode" th:field="*{countyCode}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">县名称:</label>
<div class="col-sm-8">
<input name="countyName" th:field="*{countyName}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">乡/镇ID</label>
<div class="col-sm-8">
<input name="townCode" th:field="*{townCode}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">乡/镇名称:</label>
<div class="col-sm-8">
<input name="townName" th:field="*{townName}" class="form-control" type="text" required>
<select id="townSelect" name="townCode" class="form-control m-b" th:onchange="changeAreaCode('townSelect')">
</select>
<input id="townName" name="townName" type="text" style="display:none" value="">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">详细地址信息:</label>
<div class="col-sm-8">
<input name="adress" th:field="*{adress}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">坐标地址:</label>
<div class="col-sm-8">
<input name="coordinatePoint" th:field="*{coordinatePoint}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">开户行名称:</label>
<div class="col-sm-8">
@ -186,32 +158,14 @@
<input name="bankCardNo" th:field="*{bankCardNo}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">最后登陆ip</label>
<div class="col-sm-8">
<input name="loginIp" th:field="*{loginIp}" 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">
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="loginDate" th:value="${#dates.format(businessFirm.loginDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">版本号:</label>
<div class="col-sm-8">
<input name="version" th:field="*{version}" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script type="text/javascript">
<script type="text/javascript" th:inline="javascript">
var prefix = ctx + "system/firm";
$("#form-firm-edit").validate({
focusCleanup: true
@ -228,6 +182,82 @@
minView: "month",
autoclose: true
});
function changeAreaCode(selectId) {
var code = '0';
var nextSelectId = "";
if ("provinceSelect" == selectId) {
$("#citySelect").empty();
$("#countrySelect").empty();
$("#townSelect").empty();
code = $("#provinceSelect").find("option:selected").attr("value");
nextSelectId = "citySelect";
$("#provinceName").val($("#provinceSelect").find("option:selected").text());
} else if ("citySelect" == selectId) {
code = $("#citySelect").find("option:selected").attr("value");
nextSelectId = "countrySelect";
$("#cityName").val($("#citySelect").find("option:selected").text());
} else if ("countrySelect" == selectId) {
code = $("#countrySelect").find("option:selected").attr("value");
nextSelectId = "townSelect";
$("#countryName").val($("#countrySelect").find("option:selected").text());
} else if ("townSelect" == selectId) {
$("#townName").val($("#townSelect").find("option:selected").text());
}
$.ajax({
url: '/system/address/childrenList',
dataType : "json",
async:true,
data:{code:code},
success:function (result) {
var str='<option value="">--请选择--</option>';
for (var i = 0; i < result.length; i++) {
str+='<option value='+result[i].areaCode+'>'+result[i].areaName+'</option>';
}
$("#" + nextSelectId + "").html(str);
}
});
}
$().ready(function() {
function initAddress(selectId, areaCode, showCode) {
$.ajax({
url: '/system/address/childrenList',
dataType : "json",
async:true,
data:{code:areaCode},
success:function (result) {
var str='<option value="">--请选择--</option>';
for (var i = 0; i < result.length; i++) {
str+='<option value='+result[i].areaCode+'>'+result[i].areaName+'</option>';
}
$("#" + selectId + "").html(str);
$("#" + selectId + " option[value= " + showCode + "]").prop("selected",true);
}
});
}
var provinceCode = [[${businessFirm.provinceCode}]];
var cityCode = [[${businessFirm.cityCode}]];
var countryCode = [[${businessFirm.countryCode}]];
var townCode = [[${businessFirm.townCode}]];
initAddress('citySelect', provinceCode, cityCode);
initAddress('countrySelect', cityCode, countryCode);
initAddress('townSelect', countryCode, townCode);
//
// $("#citySelect option[value= " + cityCode + "]").prop("selected",true);
// $("#countrySelect option[value= " + countryCode + "]").prop("selected",true);
// $("#townSelect option[value= " + townCode + "]").prop("selected",true);
});
</script>
</body>
</html>

View File

@ -18,133 +18,52 @@
<label>登录账号:</label>
<input type="text" name="loginName"/>
</li>
<li>
<label>用户昵称:</label>
<input type="text" name="userName"/>
</li>
<li>
<label>用户邮箱:</label>
<input type="text" name="email"/>
</li>
<li>
<label>固定电话:</label>
<input type="text" name="telephoneNo"/>
</li>
<li>
<label>手机号码:</label>
<input type="text" name="phoneNo"/>
</li>
<li>
<label>用户性别:</label>
<select name="sex">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>头像路径:</label>
<input type="text" name="avatar"/>
</li>
<li>
<label>身份证证件地址:</label>
<input type="text" name="idCard"/>
</li>
<li>
<label>房产、合同等证件地址,json串</label>
<input type="text" name="credentials"/>
</li>
<li>
<label>密码:</label>
<input type="text" name="password"/>
</li>
<li>
<label>盐加密:</label>
<input type="text" name="salt"/>
</li>
<li>
<label>帐号状态:</label>
<select name="status">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
<option value="0">正常</option>
<option value="1">关闭</option>
</select>
</li>
<li>
<label>质保金金额:</label>
<input type="text" name="guaranteeMoney"/>
</li>
<li>
<label>已退质保金金额:</label>
<input type="text" name="refundGuaranteeMoney"/>
</li>
<li>
<label>商家类型0个人 1商家</label>
<select name="bussinessType">
<label>商家类型</label>
<select name="businessType">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
<option value="0">个人</option>
<option value="1">商家</option>
</select>
</li>
<li>
<label>省id</label>
<input type="text" name="provinceCode"/>
<label>省:</label>
<select name="provinceForm"
th:with="areas=${@iAddressService.selectAddressByParentCode('0')}">
<option th:each="area : ${areas}"
th:text="${area.areaName}"
th:value="${area.areaCode}" onclick="alert(0)"/>
</select>
</li>
<li>
<label>省名称:</label>
<input type="text" name="provinceName"/>
<label>市:</label>
<select name="provinceForm"
th:with="areas=${@iAddressService.selectAddressByParentCode('0')}">
<option th:each="area : ${areas}"
th:text="${area.areaName}"
th:value="${area.areaCode}" onclick="alert(0)"/>
</select>
</li>
<li>
<label>市ID</label>
<input type="text" name="cityCode"/>
</li>
<li>
<label>市名称:</label>
<input type="text" name="ciityName"/>
</li>
<li>
<label>县ID</label>
<input type="text" name="countyCode"/>
</li>
<li>
<label>县名称:</label>
<input type="text" name="countyName"/>
</li>
<li>
<label>乡/镇ID</label>
<input type="text" name="townCode"/>
</li>
<li>
<label>乡/镇名称:</label>
<input type="text" name="townName"/>
</li>
<li>
<label>详细地址信息:</label>
<input type="text" name="adress"/>
</li>
<li>
<label>坐标地址:</label>
<input type="text" name="coordinatePoint"/>
</li>
<li>
<label>开户行名称:</label>
<input type="text" name="bankName"/>
</li>
<li>
<label>开户行卡号:</label>
<input type="text" name="bankCardNo"/>
</li>
<li>
<label>最后登陆ip</label>
<input type="text" name="loginIp"/>
</li>
<li class="select-time">
<label>最后登陆时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginLoginDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endLoginDate]"/>
</li>
<li>
<label>版本号:</label>
<input type="text" name="version"/>
<label>县:</label>
<select name="provinceForm"
th:with="areas=${@iAddressService.selectAddressByParentCode('0')}">
<option th:each="area : ${areas}"
th:text="${area.areaName}"
th:value="${area.areaCode}" onclick="alert(0)"/>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -201,47 +120,53 @@
},
{
field: 'loginName',
title: '登录账号'
title: '登录账号',
visible: false
},
{
field: 'userName',
title: '用户昵称'
title: '商家名称'
},
{
field: 'businessType',
title: '商家类型'
}
,
{
field: 'email',
title: '用户邮箱'
},
{
field: 'telephoneNo',
title: '固定电话'
title: '固定电话',
visible: false
},
{
field: 'phoneNo',
title: '手机号码'
title: '手机号码',
visible: false
},
{
field: 'sex',
title: '用户性别'
title: '用户性别',
visible: false
},
{
field: 'avatar',
title: '头像路径'
title: '头像路径',
visible: false
},
{
field: 'idCard',
title: '身份证证件地址'
title: '身份证',
visible: false
},
{
field: 'credentials',
title: '房产、合同等证件地址,json串'
},
{
field: 'password',
title: '密码'
},
{
field: 'salt',
title: '盐加密'
title: '证件地址',
visible: false
},
{
field: 'status',
@ -249,75 +174,46 @@
},
{
field: 'guaranteeMoney',
title: '质保金金额'
title: '质保金'
},
{
field: 'refundGuaranteeMoney',
title: '已退质保金金额'
},
{
field: 'bussinessType',
title: '商家类型0个人 1商家'
},
{
field: 'provinceCode',
title: '省id'
title: '已退质保金'
},
{
field: 'provinceName',
title: '省名称'
title: '省'
},
{
field: 'cityCode',
title: '市ID'
field: 'cityName',
title: '市'
},
{
field: 'ciityName',
title: '市名称'
},
{
field: 'countyCode',
title: '县ID'
},
{
field: 'countyName',
title: '县名称'
},
{
field: 'townCode',
title: '乡/镇ID'
field: 'countryName',
title: '县'
},
{
field: 'townName',
title: '乡/镇名称'
title: '乡/镇'
},
{
field: 'adress',
title: '详细地址信息'
title: '详细地址'
},
{
field: 'coordinatePoint',
title: '坐标地址'
title: '坐标地址',
visible: false
},
{
field: 'bankName',
title: '开户行名称'
title: '开户行名称',
visible: false
},
{
field: 'bankCardNo',
title: '开户行卡号'
},
{
field: 'loginIp',
title: '最后登陆ip'
},
{
field: 'loginDate',
title: '最后登陆时间'
},
{
field: 'version',
title: '版本号'
title: '开户行卡号',
visible: false
},
{
field: 'remark',

View File

@ -0,0 +1,79 @@
package com.ruoyi.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 地区信息对象 address
*
* @author
* @date 2020-05-23
*/
public class Address extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 地区编码 */
@Excel(name = "地区编码")
private String areaCode;
/** 地区名称 */
@Excel(name = "地区名称")
private String areaName;
/** 父节点CODE */
@Excel(name = "父节点CODE")
private String parentCode;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setAreaCode(String areaCode)
{
this.areaCode = areaCode;
}
public String getAreaCode()
{
return areaCode;
}
public void setAreaName(String areaName)
{
this.areaName = areaName;
}
public String getAreaName()
{
return areaName;
}
public void setParentCode(String parentCode)
{
this.parentCode = parentCode;
}
public String getParentCode()
{
return parentCode;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("areaCode", getAreaCode())
.append("areaName", getAreaName())
.append("parentCode", getParentCode())
.toString();
}
}

View File

@ -81,7 +81,7 @@ public class BusinessFirm extends BaseEntity
/** 商家类型0个人 1商家 */
@Excel(name = "商家类型0个人 1商家")
private String bussinessType;
private String businessType;
/** 省id */
@Excel(name = "省id")
@ -97,15 +97,15 @@ public class BusinessFirm extends BaseEntity
/** 市名称 */
@Excel(name = "市名称")
private String ciityName;
private String cityName;
/** 县ID */
@Excel(name = "县ID")
private String countyCode;
private String countryCode;
/** 县名称 */
@Excel(name = "县名称")
private String countyName;
private String countryName;
/** 乡/镇ID */
@Excel(name = "乡/镇ID")
@ -290,14 +290,14 @@ public class BusinessFirm extends BaseEntity
{
return refundGuaranteeMoney;
}
public void setBussinessType(String bussinessType)
public void setBussinessType(String businessType)
{
this.bussinessType = bussinessType;
this.businessType = businessType;
}
public String getBussinessType()
public String getBusinessType()
{
return bussinessType;
return businessType;
}
public void setProvinceCode(String provinceCode)
{
@ -326,32 +326,32 @@ public class BusinessFirm extends BaseEntity
{
return cityCode;
}
public void setCiityName(String ciityName)
public void setCityName(String cityName)
{
this.ciityName = ciityName;
this.cityName = cityName;
}
public String getCiityName()
public String getCityName()
{
return ciityName;
return cityName;
}
public void setCountyCode(String countyCode)
public void setCountryCode(String countryCode)
{
this.countyCode = countyCode;
this.countryCode = countryCode;
}
public String getCountyCode()
public String getCountryCode()
{
return countyCode;
return countryCode;
}
public void setCountyName(String countyName)
public void setCountryName(String countryName)
{
this.countyName = countyName;
this.countryName = countryName;
}
public String getCountyName()
public String getCountryName()
{
return countyName;
return countryName;
}
public void setTownCode(String townCode)
{
@ -463,13 +463,13 @@ public class BusinessFirm extends BaseEntity
.append("status", getStatus())
.append("guaranteeMoney", getGuaranteeMoney())
.append("refundGuaranteeMoney", getRefundGuaranteeMoney())
.append("bussinessType", getBussinessType())
.append("businessType", getBusinessType())
.append("provinceCode", getProvinceCode())
.append("provinceName", getProvinceName())
.append("cityCode", getCityCode())
.append("ciityName", getCiityName())
.append("countyCode", getCountyCode())
.append("countyName", getCountyName())
.append("cityName", getCityName())
.append("countryCode", getCountryCode())
.append("countryName", getCountryName())
.append("townCode", getTownCode())
.append("townName", getTownName())
.append("adress", getAdress())

View File

@ -0,0 +1,68 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.Address;
/**
* 地区信息Mapper接口
*
* @author ruoyi
* @date 2020-05-23
*/
public interface AddressMapper
{
/**
* 查询地区信息
*
* @param id 地区信息ID
* @return 地区信息
*/
Address selectAddressById(Long id);
/**
* 查询地区信息列表
*
* @param address 地区信息
* @return 地区信息集合
*/
List<Address> selectAddressList(Address address);
/**
* 新增地区信息
*
* @param address 地区信息
* @return 结果
*/
int insertAddress(Address address);
/**
* 修改地区信息
*
* @param address 地区信息
* @return 结果
*/
int updateAddress(Address address);
/**
* 删除地区信息
*
* @param id 地区信息ID
* @return 结果
*/
int deleteAddressById(Long id);
/**
* 批量删除地区信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
int deleteAddressByIds(String[] ids);
/**
* 查询地区信息列表
* @param parentCode
* @return
*/
List<Address> selectAddressByParentCode(String parentCode);
}

View File

@ -0,0 +1,68 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.Address;
/**
* 地区信息Service接口
*
* @author ruoyi
* @date 2020-05-23
*/
public interface IAddressService
{
/**
* 查询地区信息
*
* @param id 地区信息ID
* @return 地区信息
*/
public Address selectAddressById(Long id);
/**
* 查询地区信息
* @param parentCode
* @return 地区信息
*/
List<Address> selectAddressByParentCode(String parentCode);
/**
* 查询地区信息列表
*
* @param address 地区信息
* @return 地区信息集合
*/
public List<Address> selectAddressList(Address address);
/**
* 新增地区信息
*
* @param address 地区信息
* @return 结果
*/
public int insertAddress(Address address);
/**
* 修改地区信息
*
* @param address 地区信息
* @return 结果
*/
public int updateAddress(Address address);
/**
* 批量删除地区信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteAddressByIds(String ids);
/**
* 删除地区信息信息
*
* @param id 地区信息ID
* @return 结果
*/
public int deleteAddressById(Long id);
}

View File

@ -0,0 +1,111 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AddressMapper;
import com.ruoyi.system.domain.Address;
import com.ruoyi.system.service.IAddressService;
import com.ruoyi.common.core.text.Convert;
/**
* 地区信息Service业务层处理
*
* @author ruoyi
* @date 2020-05-23
*/
@Service("iAddressService")
public class AddressServiceImpl implements IAddressService
{
@Autowired
private AddressMapper addressMapper;
/**
* 查询地区信息
*
* @param id 地区信息ID
* @return 地区信息
*/
@Override
public Address selectAddressById(Long id)
{
return addressMapper.selectAddressById(id);
}
/**
* 查询地区信息
*
* @param parentCode
* @return 地区信息
*/
@Override
public List<Address> selectAddressByParentCode(String parentCode)
{
return addressMapper.selectAddressByParentCode(parentCode);
}
/**
* 查询地区信息列表
*
* @param address 地区信息
* @return 地区信息
*/
@Override
public List<Address> selectAddressList(Address address)
{
return addressMapper.selectAddressList(address);
}
/**
* 新增地区信息
*
* @param address 地区信息
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int insertAddress(Address address)
{
return addressMapper.insertAddress(address);
}
/**
* 修改地区信息
*
* @param address 地区信息
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int updateAddress(Address address)
{
return addressMapper.updateAddress(address);
}
/**
* 删除地区信息对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int deleteAddressByIds(String ids)
{
return addressMapper.deleteAddressByIds(Convert.toStrArray(ids));
}
/**
* 删除地区信息信息
*
* @param id 地区信息ID
* @return 结果
*/
@Override
public int deleteAddressById(Long id)
{
return addressMapper.deleteAddressById(id);
}
}

View File

@ -0,0 +1,71 @@
<?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.AddressMapper">
<resultMap type="com.ruoyi.system.domain.Address" id="AddressResult">
<result property="id" column="id" />
<result property="areaCode" column="area_code" />
<result property="areaName" column="area_name" />
<result property="parentCode" column="parent_code" />
</resultMap>
<sql id="selectAddressVo">
select id, area_code, area_name, parent_code from address
</sql>
<select id="selectAddressList" parameterType="com.ruoyi.system.domain.Address" resultMap="AddressResult">
<include refid="selectAddressVo"/>
<where>
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
<if test="parentCode != null and parentCode != ''"> and parent_code = #{parentCode}</if>
</where>
</select>
<select id="selectAddressById" parameterType="Long" resultMap="AddressResult">
<include refid="selectAddressVo"/>
where id = #{id}
</select>
<insert id="insertAddress" parameterType="com.ruoyi.system.domain.Address" useGeneratedKeys="true" keyProperty="id">
insert into address
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="areaCode != null and areaCode != ''">area_code,</if>
<if test="areaName != null and areaName != ''">area_name,</if>
<if test="parentCode != null and parentCode != ''">parent_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="areaCode != null and areaCode != ''">#{areaCode},</if>
<if test="areaName != null and areaName != ''">#{areaName},</if>
<if test="parentCode != null and parentCode != ''">#{parentCode},</if>
</trim>
</insert>
<update id="updateAddress" parameterType="com.ruoyi.system.domain.Address">
update address
<trim prefix="SET" suffixOverrides=",">
<if test="areaCode != null and areaCode != ''">area_code = #{areaCode},</if>
<if test="areaName != null and areaName != ''">area_name = #{areaName},</if>
<if test="parentCode != null and parentCode != ''">parent_code = #{parentCode},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAddressById" parameterType="Long">
delete from address where id = #{id}
</delete>
<delete id="deleteAddressByIds" parameterType="String">
delete from address where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="selectAddressByParentCode" resultMap="AddressResult" parameterType="String">
<include refid="selectAddressVo"/>
where parent_code = #{_parmeter, jdbcType=VARCHAR}
</select>
</mapper>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.BusinessFirmMapper">
<resultMap type="BusinessFirm" id="BusinessFirmResult">
<resultMap type="com.ruoyi.system.domain.BusinessFirm" id="BusinessFirmResult">
<result property="id" column="id" />
<result property="businessCode" column="business_code" />
<result property="loginName" column="login_name" />
@ -21,13 +21,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="status" column="status" />
<result property="guaranteeMoney" column="guarantee_money" />
<result property="refundGuaranteeMoney" column="refund_guarantee_money" />
<result property="bussinessType" column="bussiness_type" />
<result property="businessType" column="business_type" />
<result property="provinceCode" column="province_code" />
<result property="provinceName" column="province_name" />
<result property="cityCode" column="city_code" />
<result property="ciityName" column="ciity_name" />
<result property="countyCode" column="county_code" />
<result property="countyName" column="county_name" />
<result property="cityName" column="city_name" />
<result property="countryCode" column="country_code" />
<result property="countryName" column="country_name" />
<result property="townCode" column="town_code" />
<result property="townName" column="town_name" />
<result property="adress" column="adress" />
@ -46,10 +46,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectBusinessFirmVo">
select id, business_code, login_name, user_name, email, telephone_no, phone_no, sex, avatar, id_card, credentials, password, salt, status, guarantee_money, refund_guarantee_money, bussiness_type, province_code, province_name, city_code, ciity_name, county_code, county_name, town_code, town_name, adress, coordinate_point, bank_name, bank_card_no, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, version, remark from business_firm
select id, business_code, login_name, user_name, email, telephone_no, phone_no, sex, avatar, id_card, credentials, password, salt, status, guarantee_money, refund_guarantee_money, business_type, province_code, province_name, city_code, city_name, country_code, country_name, town_code, town_name, adress, coordinate_point, bank_name, bank_card_no, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, version, remark from business_firm
</sql>
<select id="selectBusinessFirmList" parameterType="BusinessFirm" resultMap="BusinessFirmResult">
<select id="selectBusinessFirmList" parameterType="com.ruoyi.system.domain.BusinessFirm" resultMap="BusinessFirmResult">
<include refid="selectBusinessFirmVo"/>
<where>
<if test="businessCode != null and businessCode != ''"> and business_code = #{businessCode}</if>
@ -67,13 +67,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="guaranteeMoney != null "> and guarantee_money = #{guaranteeMoney}</if>
<if test="refundGuaranteeMoney != null "> and refund_guarantee_money = #{refundGuaranteeMoney}</if>
<if test="bussinessType != null and bussinessType != ''"> and bussiness_type = #{bussinessType}</if>
<if test="businessType != null and businessType != ''"> and business_type = #{businessType}</if>
<if test="provinceCode != null and provinceCode != ''"> and province_code = #{provinceCode}</if>
<if test="provinceName != null and provinceName != ''"> and province_name like concat('%', #{provinceName}, '%')</if>
<if test="cityCode != null and cityCode != ''"> and city_code = #{cityCode}</if>
<if test="ciityName != null and ciityName != ''"> and ciity_name like concat('%', #{ciityName}, '%')</if>
<if test="countyCode != null and countyCode != ''"> and county_code = #{countyCode}</if>
<if test="countyName != null and countyName != ''"> and county_name like concat('%', #{countyName}, '%')</if>
<if test="cityName != null and cityName != ''"> and city_name like concat('%', #{cityName}, '%')</if>
<if test="countryCode != null and countryCode != ''"> and country_code = #{countryCode}</if>
<if test="countryName != null and countryName != ''"> and country_name like concat('%', #{countryName}, '%')</if>
<if test="townCode != null and townCode != ''"> and town_code = #{townCode}</if>
<if test="townName != null and townName != ''"> and town_name like concat('%', #{townName}, '%')</if>
<if test="adress != null and adress != ''"> and adress = #{adress}</if>
@ -91,7 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<insert id="insertBusinessFirm" parameterType="BusinessFirm" useGeneratedKeys="true" keyProperty="id">
<insert id="insertBusinessFirm" parameterType="com.ruoyi.system.domain.BusinessFirm" useGeneratedKeys="true" keyProperty="id">
insert into business_firm
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="businessCode != null and businessCode != ''">business_code,</if>
@ -109,13 +109,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">status,</if>
<if test="guaranteeMoney != null ">guarantee_money,</if>
<if test="refundGuaranteeMoney != null ">refund_guarantee_money,</if>
<if test="bussinessType != null and bussinessType != ''">bussiness_type,</if>
<if test="businessType != null and businessType != ''">business_type,</if>
<if test="provinceCode != null and provinceCode != ''">province_code,</if>
<if test="provinceName != null and provinceName != ''">province_name,</if>
<if test="cityCode != null and cityCode != ''">city_code,</if>
<if test="ciityName != null and ciityName != ''">ciity_name,</if>
<if test="countyCode != null and countyCode != ''">county_code,</if>
<if test="countyName != null and countyName != ''">county_name,</if>
<if test="cityName != null and cityName != ''">city_name,</if>
<if test="countryCode != null and countryCode != ''">country_code,</if>
<if test="countryName != null and countryName != ''">country_name,</if>
<if test="townCode != null and townCode != ''">town_code,</if>
<if test="townName != null and townName != ''">town_name,</if>
<if test="adress != null and adress != ''">adress,</if>
@ -148,13 +148,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">#{status},</if>
<if test="guaranteeMoney != null ">#{guaranteeMoney},</if>
<if test="refundGuaranteeMoney != null ">#{refundGuaranteeMoney},</if>
<if test="bussinessType != null and bussinessType != ''">#{bussinessType},</if>
<if test="businessType != null and businessType != ''">#{businessType},</if>
<if test="provinceCode != null and provinceCode != ''">#{provinceCode},</if>
<if test="provinceName != null and provinceName != ''">#{provinceName},</if>
<if test="cityCode != null and cityCode != ''">#{cityCode},</if>
<if test="ciityName != null and ciityName != ''">#{ciityName},</if>
<if test="countyCode != null and countyCode != ''">#{countyCode},</if>
<if test="countyName != null and countyName != ''">#{countyName},</if>
<if test="cityName != null and cityName != ''">#{cityName},</if>
<if test="countryCode != null and countryCode != ''">#{countryCode},</if>
<if test="countryName != null and countryName != ''">#{countryName},</if>
<if test="townCode != null and townCode != ''">#{townCode},</if>
<if test="townName != null and townName != ''">#{townName},</if>
<if test="adress != null and adress != ''">#{adress},</if>
@ -173,7 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updateBusinessFirm" parameterType="BusinessFirm">
<update id="updateBusinessFirm" parameterType="com.ruoyi.system.domain.BusinessFirm">
update business_firm
<trim prefix="SET" suffixOverrides=",">
<if test="businessCode != null and businessCode != ''">business_code = #{businessCode},</if>
@ -191,13 +191,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">status = #{status},</if>
<if test="guaranteeMoney != null ">guarantee_money = #{guaranteeMoney},</if>
<if test="refundGuaranteeMoney != null ">refund_guarantee_money = #{refundGuaranteeMoney},</if>
<if test="bussinessType != null and bussinessType != ''">bussiness_type = #{bussinessType},</if>
<if test="businessType != null and businessType != ''">business_type = #{businessType},</if>
<if test="provinceCode != null and provinceCode != ''">province_code = #{provinceCode},</if>
<if test="provinceName != null and provinceName != ''">province_name = #{provinceName},</if>
<if test="cityCode != null and cityCode != ''">city_code = #{cityCode},</if>
<if test="ciityName != null and ciityName != ''">ciity_name = #{ciityName},</if>
<if test="countyCode != null and countyCode != ''">county_code = #{countyCode},</if>
<if test="countyName != null and countyName != ''">county_name = #{countyName},</if>
<if test="cityName != null and cityName != ''">city_name = #{cityName},</if>
<if test="countryCode != null and countryCode != ''">country_code = #{countryCode},</if>
<if test="countryName != null and countryName != ''">country_name = #{countryName},</if>
<if test="townCode != null and townCode != ''">town_code = #{townCode},</if>
<if test="townName != null and townName != ''">town_name = #{townName},</if>
<if test="adress != null and adress != ''">adress = #{adress},</if>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysConfigMapper">
<resultMap type="SysConfig" id="SysConfigResult">
<resultMap type="com.ruoyi.system.domain.SysConfig" id="SysConfigResult">
<id property="configId" column="config_id" />
<result property="configName" column="config_name" />
<result property="configKey" column="config_key" />
@ -33,12 +33,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</sql>
<select id="selectConfig" parameterType="SysConfig" resultMap="SysConfigResult">
<select id="selectConfig" parameterType="com.ruoyi.system.domain.SysConfig" resultMap="SysConfigResult">
<include refid="selectConfigVo"/>
<include refid="sqlwhereSearch"/>
</select>
<select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult">
<select id="selectConfigList" parameterType="com.ruoyi.system.domain.SysConfig" resultMap="SysConfigResult">
<include refid="selectConfigVo"/>
<where>
<if test="configName != null and configName != ''">
@ -64,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where config_key = #{configKey}
</select>
<insert id="insertConfig" parameterType="SysConfig">
<insert id="insertConfig" parameterType="com.ruoyi.system.domain.SysConfig">
insert into sys_config (
<if test="configName != null and configName != '' ">config_name,</if>
<if test="configKey != null and configKey != '' ">config_key,</if>
@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</insert>
<update id="updateConfig" parameterType="SysConfig">
<update id="updateConfig" parameterType="com.ruoyi.system.domain.SysConfig">
update sys_config
<set>
<if test="configName != null and configName != ''">config_name = #{configName},</if>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysDeptMapper">
<resultMap type="SysDept" id="SysDeptResult">
<resultMap type="com.ruoyi.system.domain.SysDept" id="SysDeptResult">
<id property="deptId" column="dept_id" />
<result property="parentId" column="parent_id" />
<result property="ancestors" column="ancestors" />
@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by d.parent_id, d.order_num
</select>
<select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
<select id="selectDeptList" parameterType="com.ruoyi.system.domain.SysDept" resultMap="SysDeptResult">
<include refid="selectDeptVo"/>
where d.del_flag = '0'
<if test="parentId != null and parentId != 0">
@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'
</select>
<select id="selectDeptCount" parameterType="SysDept" resultType="int">
<select id="selectDeptCount" parameterType="com.ruoyi.system.domain.SysDept" resultType="int">
select count(1) from sys_dept
where del_flag = '0'
<if test="deptId != null and deptId != 0"> and dept_id = #{deptId} </if>
@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors)
</select>
<insert id="insertDept" parameterType="SysDept">
<insert id="insertDept" parameterType="com.ruoyi.system.domain.SysDept">
insert into sys_dept(
<if test="deptId != null and deptId != 0">dept_id,</if>
<if test="parentId != null and parentId != 0">parent_id,</if>
@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</insert>
<update id="updateDept" parameterType="SysDept">
<update id="updateDept" parameterType="com.ruoyi.system.domain.SysDept">
update sys_dept
<set>
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
@ -145,7 +145,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update sys_dept set del_flag = '2' where dept_id = #{deptId}
</delete>
<update id="updateDeptStatus" parameterType="SysDept">
<update id="updateDeptStatus" parameterType="com.ruoyi.system.domain.SysDept">
update sys_dept
<set>
<if test="status != null and status != ''">status = #{status},</if>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysDictDataMapper">
<resultMap type="SysDictData" id="SysDictDataResult">
<resultMap type="com.ruoyi.system.domain.SysDictData" id="SysDictDataResult">
<id property="dictCode" column="dict_code" />
<result property="dictSort" column="dict_sort" />
<result property="dictLabel" column="dict_label" />
@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from sys_dict_data
</sql>
<select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult">
<select id="selectDictDataList" parameterType="com.ruoyi.system.domain.SysDictData" resultMap="SysDictDataResult">
<include refid="selectDictDataVo"/>
<where>
<if test="dictType != null and dictType != ''">
@ -40,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult">
<select id="selectDictDataByType" parameterType="com.ruoyi.system.domain.SysDictData" resultMap="SysDictDataResult">
<include refid="selectDictDataVo"/>
where status = '0' and dict_type = #{dictType} order by dict_sort asc
</select>
@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<update id="updateDictData" parameterType="SysDictData">
<update id="updateDictData" parameterType="com.ruoyi.system.domain.SysDictData">
update sys_dict_data
<set>
<if test="dictSort != null">dict_sort = #{dictSort},</if>
@ -92,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
</update>
<insert id="insertDictData" parameterType="SysDictData">
<insert id="insertDictData" parameterType="com.ruoyi.system.domain.SysDictData">
insert into sys_dict_data(
<if test="dictSort != null">dict_sort,</if>
<if test="dictLabel != null and dictLabel != ''">dict_label,</if>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysDictTypeMapper">
<resultMap type="SysDictType" id="SysDictTypeResult">
<resultMap type="com.ruoyi.system.domain.SysDictType" id="SysDictTypeResult">
<id property="dictId" column="dict_id" />
<result property="dictName" column="dict_name" />
<result property="dictType" column="dict_type" />
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from sys_dict_type
</sql>
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
<select id="selectDictTypeList" parameterType="com.ruoyi.system.domain.SysDictType" resultMap="SysDictTypeResult">
<include refid="selectDictTypeVo"/>
<where>
<if test="dictName != null and dictName != ''">
@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<update id="updateDictType" parameterType="SysDictType">
<update id="updateDictType" parameterType="com.ruoyi.system.domain.SysDictType">
update sys_dict_type
<set>
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where dict_id = #{dictId}
</update>
<insert id="insertDictType" parameterType="SysDictType">
<insert id="insertDictType" parameterType="com.ruoyi.system.domain.SysDictType">
insert into sys_dict_type(
<if test="dictName != null and dictName != ''">dict_name,</if>
<if test="dictType != null and dictType != ''">dict_type,</if>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysLogininforMapper">
<resultMap type="SysLogininfor" id="SysLogininforResult">
<resultMap type="com.ruoyi.system.domain.SysLogininfor" id="SysLogininforResult">
<id property="infoId" column="info_id" />
<result property="loginName" column="login_name" />
<result property="status" column="status" />
@ -16,12 +16,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="loginTime" column="login_time" />
</resultMap>
<insert id="insertLogininfor" parameterType="SysLogininfor">
<insert id="insertLogininfor" parameterType="com.ruoyi.system.domain.SysLogininfor">
insert into sys_logininfor (login_name, status, ipaddr, login_location, browser, os, msg, login_time)
values (#{loginName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
</insert>
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
<select id="selectLogininforList" parameterType="com.ruoyi.system.domain.SysLogininfor" resultMap="SysLogininforResult">
select info_id,login_name,ipaddr,login_location,browser,os,status,msg,login_time from sys_logininfor
<where>
<if test="ipaddr != null and ipaddr != ''">

View File

@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysMenuMapper">
<resultMap type="SysMenu" id="SysMenuResult">
<resultMap type="com.ruoyi.system.domain.SysMenu" id="SysMenuResult">
<id property="menuId" column="menu_id" />
<result property="menuName" column="menu_name" />
<result property="parentName" column="parent_name" />
@ -77,7 +77,7 @@
order by m.parent_id, m.order_num
</select>
<select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
<select id="selectMenuList" parameterType="com.ruoyi.system.domain.SysMenu" resultMap="SysMenuResult">
<include refid="selectMenuVo"/>
<where>
<if test="menuName != null and menuName != ''">
@ -90,7 +90,7 @@
order by parent_id, order_num
</select>
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
<select id="selectMenuListByUserId" parameterType="com.ruoyi.system.domain.SysMenu" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, ifnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
@ -121,12 +121,12 @@
select count(1) from sys_menu where parent_id=#{menuId}
</select>
<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
<select id="checkMenuNameUnique" parameterType="com.ruoyi.system.domain.SysMenu" resultMap="SysMenuResult">
<include refid="selectMenuVo"/>
where menu_name=#{menuName} and parent_id = #{parentId}
</select>
<update id="updateMenu" parameterType="SysMenu">
<update id="updateMenu" parameterType="com.ruoyi.system.domain.SysMenu">
update sys_menu
<set>
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
@ -145,7 +145,7 @@
where menu_id = #{menuId}
</update>
<insert id="insertMenu" parameterType="SysMenu">
<insert id="insertMenu" parameterType="com.ruoyi.system.domain.SysMenu">
insert into sys_menu(
<if test="menuId != null and menuId != 0">menu_id,</if>
<if test="parentId != null and parentId != 0">parent_id,</if>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysNoticeMapper">
<resultMap type="SysNotice" id="SysNoticeResult">
<resultMap type="com.ruoyi.system.domain.SysNotice" id="SysNoticeResult">
<result property="noticeId" column="notice_id" />
<result property="noticeTitle" column="notice_title" />
<result property="noticeType" column="notice_type" />
@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where notice_id = #{noticeId}
</select>
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
<select id="selectNoticeList" parameterType="com.ruoyi.system.domain.SysNotice" resultMap="SysNoticeResult">
<include refid="selectNoticeVo"/>
<where>
<if test="noticeTitle != null and noticeTitle != ''">
@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<insert id="insertNotice" parameterType="SysNotice">
<insert id="insertNotice" parameterType="com.ruoyi.system.domain.SysNotice">
insert into sys_notice (
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
<if test="noticeType != null and noticeType != '' ">notice_type, </if>
@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</insert>
<update id="updateNotice" parameterType="SysNotice">
<update id="updateNotice" parameterType="com.ruoyi.system.domain.SysNotice">
update sys_notice
<set>
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysOperLogMapper">
<resultMap type="SysOperLog" id="SysOperLogResult">
<resultMap type="com.ruoyi.system.domain.SysOperLog" id="SysOperLogResult">
<id property="operId" column="oper_id" />
<result property="title" column="title" />
<result property="businessType" column="business_type" />
@ -28,12 +28,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from sys_oper_log
</sql>
<insert id="insertOperlog" parameterType="SysOperLog">
<insert id="insertOperlog" parameterType="com.ruoyi.system.domain.SysOperLog">
insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time)
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate())
</insert>
<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
<select id="selectOperLogList" parameterType="com.ruoyi.system.domain.SysOperLog" resultMap="SysOperLogResult">
<include refid="selectOperLogVo"/>
<where>
<if test="title != null and title != ''">

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysPostMapper">
<resultMap type="SysPost" id="SysPostResult">
<resultMap type="com.ruoyi.system.domain.SysPost" id="SysPostResult">
<id property="postId" column="post_id" />
<result property="postCode" column="post_code" />
<result property="postName" column="post_name" />
@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from sys_post
</sql>
<select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
<select id="selectPostList" parameterType="com.ruoyi.system.domain.SysPost" resultMap="SysPostResult">
<include refid="selectPostVo"/>
<where>
<if test="postCode != null and postCode != ''">
@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<update id="updatePost" parameterType="SysPost">
<update id="updatePost" parameterType="com.ruoyi.system.domain.SysPost">
update sys_post
<set>
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where post_id = #{postId}
</update>
<insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
<insert id="insertPost" parameterType="com.ruoyi.system.domain.SysPost" useGeneratedKeys="true" keyProperty="postId">
insert into sys_post(
<if test="postId != null and postId != 0">post_id,</if>
<if test="postCode != null and postCode != ''">post_code,</if>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysRoleDeptMapper">
<resultMap type="SysRoleDept" id="SysRoleDeptResult">
<resultMap type="com.ruoyi.system.domain.SysRoleDept" id="SysRoleDeptResult">
<result property="roleId" column="role_id" />
<result property="deptId" column="dept_id" />
</resultMap>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysRoleMapper">
<resultMap type="SysRole" id="SysRoleResult">
<resultMap type="com.ruoyi.system.domain.SysRole" id="SysRoleResult">
<id property="roleId" column="role_id" />
<result property="roleName" column="role_name" />
<result property="roleKey" column="role_key" />
@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from sys_role r
</sql>
<select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
<select id="selectRoleList" parameterType="com.ruoyi.system.domain.SysRole" resultMap="SysRoleResult">
<include refid="selectRoleContactVo"/>
where r.del_flag = '0'
<if test="roleName != null and roleName != ''">
@ -89,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<update id="updateRole" parameterType="SysRole">
<update id="updateRole" parameterType="com.ruoyi.system.domain.SysRole">
update sys_role
<set>
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where role_id = #{roleId}
</update>
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
<insert id="insertRole" parameterType="com.ruoyi.system.domain.SysRole" useGeneratedKeys="true" keyProperty="roleId">
insert into sys_role(
<if test="roleId != null and roleId != 0">role_id,</if>
<if test="roleName != null and roleName != ''">role_name,</if>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysRoleMenuMapper">
<resultMap type="SysRoleMenu" id="SysRoleMenuResult">
<resultMap type="com.ruoyi.system.domain.SysRoleMenu" id="SysRoleMenuResult">
<result property="roleId" column="role_id" />
<result property="menuId" column="menu_id" />
</resultMap>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysUserMapper">
<resultMap type="SysUser" id="SysUserResult">
<resultMap type="com.ruoyi.system.domain.SysUser" id="SysUserResult">
<id property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
<result property="loginName" column="login_name" />
@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
</resultMap>
<resultMap id="deptResult" type="SysDept">
<resultMap id="deptResult" type="com.ruoyi.system.domain.SysDept">
<id property="deptId" column="dept_id" />
<result property="parentId" column="parent_id" />
<result property="deptName" column="dept_name" />
@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="status" column="dept_status" />
</resultMap>
<resultMap id="RoleResult" type="SysRole">
<resultMap id="RoleResult" type="com.ruoyi.system.domain.SysRole">
<id property="roleId" column="role_id" />
<result property="roleName" column="role_name" />
<result property="roleKey" column="role_key" />
@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_role r on r.role_id = ur.role_id
</sql>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
<select id="selectUserList" parameterType="com.ruoyi.system.domain.SysUser" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
where u.del_flag = '0'
@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${params.dataScope}
</select>
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
<select id="selectAllocatedList" parameterType="com.ruoyi.system.domain.SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.status, u.create_time
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
@ -100,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${params.dataScope}
</select>
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
<select id="selectUnallocatedList" parameterType="com.ruoyi.system.domain.SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.status, u.create_time
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
@ -161,7 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<update id="updateUser" parameterType="SysUser">
<update id="updateUser" parameterType="com.ruoyi.system.domain.SysUser">
update sys_user
<set>
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
@ -184,7 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where user_id = #{userId}
</update>
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
<insert id="insertUser" parameterType="com.ruoyi.system.domain.SysUser" useGeneratedKeys="true" keyProperty="userId">
insert into sys_user(
<if test="userId != null and userId != 0">user_id,</if>
<if test="deptId != null and deptId != 0">dept_id,</if>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysUserOnlineMapper">
<resultMap type="SysUserOnline" id="SysUserOnlineResult">
<resultMap type="com.ruoyi.system.domain.SysUserOnline" id="SysUserOnlineResult">
<id property="sessionId" column="sessionId" />
<result property="loginName" column="login_name" />
<result property="deptName" column="dept_name" />
@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where sessionid = #{sessionid}
</select>
<insert id="saveOnline" parameterType="SysUserOnline">
<insert id="saveOnline" parameterType="com.ruoyi.system.domain.SysUserOnline">
replace into sys_user_online(sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time)
values (#{sessionId}, #{loginName}, #{deptName}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{status}, #{startTimestamp}, #{lastAccessTime}, #{expireTime})
</insert>
@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from sys_user_online where sessionId = #{sessionId}
</delete>
<select id="selectUserOnlineList" parameterType="SysUserOnline" resultMap="SysUserOnlineResult">
<select id="selectUserOnlineList" parameterType="com.ruoyi.system.domain.SysUserOnline" resultMap="SysUserOnlineResult">
<include refid="selectOnlineVo"/>
<where>
<if test="ipaddr != null and ipaddr != ''">

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysUserPostMapper">
<resultMap type="SysUserPost" id="SysUserPostResult">
<resultMap type="com.ruoyi.system.domain.SysUserPost" id="SysUserPostResult">
<result property="userId" column="user_id" />
<result property="postId" column="post_id" />
</resultMap>

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysUserRoleMapper">
<resultMap type="SysUserRole" id="SysUserRoleResult">
<resultMap type="com.ruoyi.system.domain.SysUserRole" id="SysUserRoleResult">
<result property="userId" column="user_id" />
<result property="roleId" column="role_id" />
</resultMap>
@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</insert>
<delete id="deleteUserRoleInfo" parameterType="SysUserRole">
<delete id="deleteUserRoleInfo" parameterType="com.ruoyi.system.domain.SysUserRole">
delete from sys_user_role where user_id=#{userId} and role_id=#{roleId}
</delete>