select seasons_id from t_poemtype where poem_id=#{poemId} and `type`=#{type}
select seasons_id from t_dynastytype where dynasty_id=#{dynastyId} and `type`=#{type}
insert into t_poemtype (poem_id,`type`) values (#{poemId},#{type});
insert into t_dynastytype (dynasty_id,`type`) values (#{dynastyId},#{type});
delete from t_poemtype where poem_id=#{poemId}
delete from t_dynastytype where dynasty_id=#{dynastyId}
select `type` from t_poemtype where poem_id=#{poemId}
select `type` from t_dynastytype where dynasty_id=#{dynastyId}
select
dynasty_id,
dynasty_name,
username as dynasty_user,
dynasty_information,
givelike,
collection,
`explain`,
`time`
from t_dynasty left join t_user on dynasty_user=user_id
where dynasty_id in
(
select dynasty_id from t_dynastytype
where `type`=#{type} )
limit #{params.page},#{params.size} ;
select
COUNT(*)
from t_dynasty
where dynasty_id in
(
select dynasty_id from t_dynastytype
where `type`=#{type} )
select
poem_id,
poem_name,
username as poem_user,
poem_information,
givelike,
collection,
`explain`,
`time`
from t_poem left join t_user on poem_user=user_id
where poem_id in
(
select poem_id from t_poemtype
where `type`=#{type})
limit #{params.page},#{params.size} ;
select
COUNT(*)
from t_poem
where poem_id in
(
select poem_id from t_poemtype
where `type`=#{type})