quanwei
2 days ago 04102f7237efefa744090ed7c25f7b5d0807b679
admin/app/common/model/file/UploadGroup.php
@@ -16,18 +16,21 @@
    /**
     * 分组详情
     */
    public static function detail($group_id, $shop_supplier_id = 0) {
        return (new static())->where('shop_supplier_id', '=', $shop_supplier_id)->find($group_id);
    public static function detail($group_id, $shop_supplier_id = 0, $branch_id = 0) {
        return (new static())->where('shop_supplier_id', '=', $shop_supplier_id)
        ->where('branch_id', '=', $branch_id) // by lyzflash
        ->find($group_id);
    }
    /**
     * 获取列表记录
     */
    public function getList($groupType = '', $shop_supplier_id = 0)
    public function getList($groupType = '', $shop_supplier_id = 0, $branch_id = 0)
    {
        $model = $this;
        !empty($groupType) && $model = $model->where('group_type', '=', trim($groupType));
        return $model->where('shop_supplier_id', '=', $shop_supplier_id)
            ->where('branch_id', '=', $branch_id)
            ->where('is_delete', '=', 0)
            ->order(['sort' => 'asc', 'create_time' => 'desc'])
            ->select();