合并请求

master
yulingwei 5 years ago
commit f0109e9554

@ -6,6 +6,7 @@ namespace Admin\Controller;
use Admin\Model\SpendModel; use Admin\Model\SpendModel;
use Think\Think; use Think\Think;
use Base\Tool\Printer; use Base\Tool\Printer;
use Base\Tool\TaskClient;
use Base\Service\PromoteService; use Base\Service\PromoteService;
use GuzzleHttp\Client; use GuzzleHttp\Client;
@ -324,4 +325,45 @@ class ConsoleController extends Think {
} }
); );
} }
public function divideWarnCheck()
{
$redis = new \Org\RedisSDK\Redis(['host'=>'127.0.0.1','port'=>6379],[]);
$warns = M('partner_divide_warn', 'tab_')->alias('pdw')
->field('pdw.*, cgr.ratio, sum(s.pay_amount) as total_amount, p.partner')
->join('tab_partner p on pdw.partner_id = p.id')
->join('tab_game g on pdw.partner_id = g.partner_id')
->join('tab_cp_game_ratio cgr on cgr.game_id = g.id and begin_total_amount = 0 and is_del = 0')
->join('tab_spend s on s.game_id = g.id')
->where(['pdw.status'=>1, 's.pay_status'=>1])
->group('pdw.id')
->select();
if (!$warns) return;
$taskClient = new TaskClient();
$current_time = date('Y-m-d H:i:s');
foreach ($warns as $info) {
if (!$info['ratio']) return;
$total_amount = ceil(($info['ratio'] / 100) * $info['total_amount']);
$cacheKey = "divide:warn:check:{$info['partner_id']}";
if (!($lastStep = $redis->get($cacheKey))) {
$lastStep = 0;
}
if ((intval($info['advance_amount']) - intval($total_amount)) <= $info['warming_amount']) {
if ($total_amount - $lastStep >= $info['warn_frequency']) { // 达到预警
// 发送预警短信
$content = "{$info['partner']}的预付分成款已于{$current_time}余额不足{$info['warming_amount']}元,请尽快进行充值。";
$sendRes = $taskClient->sendSmsBatch(json_decode($info['phones'], true), $content);
if ($sendRes['code'] != TaskClient::SUCCESS) {
continue;
}
// 变换缓存值如果为0需要设置过期时间
if ($lastStep) {
$redis->set($cacheKey, $total_amount);
} else {
$redis->setex($cacheKey, 86400 * 30, $total_amount);
}
}
}
}
}
} }

