Skip to content
New issue

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

rpc info有问题 #147

Open
sdttt1 opened this issue Nov 23, 2023 · 0 comments
Open

rpc info有问题 #147

sdttt1 opened this issue Nov 23, 2023 · 0 comments

Comments

@sdttt1
Copy link

sdttt1 commented Nov 23, 2023

微服务

@CoolRpcService({
entity: DemoGoodsEntity,
method: ['add', 'delete', 'update', 'info', 'list', 'page'],
})
中使用
let result = await this.rpc.call('goods', 'DemoGoodsService', 'info', {
id: 1
});
报错误
{
"code": 1001,
"message": "You must provide selection conditions in order to find a single row."
}

请修改一下
@cool-midway/rpc/base.js 中的async info() 中的 const info = await this.entity.findOne({ id });为 const info = await this.entity.createQueryBuilder().where({id}).getOne();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant