Merge branch 'master' of https://gitee.com/op-souls/ghy-all
This commit is contained in:
commit
ff2666c5aa
|
|
@ -1,14 +1,21 @@
|
||||||
package com.ghy.web.controller.system;
|
package com.ghy.web.controller.system;
|
||||||
|
|
||||||
|
import com.ghy.common.annotation.Log;
|
||||||
import com.ghy.common.core.controller.BaseController;
|
import com.ghy.common.core.controller.BaseController;
|
||||||
|
import com.ghy.common.core.domain.AjaxResult;
|
||||||
import com.ghy.common.core.domain.entity.SysDept;
|
import com.ghy.common.core.domain.entity.SysDept;
|
||||||
|
import com.ghy.common.core.page.TableDataInfo;
|
||||||
|
import com.ghy.common.enums.BusinessType;
|
||||||
|
import com.ghy.common.utils.poi.ExcelUtil;
|
||||||
import com.ghy.system.domain.SysDeptConfig;
|
import com.ghy.system.domain.SysDeptConfig;
|
||||||
import com.ghy.system.service.ISysDeptConfigService;
|
import com.ghy.system.service.ISysDeptConfigService;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -20,6 +27,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
@RequestMapping("/system/dept/config")
|
@RequestMapping("/system/dept/config")
|
||||||
public class SysDeptConfigController extends BaseController {
|
public class SysDeptConfigController extends BaseController {
|
||||||
|
|
||||||
|
private String prefix = "system/dept/config";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysDeptConfigService sysDeptConfigService;
|
private ISysDeptConfigService sysDeptConfigService;
|
||||||
|
|
||||||
|
|
@ -30,4 +39,108 @@ public class SysDeptConfigController extends BaseController {
|
||||||
return sysDeptConfigService.selectByDeptId(dept.getDeptId());
|
return sysDeptConfigService.selectByDeptId(dept.getDeptId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequiresPermissions("dept:config:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String config()
|
||||||
|
{
|
||||||
|
return prefix + "/config";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分公司配置列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("dept:config:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(SysDeptConfig sysDeptConfig)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SysDeptConfig> list = sysDeptConfigService.selectSysDeptConfigList(sysDeptConfig);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* App查询分公司配置列表
|
||||||
|
*/
|
||||||
|
@PostMapping("/app/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo appList(@RequestBody SysDeptConfig sysDeptConfig)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SysDeptConfig> list = sysDeptConfigService.selectSysDeptConfigList(sysDeptConfig);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出分公司配置列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("dept:config:export")
|
||||||
|
@Log(title = "分公司配置", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(SysDeptConfig sysDeptConfig)
|
||||||
|
{
|
||||||
|
List<SysDeptConfig> list = sysDeptConfigService.selectSysDeptConfigList(sysDeptConfig);
|
||||||
|
ExcelUtil<SysDeptConfig> util = new ExcelUtil<SysDeptConfig>(SysDeptConfig.class);
|
||||||
|
return util.exportExcel(list, "分公司配置数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增分公司配置
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存分公司配置
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("dept:config:add")
|
||||||
|
@Log(title = "分公司配置", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(SysDeptConfig sysDeptConfig)
|
||||||
|
{
|
||||||
|
return toAjax(sysDeptConfigService.insertSysDeptConfig(sysDeptConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改分公司配置
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("dept:config:edit")
|
||||||
|
@GetMapping("/edit/{sysDeptConfigId}")
|
||||||
|
public String edit(@PathVariable("sysDeptConfigId") Long sysDeptConfigId, ModelMap mmap)
|
||||||
|
{
|
||||||
|
SysDeptConfig sysDeptConfig = sysDeptConfigService.selectSysDeptConfigBySysDeptConfigId(sysDeptConfigId);
|
||||||
|
mmap.put("sysDeptConfig", sysDeptConfig);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存分公司配置
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("dept:config:edit")
|
||||||
|
@Log(title = "分公司配置", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(SysDeptConfig sysDeptConfig)
|
||||||
|
{
|
||||||
|
return toAjax(sysDeptConfigService.updateSysDeptConfig(sysDeptConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除分公司配置
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("dept:config:remove")
|
||||||
|
@Log(title = "分公司配置", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(sysDeptConfigService.deleteSysDeptConfigBySysDeptConfigIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,199 @@
|
||||||
|
<!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-config-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">分公司id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deptId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">banner图:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="bannerUrl" 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="singleMoney" 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="singleOrderPay" 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="singleOrderNoPay" 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="areaMoney" 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="areaOrderPay" 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="areaOrderNoPay" 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="cityMoney" 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="cityOrderPay" 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="cityOrderNoPay" 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="workerRate" 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="phone" 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="plainOutTime" 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="goOutTime" 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="goingOutTime" 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="goldenServer" 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="monthRent" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">第三方支付appid:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="adapayAppId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">第三方支付key:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="adapayApiKey" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">第三方支付测试key:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="adapayMockKey" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">第三方支付私钥:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<textarea name="adapayRsaPrivateKey" class="form-control"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">第三方支付重试次数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="adapayMaxRetryTimes" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">消费者appid:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="wxAppId" 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="wxSecret" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">师傅端appid:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="servWxAppId" 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="servWxSecret" 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="takeRate" 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 + "system/dept/config"
|
||||||
|
$("#form-config-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-config-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,210 @@
|
||||||
|
<!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="deptId"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="dept:config:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="dept:config:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="dept:config:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="dept:config: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:config:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('worker:config:remove')}]];
|
||||||
|
var prefix = ctx + "system/dept/config";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "分公司配置",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'sysDeptConfigId',
|
||||||
|
title: '主键id',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'deptId',
|
||||||
|
title: '分公司id',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'bannerUrl',
|
||||||
|
title: 'banner图'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'singleMoney',
|
||||||
|
title: '社区保证金额'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'singleOrderPay',
|
||||||
|
title: '社区接单数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'singleOrderNoPay',
|
||||||
|
title: '社区未缴纳接单数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'areaMoney',
|
||||||
|
title: '区域保证金额'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'areaOrderPay',
|
||||||
|
title: '区域接单数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'areaOrderNoPay',
|
||||||
|
title: '区域未缴纳接单数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'cityMoney',
|
||||||
|
title: '城市保证金额'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'cityOrderPay',
|
||||||
|
title: '城市接单数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'cityOrderNoPay',
|
||||||
|
title: '城市未缴纳接单数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'workerRate',
|
||||||
|
title: '业务员提成比例'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'phone',
|
||||||
|
title: '手机号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'plainOutTime',
|
||||||
|
title: '排班超时罚金'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'goOutTime',
|
||||||
|
title: '上门超时罚金'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'goingOutTime',
|
||||||
|
title: '进行超时罚金'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'goldenServer',
|
||||||
|
title: '金牌服务倍数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'monthRent',
|
||||||
|
title: '月租费用'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'adapayAppId',
|
||||||
|
title: '第三方支付appid',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'adapayApiKey',
|
||||||
|
title: '第三方支付key',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'adapayMockKey',
|
||||||
|
title: '第三方支付测试key',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'adapayRsaPrivateKey',
|
||||||
|
title: '第三方支付私钥',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'adapayMaxRetryTimes',
|
||||||
|
title: '第三方支付重试次数',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'wxAppId',
|
||||||
|
title: '消费者appid',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'wxSecret',
|
||||||
|
title: '消费者密钥',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'servWxAppId',
|
||||||
|
title: '师傅端appid',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'servWxSecret',
|
||||||
|
title: '师傅端密钥',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'takeRate',
|
||||||
|
title: '平台扣点',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'remark',
|
||||||
|
title: '备注',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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.sysDeptConfigId + '\')"><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.sysDeptConfigId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,200 @@
|
||||||
|
<!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-config-edit" th:object="${sysDeptConfig}">
|
||||||
|
<input name="sysDeptConfigId" th:field="*{sysDeptConfigId}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">分公司id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deptId" th:field="*{deptId}" class="form-control" type="text">
|
||||||
|
</div>xxw
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">banner图:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="bannerUrl" th:field="*{bannerUrl}" 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="singleMoney" th:field="*{singleMoney}" 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="singleOrderPay" th:field="*{singleOrderPay}" 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="singleOrderNoPay" th:field="*{singleOrderNoPay}" 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="areaMoney" th:field="*{areaMoney}" 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="areaOrderPay" th:field="*{areaOrderPay}" 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="areaOrderNoPay" th:field="*{areaOrderNoPay}" 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="cityMoney" th:field="*{cityMoney}" 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="cityOrderPay" th:field="*{cityOrderPay}" 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="cityOrderNoPay" th:field="*{cityOrderNoPay}" 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="workerRate" th:field="*{workerRate}" 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="phone" th:field="*{phone}" 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="plainOutTime" th:field="*{plainOutTime}" 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="goOutTime" th:field="*{goOutTime}" 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="goingOutTime" th:field="*{goingOutTime}" 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="goldenServer" th:field="*{goldenServer}" 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="monthRent" th:field="*{monthRent}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">第三方支付appid:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="adapayAppId" th:field="*{adapayAppId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">第三方支付key:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="adapayApiKey" th:field="*{adapayApiKey}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">第三方支付测试key:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="adapayMockKey" th:field="*{adapayMockApiKey}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">第三方支付私钥:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<textarea name="adapayRsaPrivateKey" class="form-control">[[*{adapayRsaPrivateKey}]]</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">第三方支付重试次数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="adapayMaxRetryTimes" th:field="*{adapayMaxRetryTimes}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">消费者appid:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="wxAppId" th:field="*{wxAppId}" 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="wxSecret" th:field="*{wxSecret}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">师傅端appid:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="servWxAppId" th:field="*{servWxAppId}" 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="servWxSecret" th:field="*{servWxSecret}" 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="takeRate" th:field="*{takeRate}" 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 + "system/dept/config";
|
||||||
|
$("#form-config-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-config-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -4,6 +4,8 @@ import com.ghy.common.annotation.Excel;
|
||||||
import com.ghy.common.core.domain.BaseEntity;
|
import com.ghy.common.core.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author clunt
|
* @author clunt
|
||||||
* 部门配置表, 如支付账号。各个地方的图片等.
|
* 部门配置表, 如支付账号。各个地方的图片等.
|
||||||
|
|
@ -20,13 +22,61 @@ public class SysDeptConfig extends BaseEntity {
|
||||||
@Excel(name = "首页图片", cellType = Excel.ColumnType.STRING)
|
@Excel(name = "首页图片", cellType = Excel.ColumnType.STRING)
|
||||||
private String bannerUrl;
|
private String bannerUrl;
|
||||||
|
|
||||||
|
@Excel(name = "社区保证金额", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private BigDecimal singleMoney;
|
||||||
|
|
||||||
|
@Excel(name = "社区接单数", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private Integer singleOrderPay;
|
||||||
|
|
||||||
|
@Excel(name = "社区未缴纳接单数", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private Integer singleOrderNoPay;
|
||||||
|
|
||||||
|
@Excel(name = "区域保证金额", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private BigDecimal areaMoney;
|
||||||
|
|
||||||
|
@Excel(name = "区域接单数", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private Integer areaOrderPay;
|
||||||
|
|
||||||
|
@Excel(name = "区域未缴纳接单数", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private Integer areaOrderNoPay;
|
||||||
|
|
||||||
|
@Excel(name = "城市保证金额", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private BigDecimal cityMoney;
|
||||||
|
|
||||||
|
@Excel(name = "城市接单数", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private Integer cityOrderPay;
|
||||||
|
|
||||||
|
@Excel(name = "城市未缴纳接单数", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private Integer cityOrderNoPay;
|
||||||
|
|
||||||
|
@Excel(name = "业务员提成比例", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private BigDecimal workerRate;
|
||||||
|
|
||||||
|
@Excel(name = "客服电话", cellType = Excel.ColumnType.STRING)
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@Excel(name = "排班超时罚金", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private BigDecimal plainOutTime;
|
||||||
|
|
||||||
|
@Excel(name = "上门超时罚金", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private BigDecimal goOutTime;
|
||||||
|
|
||||||
|
@Excel(name = "进行超时罚金", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private BigDecimal goingOutTime;
|
||||||
|
|
||||||
|
@Excel(name = "金牌服务罚金倍数", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private BigDecimal goldenServer;
|
||||||
|
|
||||||
|
@Excel(name = "师傅月租费用", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private BigDecimal monthRent;
|
||||||
|
|
||||||
// Adapay支付
|
// Adapay支付
|
||||||
// apiKey为prod模式的API KEY
|
|
||||||
// mockApiKey为mock模式的API KEY
|
|
||||||
// rsaPrivateKey为商户发起请求时,用于请求参数加签所需要的RSA私钥
|
|
||||||
private String adapayAppId;
|
private String adapayAppId;
|
||||||
|
// apiKey为prod模式的API KEY
|
||||||
private String adapayApiKey;
|
private String adapayApiKey;
|
||||||
|
// mockApiKey为mock模式的API KEY
|
||||||
private String adapayMockApiKey;
|
private String adapayMockApiKey;
|
||||||
|
// rsaPrivateKey为商户发起请求时,用于请求参数加签所需要的RSA私钥
|
||||||
private String adapayRsaPrivateKey;
|
private String adapayRsaPrivateKey;
|
||||||
private String adapayMaxRetryTimes;
|
private String adapayMaxRetryTimes;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,4 +22,51 @@ public interface SysDeptConfigMapper {
|
||||||
*/
|
*/
|
||||||
List<SysDeptConfig> selectAllMerchant();
|
List<SysDeptConfig> selectAllMerchant();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分公司配置
|
||||||
|
*
|
||||||
|
* @param sysDeptConfigId 分公司配置主键
|
||||||
|
* @return 分公司配置
|
||||||
|
*/
|
||||||
|
public SysDeptConfig selectSysDeptConfigBySysDeptConfigId(Long sysDeptConfigId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分公司配置列表
|
||||||
|
*
|
||||||
|
* @param sysDeptConfig 分公司配置
|
||||||
|
* @return 分公司配置集合
|
||||||
|
*/
|
||||||
|
public List<SysDeptConfig> selectSysDeptConfigList(SysDeptConfig sysDeptConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增分公司配置
|
||||||
|
*
|
||||||
|
* @param sysDeptConfig 分公司配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSysDeptConfig(SysDeptConfig sysDeptConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改分公司配置
|
||||||
|
*
|
||||||
|
* @param sysDeptConfig 分公司配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSysDeptConfig(SysDeptConfig sysDeptConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除分公司配置
|
||||||
|
*
|
||||||
|
* @param sysDeptConfigId 分公司配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysDeptConfigBySysDeptConfigId(Long sysDeptConfigId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除分公司配置
|
||||||
|
*
|
||||||
|
* @param sysDeptConfigIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysDeptConfigBySysDeptConfigIds(String[] sysDeptConfigIds);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,52 @@ public interface ISysDeptConfigService {
|
||||||
*/
|
*/
|
||||||
List<SysDeptConfig> selectAllMerchant();
|
List<SysDeptConfig> selectAllMerchant();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分公司配置
|
||||||
|
*
|
||||||
|
* @param sysDeptConfigId 分公司配置主键
|
||||||
|
* @return 分公司配置
|
||||||
|
*/
|
||||||
|
public SysDeptConfig selectSysDeptConfigBySysDeptConfigId(Long sysDeptConfigId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分公司配置列表
|
||||||
|
*
|
||||||
|
* @param sysDeptConfig 分公司配置
|
||||||
|
* @return 分公司配置集合
|
||||||
|
*/
|
||||||
|
public List<SysDeptConfig> selectSysDeptConfigList(SysDeptConfig sysDeptConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增分公司配置
|
||||||
|
*
|
||||||
|
* @param sysDeptConfig 分公司配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSysDeptConfig(SysDeptConfig sysDeptConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改分公司配置
|
||||||
|
*
|
||||||
|
* @param sysDeptConfig 分公司配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSysDeptConfig(SysDeptConfig sysDeptConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除分公司配置
|
||||||
|
*
|
||||||
|
* @param sysDeptConfigIds 需要删除的分公司配置主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysDeptConfigBySysDeptConfigIds(String sysDeptConfigIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除分公司配置信息
|
||||||
|
*
|
||||||
|
* @param sysDeptConfigId 分公司配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysDeptConfigBySysDeptConfigId(Long sysDeptConfigId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
package com.ghy.system.service.impl;
|
package com.ghy.system.service.impl;
|
||||||
|
|
||||||
import com.ghy.common.core.domain.entity.SysDept;
|
import com.ghy.common.core.domain.entity.SysDept;
|
||||||
|
import com.ghy.common.core.text.Convert;
|
||||||
import com.ghy.common.exception.ServiceException;
|
import com.ghy.common.exception.ServiceException;
|
||||||
|
import com.ghy.common.utils.DateUtils;
|
||||||
import com.ghy.common.utils.StringUtils;
|
import com.ghy.common.utils.StringUtils;
|
||||||
import com.ghy.system.domain.SysDeptConfig;
|
import com.ghy.system.domain.SysDeptConfig;
|
||||||
import com.ghy.system.mapper.SysDeptConfigMapper;
|
import com.ghy.system.mapper.SysDeptConfigMapper;
|
||||||
|
|
@ -28,19 +30,85 @@ public class SysDeptConfigServiceImpl implements ISysDeptConfigService {
|
||||||
@Override
|
@Override
|
||||||
public SysDeptConfig selectByDeptId(Long deptId) {
|
public SysDeptConfig selectByDeptId(Long deptId) {
|
||||||
return sysDeptConfigMapper.selectByDeptId(deptId);
|
return sysDeptConfigMapper.selectByDeptId(deptId);
|
||||||
|
|
||||||
// SysDept dept = sysDeptMapper.selectDeptById(deptId);
|
|
||||||
// if (StringUtils.isNotNull(dept) && StringUtils.isNotEmpty(dept.getAncestors())) {
|
|
||||||
// Long targetDeptId = Long.parseLong(dept.getAncestors().split(",")[1]);
|
|
||||||
// return sysDeptConfigMapper.selectByDeptId(targetDeptId);
|
|
||||||
// } else {
|
|
||||||
// throw new ServiceException("该用户的部门ID数据有误!");
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysDeptConfig> selectAllMerchant() {
|
public List<SysDeptConfig> selectAllMerchant() {
|
||||||
return sysDeptConfigMapper.selectAllMerchant();
|
return sysDeptConfigMapper.selectAllMerchant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分公司配置
|
||||||
|
*
|
||||||
|
* @param sysDeptConfigId 分公司配置主键
|
||||||
|
* @return 分公司配置
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SysDeptConfig selectSysDeptConfigBySysDeptConfigId(Long sysDeptConfigId)
|
||||||
|
{
|
||||||
|
return sysDeptConfigMapper.selectSysDeptConfigBySysDeptConfigId(sysDeptConfigId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分公司配置列表
|
||||||
|
*
|
||||||
|
* @param sysDeptConfig 分公司配置
|
||||||
|
* @return 分公司配置
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysDeptConfig> selectSysDeptConfigList(SysDeptConfig sysDeptConfig)
|
||||||
|
{
|
||||||
|
return sysDeptConfigMapper.selectSysDeptConfigList(sysDeptConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增分公司配置
|
||||||
|
*
|
||||||
|
* @param sysDeptConfig 分公司配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSysDeptConfig(SysDeptConfig sysDeptConfig)
|
||||||
|
{
|
||||||
|
sysDeptConfig.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return sysDeptConfigMapper.insertSysDeptConfig(sysDeptConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改分公司配置
|
||||||
|
*
|
||||||
|
* @param sysDeptConfig 分公司配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSysDeptConfig(SysDeptConfig sysDeptConfig)
|
||||||
|
{
|
||||||
|
sysDeptConfig.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return sysDeptConfigMapper.updateSysDeptConfig(sysDeptConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除分公司配置
|
||||||
|
*
|
||||||
|
* @param sysDeptConfigIds 需要删除的分公司配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSysDeptConfigBySysDeptConfigIds(String sysDeptConfigIds)
|
||||||
|
{
|
||||||
|
return sysDeptConfigMapper.deleteSysDeptConfigBySysDeptConfigIds(Convert.toStrArray(sysDeptConfigIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除分公司配置信息
|
||||||
|
*
|
||||||
|
* @param sysDeptConfigId 分公司配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSysDeptConfigBySysDeptConfigId(Long sysDeptConfigId)
|
||||||
|
{
|
||||||
|
return sysDeptConfigMapper.deleteSysDeptConfigBySysDeptConfigId(sysDeptConfigId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,31 +4,47 @@
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ghy.system.mapper.SysDeptConfigMapper">
|
<mapper namespace="com.ghy.system.mapper.SysDeptConfigMapper">
|
||||||
<resultMap id="SysDeptConfigResult" type="com.ghy.system.domain.SysDeptConfig">
|
<resultMap id="SysDeptConfigResult" type="com.ghy.system.domain.SysDeptConfig">
|
||||||
<result property="sysDeptConfigId" column="sys_dept_config_id"/>
|
<result property="sysDeptConfigId" column="sys_dept_config_id" />
|
||||||
<result property="deptId" column="dept_id"/>
|
<result property="deptId" column="dept_id" />
|
||||||
<result property="bannerUrl" column="banner_url"/>
|
<result property="bannerUrl" column="banner_url" />
|
||||||
<result property="adapayAppId" column="adapay_app_id"/>
|
<result property="singleMoney" column="single_money" />
|
||||||
<result property="adapayApiKey" column="adapay_api_key"/>
|
<result property="singleOrderPay" column="single_order_pay" />
|
||||||
<result property="adapayMockApiKey" column="adapay_mock_key"/>
|
<result property="singleOrderNoPay" column="single_order_no_pay" />
|
||||||
<result property="adapayRsaPrivateKey" column="adapay_rsa_private_key"/>
|
<result property="areaMoney" column="area_money" />
|
||||||
<result property="adapayMaxRetryTimes" column="adapay_max_retry_times"/>
|
<result property="areaOrderPay" column="area_order_pay" />
|
||||||
<result property="wxAppId" column="wx_app_id"/>
|
<result property="areaOrderNoPay" column="area_order_no_pay" />
|
||||||
<result property="wxSecret" column="wx_secret"/>
|
<result property="cityMoney" column="city_money" />
|
||||||
<result property="servWxAppId" column="serv_wx_app_id"/>
|
<result property="cityOrderPay" column="city_order_pay" />
|
||||||
<result property="servWxSecret" column="serv_wx_secret"/>
|
<result property="cityOrderNoPay" column="city_order_no_pay" />
|
||||||
<result property="takeRate" column="take_rate"/>
|
<result property="workerRate" column="worker_rate" />
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="phone" column="phone" />
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="plainOutTime" column="plain_out_time" />
|
||||||
<result property="updateBy" column="update_by"/>
|
<result property="goOutTime" column="go_out_time" />
|
||||||
<result property="updateTime" column="update_time"/>
|
<result property="goingOutTime" column="going_out_time" />
|
||||||
<result property="remark" column="remark"/>
|
<result property="goldenServer" column="golden_server" />
|
||||||
|
<result property="monthRent" column="month_rent" />
|
||||||
|
<result property="adapayAppId" column="adapay_app_id" />
|
||||||
|
<result property="adapayApiKey" column="adapay_api_key" />
|
||||||
|
<result property="adapayMockApiKey" column="adapay_mock_key" />
|
||||||
|
<result property="adapayRsaPrivateKey" column="adapay_rsa_private_key" />
|
||||||
|
<result property="adapayMaxRetryTimes" column="adapay_max_retry_times" />
|
||||||
|
<result property="wxAppId" column="wx_app_id" />
|
||||||
|
<result property="wxSecret" column="wx_secret" />
|
||||||
|
<result property="servWxAppId" column="serv_wx_app_id" />
|
||||||
|
<result property="servWxSecret" column="serv_wx_secret" />
|
||||||
|
<result property="takeRate" column="take_rate" />
|
||||||
|
<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>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSysDeptConfig">
|
<sql id="selectSysDeptConfig">
|
||||||
SELECT sys_dept_config_id, dept_id, banner_url, adapay_app_id, adapay_api_key, adapay_mock_key,
|
select
|
||||||
adapay_rsa_private_key, adapay_max_retry_times, wx_app_id, wx_secret, serv_wx_app_id, serv_wx_secret, take_rate,
|
sys_dept_config_id, dept_id, banner_url, single_money, single_order_pay, single_order_no_pay, area_money, area_order_pay, area_order_no_pay, city_money, city_order_pay, city_order_no_pay, worker_rate, phone, plain_out_time, go_out_time, going_out_time, golden_server, month_rent, adapay_app_id, adapay_api_key, adapay_mock_key, adapay_rsa_private_key, adapay_max_retry_times, wx_app_id, wx_secret, serv_wx_app_id, serv_wx_secret, take_rate, create_by, create_time, update_by, update_time, remark
|
||||||
create_by, create_time, update_by, update_time, remark
|
from
|
||||||
FROM sys_dept_config
|
sys_dept_config
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectByDeptId" parameterType="long" resultMap="SysDeptConfigResult">
|
<select id="selectByDeptId" parameterType="long" resultMap="SysDeptConfigResult">
|
||||||
|
|
@ -47,4 +63,141 @@
|
||||||
AND adapay_api_key IS NOT NULL
|
AND adapay_api_key IS NOT NULL
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysDeptConfigBySysDeptConfigId" parameterType="Long" resultMap="SysDeptConfigResult">
|
||||||
|
<include refid="selectSysDeptConfig"/>
|
||||||
|
where sys_dept_config_id = #{sysDeptConfigId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysDeptConfigList" parameterType="com.ghy.system.domain.SysDeptConfig" resultMap="SysDeptConfigResult">
|
||||||
|
<include refid="selectSysDeptConfig"/>
|
||||||
|
<where>
|
||||||
|
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSysDeptConfig" parameterType="com.ghy.system.domain.SysDeptConfig" useGeneratedKeys="true" keyProperty="sysDeptConfigId">
|
||||||
|
insert into sys_dept_config
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="deptId != null">dept_id,</if>
|
||||||
|
<if test="bannerUrl != null">banner_url,</if>
|
||||||
|
<if test="singleMoney != null">single_money,</if>
|
||||||
|
<if test="singleOrderPay != null">single_order_pay,</if>
|
||||||
|
<if test="singleOrderNoPay != null">single_order_no_pay,</if>
|
||||||
|
<if test="areaMoney != null">area_money,</if>
|
||||||
|
<if test="areaOrderPay != null">area_order_pay,</if>
|
||||||
|
<if test="areaOrderNoPay != null">area_order_no_pay,</if>
|
||||||
|
<if test="cityMoney != null">city_money,</if>
|
||||||
|
<if test="cityOrderPay != null">city_order_pay,</if>
|
||||||
|
<if test="cityOrderNoPay != null">city_order_no_pay,</if>
|
||||||
|
<if test="workerRate != null">worker_rate,</if>
|
||||||
|
<if test="phone != null">phone,</if>
|
||||||
|
<if test="plainOutTime != null">plain_out_time,</if>
|
||||||
|
<if test="goOutTime != null">go_out_time,</if>
|
||||||
|
<if test="goingOutTime != null">going_out_time,</if>
|
||||||
|
<if test="goldenServer != null">golden_server,</if>
|
||||||
|
<if test="monthRent != null">month_rent,</if>
|
||||||
|
<if test="adapayAppId != null">adapay_app_id,</if>
|
||||||
|
<if test="adapayApiKey != null">adapay_api_key,</if>
|
||||||
|
<if test="adapayMockApiKey != null">adapay_mock_key,</if>
|
||||||
|
<if test="adapayRsaPrivateKey != null">adapay_rsa_private_key,</if>
|
||||||
|
<if test="adapayMaxRetryTimes != null">adapay_max_retry_times,</if>
|
||||||
|
<if test="wxAppId != null">wx_app_id,</if>
|
||||||
|
<if test="wxSecret != null">wx_secret,</if>
|
||||||
|
<if test="servWxAppId != null">serv_wx_app_id,</if>
|
||||||
|
<if test="servWxSecret != null">serv_wx_secret,</if>
|
||||||
|
<if test="takeRate != null">take_rate,</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="deptId != null">#{deptId},</if>
|
||||||
|
<if test="bannerUrl != null">#{bannerUrl},</if>
|
||||||
|
<if test="singleMoney != null">#{singleMoney},</if>
|
||||||
|
<if test="singleOrderPay != null">#{singleOrderPay},</if>
|
||||||
|
<if test="singleOrderNoPay != null">#{singleOrderNoPay},</if>
|
||||||
|
<if test="areaMoney != null">#{areaMoney},</if>
|
||||||
|
<if test="areaOrderPay != null">#{areaOrderPay},</if>
|
||||||
|
<if test="areaOrderNoPay != null">#{areaOrderNoPay},</if>
|
||||||
|
<if test="cityMoney != null">#{cityMoney},</if>
|
||||||
|
<if test="cityOrderPay != null">#{cityOrderPay},</if>
|
||||||
|
<if test="cityOrderNoPay != null">#{cityOrderNoPay},</if>
|
||||||
|
<if test="workerRate != null">#{workerRate},</if>
|
||||||
|
<if test="phone != null">#{phone},</if>
|
||||||
|
<if test="plainOutTime != null">#{plainOutTime},</if>
|
||||||
|
<if test="goOutTime != null">#{goOutTime},</if>
|
||||||
|
<if test="goingOutTime != null">#{goingOutTime},</if>
|
||||||
|
<if test="goldenServer != null">#{goldenServer},</if>
|
||||||
|
<if test="monthRent != null">#{monthRent},</if>
|
||||||
|
<if test="adapayAppId != null">#{adapayAppId},</if>
|
||||||
|
<if test="adapayApiKey != null">#{adapayApiKey},</if>
|
||||||
|
<if test="adapayMockApiKey != null">#{adapayMockApiKey},</if>
|
||||||
|
<if test="adapayRsaPrivateKey != null">#{adapayRsaPrivateKey},</if>
|
||||||
|
<if test="adapayMaxRetryTimes != null">#{adapayMaxRetryTimes},</if>
|
||||||
|
<if test="wxAppId != null">#{wxAppId},</if>
|
||||||
|
<if test="wxSecret != null">#{wxSecret},</if>
|
||||||
|
<if test="servWxAppId != null">#{servWxAppId},</if>
|
||||||
|
<if test="servWxSecret != null">#{servWxSecret},</if>
|
||||||
|
<if test="takeRate != null">#{takeRate},</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="updateSysDeptConfig" parameterType="com.ghy.system.domain.SysDeptConfig">
|
||||||
|
update sys_dept_config
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||||
|
<if test="bannerUrl != null">banner_url = #{bannerUrl},</if>
|
||||||
|
<if test="singleMoney != null">single_money = #{singleMoney},</if>
|
||||||
|
<if test="singleOrderPay != null">single_order_pay = #{singleOrderPay},</if>
|
||||||
|
<if test="singleOrderNoPay != null">single_order_no_pay = #{singleOrderNoPay},</if>
|
||||||
|
<if test="areaMoney != null">area_money = #{areaMoney},</if>
|
||||||
|
<if test="areaOrderPay != null">area_order_pay = #{areaOrderPay},</if>
|
||||||
|
<if test="areaOrderNoPay != null">area_order_no_pay = #{areaOrderNoPay},</if>
|
||||||
|
<if test="cityMoney != null">city_money = #{cityMoney},</if>
|
||||||
|
<if test="cityOrderPay != null">city_order_pay = #{cityOrderPay},</if>
|
||||||
|
<if test="cityOrderNoPay != null">city_order_no_pay = #{cityOrderNoPay},</if>
|
||||||
|
<if test="workerRate != null">worker_rate = #{workerRate},</if>
|
||||||
|
<if test="phone != null">phone = #{phone},</if>
|
||||||
|
<if test="plainOutTime != null">plain_out_time = #{plainOutTime},</if>
|
||||||
|
<if test="goOutTime != null">go_out_time = #{goOutTime},</if>
|
||||||
|
<if test="goingOutTime != null">going_out_time = #{goingOutTime},</if>
|
||||||
|
<if test="goldenServer != null">golden_server = #{goldenServer},</if>
|
||||||
|
<if test="monthRent != null">month_rent = #{monthRent},</if>
|
||||||
|
<if test="adapayAppId != null">adapay_app_id = #{adapayAppId},</if>
|
||||||
|
<if test="adapayApiKey != null">adapay_api_key = #{adapayApiKey},</if>
|
||||||
|
<if test="adapayMockApiKey != null">adapay_mock_key = #{adapayMockApiKey},</if>
|
||||||
|
<if test="adapayRsaPrivateKey != null">adapay_rsa_private_key = #{adapayRsaPrivateKey},</if>
|
||||||
|
<if test="adapayMaxRetryTimes != null">adapay_max_retry_times = #{adapayMaxRetryTimes},</if>
|
||||||
|
<if test="wxAppId != null">wx_app_id = #{wxAppId},</if>
|
||||||
|
<if test="wxSecret != null">wx_secret = #{wxSecret},</if>
|
||||||
|
<if test="servWxAppId != null">serv_wx_app_id = #{servWxAppId},</if>
|
||||||
|
<if test="servWxSecret != null">serv_wx_secret = #{servWxSecret},</if>
|
||||||
|
<if test="takeRate != null">take_rate = #{takeRate},</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 sys_dept_config_id = #{sysDeptConfigId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSysDeptConfigBySysDeptConfigId" parameterType="Long">
|
||||||
|
delete from sys_dept_config where sys_dept_config_id = #{sysDeptConfigId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSysDeptConfigBySysDeptConfigIds" parameterType="String">
|
||||||
|
delete from sys_dept_config where sys_dept_config_id in
|
||||||
|
<foreach item="sysDeptConfigId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{sysDeptConfigId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue