123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- namespace app\api\controller;
- use think\facade\Lang;
- class Sellerlog extends MobileSeller
- {
- public function initialize()
- {
- parent::initialize();
- }
-
- public function log_list()
- {
- $sellerlog_model = model('sellerlog');
- $condition = array();
- $condition[] = array('sellerlog_store_id', '=', $this->store_info['store_id']);
- $seller_name = input('param.seller_name');
- $log_content = input('param.log_content');
- $add_time_from = input('param.add_time_from');
- $add_time_to = input('param.add_time_to');
- if (!empty($seller_name)) {
- $condition[] = array('sellerlog_seller_name', 'like', '%' . input('param.seller_name') . '%');
- }
- if (!empty($log_content)) {
- $condition[] = array('sellerlog_content', 'like', '%' . $log_content . '%');
- }
- if (!empty($add_time_from) || $add_time_to) {
- $condition[] = array('sellerlog_time', 'between', [strtotime($add_time_from), strtotime($add_time_to)]);
- }
- $log_list = $sellerlog_model->getSellerlogList($condition, 10, 'sellerlog_id desc');
- $result = array_merge(array('log_list' => $log_list), mobile_page($sellerlog_model->page_info));
- ds_json_encode(10000, lang('ds_common_op_succ'), $result);
- }
- }
|