You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: checker.go
    path of file: ./repos/clickvisual/api/internal/service/permission
    
    the code of the file until where you have to start completion: package permission

import (
	"fmt"

	"github.com/clickvisual/clickvisual/api/internal/pkg/model/view"
	"github.com/clickvisual/clickvisual/api/internal/service/permission/pmsplugin"
)

type (
	iBaseChecker interface {
		// CheckDomLockIfActWrite check target req.Domain is locked or not when req.Acts contain wri
    
func (b *baseChecker) CheckDomLockIfActWrite(reqParam *view.ReqPermission) error {
	// if reqAct is "view" i.e. readonly, then return nil directly
	if len(reqParam.Acts) == 1 && reqParam.Acts[0] == pmsplugin.ActView {
		if reqParam.DomainType == pmsplugin.SystemDom {
			reqParam.DomainType = ""
		}
		return nil
	}

	// 1. Do some special processes before checking lock status of target domain if needed.

	// 2. check normal req.Domain is locked or not
	_, isReqDomValid := pmsplugin.PermittedDomPrefixMap[reqParam.DomainType]
	if !isReqDomValid {
		return fmt.Errorf(MsgInvalidReqDomType)
	}
	switch reqParam.DomainType {
	case pmsplugin.SystemDom:
		reqParam.DomainType = ""
	case pmsplugin.PrefixDatabase:
	case pmsplugin.PrefixTable:
	default:
		return fmt.Errorf("target reqDomType %s has not been supported checking in pms yet", reqParam.DomainType)
	}
	return nil
}