This commit is contained in:
郑明仁 2019-08-14 14:52:01 +08:00
parent 0f5b3404be
commit 1975fd04c6
3 changed files with 15 additions and 11 deletions

View File

@ -12,6 +12,6 @@ public interface EvaScriptMapper {
EvaluatingScript selectByPrimaryKey(Long id);
int updateByPrimaryKey(EvaluatingScript record);
String selectScriptByType(String scriptType);
EvaluatingScript selectScriptByType(String scriptType);
}

View File

@ -23,6 +23,10 @@ public class EvaScriptService {
}
public String getScriptByType(String evaScriptType) {
return evaScriptMapper.selectScriptByType(evaScriptType);
EvaluatingScript evaluatingScript = evaScriptMapper.selectScriptByType(evaScriptType);
if (evaluatingScript != null) {
return evaluatingScript.getScriptType();
}
return null;
}
}

View File

@ -105,18 +105,18 @@
where id = #{id,jdbcType=BIGINT}
</update>
<!--<select id="selectScriptByType" resultMap="java.lang.String"-->
<!--parameterType="java.lang.String">-->
<!--select-->
<!--<include refid="Base_Column_List" />-->
<!--from evaluating_script-->
<!--where script_type = #{scriptType,jdbcType=VARCHAR}-->
<!--</select>-->
<select id="selectScriptByType" resultMap="BaseResultMap"
parameterType="java.lang.String">
select
<include refid="Base_Column_List" />
from evaluating_script
where script_type = #{scriptType,jdbcType=VARCHAR}
</select>
<select id="selectEvaScriptForUpdate" resultMap="BaseResultMap"
parameterType="java.lang.String">
select
script
<include refid="Base_Column_List" />
from evaluating_script
where script_type = #{scriptType,jdbcType=VARCHAR} for update
</select>