添加商家管理

This commit is contained in:
wanghongya 2020-05-19 01:37:18 +08:00
parent 9c54c5c37d
commit cd98c56594
13 changed files with 1889 additions and 14 deletions

View File

@ -14,17 +14,6 @@ public class RuoYiApplication
{ {
public static void main(String[] args) public static void main(String[] args)
{ {
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args); SpringApplication.run(RuoYiApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
" | (_,_).' __ ___(_ o _)' \n" +
" | |\\ \\ | || |(_,_)' \n" +
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
} }
} }

View File

@ -0,0 +1,126 @@
package com.ruoyi.web.controller.system;
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.BusinessFirm;
import com.ruoyi.system.service.IBusinessFirmService;
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-19
*/
@Controller
@RequestMapping("/system/firm")
public class BusinessFirmController extends BaseController
{
private String prefix = "system/firm";
@Autowired
private IBusinessFirmService businessFirmService;
@RequiresPermissions("system:firm:view")
@GetMapping()
public String firm()
{
return prefix + "/firm";
}
/**
* 查询商家信息列表
*/
@RequiresPermissions("system:firm:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(BusinessFirm businessFirm)
{
startPage();
List<BusinessFirm> list = businessFirmService.selectBusinessFirmList(businessFirm);
return getDataTable(list);
}
/**
* 导出商家信息列表
*/
@RequiresPermissions("system:firm:export")
@Log(title = "商家信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(BusinessFirm businessFirm)
{
List<BusinessFirm> list = businessFirmService.selectBusinessFirmList(businessFirm);
ExcelUtil<BusinessFirm> util = new ExcelUtil<BusinessFirm>(BusinessFirm.class);
return util.exportExcel(list, "firm");
}
/**
* 新增商家信息
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存商家信息
*/
@RequiresPermissions("system:firm:add")
@Log(title = "商家信息", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(BusinessFirm businessFirm)
{
return toAjax(businessFirmService.insertBusinessFirm(businessFirm));
}
/**
* 修改商家信息
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
BusinessFirm businessFirm = businessFirmService.selectBusinessFirmById(id);
mmap.put("businessFirm", businessFirm);
return prefix + "/edit";
}
/**
* 修改保存商家信息
*/
@RequiresPermissions("system:firm:edit")
@Log(title = "商家信息", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(BusinessFirm businessFirm)
{
return toAjax(businessFirmService.updateBusinessFirm(businessFirm));
}
/**
* 删除商家信息
*/
@RequiresPermissions("system:firm:remove")
@Log(title = "商家信息", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(businessFirmService.deleteBusinessFirmByIds(ids));
}
}

View File

@ -6,9 +6,9 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://47.105.40.104:3306/gjp?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: password password: root
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<configuration> <configuration>
<!-- 日志存放路径 --> <!-- 日志存放路径 -->
<property name="log.path" value="/home/ruoyi/logs" /> <property name="log.path" value="/Users/mac/logs/gjp" />
<!-- 日志输出格式 --> <!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" /> <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />

View File

@ -0,0 +1,238 @@
<!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-firm-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">商家编号:</label>
<div class="col-sm-8">
<input name="businessCode" 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="loginName" 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="userName" 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="email" 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="telephoneNo" 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="phoneNo" 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">
<select name="sex" class="form-control m-b" required>
<option value="">所有</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">头像路径:</label>
<div class="col-sm-8">
<input name="avatar" 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="idCard" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">房产、合同等证件地址,json串</label>
<div class="col-sm-8">
<input name="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" 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" 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">
<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>
<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="col-sm-8">
<input name="provinceCode" 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="provinceName" 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="cityCode" 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="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>
</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">
<input name="bankName" 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="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" />
<th:block th:include="include :: datetimepicker-js" />
<script type="text/javascript">
var prefix = ctx + "system/firm"
$("#form-firm-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-firm-add').serialize());
}
}
$("input[name='loginDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

View File

@ -0,0 +1,233 @@
<!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-firm-edit" th:object="${businessFirm}">
<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="businessCode" th:field="*{businessCode}" 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="loginName" th:field="*{loginName}" 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="userName" th:field="*{userName}" 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="email" th:field="*{email}" 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="telephoneNo" th:field="*{telephoneNo}" 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="phoneNo" th:field="*{phoneNo}" 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">
<select name="sex" class="form-control m-b" required>
<option value="">所有</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">头像路径:</label>
<div class="col-sm-8">
<input name="avatar" th:field="*{avatar}" 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="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>
<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">
<input name="guaranteeMoney" th:field="*{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" th:field="*{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>
<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="col-sm-8">
<input name="provinceCode" th:field="*{provinceCode}" 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="provinceName" th:field="*{provinceName}" 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="cityCode" th:field="*{cityCode}" 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="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>
</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">
<input name="bankName" th:field="*{bankName}" 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="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">
var prefix = ctx + "system/firm";
$("#form-firm-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-firm-edit').serialize());
}
}
$("input[name='loginDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

View File

@ -0,0 +1,341 @@
<!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="businessCode"/>
</li>
<li>
<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>
</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">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>省id</label>
<input type="text" name="provinceCode"/>
</li>
<li>
<label>省名称:</label>
<input type="text" name="provinceName"/>
</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"/>
</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:firm:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:firm:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:firm:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:firm: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:firm:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:firm:remove')}]];
var prefix = ctx + "system/firm";
$(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: '用户ID',
visible: false
},
{
field: 'businessCode',
title: '商家编号'
},
{
field: 'loginName',
title: '登录账号'
},
{
field: 'userName',
title: '用户昵称'
},
{
field: 'email',
title: '用户邮箱'
},
{
field: 'telephoneNo',
title: '固定电话'
},
{
field: 'phoneNo',
title: '手机号码'
},
{
field: 'sex',
title: '用户性别'
},
{
field: 'avatar',
title: '头像路径'
},
{
field: 'idCard',
title: '身份证证件地址'
},
{
field: 'credentials',
title: '房产、合同等证件地址,json串'
},
{
field: 'password',
title: '密码'
},
{
field: 'salt',
title: '盐加密'
},
{
field: 'status',
title: '帐号状态'
},
{
field: 'guaranteeMoney',
title: '质保金金额'
},
{
field: 'refundGuaranteeMoney',
title: '已退质保金金额'
},
{
field: 'bussinessType',
title: '商家类型0个人 1商家'
},
{
field: 'provinceCode',
title: '省id'
},
{
field: 'provinceName',
title: '省名称'
},
{
field: 'cityCode',
title: '市ID'
},
{
field: 'ciityName',
title: '市名称'
},
{
field: 'countyCode',
title: '县ID'
},
{
field: 'countyName',
title: '县名称'
},
{
field: 'townCode',
title: '乡/镇ID'
},
{
field: 'townName',
title: '乡/镇名称'
},
{
field: 'adress',
title: '详细地址信息'
},
{
field: 'coordinatePoint',
title: '坐标地址'
},
{
field: 'bankName',
title: '开户行名称'
},
{
field: 'bankCardNo',
title: '开户行卡号'
},
{
field: 'loginIp',
title: '最后登陆ip'
},
{
field: 'loginDate',
title: '最后登陆时间'
},
{
field: 'version',
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>

View File

@ -12,6 +12,7 @@ import com.ruoyi.common.utils.DateUtils;
#end #end
#end #end
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import ${packageName}.mapper.${ClassName}Mapper; import ${packageName}.mapper.${ClassName}Mapper;
import ${packageName}.domain.${ClassName}; import ${packageName}.domain.${ClassName};
@ -61,6 +62,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public int insert${ClassName}(${ClassName} ${className}) public int insert${ClassName}(${ClassName} ${className})
{ {
#foreach ($column in $columns) #foreach ($column in $columns)
@ -78,6 +80,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public int update${ClassName}(${ClassName} ${className}) public int update${ClassName}(${ClassName} ${className})
{ {
#foreach ($column in $columns) #foreach ($column in $columns)
@ -95,6 +98,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public int delete${ClassName}ByIds(String ids) public int delete${ClassName}ByIds(String ids)
{ {
return ${className}Mapper.delete${ClassName}ByIds(Convert.toStrArray(ids)); return ${className}Mapper.delete${ClassName}ByIds(Convert.toStrArray(ids));

View File

@ -0,0 +1,490 @@
package com.ruoyi.system.domain;
import java.util.Date;
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;
/**
* 商家信息对象 business_firm
*
* @author ruoyi
* @date 2020-05-19
*/
public class BusinessFirm extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 用户ID */
private Long id;
/** 商家编号 */
@Excel(name = "商家编号")
private String businessCode;
/** 登录账号 */
@Excel(name = "登录账号")
private String loginName;
/** 用户昵称 */
@Excel(name = "用户昵称")
private String userName;
/** 用户邮箱 */
@Excel(name = "用户邮箱")
private String email;
/** 固定电话 */
@Excel(name = "固定电话")
private String telephoneNo;
/** 手机号码 */
@Excel(name = "手机号码")
private String phoneNo;
/** 用户性别0男 1女 2未知 */
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
private String sex;
/** 头像路径 */
@Excel(name = "头像路径")
private String avatar;
/** 身份证证件地址 */
@Excel(name = "身份证证件地址")
private String idCard;
/** 房产、合同等证件地址,json串 */
@Excel(name = "房产、合同等证件地址,json串")
private String credentials;
/** 密码 */
@Excel(name = "密码")
private String password;
/** 盐加密 */
@Excel(name = "盐加密")
private String salt;
/** 帐号状态0正常 1停用 */
@Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
private String status;
/** 质保金金额 */
@Excel(name = "质保金金额")
private Long guaranteeMoney;
/** 已退质保金金额 */
@Excel(name = "已退质保金金额")
private Long refundGuaranteeMoney;
/** 商家类型0个人 1商家 */
@Excel(name = "商家类型0个人 1商家")
private String bussinessType;
/** 省id */
@Excel(name = "省id")
private String provinceCode;
/** 省名称 */
@Excel(name = "省名称")
private String provinceName;
/** 市ID */
@Excel(name = "市ID")
private String cityCode;
/** 市名称 */
@Excel(name = "市名称")
private String ciityName;
/** 县ID */
@Excel(name = "县ID")
private String countyCode;
/** 县名称 */
@Excel(name = "县名称")
private String countyName;
/** 乡/镇ID */
@Excel(name = "乡/镇ID")
private String townCode;
/** 乡/镇名称 */
@Excel(name = "乡/镇名称")
private String townName;
/** 详细地址信息 */
@Excel(name = "详细地址信息")
private String adress;
/** 坐标地址 */
@Excel(name = "坐标地址")
private String coordinatePoint;
/** 开户行名称 */
@Excel(name = "开户行名称")
private String bankName;
/** 开户行卡号 */
@Excel(name = "开户行卡号")
private String bankCardNo;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
/** 最后登陆ip */
@Excel(name = "最后登陆ip")
private String loginIp;
/** 最后登陆时间 */
@Excel(name = "最后登陆时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date loginDate;
/** 版本号 */
@Excel(name = "版本号")
private Integer version;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setBusinessCode(String businessCode)
{
this.businessCode = businessCode;
}
public String getBusinessCode()
{
return businessCode;
}
public void setLoginName(String loginName)
{
this.loginName = loginName;
}
public String getLoginName()
{
return loginName;
}
public void setUserName(String userName)
{
this.userName = userName;
}
public String getUserName()
{
return userName;
}
public void setEmail(String email)
{
this.email = email;
}
public String getEmail()
{
return email;
}
public void setTelephoneNo(String telephoneNo)
{
this.telephoneNo = telephoneNo;
}
public String getTelephoneNo()
{
return telephoneNo;
}
public void setPhoneNo(String phoneNo)
{
this.phoneNo = phoneNo;
}
public String getPhoneNo()
{
return phoneNo;
}
public void setSex(String sex)
{
this.sex = sex;
}
public String getSex()
{
return sex;
}
public void setAvatar(String avatar)
{
this.avatar = avatar;
}
public String getAvatar()
{
return avatar;
}
public void setIdCard(String idCard)
{
this.idCard = idCard;
}
public String getIdCard()
{
return idCard;
}
public void setCredentials(String credentials)
{
this.credentials = credentials;
}
public String getCredentials()
{
return credentials;
}
public void setPassword(String password)
{
this.password = password;
}
public String getPassword()
{
return password;
}
public void setSalt(String salt)
{
this.salt = salt;
}
public String getSalt()
{
return salt;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setGuaranteeMoney(Long guaranteeMoney)
{
this.guaranteeMoney = guaranteeMoney;
}
public Long getGuaranteeMoney()
{
return guaranteeMoney;
}
public void setRefundGuaranteeMoney(Long refundGuaranteeMoney)
{
this.refundGuaranteeMoney = refundGuaranteeMoney;
}
public Long getRefundGuaranteeMoney()
{
return refundGuaranteeMoney;
}
public void setBussinessType(String bussinessType)
{
this.bussinessType = bussinessType;
}
public String getBussinessType()
{
return bussinessType;
}
public void setProvinceCode(String provinceCode)
{
this.provinceCode = provinceCode;
}
public String getProvinceCode()
{
return provinceCode;
}
public void setProvinceName(String provinceName)
{
this.provinceName = provinceName;
}
public String getProvinceName()
{
return provinceName;
}
public void setCityCode(String cityCode)
{
this.cityCode = cityCode;
}
public String getCityCode()
{
return cityCode;
}
public void setCiityName(String ciityName)
{
this.ciityName = ciityName;
}
public String getCiityName()
{
return ciityName;
}
public void setCountyCode(String countyCode)
{
this.countyCode = countyCode;
}
public String getCountyCode()
{
return countyCode;
}
public void setCountyName(String countyName)
{
this.countyName = countyName;
}
public String getCountyName()
{
return countyName;
}
public void setTownCode(String townCode)
{
this.townCode = townCode;
}
public String getTownCode()
{
return townCode;
}
public void setTownName(String townName)
{
this.townName = townName;
}
public String getTownName()
{
return townName;
}
public void setAdress(String adress)
{
this.adress = adress;
}
public String getAdress()
{
return adress;
}
public void setCoordinatePoint(String coordinatePoint)
{
this.coordinatePoint = coordinatePoint;
}
public String getCoordinatePoint()
{
return coordinatePoint;
}
public void setBankName(String bankName)
{
this.bankName = bankName;
}
public String getBankName()
{
return bankName;
}
public void setBankCardNo(String bankCardNo)
{
this.bankCardNo = bankCardNo;
}
public String getBankCardNo()
{
return bankCardNo;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
public void setLoginIp(String loginIp)
{
this.loginIp = loginIp;
}
public String getLoginIp()
{
return loginIp;
}
public void setLoginDate(Date loginDate)
{
this.loginDate = loginDate;
}
public Date getLoginDate()
{
return loginDate;
}
public void setVersion(Integer version)
{
this.version = version;
}
public Integer getVersion()
{
return version;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("businessCode", getBusinessCode())
.append("loginName", getLoginName())
.append("userName", getUserName())
.append("email", getEmail())
.append("telephoneNo", getTelephoneNo())
.append("phoneNo", getPhoneNo())
.append("sex", getSex())
.append("avatar", getAvatar())
.append("idCard", getIdCard())
.append("credentials", getCredentials())
.append("password", getPassword())
.append("salt", getSalt())
.append("status", getStatus())
.append("guaranteeMoney", getGuaranteeMoney())
.append("refundGuaranteeMoney", getRefundGuaranteeMoney())
.append("bussinessType", getBussinessType())
.append("provinceCode", getProvinceCode())
.append("provinceName", getProvinceName())
.append("cityCode", getCityCode())
.append("ciityName", getCiityName())
.append("countyCode", getCountyCode())
.append("countyName", getCountyName())
.append("townCode", getTownCode())
.append("townName", getTownName())
.append("adress", getAdress())
.append("coordinatePoint", getCoordinatePoint())
.append("bankName", getBankName())
.append("bankCardNo", getBankCardNo())
.append("delFlag", getDelFlag())
.append("loginIp", getLoginIp())
.append("loginDate", getLoginDate())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("version", getVersion())
.append("remark", getRemark())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.BusinessFirm;
/**
* 商家信息Mapper接口
*
* @author ruoyi
* @date 2020-05-19
*/
public interface BusinessFirmMapper
{
/**
* 查询商家信息
*
* @param id 商家信息ID
* @return 商家信息
*/
public BusinessFirm selectBusinessFirmById(Long id);
/**
* 查询商家信息列表
*
* @param businessFirm 商家信息
* @return 商家信息集合
*/
public List<BusinessFirm> selectBusinessFirmList(BusinessFirm businessFirm);
/**
* 新增商家信息
*
* @param businessFirm 商家信息
* @return 结果
*/
public int insertBusinessFirm(BusinessFirm businessFirm);
/**
* 修改商家信息
*
* @param businessFirm 商家信息
* @return 结果
*/
public int updateBusinessFirm(BusinessFirm businessFirm);
/**
* 删除商家信息
*
* @param id 商家信息ID
* @return 结果
*/
public int deleteBusinessFirmById(Long id);
/**
* 批量删除商家信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteBusinessFirmByIds(String[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.BusinessFirm;
/**
* 商家信息Service接口
*
* @author ruoyi
* @date 2020-05-19
*/
public interface IBusinessFirmService
{
/**
* 查询商家信息
*
* @param id 商家信息ID
* @return 商家信息
*/
public BusinessFirm selectBusinessFirmById(Long id);
/**
* 查询商家信息列表
*
* @param businessFirm 商家信息
* @return 商家信息集合
*/
public List<BusinessFirm> selectBusinessFirmList(BusinessFirm businessFirm);
/**
* 新增商家信息
*
* @param businessFirm 商家信息
* @return 结果
*/
public int insertBusinessFirm(BusinessFirm businessFirm);
/**
* 修改商家信息
*
* @param businessFirm 商家信息
* @return 结果
*/
public int updateBusinessFirm(BusinessFirm businessFirm);
/**
* 批量删除商家信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteBusinessFirmByIds(String ids);
/**
* 删除商家信息信息
*
* @param id 商家信息ID
* @return 结果
*/
public int deleteBusinessFirmById(Long id);
}

View File

@ -0,0 +1,101 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BusinessFirmMapper;
import com.ruoyi.system.domain.BusinessFirm;
import com.ruoyi.system.service.IBusinessFirmService;
import com.ruoyi.common.core.text.Convert;
/**
* 商家信息Service业务层处理
*
* @author ruoyi
* @date 2020-05-19
*/
@Service
public class BusinessFirmServiceImpl implements IBusinessFirmService
{
@Autowired
private BusinessFirmMapper businessFirmMapper;
/**
* 查询商家信息
*
* @param id 商家信息ID
* @return 商家信息
*/
@Override
public BusinessFirm selectBusinessFirmById(Long id)
{
return businessFirmMapper.selectBusinessFirmById(id);
}
/**
* 查询商家信息列表
*
* @param businessFirm 商家信息
* @return 商家信息
*/
@Override
public List<BusinessFirm> selectBusinessFirmList(BusinessFirm businessFirm)
{
return businessFirmMapper.selectBusinessFirmList(businessFirm);
}
/**
* 新增商家信息
*
* @param businessFirm 商家信息
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int insertBusinessFirm(BusinessFirm businessFirm)
{
businessFirm.setCreateTime(DateUtils.getNowDate());
return businessFirmMapper.insertBusinessFirm(businessFirm);
}
/**
* 修改商家信息
*
* @param businessFirm 商家信息
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int updateBusinessFirm(BusinessFirm businessFirm)
{
businessFirm.setUpdateTime(DateUtils.getNowDate());
return businessFirmMapper.updateBusinessFirm(businessFirm);
}
/**
* 删除商家信息对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int deleteBusinessFirmByIds(String ids)
{
return businessFirmMapper.deleteBusinessFirmByIds(Convert.toStrArray(ids));
}
/**
* 删除商家信息信息
*
* @param id 商家信息ID
* @return 结果
*/
@Override
public int deleteBusinessFirmById(Long id)
{
return businessFirmMapper.deleteBusinessFirmById(id);
}
}

View File

@ -0,0 +1,231 @@
<?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.BusinessFirmMapper">
<resultMap type="BusinessFirm" id="BusinessFirmResult">
<result property="id" column="id" />
<result property="businessCode" column="business_code" />
<result property="loginName" column="login_name" />
<result property="userName" column="user_name" />
<result property="email" column="email" />
<result property="telephoneNo" column="telephone_no" />
<result property="phoneNo" column="phone_no" />
<result property="sex" column="sex" />
<result property="avatar" column="avatar" />
<result property="idCard" column="id_card" />
<result property="credentials" column="credentials" />
<result property="password" column="password" />
<result property="salt" column="salt" />
<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="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="townCode" column="town_code" />
<result property="townName" column="town_name" />
<result property="adress" column="adress" />
<result property="coordinatePoint" column="coordinate_point" />
<result property="bankName" column="bank_name" />
<result property="bankCardNo" column="bank_card_no" />
<result property="delFlag" column="del_flag" />
<result property="loginIp" column="login_ip" />
<result property="loginDate" column="login_date" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="version" column="version" />
<result property="remark" column="remark" />
</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
</sql>
<select id="selectBusinessFirmList" parameterType="BusinessFirm" resultMap="BusinessFirmResult">
<include refid="selectBusinessFirmVo"/>
<where>
<if test="businessCode != null and businessCode != ''"> and business_code = #{businessCode}</if>
<if test="loginName != null and loginName != ''"> and login_name like concat('%', #{loginName}, '%')</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="email != null and email != ''"> and email = #{email}</if>
<if test="telephoneNo != null and telephoneNo != ''"> and telephone_no = #{telephoneNo}</if>
<if test="phoneNo != null and phoneNo != ''"> and phone_no = #{phoneNo}</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="avatar != null and avatar != ''"> and avatar = #{avatar}</if>
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
<if test="credentials != null and credentials != ''"> and credentials = #{credentials}</if>
<if test="password != null and password != ''"> and password = #{password}</if>
<if test="salt != null and salt != ''"> and salt = #{salt}</if>
<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="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="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>
<if test="coordinatePoint != null and coordinatePoint != ''"> and coordinate_point = #{coordinatePoint}</if>
<if test="bankName != null and bankName != ''"> and bank_name like concat('%', #{bankName}, '%')</if>
<if test="bankCardNo != null and bankCardNo != ''"> and bank_card_no = #{bankCardNo}</if>
<if test="loginIp != null and loginIp != ''"> and login_ip = #{loginIp}</if>
<if test="loginDate != null "> and login_date = #{loginDate}</if>
<if test="version != null "> and version = #{version}</if>
</where>
</select>
<select id="selectBusinessFirmById" parameterType="Long" resultMap="BusinessFirmResult">
<include refid="selectBusinessFirmVo"/>
where id = #{id}
</select>
<insert id="insertBusinessFirm" parameterType="BusinessFirm" useGeneratedKeys="true" keyProperty="id">
insert into business_firm
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="businessCode != null and businessCode != ''">business_code,</if>
<if test="loginName != null and loginName != ''">login_name,</if>
<if test="userName != null and userName != ''">user_name,</if>
<if test="email != null and email != ''">email,</if>
<if test="telephoneNo != null and telephoneNo != ''">telephone_no,</if>
<if test="phoneNo != null and phoneNo != ''">phone_no,</if>
<if test="sex != null and sex != ''">sex,</if>
<if test="avatar != null and avatar != ''">avatar,</if>
<if test="idCard != null and idCard != ''">id_card,</if>
<if test="credentials != null and credentials != ''">credentials,</if>
<if test="password != null and password != ''">password,</if>
<if test="salt != null and salt != ''">salt,</if>
<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="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="townCode != null and townCode != ''">town_code,</if>
<if test="townName != null and townName != ''">town_name,</if>
<if test="adress != null and adress != ''">adress,</if>
<if test="coordinatePoint != null and coordinatePoint != ''">coordinate_point,</if>
<if test="bankName != null and bankName != ''">bank_name,</if>
<if test="bankCardNo != null and bankCardNo != ''">bank_card_no,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="loginIp != null and loginIp != ''">login_ip,</if>
<if test="loginDate != null ">login_date,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null ">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null ">update_time,</if>
<if test="version != null ">version,</if>
<if test="remark != null and remark != ''">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="businessCode != null and businessCode != ''">#{businessCode},</if>
<if test="loginName != null and loginName != ''">#{loginName},</if>
<if test="userName != null and userName != ''">#{userName},</if>
<if test="email != null and email != ''">#{email},</if>
<if test="telephoneNo != null and telephoneNo != ''">#{telephoneNo},</if>
<if test="phoneNo != null and phoneNo != ''">#{phoneNo},</if>
<if test="sex != null and sex != ''">#{sex},</if>
<if test="avatar != null and avatar != ''">#{avatar},</if>
<if test="idCard != null and idCard != ''">#{idCard},</if>
<if test="credentials != null and credentials != ''">#{credentials},</if>
<if test="password != null and password != ''">#{password},</if>
<if test="salt != null and salt != ''">#{salt},</if>
<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="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="townCode != null and townCode != ''">#{townCode},</if>
<if test="townName != null and townName != ''">#{townName},</if>
<if test="adress != null and adress != ''">#{adress},</if>
<if test="coordinatePoint != null and coordinatePoint != ''">#{coordinatePoint},</if>
<if test="bankName != null and bankName != ''">#{bankName},</if>
<if test="bankCardNo != null and bankCardNo != ''">#{bankCardNo},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="loginIp != null and loginIp != ''">#{loginIp},</if>
<if test="loginDate != null ">#{loginDate},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null ">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null ">#{updateTime},</if>
<if test="version != null ">#{version},</if>
<if test="remark != null and remark != ''">#{remark},</if>
</trim>
</insert>
<update id="updateBusinessFirm" parameterType="BusinessFirm">
update business_firm
<trim prefix="SET" suffixOverrides=",">
<if test="businessCode != null and businessCode != ''">business_code = #{businessCode},</if>
<if test="loginName != null and loginName != ''">login_name = #{loginName},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="email != null and email != ''">email = #{email},</if>
<if test="telephoneNo != null and telephoneNo != ''">telephone_no = #{telephoneNo},</if>
<if test="phoneNo != null and phoneNo != ''">phone_no = #{phoneNo},</if>
<if test="sex != null and sex != ''">sex = #{sex},</if>
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
<if test="credentials != null and credentials != ''">credentials = #{credentials},</if>
<if test="password != null and password != ''">password = #{password},</if>
<if test="salt != null and salt != ''">salt = #{salt},</if>
<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="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="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>
<if test="coordinatePoint != null and coordinatePoint != ''">coordinate_point = #{coordinatePoint},</if>
<if test="bankName != null and bankName != ''">bank_name = #{bankName},</if>
<if test="bankCardNo != null and bankCardNo != ''">bank_card_no = #{bankCardNo},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
<if test="loginDate != null ">login_date = #{loginDate},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null ">update_time = #{updateTime},</if>
<if test="version != null ">version = #{version},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBusinessFirmById" parameterType="Long">
delete from business_firm where id = #{id}
</delete>
<delete id="deleteBusinessFirmByIds" parameterType="String">
delete from business_firm where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>