|
@@ -167,10 +167,10 @@ class WechatMenuService extends BaseService
|
|
*/
|
|
*/
|
|
public static function del($ids)
|
|
public static function del($ids)
|
|
{
|
|
{
|
|
- WechatMenu::query()->whereIn('id', $ids)->update(['is_del' => 1, 'del_at' => get_date()]);
|
|
|
|
|
|
+ WechatMenu::whereIn('id', $ids)->update(['is_del' => 1, 'del_at' => get_date()]);
|
|
$applyIds = WechatAccountMenuDetail::query()->whereIn('menu_id', $ids)->where('status', 1)->pluck('id')->toArray();
|
|
$applyIds = WechatAccountMenuDetail::query()->whereIn('menu_id', $ids)->where('status', 1)->pluck('id')->toArray();
|
|
if ($applyIds) {
|
|
if ($applyIds) {
|
|
- WechatAccountMenuDetail::query()->whereIn('menu_id', $ids)->update(['status' => 0]);
|
|
|
|
|
|
+ WechatAccountMenuDetail::whereIn('menu_id', $ids)->update(['status' => 0]);
|
|
// 删除菜单
|
|
// 删除菜单
|
|
self::delWechatAccountMenu($applyIds);
|
|
self::delWechatAccountMenu($applyIds);
|
|
}
|
|
}
|
|
@@ -328,8 +328,11 @@ class WechatMenuService extends BaseService
|
|
if (getProp($param, 'user_id')) {
|
|
if (getProp($param, 'user_id')) {
|
|
$sql->where('user_id', $param['user_id']);
|
|
$sql->where('user_id', $param['user_id']);
|
|
}
|
|
}
|
|
- if (getProp($param, 'keyword')) {
|
|
|
|
- $sql->where('keyword', "like", "%" . $param['keyword'] . "%");
|
|
|
|
|
|
+ if (getProp($param, 'title')) {
|
|
|
|
+ $sql->where('title', "like", "%" . $param['title'] . "%");
|
|
|
|
+ }
|
|
|
|
+ if (getProp($param, 'type')) {
|
|
|
|
+ $sql->where('user_id', $param['type']);
|
|
}
|
|
}
|
|
if (getProp($param, 'miniprogram_id')) {
|
|
if (getProp($param, 'miniprogram_id')) {
|
|
$sql->where('miniprogram_id', $param['miniprogram_id']);
|
|
$sql->where('miniprogram_id', $param['miniprogram_id']);
|