@ -441,6 +441,7 @@ class GameController extends ThinkController
M('Game', 'tab_')->where($map)->data(array('relation_game_id' => $anogame['id']))->save(); M('Game', 'tab_')->where($map)->data(array('relation_game_id' => $anogame['id']))->save();
} }
$pic = M('Picture')->find($gda['icon']); $pic = M('Picture')->find($gda['icon']);
$count = M('Game', 'tab_')->where(array('icon' => $gda['icon']))->count();//统计icon是否为多个游戏的图标 $count = M('Game', 'tab_')->where(array('icon' => $gda['icon']))->count();//统计icon是否为多个游戏的图标
if ($pic != '' && $count == 1) { //只有一个游戏指向这个图标 if ($pic != '' && $count == 1) { //只有一个游戏指向这个图标
@ -763,6 +764,114 @@ class GameController extends ThinkController
} }
public function companyGames($id)
{
$games = M('Game', 'tab_')
->where(['partner_id'=>$id])
->join("tab_cp_game_ratio on tab_game.id = tab_cp_game_ratio.game_id and begin_total_amount = 0 and is_del = 0", "left")
->field("relation_game_name, game_id, tab_cp_game_ratio.ratio")
->group('relation_game_id')->select();
echo M()->getLastSql();
var_dump($games);
}
public function devide_warn_list($row = 10, $p = 1)
{
$map = ['pdw.status'=>1];
if (!empty($_GET['partner_id'])) {
$map['pdw.partner_id'] = $_GET['partner_id'];
}
if (!empty($_GET['relation_game_id'])) {
$partner = M('Game', 'tab_')->field('partner_id')->where(['relation_game_id'=>$_GET['relation_game_id']])->find();
$map['pdw.partner_id'] = $partner['partner_id'];
}
$list = M('partner_divide_warn', 'tab_')
->alias('pdw')->field("pdw.*, p.partner, sum(s.pay_amount) as total_amount, group_concat(distinct(g.relation_game_name)) as game_name")
->join("tab_partner p on p.id = pdw.partner_id")
->join("tab_game g on pdw.partner_id = g.partner_id", 'left')
->join('tab_spend s on s.game_id = g.id', 'left')
->where(array_merge($map, ['s.pay_status'=>1]))
->group('pdw.id, p.partner')
->page($p, $row)->select();
$count = M('partner_divide_warn', 'tab_')->alias('pdw')->join("tab_game g on pdw.partner_id = g.partner_id", 'left')->where($map)->count();
// if (!empty($list)) {
// foreach ($list as &$item) {
// $item['create_time'] = date('Y-m-d', $item['create_time']);
// $item['upt_time'] = date('Y-m-d', $item['upt_time']);
// }
// }
$page = set_pagination($count, $row);
if ($page) {
$this->assign('_page', $page);
}
$partners = M('partner', 'tab_')->field("id, partner")->where(['status'=>1])->order('last_up_time desc')->select();
$this->assign('partners', $partners);
$this->assign('list_data', $list);
$this->display();
}
public function devide_warn_edit($id=0, $delete=0)
{
if (IS_POST) {
if (empty($_POST['advance_amount']) || empty($_POST['warming_amount']) || empty($_POST['warn_frequency']) || empty($_POST['phones'])) {
return $this->error("请填写必填数据");
}
if ($_POST['phones']) {
$_POST['phones'] = array_unique($_POST['phones']);
foreach ($_POST['phones'] as $phone) {
if (!preg_match('/^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/', $phone)) {
return $this->error("请输入正确的手机号码:{$phone}");
}
}
$_POST['phones'] = json_encode($_POST['phones']);
} else {
$_POST['phones'] = '[]';
}
if (!is_numeric($_POST['advance_amount']) || !is_numeric($_POST['warming_amount']) || !is_numeric($_POST['warn_frequency'])) {
return $this->error("金额需为数字!");
}
if ($_POST['advance_amount'] < $_POST['warming_amount']) {
return $this->error("预警金额不能大于预付金额");
}
if ($_POST['warming_amount'] < $_POST['warn_frequency']) {
return $this->error("预警金额频率不能大于预警金额");
}
if ($id) {
$_POST['upt_time'] = time();
$_POST['operater_id'] = is_login();
$upt = M('partner_divide_warn', 'tab_')->where(['id'=>$id])->save($_POST);
return $upt ? $this->success("更新成功") : $this->error("更新失败");
} else {
if (M('partner_divide_warn', 'tab_')->where(['partner_id'=>$_POST['partner_id'], 'status'=>1])->find()) {
return $this->error('已有当前合作伙伴的预警设置');
}
$_POST['upt_time'] = $_POST['create_time'] = time();
$_POST['operater_id'] = is_login();
$ins = M('partner_divide_warn', 'tab_')->add($_POST);
return $ins ? $this->success("新增成功") : $this->error("新增失败");
}
} else {
$partners = M('partner', 'tab_')->field("id, partner")->where(['status'=>1])->order('last_up_time desc')->select();
$this->assign('partners', $partners);
if ($id) {
if ($delete) {
$_POST['upt_time'] = $_POST['create_time'] = time();
$_POST['operater_id'] = is_login();
$_POST['status'] = 2;
$del = M('partner_divide_warn', 'tab_')->where(['id'=>$id])->save($_POST);
return $del ? $this->success("删除成功") : $this->error("删除失败");
} else {
$warnInfo = M('partner_divide_warn', 'tab_')->where(['id'=>$id])->find();
if (!$warnInfo) return $this->error('未找到该记录');
$warnInfo['phones'] = json_decode($warnInfo['phones'], true);
$this->assign('warnInfo', $warnInfo);
}
}
$this->display();
}
}
/** /**
* 编辑CP分成比例 * 编辑CP分成比例
*/ */

