package jnpf.limsMapper;
|
|
import jnpf.limsEntity.LimsMessageConfigRow;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Result;
|
import org.apache.ibatis.annotations.Results;
|
import org.apache.ibatis.annotations.Select;
|
|
import java.util.List;
|
|
@Mapper
|
public interface LimsMessageConfigMapper {
|
@Select("SELECT s.f_id AS config_id, s.f_enabled_mark AS config_enabled, " +
|
"s.f_message_source AS config_source, st.f_id AS relation_id, " +
|
"st.f_enabled_mark AS relation_enabled, st.f_message_type AS relation_message_type, " +
|
"t.f_id AS template_id, t.f_enabled_mark AS template_enabled, " +
|
"t.f_message_type AS template_message_type, t.f_message_source AS template_source, " +
|
"t.f_menu_url AS menu_url " +
|
"FROM base_msg_send s " +
|
"LEFT JOIN base_msg_send_template st ON st.f_send_config_id = s.f_id " +
|
"LEFT JOIN base_msg_template t ON t.f_id = st.f_template_id " +
|
"WHERE s.f_en_code = #{eventCode}")
|
@Results({
|
@Result(column = "config_id", property = "configId"),
|
@Result(column = "config_enabled", property = "configEnabled"),
|
@Result(column = "config_source", property = "configSource"),
|
@Result(column = "relation_id", property = "relationId"),
|
@Result(column = "relation_enabled", property = "relationEnabled"),
|
@Result(column = "relation_message_type", property = "relationMessageType"),
|
@Result(column = "template_id", property = "templateId"),
|
@Result(column = "template_enabled", property = "templateEnabled"),
|
@Result(column = "template_message_type", property = "templateMessageType"),
|
@Result(column = "template_source", property = "templateSource"),
|
@Result(column = "menu_url", property = "menuUrl")
|
})
|
List<LimsMessageConfigRow> selectByEventCode(@Param("eventCode") String eventCode);
|
}
|