|
@@ -16,7 +16,12 @@ class AdvertAdminAction extends BaseAction{
|
|
|
$result = $this->getDbEntity()->query($sql);
|
|
|
return $result[0];
|
|
|
}
|
|
|
-
|
|
|
+ //登录
|
|
|
+ public function selectUserName($uid){
|
|
|
+ $sql = "select * from ly_user where id='$uid' limit 1";
|
|
|
+ $result = $this->getDbEntity()->query($sql);
|
|
|
+ return $result[0];
|
|
|
+ }
|
|
|
//查询用户,通过uname
|
|
|
public function selectUserByName($uname){
|
|
|
$sql = "select * from ly_user where uname='$uname' limit 1";
|
|
@@ -446,6 +451,26 @@ class AdvertAdminAction extends BaseAction{
|
|
|
$result = $this->getDbEntity()->query($sql);
|
|
|
return $result;
|
|
|
}
|
|
|
+
|
|
|
+ //短信回执发送列表
|
|
|
+ public function select_smsdidlog_list($where,$limit=0){
|
|
|
+
|
|
|
+ if(!empty($limit)){
|
|
|
+ $sql = "select * from ly_send_sms_log_did $where order by id desc limit $limit";
|
|
|
+ }else{
|
|
|
+ $sql = "select * from ly_send_sms_log_did $where order by id desc";
|
|
|
+ }
|
|
|
+
|
|
|
+ $result = $this->getDbEntity()->query($sql);
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
+ //查询短信发送数量
|
|
|
+ public function select_smsdidlog_count($where){
|
|
|
+ $sql = "select count(*) as count from ly_send_sms_log_did $where ";
|
|
|
+ $result = $this->getDbEntity()->query($sql);
|
|
|
+ return $result[0]['count'];
|
|
|
+ }
|
|
|
+
|
|
|
//短信发送列表
|
|
|
public function select_smslog_list_query($where,$limit=0){
|
|
|
|
|
@@ -774,15 +799,30 @@ class AdvertAdminAction extends BaseAction{
|
|
|
$result = $this->getDbEntity()->execute_sql($sql);
|
|
|
return $result;
|
|
|
}
|
|
|
+ //用户取消订阅
|
|
|
+ public function upDidSmsCustomer($is_send,$tel,$uid){
|
|
|
+ $sql = "update ly_sms_customer set is_send='{$is_send}' where tel='{$tel}' and uid='{$uid}'";
|
|
|
+ $result = $this->getDbEntity()->execute_sql($sql);
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
//添加短信回执记录
|
|
|
public function addDrLog($data){
|
|
|
$times=date('Y-m-d H:i:s');
|
|
|
- $sql = "insert into ly_send_sms_log_dr(mobile,dr_id,group_dr_id,status,result,addtime) values
|
|
|
+ $sql = "insert into ly_send_sms_log_dr (mobile,dr_id,group_dr_id,status,result,addtime) values
|
|
|
('{$data['phone']}','{$data['messageid']}','{$data['group_dr_id']}','{$data['status']}','{$data['result']}','{$times}')";
|
|
|
$result = $this->getDbEntity()->execute_sql($sql);
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
+ //添加短信回执记录
|
|
|
+ public function addDidLog($data){
|
|
|
+ $times=date('Y-m-d H:i:s');
|
|
|
+ $sql = "insert into ly_send_sms_log_did (mobile,from_phone,did_id,group_did_id,status,content,addtime,receive_time,did_mobile,uid) values
|
|
|
+ ('{$data['mobile']}','{$data['fromPhone']}','{$data['messageId']}','{$data['group_dr_id']}','{$data['status']}','{$data['content']}','{$times}','{$data['receiveTime']}','{$data['toPhone']}','{$data['uid']}')";
|
|
|
+ $result = $this->getDbEntity()->execute_sql($sql);
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
+
|
|
|
//根据$messageid 查询牛信云发送日志
|
|
|
public function select_smslog_new_query($where){
|
|
|
$sql = "select * from ly_send_sms_log_new $where LIMIT 1 ";
|