diff --git a/src/main/java/weaver/bokang/xiao/shtx/mapper/ExamineMapper.java b/src/main/java/weaver/bokang/xiao/shtx/mapper/ExamineMapper.java index 9c5ff5e..df91d53 100644 --- a/src/main/java/weaver/bokang/xiao/shtx/mapper/ExamineMapper.java +++ b/src/main/java/weaver/bokang/xiao/shtx/mapper/ExamineMapper.java @@ -18,21 +18,21 @@ public interface ExamineMapper { @Select("select * from uf_examine_config") @CollectionMappings({ - @CollectionMapping(property = "apiConfigDetailList",column = "id",id = @Id(value = Integer.class,methodId = 1)) + @CollectionMapping(property = "examineConfigDetailList",column = "id",id = @Id(value = Integer.class,methodId = 1)) }) @Associations({ - @Association(property = "indexInformation",column = "CONFIG_CODE",id = @Id(value = Integer.class,methodId = 2)) + @Association(property = "indexInformation",column = "CONFIG_CODE",id = @Id(value = String.class,methodId = 2)) }) List queryApiConfig(); @Select("select * from uf_examine_config_dt1 where mainid = #{mainId}") @CollectionMethod(1) - ExamineConfigDetail queryDetail(@ParamMapper("mainId") int mainId); + List queryDetail(@ParamMapper("mainId") int mainId); - @Select("select * from uf_examine_config where CONFIG_CODE = #{configCode}") - @CollectionMethod(2) + @Select("select * from uf_zjgjxkhzbk where zbbh = #{configCode}") + @AssociationMethod(2) @ToLowerCase - Map queryIndexInformation(@ParamMapper("configCode") int configCode); + Map queryIndexInformation(@ParamMapper("configCode") String configCode); @Select("select mode.*,cus.field7 position,cus.field8 coefficient " + "from $t{tableName} mode " + diff --git a/src/test/java/bokang/xiao/NormalTest.java b/src/test/java/bokang/xiao/NormalTest.java index 65fcbb2..fc6b53d 100644 --- a/src/test/java/bokang/xiao/NormalTest.java +++ b/src/test/java/bokang/xiao/NormalTest.java @@ -100,12 +100,22 @@ public class NormalTest extends BaseTest { param.put("zzgxd",4); param.put("hjjb","A"); param.put("hjdj",1); - //String script = " cglx != null && !''.equals(cglx)"; - String script = " if (hjjb == 'A' && hjdj == 1) {x = 4}"; + List list = new ArrayList<>(); + list.add("jjgjg"); + param.put("list",list); + String script = " list != null && list.size() > 0"; + //String script = " if (hjjb == 'A' && hjdj == 1) {x = 4}"; boolean invokeVar = (Boolean) ScriptUtil.invokeScript(script, param); System.out.println(invokeVar); } + @Test + public void testTx() throws IOException { + ExamineSchedule examineSchedule = new ExamineSchedule(); + examineSchedule.setScoreModeId("136"); + examineSchedule.runCode(); + } + @Test public void testReport1() throws FileNotFoundException { BankService bankService = new BankService();