package cn.iocoder.yudao.module.mes.service.wm.productsales;
|
|
import cn.iocoder.yudao.module.mes.dal.mysql.wm.productsales.MesWmProductSalesDetailMapper;
|
import net.sf.jsqlparser.parser.CCJSqlParserUtil;
|
import org.apache.ibatis.annotations.Select;
|
import org.junit.jupiter.api.Test;
|
|
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
|
class SalesBatchQueryParserTest {
|
@Test void shipmentBatchQueryCanBeParsedByMybatisInterceptor() throws Exception {
|
String sql = String.join("", MesWmProductSalesDetailMapper.class
|
.getMethod("countFinishedSaleBatch", Long.class, Long.class, Long.class, Integer.class)
|
.getAnnotation(Select.class).value()).replaceAll("#\\{[^}]+}", "?");
|
assertDoesNotThrow(() -> CCJSqlParserUtil.parse(sql));
|
}
|
}
|