完善异常账户预警口径和账户查询
This commit is contained in:
@@ -39,6 +39,10 @@ public class CcdiAccountInfoQueryDTO implements Serializable {
|
||||
@Schema(description = "账户姓名")
|
||||
private String accountName;
|
||||
|
||||
/** 账户号码 */
|
||||
@Schema(description = "账户号码")
|
||||
private String accountNo;
|
||||
|
||||
/** 账户类型 */
|
||||
@Schema(description = "账户类型")
|
||||
private String accountType;
|
||||
|
||||
@@ -104,6 +104,9 @@
|
||||
<if test="query.accountName != null and query.accountName != ''">
|
||||
AND ai.account_name LIKE CONCAT('%', #{query.accountName}, '%')
|
||||
</if>
|
||||
<if test="query.accountNo != null and query.accountNo != ''">
|
||||
AND ai.account_no LIKE CONCAT('%', #{query.accountNo}, '%')
|
||||
</if>
|
||||
<if test="query.accountType != null and query.accountType != ''">
|
||||
AND ai.account_type = #{query.accountType}
|
||||
</if>
|
||||
|
||||
@@ -38,6 +38,18 @@ class CcdiAccountInfoMapperTest {
|
||||
assertTrue(sql.contains("ai.owner_type <> 'credit_customer'"), sql);
|
||||
}
|
||||
|
||||
@Test
|
||||
void selectAccountInfoPage_shouldFilterByAccountNo() throws Exception {
|
||||
MappedStatement mappedStatement = loadMappedStatement(
|
||||
"com.ruoyi.info.collection.mapper.CcdiAccountInfoMapper.selectAccountInfoPage");
|
||||
CcdiAccountInfoQueryDTO queryDTO = new CcdiAccountInfoQueryDTO();
|
||||
queryDTO.setAccountNo("6222");
|
||||
|
||||
String sql = renderSql(mappedStatement, Map.of("query", queryDTO)).toLowerCase();
|
||||
|
||||
assertTrue(sql.contains("ai.account_no like concat('%', ?, '%')"), sql);
|
||||
}
|
||||
|
||||
private MappedStatement loadMappedStatement(String statementId) throws Exception {
|
||||
Configuration configuration = new Configuration();
|
||||
configuration.setEnvironment(new Environment("test", new JdbcTransactionFactory(), new NoOpDataSource()));
|
||||
|
||||
Reference in New Issue
Block a user