This commit is contained in:
王鹏
2025-08-14 14:57:00 +08:00
commit 9122dabf88
830 changed files with 90569 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
<?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.app.mapper.AppAdRecordMapper">
<resultMap type="AppAdRecord" id="AppAdRecordResult">
<result property="id" column="id" />
<result property="userId" column="user_id" />
<result property="integralTime" column="integral_time" />
<result property="adType" column="ad_type" />
</resultMap>
<sql id="selectAppAdRecordVo">
select id, user_id, integral_time, ad_type from app_ad_record
</sql>
<select id="selectAppAdRecordList" parameterType="AppAdRecord" resultMap="AppAdRecordResult">
<include refid="selectAppAdRecordVo"/>
<where>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="integralTime != null "> and integral_time = #{integralTime}</if>
<if test="adType != null "> and ad_type = #{adType}</if>
</where>
</select>
<select id="selectAppAdRecordById" parameterType="Long" resultMap="AppAdRecordResult">
<include refid="selectAppAdRecordVo"/>
where id = #{id}
</select>
<insert id="insertAppAdRecord" parameterType="AppAdRecord" useGeneratedKeys="true" keyProperty="id">
insert into app_ad_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="integralTime != null">integral_time,</if>
<if test="adType != null">ad_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="integralTime != null">#{integralTime},</if>
<if test="adType != null">#{adType},</if>
</trim>
</insert>
<update id="updateAppAdRecord" parameterType="AppAdRecord">
update app_ad_record
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="integralTime != null">integral_time = #{integralTime},</if>
<if test="adType != null">ad_type = #{adType},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppAdRecordById" parameterType="Long">
delete from app_ad_record where id = #{id}
</delete>
<delete id="deleteAppAdRecordByIds" parameterType="String">
delete from app_ad_record where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,131 @@
<?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.app.mapper.AppBlogArticleMapper">
<resultMap type="AppBlogArticle" id="AppBlogArticleResult">
<result property="id" column="id" />
<result property="title" column="title" />
<result property="contentInfo" column="content_info" />
<result property="articleType" column="article_type" />
<result property="keyword" column="keyword" />
<result property="showImg" column="show_img" />
<result property="appResourceId" column="app_resource_id" />
<result property="lookNumber" column="look_number" />
<result property="loveNumber" column="love_number" />
<result property="isRecommendation" column="is_recommendation" />
<result property="isShow" column="is_show" />
<result property="isAd" column="is_ad" />
<result property="adNumber" column="ad_number" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="remark" column="remark" />
<result property="weight" column="weight" />
</resultMap>
<sql id="selectAppBlogArticleVo">
select id, title, content_info, article_type, keyword, show_img, app_resource_id, look_number, weight, love_number, is_recommendation, is_show, is_ad, ad_number, del_flag, create_by, create_time, remark from app_blog_article
</sql>
<select id="selectAppBlogArticleList" parameterType="AppBlogArticle" resultMap="AppBlogArticleResult">
<include refid="selectAppBlogArticleVo"/>
<where>
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
<if test="contentInfo != null and contentInfo != ''"> and content_info like concat('%', #{contentInfo}, '%')</if>
<if test="articleType != null "> and article_type = #{articleType}</if>
<if test="appResourceId != null "> and app_resource_id = #{appResourceId}</if>
<if test="isRecommendation != null "> and is_recommendation = #{isRecommendation}</if>
<if test="isShow != null "> and is_show = #{isShow}</if>
<if test="weight != null "> and weight = #{weight}</if>
<if test="keyword != null and keyword != ''"> and (keyword like concat('%', #{keyword}, '%') or title like concat('%', #{keyword}, '%'))</if>
</where>
<choose>
<when test="orderType == 'look_number'"> ORDER BY look_number desc, create_time desc</when >
<otherwise> ORDER BY weight desc, create_time desc</otherwise >
</choose>
</select>
<select id="selectAppBlogArticleById" parameterType="Long" resultMap="AppBlogArticleResult">
<include refid="selectAppBlogArticleVo"/>
where id = #{id}
</select>
<insert id="insertAppBlogArticle" parameterType="AppBlogArticle" useGeneratedKeys="true" keyProperty="id">
insert into app_blog_article
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null">title,</if>
<if test="contentInfo != null">content_info,</if>
<if test="articleType != null">article_type,</if>
<if test="keyword != null and keyword != ''">keyword,</if>
<if test="showImg != null">show_img,</if>
<if test="appResourceId != null">app_resource_id,</if>
<if test="lookNumber != null">look_number,</if>
<if test="loveNumber != null">love_number,</if>
<if test="isRecommendation != null">is_recommendation,</if>
<if test="isShow != null">is_show,</if>
<if test="isAd != null">is_ad,</if>
<if test="adNumber != null">ad_number,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="remark != null">remark,</if>
<if test="weight != null">weight,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null">#{title},</if>
<if test="contentInfo != null">#{contentInfo},</if>
<if test="articleType != null">#{articleType},</if>
<if test="keyword != null and keyword != ''">#{keyword},</if>
<if test="showImg != null">#{showImg},</if>
<if test="appResourceId != null">#{appResourceId},</if>
<if test="lookNumber != null">#{lookNumber},</if>
<if test="loveNumber != null">#{loveNumber},</if>
<if test="isRecommendation != null">#{isRecommendation},</if>
<if test="isShow != null">#{isShow},</if>
<if test="isAd != null">#{isAd},</if>
<if test="adNumber != null">#{adNumber},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remark != null">#{remark},</if>
<if test="weight != null">#{weight},</if>
</trim>
</insert>
<update id="updateAppBlogArticle" parameterType="AppBlogArticle">
update app_blog_article
<trim prefix="SET" suffixOverrides=",">
<if test="title != null">title = #{title},</if>
<if test="contentInfo != null">content_info = #{contentInfo},</if>
<if test="articleType != null">article_type = #{articleType},</if>
<if test="keyword != null and keyword != ''">keyword = #{keyword},</if>
<if test="showImg != null">show_img = #{showImg},</if>
<if test="appResourceId != null">app_resource_id = #{appResourceId},</if>
<if test="lookNumber != null">look_number = #{lookNumber},</if>
<if test="loveNumber != null">love_number = #{loveNumber},</if>
<if test="isRecommendation != null">is_recommendation = #{isRecommendation},</if>
<if test="isShow != null">is_show = #{isShow},</if>
<if test="isAd != null">is_ad = #{isAd},</if>
<if test="adNumber != null">ad_number = #{adNumber},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="weight != null">weight = #{weight},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppBlogArticleById" parameterType="Long">
delete from app_blog_article where id = #{id}
</delete>
<delete id="deleteAppBlogArticleByIds" parameterType="String">
delete from app_blog_article where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,71 @@
<?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.app.mapper.AppCamiMapper">
<resultMap type="AppCami" id="AppCamiResult">
<result property="id" column="id" />
<result property="cami" column="cami" />
<result property="camiTyep" column="cami_tyep" />
<result property="createTime" column="create_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectAppCamiVo">
select id, cami, cami_tyep, create_time, del_flag from app_cami
</sql>
<select id="selectAppCamiList" parameterType="AppCami" resultMap="AppCamiResult">
<include refid="selectAppCamiVo"/>
<where>
<if test="cami != null and cami != ''"> and cami = #{cami}</if>
<if test="camiTyep != null "> and cami_tyep = #{camiTyep}</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="delFlag != null "> and del_flag = #{delFlag}</if>
</where>
</select>
<select id="selectAppCamiById" parameterType="Long" resultMap="AppCamiResult">
<include refid="selectAppCamiVo"/>
where id = #{id}
</select>
<insert id="insertAppCami" parameterType="AppCami" useGeneratedKeys="true" keyProperty="id">
insert into app_cami
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cami != null">cami,</if>
<if test="camiTyep != null">cami_tyep,</if>
<if test="createTime != null">create_time,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cami != null">#{cami},</if>
<if test="camiTyep != null">#{camiTyep},</if>
<if test="createTime != null">#{createTime},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateAppCami" parameterType="AppCami">
update app_cami
<trim prefix="SET" suffixOverrides=",">
<if test="cami != null">cami = #{cami},</if>
<if test="camiTyep != null">cami_tyep = #{camiTyep},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppCamiById" parameterType="Long">
delete from app_cami where id = #{id}
</delete>
<delete id="deleteAppCamiByIds" parameterType="String">
delete from app_cami where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,66 @@
<?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.app.mapper.AppDuanjuMapper">
<resultMap type="AppDuanju" id="AppDuanjuResult">
<result property="id" column="id" />
<result property="bjName" column="bj_name" />
<result property="djUrl" column="dj_url" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectAppDuanjuVo">
select id, bj_name, dj_url, create_time from app_duanju
</sql>
<select id="selectAppDuanjuList" parameterType="AppDuanju" resultMap="AppDuanjuResult">
<include refid="selectAppDuanjuVo"/>
<where>
<if test="bjName != null and bjName != ''"> and bj_name like concat('%', #{bjName}, '%')</if>
<if test="djUrl != null and djUrl != ''"> and dj_url like concat('%', #{djUrl}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
</where>
</select>
<select id="selectAppDuanjuById" parameterType="Long" resultMap="AppDuanjuResult">
<include refid="selectAppDuanjuVo"/>
where id = #{id}
</select>
<insert id="insertAppDuanju" parameterType="AppDuanju" useGeneratedKeys="true" keyProperty="id">
insert into app_duanju
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="bjName != null">bj_name,</if>
<if test="djUrl != null">dj_url,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="bjName != null">#{bjName},</if>
<if test="djUrl != null">#{djUrl},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateAppDuanju" parameterType="AppDuanju">
update app_duanju
<trim prefix="SET" suffixOverrides=",">
<if test="bjName != null">bj_name = #{bjName},</if>
<if test="djUrl != null">dj_url = #{djUrl},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppDuanjuById" parameterType="Long">
delete from app_duanju where id = #{id}
</delete>
<delete id="deleteAppDuanjuByIds" parameterType="String">
delete from app_duanju where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,102 @@
<?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.app.mapper.AppExchangeGoodsMapper">
<resultMap type="AppExchangeGoods" id="AppExchangeGoodsResult">
<result property="id" column="id" />
<result property="goodsName" column="goods_name" />
<result property="goodsImg" column="goods_img" />
<result property="goodsType" column="goods_type" />
<result property="goodsExchange" column="goods_exchange" />
<result property="isHot" column="is_hot" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="remark" column="remark" />
<result property="isCami" column="is_cami" />
<result property="camiType" column="cami_type" />
</resultMap>
<sql id="selectAppExchangeGoodsVo">
select id, goods_name, goods_img, goods_type, goods_exchange, is_hot, del_flag, create_by, create_time, remark, is_cami, cami_type from app_exchange_goods
</sql>
<select id="selectAppExchangeGoodsList" parameterType="AppExchangeGoods" resultMap="AppExchangeGoodsResult">
<include refid="selectAppExchangeGoodsVo"/>
<where>
<if test="goodsName != null and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
<if test="goodsImg != null and goodsImg != ''"> and goods_img = #{goodsImg}</if>
<if test="goodsType != null "> and goods_type = #{goodsType}</if>
<if test="goodsExchange != null "> and goods_exchange = #{goodsExchange}</if>
<if test="isHot != null "> and is_hot = #{isHot}</if>
<if test="isCami != null "> and is_cami = #{isCami}</if>
<if test="camiType != null "> and cami_type = #{camiType}</if>
</where>
</select>
<select id="selectAppExchangeGoodsById" parameterType="Long" resultMap="AppExchangeGoodsResult">
<include refid="selectAppExchangeGoodsVo"/>
where id = #{id}
</select>
<insert id="insertAppExchangeGoods" parameterType="AppExchangeGoods" useGeneratedKeys="true" keyProperty="id">
insert into app_exchange_goods
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="goodsName != null and goodsName != ''">goods_name,</if>
<if test="goodsImg != null and goodsImg != ''">goods_img,</if>
<if test="goodsType != null">goods_type,</if>
<if test="goodsExchange != null">goods_exchange,</if>
<if test="isHot != null">is_hot,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="remark != null">remark,</if>
<if test="isCami != null">is_cami,</if>
<if test="camiType != null">cami_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="goodsName != null and goodsName != ''">#{goodsName},</if>
<if test="goodsImg != null and goodsImg != ''">#{goodsImg},</if>
<if test="goodsType != null">#{goodsType},</if>
<if test="goodsExchange != null">#{goodsExchange},</if>
<if test="isHot != null">#{isHot},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remark != null">#{remark},</if>
<if test="isCami != null">#{isCami},</if>
<if test="camiType != null">#{camiType},</if>
</trim>
</insert>
<update id="updateAppExchangeGoods" parameterType="AppExchangeGoods">
update app_exchange_goods
<trim prefix="SET" suffixOverrides=",">
<if test="goodsName != null and goodsName != ''">goods_name = #{goodsName},</if>
<if test="goodsImg != null and goodsImg != ''">goods_img = #{goodsImg},</if>
<if test="goodsType != null">goods_type = #{goodsType},</if>
<if test="goodsExchange != null">goods_exchange = #{goodsExchange},</if>
<if test="isHot != null">is_hot = #{isHot},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="isCami != null">is_cami = #{isCami},</if>
<if test="camiType != null">cami_type = #{camiType},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppExchangeGoodsById" parameterType="Long">
delete from app_exchange_goods where id = #{id}
</delete>
<delete id="deleteAppExchangeGoodsByIds" parameterType="String">
delete from app_exchange_goods where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,81 @@
<?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.app.mapper.AppExchangeRecordsMapper">
<resultMap type="AppExchangeRecords" id="AppExchangeRecordsResult">
<result property="id" column="id" />
<result property="goodsName" column="goods_name" />
<result property="recordsUserId" column="records_user_id" />
<result property="recordsNumber" column="records_number" />
<result property="recordsTime" column="records_time" />
<result property="redemptionCode" column="redemption_code" />
<result property="redemptionState" column="redemption_state" />
</resultMap>
<sql id="selectAppExchangeRecordsVo">
select id, goods_name, records_user_id, records_number, records_time, redemption_code, redemption_state from app_exchange_records
</sql>
<select id="selectAppExchangeRecordsList" parameterType="AppExchangeRecords" resultMap="AppExchangeRecordsResult">
<include refid="selectAppExchangeRecordsVo"/>
<where>
<if test="goodsName != null and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
<if test="recordsUserId != null "> and records_user_id = #{recordsUserId}</if>
<if test="recordsNumber != null "> and records_number = #{recordsNumber}</if>
<if test="recordsTime != null "> and records_time = #{recordsTime}</if>
<if test="redemptionCode != null and redemptionCode != ''"> and redemption_code = #{redemptionCode}</if>
<if test="redemptionState != null and redemptionState != ''"> and redemption_state = #{redemptionState}</if>
</where>ORDER BY records_time desc
</select>
<select id="selectAppExchangeRecordsById" parameterType="Long" resultMap="AppExchangeRecordsResult">
<include refid="selectAppExchangeRecordsVo"/>
where id = #{id}
</select>
<insert id="insertAppExchangeRecords" parameterType="AppExchangeRecords" useGeneratedKeys="true" keyProperty="id">
insert into app_exchange_records
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="goodsName != null">goods_name,</if>
<if test="recordsUserId != null">records_user_id,</if>
<if test="recordsNumber != null">records_number,</if>
<if test="recordsTime != null">records_time,</if>
<if test="redemptionCode != null">redemption_code,</if>
<if test="redemptionState != null">redemption_state,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="goodsName != null">#{goodsName},</if>
<if test="recordsUserId != null">#{recordsUserId},</if>
<if test="recordsNumber != null">#{recordsNumber},</if>
<if test="recordsTime != null">#{recordsTime},</if>
<if test="redemptionCode != null">#{redemptionCode},</if>
<if test="redemptionState != null">#{redemptionState},</if>
</trim>
</insert>
<update id="updateAppExchangeRecords" parameterType="AppExchangeRecords">
update app_exchange_records
<trim prefix="SET" suffixOverrides=",">
<if test="goodsName != null">goods_name = #{goodsName},</if>
<if test="recordsUserId != null">records_user_id = #{recordsUserId},</if>
<if test="recordsNumber != null">records_number = #{recordsNumber},</if>
<if test="recordsTime != null">records_time = #{recordsTime},</if>
<if test="redemptionCode != null">redemption_code = #{redemptionCode},</if>
<if test="redemptionState != null">redemption_state = #{redemptionState},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppExchangeRecordsById" parameterType="Long">
delete from app_exchange_records where id = #{id}
</delete>
<delete id="deleteAppExchangeRecordsByIds" parameterType="String">
delete from app_exchange_records where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,99 @@
<?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.app.mapper.AppIntegralRecordMapper">
<resultMap type="AppIntegralRecord" id="AppIntegralRecordResult">
<result property="id" column="id" />
<result property="source" column="source" />
<result property="isAdd" column="is_add" />
<result property="integralNumber" column="integral_number" />
<result property="userId" column="user_id" />
<result property="resourceId" column="resource_id" />
<result property="resourceTitle" column="resource_title" />
<result property="integralTime" column="integral_time" />
</resultMap>
<sql id="selectAppIntegralRecordVo">
select a.id, a.source, a.is_add, a.integral_number, a.user_id, a.resource_id, a.integral_time, r.resource_title
from app_integral_record a
left join app_resource r on a.resource_id = r.id
</sql>
<select id="selectAppIntegralRecordList" parameterType="AppIntegralRecord" resultMap="AppIntegralRecordResult">
<include refid="selectAppIntegralRecordVo"/>
<where>
<if test="source != null and source != ''"> and a.source like concat('%', #{source}, '%')</if>
<if test="isAdd != null "> and a.is_add = #{isAdd}</if>
<if test="integralNumber != null "> and a.integral_number = #{integralNumber}</if>
<if test="userId != null "> and a.user_id = #{userId}</if>
<if test="resourceId != null "> and a.resource_id = #{resourceId}</if>
<if test="resourceTitle != null and resourceTitle != ''"> and r.resource_title like concat('%', #{resourceTitle}, '%')</if>
<if test="integralTime != null ">
AND date_format(a.integral_time,'%y%m%d') = date_format(#{integralTime},'%y%m%d')
</if>
</where> ORDER BY a.integral_time desc
</select>
<select id="selectAppIntegralRecordCount" parameterType="AppIntegralRecord" resultType="int">
SELECT COUNT(0) FROM app_integral_record a
<where>
<if test="source != null and source != ''"> and a.source like concat('%', #{source}, '%')</if>
<if test="isAdd != null "> and a.is_add = #{isAdd}</if>
<if test="integralNumber != null "> and a.integral_number = #{integralNumber}</if>
<if test="userId != null "> and a.user_id = #{userId}</if>
<if test="resourceId != null "> and a.resource_id = #{resourceId}</if>
<if test="integralTime != null "> AND date_format(a.integral_time,'%y%m%d') = date_format(#{integralTime},'%y%m%d')</if>
</where>
</select>
<select id="selectAppIntegralRecordById" parameterType="Long" resultMap="AppIntegralRecordResult">
<include refid="selectAppIntegralRecordVo"/>
where a.id = #{id}
</select>
<insert id="insertAppIntegralRecord" parameterType="AppIntegralRecord" useGeneratedKeys="true" keyProperty="id">
insert into app_integral_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="source != null">source,</if>
<if test="isAdd != null">is_add,</if>
<if test="integralNumber != null">integral_number,</if>
<if test="userId != null">user_id,</if>
<if test="resourceId != null">resource_id,</if>
<if test="integralTime != null">integral_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="source != null">#{source},</if>
<if test="isAdd != null">#{isAdd},</if>
<if test="integralNumber != null">#{integralNumber},</if>
<if test="userId != null">#{userId},</if>
<if test="resourceId != null">#{resourceId},</if>
<if test="integralTime != null">#{integralTime},</if>
</trim>
</insert>
<update id="updateAppIntegralRecord" parameterType="AppIntegralRecord">
update app_integral_record
<trim prefix="SET" suffixOverrides=",">
<if test="source != null">source = #{source},</if>
<if test="isAdd != null">is_add = #{isAdd},</if>
<if test="integralNumber != null">integral_number = #{integralNumber},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="resourceId != null">resource_id = #{resourceId},</if>
<if test="integralTime != null">integral_time = #{integralTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppIntegralRecordById" parameterType="Long">
delete from app_integral_record where id = #{id}
</delete>
<delete id="deleteAppIntegralRecordByIds" parameterType="String">
delete from app_integral_record where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,78 @@
<?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.app.mapper.AppLotteryGoodsMapper">
<resultMap type="AppLotteryGoods" id="AppLotteryGoodsResult">
<result property="id" column="id" />
<result property="image" column="image" />
<result property="name" column="name" />
<result property="percentage" column="percentage" />
<result property="reward" column="reward" />
<result property="indexNum" column="index_num" />
</resultMap>
<sql id="selectAppLotteryGoodsVo">
select id, image, name, percentage, reward, index_num from app_lottery_goods
</sql>
<select id="selectAppLotteryGoodsList" parameterType="AppLotteryGoods" resultMap="AppLotteryGoodsResult">
<include refid="selectAppLotteryGoodsVo"/>
<where>
<if test="image != null and image != ''"> and image = #{image}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="percentage != null "> and percentage = #{percentage}</if>
<if test="reward != null "> and reward = #{reward}</if>
<if test="indexNum != null "> and index_num = #{indexNum}</if>
</where>
</select>
<select id="selectAppLotteryGoodsById" parameterType="Long" resultMap="AppLotteryGoodsResult">
<include refid="selectAppLotteryGoodsVo"/>
where id = #{id}
</select>
<insert id="insertAppLotteryGoods" parameterType="AppLotteryGoods">
insert into app_lottery_goods
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="image != null">image,</if>
<if test="name != null">name,</if>
<if test="percentage != null">percentage,</if>
<if test="reward != null">reward,</if>
<if test="indexNum != null">index_num,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="image != null">#{image},</if>
<if test="name != null">#{name},</if>
<if test="percentage != null">#{percentage},</if>
<if test="reward != null">#{reward},</if>
<if test="indexNum != null">#{indexNum},</if>
</trim>
</insert>
<update id="updateAppLotteryGoods" parameterType="AppLotteryGoods">
update app_lottery_goods
<trim prefix="SET" suffixOverrides=",">
<if test="image != null">image = #{image},</if>
<if test="name != null">name = #{name},</if>
<if test="percentage != null">percentage = #{percentage},</if>
<if test="reward != null">reward = #{reward},</if>
<if test="indexNum != null">index_num = #{indexNum},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppLotteryGoodsById" parameterType="Long">
delete from app_lottery_goods where id = #{id}
</delete>
<delete id="deleteAppLotteryGoodsByIds" parameterType="String">
delete from app_lottery_goods where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.app.mapper.AppLotteryLogMapper">
<resultMap type="AppLotteryLog" id="AppLotteryLogResult">
<result property="id" column="id" />
<result property="goodId" column="good_id" />
<result property="lotteryUserId" column="lottery_user_id" />
<result property="lotteryTime" column="lottery_time" />
<result property="name" column="name" />
</resultMap>
<sql id="selectAppLotteryLogVo">
select a.id, good_id, lottery_user_id, lottery_time,b.`name` from app_lottery_log a left join app_lottery_goods b on a.good_id = b.id
</sql>
<select id="selectAppLotteryLogList" parameterType="AppLotteryLog" resultMap="AppLotteryLogResult">
<include refid="selectAppLotteryLogVo"/>
<where>
<if test="goodId != null "> and good_id = #{goodId}</if>
<if test="lotteryUserId != null "> and lottery_user_id = #{lotteryUserId}</if>
<if test="lotteryTime != null "> and lottery_time = #{lotteryTime}</if>
</where> ORDER BY lottery_time desc
</select>
<select id="selectAppLotteryLogById" parameterType="Long" resultMap="AppLotteryLogResult">
<include refid="selectAppLotteryLogVo"/>
where a.id = #{id}
</select>
<insert id="insertAppLotteryLog" parameterType="AppLotteryLog" useGeneratedKeys="true" keyProperty="id">
insert into app_lottery_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="goodId != null">good_id,</if>
<if test="lotteryUserId != null">lottery_user_id,</if>
<if test="lotteryTime != null">lottery_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="goodId != null">#{goodId},</if>
<if test="lotteryUserId != null">#{lotteryUserId},</if>
<if test="lotteryTime != null">#{lotteryTime},</if>
</trim>
</insert>
<update id="updateAppLotteryLog" parameterType="AppLotteryLog">
update app_lottery_log
<trim prefix="SET" suffixOverrides=",">
<if test="goodId != null">good_id = #{goodId},</if>
<if test="lotteryUserId != null">lottery_user_id = #{lotteryUserId},</if>
<if test="lotteryTime != null">lottery_time = #{lotteryTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppLotteryLogById" parameterType="Long">
delete from app_lottery_log where id = #{id}
</delete>
<delete id="deleteAppLotteryLogByIds" parameterType="String">
delete from app_lottery_log where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,98 @@
<?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.app.mapper.AppPayOrderMapper">
<resultMap type="AppPayOrder" id="AppPayOrderResult">
<result property="id" column="id" />
<result property="orderNo" column="order_no" />
<result property="tradeNo" column="trade_no" />
<result property="userId" column="user_id" />
<result property="openId" column="open_id" />
<result property="amount" column="amount" />
<result property="points" column="points" />
<result property="status" column="status" />
<result property="createTime" column="create_time" />
<result property="payTime" column="pay_time" />
</resultMap>
<sql id="selectAppPayOrderVo">
select id, order_no, trade_no, user_id, open_id, amount, points, status, create_time, pay_time from app_pay_order
</sql>
<select id="selectAppPayOrderList" parameterType="AppPayOrder" resultMap="AppPayOrderResult">
<include refid="selectAppPayOrderVo"/>
<where>
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
<if test="tradeNo != null and tradeNo != ''"> and trade_no = #{tradeNo}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="openId != null and openId != ''"> and open_id = #{openId}</if>
<if test="status != null "> and status = #{status}</if>
<if test="payTime != null "> and pay_time = #{payTime}</if>
</where>
</select>
<select id="selectAppPayOrderById" parameterType="Long" resultMap="AppPayOrderResult">
<include refid="selectAppPayOrderVo"/>
where id = #{id}
</select>
<select id="selectAppPayOrderByOrderNo" parameterType="String" resultMap="AppPayOrderResult">
<include refid="selectAppPayOrderVo"/>
where order_no = #{orderNo}
</select>
<insert id="insertAppPayOrder" parameterType="AppPayOrder" useGeneratedKeys="true" keyProperty="id">
insert into app_pay_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderNo != null and orderNo != ''">order_no,</if>
<if test="tradeNo != null and tradeNo != ''">trade_no,</if>
<if test="userId != null">user_id,</if>
<if test="openId != null and openId != ''">open_id,</if>
<if test="amount != null">amount,</if>
<if test="points != null">points,</if>
<if test="status != null">status,</if>
<if test="createTime != null">create_time,</if>
<if test="payTime != null">pay_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderNo != null and orderNo != ''">#{orderNo},</if>
<if test="tradeNo != null and tradeNo != ''">#{tradeNo},</if>
<if test="userId != null">#{userId},</if>
<if test="openId != null and openId != ''">#{openId},</if>
<if test="amount != null">#{amount},</if>
<if test="points != null">#{points},</if>
<if test="status != null">#{status},</if>
<if test="createTime != null">#{createTime},</if>
<if test="payTime != null">#{payTime},</if>
</trim>
</insert>
<update id="updateAppPayOrder" parameterType="AppPayOrder">
update app_pay_order
<trim prefix="SET" suffixOverrides=",">
<if test="orderNo != null and orderNo != ''">order_no = #{orderNo},</if>
<if test="tradeNo != null and tradeNo != ''">trade_no = #{tradeNo},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="openId != null and openId != ''">open_id = #{openId},</if>
<if test="amount != null">amount = #{amount},</if>
<if test="points != null">points = #{points},</if>
<if test="status != null">status = #{status},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="payTime != null">pay_time = #{payTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppPayOrderById" parameterType="Long">
delete from app_pay_order where id = #{id}
</delete>
<delete id="deleteAppPayOrderByIds" parameterType="String">
delete from app_pay_order where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,164 @@
<?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.app.mapper.AppResourceMapper">
<resultMap type="AppResource" id="AppResourceResult">
<result property="id" column="id" />
<result property="resourceTitle" column="resource_title" />
<result property="showImg" column="show_img" />
<result property="explain" column="explain" />
<result property="resourceType" column="resource_type" />
<result property="keyword" column="keyword" />
<result property="isShow" column="is_show" />
<result property="isAd" column="is_ad" />
<result property="adNumber" column="ad_number" />
<result property="downNum" column="down_num" />
<result property="weight" column="weight" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="remark" column="remark" />
</resultMap>
<resultMap id="AppResourceAppResourceListResult" type="AppResource" extends="AppResourceResult">
<collection property="appResourceListList" notNullColumn="sub_id" javaType="java.util.List" resultMap="AppResourceListResult" />
</resultMap>
<resultMap type="AppResourceList" id="AppResourceListResult">
<result property="id" column="sub_id" />
<result property="listName" column="sub_list_name" />
<result property="listUrl" column="sub_list_url" />
<result property="password" column="sub_password" />
<result property="appResourceId" column="sub_app_resource_id" />
</resultMap>
<sql id="selectAppResourceVo">
select id, resource_title, show_img, `explain`, resource_type, keyword, is_show, is_ad, ad_number, down_num, weight, del_flag, create_by, create_time, remark from app_resource
</sql>
<select id="selectAppResourceList" parameterType="AppResource" resultMap="AppResourceResult">
<include refid="selectAppResourceVo"/>
<where>
<if test="resourceTitle != null and resourceTitle != ''"> and resource_title like concat('%', #{resourceTitle}, '%')</if>
<if test="showImg != null and showImg != ''"> and show_img = #{showImg}</if>
<if test="explain != null and explain != ''"> and `explain` = #{explain}</if>
<if test="resourceType != null "> and resource_type = #{resourceType}</if>
<if test="isShow != null "> and is_show = #{isShow}</if>
<if test="isAd != null "> and is_ad = #{isAd}</if>
<if test="adNumber != null "> and ad_number = #{adNumber}</if>
<if test="downNum != null "> and down_num = #{downNum}</if>
<if test="weight != null "> and weight = #{weight}</if>
<if test="keyword != null and keyword != ''"> and (keyword like concat('%', #{keyword}, '%') or resource_title like concat('%', #{keyword}, '%'))</if>
</where> ORDER BY weight desc, create_time desc
</select>
<select id="selectAppResourceById" parameterType="Long" resultMap="AppResourceAppResourceListResult">
select a.id, a.resource_title, a.show_img, a.`explain`,a.`keyword`, a.resource_type, a.is_show, a.is_ad, a.ad_number, a.down_num, a.weight, a.del_flag, a.create_by, a.create_time, a.remark,
b.id as sub_id, b.list_name as sub_list_name, b.list_url as sub_list_url, b.password as sub_password, b.app_resource_id as sub_app_resource_id
from app_resource a
left join app_resource_list b on b.app_resource_id = a.id
where a.id = #{id}
</select>
<insert id="insertAppResource" parameterType="AppResource" useGeneratedKeys="true" keyProperty="id">
insert into app_resource
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="resourceTitle != null and resourceTitle != ''">resource_title,</if>
<if test="showImg != null and showImg != ''">show_img,</if>
<if test="explain != null">`explain`,</if>
<if test="resourceType != null">resource_type,</if>
<if test="keyword != null and keyword != ''">keyword,</if>
<if test="isShow != null">is_show,</if>
<if test="isAd != null">is_ad,</if>
<if test="adNumber != null">ad_number,</if>
<if test="downNum != null">down_num,</if>
<if test="weight != null">weight,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="resourceTitle != null and resourceTitle != ''">#{resourceTitle},</if>
<if test="showImg != null and showImg != ''">#{showImg},</if>
<if test="explain != null">#{explain},</if>
<if test="resourceType != null">#{resourceType},</if>
<if test="keyword != null and keyword != ''">#{keyword},</if>
<if test="isShow != null">#{isShow},</if>
<if test="isAd != null">#{isAd},</if>
<if test="adNumber != null">#{adNumber},</if>
<if test="downNum != null">#{downNum},</if>
<if test="weight != null">#{weight},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateAppResource" parameterType="AppResource">
update app_resource
<trim prefix="SET" suffixOverrides=",">
<if test="resourceTitle != null and resourceTitle != ''">resource_title = #{resourceTitle},</if>
<if test="showImg != null and showImg != ''">show_img = #{showImg},</if>
<if test="explain != null">`explain` = #{explain},</if>
<if test="resourceType != null">resource_type = #{resourceType},</if>
<if test="keyword != null and keyword != ''">keyword = #{keyword},</if>
<if test="isShow != null">is_show = #{isShow},</if>
<if test="isAd != null">is_ad = #{isAd},</if>
<if test="adNumber != null">ad_number = #{adNumber},</if>
<if test="downNum != null">down_num = #{downNum},</if>
<if test="weight != null">weight = #{weight},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppResourceById" parameterType="Long">
delete from app_resource where id = #{id}
</delete>
<delete id="deleteAppResourceByIds" parameterType="String">
delete from app_resource where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteAppResourceListByAppResourceIds" parameterType="String">
delete from app_resource_list where app_resource_id in
<foreach item="appResourceId" collection="array" open="(" separator="," close=")">
#{appResourceId}
</foreach>
</delete>
<delete id="deleteAppResourceListByAppResourceId" parameterType="Long">
delete from app_resource_list where app_resource_id = #{appResourceId}
</delete>
<insert id="batchAppResourceList">
insert into app_resource_list( id, list_name, list_url, password, app_resource_id) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.listName}, #{item.listUrl}, #{item.password}, #{item.appResourceId})
</foreach>
</insert>
<select id="selectAppResourceByIdAndUserId" resultMap="AppResourceAppResourceListResult">
select a.id, a.resource_title, a.show_img, a.`explain`, a.`keyword`, a.resource_type, a.is_show,
CASE
WHEN (SELECT COUNT(1) FROM app_integral_record WHERE resource_id = #{id} AND user_id = #{userId}) > 0 THEN 0
ELSE a.is_ad
END as is_ad,
a.ad_number, a.down_num, a.weight, a.del_flag, a.create_by, a.create_time, a.remark,
b.id as sub_id, b.list_name as sub_list_name, b.list_url as sub_list_url,
b.password as sub_password, b.app_resource_id as sub_app_resource_id
from app_resource a
left join app_resource_list b on b.app_resource_id = a.id
where a.id = #{id}
</select>
</mapper>

View File

@@ -0,0 +1,78 @@
<?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.app.mapper.AppResourceNewMapper">
<resultMap type="AppResourceNew" id="AppResourceNewResult">
<result property="id" column="id" />
<result property="resourceName" column="resource_name" />
<result property="resourceUrl" column="resource_url" />
<result property="createTime" column="create_time" />
<result property="copyNumber" column="copy_number" />
</resultMap>
<sql id="selectAppResourceNewVo">
select id, resource_name, resource_url, create_time, copy_number from app_resource_new
</sql>
<select id="selectAppResourceNewList" parameterType="AppResourceNew" resultMap="AppResourceNewResult">
<include refid="selectAppResourceNewVo"/>
<where>
<if test="resourceName != null and resourceName != ''"> and resource_name like concat('%', #{resourceName}, '%')</if>
</where>
order by id desc
</select>
<select id="selectAppResourceNewById" parameterType="Long" resultMap="AppResourceNewResult">
<include refid="selectAppResourceNewVo"/>
where id = #{id}
</select>
<insert id="insertAppResourceNew" parameterType="AppResourceNew" useGeneratedKeys="true" keyProperty="id">
insert into app_resource_new
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="resourceName != null">resource_name,</if>
<if test="resourceUrl != null">resource_url,</if>
<if test="createTime != null">create_time,</if>
<if test="copyNumber != null">copy_number,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="resourceName != null">#{resourceName},</if>
<if test="resourceUrl != null">#{resourceUrl},</if>
<if test="createTime != null">#{createTime},</if>
<if test="copyNumber != null">#{copyNumber},</if>
</trim>
</insert>
<update id="updateAppResourceNew" parameterType="AppResourceNew">
update app_resource_new
<trim prefix="SET" suffixOverrides=",">
<if test="resourceName != null">resource_name = #{resourceName},</if>
<if test="resourceUrl != null">resource_url = #{resourceUrl},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="copyNumber != null">copy_number = #{copyNumber},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppResourceNewById" parameterType="Long">
delete from app_resource_new where id = #{id}
</delete>
<delete id="deleteAppResourceNewByIds" parameterType="String">
delete from app_resource_new where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<update id="updateCopyNumber" parameterType="Long">
update app_resource_new set copy_number = copy_number + 1 where id = #{id}
</update>
<select id="selectRankingList" resultMap="AppResourceNewResult">
<include refid="selectAppResourceNewVo"/>
order by copy_number desc limit 10
</select>
</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.app.mapper.AppWallpaperMapper">
<resultMap type="AppWallpaper" id="AppWallpaperResult">
<result property="id" column="id" />
<result property="imgUrl" column="img_url" />
<result property="isAd" column="is_ad" />
<result property="isShow" column="is_show" />
<result property="downNum" column="down_num" />
<result property="keyword" column="keyword" />
<result property="wallpaperType" column="wallpaper_type" />
<result property="weight" column="weight" />
<result property="createTime" column="create_time" />
<result property="compressImgUrl" column="compress_img_url" />
</resultMap>
<sql id="selectAppWallpaperVo">
select id, img_url, is_ad, is_show, down_num, keyword, wallpaper_type, weight, create_time, compress_img_url from app_wallpaper
</sql>
<select id="selectAppWallpaperList" parameterType="AppWallpaper" resultMap="AppWallpaperResult">
<include refid="selectAppWallpaperVo"/>
<where>
<if test="imgUrl != null and imgUrl != ''"> and img_url = #{imgUrl}</if>
<if test="isAd != null "> and is_ad = #{isAd}</if>
<if test="isShow != null and isShow != ''"> and is_show = #{isShow}</if>
<if test="downNum != null and downNum != ''"> and down_num = #{downNum}</if>
<if test="keyword != null and keyword != ''"> and keyword like concat('%', #{keyword}, '%')</if>
<if test="wallpaperType != null "> and wallpaper_type = #{wallpaperType}</if>
<if test="weight != null "> and weight = #{weight}</if>
</where> ORDER BY weight desc, create_time desc
</select>
<select id="selectAppWallpaperById" parameterType="Long" resultMap="AppWallpaperResult">
<include refid="selectAppWallpaperVo"/>
where id = #{id}
</select>
<insert id="insertAppWallpaper" parameterType="AppWallpaper" useGeneratedKeys="true" keyProperty="id">
insert into app_wallpaper
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="imgUrl != null and imgUrl != ''">img_url,</if>
<if test="isAd != null">is_ad,</if>
<if test="isShow != null and isShow != ''">is_show,</if>
<if test="downNum != null">down_num,</if>
<if test="keyword != null and keyword != ''">keyword,</if>
<if test="wallpaperType != null">wallpaper_type,</if>
<if test="weight != null">weight,</if>
<if test="createTime != null">create_time,</if>
<if test="compressImgUrl != null">compress_img_url,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="imgUrl != null and imgUrl != ''">#{imgUrl},</if>
<if test="isAd != null">#{isAd},</if>
<if test="isShow != null and isShow != ''">#{isShow},</if>
<if test="downNum != null">#{downNum},</if>
<if test="keyword != null and keyword != ''">#{keyword},</if>
<if test="wallpaperType != null">#{wallpaperType},</if>
<if test="weight != null">#{weight},</if>
<if test="createTime != null">#{createTime},</if>
<if test="compressImgUrl != null">#{compressImgUrl},</if>
</trim>
</insert>
<update id="updateAppWallpaper" parameterType="AppWallpaper">
update app_wallpaper
<trim prefix="SET" suffixOverrides=",">
<if test="imgUrl != null and imgUrl != ''">img_url = #{imgUrl},</if>
<if test="isAd != null">is_ad = #{isAd},</if>
<if test="isShow != null and isShow != ''">is_show = #{isShow},</if>
<if test="downNum != null">down_num = #{downNum},</if>
<if test="keyword != null and keyword != ''">keyword = #{keyword},</if>
<if test="wallpaperType != null">wallpaper_type = #{wallpaperType},</if>
<if test="weight != null">weight = #{weight},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="compressImgUrl != null">compress_img_url = #{compressImgUrl},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppWallpaperById" parameterType="Long">
delete from app_wallpaper where id = #{id}
</delete>
<delete id="deleteAppWallpaperByIds" parameterType="String">
delete from app_wallpaper where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.app.mapper.NewDownloadUrlMapper">
<resultMap type="NewDownloadUrl" id="NewDownloadUrlResult">
<result property="id" column="id" />
<result property="httpUrl" column="http_url" />
</resultMap>
<sql id="selectNewDownloadUrlVo">
select id, http_url from new_download_url
</sql>
<select id="selectNewDownloadUrlList" parameterType="NewDownloadUrl" resultMap="NewDownloadUrlResult">
<include refid="selectNewDownloadUrlVo"/>
<where>
</where>
</select>
<select id="selectNewDownloadUrlById" parameterType="Long" resultMap="NewDownloadUrlResult">
<include refid="selectNewDownloadUrlVo"/>
where id = #{id}
</select>
<insert id="insertNewDownloadUrl" parameterType="NewDownloadUrl" useGeneratedKeys="true" keyProperty="id">
insert into new_download_url
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="httpUrl != null">http_url,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="httpUrl != null">#{httpUrl},</if>
</trim>
</insert>
<update id="updateNewDownloadUrl" parameterType="NewDownloadUrl">
update new_download_url
<trim prefix="SET" suffixOverrides=",">
<if test="httpUrl != null">http_url = #{httpUrl},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteNewDownloadUrlById" parameterType="Long">
delete from new_download_url where id = #{id}
</delete>
<delete id="deleteNewDownloadUrlByIds" parameterType="String">
delete from new_download_url where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>