@Inject
@Reference
private PayRefundService payRefundService;
Sql sql = Sqls.create("select count(*)" +
" from" +
" pay_refund" +
" where OrderId in" +
" (select OrderId from pay_order where agentId='" + agentId + "' and ifAgent='1')" +
" and ifSuccess='1'");
Sql execute = payRefundService.execute(sql);
6 回复
@wendal 好哒,新入坑的学生小白,会多多学习的
Sql sql = Sqls.create("select *" +
" from" +
" pay_refund" +
" where yhOrderId in" +
" (select yhOrderId from pay_order where agentId=@agentId and ifAgent='1')" +
" and ifSuccess='1'");
sql.setVar("agentId",agentId);
refundList = payRefundService.query(Cnd.where((SqlExpression) sql));
报这个错
java.lang.ClassCastException: org.nutz.dao.impl.sql.NutSql cannot be cast to org.nutz.dao.util.cri.SqlExpression
at cn.wizzer.app.web.modules.controllers.platform.pay.PayStatisticsController.orderData(PayStatisticsController.java:143)
at cn.wizzer.app.web.modules.controllers.platform.pay.PayStatisticsController$FM$orderData$254c05ef9d471bc2ecada6b6c92aeb7d.invoke(PayStatisticsController.java)
添加回复
请先登陆