爵位接口提交-爵位装备
This commit is contained in:
@@ -377,4 +377,18 @@ class Nobility extends adminApi
|
|||||||
];
|
];
|
||||||
return V(1,"成功", $return_data);
|
return V(1,"成功", $return_data);
|
||||||
}
|
}
|
||||||
|
//装扮删除
|
||||||
|
public function del_nobility_decorate(){
|
||||||
|
$id = input('id', '');
|
||||||
|
$nobility_decorate_info = db::name('vs_nobility_decorate')->where('id', $id)->find();
|
||||||
|
if (!$nobility_decorate_info) {
|
||||||
|
return V(0, "该爵位装扮不存在");
|
||||||
|
}
|
||||||
|
$result = db::name('vs_nobility_decorate')->where('id', $id)->update(['delete_time'=>time()]);
|
||||||
|
if ($result) {
|
||||||
|
return V(1, "删除成功");
|
||||||
|
} else {
|
||||||
|
return V(0, "删除失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -17,7 +17,7 @@ class Decorate extends Model
|
|||||||
protected $updateTime = 'updatetime';
|
protected $updateTime = 'updatetime';
|
||||||
// 定义字段类型 1头像框 2坐骑 3麦圈 6个人靓号 7房间靓号 8公会靓号
|
// 定义字段类型 1头像框 2坐骑 3麦圈 6个人靓号 7房间靓号 8公会靓号
|
||||||
public $TypeArray = [1=>'头像框',2=>'坐骑',3=>'麦圈',6=>'个人靓号',7=>'房间靓号',8=>'公会靓号',9=>'聊天气泡'];
|
public $TypeArray = [1=>'头像框',2=>'坐骑',3=>'麦圈',6=>'个人靓号',7=>'房间靓号',8=>'公会靓号',9=>'聊天气泡'];
|
||||||
protected $FromType = [1=>'购买',2=>'后台赠送',3=>'礼盒开奖',4=>'好友赠送',5=>'首充赠送',6=>'天降好礼获得',7=>'财富等级特权赠送',8=>'新人充值好礼'];
|
protected $FromType = [1=>'购买',2=>'后台赠送',3=>'礼盒开奖',4=>'好友赠送',5=>'首充赠送',6=>'天降好礼获得',7=>'财富等级特权赠送',8=>'新人充值好礼',9=>'爵位购买赠送'];
|
||||||
public function __construct($data = [])
|
public function __construct($data = [])
|
||||||
{
|
{
|
||||||
parent::__construct($data);
|
parent::__construct($data);
|
||||||
|
|||||||
@@ -195,6 +195,15 @@ class Nobility extends Model
|
|||||||
'createtime' => time(),
|
'createtime' => time(),
|
||||||
];
|
];
|
||||||
db::name('vs_user_nobility_log')->insert($log_data);
|
db::name('vs_user_nobility_log')->insert($log_data);
|
||||||
|
//发放装扮
|
||||||
|
$nobility_decorate = db::name('vs_nobility_decorate')
|
||||||
|
->field('id,did,dpid,day')
|
||||||
|
->where('delete_time', 0)
|
||||||
|
->where('lid', $lid)
|
||||||
|
->select();
|
||||||
|
foreach ($nobility_decorate as $key => $value) {
|
||||||
|
model('api/Decorate')->pay_decorate($user_id,$value['did'],$value['day'],9);
|
||||||
|
}
|
||||||
return ['code' => 1, 'msg' => '成功'];
|
return ['code' => 1, 'msg' => '成功'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user