@ -345,7 +345,7 @@ class PublicController extends \Think\Controller
public function telsafecode($phone = '', $delay = 10, $flag = true) public function telsafecode($phone = '', $delay = 10, $flag = true)
{ {
$taskClient = new TaskClient(); $taskClient = new TaskClient();
$result = $taskClient->sendSms($phone, get_client_ip()); $result = $taskClient->sendSmsCode($phone, get_client_ip());
$data = []; $data = [];
if ($result['code'] == TaskClient::SUCCESS) { if ($result['code'] == TaskClient::SUCCESS) {
$data['status'] = 1; $data['status'] = 1;

@ -0,0 +1,131 @@
<extend name="Public/base" />
<block name="css">
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/webuploader.css" media="all">
<style>
#form .txt_area.download_url {width:400px;}
.tabcon1711 .table_radio2 .table_btn {width:215px;}
.bnt_add,.bnt_remove,.bnt_save{
height: 30px;
width: 20px;
font-size: 20px;
line-height: 10px;
color: #3399ff;
background: none;
border: none;
margin-left: 20px;
cursor: pointer;
}
.bnt_remove{
color: #F70909;
}
.bnt_save{
color: #4DB361;
}
</style>
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
</style>
</block>
<!-- 管理员用户组新增和编辑页面 -->
<block name="body">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script src="__STATIC__/layer/extend/layer.ext.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<form action="{:U('Game/devide_warn_edit')}" enctype="application/x-www-form-urlencoded" method="POST"
class="form-horizontal form_info_ml">
<div class="formtitle"><span>预警编辑</span></div>
<ul class="form_info ">
<input type="hidden" name="id" value="{$warnInfo.id}" />
<li>
<label>预警对象</label>
<select id="partner_id" name="partner_id" class="select_gallery">
<?php foreach ($partners as $p):?>
<option value="{$p['id']}" <?php if ($p['id'] == $warnInfo['id']):?>selected<?php endif;?> >{$p.partner}</option>
<?php endforeach;?>
</select>
</li>
<li>
<label>预付金额</label>
<input name="advance_amount" type="text" class="txt" placeholder="预付金额" value="{$warnInfo.advance_amount}" /><span style="color: red;">*</span>
</li>
<li>
<label>预警金额</label>
<input name="warming_amount" type="text" class="txt" placeholder="预警金额" value="{$warnInfo.warming_amount}" /><span style="color: red;">*</span>
</li>
<li>
<label>预警金额频率</label>
<input name="warn_frequency" type="text" class="txt" placeholder="当达到预警值时,每扣除多少流水短信提醒一次" value="{$warnInfo.warn_frequency}" /><span style="color: red;">*</span>
</li>
<?php if ($warnInfo['phones']):?>
<?php foreach ($warnInfo['phones'] as $k => $phone):?>
<?php if ($k == 0):?>
<li class="warn-phone">
<label>手机号</label>
<input type="text" class="txt table_text_input" name="phones[]" value="{$phone}" placeholder=""><span style="color: red;">*</span>
<button type="button" class="bnt_add"></button>
</li>
<?php else:?>
<li class="warn-phone">
<label>通知手机号</label>
<input type="text" class="txt table_text_input" name="phones[]" value="{$phone}" placeholder="">
<button type="button" class="bnt_remove"></button>
</li>
<?php endif;?>
<?php endforeach;?>
<?php else:?>
<li class="warn-phone">
<label>手机号</label>
<input type="text" class="txt table_text_input" name="phones[]" value="" placeholder=""><span style="color: red;">*</span>
<button type="button" class="bnt_add"></button>
</li>
<?php endif;?>
<li>
<label>&nbsp;</label><input type="submit" id="submit" value="确认保存" target-form="form-horizontal" class="form_btn ajax-post">
<input type="button" value="返 回" target-form="form-horizontal" class="form_btn ajax-post" onclick="javascript:void(window.history.go(-1))">
</li>
</ul>
</form>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="AuthManager/index">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<script type="text/javascript">
highlight_subnav('{:U('Game/devide_warn_edit')}');
$(".bnt_add").bind("click",function(){
var a= '<li class="warn-phone"><label>手机号</label><input type="text" class="txt table_text_input" name="phones[]" value="" placeholder=""><button type="button" class="bnt_remove"></button></li>';
$(".warn-phone:last").after(a);
});
$(document).on('click', '.bnt_remove', function(){
$(this).parents('li').remove();
});
</script>
</block>

@ -0,0 +1,205 @@
<extend name="Public/base"/>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css"/>
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
</style>
<!-- 标题栏 -->
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">预警管理</h3>
<p class="description_text">说明:此处显示预警管理记录</p>
</div>
<div class="cf top_nav_list">
<!-- <div class="fl button_list">
<a class="confirm ajax-post" id="dtnn" target-form="ids" url="{:U('Member/delprovide')}"><span class="button_icon button_icon2 "></span>批量删除</a>
</div> -->
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="relation_game_id" name="relation_game_id" class="select_gallery">
<option value="">游戏</option>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="partner_id" name="partner_id" class="select_gallery">
<option value="">预警对象</option>
<?php foreach ($partners as $p):?>
<option value="{$p['id']}" <?php if ($p['id'] == $_GET['id']):?>selected<?php endif;?> >{$p.partner}</option>
<?php endforeach;?>
</select>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search"
url="{:U('Game/devide_warn_list','model='.$model['name'] . '&row=' . I('row'),false)}">
搜索
</a>
</div>
<div class="input-list">
<a class="sch-btn" href="{:U('Game/devide_warn_edit')}">
新增
</a>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<!-- <th class="">
<input class="check-all" type="checkbox">
</th> -->
<th>预警对象</th>
<th>游戏名称</th>
<th>游戏总流水</th>
<th>预付金额</th>
<th>预警金额</th>
<th>预警金额频率</th>
<th>预警手机号</th>
<th>修改时间</th>
<th>创建时间</th>
<th>操作人</th>
<th>操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<empty name="list_data">
<td colspan="11" class="text-center">aOh! 暂时还没有内容!</td>
<else/>
<volist name="list_data" id="data">
<tr>
<!-- <td><input class="ids" type="checkbox" value="{$data['id']}" name="ids"></td> -->
<td>{$data.partner}</td>
<td>{$data.game_name}</td>
<td>{$data.total_amount}</td>
<td>{$data.advance_amount}</td>
<td>{$data.warming_amount}</td>
<td>{$data.warn_frequency}</td>
<td><?php echo implode(',', json_decode($data['phones'], true))?></td>
<td>{$data.upt_time|date='Y-m-d H:i:s',###}</td>
<td>{$data.create_time|date='Y-m-d H:i:s',###}</td>
<td>{:get_admin_nickname($data['operater_id'])}</td>
<td>
<a href="{:U('Game/devide_warn_edit',array('id'=>$data['id']))}">编辑 </a>
<a class="ajax-get confirm" href="{:U('Game/devide_warn_edit',array('id'=>$data['id'], 'delete'=>1))}">解除 </a>
</td>
</tr>
</volist>
</empty>
</tbody>
</table>
</div>
</div>
<div class="page">
{$_page|default=''}
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="Member/login_record">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '
<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">
';
</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
charset="UTF-8"></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript">
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Game/devide_warn_list')}');
$(function () {
<volist name = ":I('get.')" id = "vo" > Think.setValue('{$key}', "{$vo}");
</volist >
$(".select_gallery").select2();
//搜索功能
$("#search").click(function () {
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
query = query.replace(/^&/g, '');
if (url.indexOf('?') > 0) {
url += '&' + query;
} else {
url += '?' + query;
}
var start = $("#time-start").val();
var end = $("#time-end").val();
if (start !='' && end != ''){
if (Date.parse(start) > Date.parse(end)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
}
window.location.href = url;
});
var game_id = "{:I('relation_game_id')}";
$.ajax({
url:"{:U('Ajax/getGameList')}",
type:"get",
data:{sdk_type:$("#relation_game_id option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">游戏名称</option>';
data = response.data;
for (var i in data){
str += "<option value='"+data[i].relation_game_id+"' "+(game_id && data[i].relation_game_id == game_id?'selected':'')+">"+data[i].relation_game_name+"</option>"
}
$("#relation_game_id").empty();
$("#relation_game_id").append(str);
$("#relation_game_id").select2();
}
})
})
</script>
</block>

@ -28,9 +28,27 @@ class TaskClient
return json_decode($result, true); return json_decode($result, true);
} }
public function sendSms($mobile, $clientIp, $type = 'common') public function sendSmsCode(string $mobile, string $clientIp)
{ {
return $this->post('/message/sms-send', ['mobile' => $mobile, 'type' => $type, 'client_ip' => $clientIp]); $options = ['type' => 'code', 'client_ip' => $clientIp];
return $this->sendSms($mobile, $options);
}
public function sendSmsContent(string $mobile, string $content)
{
$options = ['type' => 'content', 'content' => $content];
return $this->sendSms($mobile, $options);
}
public function sendSmsBatch(array $mobiles, string $content)
{
$options = ['type' => 'batch', 'content' => $content];
return $this->sendSms($mobiles, $options);
}
private function sendSms($mobile, array $options)
{
return $this->post('/message/sms-send', ['mobile' => $mobile, 'options' => $options]);
} }
public function checkSms($mobile, $code) public function checkSms($mobile, $code)

@ -220,7 +220,7 @@ class CommonController extends BaseController {
{ {
$phone = I('phone'); $phone = I('phone');
$taskClient = new TaskClient(); $taskClient = new TaskClient();
$result = $taskClient->sendSms($phone, get_client_ip()); $result = $taskClient->sendSmsCode($phone, get_client_ip());
$data = []; $data = [];
if ($result['code'] == TaskClient::SUCCESS) { if ($result['code'] == TaskClient::SUCCESS) {
$this->respondSuccess('发送成功'); $this->respondSuccess('发送成功');

@ -409,7 +409,7 @@ class SsgController extends BaseController {
{ {
$phone = I('phone'); $phone = I('phone');
$taskClient = new TaskClient(); $taskClient = new TaskClient();
$result = $taskClient->sendSms($phone, get_client_ip()); $result = $taskClient->sendSmsCode($phone, get_client_ip());
$data = []; $data = [];
if ($result['code'] == TaskClient::SUCCESS) { if ($result['code'] == TaskClient::SUCCESS) {
$data['status'] = 1; $data['status'] = 1;

@ -581,7 +581,7 @@ class UserController extends BaseController
public function telsafecode($phone = '', $delay = 10, $flag = true) public function telsafecode($phone = '', $delay = 10, $flag = true)
{ {
$taskClient = new TaskClient(); $taskClient = new TaskClient();
$result = $taskClient->sendSms($phone, get_client_ip()); $result = $taskClient->sendSmsCode($phone, get_client_ip());
$data = []; $data = [];
if ($result['code'] == TaskClient::SUCCESS) { if ($result['code'] == TaskClient::SUCCESS) {
$data['status'] = 1; $data['status'] = 1;

@ -1122,3 +1122,17 @@ ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显
ALTER TABLE `tab_promote_belong` ALTER TABLE `tab_promote_belong`
ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显示充值数据 0否 1是'; ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显示充值数据 0否 1是';
-- 预付款预警
CREATE TABLE `tab_partner_divide_warn` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '公司预警表',
`partner_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '公司ID',
`advance_amount` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预付款',
`warming_amount` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预警金额',
`phones` json DEFAULT NULL,
`warn_frequency` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预警金额频率',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态 1正常 2删除',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`upt_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
`operater_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作者ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

Loading…
Cancel
Save