Merge branch 'dev/dev_xp' into dev/dev

This commit is contained in:
2024-09-06 09:32:40 +08:00
44 changed files with 1703 additions and 195 deletions

View File

@@ -39,6 +39,15 @@
</where>
and b.create_date not like '%:01'
and b.create_date not like '%:02'
<if test="ids != null and ids.size() > 0">
and a.id in
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="email != null and email != '' ">
and a.user_email like CONCAT('%', #{email}, '%')
</if>
GROUP BY b.account_id
ORDER BY b.account_id asc) d
left join trial_order c on d.user_email = c.email

View File

@@ -0,0 +1,67 @@
<?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.NotificationMapper">
<select id="getTypeCount" resultType="java.util.Map">
SELECT type, count(id) as count
FROM `t_notification`
WHERE receiver_id = #{receiverId}
AND is_read = 0
AND is_deleted = 0
GROUP BY type
</select>
<select id="getUniqueLikeAndFollow" resultType="com.ai.da.mapper.primary.entity.Notification">
SELECT *
FROM `t_notification`
WHERE type = #{type}
AND sender_id = #{senderId}
AND receiver_id = #{receiverId}
<if test="type == 'like'">
AND portfolio_id = #{portfolioId}
</if>
LIMIT 1
</select>
<update id="updateUniqueLikeAndFollow" >
UPDATE `t_notification`
SET
is_read = 0,
create_time = #{time},
update_time = #{time},
is_deleted = 0
WHERE id = #{id}
</update>
<update id="deleteNotification" >
UPDATE `t_notification`
SET
update_time = #{time},
is_deleted = 1
WHERE id = #{id}
</update>
<update id="setPersonalNotificationAllRead">
update `t_notification`
SET
is_read = 1,
update_time = #{time}
WHERE type = #{type}
AND receiver_id = #{receiverId}
AND is_read = 0
AND is_deleted = 0
</update>
<select id="getUnreadSysNotification" resultType="Long">
SELECT id
FROM `t_notification`
WHERE type = 'system'
AND id NOT IN (
SELECT system_notification_id
FROM `t_sys_notification_read_status`
WHERE account_id = #{accountId}
)
</select>
</mapper>

View File

@@ -0,0 +1,55 @@
<?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.UserFollowMapper">
<select id="getFolloweeListByFollower" resultType="com.ai.da.model.vo.AccountFollowVO">
SELECT a.id as sender_id, a.user_name AS user_name, a.avatar AS avatar, b.create_time AS create_time
FROM t_account a
INNER JOIN t_user_follow b ON a.id = b.followee_id
WHERE b.follower_id = #{followerAccountId}
<if test="order != null and order != ''">
ORDER BY b.create_time ${order}
</if>
LIMIT #{limit} OFFSET #{offset}
</select>
<select id="getFollowerListByFollowee" resultType="com.ai.da.model.vo.AccountFollowVO">
SELECT a.id as sender_id, a.user_name AS user_name, a.avatar AS avatar, b.create_time AS create_time
FROM t_account a
INNER JOIN t_user_follow b ON a.id = b.follower_id
WHERE b.followee_id = #{followeeAccountId}
<if test="order != null and order != ''">
ORDER BY b.create_time ${order}
</if>
LIMIT #{limit} OFFSET #{offset}
</select>
<select id="getFolloweeListByName" resultType="com.ai.da.model.vo.AccountFollowVO">
SELECT a.id as sender_id, a.user_name, a.avatar, b.create_time as create_time
FROM t_account a
INNER JOIN t_user_follow b ON a.id = b.followee_id
WHERE b.follower_id = #{followerId}
AND b.followee_id in (
SELECT id
FROM t_account
WHERE user_name = #{name} OR user_email = #{name}
)
GROUP BY a.user_email;
</select>
<select id="getFollowerListByName" resultType="com.ai.da.model.vo.AccountFollowVO">
SELECT a.id as sender_id, a.user_name, a.avatar, b.create_time as create_time
FROM t_account a
INNER JOIN t_user_follow b ON a.id = b.follower_id
WHERE b.followee_id = #{followeeId}
AND b.follower_id in (
SELECT id
FROM t_account
WHERE user_name = #{name} OR user_email = #{name}
)
GROUP BY a.user_email;
</select>
</mapper>

View File

@@ -139,6 +139,11 @@ 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.cannot.follow.yourself=You cannot follow yourself
you.have.already.followed.this.user=You have already followed this user
subscription.success=Subscription Success
unsubscribe.success=Unsubscribe Success
you.have.not.followed.the.current.user=You have not followed the current user
# 可能会报异常
# Informative:

View File

@@ -134,6 +134,11 @@ slogan.style.cannot.be.empty=标语风格文本不能为空。
slogan.image.cannot.be.empty=标语图片不能为空。
questionnaire.filled.out=您已填写过当前问卷。
user.has.no.account=当前用户没有账号。
you.cannot.follow.yourself=您不能关注您自己
you.have.already.followed.this.user=您已经关注当前用户
subscription.success=关注成功
unsubscribe.success=取消关注成功
you.have.not.followed.the.current.user=您还未关注当前用户
# 可能会报异常
# Informative: