完善generator代码自动生成模版

This commit is contained in:
kuang.yifei@iwhalecloud.com 2022-07-07 11:17:16 +08:00
parent dfef9e4d2c
commit 60778ba082
10 changed files with 1293 additions and 2 deletions

View File

@ -0,0 +1,133 @@
<!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-certification-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">师傅者id</label>
<div class="col-sm-8">
<input name="workerId" 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="name" 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="idCardNum" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">身份证照片1</label>
<div class="col-sm-8">
<input name="idCardUrl1" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">身份证照片2</label>
<div class="col-sm-8">
<input name="idCardUrl2" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品牌名称:</label>
<div class="col-sm-8">
<input name="brandName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司规模 0:1-3人 1:3-10人 2:10-50人</label>
<div class="col-sm-8">
<input name="companySize" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司名称:</label>
<div class="col-sm-8">
<input name="companyName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">执照号码:</label>
<div class="col-sm-8">
<input name="businessLicenseNum" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">执照号码照片:</label>
<div class="col-sm-8">
<input name="businessLicenseUrl" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司地址所在省id</label>
<div class="col-sm-8">
<input name="companyProvinceId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司地址所在市id</label>
<div class="col-sm-8">
<input name="companyCityId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司地址所在区id</label>
<div class="col-sm-8">
<input name="companyCountryId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司详细地址:</label>
<div class="col-sm-8">
<input name="companyAddress" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">法人名称:</label>
<div class="col-sm-8">
<input name="legalPersionName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">法人联系电话:</label>
<div class="col-sm-8">
<input name="legalPersionPhoneNum" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">其他服务 0:货拉拉/速运 1:提供搬货 2本地跑腿</label>
<div class="col-sm-8">
<input name="otherServ" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "worker/certification"
$("#form-certification-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-certification-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,222 @@
<!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>师傅者id</label>
<input type="text" name="workerId"/>
</li>
<li>
<label>真实姓名:</label>
<input type="text" name="name"/>
</li>
<li>
<label>身份证号:</label>
<input type="text" name="idCardNum"/>
</li>
<li>
<label>身份证照片1</label>
<input type="text" name="idCardUrl1"/>
</li>
<li>
<label>身份证照片2</label>
<input type="text" name="idCardUrl2"/>
</li>
<li>
<label>品牌名称:</label>
<input type="text" name="brandName"/>
</li>
<li>
<label>公司规模 0:1-3人 1:3-10人 2:10-50人</label>
<input type="text" name="companySize"/>
</li>
<li>
<label>公司名称:</label>
<input type="text" name="companyName"/>
</li>
<li>
<label>执照号码:</label>
<input type="text" name="businessLicenseNum"/>
</li>
<li>
<label>执照号码照片:</label>
<input type="text" name="businessLicenseUrl"/>
</li>
<li>
<label>公司地址所在省id</label>
<input type="text" name="companyProvinceId"/>
</li>
<li>
<label>公司地址所在市id</label>
<input type="text" name="companyCityId"/>
</li>
<li>
<label>公司地址所在区id</label>
<input type="text" name="companyCountryId"/>
</li>
<li>
<label>公司详细地址:</label>
<input type="text" name="companyAddress"/>
</li>
<li>
<label>法人名称:</label>
<input type="text" name="legalPersionName"/>
</li>
<li>
<label>法人联系电话:</label>
<input type="text" name="legalPersionPhoneNum"/>
</li>
<li>
<label>其他服务 0:货拉拉/速运 1:提供搬货 2本地跑腿</label>
<input type="text" name="otherServ"/>
</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="worker:certification:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="worker:certification:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="worker:certification:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="worker:certification: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('worker:certification:edit')}]];
var removeFlag = [[${@permission.hasPermi('worker:certification:remove')}]];
var prefix = ctx + "worker/certification";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "师傅实名审核",
columns: [{
checkbox: true
},
{
field: 'workerCertificationId',
title: '主键id',
visible: false
},
{
field: 'workerId',
title: '师傅者id'
},
{
field: 'name',
title: '真实姓名'
},
{
field: 'idCardNum',
title: '身份证号'
},
{
field: 'idCardUrl1',
title: '身份证照片1'
},
{
field: 'idCardUrl2',
title: '身份证照片2'
},
{
field: 'brandName',
title: '品牌名称'
},
{
field: 'companySize',
title: '公司规模 0:1-3人 1:3-10人 2:10-50人'
},
{
field: 'companyName',
title: '公司名称'
},
{
field: 'businessLicenseNum',
title: '执照号码'
},
{
field: 'businessLicenseUrl',
title: '执照号码照片'
},
{
field: 'companyProvinceId',
title: '公司地址所在省id'
},
{
field: 'companyCityId',
title: '公司地址所在市id'
},
{
field: 'companyCountryId',
title: '公司地址所在区id'
},
{
field: 'companyAddress',
title: '公司详细地址'
},
{
field: 'legalPersionName',
title: '法人名称'
},
{
field: 'legalPersionPhoneNum',
title: '法人联系电话'
},
{
field: 'otherServ',
title: '其他服务 0:货拉拉/速运 1:提供搬货 2本地跑腿'
},
{
field: 'status',
title: '状态0审核中 1审核通过 2审核未通过'
},
{
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.workerCertificationId + '\')"><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.workerCertificationId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -0,0 +1,134 @@
<!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-certification-edit" th:object="${workerCertification}">
<input name="workerCertificationId" th:field="*{workerCertificationId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">师傅者id</label>
<div class="col-sm-8">
<input name="workerId" th:field="*{workerId}" 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="name" th:field="*{name}" 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="idCardNum" th:field="*{idCardNum}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">身份证照片1</label>
<div class="col-sm-8">
<input name="idCardUrl1" th:field="*{idCardUrl1}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">身份证照片2</label>
<div class="col-sm-8">
<input name="idCardUrl2" th:field="*{idCardUrl2}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品牌名称:</label>
<div class="col-sm-8">
<input name="brandName" th:field="*{brandName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司规模 0:1-3人 1:3-10人 2:10-50人</label>
<div class="col-sm-8">
<input name="companySize" th:field="*{companySize}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司名称:</label>
<div class="col-sm-8">
<input name="companyName" th:field="*{companyName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">执照号码:</label>
<div class="col-sm-8">
<input name="businessLicenseNum" th:field="*{businessLicenseNum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">执照号码照片:</label>
<div class="col-sm-8">
<input name="businessLicenseUrl" th:field="*{businessLicenseUrl}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司地址所在省id</label>
<div class="col-sm-8">
<input name="companyProvinceId" th:field="*{companyProvinceId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司地址所在市id</label>
<div class="col-sm-8">
<input name="companyCityId" th:field="*{companyCityId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司地址所在区id</label>
<div class="col-sm-8">
<input name="companyCountryId" th:field="*{companyCountryId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司详细地址:</label>
<div class="col-sm-8">
<input name="companyAddress" th:field="*{companyAddress}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">法人名称:</label>
<div class="col-sm-8">
<input name="legalPersionName" th:field="*{legalPersionName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">法人联系电话:</label>
<div class="col-sm-8">
<input name="legalPersionPhoneNum" th:field="*{legalPersionPhoneNum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">其他服务 0:货拉拉/速运 1:提供搬货 2本地跑腿</label>
<div class="col-sm-8">
<input name="otherServ" th:field="*{otherServ}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "worker/certification";
$("#form-certification-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-certification-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -4,8 +4,8 @@ gen:
# 作者
author: clunt
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName: com.ghy.system
packageName: com.ghy.worker
# 自动去除表前缀默认是false
autoRemovePre: false
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
tablePrefix: sys_
tablePrefix: ''

View File

@ -0,0 +1,127 @@
package com.ghy.worker.controller;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ghy.common.annotation.Log;
import com.ghy.common.enums.BusinessType;
import com.ghy.worker.domain.WorkerCertification;
import com.ghy.worker.service.IWorkerCertificationService;
import com.ghy.common.core.controller.BaseController;
import com.ghy.common.core.domain.AjaxResult;
import com.ghy.common.utils.poi.ExcelUtil;
import com.ghy.common.core.page.TableDataInfo;
/**
* 师傅实名审核Controller
*
* @author clunt
* @date 2022-07-07
*/
@Controller
@RequestMapping("/worker/certification")
public class WorkerCertificationController extends BaseController
{
private String prefix = "worker/certification";
@Autowired
private IWorkerCertificationService workerCertificationService;
@RequiresPermissions("worker:certification:view")
@GetMapping()
public String certification()
{
return prefix + "/certification";
}
/**
* 查询师傅实名审核列表
*/
@RequiresPermissions("worker:certification:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(WorkerCertification workerCertification)
{
startPage();
List<WorkerCertification> list = workerCertificationService.selectWorkerCertificationList(workerCertification);
return getDataTable(list);
}
/**
* 导出师傅实名审核列表
*/
@RequiresPermissions("worker:certification:export")
@Log(title = "师傅实名审核", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(WorkerCertification workerCertification)
{
List<WorkerCertification> list = workerCertificationService.selectWorkerCertificationList(workerCertification);
ExcelUtil<WorkerCertification> util = new ExcelUtil<WorkerCertification>(WorkerCertification.class);
return util.exportExcel(list, "师傅实名审核数据");
}
/**
* 新增师傅实名审核
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存师傅实名审核
*/
@RequiresPermissions("worker:certification:add")
@Log(title = "师傅实名审核", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(WorkerCertification workerCertification)
{
return toAjax(workerCertificationService.insertWorkerCertification(workerCertification));
}
/**
* 修改师傅实名审核
*/
@RequiresPermissions("worker:certification:edit")
@GetMapping("/edit/{workerCertificationId}")
public String edit(@PathVariable("workerCertificationId") String workerCertificationId, ModelMap mmap)
{
WorkerCertification workerCertification = workerCertificationService.selectWorkerCertificationByWorkerCertificationId(workerCertificationId);
mmap.put("workerCertification", workerCertification);
return prefix + "/edit";
}
/**
* 修改保存师傅实名审核
*/
@RequiresPermissions("worker:certification:edit")
@Log(title = "师傅实名审核", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(WorkerCertification workerCertification)
{
return toAjax(workerCertificationService.updateWorkerCertification(workerCertification));
}
/**
* 删除师傅实名审核
*/
@RequiresPermissions("worker:certification:remove")
@Log(title = "师傅实名审核", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(workerCertificationService.deleteWorkerCertificationByWorkerCertificationIds(ids));
}
}

View File

@ -0,0 +1,294 @@
package com.ghy.worker.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ghy.common.annotation.Excel;
import com.ghy.common.core.domain.BaseEntity;
/**
* 师傅实名审核对象 worker_certification
*
* @author clunt
* @date 2022-07-07
*/
public class WorkerCertification extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键id */
private String workerCertificationId;
/** 师傅者id */
@Excel(name = "师傅者id")
private String workerId;
/** 真实姓名 */
@Excel(name = "真实姓名")
private String name;
/** 身份证号 */
@Excel(name = "身份证号")
private String idCardNum;
/** 身份证照片1 */
@Excel(name = "身份证照片1")
private String idCardUrl1;
/** 身份证照片2 */
@Excel(name = "身份证照片2")
private String idCardUrl2;
/** 品牌名称 */
@Excel(name = "品牌名称")
private String brandName;
/** 公司规模 0:1-3人 1:3-10人 2:10-50人 */
@Excel(name = "公司规模 0:1-3人 1:3-10人 2:10-50人")
private Long companySize;
/** 公司名称 */
@Excel(name = "公司名称")
private String companyName;
/** 执照号码 */
@Excel(name = "执照号码")
private String businessLicenseNum;
/** 执照号码照片 */
@Excel(name = "执照号码照片")
private String businessLicenseUrl;
/** 公司地址所在省id */
@Excel(name = "公司地址所在省id")
private Long companyProvinceId;
/** 公司地址所在市id */
@Excel(name = "公司地址所在市id")
private Long companyCityId;
/** 公司地址所在区id */
@Excel(name = "公司地址所在区id")
private Long companyCountryId;
/** 公司详细地址 */
@Excel(name = "公司详细地址")
private String companyAddress;
/** 法人名称 */
@Excel(name = "法人名称")
private String legalPersionName;
/** 法人联系电话 */
@Excel(name = "法人联系电话")
private String legalPersionPhoneNum;
/** 其他服务 0:货拉拉/速运 1:提供搬货 2本地跑腿 */
@Excel(name = "其他服务 0:货拉拉/速运 1:提供搬货 2本地跑腿")
private String otherServ;
/** 状态0审核中 1审核通过 2审核未通过 */
@Excel(name = "状态0审核中 1审核通过 2审核未通过")
private Long status;
public void setWorkerCertificationId(String workerCertificationId)
{
this.workerCertificationId = workerCertificationId;
}
public String getWorkerCertificationId()
{
return workerCertificationId;
}
public void setWorkerId(String workerId)
{
this.workerId = workerId;
}
public String getWorkerId()
{
return workerId;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setIdCardNum(String idCardNum)
{
this.idCardNum = idCardNum;
}
public String getIdCardNum()
{
return idCardNum;
}
public void setIdCardUrl1(String idCardUrl1)
{
this.idCardUrl1 = idCardUrl1;
}
public String getIdCardUrl1()
{
return idCardUrl1;
}
public void setIdCardUrl2(String idCardUrl2)
{
this.idCardUrl2 = idCardUrl2;
}
public String getIdCardUrl2()
{
return idCardUrl2;
}
public void setBrandName(String brandName)
{
this.brandName = brandName;
}
public String getBrandName()
{
return brandName;
}
public void setCompanySize(Long companySize)
{
this.companySize = companySize;
}
public Long getCompanySize()
{
return companySize;
}
public void setCompanyName(String companyName)
{
this.companyName = companyName;
}
public String getCompanyName()
{
return companyName;
}
public void setBusinessLicenseNum(String businessLicenseNum)
{
this.businessLicenseNum = businessLicenseNum;
}
public String getBusinessLicenseNum()
{
return businessLicenseNum;
}
public void setBusinessLicenseUrl(String businessLicenseUrl)
{
this.businessLicenseUrl = businessLicenseUrl;
}
public String getBusinessLicenseUrl()
{
return businessLicenseUrl;
}
public void setCompanyProvinceId(Long companyProvinceId)
{
this.companyProvinceId = companyProvinceId;
}
public Long getCompanyProvinceId()
{
return companyProvinceId;
}
public void setCompanyCityId(Long companyCityId)
{
this.companyCityId = companyCityId;
}
public Long getCompanyCityId()
{
return companyCityId;
}
public void setCompanyCountryId(Long companyCountryId)
{
this.companyCountryId = companyCountryId;
}
public Long getCompanyCountryId()
{
return companyCountryId;
}
public void setCompanyAddress(String companyAddress)
{
this.companyAddress = companyAddress;
}
public String getCompanyAddress()
{
return companyAddress;
}
public void setLegalPersionName(String legalPersionName)
{
this.legalPersionName = legalPersionName;
}
public String getLegalPersionName()
{
return legalPersionName;
}
public void setLegalPersionPhoneNum(String legalPersionPhoneNum)
{
this.legalPersionPhoneNum = legalPersionPhoneNum;
}
public String getLegalPersionPhoneNum()
{
return legalPersionPhoneNum;
}
public void setOtherServ(String otherServ)
{
this.otherServ = otherServ;
}
public String getOtherServ()
{
return otherServ;
}
public void setStatus(Long status)
{
this.status = status;
}
public Long getStatus()
{
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("workerCertificationId", getWorkerCertificationId())
.append("workerId", getWorkerId())
.append("name", getName())
.append("idCardNum", getIdCardNum())
.append("idCardUrl1", getIdCardUrl1())
.append("idCardUrl2", getIdCardUrl2())
.append("brandName", getBrandName())
.append("companySize", getCompanySize())
.append("companyName", getCompanyName())
.append("businessLicenseNum", getBusinessLicenseNum())
.append("businessLicenseUrl", getBusinessLicenseUrl())
.append("companyProvinceId", getCompanyProvinceId())
.append("companyCityId", getCompanyCityId())
.append("companyCountryId", getCompanyCountryId())
.append("companyAddress", getCompanyAddress())
.append("legalPersionName", getLegalPersionName())
.append("legalPersionPhoneNum", getLegalPersionPhoneNum())
.append("otherServ", getOtherServ())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.ghy.worker.mapper;
import java.util.List;
import com.ghy.worker.domain.WorkerCertification;
/**
* 师傅实名审核Mapper接口
*
* @author clunt
* @date 2022-07-07
*/
public interface WorkerCertificationMapper
{
/**
* 查询师傅实名审核
*
* @param workerCertificationId 师傅实名审核主键
* @return 师傅实名审核
*/
public WorkerCertification selectWorkerCertificationByWorkerCertificationId(String workerCertificationId);
/**
* 查询师傅实名审核列表
*
* @param workerCertification 师傅实名审核
* @return 师傅实名审核集合
*/
public List<WorkerCertification> selectWorkerCertificationList(WorkerCertification workerCertification);
/**
* 新增师傅实名审核
*
* @param workerCertification 师傅实名审核
* @return 结果
*/
public int insertWorkerCertification(WorkerCertification workerCertification);
/**
* 修改师傅实名审核
*
* @param workerCertification 师傅实名审核
* @return 结果
*/
public int updateWorkerCertification(WorkerCertification workerCertification);
/**
* 删除师傅实名审核
*
* @param workerCertificationId 师傅实名审核主键
* @return 结果
*/
public int deleteWorkerCertificationByWorkerCertificationId(String workerCertificationId);
/**
* 批量删除师傅实名审核
*
* @param workerCertificationIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteWorkerCertificationByWorkerCertificationIds(String[] workerCertificationIds);
}

View File

@ -0,0 +1,61 @@
package com.ghy.worker.service;
import java.util.List;
import com.ghy.worker.domain.WorkerCertification;
/**
* 师傅实名审核Service接口
*
* @author clunt
* @date 2022-07-07
*/
public interface IWorkerCertificationService
{
/**
* 查询师傅实名审核
*
* @param workerCertificationId 师傅实名审核主键
* @return 师傅实名审核
*/
public WorkerCertification selectWorkerCertificationByWorkerCertificationId(String workerCertificationId);
/**
* 查询师傅实名审核列表
*
* @param workerCertification 师傅实名审核
* @return 师傅实名审核集合
*/
public List<WorkerCertification> selectWorkerCertificationList(WorkerCertification workerCertification);
/**
* 新增师傅实名审核
*
* @param workerCertification 师傅实名审核
* @return 结果
*/
public int insertWorkerCertification(WorkerCertification workerCertification);
/**
* 修改师傅实名审核
*
* @param workerCertification 师傅实名审核
* @return 结果
*/
public int updateWorkerCertification(WorkerCertification workerCertification);
/**
* 批量删除师傅实名审核
*
* @param workerCertificationIds 需要删除的师傅实名审核主键集合
* @return 结果
*/
public int deleteWorkerCertificationByWorkerCertificationIds(String workerCertificationIds);
/**
* 删除师傅实名审核信息
*
* @param workerCertificationId 师傅实名审核主键
* @return 结果
*/
public int deleteWorkerCertificationByWorkerCertificationId(String workerCertificationId);
}

View File

@ -0,0 +1,97 @@
package com.ghy.worker.service.impl;
import java.util.List;
import com.ghy.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ghy.worker.mapper.WorkerCertificationMapper;
import com.ghy.worker.domain.WorkerCertification;
import com.ghy.worker.service.IWorkerCertificationService;
import com.ghy.common.core.text.Convert;
/**
* 师傅实名审核Service业务层处理
*
* @author clunt
* @date 2022-07-07
*/
@Service
public class WorkerCertificationServiceImpl implements IWorkerCertificationService
{
@Autowired
private WorkerCertificationMapper workerCertificationMapper;
/**
* 查询师傅实名审核
*
* @param workerCertificationId 师傅实名审核主键
* @return 师傅实名审核
*/
@Override
public WorkerCertification selectWorkerCertificationByWorkerCertificationId(String workerCertificationId)
{
return workerCertificationMapper.selectWorkerCertificationByWorkerCertificationId(workerCertificationId);
}
/**
* 查询师傅实名审核列表
*
* @param workerCertification 师傅实名审核
* @return 师傅实名审核
*/
@Override
public List<WorkerCertification> selectWorkerCertificationList(WorkerCertification workerCertification)
{
return workerCertificationMapper.selectWorkerCertificationList(workerCertification);
}
/**
* 新增师傅实名审核
*
* @param workerCertification 师傅实名审核
* @return 结果
*/
@Override
public int insertWorkerCertification(WorkerCertification workerCertification)
{
workerCertification.setCreateTime(DateUtils.getNowDate());
return workerCertificationMapper.insertWorkerCertification(workerCertification);
}
/**
* 修改师傅实名审核
*
* @param workerCertification 师傅实名审核
* @return 结果
*/
@Override
public int updateWorkerCertification(WorkerCertification workerCertification)
{
workerCertification.setUpdateTime(DateUtils.getNowDate());
return workerCertificationMapper.updateWorkerCertification(workerCertification);
}
/**
* 批量删除师傅实名审核
*
* @param workerCertificationIds 需要删除的师傅实名审核主键
* @return 结果
*/
@Override
public int deleteWorkerCertificationByWorkerCertificationIds(String workerCertificationIds)
{
return workerCertificationMapper.deleteWorkerCertificationByWorkerCertificationIds(Convert.toStrArray(workerCertificationIds));
}
/**
* 删除师傅实名审核信息
*
* @param workerCertificationId 师傅实名审核主键
* @return 结果
*/
@Override
public int deleteWorkerCertificationByWorkerCertificationId(String workerCertificationId)
{
return workerCertificationMapper.deleteWorkerCertificationByWorkerCertificationId(workerCertificationId);
}
}

View File

@ -0,0 +1,162 @@
<?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.ghy.worker.mapper.WorkerCertificationMapper">
<resultMap type="WorkerCertification" id="WorkerCertificationResult">
<result property="workerCertificationId" column="worker_certification_id" />
<result property="workerId" column="worker_id" />
<result property="name" column="name" />
<result property="idCardNum" column="id_card_num" />
<result property="idCardUrl1" column="id_card_url_1" />
<result property="idCardUrl2" column="id_card_url_2" />
<result property="brandName" column="brand_name" />
<result property="companySize" column="company_size" />
<result property="companyName" column="company_name" />
<result property="businessLicenseNum" column="business_license_num" />
<result property="businessLicenseUrl" column="business_license_url" />
<result property="companyProvinceId" column="company_province_id" />
<result property="companyCityId" column="company_city_id" />
<result property="companyCountryId" column="company_country_id" />
<result property="companyAddress" column="company_address" />
<result property="legalPersionName" column="legal_persion_name" />
<result property="legalPersionPhoneNum" column="legal_persion_phone_num" />
<result property="otherServ" column="other_serv" />
<result property="status" column="status" />
<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="remark" column="remark" />
</resultMap>
<sql id="selectWorkerCertificationVo">
select worker_certification_id, worker_id, name, id_card_num, id_card_url_1, id_card_url_2, brand_name, company_size, company_name, business_license_num, business_license_url, company_province_id, company_city_id, company_country_id, company_address, legal_persion_name, legal_persion_phone_num, other_serv, status, create_by, create_time, update_by, update_time, remark from worker_certification
</sql>
<select id="selectWorkerCertificationList" parameterType="WorkerCertification" resultMap="WorkerCertificationResult">
<include refid="selectWorkerCertificationVo"/>
<where>
<if test="workerId != null and workerId != ''"> and worker_id = #{workerId}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="idCardNum != null and idCardNum != ''"> and id_card_num = #{idCardNum}</if>
<if test="idCardUrl1 != null and idCardUrl1 != ''"> and id_card_url_1 = #{idCardUrl1}</if>
<if test="idCardUrl2 != null and idCardUrl2 != ''"> and id_card_url_2 = #{idCardUrl2}</if>
<if test="brandName != null and brandName != ''"> and brand_name like concat('%', #{brandName}, '%')</if>
<if test="companySize != null "> and company_size = #{companySize}</if>
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
<if test="businessLicenseNum != null and businessLicenseNum != ''"> and business_license_num = #{businessLicenseNum}</if>
<if test="businessLicenseUrl != null and businessLicenseUrl != ''"> and business_license_url = #{businessLicenseUrl}</if>
<if test="companyProvinceId != null "> and company_province_id = #{companyProvinceId}</if>
<if test="companyCityId != null "> and company_city_id = #{companyCityId}</if>
<if test="companyCountryId != null "> and company_country_id = #{companyCountryId}</if>
<if test="companyAddress != null and companyAddress != ''"> and company_address = #{companyAddress}</if>
<if test="legalPersionName != null and legalPersionName != ''"> and legal_persion_name like concat('%', #{legalPersionName}, '%')</if>
<if test="legalPersionPhoneNum != null and legalPersionPhoneNum != ''"> and legal_persion_phone_num = #{legalPersionPhoneNum}</if>
<if test="otherServ != null and otherServ != ''"> and other_serv = #{otherServ}</if>
<if test="status != null "> and status = #{status}</if>
</where>
</select>
<select id="selectWorkerCertificationByWorkerCertificationId" parameterType="String" resultMap="WorkerCertificationResult">
<include refid="selectWorkerCertificationVo"/>
where worker_certification_id = #{workerCertificationId}
</select>
<insert id="insertWorkerCertification" parameterType="WorkerCertification" useGeneratedKeys="true" keyProperty="workerCertificationId">
insert into worker_certification
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="workerId != null and workerId != ''">worker_id,</if>
<if test="name != null and name != ''">name,</if>
<if test="idCardNum != null and idCardNum != ''">id_card_num,</if>
<if test="idCardUrl1 != null">id_card_url_1,</if>
<if test="idCardUrl2 != null">id_card_url_2,</if>
<if test="brandName != null">brand_name,</if>
<if test="companySize != null">company_size,</if>
<if test="companyName != null">company_name,</if>
<if test="businessLicenseNum != null">business_license_num,</if>
<if test="businessLicenseUrl != null">business_license_url,</if>
<if test="companyProvinceId != null">company_province_id,</if>
<if test="companyCityId != null">company_city_id,</if>
<if test="companyCountryId != null">company_country_id,</if>
<if test="companyAddress != null">company_address,</if>
<if test="legalPersionName != null">legal_persion_name,</if>
<if test="legalPersionPhoneNum != null">legal_persion_phone_num,</if>
<if test="otherServ != null">other_serv,</if>
<if test="status != null">status,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="workerId != null and workerId != ''">#{workerId},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="idCardNum != null and idCardNum != ''">#{idCardNum},</if>
<if test="idCardUrl1 != null">#{idCardUrl1},</if>
<if test="idCardUrl2 != null">#{idCardUrl2},</if>
<if test="brandName != null">#{brandName},</if>
<if test="companySize != null">#{companySize},</if>
<if test="companyName != null">#{companyName},</if>
<if test="businessLicenseNum != null">#{businessLicenseNum},</if>
<if test="businessLicenseUrl != null">#{businessLicenseUrl},</if>
<if test="companyProvinceId != null">#{companyProvinceId},</if>
<if test="companyCityId != null">#{companyCityId},</if>
<if test="companyCountryId != null">#{companyCountryId},</if>
<if test="companyAddress != null">#{companyAddress},</if>
<if test="legalPersionName != null">#{legalPersionName},</if>
<if test="legalPersionPhoneNum != null">#{legalPersionPhoneNum},</if>
<if test="otherServ != null">#{otherServ},</if>
<if test="status != null">#{status},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateWorkerCertification" parameterType="WorkerCertification">
update worker_certification
<trim prefix="SET" suffixOverrides=",">
<if test="workerId != null and workerId != ''">worker_id = #{workerId},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="idCardNum != null and idCardNum != ''">id_card_num = #{idCardNum},</if>
<if test="idCardUrl1 != null">id_card_url_1 = #{idCardUrl1},</if>
<if test="idCardUrl2 != null">id_card_url_2 = #{idCardUrl2},</if>
<if test="brandName != null">brand_name = #{brandName},</if>
<if test="companySize != null">company_size = #{companySize},</if>
<if test="companyName != null">company_name = #{companyName},</if>
<if test="businessLicenseNum != null">business_license_num = #{businessLicenseNum},</if>
<if test="businessLicenseUrl != null">business_license_url = #{businessLicenseUrl},</if>
<if test="companyProvinceId != null">company_province_id = #{companyProvinceId},</if>
<if test="companyCityId != null">company_city_id = #{companyCityId},</if>
<if test="companyCountryId != null">company_country_id = #{companyCountryId},</if>
<if test="companyAddress != null">company_address = #{companyAddress},</if>
<if test="legalPersionName != null">legal_persion_name = #{legalPersionName},</if>
<if test="legalPersionPhoneNum != null">legal_persion_phone_num = #{legalPersionPhoneNum},</if>
<if test="otherServ != null">other_serv = #{otherServ},</if>
<if test="status != null">status = #{status},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where worker_certification_id = #{workerCertificationId}
</update>
<delete id="deleteWorkerCertificationByWorkerCertificationId" parameterType="String">
delete from worker_certification where worker_certification_id = #{workerCertificationId}
</delete>
<delete id="deleteWorkerCertificationByWorkerCertificationIds" parameterType="String">
delete from worker_certification where worker_certification_id in
<foreach item="workerCertificationId" collection="array" open="(" separator="," close=")">
#{workerCertificationId}
</foreach>
</delete>
</mapper>