feat(setting): 添加携号转网手机号检测功能
- 新增 MobileMnp 控制器和相关视图文件 - 实现携号转网手机号检测数据的添加、编辑和删除功能 - 添加条件搜索功能 - 优化订单历史数据获取逻辑,使用 OrderLastweekHistoryService
This commit is contained in:
parent
47e579221e
commit
a80b289967
112
app/setting/controller/MobileMnp.php
Normal file
112
app/setting/controller/MobileMnp.php
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | ThinkAdmin
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 版权所有 2014~2020 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 官方网站: https://thinkadmin.top
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 开源协议 ( https://mit-license.org )
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
|
||||||
|
// | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace app\setting\controller;
|
||||||
|
|
||||||
|
use think\admin\Controller;
|
||||||
|
use think\admin\helper\QueryHelper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号携号转网
|
||||||
|
* Class Merchant
|
||||||
|
* @package app\merchant\controller
|
||||||
|
*/
|
||||||
|
class MobileMnp extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定数据表
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $table = 'MobileMnp';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 携号转网手机号
|
||||||
|
* @auth true
|
||||||
|
* @menu true
|
||||||
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
|
* @throws \think\db\exception\DbException
|
||||||
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$this->title = '卡号黑名单';
|
||||||
|
$query = $this->_query($this->table);
|
||||||
|
$query->equal('status,id,is_mnp,mobile,old_isp,new_isp')->dateBetween('create_at');
|
||||||
|
// 加载对应数据列表
|
||||||
|
$this->type = input('is_mnp', 'all');
|
||||||
|
// 列表排序并显示
|
||||||
|
// $query->order('status desc,id desc')->page();
|
||||||
|
$query->order('status desc,id desc')->layTable(function(QueryHelper $query){
|
||||||
|
// 前置操作,处理 HTML 模型
|
||||||
|
},function(QueryHelper $query){
|
||||||
|
// $vo['isp_name'] = $this->isp[$vo['isp']];
|
||||||
|
// 后置操作,处理表格数据
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加携转号码
|
||||||
|
* @auth true
|
||||||
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
|
* @throws \think\db\exception\DbException
|
||||||
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
|
*/
|
||||||
|
public function add()
|
||||||
|
{
|
||||||
|
$this->_applyFormToken();
|
||||||
|
$this->_form($this->table, 'form');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑携转号码检测
|
||||||
|
* @auth true
|
||||||
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
|
* @throws \think\db\exception\DbException
|
||||||
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
|
*/
|
||||||
|
public function edit()
|
||||||
|
{
|
||||||
|
$this->_applyFormToken();
|
||||||
|
$this->_form($this->table, 'form');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改携转号码检测
|
||||||
|
* @auth true
|
||||||
|
* @throws \think\db\exception\DbException
|
||||||
|
*/
|
||||||
|
public function state()
|
||||||
|
{
|
||||||
|
$this->_applyFormToken();
|
||||||
|
$this->_save($this->table, $this->_vali([
|
||||||
|
'status.in:0,1' => '状态值范围异常!',
|
||||||
|
'status.require' => '状态值不能为空!',
|
||||||
|
]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除携转号码检测
|
||||||
|
* @auth true
|
||||||
|
* @throws \think\db\exception\DbException
|
||||||
|
*/
|
||||||
|
public function remove()
|
||||||
|
{
|
||||||
|
// $this->_applyFormToken();
|
||||||
|
$this->_delete($this->table);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -10,6 +10,7 @@ use app\channel\service\ChannelService;
|
|||||||
use app\merchant\service\MerchantService;
|
use app\merchant\service\MerchantService;
|
||||||
use app\merchant\service\MerchantLogService;
|
use app\merchant\service\MerchantLogService;
|
||||||
use app\merchant\service\OrderLastHistoryService;
|
use app\merchant\service\OrderLastHistoryService;
|
||||||
|
use app\merchant\service\OrderLastweekHistoryService;
|
||||||
use app\merchant\service\OrderService;
|
use app\merchant\service\OrderService;
|
||||||
use app\merchant\service\OrderHistoryService;
|
use app\merchant\service\OrderHistoryService;
|
||||||
|
|
||||||
@ -83,6 +84,7 @@ use app\setting\service\MerchantAccountService;
|
|||||||
$day = date('Y-m-d', strtotime('-1 day'));
|
$day = date('Y-m-d', strtotime('-1 day'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->merchantLogService = MerchantLogService::instance();
|
$this->merchantLogService = MerchantLogService::instance();
|
||||||
$accountService = AccountService::instance();
|
$accountService = AccountService::instance();
|
||||||
$merchantAccountService = MerchantAccountService::instance();
|
$merchantAccountService = MerchantAccountService::instance();
|
||||||
@ -103,7 +105,7 @@ use app\setting\service\MerchantAccountService;
|
|||||||
|
|
||||||
$this->history = true;
|
$this->history = true;
|
||||||
// $this->orderService = OrderHistoryService::instance();
|
// $this->orderService = OrderHistoryService::instance();
|
||||||
$this->orderService = OrderLastHistoryService::instance();
|
$this->orderService = OrderLastweekHistoryService::instance();
|
||||||
|
|
||||||
$begin = $day . ' 00:00:00';
|
$begin = $day . ' 00:00:00';
|
||||||
$after = $day . ' 23:59:59';
|
$after = $day . ' 23:59:59';
|
||||||
|
@ -8,6 +8,7 @@ use app\channel\service\AccountService;
|
|||||||
use app\merchant\service\MerchantService;
|
use app\merchant\service\MerchantService;
|
||||||
use app\merchant\service\MerchantLogService;
|
use app\merchant\service\MerchantLogService;
|
||||||
use app\merchant\service\OrderLastHistoryService;
|
use app\merchant\service\OrderLastHistoryService;
|
||||||
|
use app\merchant\service\OrderLastweekHistoryService;
|
||||||
use app\merchant\service\OrderService;
|
use app\merchant\service\OrderService;
|
||||||
use app\merchant\service\OrderHistoryService;
|
use app\merchant\service\OrderHistoryService;
|
||||||
use dever\Log;
|
use dever\Log;
|
||||||
@ -77,7 +78,7 @@ class ChannelAccountService extends Service
|
|||||||
if ($product) {
|
if ($product) {
|
||||||
$order_data = $account_data = array();
|
$order_data = $account_data = array();
|
||||||
// $orderHistoryService = OrderHistoryService::instance();
|
// $orderHistoryService = OrderHistoryService::instance();
|
||||||
$orderHistoryService = OrderLastHistoryService::instance();
|
$orderHistoryService = OrderLastweekHistoryService::instance();
|
||||||
$merchantLogService = MerchantLogService::instance();
|
$merchantLogService = MerchantLogService::instance();
|
||||||
$accountService = AccountService::instance();
|
$accountService = AccountService::instance();
|
||||||
|
|
||||||
|
136
app/setting/view/mobile_mnp/form.html
Normal file
136
app/setting/view/mobile_mnp/form.html
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
|
||||||
|
<div class="layui-card-body padding-left-40">
|
||||||
|
|
||||||
|
<div class="layui-row layui-col-space15">
|
||||||
|
<div class="layui-col-xs12">
|
||||||
|
<label class="block relative">
|
||||||
|
<span class="color-black font-w7">是否携转</span>
|
||||||
|
<span class="color-desc margin-left-5">Is MNP</span>
|
||||||
|
<select class="layui-select" name="is_mnp" id="is_mnp" lay-search>
|
||||||
|
{foreach [1 => '已携转', 0 => '未携转'] as $k => $v}
|
||||||
|
{if isset($vo.is_mnp) and $vo.is_mnp eq $k}
|
||||||
|
<option selected value="{$k}">{$v|default=''}</option>
|
||||||
|
{else}
|
||||||
|
<option value="{$k}">{$v|default=''}</option>
|
||||||
|
{/if}
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
<span class="help-block"><b>必填,</b>请选择是否携转,可以用手机号检测检测数据</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-row layui-col-space15">
|
||||||
|
|
||||||
|
<div class="layui-col-xs12">
|
||||||
|
<label class="relative block">
|
||||||
|
<span class="font-w7">手机号</span><span class="color-desc margin-left-5">Mobile</span>
|
||||||
|
<input name="mobile" value='{$vo.mobile|default=""}' required placeholder="请输入手机号" lay-verify="required|phone" class="layui-input" id="validate-phone">
|
||||||
|
<span class="color-desc">请输入手机号</span>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
<div class="layui-form-mid" style="padding: 0!important;">
|
||||||
|
<button type="button" class="layui-btn layui-btn-primary" id="get-mobile-mnp">获取携转状态</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-row layui-col-space15">
|
||||||
|
<div class="layui-col-xs12">
|
||||||
|
<label class="block relative">
|
||||||
|
<span class="color-black font-w7">原运营商</span>
|
||||||
|
<span class="color-desc margin-left-5">Old ISP</span>
|
||||||
|
<select class="layui-select" name="old_isp" id="old_isp" lay-search>
|
||||||
|
{foreach [1 => '移动', 2 => '联通', 3 => '电信'] as $k => $v}
|
||||||
|
{if isset($vo.old_isp) and $vo.old_isp eq $k}
|
||||||
|
<option selected value="{$k}">{$v|default=''}</option>
|
||||||
|
{else}
|
||||||
|
<option value="{$k}">{$v|default=''}</option>
|
||||||
|
{/if}
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
<span class="help-block"><b>必填,</b>请选择原运营商</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-row layui-col-space15">
|
||||||
|
<div class="layui-col-xs12">
|
||||||
|
<label class="block relative">
|
||||||
|
<span class="color-black font-w7">现运营商</span>
|
||||||
|
<span class="color-desc margin-left-5">New ISP</span>
|
||||||
|
<select class="layui-select" name="new_isp" id="new_isp" lay-search>
|
||||||
|
{foreach [1 => '移动', 2 => '联通', 3 => '电信'] as $k => $v}
|
||||||
|
{if isset($vo.new_isp) and $vo.new_isp eq $k}
|
||||||
|
<option selected value="{$k}">{$v|default=''}</option>
|
||||||
|
{else}
|
||||||
|
<option value="{$k}">{$v|default=''}</option>
|
||||||
|
{/if}
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
<span class="help-block"><b>必填,</b>请选择现运营商</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="hr-line-dashed margin-top-10 margin-bottom-10"></div>
|
||||||
|
<label class="layui-form-item block relative">
|
||||||
|
<span class="">备注</span><span class="color-desc margin-left-5">Description</span>
|
||||||
|
<textarea placeholder="请输入备注" class="layui-textarea" name="desc">{$vo.desc|default=""}</textarea>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="hr-line-dashed"></div>
|
||||||
|
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
||||||
|
<div class="layui-form-item text-center">
|
||||||
|
<button class="layui-btn" type='submit'>保存数据</button>
|
||||||
|
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
layui.use(['form','layer'], function(){
|
||||||
|
var form = layui.form;
|
||||||
|
var layer = layui.layer;
|
||||||
|
// 点击获取验证码
|
||||||
|
$('#get-mobile-mnp').on('click', function(){
|
||||||
|
var isValid = form.validate('#validate-phone'); // 主动触发验证,v2.7.0 新增
|
||||||
|
// 验证通过
|
||||||
|
if(isValid) {
|
||||||
|
layer.msg('手机号规则验证通过,正在获取携转状态');
|
||||||
|
// 此处可继续书写「发送验证码」等后续逻辑
|
||||||
|
// …
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
form.render();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function validateMobile(input) {
|
||||||
|
const mobilePattern = /^1[3-9]\d{9}$/; // 假设手机号码格式为中国的手机号码格式
|
||||||
|
if (!mobilePattern.test(input.value)) {
|
||||||
|
input.setCustomValidity("请输入有效的手机号码");
|
||||||
|
} else {
|
||||||
|
input.setCustomValidity("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function validateForm() {
|
||||||
|
var mobileInput = document.querySelector('input[name="mobile"]');
|
||||||
|
validateMobile(mobileInput);
|
||||||
|
if (!mobileInput.checkValidity()) {
|
||||||
|
mobileInput.reportValidity();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
111
app/setting/view/mobile_mnp/index.html
Normal file
111
app/setting/view/mobile_mnp/index.html
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
{extend name="../../admin/view/table"}
|
||||||
|
{block name="button"}
|
||||||
|
<!--{if auth("add")}-->
|
||||||
|
<button data-modal='{:url("add")}' data-title="添加携转号码检测数据" class='layui-btn layui-btn-sm layui-btn-primary'>添加携转号码检测数据</button>
|
||||||
|
<!--{/if}-->
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block name="content"}
|
||||||
|
|
||||||
|
<!--<div class="layui-tab layui-tab-card think-bg-white table-block">-->
|
||||||
|
|
||||||
|
<!-- <div class="layui-tab-content think-box-shadow table-block table-block">-->
|
||||||
|
<div class="think-box-shadow">
|
||||||
|
|
||||||
|
{include file='mobile_mnp/index_search'}
|
||||||
|
<div class="think-box-shadow">
|
||||||
|
<table id="MobileMnpData" data-target-search="form.form-search"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- </div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block name='script'}
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
// 定义运营商映射对象
|
||||||
|
var ispMap = {
|
||||||
|
1: '移动',
|
||||||
|
2: '联通',
|
||||||
|
3: '电信'
|
||||||
|
};
|
||||||
|
var mnpMap = {
|
||||||
|
1: '已携转',
|
||||||
|
0: '未携转'
|
||||||
|
};
|
||||||
|
var statusMap = {
|
||||||
|
1: '正常',
|
||||||
|
0: '禁用'
|
||||||
|
};
|
||||||
|
|
||||||
|
// 动态创建 layui.table 表格
|
||||||
|
$('#MobileMnpData').layTable({
|
||||||
|
url: '{:sysuri()}',
|
||||||
|
// toolbar: '#toolbar',
|
||||||
|
// console: console.log(),
|
||||||
|
even: true, height: 'full',
|
||||||
|
sort: {field: 'id', type: 'desc'},
|
||||||
|
cols: [[
|
||||||
|
{checkbox: true},
|
||||||
|
{field: 'id', title: 'ID', width: 80, sort: true, align: 'center'},
|
||||||
|
{field: 'mobile', title: '手机号', minWidth: 100, align: 'center'},
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'old_isp',
|
||||||
|
title: '原运营商',
|
||||||
|
minWidth: 120,
|
||||||
|
templet: function(d) {
|
||||||
|
return ispMap[d.old_isp] || '未知';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'new_isp',
|
||||||
|
title: '现运营商',
|
||||||
|
minWidth: 120,
|
||||||
|
templet: function(d) {
|
||||||
|
return ispMap[d.new_isp] || '未知';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'is_mnp',
|
||||||
|
title: '是否携转',
|
||||||
|
minWidth: 120,
|
||||||
|
templet: function(d) {
|
||||||
|
return mnpMap[d.is_mnp] || '未知';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'desc', title: '描述', minWidth: 120},
|
||||||
|
{field: 'status', title: '状态', minWidth: 100, templet: function(d) {
|
||||||
|
return statusMap[d.status] || '未知';
|
||||||
|
}},
|
||||||
|
{field: 'create_at', title: '操作时间', minWidth: 170, align: 'center', sort: true},
|
||||||
|
{toolbar: '#toolbar', title: '操作面板', align: 'center', fixed: 'right'}
|
||||||
|
]],
|
||||||
|
|
||||||
|
error: function(error) {
|
||||||
|
console.error('请求失败:', error);
|
||||||
|
alert('请求失败,请稍后再试');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// 监听原 layui.table 的 toolbar 事件
|
||||||
|
$('#MobileMnpData').trigger('toolbar', function (item) {
|
||||||
|
// 对应 layui.table 写法 layui.table.on('toolbar(OplogData)',function(){ })
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" id="toolbar">
|
||||||
|
<!--{if auth('remove')}-->
|
||||||
|
<a data-action='{:url("remove")}' data-value="id#{{d.id}}" data-confirm="确认要删除这条记录吗?" class="layui-btn layui-btn-sm layui-btn-danger">删 除</a>
|
||||||
|
<!--{/if}-->
|
||||||
|
</script>
|
||||||
|
{/block}
|
88
app/setting/view/mobile_mnp/index_search.html
Normal file
88
app/setting/view/mobile_mnp/index_search.html
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<fieldset>
|
||||||
|
<legend>{:lang('条件搜索')}</legend>
|
||||||
|
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
||||||
|
|
||||||
|
<div class="layui-form-item layui-inline">
|
||||||
|
<label class="layui-form-label">ID</label>
|
||||||
|
<label class="layui-input-inline">
|
||||||
|
<input name="id" value="{$get.id|default=''}" placeholder="请输入id" class="layui-input">
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item layui-inline">
|
||||||
|
<label class="layui-form-label">手机号</label>
|
||||||
|
<label class="layui-input-inline">
|
||||||
|
<input name="mobile" value="{$get.mobile|default=''}" placeholder="请输入手机号" class="layui-input">
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item layui-inline">
|
||||||
|
<label class="layui-form-label">是否携转</label>
|
||||||
|
<label class="layui-input-inline">
|
||||||
|
<select name="is_mnp" class="layui-select">
|
||||||
|
<option value=''>-- 全部 --</option>
|
||||||
|
{foreach ['1'=>'已携转','0'=>'未携转'] as $k=>$v}
|
||||||
|
{if isset($get.is_mnp) and $get.is_mnp eq $k}
|
||||||
|
<option selected value="{$k}">{$v}</option>
|
||||||
|
{else}
|
||||||
|
<option value="{$k}">{$v}</option>
|
||||||
|
{/if}{/foreach}
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item layui-inline">
|
||||||
|
<label class="layui-form-label">原运营商</label>
|
||||||
|
<label class="layui-input-inline">
|
||||||
|
<select name="old_isp" class="layui-select">
|
||||||
|
<option value=''>-- 全部 --</option>
|
||||||
|
{foreach ['1'=>'移动','2'=>'联通','3'=>'电信'] as $k=>$v}
|
||||||
|
{if isset($get.old_isp) and $get.old_isp eq $k}
|
||||||
|
<option selected value="{$k}">{$v}</option>
|
||||||
|
{else}
|
||||||
|
<option value="{$k}">{$v}</option>
|
||||||
|
{/if}{/foreach}
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-inline">
|
||||||
|
<label class="layui-form-label">现运营商</label>
|
||||||
|
<label class="layui-input-inline">
|
||||||
|
<select name="new_isp" class="layui-select">
|
||||||
|
<option value=''>-- 全部 --</option>
|
||||||
|
{foreach ['1'=>'移动','2'=>'联通','3'=>'电信'] as $k=>$v}
|
||||||
|
{if isset($get.new_isp) and $get.new_isp eq $k}
|
||||||
|
<option selected value="{$k}">{$v}</option>
|
||||||
|
{else}
|
||||||
|
<option value="{$k}">{$v}</option>
|
||||||
|
{/if}{/foreach}
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-inline">
|
||||||
|
<label class="layui-form-label">状态</label>
|
||||||
|
<label class="layui-input-inline">
|
||||||
|
<select name="status" class="layui-select">
|
||||||
|
<option value=''>-- 全部 --</option>
|
||||||
|
{foreach ['1'=>'启用','2'=>'禁用'] as $k=>$v}
|
||||||
|
{if isset($get.status) and $get.status eq $k}
|
||||||
|
<option selected value="{$k}">{$v}</option>
|
||||||
|
{else}
|
||||||
|
<option value="{$k}">{$v}</option>
|
||||||
|
{/if}{/foreach}
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item layui-inline">
|
||||||
|
<label class="layui-form-label">创建时间</label>
|
||||||
|
<label class="layui-input-inline">
|
||||||
|
<input data-date-range name="create_at" value="{$get.create_at|default=''}" placeholder="创建时间" class="layui-input">
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item layui-inline">
|
||||||
|
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> {:lang('搜 索')}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</fieldset>
|
@ -155,6 +155,9 @@ class OrderTask extends Core
|
|||||||
exit('ok');
|
exit('ok');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 商户对账
|
||||||
|
|
||||||
|
|
||||||
# 直接对数据库中的订单数据进行处理 如果队列失效,就使用这个方法进行操作,谨慎使用该方法,会和队列同时执行,已取消
|
# 直接对数据库中的订单数据进行处理 如果队列失效,就使用这个方法进行操作,谨慎使用该方法,会和队列同时执行,已取消
|
||||||
/*
|
/*
|
||||||
public function runAll()
|
public function runAll()
|
||||||
|
@ -9,6 +9,7 @@ use app\gateway\service\RedisService;
|
|||||||
use app\merchant\service\MerchantLogHistoryService;
|
use app\merchant\service\MerchantLogHistoryService;
|
||||||
use app\merchant\service\OrderHistoryService;
|
use app\merchant\service\OrderHistoryService;
|
||||||
use app\merchant\service\OrderLastHistoryService;
|
use app\merchant\service\OrderLastHistoryService;
|
||||||
|
use app\merchant\service\OrderLastweekHistoryService;
|
||||||
use app\merchant\service\OrderService;
|
use app\merchant\service\OrderService;
|
||||||
use app\merchant\service\RebateService;
|
use app\merchant\service\RebateService;
|
||||||
use app\setting\service\ChannelAccountService;
|
use app\setting\service\ChannelAccountService;
|
||||||
@ -335,8 +336,8 @@ class Task extends Core
|
|||||||
if (!$day) {
|
if (!$day) {
|
||||||
$day = date('Y-m-d', strtotime('-1 day'));
|
$day = date('Y-m-d', strtotime('-1 day'));
|
||||||
}
|
}
|
||||||
// $orderHistoryService = OrderHistoryService::instance();
|
// $orderHistoryService = OrderLastHistoryService::instance();
|
||||||
$orderHistoryService = OrderLastHistoryService::instance();
|
$orderHistoryService = OrderLastweekHistoryService::instance();
|
||||||
$data = $orderHistoryService->getTotalData($day);
|
$data = $orderHistoryService->getTotalData($day);
|
||||||
// var_dump($data);
|
// var_dump($data);
|
||||||
if ($data) {
|
if ($data) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user