WechatAccountMenuConfigModel.php 561 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App\Models;
  3. use App\Http\Utils\BaseUtil;
  4. class WechatAccountMenuConfigModel extends BaseModel
  5. {
  6. protected $table = "wechat_account_menu_config";
  7. /**
  8. * 获取有效的下级菜单
  9. * @param $parentId int 上级
  10. */
  11. public static function getMenuByParentId($parentId)
  12. {
  13. return self::query()->where("menu_status",1)
  14. ->where("menu_parent_id",$parentId)
  15. ->where("wechat_app_code",BaseUtil::getAppCodeByQuery())
  16. ->orderBy("menu_sort_id","asc")
  17. ->get();
  18. }
  19. }