修改批量锁定问题

master
yulingwei 5 years ago
parent a11c07c7a6
commit a9f06b1d57

@ -792,7 +792,7 @@ class MemberController extends ThinkController
*/ */
public function lock_status($id, $lock_status) public function lock_status($id, $lock_status)
{ {
$map['id'] = ['in', explode(',', $id)]; $map['id'] = ['in', array_unique(explode(',', $id))];
$res = M('user', 'tab_')->where($map)->setField(['lock_status' => $lock_status]); $res = M('user', 'tab_')->where($map)->setField(['lock_status' => $lock_status]);
if ($res) { if ($res) {
\Think\Log::actionLog('Member/lock_status', 'Member', $id); \Think\Log::actionLog('Member/lock_status', 'Member', $id);

@ -507,7 +507,7 @@ class PlatformController extends ThinkController
unset($_REQUEST['promote_id']); unset($_REQUEST['promote_id']);
} }
$data = $spend->field('t.pid as promote_id,t.promote_account,sum(a.scount) AS count,sum(a.today) AS today,sum(a. WEEK) AS WEEK,sum(a.mounth) AS mounth') $data = $spend->field('t.pid as promote_id,t.promote_account,sum(a.scount) AS count,sum(a.today) AS today,sum(a. WEEK) AS WEEK,sum(a.mounth) AS mounth')
->join("INNER JOIN (SELECT tp2.*, tp1.id AS pid, tp1.account as promote_account FROM tab_promote tp1 LEFT JOIN tab_promote tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') where $promote_map ) AS t ON promote_id = t.id") ->join("INNER JOIN (SELECT tp2.*, tp1.id AS pid, tp1.account as promote_account FROM tab_promote tp1 LEFT JOIN tab_promote tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') where $promote_map ) AS t ON promote_id = t.id or promote_id = t.pid")
->where($condition)->table('(' . $data . ') as a')->group('t.pid')->order('count desc,a.ordertime')->select(); ->where($condition)->table('(' . $data . ') as a')->group('t.pid')->order('count desc,a.ordertime')->select();
$count = count($data); $count = count($data);
// dump($condition);die; // dump($condition);die;

@ -1 +1 @@
{"news":[{"time":"0:00","count":16},{"time":"1:00","count":11},{"time":"2:00","count":12},{"time":"3:00","count":8},{"time":"4:00","count":9},{"time":"5:00","count":5},{"time":"6:00","count":6},{"time":"7:00","count":15},{"time":"8:00","count":18},{"time":"9:00","count":28},{"time":"10:00","count":82},{"time":"11:00","count":77},{"time":"12:00","count":33},{"time":"13:00","count":36},{"time":"14:00","count":156},{"time":"15:00","count":136},{"time":"16:00","count":108},{"time":"17:00","count":71},{"time":"18:00","count":75},{"time":"19:00","count":99},{"time":"20:00","count":104},{"time":"21:00","count":82},{"time":"22:00","count":84},{"time":"23:00","count":45}],"sum":{"news":1316,"active":6633,"player":1359,"money":132537.03},"active":[{"time":"0:00","count":833},{"time":"1:00","count":294},{"time":"2:00","count":144},{"time":"3:00","count":101},{"time":"4:00","count":84},{"time":"5:00","count":150},{"time":"6:00","count":410},{"time":"7:00","count":590},{"time":"8:00","count":452},{"time":"9:00","count":438},{"time":"10:00","count":399},{"time":"11:00","count":299},{"time":"12:00","count":250},{"time":"13:00","count":174},{"time":"14:00","count":309},{"time":"15:00","count":269},{"time":"16:00","count":204},{"time":"17:00","count":174},{"time":"18:00","count":175},{"time":"19:00","count":222},{"time":"20:00","count":206},{"time":"21:00","count":161},{"time":"22:00","count":181},{"time":"23:00","count":114}],"player":[{"time":"0:00","count":174},{"time":"1:00","count":54},{"time":"2:00","count":34},{"time":"3:00","count":19},{"time":"4:00","count":17},{"time":"5:00","count":18},{"time":"6:00","count":31},{"time":"7:00","count":54},{"time":"8:00","count":54},{"time":"9:00","count":48},{"time":"10:00","count":53},{"time":"11:00","count":63},{"time":"12:00","count":45},{"time":"13:00","count":52},{"time":"14:00","count":40},{"time":"15:00","count":107},{"time":"16:00","count":90},{"time":"17:00","count":56},{"time":"18:00","count":47},{"time":"19:00","count":66},{"time":"20:00","count":62},{"time":"21:00","count":66},{"time":"22:00","count":66},{"time":"23:00","count":43}],"money":[{"time":"0:00","count":"21663.00"},{"time":"1:00","count":"3664.00"},{"time":"2:00","count":"2245.00"},{"time":"3:00","count":"734.00"},{"time":"4:00","count":"1526.00"},{"time":"5:00","count":"1506.00"},{"time":"6:00","count":"3141.00"},{"time":"7:00","count":"3900.00"},{"time":"8:00","count":"5225.00"},{"time":"9:00","count":"5350.02"},{"time":"10:00","count":"3657.00"},{"time":"11:00","count":"5008.00"},{"time":"12:00","count":"2899.00"},{"time":"13:00","count":"7167.00"},{"time":"14:00","count":"13457.00"},{"time":"15:00","count":"6680.00"},{"time":"16:00","count":"4772.00"},{"time":"17:00","count":"4365.01"},{"time":"18:00","count":"3683.00"},{"time":"19:00","count":"3187.00"},{"time":"20:00","count":"5599.00"},{"time":"21:00","count":"10597.00"},{"time":"22:00","count":"7201.00"},{"time":"23:00","count":"5311.00"}]} {"news":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":1},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":1},{"time":"10:00","count":0},{"time":"11:00","count":2},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":3},{"time":"15:00","count":1},{"time":"16:00","count":1},{"time":"17:00","count":1},{"time":"18:00","count":3},{"time":"19:00","count":0},{"time":"20:00","count":2},{"time":"21:00","count":0},{"time":"22:00","count":3},{"time":"23:00","count":2}],"sum":{"news":20,"active":43,"player":10,"money":50.059999999999995},"active":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":2},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":2},{"time":"10:00","count":3},{"time":"11:00","count":7},{"time":"12:00","count":1},{"time":"13:00","count":1},{"time":"14:00","count":4},{"time":"15:00","count":1},{"time":"16:00","count":1},{"time":"17:00","count":3},{"time":"18:00","count":5},{"time":"19:00","count":0},{"time":"20:00","count":2},{"time":"21:00","count":1},{"time":"22:00","count":8},{"time":"23:00","count":2}],"player":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":1},{"time":"11:00","count":1},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":1},{"time":"15:00","count":3},{"time":"16:00","count":2},{"time":"17:00","count":1},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":1}],"money":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":"1.01"},{"time":"11:00","count":"9.00"},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":"0.01"},{"time":"15:00","count":"10.01"},{"time":"16:00","count":"11.02"},{"time":"17:00","count":"14.00"},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":"5.01"}]}

