We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package mapper var XmlBytes = []byte(` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://raw.githubusercontent.com/zhuxiujia/GoMybatis/master/mybatis-3-mapper.dtd"> <mapper> <select id="SelectCountByKey"> select count(*) as num from ek8keys where ek8key=#{key} </select> </mapper> `) type IdentityMapperr struct { SelectCountByKey func(key string) (int, error) }
调用: engine:= config.MysqlServer.Connection() engine.WriteMapperPtr(&identityMapper,mapper.XmlBytes) result,err1:=identityMapper.SelectCountByKey(key) //key=123456
调用 SelectCountByKey(“123456”)查询,sql中的#{key}获取不到,查出的结果为0,哪配错了啊
The text was updated successfully, but these errors were encountered:
No branches or pull requests
调用 SelectCountByKey(“123456”)查询,sql中的#{key}获取不到,查出的结果为0,哪配错了啊
The text was updated successfully, but these errors were encountered: