@ -29,5 +29,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface GroupMessageDao extends BaseDao<GroupMessageEntity> {
GroupMessageEntity selectByMessageId(String messageId);
}
@ -92,4 +92,6 @@ public interface GroupMessageService extends BaseService<GroupMessageEntity> {
* @date 2021-04-22
void delete(String[] ids);
GroupMessageDTO getByMessageId(String messageId);
@ -96,4 +96,10 @@ public class GroupMessageServiceImpl extends BaseServiceImpl<GroupMessageDao, Gr
baseDao.deleteBatchIds(Arrays.asList(ids));
@Override
public GroupMessageDTO getByMessageId(String messageId) {
GroupMessageEntity entity = baseDao.selectByMessageId(messageId);
return ConvertUtils.sourceToTarget(entity, GroupMessageDTO.class);
@ -3,6 +3,10 @@
<mapper namespace="com.epmet.modules.group.dao.GroupMessageDao">
<select id="selectByMessageId" parameterType="java.lang.String" resultType="com.epmet.modules.group.entity.GroupMessageEntity">
select * from group_message gm
where GM.DEL_FLAG='0'
AND gm.MESSAGE_ID=#{messageId}
</select>
</mapper>