@ -4,7 +4,7 @@
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" /> <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__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script> <script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer/layer.js"></script> <script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<style> <style>
.select2-container--default .select2-selection--single { .select2-container--default .select2-selection--single {
@ -479,24 +479,43 @@ $(function(){
function shenhe(status){ function shenhe(status){
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val(); return $(elem).val();
}).get().join(','); }).get().join(',');
console.log(text); var desc = '';
$.ajax({ if (status == 0) {
cache: true, desc = '锁定';
type: "POST", } else {
url:"{:U('Member/lock_status')}", desc = '开启';
data:{id:text, lock_status:status},// 你的formid }
async: false, layer.prompt({
error: function(data) { formType: 2,
layer.alert("服务器故障,请稍后重试!",{icon: 2}); value: text,
}, placeholder : '账户ID英文逗号隔开',
success: function(data) { title: '请输入要'+desc+'的账户ID(英文逗号隔开)',
// var obj = JSON.parse(data); area: ['800px', '350px'] //自定义文本域宽高
// layer.alert(obj.info,{icon:obj.status}) }, function(value, index, elem){
layer.alert(data.info,{icon:data.status}) if(value=='') {
window.location.reload() layer.msg("请输入账户ID");
return;
} }
$.ajax({
cache: true,
type: "POST",
url:"{:U('Member/lock_status')}",
data:{id:value, lock_status:status},// 你的formid
async: false,
error: function(data) {
layer.alert("服务器故障,请稍后重试!",{icon: 2});
},
success: function(data) {
// var obj = JSON.parse(data);
// layer.alert(obj.info,{icon:obj.status})
layer.alert(data.info,{icon:data.status})
window.location.reload()
}
});
layer.close(index);
}); });
} }
</script> </script>

@ -0,0 +1,2 @@
/*! layer mobile-v2.0.0 Web弹层组件 MIT License http://layer.layui.com/mobile By 贤心 */
;!function(e){"use strict";var t=document,n="querySelectorAll",i="getElementsByClassName",a=function(e){return t[n](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var n in e)t[n]=e[n];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var r=0,o=["layui-m-layer"],c=function(e){var t=this;t.config=l.extend(e),t.view()};c.prototype.view=function(){var e=this,n=e.config,s=t.createElement("div");e.id=s.id=o[0]+r,s.setAttribute("class",o[0]+" "+o[0]+(n.type||0)),s.setAttribute("index",r);var l=function(){var e="object"==typeof n.title;return n.title?'<h3 style="'+(e?n.title[1]:"")+'">'+(e?n.title[0]:n.title)+"</h3>":""}(),c=function(){"string"==typeof n.btn&&(n.btn=[n.btn]);var e,t=(n.btn||[]).length;return 0!==t&&n.btn?(e='<span yes type="1">'+n.btn[0]+"</span>",2===t&&(e='<span no type="0">'+n.btn[1]+"</span>"+e),'<div class="layui-m-layerbtn">'+e+"</div>"):""}();if(n.fixed||(n.top=n.hasOwnProperty("top")?n.top:100,n.style=n.style||"",n.style+=" top:"+(t.body.scrollTop+n.top)+"px"),2===n.type&&(n.content='<i></i><i class="layui-m-layerload"></i><i></i><p>'+(n.content||"")+"</p>"),n.skin&&(n.anim="up"),"msg"===n.skin&&(n.shade=!1),s.innerHTML=(n.shade?"<div "+("string"==typeof n.shade?'style="'+n.shade+'"':"")+' class="layui-m-layershade"></div>':"")+'<div class="layui-m-layermain" '+(n.fixed?"":'style="position:static;"')+'><div class="layui-m-layersection"><div class="layui-m-layerchild '+(n.skin?"layui-m-layer-"+n.skin+" ":"")+(n.className?n.className:"")+" "+(n.anim?"layui-m-anim-"+n.anim:"")+'" '+(n.style?'style="'+n.style+'"':"")+">"+l+'<div class="layui-m-layercont">'+n.content+"</div>"+c+"</div></div></div>",!n.type||2===n.type){var d=t[i](o[0]+n.type),y=d.length;y>=1&&layer.close(d[0].getAttribute("index"))}document.body.appendChild(s);var u=e.elem=a("#"+e.id)[0];n.success&&n.success(u),e.index=r++,e.action(n,u)},c.prototype.action=function(e,t){var n=this;e.time&&(l.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),layer.close(n.index)):e.yes?e.yes(n.index):layer.close(n.index)};if(e.btn)for(var s=t[i]("layui-m-layerbtn")[0].children,r=s.length,o=0;o<r;o++)l.touch(s[o],a);if(e.shade&&e.shadeClose){var c=t[i]("layui-m-layershade")[0];l.touch(c,function(){layer.close(n.index,e.end)})}e.end&&(l.end[n.index]=e.end)},e.layer={v:"2.0",index:r,open:function(e){var t=new c(e||{});return t.index},close:function(e){var n=a("#"+o[0]+e)[0];n&&(n.innerHTML="",t.body.removeChild(n),clearTimeout(l.timer[e]),delete l.timer[e],"function"==typeof l.end[e]&&l.end[e](),delete l.end[e])},closeAll:function(){for(var e=t[i](o[0]),n=0,a=e.length;n<a;n++)layer.close(0|e[0].getAttribute("index"))}},"function"==typeof define?define(function(){return layer}):function(){var e=document.scripts,n=e[e.length-1],i=n.src,a=i.substring(0,i.lastIndexOf("/")+1);n.getAttribute("merge")||document.head.appendChild(function(){var e=t.createElement("link");return e.href=a+"need/layer.css?2.0",e.type="text/css",e.rel="styleSheet",e.id="layermcss",e}())}()}(window);

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because one or more lines are too long

