跑通consumer下单之后派单给delivery2
This commit is contained in:
@@ -79,7 +79,6 @@ ALTER TABLE public.ml_delivery_staff ENABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.ml_delivery_stations ENABLE ROW LEVEL SECURITY;
|
||||
|
||||
DROP POLICY IF EXISTS delivery_staff_self_select ON public.ml_delivery_staff;
|
||||
DROP POLICY IF EXISTS delivery_staff_assignable_select ON public.ml_delivery_staff;
|
||||
DROP POLICY IF EXISTS delivery_staff_self_update ON public.ml_delivery_staff;
|
||||
CREATE POLICY delivery_staff_self_select
|
||||
ON public.ml_delivery_staff
|
||||
@@ -95,18 +94,6 @@ CREATE POLICY delivery_staff_self_select
|
||||
)
|
||||
);
|
||||
|
||||
CREATE POLICY delivery_staff_assignable_select
|
||||
ON public.ml_delivery_staff
|
||||
FOR SELECT
|
||||
TO authenticated
|
||||
USING (
|
||||
deleted_at IS NULL
|
||||
AND status = 1
|
||||
AND COALESCE(is_active, true) = true
|
||||
AND online_status = 'online'
|
||||
AND uid IS NOT NULL
|
||||
);
|
||||
|
||||
CREATE POLICY delivery_staff_self_update
|
||||
ON public.ml_delivery_staff
|
||||
FOR UPDATE
|
||||
@@ -149,4 +136,6 @@ COMMENT ON COLUMN public.ml_delivery_staff.deleted_by IS '软删除操作人';
|
||||
COMMENT ON COLUMN public.ml_delivery_stations.deleted_at IS '软删除时间';
|
||||
COMMENT ON COLUMN public.ml_delivery_stations.deleted_by IS '软删除操作人';
|
||||
|
||||
-- 派单候选人读取统一走 SECURITY DEFINER RPC,避免公开在线人员列表。
|
||||
|
||||
COMMIT;
|
||||
|
||||
Reference in New Issue
Block a user