diff --git a/service/Application/Admin/Controller/AlipayLifeMessageController.class.php b/service/Application/Admin/Controller/AlipayLifeMessageController.class.php index 89681a9e4..5d08649d8 100644 --- a/service/Application/Admin/Controller/AlipayLifeMessageController.class.php +++ b/service/Application/Admin/Controller/AlipayLifeMessageController.class.php @@ -2,6 +2,8 @@ namespace Admin\Controller; +use Service\AlipayLifeService; + /** * 生活号消息管理 * @author Devil @@ -52,14 +54,14 @@ class AlipayLifeMessageController extends CommonController $number = MyC('admin_page_number'); $page_param = array( 'number' => $number, - 'total' => $m->alias('a')->join('INNER JOIN __ALIPAY_LIFE_CATEGORY_JOIN__ AS cj ON a.id=cj.alipay_life_id')->where($where)->count('DISTINCT a.id'), + 'total' => $m->where($where)->count(), 'where' => $param, 'url' => U('Admin/AlipayLifeMessage/Index'), ); $page = new \Library\Page($page_param); // 获取列表 - $list = $m->alias('a')->field('a.*')->join('INNER JOIN __ALIPAY_LIFE_CATEGORY_JOIN__ AS cj ON a.id=cj.alipay_life_id')->where($where)->limit($page->GetPageStarNumber(), $number)->order('a.id desc')->group('a.id')->select(); + $list = $m->where($where)->limit($page->GetPageStarNumber(), $number)->order('id desc')->select(); $list = $this->SetDataHandle($list); // 参数 @@ -71,9 +73,11 @@ class AlipayLifeMessageController extends CommonController // 发送状态 $this->assign('common_send_status_list', L('common_send_status_list')); - // 生活号消息分类 - $alipay_life_list = M('AlipayLife')->field('id,name')->select(); - $this->assign('alipay_life_list', $alipay_life_list); + // 消息类型 + $this->assign('alipay_life_message_type_list', L('alipay_life_message_type_list')); + + // 发送类型 + $this->assign('alipay_life_message_send_type_list', L('alipay_life_message_send_type_list')); // 数据列表 $this->assign('list', $list); @@ -93,21 +97,38 @@ class AlipayLifeMessageController extends CommonController { if(!empty($data)) { - $common_is_enable_tips = L('common_is_enable_tips'); + $common_send_status_list = L('common_send_status_list'); + $alipay_life_message_type_list = L('alipay_life_message_type_list'); + $alipay_life_message_send_type_list = L('alipay_life_message_send_type_list'); foreach($data as &$v) { + // 状态 + $v['status_name'] = $common_send_status_list[$v['status']]['name']; + + // 消息类型 + $v['type_name'] = $alipay_life_message_type_list[$v['type']]['name']; + + // 发送状态 + $v['send_type_name'] = $alipay_life_message_send_type_list[$v['send_type']]['name']; + // 分类名称 $category_all = M('AlipayLifeMessageCategoryJoin')->where(['alipay_life_id'=>$v['id']])->getField('alipay_life_category_id', true); $v['alipay_life_category_text'] = M('AlipayLifeMessageCategory')->where(['id'=>['in', $category_all]])->getField('name', true); - // logo - $v['logo'] = empty($v['logo']) ? '' : C('IMAGE_HOST').$v['logo']; + // image_url + $v['image_url'] = empty($v['image_url']) ? '' : C('IMAGE_HOST').$v['image_url']; - // 添加时间 - $v['add_time_text'] = date('Y-m-d H:i:s', $v['add_time']); + // 生活号分类 + $v['category_all'] = empty($v['alipay_life_category_id']) ? '' : M('AlipayLifeCategory')->where(['id'=>['in', json_decode($v['alipay_life_category_id'], true)]])->getField('name', true); - // 更新时间 - $v['upd_time_text'] = date('Y-m-d H:i:s', $v['upd_time']); + // 生活号 + $v['alipay_life_name'] = empty($v['alipay_life_id']) ? '' : M('AlipayLife')->where(['id'=>$v['alipay_life_id']])->getField('name'); + + // 时间 + $v['send_startup_time'] = empty($v['send_startup_time']) ? '' : date('Y-m-d H:i:s', $v['send_startup_time']); + $v['send_success_time'] = empty($v['send_success_time']) ? '' : date('Y-m-d H:i:s', $v['send_success_time']); + $v['add_time'] = date('Y-m-d H:i:s', $v['add_time']); + $v['upd_time'] = empty($v['upd_time']) ? '' : date('Y-m-d H:i:s', $v['upd_time']); } } return $data; @@ -127,42 +148,46 @@ class AlipayLifeMessageController extends CommonController // 模糊 if(!empty($_REQUEST['keyword'])) { - $where['a.name'] = array('like', '%'.I('keyword').'%'); + $where['title'] = array('like', '%'.I('keyword').'%'); } // 是否更多条件 if(I('is_more', 0) == 1) { - if(I('is_shelves', -1) > -1) + if(I('status', -1) > -1) { - $where['a.is_shelves'] = intval(I('is_shelves', 0)); + $where['status'] = intval(I('status', 0)); } - if(I('alipay_life_category_id', -1) > -1) + if(I('type', -1) > -1) { - $where['cj.alipay_life_category_id'] = intval(I('alipay_life_category_id', 0)); + $where['type'] = intval(I('type', 0)); + } + if(I('send_type', -1) > -1) + { + $where['send_type'] = intval(I('send_type', 0)); } // 表达式 if(!empty($_REQUEST['time_start'])) { - $where['a.add_time'][] = array('gt', strtotime(I('time_start'))); + $where['add_time'][] = array('gt', strtotime(I('time_start'))); } if(!empty($_REQUEST['time_end'])) { - $where['a.add_time'][] = array('lt', strtotime(I('time_end'))); + $where['add_time'][] = array('lt', strtotime(I('time_end'))); } } return $where; } /** - * [SendInfo 添加/编辑页面] + * [SaveInfo 添加/编辑页面] * @author Devil * @blog http://gong.gg/ * @version 0.0.1 * @datetime 2016-12-14T21:37:02+0800 */ - public function SendInfo() + public function SaveInfo() { // 轮播图片信息 $data = empty($_REQUEST['id']) ? array() : M('AlipayLifeMessage')->find(I('id')); @@ -203,7 +228,7 @@ class AlipayLifeMessageController extends CommonController // 参数 $this->assign('params', array_merge($_POST, $_GET)); $this->assign('nav_type', I('nav_type', 0)); - $this->display('SendInfo'); + $this->display('SaveInfo'); } /** @@ -221,95 +246,8 @@ class AlipayLifeMessageController extends CommonController $this->error(L('common_unauthorized_access')); } - // 图片 - $this->ImagesSave('logo', 'file_logo', 'alipay_life'); - - // id为空则表示是新增 - $m = D('AlipayLifeMessage'); - - // 公共额外数据处理 - $_POST['is_shelves'] = intval(I('is_shelves', 0)); - - // 开启事务 - $m->startTrans(); - - // 分类 - $category_m = M('AlipayLifeMessageCategoryJoin'); - if(empty($_POST['id'])) - { - $type = 1; - } else { - $type = 2; - $category_m->where(['id'=>I('id')])->delete(); - } - - $status = false; - $msg = ''; - $alipay_life_id = I('id', 0); - if($m->create($_POST, $type)) - { - // 额外数据处理 - $m->upd_time = time(); - $m->name = I('name'); - $m->appid = I('appid'); - $m->rsa_public = I('rsa_public'); - $m->rsa_private = I('rsa_private'); - $m->out_rsa_public = I('out_rsa_public'); - - if($type == 1) - { - // 写入数据库 - $m->add_time = time(); - $alipay_life_id = $m->add(); - if($alipay_life_id) - { - $status = true; - $msg = L('common_operation_add_success'); - } else { - $msg = L('common_operation_add_error'); - } - } else { - // 更新数据库 - if($m->where(array('id'=>$alipay_life_id))->save()) - { - $status = true; - $msg = L('common_operation_edit_success'); - } else { - $msg = L('common_operation_edit_error'); - } - } - } else { - $msg = $m->getError(); - } - - // 分类处理 - if($status === true) - { - $count = 0; - $all = explode(',', I('alipay_life_category_id')); - foreach($all as $v) - { - if($category_m->add(['alipay_life_id'=>$alipay_life_id, 'alipay_life_category_id'=>$v, 'add_time'=>time()])) - { - $count++; - } - } - if($count < count($all)) - { - // 回滚事务 - $m->rollback(); - - $this->ajaxReturn(L('alipay_life_save_category_error'), -10); - } - } else { - // 回滚事务 - $m->rollback(); - $this->ajaxReturn($msg, -100); - } - - // 回滚事务 - $m->commit(); - $this->ajaxReturn($msg, 0); + $ret = AlipayLifeService::MessageAdd($_POST); + $this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']); } /** @@ -321,50 +259,39 @@ class AlipayLifeMessageController extends CommonController */ public function Delete() { + // 是否ajax请求 if(!IS_AJAX) { $this->error(L('common_unauthorized_access')); } - $m = D('AlipayLifeMessage'); - if($m->create($_POST, 5)) + // 删除 + if(M('AlipayLifeMessage')->delete(intval(I('id')))) { - $id = I('id'); - - // 删除 - if($m->delete($id)) - { - $this->ajaxReturn(L('common_operation_delete_success')); - } else { - $this->ajaxReturn(L('common_operation_delete_error'), -100); - } + $this->ajaxReturn(L('common_operation_delete_success')); } else { - $this->ajaxReturn($m->getError(), -1); + $this->ajaxReturn(L('common_operation_delete_error'), -100); } } /** - * [StatusUpdate 状态更新] + * 发送消息 * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2017-01-12T22:23:06+0800 + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-10-24 + * @desc description */ - public function StatusUpdate() + public function Send() { - // 参数 - if(empty($_POST['id']) || !isset($_POST['state'])) + // 是否ajax请求 + if(!IS_AJAX) { - $this->ajaxReturn(L('common_param_error'), -1); + $this->error(L('common_unauthorized_access')); } - // 数据更新 - if(M('AlipayLifeMessage')->where(array('id'=>I('id')))->save(array('is_shelves'=>I('state')))) - { - $this->ajaxReturn(L('common_operation_edit_success')); - } else { - $this->ajaxReturn(L('common_operation_edit_error'), -100); - } + $ret = AlipayLifeService::MessageSubmit($_POST); + $this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']); } } ?> \ No newline at end of file diff --git a/service/Application/Admin/Controller/AlipayLifeUserController.class.php b/service/Application/Admin/Controller/AlipayLifeUserController.class.php index 68d712493..97edac6bb 100755 --- a/service/Application/Admin/Controller/AlipayLifeUserController.class.php +++ b/service/Application/Admin/Controller/AlipayLifeUserController.class.php @@ -59,7 +59,7 @@ class AlipayLifeUserController extends CommonController $page = new \Library\Page($page_param); // 获取列表 - $field = 'u.*, au.alipay_life_id, au.id AS alipay_life_user_id, au.user_id'; + $field = 'u.*, au.alipay_life_id, au.id AS alipay_life_user_id, au.user_id, au.add_time AS alipay_life_add_time'; $list = $this->SetDataHandle($m->alias('au')->where($where)->join('INNER JOIN __USER__ AS u ON u.id=au.user_id')->field($field)->limit($page->GetPageStarNumber(), $number)->order('au.id desc')->select()); // 性别 @@ -105,6 +105,9 @@ class AlipayLifeUserController extends CommonController // 注册时间 $v['add_time'] = date('Y-m-d H:i:s', $v['add_time']); + // 关注时间 + $v['alipay_life_add_time'] = date('Y-m-d H:i:s', $v['alipay_life_add_time']); + // 更新时间 $v['upd_time'] = date('Y-m-d H:i:s', $v['upd_time']); diff --git a/service/Application/Admin/Lang/zh-cn/alipaylifemessage.php b/service/Application/Admin/Lang/zh-cn/alipaylifemessage.php index 680368c6f..ffb8f00b4 100755 --- a/service/Application/Admin/Lang/zh-cn/alipaylifemessage.php +++ b/service/Application/Admin/Lang/zh-cn/alipaylifemessage.php @@ -48,5 +48,7 @@ return array( ), 'alipay_life_message_user_text' => '给用户发送消息', + 'alipay_life_message_startup_time_text' => '发送启动时间', + 'alipay_life_message_success_time_text' => '发送完成时间', ); ?> \ No newline at end of file diff --git a/service/Application/Admin/Lang/zh-cn/alipaylifeuser.php b/service/Application/Admin/Lang/zh-cn/alipaylifeuser.php index 910cb7fa7..e7b35009e 100755 --- a/service/Application/Admin/Lang/zh-cn/alipaylifeuser.php +++ b/service/Application/Admin/Lang/zh-cn/alipaylifeuser.php @@ -33,6 +33,7 @@ return array( 'alipay_life_user_city_name' => '所在市', 'alipay_life_user_alipay_life_name_text' => '所属生活号', + 'alipay_life_user_appid_text' => 'appid', 'alipay_life_user_send_text' => '发消息', ); ?> \ No newline at end of file diff --git a/service/Application/Admin/Model/AlipayLifeMessageModel.class.php b/service/Application/Admin/Model/AlipayLifeMessageModel.class.php index 216028363..0fae52a9a 100755 --- a/service/Application/Admin/Model/AlipayLifeMessageModel.class.php +++ b/service/Application/Admin/Model/AlipayLifeMessageModel.class.php @@ -12,16 +12,6 @@ use Think\Model; */ class AlipayLifeMessageModel extends CommonModel { - // 数据自动校验 - protected $_validate = array( - // 添加,编辑 - array('logo', '0,255', '{%alipay_life_logo_format}', 1, 'length', 3), - array('name', '2,30', '{%alipay_life_name_format}', 1, 'length', 3), - array('appid', '1,60', '{%alipay_life_appid_format}', 1, 'length', 3), - array('rsa_public', '1,2000', '{%alipay_life_rsa_public_format}', 1, 'length', 3), - array('rsa_private', '1,2000', '{%alipay_life_rsa_private_format}', 1, 'length', 3), - array('out_rsa_public', '1,2000', '{%alipay_life_out_rsa_public_format}', 1, 'length', 3), - array('alipay_life_category_id', 'require', '{%alipay_life_category_id_format}', 1, '', 3), - ); + } ?> \ No newline at end of file diff --git a/service/Application/Admin/View/Default/AlipayLife/Index.html b/service/Application/Admin/View/Default/AlipayLife/Index.html index d695d82a3..c59928bbd 100755 --- a/service/Application/Admin/View/Default/AlipayLife/Index.html +++ b/service/Application/Admin/View/Default/AlipayLife/Index.html @@ -83,7 +83,7 @@ - + diff --git a/service/Application/Admin/View/Default/AlipayLifeMessage/Index.html b/service/Application/Admin/View/Default/AlipayLifeMessage/Index.html index e54fa9e53..8800c1757 100755 --- a/service/Application/Admin/View/Default/AlipayLifeMessage/Index.html +++ b/service/Application/Admin/View/Default/AlipayLifeMessage/Index.html @@ -18,13 +18,19 @@ - + + + + + +
@@ -39,7 +45,7 @@
- {{:L('common_operation_add')}} + {{:L('common_operation_add')}}
@@ -47,15 +53,15 @@ - - - + + + - + @@ -63,10 +69,14 @@ - - - + + + - - + + - + - +
{{:L('alipay_life_message_life_text')}} {{:L('alipay_life_message_type_text')}}{{:L('alipay_life_message_title_text')}}{{:L('alipay_life_message_content_text')}}{{:L('alipay_life_message_send_type_text')}}{{:L('alipay_life_message_title_text')}}{{:L('alipay_life_message_content_text')}} {{:L('alipay_life_message_image_url_text')}} {{:L('alipay_life_message_url_text')}} {{:L('alipay_life_message_action_name_text')}} {{:L('common_view_status_title')}}{{:L('common_create_time_name')}}{{:L('common_more_name')}} {{:L('common_operation_name')}}
{{$v.alipay_life_name}} {{$v.type_name}}{{$v.title}}{{$v.content}}{{$v.send_type_name}} + {{:L('common_on_fill_in_the_text')}}{{$v.title}} + + {{:L('common_on_fill_in_the_text')}}{{$v.content}} + @@ -76,23 +86,85 @@ {{:L('common_on_fill_in_images')}} {{$v.url}}{{$v.action_name}} + {{:L('common_on_fill_in_the_text')}}{{$v.url}} + + {{:L('common_on_fill_in_the_text')}}{{$v.action_name}} + {{$v.status_name}}{{$v.add_time_text}} + {{:L('common_see_more_name')}} +
+
+
+

{{:L('common_detail_content')}}

+ × +
+
+
+
{{:L('alipay_life_message_type_text')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.type_name}}
+ +
{{:L('alipay_life_message_send_type_text')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.send_type_name}}
+ +
{{:L('alipay_life_message_title_text')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.title}}
+ +
{{:L('alipay_life_message_content_text')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.content}}
+ +
{{:L('alipay_life_message_category_text')}}
+
{{:L('common_on_fill_in_the_text')}}{{:implode(',', $v['category_all'])}}
+ +
{{:L('alipay_life_message_life_text')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.alipay_life_name}}
+ +
{{:L('alipay_life_message_image_url_text')}}
+
+ + + + {{:L('common_on_fill_in_images')}} + +
+ +
{{:L('alipay_life_message_url_text')}}
+
{{:L('common_not_set_text')}}{{$v.url}}
+ +
{{:L('alipay_life_message_action_name_text')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.action_name}}
+ +
{{:L('common_view_status_title')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.status_name}}
+ +
{{:L('alipay_life_message_startup_time_text')}}
+
{{$v.send_startup_time}}
+ +
{{:L('alipay_life_message_success_time_text')}}
+
{{$v.send_success_time}}
+ +
{{:L('common_create_time_name')}}
+
{{$v.add_time}}
+ +
{{:L('common_upd_time_name')}}
+
{{$v.upd_time}}
+
+
+
+
+
- - - - +
{{:L('common_not_data_tips')}}
{{:L('common_not_data_tips')}}
diff --git a/service/Application/Admin/View/Default/AlipayLifeMessage/Nav.html b/service/Application/Admin/View/Default/AlipayLifeMessage/Nav.html index a576c013b..feaf91458 100644 --- a/service/Application/Admin/View/Default/AlipayLifeMessage/Nav.html +++ b/service/Application/Admin/View/Default/AlipayLifeMessage/Nav.html @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/service/Application/Admin/View/Default/AlipayLifeMessage/SendInfo.html b/service/Application/Admin/View/Default/AlipayLifeMessage/SaveInfo.html similarity index 94% rename from service/Application/Admin/View/Default/AlipayLifeMessage/SendInfo.html rename to service/Application/Admin/View/Default/AlipayLifeMessage/SaveInfo.html index 3d78bc72a..7f67a21e8 100755 --- a/service/Application/Admin/View/Default/AlipayLifeMessage/SendInfo.html +++ b/service/Application/Admin/View/Default/AlipayLifeMessage/SaveInfo.html @@ -39,7 +39,7 @@
- disabled required> @@ -49,6 +49,7 @@
+
@@ -71,8 +72,8 @@ - - + +
diff --git a/service/Application/Admin/View/Default/AlipayLifeUser/Index.html b/service/Application/Admin/View/Default/AlipayLifeUser/Index.html index a2d41b62a..c01945c3c 100755 --- a/service/Application/Admin/View/Default/AlipayLifeUser/Index.html +++ b/service/Application/Admin/View/Default/AlipayLifeUser/Index.html @@ -38,6 +38,7 @@ {{:L('alipay_life_user_avatar_name')}} {{:L('alipay_life_user_username_name')}} + {{:L('alipay_life_user_appid_text')}} {{:L('common_mobile_name')}} {{:L('alipay_life_user_alipay_life_name_text')}} {{:L('common_view_gender_name')}} @@ -60,6 +61,9 @@ {{:L('common_on_fill_in_the_text')}}{{$v.username}} + + {{:L('common_on_fill_in_the_text')}}{{$v.alipay_openid}} + {{:L('common_on_fill_in_the_text')}}{{$v.mobile}} @@ -88,6 +92,9 @@
{{:L('alipay_life_user_nickname_name')}}
{{:L('common_on_fill_in_the_text')}}{{$v.nickname}}
+
{{:L('alipay_life_user_appid_text')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.alipay_openid}}
+
{{:L('common_mobile_name')}}
{{:L('common_on_fill_in_the_text')}}{{$v.mobile}}
@@ -121,6 +128,9 @@ +
{{:L('common_focus_time_name')}}
+
{{$v.alipay_life_add_time}}
+
{{:L('common_reg_time_name')}}
{{$v.add_time}}
@@ -132,7 +142,7 @@
- + diff --git a/service/Application/Api/Controller/AlipayLifeController.class.php b/service/Application/Api/Controller/AlipayLifeController.class.php index 05688d20b..ebadd2a2a 100644 --- a/service/Application/Api/Controller/AlipayLifeController.class.php +++ b/service/Application/Api/Controller/AlipayLifeController.class.php @@ -2,6 +2,8 @@ namespace Api\Controller; +use Service\AlipayLifeService; + /** * 支付宝生活号回调处理 * @author Devil @@ -62,5 +64,18 @@ class AlipayLifeController extends CommonController exit('service error'); } } + + /** + * 消息发送 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-10-24 + * @desc description + */ + public function Send() + { + AlipayLifeService::MessageSend($_REQUEST); + } } ?> \ No newline at end of file diff --git a/service/Application/Common/Common/function.php b/service/Application/Common/Common/function.php index 65d423461..f32f773ba 100755 --- a/service/Application/Common/Common/function.php +++ b/service/Application/Common/Common/function.php @@ -8,6 +8,32 @@ * @datetime 2016-12-01T21:51:08+0800 */ +/** + * 异步调用方法 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-06-11 + * @desc 异步运行url地址方法 + * @param [string] $url [url地址 支持get参数] + */ +function SyncJob($url) +{ + $url_str = str_replace(array('http://', 'https://'), '', $url); + $location = strpos($url_str, '/'); + $host = substr($url_str, 0, $location); + header("Content-Type: text/html; charset=utf-8"); + $fp = fsockopen($host, 80, $errno, $errstr, 3); + if($fp) + { + $out = "GET $url HTTP/1.1\r\n"; + $out .= "Host: $host\r\n"; + $out .= "Connection: Close\r\n\r\n"; + fputs($fp, $out); + fclose($fp); + } +} + /** * [DataReturn 公共返回数据] * @author Devil @@ -1266,6 +1292,7 @@ function params_checked($data, $params) if (!isset($data[$v['key_name']]) || !in_array($data[$v['key_name']], $v['checked_data'])) { return $v['error_msg']; } + break; case 'is_array' : if (!isset($data[$v['key_name']]) || !is_array($data[$v['key_name']])) { diff --git a/service/Application/Common/Lang/zh-cn.php b/service/Application/Common/Lang/zh-cn.php index fa3a5a07e..789b4b80b 100755 --- a/service/Application/Common/Lang/zh-cn.php +++ b/service/Application/Common/Lang/zh-cn.php @@ -43,6 +43,7 @@ return array( 'common_not_login_name' => '未登录', 'common_not_data_tips' => '没有相关数据', 'common_create_time_name' => '创建时间', + 'common_focus_time_name' => '关注时间', 'common_reg_time_name' => '注册时间', 'common_upd_time_name' => '更新时间', 'common_time_start_name' => '起始时间', @@ -64,6 +65,7 @@ return array( 'common_nav_type_name' => '导航数据类型', 'common_view_link_name' => '友情链接', 'common_site_maintenance_tips' => '网站维护中...', + 'common_send_text' => '发送', 'common_send_tips' => '发送中...', 'common_send_success' => '发送成功', 'common_send_error' => '发送失败', diff --git a/service/Application/Library/AlipayLife.class.php b/service/Application/Library/AlipayLife.class.php index 85dc2ddbd..9c6911e47 100644 --- a/service/Application/Library/AlipayLife.class.php +++ b/service/Application/Library/AlipayLife.class.php @@ -35,12 +35,13 @@ class AlipayLife { $this->params = $params; $this->xml_data = isset($params['biz_content']) ? $this->XmlToArray($params['biz_content']) : ''; - $this->life_data = isset($this->xml_data['AppId']) ? AlipayLifeService::AppidLifeRow(['appid'=>$this->xml_data['AppId']]) : ''; - - // 当前生活号是否存在 - if(empty($this->life_data)) + + // 生活号 + if(!empty($params['life_data'])) { - die('life error'); + $this->life_data = $params['life_data']; + } else { + $this->life_data = isset($this->xml_data['AppId']) ? AlipayLifeService::AppidLifeRow(['appid'=>$this->xml_data['AppId']]) : ''; } } @@ -57,7 +58,7 @@ class AlipayLife { $res = "-----BEGIN RSA PRIVATE KEY-----\n"; $res .= wordwrap($this->life_data['rsa_private'], 64, "\n", true); - $res .= "\nEND RSA PRIVATE KEY-----"; + $res .= "\n-----END RSA PRIVATE KEY-----"; return openssl_sign($prestr, $sign, $res, OPENSSL_ALGO_SHA256) ? base64_encode($sign) : null; } @@ -143,16 +144,16 @@ class AlipayLife */ public function ArrayToUrlString($data) { - $ur_lstring = ''; + $url_string = ''; ksort($data); foreach($data AS $key=>$val) { if(!in_array($key, ['sign'])) { - $ur_lstring .= "$key=$val&"; + $url_string .= "$key=$val&"; } } - return substr($ur_lstring, 0, -1); + return substr($url_string, 0, -1); } /** @@ -183,6 +184,51 @@ class AlipayLife die($return_xml); } + /** + * [HttpRequest 网络请求] + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @datetime 2017-09-25T09:10:46+0800 + * @param [string] $url [请求url] + * @param [array] $data [发送数据] + * @return [mixed] [请求返回数据] + */ + private function HttpRequest($url, $data) + { + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_FAILONERROR, false); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + + $body_string = ''; + if(is_array($data) && 0 < count($data)) + { + foreach($data as $k => $v) + { + $body_string .= $k.'='.urlencode($v).'&'; + } + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $body_string); + } + $headers = array('content-type: application/x-www-form-urlencoded;charset=UTF-8'); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + $reponse = curl_exec($ch); + if(curl_errno($ch)) + { + return false; + } else { + $httpStatusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + if(200 !== $httpStatusCode) + { + return false; + } + } + curl_close($ch); + return json_decode($reponse, true); + } + /** * 校验 * @author Devil @@ -193,6 +239,13 @@ class AlipayLife */ public function Check() { + // 当前生活号是否存在 + if(empty($this->life_data)) + { + die('life error'); + } + + // 开始处理 $status = $this->OutRsaVerify($this->ArrayToUrlString($this->params), $this->params['sign']); $this->Respond($status); } @@ -206,6 +259,13 @@ class AlipayLife */ public function Life() { + // 当前生活号是否存在 + if(empty($this->life_data)) + { + die('life error'); + } + + // 开始处理 $status = false; if($this->OutRsaVerify($this->ArrayToUrlString($this->params), $this->params['sign'])) { @@ -234,5 +294,101 @@ class AlipayLife $this->Respond($status); } + /** + * 单条消息发送 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-10-24 + * @desc description + * @param [array] $data [输入参数] + */ + public function CustomSend($params = []) + { + // 参数处理 + $p = $this->RequestCommonParams(); + $p['method'] = 'alipay.open.public.message.custom.send'; + $biz_content = [ + 'to_user_id' => $params['alipay_openid'], + 'msg_type' => ($params['msg_type'] == 0) ? 'text' : 'image-text', + 'chat' => 0, + ]; + if($params['msg_type'] == 1) + { + $biz_content['articles'] = [ + 'title' => isset($params['title']) ? $params['title'] : '', + 'desc' => $params['content'], + 'image_url' => $params['out_image_url'], + 'url' => $params['url'], + 'action_name' => isset($params['action_name']) ? $params['action_name'] : '', + ]; + } else { + $biz_content['text'] = ['content'=>$params['content']]; + } + $p['biz_content'] = json_encode($biz_content, JSON_UNESCAPED_UNICODE); + + // 生成签名 + $p['sign'] = $this->MyRsaSign($this->ArrayToUrlString($p)); + + $result = $this->HttpRequest('https://openapi.alipay.com/gateway.do', $p); + + + + print_r($result); + echo "\n\n"; + print_r($p); + die; + + } + + /** + * [GetParamSign 生成参数和签名] + * @param [array] $data [待生成的参数] + * @param [array] $config [配置信息] + * @return [array] [生成好的参数和签名] + */ + private function GetParamSign($data, $config = []) + { + $param = ''; + $sign = ''; + ksort($data); + + foreach($data AS $key => $val) + { + $param .= "$key=" .urlencode($val). "&"; + $sign .= "$key=$val&"; + } + + $result = array( + 'param' => substr($param, 0, -1), + 'value' => substr($sign, 0, -1), + ); + if(!empty($config['key'])) + { + $result['sign'] = $result['value'].$config['key']; + } + return $result; + } + + /** + * 获取公共参数 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-10-24 + * @desc description + */ + private function RequestCommonParams() + { + return [ + 'app_id' => $this->life_data['appid'], + 'format' => 'JSON', + 'charset' => 'utf-8', + 'sign_type' => 'RSA2', + 'timestamp' => date('Y-m-d H:i:s'), + 'version' => '1.0', + ]; + } + } ?> \ No newline at end of file diff --git a/service/Application/Runtime/Temp/8cde93cbd070139d84f31d26f8ea8f4d.php b/service/Application/Runtime/Temp/8cde93cbd070139d84f31d26f8ea8f4d.php index 73bb9eefb..a908931fa 100644 --- a/service/Application/Runtime/Temp/8cde93cbd070139d84f31d26f8ea8f4d.php +++ b/service/Application/Runtime/Temp/8cde93cbd070139d84f31d26f8ea8f4d.php @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/service/Application/Runtime/Temp/a58f8070835be94249ea77f3601c6647.php b/service/Application/Runtime/Temp/a58f8070835be94249ea77f3601c6647.php index b35566a46..863cdab25 100644 --- a/service/Application/Runtime/Temp/a58f8070835be94249ea77f3601c6647.php +++ b/service/Application/Runtime/Temp/a58f8070835be94249ea77f3601c6647.php @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/service/Application/Service/AlipayLifeService.class.php b/service/Application/Service/AlipayLifeService.class.php index 77cd3b1e4..849519b8e 100644 --- a/service/Application/Service/AlipayLifeService.class.php +++ b/service/Application/Service/AlipayLifeService.class.php @@ -11,6 +11,151 @@ namespace Service; */ class AlipayLifeService { + /** + * 消息添加 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-10-24 + * @desc description + * @param [array] $params [输入参数] + */ + public static function MessageAdd($params = []) + { + // 参数校验 + $ret = self::MessageAddCheck($params); + if($ret['code'] != 0) + { + return $ret; + } + + // 开始处理业务 + $data = [ + 'user_id' => isset($params['user_id']) ? intval($params['user_id']) : 0, + 'alipay_life_user_id' => isset($params['alipay_life_user_id']) ? intval($params['alipay_life_user_id']) : 0, + 'alipay_life_id' => empty($params['alipay_life_id']) ? 0 : intval($params['alipay_life_id']), + 'alipay_life_category_id' => empty($params['alipay_life_category_id']) ? '' : json_encode(explode(',', $params['alipay_life_category_id'])), + 'type' => intval($params['type']), + 'send_type' => intval($params['send_type']), + 'status' => 0, + 'title' => I('title', '', null, $params), + 'content' => I('content', '', null, $params), + 'url' => I('url', '', null, $params), + 'action_name' => I('action_name', '', null, $params), + 'add_time' => time(), + ]; + if(M('AlipayLifeMessage')->add($data)) + { + return DataReturn(L('common_operation_add_success'), 0); + } + return DataReturn(L('common_operation_add_error'), -100); + } + + /** + * 消息添加参数校验 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-10-24 + * @desc description + * @param [array] $params [输入参数] + */ + public static function MessageAddCheck($params = []) + { + // 基础参数 + $p = [ + [ + 'checked_type' => 'in', + 'key_name' => 'type', + 'checked_data' => [0,1], + 'error_msg' => '消息类型有误', + ], + [ + 'checked_type' => 'in', + 'key_name' => 'send_type', + 'checked_data' => [0,1], + 'error_msg' => '发送类型有误', + ], + [ + 'checked_type' => 'empty', + 'key_name' => 'content', + 'error_msg' => '消息内容有误', + ], + ]; + $ret = params_checked($params, $p); + if($ret !== true) + { + return DataReturn($ret, -1); + } + + // 发送类型 + $p = []; + switch($params['send_type']) + { + // 单条 + case 0 : + $p[] = [ + 'checked_type' => 'empty', + 'key_name' => 'user_id', + 'error_msg' => '指定用户id有误', + ]; + $p[] = [ + 'checked_type' => 'empty', + 'key_name' => 'alipay_life_user_id', + 'error_msg' => '指定生活号用户id有误', + ]; + break; + + // 批量 + case 1 : + if(empty($params['alipay_life_category_id']) && empty($params['alipay_life_id'])) + { + return DataReturn('批量id有误', -1); + } + break; + + } + + // 图文 + if($params['type'] == 1) + { + // 图片项 + if(empty($_FILES['file_image_url'])) + { + return DataReturn('请上传封面图片', -1); + } + + // 文本项 + $p[] = [ + 'checked_type' => 'isset', + 'key_name' => 'title', + 'error_msg' => '消息标题有误', + ]; + $p[] = [ + 'checked_type' => 'empty', + 'key_name' => 'url', + 'error_msg' => '图文url跳转地址有误', + ]; + $p[] = [ + 'checked_type' => 'isset', + 'key_name' => 'action_name', + 'error_msg' => '链接文字有误', + ]; + } + + // 验证 + if(!empty($p)) + { + $ret = params_checked($params, $p); + if($ret !== true) + { + return DataReturn($ret, -1); + } + } + + return DataReturn('验证成功', 0); + } + /** * 根据appid获取一条生活号事件 * @author Devil @@ -98,5 +243,217 @@ class AlipayLifeService } return false; } + + /** + * 消息发送 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-10-24 + * @desc description + * @param [array] $params [输入参数] + */ + public static function MessageSubmit($params = []) + { + // 基础参数 + $p = [ + [ + 'checked_type' => 'empty', + 'key_name' => 'id', + 'error_msg' => '消息id有误', + ], + ]; + $ret = params_checked($params, $p); + if($ret !== true) + { + return DataReturn($ret, -1); + } + + // 获取消息 + $m = M('AlipayLifeMessage'); + $message = $m->find(intval($params['id'])); + if(empty($message)) + { + return DataReturn('消息纪录不存在', -1); + } + $common_send_status_list = L('common_send_status_list'); + if($message['status'] != 0) + { + return DataReturn('状态不可操作['.$common_send_status_list[$message['status']]['name'].']', -2); + } + + // 发送类型 + $user = []; + if($message['send_type'] == 1) + { + if(!empty($message['alipay_life_category_id'])) + { + $category_all = json_decode($message['alipay_life_category_id'], true); + $alipay_life_all = M('AlipayLifeCategoryJoin')->where(['alipay_life_category_id'=>['in', $category_all]])->group('alipay_life_id')->getField('alipay_life_id', true); + } else { + $alipay_life_all = [$message['alipay_life_id']]; + } + foreach($alipay_life_all as $alipay_life_id) + { + $temp_user = M('AlipayLifeUser')->where(['alipay_life_id'=>$alipay_life_id])->select(); + if(!empty($temp_user)) + { + foreach($temp_user as $u) + { + $alipay_openid = M('User')->where(['id'=>$u['user_id']])->getField('alipay_openid'); + if(!empty($alipay_openid)) + { + $user[] = [ + 'user_id' => $u['user_id'], + 'alipay_life_id' => $u['alipay_life_id'], + 'alipay_life_user_id' => $u['id'], + 'alipay_openid' => $alipay_openid, + 'alipay_life_message_id'=> $message['id'], + ]; + } + } + } + } + } else { + $alipay_openid = M('User')->where(['id'=>$message['user_id']])->getField('alipay_openid'); + if(!empty($alipay_openid)) + { + $user[] = [ + 'user_id' => $message['user_id'], + 'alipay_life_id' => M('AlipayLifeUser')->where(['id'=>$message['alipay_life_user_id']])->getField('alipay_life_id'), + 'alipay_life_user_id' => $message['alipay_life_user_id'], + 'alipay_openid' => $alipay_openid, + 'alipay_life_message_id'=> $message['id'], + ]; + } + + } + + // 入库详情表 + $m->startTrans(); + if(M('AlipayLifeMessageDetail')->addAll($user) !== false) + { + if($m->where(['id'=>$message['id']])->save(['status'=>1, 'send_startup_time'=>time(), 'upd_time'=>time()]) !== false) + { + self::SyncJobSend($message['id']); + $m->commit(); + return DataReturn(L('common_submit_success'), 0); + } + } + $m->rollback(); + return DataReturn(L('common_submit_error'), -100); + } + + /** + * 消息异步发送触发 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-10-24 + * @desc description + * @param [type] $message_id [description] + */ + public static function SyncJobSend($message_id) + { + SyncJob(U('Api/AlipayLife/Send', ['message_id'=>$message_id], true, true)); + } + + /** + * 消息发送 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-10-24 + * @desc description + * @param [array] $params [输入参数] + */ + public static function MessageSend($params = []) + { + if(empty($params['message_id'])) + { + die('[params_time:'.date('Y-m-d H:i:s'))."][msg:id有误]\n\n"; + } + + // 启动开始 + echo '[start_time:'.date('Y-m-d H:i:s')."]\n"; + echo '[message:'.$params['message_id']."]\n"; + + // 开始处理 + $m = M('AlipayLifeMessage'); + $message = $m->find($params['message_id']); + if(empty($message)) + { + die('[time:'.date('Y-m-d H:i:s'))."][msg:{$params['message_id']}数据不存在]\n\n"; + } + if(!in_array($message['sttaus'], [0,1])) + { + die('[time:'.date('Y-m-d H:i:s'))."][msg:{$message['status']}状态不可操作]\n\n"; + } + + // 消息类型 + if($message['send_type'] == 1) + { + if(!empty($message['alipay_life_category_id'])) + { + $category_all = json_decode($message['alipay_life_category_id'], true); + $alipay_life_all = M('AlipayLifeCategoryJoin')->where(['alipay_life_category_id'=>['in', $category_all]])->group('alipay_life_id')->getField('alipay_life_id', true); + } else { + $alipay_life_all = [$message['alipay_life_id']]; + } + } else { + $alipay_life_all = [M('AlipayLifeUser')->where(['id'=>$message['alipay_life_user_id']])->getField('alipay_life_id')]; + } + + // 生活号循环处理 + foreach($alipay_life_all as $alipay_life_id) + { + // 生活号 + $life = M('AlipayLife')->find($alipay_life_id); + + // 群发发 + if($message['send_type'] == 1) + { + die('all'); + // 单个消息发送 + } else { + $detail_m = M('AlipayLifeMessageDetail'); + $detail = $detail_m->where(['alipay_life_message_id'=>$message['id'], 'status'=>0])->limit(100)->select(); + if(!empty($detail)) + { + $obj = new \Library\AlipayLife(['life_data'=>$life]); + foreach($detail as $v) + { + $message['alipay_openid'] = $v['alipay_openid']; + $obj->CustomSend($message); + //print_r($message); + die; + } + } else { + $m->where(['id'=>$message['id']])->save(['send_success_time'=>time(), 'status'=>2]); + echo '[success_time:'.date('Y-m-d H:i:s')."]\n"; + echo '[message:'.$params['message_id']."]\n\n"; + } + } + } + die('end'); + + // 获取详情处理发送消息 + // $detail_m = M('AlipayLifeMessageDetail'); + // $detail = $detail_m->where(['alipay_life_message_id'=>$message['id'], 'status'=>0])->limit(100)->select(); + // if(!empty($detail)) + // { + // $obj = new \Library\AlipayLife($params); + // foreach($detail as $v) + // { + // $obj->CustomSend($message); + // print_r($message); + // die; + // } + // } else { + // $m->where(['id'=>$message['id']])->save(['send_success_time'=>time(), 'status'=>2]); + // echo '[success_time:'.date('Y-m-d H:i:s')."]\n"; + // echo '[message:'.$params['message_id']."]\n\n"; + // } + } } ?> \ No newline at end of file diff --git a/service/gggggg.txt b/service/gggggg.txt deleted file mode 100644 index 0637a088a..000000000 --- a/service/gggggg.txt +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/service/pppppp.txt b/service/pppppp.txt deleted file mode 100644 index 0637a088a..000000000 --- a/service/pppppp.txt +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/shopxo.sql b/shopxo.sql index 223109481..fed2b0458 100644 --- a/shopxo.sql +++ b/shopxo.sql @@ -11,7 +11,7 @@ Target Server Version : 50722 File Encoding : utf-8 - Date: 10/23/2018 18:30:48 PM + Date: 10/24/2018 18:32:26 PM */ SET NAMES utf8mb4; @@ -66,7 +66,7 @@ CREATE TABLE `s_alipay_life` ( -- Records of `s_alipay_life` -- ---------------------------- BEGIN; -INSERT INTO `s_alipay_life` VALUES ('92', '', '美啦网', '2015070400156153', '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', '1', '1536649903', '1540260131'); +INSERT INTO `s_alipay_life` VALUES ('92', '', '美啦网', '2015070400156153', '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', '1', '1536649903', '1540376649'); COMMIT; -- ---------------------------- @@ -104,13 +104,13 @@ CREATE TABLE `s_alipay_life_category_join` ( `add_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', PRIMARY KEY (`id`), KEY `alipay_life_id` (`alipay_life_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='生活号于分类关联'; +) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='生活号于分类关联'; -- ---------------------------- -- Records of `s_alipay_life_category_join` -- ---------------------------- BEGIN; -INSERT INTO `s_alipay_life_category_join` VALUES ('1', '92', '7', '1540188540'), ('2', '92', '17', '1540188540'), ('3', '92', '24', '1540188540'), ('4', '92', '7', '1540188569'), ('5', '92', '17', '1540188569'), ('6', '92', '24', '1540188569'), ('7', '92', '7', '1540188857'), ('8', '92', '17', '1540188857'), ('9', '92', '24', '1540188857'), ('10', '92', '7', '1540190753'), ('11', '92', '10', '1540190753'), ('12', '92', '16', '1540190753'), ('13', '92', '17', '1540190753'), ('14', '92', '18', '1540190753'), ('15', '92', '24', '1540190753'), ('16', '92', '25', '1540190753'), ('17', '92', '26', '1540190753'), ('18', '92', '27', '1540190753'), ('19', '92', '28', '1540190753'), ('20', '92', '7', '1540191357'), ('21', '92', '10', '1540191357'), ('22', '92', '16', '1540191357'), ('23', '92', '17', '1540191357'), ('24', '92', '18', '1540191357'), ('25', '92', '24', '1540191357'), ('26', '92', '25', '1540191357'), ('27', '92', '26', '1540191357'), ('28', '92', '27', '1540191357'), ('29', '92', '28', '1540191357'), ('30', '92', '7', '1540191991'), ('31', '92', '10', '1540191991'), ('32', '92', '16', '1540191991'), ('33', '92', '17', '1540191991'), ('34', '92', '18', '1540191991'), ('35', '92', '24', '1540191991'), ('36', '92', '25', '1540191991'), ('37', '92', '26', '1540191991'), ('38', '92', '27', '1540191991'), ('39', '92', '28', '1540191991'), ('40', '92', '7', '1540191999'), ('41', '92', '10', '1540191999'), ('42', '92', '16', '1540191999'), ('43', '92', '17', '1540191999'), ('44', '92', '18', '1540191999'), ('45', '92', '24', '1540191999'), ('46', '92', '25', '1540191999'), ('47', '92', '26', '1540191999'), ('48', '92', '27', '1540191999'), ('49', '92', '28', '1540191999'), ('50', '92', '7', '1540192004'), ('51', '92', '10', '1540192004'), ('52', '92', '16', '1540192004'), ('53', '92', '17', '1540192004'), ('54', '92', '18', '1540192004'), ('55', '92', '24', '1540192004'), ('56', '92', '25', '1540192004'), ('57', '92', '26', '1540192004'), ('58', '92', '27', '1540192004'), ('59', '92', '28', '1540192004'), ('60', '92', '7', '1540198507'), ('61', '92', '10', '1540198507'), ('62', '92', '16', '1540198507'), ('63', '92', '17', '1540198507'), ('64', '92', '18', '1540198507'), ('65', '92', '24', '1540198507'), ('66', '92', '25', '1540198507'), ('67', '92', '26', '1540198507'), ('68', '92', '27', '1540198507'), ('69', '92', '28', '1540198507'), ('70', '92', '7', '1540199839'), ('71', '92', '10', '1540199839'), ('72', '92', '16', '1540199839'), ('73', '92', '17', '1540199839'), ('74', '92', '18', '1540199839'), ('75', '92', '24', '1540199839'), ('76', '92', '25', '1540199839'), ('77', '92', '26', '1540199839'), ('78', '92', '27', '1540199839'), ('79', '92', '28', '1540199839'), ('80', '92', '7', '1540200138'), ('81', '92', '10', '1540200138'), ('82', '92', '16', '1540200138'), ('83', '92', '17', '1540200138'), ('84', '92', '18', '1540200138'), ('85', '92', '24', '1540200138'), ('86', '92', '25', '1540200138'), ('87', '92', '26', '1540200138'), ('88', '92', '27', '1540200138'), ('89', '92', '28', '1540200138'), ('90', '92', '7', '1540260131'), ('91', '92', '10', '1540260131'), ('92', '92', '16', '1540260131'), ('93', '92', '17', '1540260131'), ('94', '92', '18', '1540260131'), ('95', '92', '24', '1540260131'), ('96', '92', '25', '1540260131'), ('97', '92', '26', '1540260131'), ('98', '92', '27', '1540260131'), ('99', '92', '28', '1540260131'); +INSERT INTO `s_alipay_life_category_join` VALUES ('1', '92', '7', '1540188540'), ('2', '92', '17', '1540188540'), ('3', '92', '24', '1540188540'), ('4', '92', '7', '1540188569'), ('5', '92', '17', '1540188569'), ('6', '92', '24', '1540188569'), ('7', '92', '7', '1540188857'), ('8', '92', '17', '1540188857'), ('9', '92', '24', '1540188857'), ('10', '92', '7', '1540190753'), ('11', '92', '10', '1540190753'), ('12', '92', '16', '1540190753'), ('13', '92', '17', '1540190753'), ('14', '92', '18', '1540190753'), ('15', '92', '24', '1540190753'), ('16', '92', '25', '1540190753'), ('17', '92', '26', '1540190753'), ('18', '92', '27', '1540190753'), ('19', '92', '28', '1540190753'), ('20', '92', '7', '1540191357'), ('21', '92', '10', '1540191357'), ('22', '92', '16', '1540191357'), ('23', '92', '17', '1540191357'), ('24', '92', '18', '1540191357'), ('25', '92', '24', '1540191357'), ('26', '92', '25', '1540191357'), ('27', '92', '26', '1540191357'), ('28', '92', '27', '1540191357'), ('29', '92', '28', '1540191357'), ('30', '92', '7', '1540191991'), ('31', '92', '10', '1540191991'), ('32', '92', '16', '1540191991'), ('33', '92', '17', '1540191991'), ('34', '92', '18', '1540191991'), ('35', '92', '24', '1540191991'), ('36', '92', '25', '1540191991'), ('37', '92', '26', '1540191991'), ('38', '92', '27', '1540191991'), ('39', '92', '28', '1540191991'), ('40', '92', '7', '1540191999'), ('41', '92', '10', '1540191999'), ('42', '92', '16', '1540191999'), ('43', '92', '17', '1540191999'), ('44', '92', '18', '1540191999'), ('45', '92', '24', '1540191999'), ('46', '92', '25', '1540191999'), ('47', '92', '26', '1540191999'), ('48', '92', '27', '1540191999'), ('49', '92', '28', '1540191999'), ('50', '92', '7', '1540192004'), ('51', '92', '10', '1540192004'), ('52', '92', '16', '1540192004'), ('53', '92', '17', '1540192004'), ('54', '92', '18', '1540192004'), ('55', '92', '24', '1540192004'), ('56', '92', '25', '1540192004'), ('57', '92', '26', '1540192004'), ('58', '92', '27', '1540192004'), ('59', '92', '28', '1540192004'), ('60', '92', '7', '1540198507'), ('61', '92', '10', '1540198507'), ('62', '92', '16', '1540198507'), ('63', '92', '17', '1540198507'), ('64', '92', '18', '1540198507'), ('65', '92', '24', '1540198507'), ('66', '92', '25', '1540198507'), ('67', '92', '26', '1540198507'), ('68', '92', '27', '1540198507'), ('69', '92', '28', '1540198507'), ('70', '92', '7', '1540199839'), ('71', '92', '10', '1540199839'), ('72', '92', '16', '1540199839'), ('73', '92', '17', '1540199839'), ('74', '92', '18', '1540199839'), ('75', '92', '24', '1540199839'), ('76', '92', '25', '1540199839'), ('77', '92', '26', '1540199839'), ('78', '92', '27', '1540199839'), ('79', '92', '28', '1540199839'), ('80', '92', '7', '1540200138'), ('81', '92', '10', '1540200138'), ('82', '92', '16', '1540200138'), ('83', '92', '17', '1540200138'), ('84', '92', '18', '1540200138'), ('85', '92', '24', '1540200138'), ('86', '92', '25', '1540200138'), ('87', '92', '26', '1540200138'), ('88', '92', '27', '1540200138'), ('89', '92', '28', '1540200138'), ('90', '92', '7', '1540260131'), ('91', '92', '10', '1540260131'), ('93', '92', '17', '1540260131'), ('94', '92', '18', '1540260131'), ('95', '92', '24', '1540260131'), ('96', '92', '25', '1540260131'), ('97', '92', '26', '1540260131'), ('98', '92', '27', '1540260131'), ('99', '92', '28', '1540260131'), ('100', '92', '7', '1540376649'), ('101', '92', '10', '1540376649'), ('102', '92', '16', '1540376649'), ('103', '92', '17', '1540376649'), ('104', '92', '18', '1540376649'), ('105', '92', '24', '1540376649'), ('106', '92', '25', '1540376649'), ('107', '92', '26', '1540376649'), ('108', '92', '27', '1540376649'), ('109', '92', '28', '1540376649'); COMMIT; -- ---------------------------- @@ -119,22 +119,33 @@ COMMIT; DROP TABLE IF EXISTS `s_alipay_life_message`; CREATE TABLE `s_alipay_life_message` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id(单条)', + `alipay_life_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '生活号用户id(单条)', `alipay_life_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '生活号id', - `alipay_life_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '生活号用户id', + `alipay_life_category_id` char(255) NOT NULL DEFAULT '' COMMENT '生活号分类id(多个以一维数组转json存储)', `type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '消息类型(0文本, 1图文)', `send_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '发送类型(0单条, 1批量)', `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态(0未发送, 1发送中, 2发送成功, 3发送失败)由详情表发送总状态更新', `title` char(180) NOT NULL DEFAULT '' COMMENT '标题', `content` char(255) NOT NULL DEFAULT '' COMMENT '内容', - `image_url` char(255) NOT NULL DEFAULT '' COMMENT '图片地址(支付宝url地址)', + `image_url` char(255) NOT NULL DEFAULT '' COMMENT '图片地址(当前系统url地址)', + `out_image_url` char(255) NOT NULL DEFAULT '' COMMENT '图片地址(支付宝url地址)', `url` char(255) NOT NULL DEFAULT '' COMMENT '图文url跳转地址', `action_name` char(60) NOT NULL DEFAULT '' COMMENT '链接文字', + `send_startup_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发送启动时间', + `send_success_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发送完成时间', `add_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', `upd_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', PRIMARY KEY (`id`), KEY `is_shelves` (`status`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='支付宝生活号消息'; +) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='支付宝生活号消息'; + +-- ---------------------------- +-- Records of `s_alipay_life_message` +-- ---------------------------- +BEGIN; +INSERT INTO `s_alipay_life_message` VALUES ('94', '0', '0', '0', '[\"7\",\"10\",\"18\"]', '0', '1', '1', '', '测试内容', '', '', '', '', '1540364930', '0', '1540359655', '0'), ('95', '77', '2', '0', '', '0', '0', '1', '', '给用户发消息', '', '', '', '', '1540366824', '0', '1540359858', '1540366824'), ('97', '0', '0', '92', '', '0', '1', '1', '', '给生活号发消息2', '', '', '', '', '1540367046', '0', '1540360877', '1540367046'); +COMMIT; -- ---------------------------- -- Table structure for `s_alipay_life_message_detail` @@ -146,13 +157,21 @@ CREATE TABLE `s_alipay_life_message_detail` ( `alipay_life_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '生活号id', `alipay_life_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '生活号用户id', `alipay_life_message_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '生活号消息id', + `alipay_openid` char(60) NOT NULL DEFAULT '' COMMENT 'openid', `send_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发送时间', `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态(0未发送, 1发送中, 2发送成功, 3发送失败)', `add_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', `upd_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', PRIMARY KEY (`id`), KEY `is_shelves` (`status`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='支付宝生活号消息详情'; +) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='支付宝生活号消息详情'; + +-- ---------------------------- +-- Records of `s_alipay_life_message_detail` +-- ---------------------------- +BEGIN; +INSERT INTO `s_alipay_life_message_detail` VALUES ('3', '77', '92', '2', '94', '2088502175420842', '0', '0', '0', '0'), ('4', '90', '92', '3', '94', '2088502175420666', '0', '0', '0', '0'), ('5', '77', '92', '2', '95', '2088502175420842', '0', '0', '0', '0'), ('12', '77', '92', '2', '97', '2088502175420842', '0', '0', '0', '0'), ('13', '90', '92', '3', '97', '2088502175420666', '0', '0', '0', '0'); +COMMIT; -- ---------------------------- -- Table structure for `s_alipay_life_user` @@ -168,13 +187,13 @@ CREATE TABLE `s_alipay_life_user` ( PRIMARY KEY (`id`), KEY `alipay_life_id` (`alipay_life_id`), KEY `user_id` (`user_id`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户'; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户'; -- ---------------------------- -- Records of `s_alipay_life_user` -- ---------------------------- BEGIN; -INSERT INTO `s_alipay_life_user` VALUES ('2', '92', '77', '1', '1540260288', '1540260295'); +INSERT INTO `s_alipay_life_user` VALUES ('2', '92', '77', '1', '1540260288', '1540260295'), ('3', '92', '90', '1', '0', '0'); COMMIT; -- ---------------------------- @@ -978,13 +997,13 @@ CREATE TABLE `s_power` ( `icon` char(60) NOT NULL DEFAULT '' COMMENT '图标class', `add_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=285 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='权限'; +) ENGINE=InnoDB AUTO_INCREMENT=286 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='权限'; -- ---------------------------- -- Records of `s_power` -- ---------------------------- BEGIN; -INSERT INTO `s_power` VALUES ('1', '0', '权限控制', 'Power', 'Index', '2', '1', 'am-icon-recycle', '1481612301'), ('4', '1', '角色管理', 'Power', 'Role', '11', '1', '', '1481639037'), ('13', '1', '权限分配', 'Power', 'Index', '21', '1', '', '1482156143'), ('15', '1', '权限添加/编辑', 'Power', 'PowerSave', '22', '0', '', '1482243750'), ('16', '1', '权限删除', 'Power', 'PowerDelete', '23', '0', '', '1482243797'), ('17', '1', '角色组添加/编辑页面', 'Power', 'RoleSaveInfo', '12', '0', '', '1482243855'), ('18', '1', '角色组添加/编辑', 'Power', 'RoleSave', '13', '0', '', '1482243888'), ('19', '1', '管理员添加/编辑页面', 'Admin', 'SaveInfo', '2', '0', '', '1482244637'), ('20', '1', '管理员添加/编辑', 'Admin', 'Save', '3', '0', '', '1482244666'), ('21', '1', '管理员删除', 'Admin', 'Delete', '4', '0', '', '1482244688'), ('22', '1', '管理员列表', 'Admin', 'Index', '1', '1', '', '1482568868'), ('23', '1', '角色删除', 'Power', 'RoleDelete', '14', '0', '', '1482569155'), ('38', '0', '商品管理', 'Goods', 'Index', '3', '1', 'am-icon-legal', '1483283430'), ('39', '38', '商品管理', 'Goods', 'Index', '1', '1', '', '1483283546'), ('41', '0', '后台配置', 'Config', 'Index', '0', '1', 'am-icon-gear', '1483362358'), ('42', '41', '配置保存', 'Config', 'Save', '1', '0', '', '1483432335'), ('57', '38', '商品添加/编辑页面', 'Goods', 'SaveInfo', '2', '0', '', '1483616439'), ('58', '38', '商品添加/编辑', 'Goods', 'Save', '3', '0', '', '1483616492'), ('59', '38', '商品删除', 'Goods', 'Delete', '4', '0', '', '1483616569'), ('81', '0', '站点配置', 'Site', 'Index', '1', '1', 'am-icon-cogs', '1486182943'), ('103', '81', '站点设置', 'Site', 'Index', '0', '1', '', '1486561470'), ('104', '81', '短信设置', 'Sms', 'Index', '10', '1', '', '1486561615'), ('105', '81', '站点设置编辑', 'Site', 'Save', '1', '0', '', '1486561780'), ('107', '81', '短信设置编辑', 'Sms', 'Save', '11', '0', '', '1486562011'), ('118', '0', '工具', 'Tool', 'Index', '30', '1', 'am-icon-coffee', '1488108044'), ('119', '118', '缓存管理', 'Cache', 'Index', '1', '1', '', '1488108107'), ('120', '118', '站点缓存更新', 'Cache', 'SiteUpdate', '2', '0', '', '1488108235'), ('121', '118', '模板缓存更新', 'Cache', 'TemplateUpdate', '2', '0', '', '1488108390'), ('122', '118', '模块缓存更新', 'Cache', 'ModuleUpdate', '3', '0', '', '1488108436'), ('126', '0', '用户管理', 'User', 'Index', '2', '1', 'am-icon-user', '1490794162'), ('127', '126', '用户列表', 'User', 'Index', '0', '1', '', '1490794316'), ('128', '126', '用户编辑/添加页面', 'User', 'SaveInfo', '1', '0', '', '1490794458'), ('129', '126', '用户添加/编辑', 'User', 'Save', '2', '0', '', '1490794510'), ('130', '126', '用户删除', 'User', 'Delete', '3', '0', '', '1490794585'), ('146', '126', 'Excel导出', 'User', 'ExcelExport', '6', '0', '', '1522223773'), ('152', '0', '资源管理', 'Resources', 'Index', '29', '1', 'am-icon-yelp', '1526304409'), ('153', '152', '地区管理', 'Region', 'Index', '0', '1', '', '1526304473'), ('154', '152', '地区添加/编辑', 'Region', 'Save', '1', '0', '', '1526304503'), ('155', '152', '地区删除', 'Region', 'Delete', '2', '0', '', '1526304531'), ('156', '152', '快递管理', 'Express', 'Index', '10', '1', '', '1526304473'), ('157', '152', '快递添加/编辑', 'Express', 'Save', '11', '0', '', '1526304473'), ('158', '152', '快递删除', 'Express', 'Delete', '12', '0', '', '1526304473'), ('162', '0', '营销管理', 'Marketing', 'Index', '27', '1', 'am-icon-codepen', '1527042204'), ('163', '162', '优惠券管理', 'Coupon', 'Index', '0', '1', '', '1527042261'), ('164', '162', '优惠券状态更新', 'Coupon', 'StateUpdate', '1', '0', '', '1527048618'), ('165', '162', '优惠券添加/编辑页面', 'Coupon', 'SaveInfo', '2', '0', '', '1527048754'), ('166', '162', '优惠券添加/编辑', 'Coupon', 'Save', '3', '0', '', '1527048791'), ('167', '162', '用户优惠券列表', 'Coupon', 'User', '4', '0', '', '1527048877'), ('168', '162', '用户优惠券删除', 'Coupon', 'Delete', '5', '0', '', '1527048935'), ('169', '162', '优惠券发放页面', 'Coupon', 'SendInfo', '6', '0', '', '1527061899'), ('170', '162', '优惠券发放', 'Coupon', 'Send', '7', '0', '', '1527061927'), ('171', '162', '优惠券发放-用户查询', 'Coupon', 'UserQuery', '8', '0', '', '1527066512'), ('172', '152', '首页轮播', 'Slide', 'Index', '30', '1', '', '1527149117'), ('173', '152', '轮播添加/编辑页面', 'Slide', 'SaveInfo', '31', '0', '', '1527149152'), ('174', '152', '轮播添加/编辑', 'Slide', 'Save', '32', '0', '', '1527149186'), ('175', '152', '轮播状态更新', 'Slide', 'StateUpdate', '33', '0', '', '1527156980'), ('176', '152', '轮播删除', 'Slide', 'Delete', '34', '0', '', '1527157260'), ('177', '0', '订单管理', 'Order', 'Index', '5', '1', 'am-icon-reorder', '1522229870'), ('178', '177', '订单管理', 'Order', 'Index', '1', '1', '', '1522317898'), ('179', '177', '订单删除', 'Order', 'Delete', '2', '0', '', '1522317917'), ('180', '177', '订单取消', 'Order', 'Cancel', '3', '0', '', '1527497803'), ('181', '38', '商品上下架', 'Goods', 'StatusShelves', '5', '0', '', '1528080200'), ('182', '0', '数据管理', 'Data', 'Index', '28', '1', 'am-icon-database', '1528096661'), ('183', '182', '消息管理', 'Message', 'Index', '0', '1', '', '1528080200'), ('184', '182', '消息删除', 'Message', 'Delete', '1', '0', '', '1528080200'), ('185', '182', '支付日志', 'PayLog', 'Index', '10', '1', '', '1528080200'), ('186', '182', '用户积分日志', 'UserIntegralLog', 'Index', '20', '1', '', '1528103067'), ('187', '182', '用户投诉', 'Complaint', 'Index', '30', '0', '', '1528189127'), ('188', '182', '投诉处理', 'Complaint', 'Save', '31', '0', '', '1528189193'), ('189', '182', '投诉删除', 'Complaint', 'Delete', '32', '0', '', '1528189211'), ('193', '152', '筛选价格', 'ScreeningPrice', 'Index', '40', '1', '', '1528708578'), ('194', '152', '筛选价格添加/编辑', 'ScreeningPrice', 'Save', '41', '0', '', '1528708609'), ('199', '81', 'SEO设置', 'Seo', 'Index', '30', '1', '', '1528771081'), ('200', '81', 'SEO设置编辑', 'Seo', 'Save', '31', '0', '', '1528771105'), ('201', '38', '商品分类', 'GoodsCategory', 'Index', '10', '1', '', '1529041901'), ('202', '38', '商品分类添加/编辑', 'GoodsCategory', 'Save', '11', '0', '', '1529041928'), ('203', '38', '商品分类删除', 'GoodsCategory', 'Delete', '12', '0', '', '1529041949'), ('204', '0', '文章管理', 'Article', 'Index', '26', '1', 'am-icon-folder-open', '1530360560'), ('205', '204', '文章管理', 'Article', 'Index', '0', '1', '', '1530360593'), ('206', '204', '文章添加/编辑页面', 'Article', 'SaveInfo', '1', '0', '', '1530360625'), ('207', '204', '文章添加/编辑', 'Article', 'Save', '2', '0', '', '1530360663'), ('208', '204', '文章删除', 'Article', 'Delete', '3', '0', '', '1530360692'), ('209', '204', '文章状态更新', 'Article', 'StatusUpdate', '4', '0', '', '1530360730'), ('210', '204', '文章分类', 'ArticleCategory', 'Index', '10', '1', '', '1530361071'), ('211', '204', '文章分类编辑/添加', 'ArticleCategory', 'Save', '11', '0', '', '1530361101'), ('212', '204', '文章分类删除', 'ArticleCategory', 'Delete', '12', '0', '', '1530361126'), ('213', '0', '问答留言', 'Answer', 'Index', '6', '1', 'am-icon-retweet', '1533112421'), ('214', '213', '问答留言管理', 'Answer', 'Index', '0', '1', '', '1533112443'), ('215', '213', '问答留言编辑', 'Answer', 'Save', '1', '0', '', '1533119660'), ('216', '213', '问答留言删除', 'Answer', 'Delete', '2', '0', '', '1533119680'), ('217', '213', '问答留言状态更新', 'Answer', 'StatusUpdate', '3', '0', '', '1533119704'), ('218', '38', '商品首页推荐', 'Goods', 'StatusHomeRecommended', '6', '0', '', '1533564476'), ('219', '81', '邮箱设置', 'Email', 'Index', '20', '1', '', '1533636067'), ('220', '81', '邮箱添加/编辑', 'Email', 'Save', '21', '0', '', '1533636109'), ('221', '81', '邮件发送测试', 'Email', 'EmailTest', '22', '0', '', '1533636157'), ('222', '0', '网站管理', 'Navigation', 'Index', '7', '1', 'am-icon-university fs-12', '1533692051'), ('223', '222', '导航管理', 'Navigation', 'Index', '0', '1', '', '1486183114'), ('226', '222', '导航添加/编辑', 'Navigation', 'Save', '2', '0', '', '1486183367'), ('227', '222', '导航删除', 'Navigation', 'Delete', '3', '0', '', '1486183410'), ('228', '222', '导航状态更新', 'Navigation', 'StatusUpdate', '4', '0', '', '1486183462'), ('234', '222', '自定义页面', 'CustomView', 'Index', '21', '1', '', '1486193400'), ('235', '222', '自定义页面添加/编辑页面', 'CustomView', 'SaveInfo', '22', '0', '', '1486193449'), ('236', '222', '自定义页面添加/编辑', 'CustomView', 'Save', '23', '0', '', '1486193473'), ('237', '222', '自定义页面删除', 'CustomView', 'Delete', '24', '0', '', '1486193516'), ('238', '222', '自定义页面状态更新', 'CustomView', 'StatusUpdate', '25', '0', '', '1486193582'), ('239', '222', '友情链接', 'Link', 'Index', '31', '1', '', '1486194358'), ('240', '222', '友情链接添加/编辑页面', 'Link', 'SaveInfo', '32', '0', '', '1486194392'), ('241', '222', '友情链接添加/编辑', 'Link', 'Save', '33', '0', '', '1486194413'), ('242', '222', '友情链接删除', 'Link', 'Delete', '34', '0', '', '1486194435'), ('243', '222', '友情链接状态更新', 'Link', 'StatusUpdate', '35', '0', '', '1486194479'), ('244', '222', '主题管理', 'Theme', 'Index', '60', '1', '', '1494381693'), ('245', '222', '主题管理添加/编辑', 'Theme', 'Save', '61', '0', '', '1494398194'), ('246', '222', '主题上传安装', 'Theme', 'Upload', '62', '0', '', '1494405096'), ('247', '222', '主题删除', 'Theme', 'Delete', '63', '0', '', '1494410655'), ('248', '204', '商品首页推荐', 'Article', 'StatusHomeRecommended', '5', '0', '', '1534156400'), ('249', '252', '品牌管理', 'Brand', 'Index', '0', '1', '', '1535683271'), ('250', '252', '品牌添加/编辑', 'Brand', 'Save', '2', '0', '', '1535683310'), ('251', '252', '品牌删除', 'Brand', 'Delete', '4', '0', '', '1535683351'), ('252', '0', '品牌管理', 'Brand', 'Index', '8', '1', 'am-icon-dribbble', '1535684308'), ('253', '252', '品牌分类', 'BrandCategory', 'Index', '10', '1', '', '1535684401'), ('254', '252', '品牌分类添加/编辑', 'BrandCategory', 'Save', '11', '0', '', '1535684424'), ('255', '252', '品牌分类删除', 'BrandCategory', 'Delete', '12', '0', '', '1535684444'), ('256', '252', '品牌添加/编辑页面', 'Brand', 'SaveInfo', '1', '0', '', '1535694837'), ('257', '252', '品牌状态更新', 'Brand', 'StateUpdate', '3', '0', '', '1535694880'), ('258', '152', '筛选价格删除', 'ScreeningPrice', 'Delete', '42', '0', '', '1536227071'), ('259', '152', '支付方式', 'Payment', 'Index', '50', '1', '', '1537156351'), ('260', '152', '支付方式安装/编辑页面', 'Payment', 'SaveInfo', '51', '0', '', '1537156423'), ('261', '152', '支付方式安装/编辑', 'Payment', 'Save', '52', '0', '', '1537156463'), ('262', '152', '支付方式删除', 'Payment', 'Delete', '53', '0', '', '1537156502'), ('263', '152', '支付方式安装', 'Payment', 'Install', '54', '0', '', '1537166090'), ('264', '152', '支付宝方式状态更新', 'Payment', 'StatusUpdate', '55', '0', '', '1537166149'), ('265', '152', '支付方式卸载', 'Payment', 'Uninstall', '56', '0', '', '1537167814'), ('266', '152', '支付方式上传', 'Payment', 'Upload', '57', '0', '', '1537173653'), ('267', '177', '订单发货', 'Order', 'Delivery', '4', '0', '', '1538413499'), ('268', '177', '订单收货', 'Order', 'Collect', '5', '0', '', '1538414034'), ('269', '177', '订单支付', 'Order', 'Pay', '6', '0', '', '1538757043'), ('270', '0', '支付宝生活号', 'AlipayLife', 'Index', '25', '1', 'am-icon-life-bouy', '1540175293'), ('271', '270', '生活号管理', 'AlipayLife', 'Index', '0', '1', '', '1540175632'), ('272', '270', '生活号添加/编辑页面', 'AlipayLife', 'SaveInfo', '2', '0', '', '1540175668'), ('273', '270', '生活号添加/编辑', 'AlipayLife', 'Save', '2', '0', '', '1540175706'), ('274', '270', '生活号删除', 'AlipayLife', 'Delete', '4', '0', '', '1540175780'), ('275', '270', '消息管理', 'AlipayLifeMessage', 'Index', '20', '1', '', '1540175867'), ('276', '270', '消息发送页面', 'AlipayLifeMessage', 'SendInfo', '21', '0', '', '1540175907'), ('277', '270', '消息发送', 'AlipayLifeMessage', 'Send', '22', '0', '', '1540175929'), ('278', '270', '消息删除', 'AlipayLifeMessage', 'Delete', '23', '0', '', '1540175951'), ('279', '270', '用户管理', 'AlipayLifeUser', 'Index', '30', '1', '', '1540175983'), ('280', '270', '用户删除', 'AlipayLifeUser', 'Delete', '31', '0', '', '1540176023'), ('281', '270', '生活号分类', 'AlipayLifeCategory', 'Index', '10', '1', '', '1540176023'), ('282', '270', '生活号分类添加/编辑', 'AlipayLifeCategory', 'Save', '11', '0', '', '1540176023'), ('283', '270', '生活号分类删除', 'AlipayLifeCategory', 'Delete', '12', '0', '', '1540176023'), ('284', '270', '生活号状态更新', 'AlipayLife', 'StatusUpdate', '3', '0', '', '1540179220'); +INSERT INTO `s_power` VALUES ('1', '0', '权限控制', 'Power', 'Index', '2', '1', 'am-icon-recycle', '1481612301'), ('4', '1', '角色管理', 'Power', 'Role', '11', '1', '', '1481639037'), ('13', '1', '权限分配', 'Power', 'Index', '21', '1', '', '1482156143'), ('15', '1', '权限添加/编辑', 'Power', 'PowerSave', '22', '0', '', '1482243750'), ('16', '1', '权限删除', 'Power', 'PowerDelete', '23', '0', '', '1482243797'), ('17', '1', '角色组添加/编辑页面', 'Power', 'RoleSaveInfo', '12', '0', '', '1482243855'), ('18', '1', '角色组添加/编辑', 'Power', 'RoleSave', '13', '0', '', '1482243888'), ('19', '1', '管理员添加/编辑页面', 'Admin', 'SaveInfo', '2', '0', '', '1482244637'), ('20', '1', '管理员添加/编辑', 'Admin', 'Save', '3', '0', '', '1482244666'), ('21', '1', '管理员删除', 'Admin', 'Delete', '4', '0', '', '1482244688'), ('22', '1', '管理员列表', 'Admin', 'Index', '1', '1', '', '1482568868'), ('23', '1', '角色删除', 'Power', 'RoleDelete', '14', '0', '', '1482569155'), ('38', '0', '商品管理', 'Goods', 'Index', '3', '1', 'am-icon-legal', '1483283430'), ('39', '38', '商品管理', 'Goods', 'Index', '1', '1', '', '1483283546'), ('41', '0', '后台配置', 'Config', 'Index', '0', '1', 'am-icon-gear', '1483362358'), ('42', '41', '配置保存', 'Config', 'Save', '1', '0', '', '1483432335'), ('57', '38', '商品添加/编辑页面', 'Goods', 'SaveInfo', '2', '0', '', '1483616439'), ('58', '38', '商品添加/编辑', 'Goods', 'Save', '3', '0', '', '1483616492'), ('59', '38', '商品删除', 'Goods', 'Delete', '4', '0', '', '1483616569'), ('81', '0', '站点配置', 'Site', 'Index', '1', '1', 'am-icon-cogs', '1486182943'), ('103', '81', '站点设置', 'Site', 'Index', '0', '1', '', '1486561470'), ('104', '81', '短信设置', 'Sms', 'Index', '10', '1', '', '1486561615'), ('105', '81', '站点设置编辑', 'Site', 'Save', '1', '0', '', '1486561780'), ('107', '81', '短信设置编辑', 'Sms', 'Save', '11', '0', '', '1486562011'), ('118', '0', '工具', 'Tool', 'Index', '30', '1', 'am-icon-coffee', '1488108044'), ('119', '118', '缓存管理', 'Cache', 'Index', '1', '1', '', '1488108107'), ('120', '118', '站点缓存更新', 'Cache', 'SiteUpdate', '2', '0', '', '1488108235'), ('121', '118', '模板缓存更新', 'Cache', 'TemplateUpdate', '2', '0', '', '1488108390'), ('122', '118', '模块缓存更新', 'Cache', 'ModuleUpdate', '3', '0', '', '1488108436'), ('126', '0', '用户管理', 'User', 'Index', '2', '1', 'am-icon-user', '1490794162'), ('127', '126', '用户列表', 'User', 'Index', '0', '1', '', '1490794316'), ('128', '126', '用户编辑/添加页面', 'User', 'SaveInfo', '1', '0', '', '1490794458'), ('129', '126', '用户添加/编辑', 'User', 'Save', '2', '0', '', '1490794510'), ('130', '126', '用户删除', 'User', 'Delete', '3', '0', '', '1490794585'), ('146', '126', 'Excel导出', 'User', 'ExcelExport', '6', '0', '', '1522223773'), ('152', '0', '资源管理', 'Resources', 'Index', '29', '1', 'am-icon-yelp', '1526304409'), ('153', '152', '地区管理', 'Region', 'Index', '0', '1', '', '1526304473'), ('154', '152', '地区添加/编辑', 'Region', 'Save', '1', '0', '', '1526304503'), ('155', '152', '地区删除', 'Region', 'Delete', '2', '0', '', '1526304531'), ('156', '152', '快递管理', 'Express', 'Index', '10', '1', '', '1526304473'), ('157', '152', '快递添加/编辑', 'Express', 'Save', '11', '0', '', '1526304473'), ('158', '152', '快递删除', 'Express', 'Delete', '12', '0', '', '1526304473'), ('162', '0', '营销管理', 'Marketing', 'Index', '27', '1', 'am-icon-codepen', '1527042204'), ('163', '162', '优惠券管理', 'Coupon', 'Index', '0', '1', '', '1527042261'), ('164', '162', '优惠券状态更新', 'Coupon', 'StateUpdate', '1', '0', '', '1527048618'), ('165', '162', '优惠券添加/编辑页面', 'Coupon', 'SaveInfo', '2', '0', '', '1527048754'), ('166', '162', '优惠券添加/编辑', 'Coupon', 'Save', '3', '0', '', '1527048791'), ('167', '162', '用户优惠券列表', 'Coupon', 'User', '4', '0', '', '1527048877'), ('168', '162', '用户优惠券删除', 'Coupon', 'Delete', '5', '0', '', '1527048935'), ('169', '162', '优惠券发放页面', 'Coupon', 'SendInfo', '6', '0', '', '1527061899'), ('170', '162', '优惠券发放', 'Coupon', 'Send', '7', '0', '', '1527061927'), ('171', '162', '优惠券发放-用户查询', 'Coupon', 'UserQuery', '8', '0', '', '1527066512'), ('172', '152', '首页轮播', 'Slide', 'Index', '30', '1', '', '1527149117'), ('173', '152', '轮播添加/编辑页面', 'Slide', 'SaveInfo', '31', '0', '', '1527149152'), ('174', '152', '轮播添加/编辑', 'Slide', 'Save', '32', '0', '', '1527149186'), ('175', '152', '轮播状态更新', 'Slide', 'StateUpdate', '33', '0', '', '1527156980'), ('176', '152', '轮播删除', 'Slide', 'Delete', '34', '0', '', '1527157260'), ('177', '0', '订单管理', 'Order', 'Index', '5', '1', 'am-icon-reorder', '1522229870'), ('178', '177', '订单管理', 'Order', 'Index', '1', '1', '', '1522317898'), ('179', '177', '订单删除', 'Order', 'Delete', '2', '0', '', '1522317917'), ('180', '177', '订单取消', 'Order', 'Cancel', '3', '0', '', '1527497803'), ('181', '38', '商品上下架', 'Goods', 'StatusShelves', '5', '0', '', '1528080200'), ('182', '0', '数据管理', 'Data', 'Index', '28', '1', 'am-icon-database', '1528096661'), ('183', '182', '消息管理', 'Message', 'Index', '0', '1', '', '1528080200'), ('184', '182', '消息删除', 'Message', 'Delete', '1', '0', '', '1528080200'), ('185', '182', '支付日志', 'PayLog', 'Index', '10', '1', '', '1528080200'), ('186', '182', '用户积分日志', 'UserIntegralLog', 'Index', '20', '1', '', '1528103067'), ('187', '182', '用户投诉', 'Complaint', 'Index', '30', '0', '', '1528189127'), ('188', '182', '投诉处理', 'Complaint', 'Save', '31', '0', '', '1528189193'), ('189', '182', '投诉删除', 'Complaint', 'Delete', '32', '0', '', '1528189211'), ('193', '152', '筛选价格', 'ScreeningPrice', 'Index', '40', '1', '', '1528708578'), ('194', '152', '筛选价格添加/编辑', 'ScreeningPrice', 'Save', '41', '0', '', '1528708609'), ('199', '81', 'SEO设置', 'Seo', 'Index', '30', '1', '', '1528771081'), ('200', '81', 'SEO设置编辑', 'Seo', 'Save', '31', '0', '', '1528771105'), ('201', '38', '商品分类', 'GoodsCategory', 'Index', '10', '1', '', '1529041901'), ('202', '38', '商品分类添加/编辑', 'GoodsCategory', 'Save', '11', '0', '', '1529041928'), ('203', '38', '商品分类删除', 'GoodsCategory', 'Delete', '12', '0', '', '1529041949'), ('204', '0', '文章管理', 'Article', 'Index', '26', '1', 'am-icon-folder-open', '1530360560'), ('205', '204', '文章管理', 'Article', 'Index', '0', '1', '', '1530360593'), ('206', '204', '文章添加/编辑页面', 'Article', 'SaveInfo', '1', '0', '', '1530360625'), ('207', '204', '文章添加/编辑', 'Article', 'Save', '2', '0', '', '1530360663'), ('208', '204', '文章删除', 'Article', 'Delete', '3', '0', '', '1530360692'), ('209', '204', '文章状态更新', 'Article', 'StatusUpdate', '4', '0', '', '1530360730'), ('210', '204', '文章分类', 'ArticleCategory', 'Index', '10', '1', '', '1530361071'), ('211', '204', '文章分类编辑/添加', 'ArticleCategory', 'Save', '11', '0', '', '1530361101'), ('212', '204', '文章分类删除', 'ArticleCategory', 'Delete', '12', '0', '', '1530361126'), ('213', '0', '问答留言', 'Answer', 'Index', '6', '1', 'am-icon-retweet', '1533112421'), ('214', '213', '问答留言管理', 'Answer', 'Index', '0', '1', '', '1533112443'), ('215', '213', '问答留言编辑', 'Answer', 'Save', '1', '0', '', '1533119660'), ('216', '213', '问答留言删除', 'Answer', 'Delete', '2', '0', '', '1533119680'), ('217', '213', '问答留言状态更新', 'Answer', 'StatusUpdate', '3', '0', '', '1533119704'), ('218', '38', '商品首页推荐', 'Goods', 'StatusHomeRecommended', '6', '0', '', '1533564476'), ('219', '81', '邮箱设置', 'Email', 'Index', '20', '1', '', '1533636067'), ('220', '81', '邮箱添加/编辑', 'Email', 'Save', '21', '0', '', '1533636109'), ('221', '81', '邮件发送测试', 'Email', 'EmailTest', '22', '0', '', '1533636157'), ('222', '0', '网站管理', 'Navigation', 'Index', '7', '1', 'am-icon-university fs-12', '1533692051'), ('223', '222', '导航管理', 'Navigation', 'Index', '0', '1', '', '1486183114'), ('226', '222', '导航添加/编辑', 'Navigation', 'Save', '2', '0', '', '1486183367'), ('227', '222', '导航删除', 'Navigation', 'Delete', '3', '0', '', '1486183410'), ('228', '222', '导航状态更新', 'Navigation', 'StatusUpdate', '4', '0', '', '1486183462'), ('234', '222', '自定义页面', 'CustomView', 'Index', '21', '1', '', '1486193400'), ('235', '222', '自定义页面添加/编辑页面', 'CustomView', 'SaveInfo', '22', '0', '', '1486193449'), ('236', '222', '自定义页面添加/编辑', 'CustomView', 'Save', '23', '0', '', '1486193473'), ('237', '222', '自定义页面删除', 'CustomView', 'Delete', '24', '0', '', '1486193516'), ('238', '222', '自定义页面状态更新', 'CustomView', 'StatusUpdate', '25', '0', '', '1486193582'), ('239', '222', '友情链接', 'Link', 'Index', '31', '1', '', '1486194358'), ('240', '222', '友情链接添加/编辑页面', 'Link', 'SaveInfo', '32', '0', '', '1486194392'), ('241', '222', '友情链接添加/编辑', 'Link', 'Save', '33', '0', '', '1486194413'), ('242', '222', '友情链接删除', 'Link', 'Delete', '34', '0', '', '1486194435'), ('243', '222', '友情链接状态更新', 'Link', 'StatusUpdate', '35', '0', '', '1486194479'), ('244', '222', '主题管理', 'Theme', 'Index', '60', '1', '', '1494381693'), ('245', '222', '主题管理添加/编辑', 'Theme', 'Save', '61', '0', '', '1494398194'), ('246', '222', '主题上传安装', 'Theme', 'Upload', '62', '0', '', '1494405096'), ('247', '222', '主题删除', 'Theme', 'Delete', '63', '0', '', '1494410655'), ('248', '204', '商品首页推荐', 'Article', 'StatusHomeRecommended', '5', '0', '', '1534156400'), ('249', '252', '品牌管理', 'Brand', 'Index', '0', '1', '', '1535683271'), ('250', '252', '品牌添加/编辑', 'Brand', 'Save', '2', '0', '', '1535683310'), ('251', '252', '品牌删除', 'Brand', 'Delete', '4', '0', '', '1535683351'), ('252', '0', '品牌管理', 'Brand', 'Index', '8', '1', 'am-icon-dribbble', '1535684308'), ('253', '252', '品牌分类', 'BrandCategory', 'Index', '10', '1', '', '1535684401'), ('254', '252', '品牌分类添加/编辑', 'BrandCategory', 'Save', '11', '0', '', '1535684424'), ('255', '252', '品牌分类删除', 'BrandCategory', 'Delete', '12', '0', '', '1535684444'), ('256', '252', '品牌添加/编辑页面', 'Brand', 'SaveInfo', '1', '0', '', '1535694837'), ('257', '252', '品牌状态更新', 'Brand', 'StateUpdate', '3', '0', '', '1535694880'), ('258', '152', '筛选价格删除', 'ScreeningPrice', 'Delete', '42', '0', '', '1536227071'), ('259', '152', '支付方式', 'Payment', 'Index', '50', '1', '', '1537156351'), ('260', '152', '支付方式安装/编辑页面', 'Payment', 'SaveInfo', '51', '0', '', '1537156423'), ('261', '152', '支付方式安装/编辑', 'Payment', 'Save', '52', '0', '', '1537156463'), ('262', '152', '支付方式删除', 'Payment', 'Delete', '53', '0', '', '1537156502'), ('263', '152', '支付方式安装', 'Payment', 'Install', '54', '0', '', '1537166090'), ('264', '152', '支付宝方式状态更新', 'Payment', 'StatusUpdate', '55', '0', '', '1537166149'), ('265', '152', '支付方式卸载', 'Payment', 'Uninstall', '56', '0', '', '1537167814'), ('266', '152', '支付方式上传', 'Payment', 'Upload', '57', '0', '', '1537173653'), ('267', '177', '订单发货', 'Order', 'Delivery', '4', '0', '', '1538413499'), ('268', '177', '订单收货', 'Order', 'Collect', '5', '0', '', '1538414034'), ('269', '177', '订单支付', 'Order', 'Pay', '6', '0', '', '1538757043'), ('270', '0', '支付宝生活号', 'AlipayLife', 'Index', '25', '1', 'am-icon-life-bouy', '1540175293'), ('271', '270', '生活号管理', 'AlipayLife', 'Index', '0', '1', '', '1540175632'), ('272', '270', '生活号添加/编辑页面', 'AlipayLife', 'SaveInfo', '2', '0', '', '1540175668'), ('273', '270', '生活号添加/编辑', 'AlipayLife', 'Save', '2', '0', '', '1540175706'), ('274', '270', '生活号删除', 'AlipayLife', 'Delete', '4', '0', '', '1540175780'), ('275', '270', '消息管理', 'AlipayLifeMessage', 'Index', '20', '1', '', '1540175867'), ('276', '270', '消息创建页面', 'AlipayLifeMessage', 'SaveInfo', '21', '0', '', '1540175907'), ('277', '270', '消息保存', 'AlipayLifeMessage', 'Save', '22', '0', '', '1540175929'), ('278', '270', '消息删除', 'AlipayLifeMessage', 'Delete', '23', '0', '', '1540175951'), ('279', '270', '用户管理', 'AlipayLifeUser', 'Index', '30', '1', '', '1540175983'), ('280', '270', '用户删除', 'AlipayLifeUser', 'Delete', '31', '0', '', '1540176023'), ('281', '270', '生活号分类', 'AlipayLifeCategory', 'Index', '10', '1', '', '1540176023'), ('282', '270', '生活号分类添加/编辑', 'AlipayLifeCategory', 'Save', '11', '0', '', '1540176023'), ('283', '270', '生活号分类删除', 'AlipayLifeCategory', 'Delete', '12', '0', '', '1540176023'), ('284', '270', '生活号状态更新', 'AlipayLife', 'StatusUpdate', '3', '0', '', '1540179220'), ('285', '270', '消息发送', 'AlipayLifeMessage', 'Send', '24', '0', '', '1540361501'); COMMIT; -- ---------------------------- @@ -1182,7 +1201,7 @@ CREATE TABLE `s_user` ( -- Records of `s_user` -- ---------------------------- BEGIN; -INSERT INTO `s_user` VALUES ('77', '2088502175420842', '', '0', '642755', 'd763f50450cd948ed412207334446892', '', '龚哥哥', '13250814883', 'fuxiang.gong@qq.com', '2', 'https://tfs.alipayobjects.com/images/partner/T10d8lXm4dXXXXXXXX', '上海', '上海市', '1540915200', '', '0', '0', '0', '0', '0', '1539759818'), ('89', '', '', '0', '789918', 'b4f34e6fd74ba2c0e05e6199d18759a7', '', '', '', '', '0', '', '', '', '0', '', '0', '0', '0', '0', '1536658477', '1536718410'), ('90', '', '', '0', '887873', 'f0a1daeaf4e8b28676b3a8fbe419a9fe', '', '魔鬼', '17602128368', '', '2', '/Public/Upload/user_avatar/compr/2018/10/16/20181016143756385674260.png', '', '', '666201600', '', '0', '0', '0', '0', '1539167253', '1540054695'); +INSERT INTO `s_user` VALUES ('77', '2088502175420842', '', '0', '642755', 'd763f50450cd948ed412207334446892', '', '龚哥哥', '13250814883', 'fuxiang.gong@qq.com', '2', 'https://tfs.alipayobjects.com/images/partner/T10d8lXm4dXXXXXXXX', '上海', '上海市', '1540915200', '', '0', '0', '0', '0', '0', '1539759818'), ('89', '', '', '0', '789918', 'b4f34e6fd74ba2c0e05e6199d18759a7', '', '', '', '', '0', '', '', '', '0', '', '0', '0', '0', '0', '1536658477', '1536718410'), ('90', '2088502175420666', '', '0', '887873', 'f0a1daeaf4e8b28676b3a8fbe419a9fe', '', '魔鬼', '17602128368', '', '2', '/Public/Upload/user_avatar/compr/2018/10/16/20181016143756385674260.png', '', '', '666201600', '', '0', '0', '0', '0', '1539167253', '1540054695'); COMMIT; -- ----------------------------