小程序接口迁移到ry

This commit is contained in:
wuyibo
2023-07-08 18:24:10 +08:00
parent b02906b4fa
commit 264430d8a2
225 changed files with 20401 additions and 1933 deletions

View File

@@ -0,0 +1,114 @@
<?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.BuildingInfoDetailMapper">
<resultMap type="com.ruoyi.system.domain.BuildingInfoDetail" id="BuildingInfoDetailResult">
<result property="id" column="ID" />
<result property="isDeleted" column="IS_DELETED" />
<result property="createdTime" column="CREATED_TIME" />
<result property="createdBy" column="CREATED_BY" />
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
<result property="buildingId" column="BUILDING_ID" />
<result property="businessHours" column="BUSINESS_HOURS" />
<result property="linkman" column="LINKMAN" />
<result property="linkphone" column="LINKPHONE" />
<result property="feeStandard" column="FEE_STANDARD" />
<result property="labelDesc" column="LABEL_DESC" />
<result property="notice" column="NOTICE" />
</resultMap>
<sql id="selectBuildingInfoDetailVo">
select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, BUILDING_ID, BUSINESS_HOURS, LINKMAN, LINKPHONE, FEE_STANDARD, LABEL_DESC, NOTICE from building_info_detail
</sql>
<select id="selectBuildingInfoDetailList" resultMap="BuildingInfoDetailResult">
<include refid="selectBuildingInfoDetailVo"/>
<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="buildingId != null "> and BUILDING_ID = #{buildingId}</if>
<if test="businessHours != null and businessHours != ''"> and BUSINESS_HOURS = #{businessHours}</if>
<if test="linkman != null and linkman != ''"> and LINKMAN = #{linkman}</if>
<if test="linkphone != null and linkphone != ''"> and LINKPHONE = #{linkphone}</if>
<if test="feeStandard != null and feeStandard != ''"> and FEE_STANDARD = #{feeStandard}</if>
<if test="labelDesc != null and labelDesc != ''"> and LABEL_DESC = #{labelDesc}</if>
<if test="notice != null and notice != ''"> and NOTICE = #{notice}</if>
</where>
</select>
<select id="selectBuildingInfoDetailById" parameterType="Long" resultMap="BuildingInfoDetailResult">
<include refid="selectBuildingInfoDetailVo"/>
where ID = #{id}
</select>
<select id="selectOneByBuildingId" resultType="com.ruoyi.system.domain.BuildingInfoDetail">
select * from building_info_detail where BUILDING_ID = #{buildingId}
</select>
<insert id="insertBuildingInfoDetail" useGeneratedKeys="true" keyProperty="id">
insert into building_info_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="createdBy != null">CREATED_BY,</if>
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
<if test="buildingId != null">BUILDING_ID,</if>
<if test="businessHours != null">BUSINESS_HOURS,</if>
<if test="linkman != null">LINKMAN,</if>
<if test="linkphone != null">LINKPHONE,</if>
<if test="feeStandard != null">FEE_STANDARD,</if>
<if test="labelDesc != null">LABEL_DESC,</if>
<if test="notice != null">NOTICE,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">#{isDeleted},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
<if test="buildingId != null">#{buildingId},</if>
<if test="businessHours != null">#{businessHours},</if>
<if test="linkman != null">#{linkman},</if>
<if test="linkphone != null">#{linkphone},</if>
<if test="feeStandard != null">#{feeStandard},</if>
<if test="labelDesc != null">#{labelDesc},</if>
<if test="notice != null">#{notice},</if>
</trim>
</insert>
<update id="updateBuildingInfoDetail" >
update building_info_detail
<trim prefix="SET" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
<if test="buildingId != null">BUILDING_ID = #{buildingId},</if>
<if test="businessHours != null">BUSINESS_HOURS = #{businessHours},</if>
<if test="linkman != null">LINKMAN = #{linkman},</if>
<if test="linkphone != null">LINKPHONE = #{linkphone},</if>
<if test="feeStandard != null">FEE_STANDARD = #{feeStandard},</if>
<if test="labelDesc != null">LABEL_DESC = #{labelDesc},</if>
<if test="notice != null">NOTICE = #{notice},</if>
</trim>
where ID = #{id}
</update>
<delete id="deleteBuildingInfoDetailById" parameterType="Long">
delete from building_info_detail where ID = #{id}
</delete>
<delete id="deleteBuildingInfoDetailByIds" parameterType="String">
delete from building_info_detail where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,91 @@
<?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.BuildingLabelMapper">
<resultMap type="com.ruoyi.system.domain.BuildingLabel" id="BuildingLabelResult">
<result property="id" column="ID" />
<result property="isDeleted" column="IS_DELETED" />
<result property="createdTime" column="CREATED_TIME" />
<result property="createdBy" column="CREATED_BY" />
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
<result property="buildingId" column="BUILDING_ID" />
<result property="featureLabelId" column="FEATURE_LABEL_ID" />
<result property="remark" column="REMARK" />
</resultMap>
<sql id="selectBuildingLabelVo">
select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, BUILDING_ID, FEATURE_LABEL_ID, REMARK from building_label
</sql>
<select id="selectBuildingLabelList" resultMap="BuildingLabelResult">
<include refid="selectBuildingLabelVo"/>
<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="buildingId != null "> and BUILDING_ID = #{buildingId}</if>
<if test="featureLabelId != null "> and FEATURE_LABEL_ID = #{featureLabelId}</if>
<if test="remark != null and remark != ''"> and REMARK = #{remark}</if>
</where>
</select>
<select id="selectBuildingLabelById" parameterType="Long" resultMap="BuildingLabelResult">
<include refid="selectBuildingLabelVo"/>
where ID = #{id}
</select>
<insert id="insertBuildingLabel" useGeneratedKeys="true" keyProperty="id">
insert into building_label
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="createdBy != null">CREATED_BY,</if>
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
<if test="buildingId != null">BUILDING_ID,</if>
<if test="featureLabelId != null">FEATURE_LABEL_ID,</if>
<if test="remark != null">REMARK,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">#{isDeleted},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
<if test="buildingId != null">#{buildingId},</if>
<if test="featureLabelId != null">#{featureLabelId},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateBuildingLabel" >
update building_label
<trim prefix="SET" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
<if test="buildingId != null">BUILDING_ID = #{buildingId},</if>
<if test="featureLabelId != null">FEATURE_LABEL_ID = #{featureLabelId},</if>
<if test="remark != null">REMARK = #{remark},</if>
</trim>
where ID = #{id}
</update>
<delete id="deleteBuildingLabelById" parameterType="Long">
delete from building_label where ID = #{id}
</delete>
<delete id="deleteBuildingLabelByIds" parameterType="String">
delete from building_label where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,86 @@
<?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.BuildingTeamRelMapper">
<resultMap type="BuildingTeamRel" id="BuildingTeamRelResult">
<result property="id" column="ID" />
<result property="isDeleted" column="IS_DELETED" />
<result property="createdTime" column="CREATED_TIME" />
<result property="createdBy" column="CREATED_BY" />
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
<result property="buildingId" column="BUILDING_ID" />
<result property="teamId" column="TEAM_ID" />
</resultMap>
<sql id="selectBuildingTeamRelVo">
select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, BUILDING_ID, TEAM_ID from building_team_rel
</sql>
<select id="selectBuildingTeamRelList" parameterType="BuildingTeamRel" resultMap="BuildingTeamRelResult">
<include refid="selectBuildingTeamRelVo"/>
<where>
<if test="isDeleted != null and isDeleted != ''"> 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="buildingId != null "> and BUILDING_ID = #{buildingId}</if>
<if test="teamId != null "> and TEAM_ID = #{teamId}</if>
</where>
</select>
<select id="selectBuildingTeamRelById" parameterType="Long" resultMap="BuildingTeamRelResult">
<include refid="selectBuildingTeamRelVo"/>
where ID = #{id}
</select>
<insert id="insertBuildingTeamRel" parameterType="BuildingTeamRel" useGeneratedKeys="true" keyProperty="id">
insert into building_team_rel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="createdBy != null">CREATED_BY,</if>
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
<if test="buildingId != null">BUILDING_ID,</if>
<if test="teamId != null">TEAM_ID,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">#{isDeleted},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
<if test="buildingId != null">#{buildingId},</if>
<if test="teamId != null">#{teamId},</if>
</trim>
</insert>
<update id="updateBuildingTeamRel" parameterType="BuildingTeamRel">
update building_team_rel
<trim prefix="SET" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
<if test="buildingId != null">BUILDING_ID = #{buildingId},</if>
<if test="teamId != null">TEAM_ID = #{teamId},</if>
</trim>
where ID = #{id}
</update>
<delete id="deleteBuildingTeamRelById" parameterType="Long">
delete from building_team_rel where ID = #{id}
</delete>
<delete id="deleteBuildingTeamRelByIds" parameterType="String">
delete from building_team_rel where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,116 @@
<?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.CameraInfoMapper">
<resultMap type="CameraInfo" id="CameraInfoResult">
<result property="id" column="ID" />
<result property="isDeleted" column="IS_DELETED" />
<result property="createdTime" column="CREATED_TIME" />
<result property="createdBy" column="CREATED_BY" />
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
<result property="status" column="STATUS" />
<result property="cityCode" column="CITY_CODE" />
<result property="type" column="TYPE" />
<result property="name" column="NAME" />
<result property="sn" column="SN" />
<result property="buildingId" column="BUILDING_ID" />
<result property="remark" column="REMARK" />
<result property="url" column="URL" />
</resultMap>
<sql id="selectCameraInfoVo">
select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, STATUS, CITY_CODE, TYPE, NAME, SN, BUILDING_ID, REMARK, URL from camera_info
</sql>
<select id="selectCameraInfoList" parameterType="CameraInfo" resultMap="CameraInfoResult">
<include refid="selectCameraInfoVo"/>
<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="status != null and status != ''"> and STATUS = #{status}</if>
<if test="cityCode != null and cityCode != ''"> and CITY_CODE = #{cityCode}</if>
<if test="type != null and type != ''"> and TYPE = #{type}</if>
<if test="name != null and name != ''"> and NAME like concat('%', #{name}, '%')</if>
<if test="sn != null and sn != ''"> and SN = #{sn}</if>
<if test="buildingId != null "> and BUILDING_ID = #{buildingId}</if>
<if test="remark != null and remark != ''"> and REMARK = #{remark}</if>
<if test="url != null and url != ''"> and URL = #{url}</if>
</where>
</select>
<select id="selectCameraInfoById" parameterType="Long" resultMap="CameraInfoResult">
<include refid="selectCameraInfoVo"/>
where ID = #{id}
</select>
<insert id="insertCameraInfo" parameterType="CameraInfo" useGeneratedKeys="true" keyProperty="id">
insert into camera_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="createdBy != null">CREATED_BY,</if>
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
<if test="status != null">STATUS,</if>
<if test="cityCode != null">CITY_CODE,</if>
<if test="type != null">TYPE,</if>
<if test="name != null">NAME,</if>
<if test="sn != null">SN,</if>
<if test="buildingId != null">BUILDING_ID,</if>
<if test="remark != null">REMARK,</if>
<if test="url != null">URL,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">#{isDeleted},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
<if test="status != null">#{status},</if>
<if test="cityCode != null">#{cityCode},</if>
<if test="type != null">#{type},</if>
<if test="name != null">#{name},</if>
<if test="sn != null">#{sn},</if>
<if test="buildingId != null">#{buildingId},</if>
<if test="remark != null">#{remark},</if>
<if test="url != null">#{url},</if>
</trim>
</insert>
<update id="updateCameraInfo" parameterType="CameraInfo">
update camera_info
<trim prefix="SET" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
<if test="status != null">STATUS = #{status},</if>
<if test="cityCode != null">CITY_CODE = #{cityCode},</if>
<if test="type != null">TYPE = #{type},</if>
<if test="name != null">NAME = #{name},</if>
<if test="sn != null">SN = #{sn},</if>
<if test="buildingId != null">BUILDING_ID = #{buildingId},</if>
<if test="remark != null">REMARK = #{remark},</if>
<if test="url != null">URL = #{url},</if>
</trim>
where ID = #{id}
</update>
<delete id="deleteCameraInfoById" parameterType="Long">
delete from camera_info where ID = #{id}
</delete>
<delete id="deleteCameraInfoByIds" parameterType="String">
delete from camera_info where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -101,7 +101,115 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectCompetitionVo"/>
where id = #{id}
</select>
<select id="getCompetitionByCondition" resultType="com.ruoyi.system.domain.Competition">
select * from competition t where 1=1
<if test="status != null ">
AND t.status =#{status}
</if>
<if test="founder != null ">
AND t.founder =#{founder}
</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},'%')
or t.competition_name like CONCAT('%',#{word},'%')
)
</if>
order by t.created_time desc
</select>
<select id="getTeamEnrollExcleImpData" resultType="com.ruoyi.system.domain.vo.CompetitionExcleVo">
</select>
<select id="getMyJoinCompetition" resultType="com.ruoyi.system.domain.Competition">
select * from competition t where 1=1
<if test="status != null ">
AND t.status =#{status}
</if>
<if test="founder != null ">
AND t.founder =#{founder}
</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>
order by t.competition_time desc
</select>
<insert id="insertCompetition" parameterType="Competition" useGeneratedKeys="true" keyProperty="id">
insert into competition
<trim prefix="(" suffix=")" suffixOverrides=",">

View File

@@ -80,7 +80,80 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectCompetitionMembersVo"/>
where id = #{id}
</select>
<select id="getJoinCompetitionMembersPage" resultType="com.ruoyi.system.domain.vo.CompetitionMembersVo">
SELECT
t.*,
u.AVATAR,
u.USER_NAME as userName,
u.GENDER,
u.TELEPHONE,
u.LOGIN_NAME as loginName,
u.height,
u.weight,
u.TEAM_POSITION as teamPosition,
u.ROLE
FROM competition_members t
LEFT JOIN user_info u ON t.user_id = u.id
WHERE 1=1 AND t.is_deleted = 0
<if test="status != null ">
AND t.status =#{status}
</if>
<if test="userId != null ">
AND t.user_id = #{userId}
</if>
<if test="competitionId != null ">
AND t.competition_id = #{competitionId}
</if>
<if test="competitionTeamId != null ">
AND t.competition_team_id = #{competitionTeamId}
</if>
<if test="competitionOfTeamId != null ">
AND t.competition_of_team_id = #{competitionOfTeamId}
</if>
<if test="roleCode != null and roleCode != ''">
AND t.role_code = #{roleCode}
</if>
<if test="userType != null ">
AND t.user_type=#{userType}
</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="id != null ">
AND t.id=#{id}
</if>
<if test="jerseyNumber != null and jerseyNumber != '' ">
AND t.jersey_number like CONCAT('%',#{jerseyNumber},'%')
</if>
<if test="realName != null and realName != '' ">
AND t.real_name like CONCAT('%',#{real_name},'%')
</if>
<if test="isDeleted != null ">
AND t.is_deleted = #{isDeleted}
</if>
order by t.created_time desc
</select>
<select id="getCompetitionMembersByCompetitionId"
resultType="com.ruoyi.system.domain.vo.CompetitionMembersVo">
SELECT
c.*,
u.AVATAR,
u.USER_NAME as userName,
u.GENDER,
u.TELEPHONE,
u.LOGIN_NAME as loginName,
u.height,
u.weight,
u.TEAM_POSITION as teamPosition,
u.ROLE
FROM competition_members c
LEFT JOIN user_info u ON c.user_id = u.id
where c.competition_id = #{competitionId} AND c.is_deleted = 0
</select>
<insert id="insertCompetitionMembers" parameterType="CompetitionMembers" useGeneratedKeys="true" keyProperty="id">
insert into competition_members
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -182,6 +255,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where id = #{id}
</update>
<update id="bindCompetitionMembersByTel">
update competition_members set user_id = #{userId} where contacts_tel = #{contactsTel}
</update>
<delete id="deleteCompetitionMembersById" parameterType="Long">
delete from competition_members where id = #{id}
@@ -193,4 +269,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<delete id="deleteByMembers">
delete from competition_members where competition_of_team_id = #{teamOfId} and competition_id = #{competitionId}
</delete>
</mapper>

View File

@@ -115,6 +115,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
ORDER BY sco.is_first_launch desc
</select>
<select id="getUserScoreByUserId" resultType="com.ruoyi.system.domain.vo.PersonalCareerVo">
SELECT
t.competition_vs_id as competitionVsId,
count(1) as sessions,
sum(t.total_score ) /count(1) AS totalScore,
sum(t.two_points) /count(1) as twoPoints,
sum(t.three_points)/count(1) as threePoints,
sum(t.penalty)/count(1) as penalty,
sum(t.backboard)/count(1) as backboard,
sum(t.front_plate)/count(1) as frontPlate,
sum(t.back_plate)/count(1) as backPlate,
sum(t.assists)/count(1) as assists,
sum(t.snatch)/count(1) as snatch,
sum(t.block)/count(1) as block,
sum(t.fault)/count(1) as fault,
sum(t.breaks)/count(1) as breaks
FROM
competition_members_score t
WHERE
t.team_user_id = #{teamUserId}
GROUP BY
t.competition_vs_id
</select>
<select id="getHonorList" resultType="com.ruoyi.system.domain.CompetitionMembersScore">
SELECT
any_value(member.real_name) as realName,
any_value(score.team_id) as teamId,
any_value(team.TEAM_NAME) as teamName,
IFNULL(sum(score.total_score),0) AS totalScore,
IFNULL(sum(score.two_points),0) AS twoPoints,
IFNULL(sum(score.penalty),0) AS penalty,
IFNULL(sum(score.backboard),0) AS backboard,
IFNULL(sum(score.front_plate),0) AS frontPlate,
IFNULL(sum(score.back_plate),0) AS backPlate,
IFNULL(sum(score.three_Points),0) AS threePoints,
IFNULL(sum(score.assists),0) AS assists,
IFNULL(sum(score.snatch),0) AS snatch,
IFNULL(sum(score.block),0) AS block,
IFNULL(sum(score.fault),0) AS fault,
IFNULL(sum(score.breaks),0) AS breaks
FROM competition_members_score score
LEFT JOIN competition_members member on score.competition_members_id = member.id and member.is_deleted=0
LEFT JOIN competition_of_team team on score.team_id = team.id and team.IS_DELETED=0
WHERE score.is_deleted = 0
<if test="competitionId != null ">
AND score.competition_id = #{competitionId}
</if>
<if test="userId != null ">
AND score.team_user_id = #{userId}
</if>
GROUP BY
score.competition_members_id
</select>
<insert id="insertCompetitionMembersScore" parameterType="CompetitionMembersScore" useGeneratedKeys="true" keyProperty="id">
insert into competition_members_score
<trim prefix="(" suffix=")" suffixOverrides=",">

View File

@@ -49,6 +49,118 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="serialNumber != null "> and t.serial_number = #{serialNumber}</if>
</where>
</select>
<select id="getJoinCompetitionTeam" resultType="com.ruoyi.system.domain.vo.CompetitionOfTeamVo">
select t.*,"" as teamImg,t.created_by as teamManagerUserId
from competition_of_team t where 1=1 and t.is_deleted=0
<if test="id != null ">
AND t.id=#{id}
</if>
<if test="isDeleted != null ">
AND t.is_deleted = #{isDeleted}
</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>
order by t.created_time desc
</select>
<select id="findCompetitionTeamGroupList" resultType="com.ruoyi.system.domain.vo.CompetitionOfTeamVo">
select t.*,"" as teamImg,t.created_by as teamManagerUserId
from competition_of_team t where 1=1 and t.is_deleted=0
<if test="id != null ">
AND t.id=#{id}
</if>
<if test="isDeleted != null ">
AND t.is_deleted = #{isDeleted}
</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>
order by t.created_time desc
</select>
<select id="selectOneByTeamName" resultType="com.ruoyi.system.domain.CompetitionOfTeam">
select * from competition_of_team where team_name = #{teamName} limit 1
</select>
<select id="selectOneByUserId" resultType="com.ruoyi.system.domain.CompetitionOfTeam">
select * from competition_of_team where created_by = #{userId} and competition_id = #{competitionId} limit 1
</select>
<select id="getJoinCompetitionGroupTeam" resultType="com.ruoyi.system.domain.vo.CompetitionOfTeamVo">
select t.*,"" as teamImg,t.created_by as teamManagerUserId
from competition_of_team t where 1=1 and t.is_deleted=0
<if test="id != null ">
AND t.id=#{id}
</if>
<if test="isDeleted != null ">
AND t.is_deleted = #{isDeleted}
</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>
order by t.created_time desc
</select>
<insert id="insertCompetitionOfTeam" parameterType="CompetitionOfTeam" useGeneratedKeys="true" keyProperty="id">
insert into competition_of_team

View File

@@ -41,7 +41,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectCompetitionTeamGroupVo"/>
where id = #{id}
</select>
<select id="getTeamGroupByCondition" resultType="com.ruoyi.system.domain.CompetitionTeamGroup">
select * from competition_team_group t where 1=1 and t.is_deleted = 0
<if test="id != null ">
AND t.id=#{id}
</if>
<if test="isDeleted != null ">
AND t.is_deleted = #{isDeleted}
</if>
<if test="competitionId != null ">
AND t.competition_id=#{competitionId}
</if>
<if test="status != null ">
AND t.status =#{status}
</if>
<if test="competitionGroup != null ">
AND t.competition_group =#{competitionGroup}
</if>
order by t.created_time desc
</select>
<insert id="insertCompetitionTeamGroup" parameterType="CompetitionTeamGroup" useGeneratedKeys="true" keyProperty="id">
insert into competition_team_group
<trim prefix="(" suffix=")" suffixOverrides=",">

View File

@@ -126,6 +126,130 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND t.is_deleted = 0
LIMIT 1
</select>
<select id="getCompetitionSchedule" resultType="com.ruoyi.system.domain.vo.CompetitionTeamVsTeamVo">
select
t.id as id,
t.competition_id as competitionId,
t.main_team_id as mainTeamId,
b1.TEAM_NAME as mainTeamName,
b1.team_logo as mainTeamLogo,
t.guest_team_id as guestTeamId,
b2.TEAM_NAME as guestTeamName,
b2.team_logo as guestTeamLogo,
t.competition_time as competitionTime,
t.building_id as buildingId,
t.building_name as buildingName,
t.competition_address as competitionAddress,
t.competition_group as competitionGroup,
t.status,
t.vs_type as vsType,
t.created_time as createdTime,
t.last_updated_time as lastUpdatedTime,
t.created_by as createdBy,
t.modified_by as modifiedBy,
t.main_team_score as mainTeamScore,
t.guest_team_score as guestTeamScore,
t.is_deleted as isDeleted,
DATE_FORMAT(t.competition_time,'%Y-%m-%d') as competitionDate,
CASE dayofweek(t.competition_time)
WHEN 1 THEN
'星期日'
WHEN 2 THEN
'星期一'
WHEN 3 THEN
'星期二'
WHEN 4 THEN
'星期三'
WHEN 5 THEN
'星期四'
WHEN 6 THEN
'星期五'
WHEN 7 THEN
'星期六'
END as weekDayName,
CASE t.status
WHEN -1 THEN
'已取消'
WHEN 0 THEN
'报名中'
WHEN 1 THEN
'比赛中'
WHEN 2 THEN
'已结束'
END as statusName,
DATE_FORMAT(t.competition_time,'%H:%i') AS theTime,
t.remark as remark
from competition_team_vs_team t
LEFT JOIN competition_of_team b1 ON b1.id = t.main_team_id
left join competition_of_team b2 on t.guest_team_id=b2.id
where 1=1
<if test="id != null ">
AND t.id=#{id}
</if>
<if test="status != null ">
AND t.status =#{status}
</if>
<if test="isDeleted != null ">
AND t.is_deleted =#{isDeleted}
</if>
<if test="competitionId != null ">
AND t.competition_id=#{competitionId}
</if>
<if test="buildingName != null and buildingName != ''">
AND t.building_name like CONCAT('%',#{buildingName},'%')
</if>
<if test="competitionGroup != null ">
AND t.competition_group = #{competitionGroup}
</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="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>
order by t.competition_time asc
</select>
<select id="getLatelySchedule" resultType="com.ruoyi.system.domain.vo.CompetitionTeamVsTeamVo">
select
cpt.competition_begin_time as theTime,
team1.team_logo as mainTeamLogo,
team2.team_logo as guestTeamLogo,
t.*
from competition cpt
INNER JOIN competition_team_vs_team t on t.competition_id = cpt.id and t.is_deleted=0
LEFT JOIN basketball_team team1 on t.main_team_id = team1.ID and team1.IS_DELETED=0
LEFT JOIN basketball_team team2 on t.main_team_id = team2.ID and team2.IS_DELETED=0
where cpt.is_deleted=0
<if test="mainTeamId != null ">
AND t.main_team_id=#{mainTeamId}
</if>
<if test="guestTeamId != null ">
AND t.guest_team_id =#{guestTeamId}
</if>
order by t.competition_time desc
limit 0,3
</select>
<select id="getCompetitionTeamIntegralListById"
resultType="com.ruoyi.system.domain.vo.CompetitionTeamIntegralVo">
SELECT
ANY_VALUE ( t.team_name ) as teamName,
any_value (team.team_logo) as teamLogo,
t.competition_of_team_id,
sum(IF( t.vs_result = 'win', 1, 0 )) AS win,
sum(IF( t.vs_result = 'fail', 1, 0 )) AS fail,
sum(IFNULL( t.one_node_score, 0 )+ IFNULL( t.two_node_score, 0 )+ IFNULL( t.three_node_score, 0 )+ IFNULL( t.four_node_score, 0 )+ IFNULL( t.five_node_score, 0 )+ IFNULL( t.six_node_score, 0 )) AS totalScore,
sum(t.integral) AS integral
FROM competition_result t left join competition_of_team team on team.id = t.competition_of_team_id
WHERE t.is_deleted = 0 AND t.competition_id = #{id}
GROUP BY t.competition_of_team_id
ORDER BY sum(t.integral) desc
</select>
<insert id="insertCompetitionTeamVsTeam" parameterType="CompetitionTeamVsTeam" useGeneratedKeys="true" keyProperty="id">
insert into competition_team_vs_team

View File

@@ -0,0 +1,101 @@
<?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.DataDictionaryMapper">
<resultMap type="DataDictionary" id="DataDictionaryResult">
<result property="id" column="ID" />
<result property="createdBy" column="CREATED_BY" />
<result property="createdTime" column="CREATED_TIME" />
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
<result property="isDeleted" column="IS_DELETED" />
<result property="key" column="KEY" />
<result property="name" column="NAME" />
<result property="enabled" column="ENABLED" />
<result property="parentId" column="PARENT_ID" />
<result property="sortNumber" column="SORT_NUMBER" />
</resultMap>
<sql id="selectDataDictionaryVo">
select ID, CREATED_BY, CREATED_TIME, MODIFIED_BY, LAST_UPDATED_TIME, IS_DELETED, KEY, NAME, ENABLED, PARENT_ID, SORT_NUMBER from data_dictionary
</sql>
<select id="selectDataDictionaryList" parameterType="DataDictionary" resultMap="DataDictionaryResult">
<include refid="selectDataDictionaryVo"/>
<where>
<if test="createdBy != null and createdBy != ''"> and CREATED_BY = #{createdBy}</if>
<if test="createdTime != null "> and CREATED_TIME = #{createdTime}</if>
<if test="modifiedBy != null and modifiedBy != ''"> and MODIFIED_BY = #{modifiedBy}</if>
<if test="lastUpdatedTime != null "> and LAST_UPDATED_TIME = #{lastUpdatedTime}</if>
<if test="isDeleted != null "> and IS_DELETED = #{isDeleted}</if>
<if test="key != null and key != ''"> and KEY = #{key}</if>
<if test="name != null and name != ''"> and NAME like concat('%', #{name}, '%')</if>
<if test="enabled != null "> and ENABLED = #{enabled}</if>
<if test="parentId != null "> and PARENT_ID = #{parentId}</if>
<if test="sortNumber != null "> and SORT_NUMBER = #{sortNumber}</if>
</where>
</select>
<select id="selectDataDictionaryById" parameterType="Long" resultMap="DataDictionaryResult">
<include refid="selectDataDictionaryVo"/>
where ID = #{id}
</select>
<insert id="insertDataDictionary" parameterType="DataDictionary" useGeneratedKeys="true" keyProperty="id">
insert into data_dictionary
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createdBy != null">CREATED_BY,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
<if test="isDeleted != null">IS_DELETED,</if>
<if test="key != null">KEY,</if>
<if test="name != null">NAME,</if>
<if test="enabled != null">ENABLED,</if>
<if test="parentId != null">PARENT_ID,</if>
<if test="sortNumber != null">SORT_NUMBER,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
<if test="isDeleted != null">#{isDeleted},</if>
<if test="key != null">#{key},</if>
<if test="name != null">#{name},</if>
<if test="enabled != null">#{enabled},</if>
<if test="parentId != null">#{parentId},</if>
<if test="sortNumber != null">#{sortNumber},</if>
</trim>
</insert>
<update id="updateDataDictionary" parameterType="DataDictionary">
update data_dictionary
<trim prefix="SET" suffixOverrides=",">
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
<if test="key != null">KEY = #{key},</if>
<if test="name != null">NAME = #{name},</if>
<if test="enabled != null">ENABLED = #{enabled},</if>
<if test="parentId != null">PARENT_ID = #{parentId},</if>
<if test="sortNumber != null">SORT_NUMBER = #{sortNumber},</if>
</trim>
where ID = #{id}
</update>
<delete id="deleteDataDictionaryById" parameterType="Long">
delete from data_dictionary where ID = #{id}
</delete>
<delete id="deleteDataDictionaryByIds" parameterType="String">
delete from data_dictionary where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,91 @@
<?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.FeatureLabelMapper">
<resultMap type="FeatureLabel" id="FeatureLabelResult">
<result property="id" column="ID" />
<result property="isDeleted" column="IS_DELETED" />
<result property="createdTime" column="CREATED_TIME" />
<result property="createdBy" column="CREATED_BY" />
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
<result property="description" column="DESCRIPTION" />
<result property="remark" column="REMARK" />
<result property="buildingId" column="BUILDING_ID" />
</resultMap>
<sql id="selectFeatureLabelVo">
select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, DESCRIPTION, REMARK, BUILDING_ID from feature_label
</sql>
<select id="selectFeatureLabelList" parameterType="FeatureLabel" resultMap="FeatureLabelResult">
<include refid="selectFeatureLabelVo"/>
<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="description != null and description != ''"> and DESCRIPTION = #{description}</if>
<if test="remark != null and remark != ''"> and REMARK = #{remark}</if>
<if test="buildingId != null "> and BUILDING_ID = #{buildingId}</if>
</where>
</select>
<select id="selectFeatureLabelById" parameterType="Long" resultMap="FeatureLabelResult">
<include refid="selectFeatureLabelVo"/>
where ID = #{id}
</select>
<insert id="insertFeatureLabel" parameterType="FeatureLabel" useGeneratedKeys="true" keyProperty="id">
insert into feature_label
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="createdBy != null">CREATED_BY,</if>
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
<if test="description != null">DESCRIPTION,</if>
<if test="remark != null">REMARK,</if>
<if test="buildingId != null">BUILDING_ID,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">#{isDeleted},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
<if test="description != null">#{description},</if>
<if test="remark != null">#{remark},</if>
<if test="buildingId != null">#{buildingId},</if>
</trim>
</insert>
<update id="updateFeatureLabel" parameterType="FeatureLabel">
update feature_label
<trim prefix="SET" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
<if test="description != null">DESCRIPTION = #{description},</if>
<if test="remark != null">REMARK = #{remark},</if>
<if test="buildingId != null">BUILDING_ID = #{buildingId},</if>
</trim>
where ID = #{id}
</update>
<delete id="deleteFeatureLabelById" parameterType="Long">
delete from feature_label where ID = #{id}
</delete>
<delete id="deleteFeatureLabelByIds" parameterType="String">
delete from feature_label where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,111 @@
<?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.GlobalAttachmentMapper">
<resultMap type="GlobalAttachment" id="GlobalAttachmentResult">
<result property="id" column="ID" />
<result property="bizType" column="BIZ_TYPE" />
<result property="bizId" column="BIZ_ID" />
<result property="attachmentName" column="ATTACHMENT_NAME" />
<result property="attachmentType" column="ATTACHMENT_TYPE" />
<result property="attachmentUrl" column="ATTACHMENT_URL" />
<result property="version" column="VERSION" />
<result property="isDeleted" column="IS_DELETED" />
<result property="createdTime" column="CREATED_TIME" />
<result property="createdBy" column="CREATED_BY" />
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
<result property="consultType" column="consult_type" />
</resultMap>
<sql id="selectGlobalAttachmentVo">
select ID, BIZ_TYPE, BIZ_ID, ATTACHMENT_NAME, ATTACHMENT_TYPE, ATTACHMENT_URL, VERSION, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, consult_type from global_attachment
</sql>
<select id="selectGlobalAttachmentList" parameterType="GlobalAttachment" resultMap="GlobalAttachmentResult">
<include refid="selectGlobalAttachmentVo"/>
<where>
<if test="bizType != null and bizType != ''"> and BIZ_TYPE = #{bizType}</if>
<if test="bizId != null "> and BIZ_ID = #{bizId}</if>
<if test="attachmentName != null and attachmentName != ''"> and ATTACHMENT_NAME like concat('%', #{attachmentName}, '%')</if>
<if test="attachmentType != null "> and ATTACHMENT_TYPE = #{attachmentType}</if>
<if test="attachmentUrl != null and attachmentUrl != ''"> and ATTACHMENT_URL = #{attachmentUrl}</if>
<if test="version != null "> and VERSION = #{version}</if>
<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="consultType != null and consultType != ''"> and consult_type = #{consultType}</if>
</where>
</select>
<select id="selectGlobalAttachmentById" parameterType="Long" resultMap="GlobalAttachmentResult">
<include refid="selectGlobalAttachmentVo"/>
where ID = #{id}
</select>
<insert id="insertGlobalAttachment" parameterType="GlobalAttachment" useGeneratedKeys="true" keyProperty="id">
insert into global_attachment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="bizType != null">BIZ_TYPE,</if>
<if test="bizId != null">BIZ_ID,</if>
<if test="attachmentName != null">ATTACHMENT_NAME,</if>
<if test="attachmentType != null">ATTACHMENT_TYPE,</if>
<if test="attachmentUrl != null">ATTACHMENT_URL,</if>
<if test="version != null">VERSION,</if>
<if test="isDeleted != null">IS_DELETED,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="createdBy != null">CREATED_BY,</if>
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
<if test="consultType != null">consult_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="bizType != null">#{bizType},</if>
<if test="bizId != null">#{bizId},</if>
<if test="attachmentName != null">#{attachmentName},</if>
<if test="attachmentType != null">#{attachmentType},</if>
<if test="attachmentUrl != null">#{attachmentUrl},</if>
<if test="version != null">#{version},</if>
<if test="isDeleted != null">#{isDeleted},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
<if test="consultType != null">#{consultType},</if>
</trim>
</insert>
<update id="updateGlobalAttachment" parameterType="GlobalAttachment">
update global_attachment
<trim prefix="SET" suffixOverrides=",">
<if test="bizType != null">BIZ_TYPE = #{bizType},</if>
<if test="bizId != null">BIZ_ID = #{bizId},</if>
<if test="attachmentName != null">ATTACHMENT_NAME = #{attachmentName},</if>
<if test="attachmentType != null">ATTACHMENT_TYPE = #{attachmentType},</if>
<if test="attachmentUrl != null">ATTACHMENT_URL = #{attachmentUrl},</if>
<if test="version != null">VERSION = #{version},</if>
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
<if test="consultType != null">consult_type = #{consultType},</if>
</trim>
where ID = #{id}
</update>
<delete id="deleteGlobalAttachmentById" parameterType="Long">
delete from global_attachment where ID = #{id}
</delete>
<delete id="deleteGlobalAttachmentByIds" parameterType="String">
delete from global_attachment where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,116 @@
<?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.GroupWechatMapper">
<resultMap type="GroupWechat" id="GroupWechatResult">
<result property="id" column="ID" />
<result property="buildingId" column="BUILDING_ID" />
<result property="groupName" column="GROUP_NAME" />
<result property="headerPicture" column="HEADER_PICTURE" />
<result property="groupCode" column="GROUP_CODE" />
<result property="scanNum" column="SCAN_NUM" />
<result property="serviceUser" column="SERVICE_USER" />
<result property="serviceUserQrcode" column="SERVICE_USER_QRCODE" />
<result property="remarks" column="REMARKS" />
<result property="isDeleted" column="IS_DELETED" />
<result property="createdTime" column="CREATED_TIME" />
<result property="createdBy" column="CREATED_BY" />
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
</resultMap>
<sql id="selectGroupWechatVo">
select ID, BUILDING_ID, GROUP_NAME, HEADER_PICTURE, GROUP_CODE, SCAN_NUM, SERVICE_USER, SERVICE_USER_QRCODE, REMARKS, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME from group_wechat
</sql>
<select id="selectGroupWechatList" parameterType="GroupWechat" resultMap="GroupWechatResult">
<include refid="selectGroupWechatVo"/>
<where>
<if test="buildingId != null "> and BUILDING_ID = #{buildingId}</if>
<if test="groupName != null and groupName != ''"> and GROUP_NAME like concat('%', #{groupName}, '%')</if>
<if test="headerPicture != null and headerPicture != ''"> and HEADER_PICTURE = #{headerPicture}</if>
<if test="groupCode != null and groupCode != ''"> and GROUP_CODE = #{groupCode}</if>
<if test="scanNum != null and scanNum != ''"> and SCAN_NUM = #{scanNum}</if>
<if test="serviceUser != null and serviceUser != ''"> and SERVICE_USER = #{serviceUser}</if>
<if test="serviceUserQrcode != null and serviceUserQrcode != ''"> and SERVICE_USER_QRCODE = #{serviceUserQrcode}</if>
<if test="remarks != null and remarks != ''"> and REMARKS = #{remarks}</if>
<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>
</where>
</select>
<select id="selectGroupWechatById" parameterType="Long" resultMap="GroupWechatResult">
<include refid="selectGroupWechatVo"/>
where ID = #{id}
</select>
<insert id="insertGroupWechat" parameterType="GroupWechat" useGeneratedKeys="true" keyProperty="id">
insert into group_wechat
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="buildingId != null">BUILDING_ID,</if>
<if test="groupName != null">GROUP_NAME,</if>
<if test="headerPicture != null">HEADER_PICTURE,</if>
<if test="groupCode != null">GROUP_CODE,</if>
<if test="scanNum != null">SCAN_NUM,</if>
<if test="serviceUser != null">SERVICE_USER,</if>
<if test="serviceUserQrcode != null">SERVICE_USER_QRCODE,</if>
<if test="remarks != null">REMARKS,</if>
<if test="isDeleted != null">IS_DELETED,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="createdBy != null">CREATED_BY,</if>
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="buildingId != null">#{buildingId},</if>
<if test="groupName != null">#{groupName},</if>
<if test="headerPicture != null">#{headerPicture},</if>
<if test="groupCode != null">#{groupCode},</if>
<if test="scanNum != null">#{scanNum},</if>
<if test="serviceUser != null">#{serviceUser},</if>
<if test="serviceUserQrcode != null">#{serviceUserQrcode},</if>
<if test="remarks != null">#{remarks},</if>
<if test="isDeleted != null">#{isDeleted},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
</trim>
</insert>
<update id="updateGroupWechat" parameterType="GroupWechat">
update group_wechat
<trim prefix="SET" suffixOverrides=",">
<if test="buildingId != null">BUILDING_ID = #{buildingId},</if>
<if test="groupName != null">GROUP_NAME = #{groupName},</if>
<if test="headerPicture != null">HEADER_PICTURE = #{headerPicture},</if>
<if test="groupCode != null">GROUP_CODE = #{groupCode},</if>
<if test="scanNum != null">SCAN_NUM = #{scanNum},</if>
<if test="serviceUser != null">SERVICE_USER = #{serviceUser},</if>
<if test="serviceUserQrcode != null">SERVICE_USER_QRCODE = #{serviceUserQrcode},</if>
<if test="remarks != null">REMARKS = #{remarks},</if>
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
</trim>
where ID = #{id}
</update>
<delete id="deleteGroupWechatById" parameterType="Long">
delete from group_wechat where ID = #{id}
</delete>
<delete id="deleteGroupWechatByIds" parameterType="String">
delete from group_wechat where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,116 @@
<?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.MessageMapper">
<resultMap type="Message" id="MessageResult">
<result property="id" column="ID" />
<result property="createdBy" column="CREATED_BY" />
<result property="createdTime" column="CREATED_TIME" />
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
<result property="isDeleted" column="IS_DELETED" />
<result property="messageTitle" column="MESSAGE_TITLE" />
<result property="messageType" column="MESSAGE_TYPE" />
<result property="flowType" column="FLOW_TYPE" />
<result property="auditor" column="AUDITOR" />
<result property="auditDate" column="AUDIT_DATE" />
<result property="sourceId" column="SOURCE_ID" />
<result property="agreeFlag" column="AGREE_FLAG" />
<result property="flowEntity" column="FLOW_ENTITY" />
</resultMap>
<sql id="selectMessageVo">
select ID, CREATED_BY, CREATED_TIME, MODIFIED_BY, LAST_UPDATED_TIME, IS_DELETED, MESSAGE_TITLE, MESSAGE_TYPE, FLOW_TYPE, AUDITOR, AUDIT_DATE, SOURCE_ID, AGREE_FLAG, FLOW_ENTITY from message
</sql>
<select id="selectMessageList" parameterType="Message" resultMap="MessageResult">
<include refid="selectMessageVo"/>
<where>
<if test="createdBy != null and createdBy != ''"> and CREATED_BY = #{createdBy}</if>
<if test="createdTime != null "> and CREATED_TIME = #{createdTime}</if>
<if test="modifiedBy != null and modifiedBy != ''"> and MODIFIED_BY = #{modifiedBy}</if>
<if test="lastUpdatedTime != null "> and LAST_UPDATED_TIME = #{lastUpdatedTime}</if>
<if test="isDeleted != null "> and IS_DELETED = #{isDeleted}</if>
<if test="messageTitle != null and messageTitle != ''"> and MESSAGE_TITLE = #{messageTitle}</if>
<if test="messageType != null and messageType != ''"> and MESSAGE_TYPE = #{messageType}</if>
<if test="flowType != null and flowType != ''"> and FLOW_TYPE = #{flowType}</if>
<if test="auditor != null "> and AUDITOR = #{auditor}</if>
<if test="auditDate != null "> and AUDIT_DATE = #{auditDate}</if>
<if test="sourceId != null "> and SOURCE_ID = #{sourceId}</if>
<if test="agreeFlag != null "> and AGREE_FLAG = #{agreeFlag}</if>
<if test="flowEntity != null and flowEntity != ''"> and FLOW_ENTITY = #{flowEntity}</if>
</where>
</select>
<select id="selectMessageById" parameterType="Long" resultMap="MessageResult">
<include refid="selectMessageVo"/>
where ID = #{id}
</select>
<insert id="insertMessage" parameterType="Message" useGeneratedKeys="true" keyProperty="id">
insert into message
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createdBy != null">CREATED_BY,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
<if test="isDeleted != null">IS_DELETED,</if>
<if test="messageTitle != null">MESSAGE_TITLE,</if>
<if test="messageType != null">MESSAGE_TYPE,</if>
<if test="flowType != null">FLOW_TYPE,</if>
<if test="auditor != null">AUDITOR,</if>
<if test="auditDate != null">AUDIT_DATE,</if>
<if test="sourceId != null">SOURCE_ID,</if>
<if test="agreeFlag != null">AGREE_FLAG,</if>
<if test="flowEntity != null">FLOW_ENTITY,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
<if test="isDeleted != null">#{isDeleted},</if>
<if test="messageTitle != null">#{messageTitle},</if>
<if test="messageType != null">#{messageType},</if>
<if test="flowType != null">#{flowType},</if>
<if test="auditor != null">#{auditor},</if>
<if test="auditDate != null">#{auditDate},</if>
<if test="sourceId != null">#{sourceId},</if>
<if test="agreeFlag != null">#{agreeFlag},</if>
<if test="flowEntity != null">#{flowEntity},</if>
</trim>
</insert>
<update id="updateMessage" parameterType="Message">
update message
<trim prefix="SET" suffixOverrides=",">
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
<if test="messageTitle != null">MESSAGE_TITLE = #{messageTitle},</if>
<if test="messageType != null">MESSAGE_TYPE = #{messageType},</if>
<if test="flowType != null">FLOW_TYPE = #{flowType},</if>
<if test="auditor != null">AUDITOR = #{auditor},</if>
<if test="auditDate != null">AUDIT_DATE = #{auditDate},</if>
<if test="sourceId != null">SOURCE_ID = #{sourceId},</if>
<if test="agreeFlag != null">AGREE_FLAG = #{agreeFlag},</if>
<if test="flowEntity != null">FLOW_ENTITY = #{flowEntity},</if>
</trim>
where ID = #{id}
</update>
<delete id="deleteMessageById" parameterType="Long">
delete from message where ID = #{id}
</delete>
<delete id="deleteMessageByIds" parameterType="String">
delete from message where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,144 @@
<?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.ShAreaMapper">
<resultMap type="ShArea" id="ShAreaResult">
<result property="id" column="id" />
<result property="pid" column="pid" />
<result property="shortname" column="shortname" />
<result property="cityname" column="cityName" />
<result property="mergerName" column="merger_name" />
<result property="level" column="level" />
<result property="pinyin" column="pinyin" />
<result property="code" column="code" />
<result property="zipCode" column="zip_code" />
<result property="first" column="first" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="isDeleted" column="IS_DELETED" />
<result property="createdTime" column="CREATED_TIME" />
<result property="createdBy" column="CREATED_BY" />
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
</resultMap>
<sql id="selectShAreaVo">
select id, pid, shortname, cityName, merger_name, level, pinyin, code, zip_code, first, longitude, latitude, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME from sh_area
</sql>
<select id="selectShAreaList" parameterType="ShArea" resultMap="ShAreaResult">
<include refid="selectShAreaVo"/>
<where>
<if test="pid != null "> and pid = #{pid}</if>
<if test="shortname != null and shortname != ''"> and shortname like concat('%', #{shortname}, '%')</if>
<if test="cityname != null and cityname != ''"> and cityName like concat('%', #{cityname}, '%')</if>
<if test="mergerName != null and mergerName != ''"> and merger_name like concat('%', #{mergerName}, '%')</if>
<if test="level != null "> and level = #{level}</if>
<if test="pinyin != null and pinyin != ''"> and pinyin = #{pinyin}</if>
<if test="code != null and code != ''"> and code = #{code}</if>
<if test="zipCode != null and zipCode != ''"> and zip_code = #{zipCode}</if>
<if test="first != null and first != ''"> and first = #{first}</if>
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
<if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
<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>
</where>
</select>
<select id="selectShAreaById" parameterType="Long" resultMap="ShAreaResult">
<include refid="selectShAreaVo"/>
where id = #{id}
</select>
<select id="findMyCity" resultType="com.ruoyi.system.domain.ShArea">
SELECT *,
zip_code AS zipCode,
(
POWER(
MOD(
ABS(
LONGITUDE - #{longitude}), 360), 2) +
POWER(ABS(LATITUDE - #{latitude}), 2)) AS distance
FROM sh_area
WHERE LEVEL = 2
ORDER BY distance LIMIT 1
</select>
<insert id="insertShArea" parameterType="ShArea" useGeneratedKeys="true" keyProperty="id">
insert into sh_area
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pid != null">pid,</if>
<if test="shortname != null">shortname,</if>
<if test="cityname != null">cityName,</if>
<if test="mergerName != null">merger_name,</if>
<if test="level != null">level,</if>
<if test="pinyin != null">pinyin,</if>
<if test="code != null">code,</if>
<if test="zipCode != null">zip_code,</if>
<if test="first != null">first,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="isDeleted != null">IS_DELETED,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="createdBy != null">CREATED_BY,</if>
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="pid != null">#{pid},</if>
<if test="shortname != null">#{shortname},</if>
<if test="cityname != null">#{cityname},</if>
<if test="mergerName != null">#{mergerName},</if>
<if test="level != null">#{level},</if>
<if test="pinyin != null">#{pinyin},</if>
<if test="code != null">#{code},</if>
<if test="zipCode != null">#{zipCode},</if>
<if test="first != null">#{first},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="isDeleted != null">#{isDeleted},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
</trim>
</insert>
<update id="updateShArea" parameterType="ShArea">
update sh_area
<trim prefix="SET" suffixOverrides=",">
<if test="pid != null">pid = #{pid},</if>
<if test="shortname != null">shortname = #{shortname},</if>
<if test="cityname != null">cityName = #{cityname},</if>
<if test="mergerName != null">merger_name = #{mergerName},</if>
<if test="level != null">level = #{level},</if>
<if test="pinyin != null">pinyin = #{pinyin},</if>
<if test="code != null">code = #{code},</if>
<if test="zipCode != null">zip_code = #{zipCode},</if>
<if test="first != null">first = #{first},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteShAreaById" parameterType="Long">
delete from sh_area where id = #{id}
</delete>
<delete id="deleteShAreaByIds" parameterType="String">
delete from sh_area where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -46,6 +46,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null "> and t.user_name like concat('%', #{userName}, '%')</if>
</where>
</select>
<select id="getTeamMembersByTeamId" resultType="com.ruoyi.system.domain.vo.TeamMembersResponse">
SELECT
b.*,
u.AVATAR,
u.LOGIN_NAME,
u.ROLE,
u.GENDER,
u.USER_NAME,
u.TELEPHONE
FROM team_members b
LEFT JOIN user_info u ON b.user_id = u.ID
WHERE b.team_id=#{teamId} and b.is_deleted=0
</select>
<select id="getOneByTeamIdAndRoleCode" resultType="com.ruoyi.system.domain.TeamMembers">
select * from team_members where teamId = #{teamId} and roleCode = #{roleCode} limit 1
</select>
<insert id="insertTeamMembers" parameterType="TeamMembers" useGeneratedKeys="true" keyProperty="id">
insert into team_members
<trim prefix="(" suffix=")" suffixOverrides=",">

View File

@@ -0,0 +1,86 @@
<?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.TokenInfoMapper">
<resultMap type="TokenInfo" id="TokenInfoResult">
<result property="id" column="ID" />
<result property="isDeleted" column="IS_DELETED" />
<result property="createdTime" column="CREATED_TIME" />
<result property="createdBy" column="CREATED_BY" />
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
<result property="mainToken" column="MAIN_TOKEN" />
<result property="kikToken" column="KIK_TOKEN" />
</resultMap>
<sql id="selectTokenInfoVo">
select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, MAIN_TOKEN, KIK_TOKEN from token_info
</sql>
<select id="selectTokenInfoList" parameterType="TokenInfo" resultMap="TokenInfoResult">
<include refid="selectTokenInfoVo"/>
<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="mainToken != null and mainToken != ''"> and MAIN_TOKEN = #{mainToken}</if>
<if test="kikToken != null and kikToken != ''"> and KIK_TOKEN = #{kikToken}</if>
</where>
</select>
<select id="selectTokenInfoById" parameterType="Long" resultMap="TokenInfoResult">
<include refid="selectTokenInfoVo"/>
where ID = #{id}
</select>
<insert id="insertTokenInfo" parameterType="TokenInfo" useGeneratedKeys="true" keyProperty="id">
insert into token_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="createdBy != null">CREATED_BY,</if>
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
<if test="mainToken != null">MAIN_TOKEN,</if>
<if test="kikToken != null">KIK_TOKEN,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">#{isDeleted},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
<if test="mainToken != null">#{mainToken},</if>
<if test="kikToken != null">#{kikToken},</if>
</trim>
</insert>
<update id="updateTokenInfo" parameterType="TokenInfo">
update token_info
<trim prefix="SET" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
<if test="mainToken != null">MAIN_TOKEN = #{mainToken},</if>
<if test="kikToken != null">KIK_TOKEN = #{kikToken},</if>
</trim>
where ID = #{id}
</update>
<delete id="deleteTokenInfoById" parameterType="Long">
delete from token_info where ID = #{id}
</delete>
<delete id="deleteTokenInfoByIds" parameterType="String">
delete from token_info where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,111 @@
<?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.TrainingInfoMapper">
<resultMap type="TrainingInfo" id="TrainingInfoResult">
<result property="id" column="ID" />
<result property="isDeleted" column="IS_DELETED" />
<result property="createdTime" column="CREATED_TIME" />
<result property="createdBy" column="CREATED_BY" />
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
<result property="trainName" column="TRAIN_NAME" />
<result property="phone" column="PHONE" />
<result property="linkman" column="LINKMAN" />
<result property="trainDesc" column="TRAIN_DESC" />
<result property="buildId" column="BUILD_ID" />
<result property="defaultPicture" column="DEFAULT_PICTURE" />
<result property="price" column="PRICE" />
</resultMap>
<sql id="selectTrainingInfoVo">
select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, TRAIN_NAME, PHONE, LINKMAN, TRAIN_DESC, BUILD_ID, DEFAULT_PICTURE, PRICE from training_info
</sql>
<select id="selectTrainingInfoList" parameterType="TrainingInfo" resultMap="TrainingInfoResult">
<include refid="selectTrainingInfoVo"/>
<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="trainName != null and trainName != ''"> and TRAIN_NAME like concat('%', #{trainName}, '%')</if>
<if test="phone != null and phone != ''"> and PHONE = #{phone}</if>
<if test="linkman != null and linkman != ''"> and LINKMAN = #{linkman}</if>
<if test="trainDesc != null and trainDesc != ''"> and TRAIN_DESC = #{trainDesc}</if>
<if test="buildId != null "> and BUILD_ID = #{buildId}</if>
<if test="defaultPicture != null and defaultPicture != ''"> and DEFAULT_PICTURE = #{defaultPicture}</if>
<if test="price != null and price != ''"> and PRICE = #{price}</if>
</where>
</select>
<select id="selectTrainingInfoById" parameterType="Long" resultMap="TrainingInfoResult">
<include refid="selectTrainingInfoVo"/>
where ID = #{id}
</select>
<insert id="insertTrainingInfo" parameterType="TrainingInfo" useGeneratedKeys="true" keyProperty="id">
insert into training_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="createdBy != null">CREATED_BY,</if>
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
<if test="trainName != null">TRAIN_NAME,</if>
<if test="phone != null">PHONE,</if>
<if test="linkman != null">LINKMAN,</if>
<if test="trainDesc != null">TRAIN_DESC,</if>
<if test="buildId != null">BUILD_ID,</if>
<if test="defaultPicture != null">DEFAULT_PICTURE,</if>
<if test="price != null">PRICE,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="isDeleted != null">#{isDeleted},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
<if test="trainName != null">#{trainName},</if>
<if test="phone != null">#{phone},</if>
<if test="linkman != null">#{linkman},</if>
<if test="trainDesc != null">#{trainDesc},</if>
<if test="buildId != null">#{buildId},</if>
<if test="defaultPicture != null">#{defaultPicture},</if>
<if test="price != null">#{price},</if>
</trim>
</insert>
<update id="updateTrainingInfo" parameterType="TrainingInfo">
update training_info
<trim prefix="SET" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
<if test="trainName != null">TRAIN_NAME = #{trainName},</if>
<if test="phone != null">PHONE = #{phone},</if>
<if test="linkman != null">LINKMAN = #{linkman},</if>
<if test="trainDesc != null">TRAIN_DESC = #{trainDesc},</if>
<if test="buildId != null">BUILD_ID = #{buildId},</if>
<if test="defaultPicture != null">DEFAULT_PICTURE = #{defaultPicture},</if>
<if test="price != null">PRICE = #{price},</if>
</trim>
where ID = #{id}
</update>
<delete id="deleteTrainingInfoById" parameterType="Long">
delete from training_info where ID = #{id}
</delete>
<delete id="deleteTrainingInfoByIds" parameterType="String">
delete from training_info where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,88 @@
<?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.UserBuildingRelMapper">
<resultMap type="UserBuildingRel" id="UserBuildingRelResult">
<result property="id" column="ID" />
<result property="isDeleted" column="IS_DELETED" />
<result property="createdTime" column="CREATED_TIME" />
<result property="createdBy" column="CREATED_BY" />
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
<result property="userCode" column="USER_CODE" />
<result property="buildingId" column="BUILDING_ID" />
</resultMap>
<sql id="selectUserBuildingRelVo">
select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, USER_CODE, BUILDING_ID from user_building_rel
</sql>
<select id="selectUserBuildingRelList" parameterType="UserBuildingRel" resultMap="UserBuildingRelResult">
<include refid="selectUserBuildingRelVo"/>
<where>
<if test="isDeleted != null and isDeleted != ''"> 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="userCode != null and userCode != ''"> and USER_CODE = #{userCode}</if>
<if test="buildingId != null "> and BUILDING_ID = #{buildingId}</if>
</where>
</select>
<select id="selectUserBuildingRelById" parameterType="Long" resultMap="UserBuildingRelResult">
<include refid="selectUserBuildingRelVo"/>
where ID = #{id}
</select>
<insert id="insertUserBuildingRel" parameterType="UserBuildingRel">
insert into user_building_rel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">ID,</if>
<if test="isDeleted != null">IS_DELETED,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="createdBy != null">CREATED_BY,</if>
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
<if test="userCode != null">USER_CODE,</if>
<if test="buildingId != null">BUILDING_ID,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="isDeleted != null">#{isDeleted},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
<if test="userCode != null">#{userCode},</if>
<if test="buildingId != null">#{buildingId},</if>
</trim>
</insert>
<update id="updateUserBuildingRel" parameterType="UserBuildingRel">
update user_building_rel
<trim prefix="SET" suffixOverrides=",">
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
<if test="userCode != null">USER_CODE = #{userCode},</if>
<if test="buildingId != null">BUILDING_ID = #{buildingId},</if>
</trim>
where ID = #{id}
</update>
<delete id="deleteUserBuildingRelById" parameterType="Long">
delete from user_building_rel where ID = #{id}
</delete>
<delete id="deleteUserBuildingRelByIds" parameterType="String">
delete from user_building_rel where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,94 @@
<?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.UserRoleMapper">
<resultMap type="UserRole" id="UserRoleResult">
<result property="id" column="ID" />
<result property="userId" column="USER_ID" />
<result property="roleCode" column="ROLE_CODE" />
<result property="createdTime" column="CREATED_TIME" />
<result property="createdBy" column="CREATED_BY" />
<result property="modifiedBy" column="MODIFIED_BY" />
<result property="isDeleted" column="IS_DELETED" />
<result property="lastUpdatedTime" column="LAST_UPDATED_TIME" />
<result property="roleId" column="ROLE_ID" />
</resultMap>
<sql id="selectUserRoleVo">
select ID, USER_ID, ROLE_CODE, CREATED_TIME, CREATED_BY, MODIFIED_BY, IS_DELETED, LAST_UPDATED_TIME, ROLE_ID from user_role
</sql>
<select id="selectUserRoleList" parameterType="UserRole" resultMap="UserRoleResult">
<include refid="selectUserRoleVo"/>
<where>
<if test="userId != null "> and USER_ID = #{userId}</if>
<if test="roleCode != null and roleCode != ''"> and ROLE_CODE = #{roleCode}</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="isDeleted != null "> and IS_DELETED = #{isDeleted}</if>
<if test="lastUpdatedTime != null "> and LAST_UPDATED_TIME = #{lastUpdatedTime}</if>
<if test="roleId != null "> and ROLE_ID = #{roleId}</if>
</where>
</select>
<select id="selectUserRoleById" parameterType="Long" resultMap="UserRoleResult">
<include refid="selectUserRoleVo"/>
where ID = #{id}
</select>
<select id="selectByCode" resultType="com.ruoyi.system.domain.UserRole">
select * from user_role where role_code = #{roleCode} limit 1
</select>
<insert id="insertUserRole" parameterType="UserRole" useGeneratedKeys="true" keyProperty="id">
insert into user_role
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">USER_ID,</if>
<if test="roleCode != null">ROLE_CODE,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="createdBy != null">CREATED_BY,</if>
<if test="modifiedBy != null">MODIFIED_BY,</if>
<if test="isDeleted != null">IS_DELETED,</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME,</if>
<if test="roleId != null">ROLE_ID,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="roleCode != null">#{roleCode},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="modifiedBy != null">#{modifiedBy},</if>
<if test="isDeleted != null">#{isDeleted},</if>
<if test="lastUpdatedTime != null">#{lastUpdatedTime},</if>
<if test="roleId != null">#{roleId},</if>
</trim>
</insert>
<update id="updateUserRole" parameterType="UserRole">
update user_role
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">USER_ID = #{userId},</if>
<if test="roleCode != null">ROLE_CODE = #{roleCode},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="modifiedBy != null">MODIFIED_BY = #{modifiedBy},</if>
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
<if test="lastUpdatedTime != null">LAST_UPDATED_TIME = #{lastUpdatedTime},</if>
<if test="roleId != null">ROLE_ID = #{roleId},</if>
</trim>
where ID = #{id}
</update>
<delete id="deleteUserRoleById" parameterType="Long">
delete from user_role where ID = #{id}
</delete>
<delete id="deleteUserRoleByIds" parameterType="String">
delete from user_role where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -40,7 +40,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectWxBasketballTeamVo"/>
where ID = #{id}
</select>
<select id="getMyBasketBallTeam" resultType="com.ruoyi.system.domain.WxBasketballTeam">
</select>
<insert id="insertWxBasketballTeam" parameterType="WxBasketballTeam" useGeneratedKeys="true" keyProperty="id">
insert into basketball_team
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -108,4 +111,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<select id="findBasketballTeamInfo" parameterType="com.ruoyi.system.domain.vo.BasketballTeamRequest" resultType="com.ruoyi.system.domain.vo.BasketballTeamResponse">
SELECT
b.id as buildId,
t.DEFAULT_PICTURE as defaultPicture,
b.BUILDING_NAME as buildingName,
b.LONGITUDE as latitude,
b.LATITUDE as longitude,
b.address as address,
b.created_id as createdId,
t.ID,
t.team_name as teamName,
t.team_des as teamDes,
t.contact_tel as contactTel,
t.team_logo as teamLogo,
t.remark
FROM
`basketball_team` t LEFT JOIN `building_info` b
ON t.build_Id=b.id
where b.city_code=#{request.cityCode}
<if test="request.teamName != null and request.teamName != ''">
AND t.team_name like CONCAT('%',#{request.teamName},'%') OR t.team_des like CONCAT('%',#{request.teamName},'%')
</if>
</select>
<select id="getBasketBallTeamByCondition" parameterType="com.ruoyi.system.domain.WxBasketballTeam" resultType="com.ruoyi.system.domain.WxBasketballTeam">
select * from basketball_team t where t.is_deleted=0
<if test="createdId != null ">
AND t.created_id=#{createdId}
</if>
<if test="teamName != null and teamName != ''">
AND t.team_name like CONCAT('%',#{teamName},'%')
</if>
<if test="teamDes != null and teamDes != ''">
AND t.team_des like CONCAT('%',#{teamDes},'%')
</if>
<if test="buildId != null ">
AND t.build_id=#{buildId}
</if>
<if test="id != null ">
AND t.id=#{id}
</if>
order by t.created_time desc
</select>
<select id="selectBatchIds" resultType="com.ruoyi.system.domain.WxBasketballTeam">
select * from basketball_team t where t.id in
<foreach collection="teamIds" item="id" open=" (" separator="," close=")">
#{id}
</foreach>
</select>
</mapper>

View File

@@ -61,7 +61,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectWxBuildingInfoVo"/>
where ID = #{id}
</select>
<select id="findNearbyBuilding" resultType="com.ruoyi.system.domain.WxBuildingInfo">
SELECT id,
DEFAULT_PICTURE,
BUILDING_NAME,
LONGITUDE,
LATITUDE,
address,
is_supportlive,
mittelkurs,
(POWER(MOD(ABS(LONGITUDE - #{longitude}), 360), 2) + POWER(ABS(LATITUDE - #{latitude}), 2)) AS distance
FROM building_info
where status = 2
and IS_DELETED = 0
ORDER BY distance LIMIT 20
</select>
<select id="getBuildingByCity" resultType="com.ruoyi.system.domain.WxBuildingInfo">
</select>
<select id="getAllBuildingByCondition" resultType="com.ruoyi.system.domain.vo.BuildingInfoResponse">
select info.* from building_info info where info.is_deleted=0
<if test="status != null and status != ''">
AND info.status=#{status}
</if>
<if test="buildingName != null and buildingName != ''">
AND info.building_name like CONCAT('%',#{buildingName},'%')
</if>
<if test="cityCode != null and cityCode != ''">
AND info.city_code=#{cityCode}
</if>
<if test="isSupportlive != null and isSupportlive != ''">
AND info.is_supportlive=#{isSupportlive}
</if>
<if test="createdId != null">
AND created_id=#{createdId}
</if>
</select>
<select id="getAuditPage" resultType="com.ruoyi.system.domain.WxBuildingInfo">
SELECT * FROM `building_info` where 1=1
<if test="status != null and status != ''">
AND status=#{status}
</if>
<if test="buildingName != null and buildingName != ''">
AND building_name like CONCAT('%',#{buildingName},'%')
</if>
<if test="createdBy != null and createdBy != ''">
AND created_by=#{createdBy}
</if>
<if test="createdId != null">
AND created_id=#{createdId}
</if>
</select>
<insert id="insertWxBuildingInfo" parameterType="WxBuildingInfo" useGeneratedKeys="true" keyProperty="id">
insert into building_info
<trim prefix="(" suffix=")" suffixOverrides=",">

View File

@@ -66,7 +66,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectWxUserVo"/>
where ID = #{id}
</select>
<select id="selectByOpenId" resultType="com.ruoyi.system.domain.WxUser">
select * from user_info where OPENID = #{openId} limit 1
</select>
<select id="listByIds" resultType="com.ruoyi.system.domain.WxUser">
select * from user_info where id in
<foreach item="id" collection="userIds" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<insert id="insertWxUser" parameterType="WxUser" useGeneratedKeys="true" keyProperty="id">
insert into user_info
<trim prefix="(" suffix=")" suffixOverrides=",">