赛会控制权

This commit is contained in:
wuyibo
2023-07-22 11:51:42 +08:00
parent d14ad66f3a
commit 7eefb42ca4
28 changed files with 1209 additions and 18 deletions

View File

@@ -5,11 +5,11 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 10.0.1.91:30005
server-addr: 182.43.49.98:30005
namespace: prod
config:
# 配置中心地址
server-addr: 10.0.1.91:30005
server-addr: 182.43.49.98:30005
# 配置文件格式
file-extension: yml
namespace: prod

View File

@@ -207,7 +207,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null ">
AND EXISTS (select 1 from competition_members c WHERE c.user_id=#{userId} and t.id=c.competition_id)
</if>
order by t.competition_time desc
<if test="competitionIds != null and competitionIds.size() > 0">
union
select * from competition t where 1=1
<if test="competitionIds != null and competitionIds.size() > 0">
and t.id in
<foreach collection="competitionIds" item="competitionId" open=" (" separator="," close=")">
#{competitionId}
</foreach>
</if>
<if test="status != null ">
AND t.status =#{status}
</if>
<if test="competitionNature != null ">
AND t.competition_nature =#{competitionNature}
</if>
<if test="cityCode != null and cityCode != ''">
AND t.city_code like CONCAT('%',#{cityCode},'%')
</if>
<if test="cityName != null and cityName != ''">
AND t.city_name like CONCAT('%',#{cityName},'%')
</if>
<if test="mainTeamName != null and mainTeamName != ''">
AND t.main_team_name like CONCAT('%',#{mainTeamName},'%')
</if>
<if test="guestTeamName != null and guestTeamName != ''">
AND t.guest_team_name like CONCAT('%',#{guestTeamName},'%')
</if>
<if test="designated != null ">
AND t.designated=#{designated}
</if>
<if test="competitionAddress != null and competitionAddress != '' ">
AND t.competition_address like CONCAT('%',#{competitionAddress},'%')
</if>
<if test="buildingName != null and buildingName != '' ">
AND t.building_name like CONCAT('%',#{buildingName},'%')
</if>
<if test="id != null ">
AND t.id=#{id}
</if>
<if test="auditStatus != null ">
AND t.audit_status = #{auditStatus}
</if>
<if test="isDeleted != null ">
AND t.is_deleted = #{isDeleted}
</if>
<if test="word != null and word != ''">
AND (t.main_team_name like CONCAT('%',#{word},'%')
or t.guest_team_name like CONCAT('%',#{word},'%')
or t.building_name like CONCAT('%',#{word},'%')
or t.competition_address like CONCAT('%',#{word},'%')
)
</if>
<if test="userId != null ">
AND EXISTS (select 1 from competition_members c WHERE c.user_id=#{userId} and t.id=c.competition_id)
</if>
</if>
</select>
<insert id="insertCompetition" parameterType="Competition" useGeneratedKeys="true" keyProperty="id">

View File

@@ -173,6 +173,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
order by t.created_time desc
</select>
<select id="getMyJoinCompetitionTeam" resultType="com.ruoyi.system.domain.vo.CompetitionOfTeamVo">
select t.* from competition_of_team t where t.is_deleted = 0
<if test="id != null ">
AND t.id=#{id}
</if>
<if test="competitionId != null ">
AND t.competition_id=#{competitionId}
</if>
<if test="status != null ">
AND t.status =#{status}
</if>
<if test="teamId != null ">
AND t.team_id =#{teamId}
</if>
<if test="competitionGroup != null ">
AND t.competition_group =#{competitionGroup}
</if>
<if test="teamName != null and teamName != ''">
AND t.team_name like CONCAT('%',#{teamName},'%')
</if>
<if test="contacts != null and contacts != ''">
AND t.contacts like CONCAT('%',#{contacts},'%')
</if>
<if test="contactsTel != null and contactsTel != ''">
AND t.contacts_tel like CONCAT('%',#{contactsTel},'%')
</if>
<if test="contactsAreaCode != null and contactsAreaCode != ''">
AND t.contacts_area_code like CONCAT('%',#{contactsAreaCode},'%')
</if>
<if test="isDeleted != null ">
AND t.is_deleted = #{isDeleted}
</if>
<if test="userId != null ">
AND EXISTS (select 1 from competition_members c WHERE c.user_id=#{userId} and t.competition_id = c.competition_id and t.id=c.competition_of_team_id)
</if>
order by t.created_time desc
</select>
<insert id="insertCompetitionOfTeam" parameterType="CompetitionOfTeam" useGeneratedKeys="true" keyProperty="id">
insert into competition_of_team

View File

@@ -0,0 +1,119 @@
<?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.ruoyi.system.mapper.CompetitionSharePermissionsMapper">
<resultMap type="CompetitionSharePermissions" id="CompetitionSharePermissionsResult">
<result property="id" column="id" />
<result property="createTime" column="create_time" />
<result property="competitionId" column="competition_id" />
<result property="userId" column="user_id" />
<result property="userTel" column="user_tel" />
<result property="userName" column="user_name" />
<result property="status" column="status" />
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="isDeleted" column="is_deleted" />
<result property="remark" column="remark" />
<result property="canSetType" column="can_set_type" />
</resultMap>
<sql id="selectCompetitionSharePermissionsVo">
select id, create_time, competition_id, user_id, user_tel, user_name, status, update_time, create_by, update_by, is_deleted, remark, can_set_type from competition_share_permissions
</sql>
<select id="selectCompetitionSharePermissionsList" parameterType="CompetitionSharePermissions" resultMap="CompetitionSharePermissionsResult">
<include refid="selectCompetitionSharePermissionsVo"/>
<where>
<if test="competitionId != null "> and competition_id = #{competitionId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="userTel != null and userTel != ''"> and user_tel = #{userTel}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="status != null "> and status = #{status}</if>
<if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
<if test="canSetType != null and canSetType != ''"> and can_set_type = #{canSetType}</if>
</where>
</select>
<select id="selectCompetitionSharePermissionsById" parameterType="Long" resultMap="CompetitionSharePermissionsResult">
<include refid="selectCompetitionSharePermissionsVo"/>
where id = #{id}
</select>
<insert id="insertCompetitionSharePermissions" parameterType="CompetitionSharePermissions" useGeneratedKeys="true" keyProperty="id">
insert into competition_share_permissions
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createTime != null">create_time,</if>
<if test="competitionId != null">competition_id,</if>
<if test="userId != null">user_id,</if>
<if test="userTel != null and userTel != ''">user_tel,</if>
<if test="userName != null and userName != ''">user_name,</if>
<if test="status != null">status,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="isDeleted != null">is_deleted,</if>
<if test="remark != null">remark,</if>
<if test="canSetType != null">can_set_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createTime != null">#{createTime},</if>
<if test="competitionId != null">#{competitionId},</if>
<if test="userId != null">#{userId},</if>
<if test="userTel != null and userTel != ''">#{userTel},</if>
<if test="userName != null and userName != ''">#{userName},</if>
<if test="status != null">#{status},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="isDeleted != null">#{isDeleted},</if>
<if test="remark != null">#{remark},</if>
<if test="canSetType != null">#{canSetType},</if>
</trim>
</insert>
<update id="updateCompetitionSharePermissions" parameterType="CompetitionSharePermissions">
update competition_share_permissions
<trim prefix="SET" suffixOverrides=",">
<if test="createTime != null">create_time = #{createTime},</if>
<if test="competitionId != null">competition_id = #{competitionId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="userTel != null and userTel != ''">user_tel = #{userTel},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="status != null">status = #{status},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="isDeleted != null">is_deleted = #{isDeleted},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="canSetType != null">can_set_type = #{canSetType},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCompetitionSharePermissionsById" parameterType="Long">
delete from competition_share_permissions where id = #{id}
</delete>
<delete id="deleteCompetitionSharePermissionsByIds" parameterType="String">
delete from competition_share_permissions where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="getList" resultType="com.ruoyi.system.domain.CompetitionSharePermissions">
<include refid="selectCompetitionSharePermissionsVo"/>
<where>
<if test="competitionId != null "> and competition_id = #{competitionId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="userName != null and userName != ''"> AND user_name like CONCAT('%',#{userName},'%')</if>
<if test="userTel != null and userTel != ''"> and user_tel like CONCAT('%',#{userTel},'%')</if>
<if test="status != null "> and status = #{status}</if>
<if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
<if test="canSetType != null and canSetType != ''"> and can_set_type = #{canSetType}</if>
</where>
</select>
</mapper>

View File

@@ -41,6 +41,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectByCode" resultType="com.ruoyi.system.domain.UserRole">
select * from user_role where role_code = #{roleCode} limit 1
</select>
<select id="selectRoleByUserId" resultType="com.ruoyi.system.domain.UserRole">
select * from user_role where USER_ID = #{userId}
</select>
<insert id="insertUserRole" parameterType="UserRole" useGeneratedKeys="true" keyProperty="id">
insert into user_role

View File

@@ -75,6 +75,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</select>
<select id="getUserInfoBy" resultType="com.ruoyi.system.domain.WxUser">
<include refid="selectWxUserVo"/>
<where>
<if test="isDeleted != null "> and IS_DELETED = #{isDeleted}</if>
<if test="createdTime != null "> and CREATED_TIME = #{createdTime}</if>
<if test="createdBy != null and createdBy != ''"> and CREATED_BY = #{createdBy}</if>
<if test="modifiedBy != null and modifiedBy != ''"> and MODIFIED_BY = #{modifiedBy}</if>
<if test="lastUpdatedTime != null "> and LAST_UPDATED_TIME = #{lastUpdatedTime}</if>
<if test="loginName != null and loginName != ''"> and LOGIN_NAME like concat('%', #{loginName}, '%')</if>
<if test="passWord != null and passWord != ''"> and PASS_WORD = #{passWord}</if>
<if test="role != null and role != ''"> and ROLE = #{role}</if>
<if test="openid != null and openid != ''"> and OPENID = #{openid}</if>
<if test="avatar != null and avatar != ''"> and AVATAR = #{avatar}</if>
<if test="gender != null and gender != ''"> and GENDER = #{gender}</if>
<if test="userName != null and userName != ''"> and USER_NAME like concat('%', #{userName}, '%')</if>
<if test="telephone != null and telephone != ''"> and TELEPHONE = #{telephone}</if>
<if test="birthday != null "> and BIRTHDAY = #{birthday}</if>
<if test="height != null "> and HEIGHT = #{height}</if>
<if test="weight != null "> and WEIGHT = #{weight}</if>
<if test="teamPosition != null and teamPosition != ''"> and TEAM_POSITION = #{teamPosition}</if>
<if test="tag != null and tag != ''"> and TAG = #{tag}</if>
<if test="enabled != null and enabled != ''"> and ENABLED = #{enabled}</if>
<if test="unionid != null and unionid != ''"> and UNIONID = #{unionid}</if>
<if test="officialAccountOpenid != null and officialAccountOpenid != ''"> and OFFICIAL_ACCOUNT_OPENID = #{officialAccountOpenid}</if>
<if test="realName != null and realName != ''"> and real_name like concat('%', #{realName}, '%')</if>
</where>
limit 1
</select>
<insert id="insertWxUser" parameterType="WxUser" useGeneratedKeys="true" keyProperty="id">
insert into user_info