@ -0,0 +1,2 @@
/*! layer mobile-v2.0.0 Web弹层组件 MIT License http://layer.layui.com/mobile By 贤心 */
;!function(e){"use strict";var t=document,n="querySelectorAll",i="getElementsByClassName",a=function(e){return t[n](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var n in e)t[n]=e[n];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var r=0,o=["layui-m-layer"],c=function(e){var t=this;t.config=l.extend(e),t.view()};c.prototype.view=function(){var e=this,n=e.config,s=t.createElement("div");e.id=s.id=o[0]+r,s.setAttribute("class",o[0]+" "+o[0]+(n.type||0)),s.setAttribute("index",r);var l=function(){var e="object"==typeof n.title;return n.title?'<h3 style="'+(e?n.title[1]:"")+'">'+(e?n.title[0]:n.title)+"</h3>":""}(),c=function(){"string"==typeof n.btn&&(n.btn=[n.btn]);var e,t=(n.btn||[]).length;return 0!==t&&n.btn?(e='<span yes type="1">'+n.btn[0]+"</span>",2===t&&(e='<span no type="0">'+n.btn[1]+"</span>"+e),'<div class="layui-m-layerbtn">'+e+"</div>"):""}();if(n.fixed||(n.top=n.hasOwnProperty("top")?n.top:100,n.style=n.style||"",n.style+=" top:"+(t.body.scrollTop+n.top)+"px"),2===n.type&&(n.content='<i></i><i class="layui-m-layerload"></i><i></i><p>'+(n.content||"")+"</p>"),n.skin&&(n.anim="up"),"msg"===n.skin&&(n.shade=!1),s.innerHTML=(n.shade?"<div "+("string"==typeof n.shade?'style="'+n.shade+'"':"")+' class="layui-m-layershade"></div>':"")+'<div class="layui-m-layermain" '+(n.fixed?"":'style="position:static;"')+'><div class="layui-m-layersection"><div class="layui-m-layerchild '+(n.skin?"layui-m-layer-"+n.skin+" ":"")+(n.className?n.className:"")+" "+(n.anim?"layui-m-anim-"+n.anim:"")+'" '+(n.style?'style="'+n.style+'"':"")+">"+l+'<div class="layui-m-layercont">'+n.content+"</div>"+c+"</div></div></div>",!n.type||2===n.type){var d=t[i](o[0]+n.type),y=d.length;y>=1&&layer.close(d[0].getAttribute("index"))}document.body.appendChild(s);var u=e.elem=a("#"+e.id)[0];n.success&&n.success(u),e.index=r++,e.action(n,u)},c.prototype.action=function(e,t){var n=this;e.time&&(l.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),layer.close(n.index)):e.yes?e.yes(n.index):layer.close(n.index)};if(e.btn)for(var s=t[i]("layui-m-layerbtn")[0].children,r=s.length,o=0;o<r;o++)l.touch(s[o],a);if(e.shade&&e.shadeClose){var c=t[i]("layui-m-layershade")[0];l.touch(c,function(){layer.close(n.index,e.end)})}e.end&&(l.end[n.index]=e.end)},e.layer={v:"2.0",index:r,open:function(e){var t=new c(e||{});return t.index},close:function(e){var n=a("#"+o[0]+e)[0];n&&(n.innerHTML="",t.body.removeChild(n),clearTimeout(l.timer[e]),delete l.timer[e],"function"==typeof l.end[e]&&l.end[e](),delete l.end[e])},closeAll:function(){for(var e=t[i](o[0]),n=0,a=e.length;n<a;n++)layer.close(0|e[0].getAttribute("index"))}},"function"==typeof define?define(function(){return layer}):function(){var e=document.scripts,n=e[e.length-1],i=n.src,a=i.substring(0,i.lastIndexOf("/")+1);n.getAttribute("merge")||document.head.appendChild(function(){var e=t.createElement("link");return e.href=a+"need/layer.css?2.0",e.type="text/css",e.rel="styleSheet",e.id="layermcss",e}())}()}(window);

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Loading…
Cancel
Save