第一次提交
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
<?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.gxwebsoft.love.mapper.CertificateMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.nickname,b.avatar
|
||||
FROM love_certificate a
|
||||
LEFT JOIN sys_user b ON a.user_id = b.user_id
|
||||
<where>
|
||||
<if test="param.certificateId != null">
|
||||
AND a.certificate_id = #{param.certificateId}
|
||||
</if>
|
||||
<if test="param.certificateName != null">
|
||||
AND a.certificate_name LIKE CONCAT('%', #{param.certificateName}, '%')
|
||||
</if>
|
||||
<if test="param.fullName != null">
|
||||
AND a.full_name LIKE CONCAT('%', #{param.fullName}, '%')
|
||||
</if>
|
||||
<if test="param.certificateCode != null">
|
||||
AND a.certificate_code LIKE CONCAT('%', #{param.certificateCode}, '%')
|
||||
</if>
|
||||
<if test="param.certificateType != null">
|
||||
AND a.certificate_type = #{param.certificateType}
|
||||
</if>
|
||||
<if test="param.files != null">
|
||||
AND a.files LIKE CONCAT('%', #{param.files}, '%')
|
||||
</if>
|
||||
<if test="param.realName != null">
|
||||
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||
</if>
|
||||
<if test="param.expirationTime != null">
|
||||
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
|
||||
</if>
|
||||
<if test="param.businessEntity != null">
|
||||
AND a.business_entity LIKE CONCAT('%', #{param.businessEntity}, '%')
|
||||
</if>
|
||||
<if test="param.college != null">
|
||||
AND a.college LIKE CONCAT('%', #{param.college}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.authentication != null">
|
||||
AND a.authentication = #{param.authentication}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.Certificate">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.Certificate">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?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.gxwebsoft.love.mapper.ChatConversationMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM love_chat_conversation a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.friendId != null">
|
||||
AND a.friend_id = #{param.friendId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.ChatConversation">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.ChatConversation">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?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.gxwebsoft.love.mapper.ChatMessageMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM love_chat_message a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.formUserId != null">
|
||||
AND a.form_user_id = #{param.formUserId}
|
||||
</if>
|
||||
<if test="param.toUserId != null">
|
||||
AND a.to_user_id = #{param.toUserId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.ChatMessage">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.ChatMessage">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
83
src/main/java/com/gxwebsoft/love/mapper/xml/ProfitMapper.xml
Normal file
83
src/main/java/com/gxwebsoft/love/mapper/xml/ProfitMapper.xml
Normal file
@@ -0,0 +1,83 @@
|
||||
<?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.gxwebsoft.love.mapper.ProfitMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,
|
||||
b.type,b.money,b.user_id as playerId,b.comments,b.money as orderPrice,b.is_settled,b.type,b.grade_id,
|
||||
c.nickname as playerNickname,c.avatar as playerAvatar,
|
||||
d.name as gradeName
|
||||
FROM love_profit a
|
||||
LEFT JOIN love_user_plan_log b ON a.log_id = b.log_id AND b.pay_status = 20
|
||||
LEFT JOIN sys_user c ON b.user_id = c.user_id
|
||||
LEFT JOIN shop_user_grade d ON b.grade_id = d.grade_id
|
||||
<where>
|
||||
<if test="param.profitId != null">
|
||||
AND a.profit_id = #{param.profitId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.scene != null">
|
||||
AND a.scene = #{param.scene}
|
||||
</if>
|
||||
<if test="param.sceneMultiple != null">
|
||||
AND a.scene IN
|
||||
<foreach collection="param.sceneMultiple.split(',')" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.money != null">
|
||||
AND a.money = #{param.money}
|
||||
</if>
|
||||
<if test="param.balance != null">
|
||||
AND a.balance = #{param.balance}
|
||||
</if>
|
||||
<if test="param.remark != null">
|
||||
AND a.remark LIKE CONCAT('%', #{param.remark}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.merchantCode != null">
|
||||
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.gradeStart != null">
|
||||
AND d.grade_id >= #{param.gradeStart}
|
||||
</if>
|
||||
<if test="param.gradeEnd != null">
|
||||
AND d.grade_id <= #{param.gradeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.Profit">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.Profit">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?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.gxwebsoft.love.mapper.UserPlanEquityMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.nickname,b.phone,b.avatar as userAvatar
|
||||
FROM love_user_plan_equity a
|
||||
LEFT JOIN sys_user b ON a.user_id = b.user_id
|
||||
<where>
|
||||
<if test="param.planEquityId != null">
|
||||
AND a.plan_equity_id = #{param.planEquityId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.planId != null">
|
||||
AND a.plan_id = #{param.planId}
|
||||
</if>
|
||||
<if test="param.planName != null">
|
||||
AND a.plan_name LIKE CONCAT('%', #{param.planName}, '%')
|
||||
</if>
|
||||
<if test="param.realName != null">
|
||||
AND a.real_name = #{param.realName}
|
||||
</if>
|
||||
<if test="param.province != null">
|
||||
AND a.province = #{param.province}
|
||||
</if>
|
||||
<if test="param.city != null">
|
||||
AND a.city = #{param.city}
|
||||
</if>
|
||||
<if test="param.region != null">
|
||||
AND a.region = #{param.region}
|
||||
</if>
|
||||
<if test="param.area != null">
|
||||
AND a.area = #{param.area}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.expirationTime != null">
|
||||
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (
|
||||
b.nickname LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR b.phone LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.UserPlanEquity">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.UserPlanEquity">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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.gxwebsoft.love.mapper.UserPlanIconMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM love_user_plan_icon a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.planId != null">
|
||||
AND a.plan_id = #{param.planId}
|
||||
</if>
|
||||
<if test="param.icon != null">
|
||||
AND a.icon LIKE CONCAT('%', #{param.icon}, '%')
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.UserPlanIcon">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.UserPlanIcon">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?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.gxwebsoft.love.mapper.UserPlanLogMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.role_id,
|
||||
b.name as planName,b.icon as planIcon,
|
||||
c.nickname,c.avatar as userAvatar,
|
||||
d.dealer_id as dealerId,
|
||||
e.dealer_id as dealerId2,
|
||||
f.real_name as realName2,f.certificate_code as idCard
|
||||
FROM love_user_plan_log a
|
||||
LEFT JOIN love_user_plan b ON a.plan_id = b.plan_id
|
||||
LEFT JOIN sys_user c ON a.user_id = c.user_id
|
||||
LEFT JOIN shop_user_referee d ON a.user_id = d.user_id and d.deleted = 0
|
||||
LEFT JOIN shop_user_referee e ON d.dealer_id = e.user_id and e.deleted = 0
|
||||
LEFT JOIN love_certificate f ON a.user_id = f.user_id and f.certificate_type = 'idCard'
|
||||
<where>
|
||||
<if test="param.logId != null">
|
||||
AND a.log_id = #{param.logId}
|
||||
</if>
|
||||
<if test="param.logNo != null">
|
||||
AND a.log_no LIKE CONCAT('%', #{param.logNo}, '%')
|
||||
</if>
|
||||
<if test="param.money != null">
|
||||
AND a.money = #{param.money}
|
||||
</if>
|
||||
<if test="param.planId != null">
|
||||
AND a.plan_id = #{param.planId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.UserPlanLog">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.UserPlanLog">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 按OutTradeNo查询 -->
|
||||
<select id="getByOutTradeNo" resultType="com.gxwebsoft.love.entity.UserPlanLog">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 更新订单状态 -->
|
||||
<select id="updateByOutTradeNo" resultType="com.gxwebsoft.love.entity.UserPlanLog">
|
||||
UPDATE love_user_plan_log SET pay_status = #{param.payStatus},pay_time = #{param.payTime},pay_price = #{param.payPrice} WHERE log_no = #{param.logNo}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -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.gxwebsoft.love.mapper.UserPlanMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.role_name as roleName,c.name as gradeName
|
||||
FROM love_user_plan a
|
||||
LEFT JOIN sys_role b ON a.role_id = b.role_id
|
||||
LEFT JOIN shop_user_grade c ON a.grade_id = c.grade_id
|
||||
<where>
|
||||
<if test="param.planId != null">
|
||||
AND a.plan_id = #{param.planId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.subName != null">
|
||||
AND a.sub_name LIKE CONCAT('%', #{param.subName}, '%')
|
||||
</if>
|
||||
<if test="param.roleId != null">
|
||||
AND a.role_id = #{param.roleId}
|
||||
</if>
|
||||
<if test="param.gradeId != null">
|
||||
AND a.grade_id = #{param.gradeId}
|
||||
</if>
|
||||
<if test="param.icon != null">
|
||||
AND a.icon LIKE CONCAT('%', #{param.icon}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.UserPlan">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.UserPlan">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?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.gxwebsoft.love.mapper.UserPlanPriceMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.name as planName,b.type,b.grade_id
|
||||
FROM love_user_plan_price a
|
||||
LEFT JOIN love_user_plan b ON a.plan_id = b.plan_id
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.planId != null">
|
||||
AND a.plan_id = #{param.planId}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.price != null">
|
||||
AND a.price = #{param.price}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.UserPlanPrice">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.UserPlanPrice">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,190 @@
|
||||
<?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.gxwebsoft.love.mapper.UserProfileMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.nickname,b.age,b.city as userCity
|
||||
FROM love_user_profile a
|
||||
LEFT JOIN sys_user b ON a.user_id = b.user_id
|
||||
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.interest != null">
|
||||
AND a.interest LIKE CONCAT('%', #{param.interest}, '%')
|
||||
</if>
|
||||
<if test="param.height != null">
|
||||
AND a.height LIKE CONCAT('%', #{param.height}, '%')
|
||||
</if>
|
||||
<if test="param.monthlyPay != null">
|
||||
AND a.monthly_pay LIKE CONCAT('%', #{param.monthlyPay}, '%')
|
||||
</if>
|
||||
<if test="param.yearlyPay != null">
|
||||
AND a.yearly_pay LIKE CONCAT('%', #{param.yearlyPay}, '%')
|
||||
</if>
|
||||
<if test="param.education != null">
|
||||
AND a.education LIKE CONCAT('%', #{param.education}, '%')
|
||||
</if>
|
||||
<if test="param.vocation != null">
|
||||
AND a.vocation LIKE CONCAT('%', #{param.vocation}, '%')
|
||||
</if>
|
||||
<if test="param.maritalStatus != null">
|
||||
AND a.marital_status LIKE CONCAT('%', #{param.maritalStatus}, '%')
|
||||
</if>
|
||||
<if test="param.hasChildren != null">
|
||||
AND a.has_children LIKE CONCAT('%', #{param.hasChildren}, '%')
|
||||
</if>
|
||||
<if test="param.haveChild != null">
|
||||
AND a.have_child LIKE CONCAT('%', #{param.haveChild}, '%')
|
||||
</if>
|
||||
<if test="param.position != null">
|
||||
AND a.position LIKE CONCAT('%', #{param.position}, '%')
|
||||
</if>
|
||||
<if test="param.weight != null">
|
||||
AND a.weight LIKE CONCAT('%', #{param.weight}, '%')
|
||||
</if>
|
||||
<if test="param.hasCar != null">
|
||||
AND a.has_car LIKE CONCAT('%', #{param.hasCar}, '%')
|
||||
</if>
|
||||
<if test="param.whenMarried != null">
|
||||
AND a.when_married LIKE CONCAT('%', #{param.whenMarried}, '%')
|
||||
</if>
|
||||
<if test="param.ageMate != null">
|
||||
AND a.age_mate LIKE CONCAT('%', #{param.ageMate}, '%')
|
||||
</if>
|
||||
<if test="param.heightMate != null">
|
||||
AND a.height_mate LIKE CONCAT('%', #{param.heightMate}, '%')
|
||||
</if>
|
||||
<if test="param.monthlyPayMate != null">
|
||||
AND a.monthly_pay_mate LIKE CONCAT('%', #{param.monthlyPayMate}, '%')
|
||||
</if>
|
||||
<if test="param.yearlyPayMate != null">
|
||||
AND a.yearly_pay_mate LIKE CONCAT('%', #{param.yearlyPayMate}, '%')
|
||||
</if>
|
||||
<if test="param.regionMate != null">
|
||||
AND a.region_mate LIKE CONCAT('%', #{param.regionMate}, '%')
|
||||
</if>
|
||||
<if test="param.country != null">
|
||||
AND a.country LIKE CONCAT('%', #{param.country}, '%')
|
||||
</if>
|
||||
<if test="param.province != null">
|
||||
AND a.province LIKE CONCAT('%', #{param.province}, '%')
|
||||
</if>
|
||||
<if test="param.city != null">
|
||||
AND b.city LIKE CONCAT('%', #{param.city}, '%')
|
||||
</if>
|
||||
<if test="param.region != null">
|
||||
AND a.region LIKE CONCAT('%', #{param.region}, '%')
|
||||
</if>
|
||||
<if test="param.area != null">
|
||||
AND a.area LIKE CONCAT('%', #{param.area}, '%')
|
||||
</if>
|
||||
<if test="param.provinceMate != null">
|
||||
AND a.province_mate LIKE CONCAT('%', #{param.provinceMate}, '%')
|
||||
</if>
|
||||
<if test="param.cityMate != null">
|
||||
AND b.city LIKE CONCAT('%', #{param.cityMate}, '%')
|
||||
</if>
|
||||
<if test="param.regionMate != null">
|
||||
AND a.region_mate LIKE CONCAT('%', #{param.regionMate}, '%')
|
||||
</if>
|
||||
<if test="param.areaMate != null">
|
||||
AND a.area_mate LIKE CONCAT('%', #{param.areaMate}, '%')
|
||||
</if>
|
||||
<if test="param.educationMate != null">
|
||||
AND a.education_mate LIKE CONCAT('%', #{param.educationMate}, '%')
|
||||
</if>
|
||||
<if test="param.maritalStatusMate != null">
|
||||
AND a.marital_status_mate LIKE CONCAT('%', #{param.maritalStatusMate}, '%')
|
||||
</if>
|
||||
<if test="param.hasChildrenMate != null">
|
||||
AND a.has_children_mate LIKE CONCAT('%', #{param.hasChildrenMate}, '%')
|
||||
</if>
|
||||
<if test="param.haveChildMate != null">
|
||||
AND a.have_child_mate LIKE CONCAT('%', #{param.haveChildMate}, '%')
|
||||
</if>
|
||||
<if test="param.vocationMate != null">
|
||||
AND a.vocation_mate LIKE CONCAT('%', #{param.vocationMate}, '%')
|
||||
</if>
|
||||
<if test="param.weightMate != null">
|
||||
AND a.weight_mate LIKE CONCAT('%', #{param.weightMate}, '%')
|
||||
</if>
|
||||
<if test="param.shapeMate != null">
|
||||
AND a.shape_mate LIKE CONCAT('%', #{param.shapeMate}, '%')
|
||||
</if>
|
||||
<if test="param.isSmokingMate != null">
|
||||
AND a.is_smoking_mate LIKE CONCAT('%', #{param.isSmokingMate}, '%')
|
||||
</if>
|
||||
<if test="param.isDrinkMate != null">
|
||||
AND a.is_drink_mate LIKE CONCAT('%', #{param.isDrinkMate}, '%')
|
||||
</if>
|
||||
<if test="param.hasCarMate != null">
|
||||
AND a.has_car_mate LIKE CONCAT('%', #{param.hasCarMate}, '%')
|
||||
</if>
|
||||
<if test="param.hasHouseMate != null">
|
||||
AND a.has_house_mate LIKE CONCAT('%', #{param.hasHouseMate}, '%')
|
||||
</if>
|
||||
<if test="param.whenMarriedMate != null">
|
||||
AND a.when_married_mate LIKE CONCAT('%', #{param.whenMarriedMate}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND b.recommend = 1
|
||||
</if>
|
||||
<if test="param.userIds != null and param.userIds.size > 0 ">
|
||||
AND a.user_id IN
|
||||
<foreach collection="param.userIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.nUserIds != null and param.nUserIds.size > 0 ">
|
||||
AND a.user_id NOT IN
|
||||
<foreach collection="param.nUserIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.sex != null">
|
||||
AND b.sex = #{param.sex}
|
||||
</if>
|
||||
<if test="param.albums == true">
|
||||
AND a.images != '[]'
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (
|
||||
b.nickname LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.age_mate = #{param.keywords}
|
||||
OR a.user_id = #{param.keywords}
|
||||
OR b.phone = #{param.keywords}
|
||||
)
|
||||
</if>
|
||||
AND b.deleted = 0
|
||||
</where>
|
||||
<if test="param.random == true">
|
||||
ORDER BY rand()
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.love.entity.UserProfile">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.love.entity.UserProfile">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user