1、为发布的作品添加标签
2、修改标签 3、不允许用户重复参与活动 4、查询所有参与活动的作品
This commit is contained in:
@@ -9,4 +9,14 @@
|
||||
from portfolio
|
||||
where id = #{originalPortfolioId}
|
||||
</select>
|
||||
|
||||
<select id="getByTag" resultType="com.ai.da.mapper.primary.entity.Portfolio">
|
||||
SELECT p.*
|
||||
FROM portfolio p
|
||||
JOIN t_portfolio_tags pt ON p.id = pt.portfolio_id
|
||||
JOIN t_tags t ON pt.tag_id = t.id
|
||||
WHERE p.account_id = #{accountId}
|
||||
AND t.tag_name = #{tagName};
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
16
src/main/resources/mapper/primary/PortfolioTagsMapper.xml
Normal file
16
src/main/resources/mapper/primary/PortfolioTagsMapper.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ai.da.mapper.primary.PortfolioTagsMapper">
|
||||
|
||||
<delete id="deleteByPortfolioId">
|
||||
DELETE
|
||||
FROM t_portfolio_tags
|
||||
WHERE portfolio_id = #{portfolioId};
|
||||
</delete>
|
||||
|
||||
<insert id="insertIgnore">
|
||||
INSERT
|
||||
IGNORE INTO t_portfolio_tags (portfolio_id, tag_id, create_time)
|
||||
VALUES (#{portfolioId}, #{tagId}, #{time});
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -9,5 +9,12 @@
|
||||
ORDER BY relevance DESC;
|
||||
</select>
|
||||
|
||||
<select id="getTagByPortfolioId" resultType="com.ai.da.mapper.primary.entity.Tags">
|
||||
SELECT t.*
|
||||
FROM t_tags t
|
||||
JOIN t_portfolio_tags pt ON t.id = pt.tag_id
|
||||
WHERE pt.portfolio_id = #{portfolioId};
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -139,6 +139,7 @@ slogan.style.cannot.be.empty=Slogan style text cannot be empty.
|
||||
slogan.image.cannot.be.empty=Slogan image cannot be empty.
|
||||
questionnaire.filled.out=You have filled out the current questionnaire.
|
||||
user.has.no.account=The current user has no account!
|
||||
you.have.participated.in.the.event=You have participated in the event.
|
||||
|
||||
# 可能会报异常
|
||||
# Informative:
|
||||
|
||||
@@ -134,6 +134,7 @@ slogan.style.cannot.be.empty=标语风格文本不能为空。
|
||||
slogan.image.cannot.be.empty=标语图片不能为空。
|
||||
questionnaire.filled.out=您已填写过当前问卷。
|
||||
user.has.no.account=当前用户没有账号。
|
||||
you.have.participated.in.the.event=您已经参与活动
|
||||
|
||||
# 可能会报异常
|
||||
# Informative:
|
||||
|
||||
Reference in New Issue
Block a user