select name,
father,
unit,
required,
internal
from mom_ocean.product
where state = 1
and technology_id in (select id
from mom_ocean.technology
where technology.state = 1
and specifications_id = #{specificationsId})
select distinct version
from mom_ocean.product
where state = 1
and technology_id in (select id
from mom_ocean.technology
where technology.state = 1
and specifications_id = #{specificationsId})
order by version desc
select p.id pid,
p.name pname,
p.father pfather,
unit,
required,
internal,
t.father tfather,
t.name tname
from mom_ocean.product p
left join mom_ocean.technology t on p.technology_id = t.id
where p.state = 1
and p.version = #{version}
and specifications_id = #{specificationsId}
and p.name like concat('%',#{message},'%')
select distinct father
from mom_ocean.product
where state = 1
and technology_id = #{technologyId}
select *
from mom_ocean.product
where state = 1
and version = #{version}
and technology_id in (select id
from mom_ocean.technology
where technology.state = 1
and specifications_id = #{specificationsId})
select *
from mom_ocean.product
where state = 1
and version = #{ver}
and technology_id = #{technologyId}
update mom_ocean.product
set state=0
where technology_id = #{id}
update mom_ocean.product
set state=0
where technology_id in (${ids})
update mom_ocean.product
set state=0
where id in (${ids})