拆分think模块包

This commit is contained in:
2024-08-13 17:51:18 +08:00
parent 9dc17cd63e
commit 09a752e12a
1547 changed files with 88305 additions and 10329 deletions
+51
View File
@@ -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.shop.mapper.BrandMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_brand a
<where>
<if test="param.brandId != null">
AND a.brand_id = #{param.brandId}
</if>
<if test="param.brandName != null">
AND a.brand_name LIKE CONCAT('%', #{param.brandName}, '%')
</if>
<if test="param.image != null">
AND a.image LIKE CONCAT('%', #{param.image}, '%')
</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.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.Brand">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.Brand">
<include refid="selectSql"></include>
</select>
</mapper>
+75
View File
@@ -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.shop.mapper.CartMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*,b.goods_name,b.image,c.merchant_name,c.address
FROM shop_cart a
LEFT JOIN shop_goods b ON a.goods_id = b.goods_id
LEFT JOIN shop_merchant c ON a.merchant_id = c.merchant_id
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.goodsId != null">
AND a.goods_id LIKE CONCAT('%', #{param.goodsId}, '%')
</if>
<if test="param.code != null">
AND a.code LIKE CONCAT('%', #{param.code}, '%')
</if>
<if test="param.cartNum != null">
AND a.cart_num = #{param.cartNum}
</if>
<if test="param.isPay != null">
AND a.is_pay = #{param.isPay}
</if>
<if test="param.isNew != null">
AND a.is_new = #{param.isNew}
</if>
<if test="param.combinationId != null">
AND a.combination_id = #{param.combinationId}
</if>
<if test="param.seckillId != null">
AND a.seckill_id = #{param.seckillId}
</if>
<if test="param.bargainId != null">
AND a.bargain_id = #{param.bargainId}
</if>
<if test="param.userId != null">
AND a.user_id LIKE CONCAT('%', #{param.userId}, '%')
</if>
<if test="param.adminId != null">
AND a.admin_id LIKE CONCAT('%', #{param.adminId}, '%')
</if>
<if test="param.selected != null">
AND a.selected = #{param.selected}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (c.merchant_name LIKE CONCAT('%', #{param.keywords}, '%')
OR b.goods_name LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.Cart">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.Cart">
<include refid="selectSql"></include>
</select>
</mapper>
+81
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.gxwebsoft.shop.mapper.CashierMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*,b.goods_name,b.image,c.merchant_name,c.address
FROM shop_cashier a
LEFT JOIN shop_goods b ON a.goods_id = b.goods_id
LEFT JOIN shop_merchant c ON a.merchant_id = c.merchant_id
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.code != null">
AND a.code LIKE CONCAT('%', #{param.code}, '%')
</if>
<if test="param.goodsId != null">
AND a.goods_id LIKE CONCAT('%', #{param.goodsId}, '%')
</if>
<if test="param.spec != null">
AND a.spec LIKE CONCAT('%', #{param.spec}, '%')
</if>
<if test="param.price != null">
AND a.price = #{param.price}
</if>
<if test="param.cartNum != null">
AND a.cart_num = #{param.cartNum}
</if>
<if test="param.totalPrice != null">
AND a.total_price = #{param.totalPrice}
</if>
<if test="param.isPay != null">
AND a.is_pay = #{param.isPay}
</if>
<if test="param.isNew != null">
AND a.is_new = #{param.isNew}
</if>
<if test="param.selected != null">
AND a.selected = #{param.selected}
</if>
<if test="param.merchantId != null">
AND a.merchant_id LIKE CONCAT('%', #{param.merchantId}, '%')
</if>
<if test="param.userId != null">
AND a.user_id LIKE CONCAT('%', #{param.userId}, '%')
</if>
<if test="param.cashierId != null">
AND a.cashier_id LIKE CONCAT('%', #{param.cashierId}, '%')
</if>
<if test="param.groupId != null">
AND a.group_id = #{param.groupId}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (c.merchant_name LIKE CONCAT('%', #{param.keywords}, '%')
OR b.goods_name LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.Cashier">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.Cashier">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,60 @@
<?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.shop.mapper.ChatConversationMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_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.unRead != null">
AND a.un_read = #{param.unRead}
</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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.ChatConversation">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.ChatConversation">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,72 @@
<?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.shop.mapper.ChatMessageMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_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 LIKE CONCAT('%', #{param.type}, '%')
</if>
<if test="param.content != null">
AND a.content LIKE CONCAT('%', #{param.content}, '%')
</if>
<if test="param.sideTo != null">
AND a.side_to = #{param.sideTo}
</if>
<if test="param.sideFrom != null">
AND a.side_from = #{param.sideFrom}
</if>
<if test="param.withdraw != null">
AND a.withdraw = #{param.withdraw}
</if>
<if test="param.fileInfo != null">
AND a.file_info LIKE CONCAT('%', #{param.fileInfo}, '%')
</if>
<if test="param.hasContact != null">
AND a.has_contact = #{param.hasContact}
</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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.ChatMessage">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.ChatMessage">
<include refid="selectSql"></include>
</select>
</mapper>
+63
View File
@@ -0,0 +1,63 @@
<?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.shop.mapper.CountMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_count a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.dateTime != null">
AND a.date_time LIKE CONCAT('%', #{param.dateTime}, '%')
</if>
<if test="param.totalPrice != null">
AND a.total_price = #{param.totalPrice}
</if>
<if test="param.todayPrice != null">
AND a.today_price = #{param.todayPrice}
</if>
<if test="param.totalUsers != null">
AND a.total_users = #{param.totalUsers}
</if>
<if test="param.todayUsers != null">
AND a.today_users = #{param.todayUsers}
</if>
<if test="param.totalOrders != null">
AND a.total_orders = #{param.totalOrders}
</if>
<if test="param.todayOrders != null">
AND a.today_orders = #{param.todayOrders}
</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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.Count">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.Count">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,63 @@
<?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.shop.mapper.DealerApplyMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_dealer_apply a
<where>
<if test="param.applyId != null">
AND a.apply_id = #{param.applyId}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.realName != null">
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
</if>
<if test="param.mobile != null">
AND a.mobile LIKE CONCAT('%', #{param.mobile}, '%')
</if>
<if test="param.refereeId != null">
AND a.referee_id = #{param.refereeId}
</if>
<if test="param.applyType != null">
AND a.apply_type = #{param.applyType}
</if>
<if test="param.applyTime != null">
AND a.apply_time = #{param.applyTime}
</if>
<if test="param.applyStatus != null">
AND a.apply_status = #{param.applyStatus}
</if>
<if test="param.auditTime != null">
AND a.audit_time = #{param.auditTime}
</if>
<if test="param.rejectReason != null">
AND a.reject_reason LIKE CONCAT('%', #{param.rejectReason}, '%')
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.DealerApply">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.DealerApply">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,54 @@
<?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.shop.mapper.DealerCapitalMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_dealer_capital 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.orderId != null">
AND a.order_id = #{param.orderId}
</if>
<if test="param.flowType != null">
AND a.flow_type = #{param.flowType}
</if>
<if test="param.money != null">
AND a.money = #{param.money}
</if>
<if test="param.describe != null">
AND a.describe LIKE CONCAT('%', #{param.describe}, '%')
</if>
<if test="param.toUserId != null">
AND a.to_user_id = #{param.toUserId}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.DealerCapital">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.DealerCapital">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,72 @@
<?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.shop.mapper.DealerOrderMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_dealer_order 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.orderId != null">
AND a.order_id = #{param.orderId}
</if>
<if test="param.orderPrice != null">
AND a.order_price = #{param.orderPrice}
</if>
<if test="param.firstUserId != null">
AND a.first_user_id = #{param.firstUserId}
</if>
<if test="param.secondUserId != null">
AND a.second_user_id = #{param.secondUserId}
</if>
<if test="param.thirdUserId != null">
AND a.third_user_id = #{param.thirdUserId}
</if>
<if test="param.firstMoney != null">
AND a.first_money = #{param.firstMoney}
</if>
<if test="param.secondMoney != null">
AND a.second_money = #{param.secondMoney}
</if>
<if test="param.thirdMoney != null">
AND a.third_money = #{param.thirdMoney}
</if>
<if test="param.isInvalid != null">
AND a.is_invalid = #{param.isInvalid}
</if>
<if test="param.isSettled != null">
AND a.is_settled = #{param.isSettled}
</if>
<if test="param.settleTime != null">
AND a.settle_time = #{param.settleTime}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.DealerOrder">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.DealerOrder">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,45 @@
<?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.shop.mapper.DealerRefereeMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_dealer_referee a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.dealerId != null">
AND a.dealer_id = #{param.dealerId}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.level != null">
AND a.level = #{param.level}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.DealerReferee">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.DealerReferee">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,36 @@
<?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.shop.mapper.DealerSettingMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_dealer_setting a
<where>
<if test="param.key != null">
AND a.key = #{param.key}
</if>
<if test="param.describe != null">
AND a.describe LIKE CONCAT('%', #{param.describe}, '%')
</if>
<if test="param.values != null">
AND a.values LIKE CONCAT('%', #{param.values}, '%')
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.DealerSetting">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.DealerSetting">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,72 @@
<?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.shop.mapper.DealerUserMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_dealer_user 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.realName != null">
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
</if>
<if test="param.mobile != null">
AND a.mobile LIKE CONCAT('%', #{param.mobile}, '%')
</if>
<if test="param.payPassword != null">
AND a.pay_password LIKE CONCAT('%', #{param.payPassword}, '%')
</if>
<if test="param.money != null">
AND a.money = #{param.money}
</if>
<if test="param.freezeMoney != null">
AND a.freeze_money = #{param.freezeMoney}
</if>
<if test="param.totalMoney != null">
AND a.total_money = #{param.totalMoney}
</if>
<if test="param.refereeId != null">
AND a.referee_id = #{param.refereeId}
</if>
<if test="param.firstNum != null">
AND a.first_num = #{param.firstNum}
</if>
<if test="param.secondNum != null">
AND a.second_num = #{param.secondNum}
</if>
<if test="param.thirdNum != null">
AND a.third_num = #{param.thirdNum}
</if>
<if test="param.isDelete != null">
AND a.is_delete = #{param.isDelete}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.DealerUser">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.DealerUser">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,72 @@
<?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.shop.mapper.DealerWithdrawMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_dealer_withdraw 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.money != null">
AND a.money = #{param.money}
</if>
<if test="param.payType != null">
AND a.pay_type = #{param.payType}
</if>
<if test="param.alipayName != null">
AND a.alipay_name LIKE CONCAT('%', #{param.alipayName}, '%')
</if>
<if test="param.alipayAccount != null">
AND a.alipay_account LIKE CONCAT('%', #{param.alipayAccount}, '%')
</if>
<if test="param.bankName != null">
AND a.bank_name LIKE CONCAT('%', #{param.bankName}, '%')
</if>
<if test="param.bankAccount != null">
AND a.bank_account LIKE CONCAT('%', #{param.bankAccount}, '%')
</if>
<if test="param.bankCard != null">
AND a.bank_card LIKE CONCAT('%', #{param.bankCard}, '%')
</if>
<if test="param.applyStatus != null">
AND a.apply_status = #{param.applyStatus}
</if>
<if test="param.auditTime != null">
AND a.audit_time = #{param.auditTime}
</if>
<if test="param.rejectReason != null">
AND a.reject_reason LIKE CONCAT('%', #{param.rejectReason}, '%')
</if>
<if test="param.platform != null">
AND a.platform LIKE CONCAT('%', #{param.platform}, '%')
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.DealerWithdraw">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.DealerWithdraw">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,93 @@
<?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.shop.mapper.GoodsCategoryMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_goods_category a
<where>
<if test="param.categoryId != null">
AND a.category_id = #{param.categoryId}
</if>
<if test="param.categoryCode != null">
AND a.category_code LIKE CONCAT('%', #{param.categoryCode}, '%')
</if>
<if test="param.title != null">
AND a.title LIKE CONCAT('%', #{param.title}, '%')
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.image != null">
AND a.image LIKE CONCAT('%', #{param.image}, '%')
</if>
<if test="param.parentId != null">
AND a.parent_id = #{param.parentId}
</if>
<if test="param.path != null">
AND a.path LIKE CONCAT('%', #{param.path}, '%')
</if>
<if test="param.component != null">
AND a.component LIKE CONCAT('%', #{param.component}, '%')
</if>
<if test="param.pageId != null">
AND a.page_id = #{param.pageId}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.count != null">
AND a.count = #{param.count}
</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.hide != null">
AND a.hide = #{param.hide}
</if>
<if test="param.recommend != null">
AND a.recommend = #{param.recommend}
</if>
<if test="param.showIndex != null">
AND a.show_index = #{param.showIndex}
</if>
<if test="param.merchantId != null">
AND a.merchant_id = #{param.merchantId}
</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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsCategory">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsCategory">
<include refid="selectSql"></include>
</select>
</mapper>
+122
View File
@@ -0,0 +1,122 @@
<?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.shop.mapper.GoodsMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_goods a
<where>
<if test="param.goodsId != null">
AND a.goods_id = #{param.goodsId}
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.code != null">
AND a.code LIKE CONCAT('%', #{param.code}, '%')
</if>
<if test="param.goodsName != null">
AND a.goods_name LIKE CONCAT('%', #{param.goodsName}, '%')
</if>
<if test="param.image != null">
AND a.image LIKE CONCAT('%', #{param.image}, '%')
</if>
<if test="param.content != null">
AND a.content LIKE CONCAT('%', #{param.content}, '%')
</if>
<if test="param.categoryId != null">
AND a.category_id = #{param.categoryId}
</if>
<if test="param.categoryParent != null">
AND a.category_parent LIKE CONCAT('%', #{param.categoryParent}, '%')
</if>
<if test="param.categoryChildren != null">
AND a.category_children LIKE CONCAT('%', #{param.categoryChildren}, '%')
</if>
<if test="param.specs != null">
AND a.specs = #{param.specs}
</if>
<if test="param.position != null">
AND a.position LIKE CONCAT('%', #{param.position}, '%')
</if>
<if test="param.price != null">
AND a.price = #{param.price}
</if>
<if test="param.salePrice != null">
AND a.sale_price = #{param.salePrice}
</if>
<if test="param.deductStockType != null">
AND a.deduct_stock_type = #{param.deductStockType}
</if>
<if test="param.files != null">
AND a.files LIKE CONCAT('%', #{param.files}, '%')
</if>
<if test="param.sales != null">
AND a.sales = #{param.sales}
</if>
<if test="param.stock != null">
AND a.stock = #{param.stock}
</if>
<if test="param.goodsWeight != null">
AND a.goods_weight = #{param.goodsWeight}
</if>
<if test="param.recommend != null">
AND a.recommend = #{param.recommend}
</if>
<if test="param.merchantId != null">
AND a.merchant_id = #{param.merchantId}
</if>
<if test="param.parentId != null">
AND a.category_id IN (SELECT category_id FROM shop_goods_category WHERE parent_id=#{param.parentId})
</if>
<if test="param.merchantName != null">
AND a.merchant_name LIKE CONCAT('%', #{param.merchantName}, '%')
</if>
<if test="param.isShow != null">
AND a.is_show = #{param.isShow}
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<!-- <if test="param.keywords != null">-->
<!-- AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')-->
<!-- OR a.goods_name = #{param.keywords}-->
<!-- OR a.code = #{param.keywords}-->
<!-- )-->
<!-- </if>-->
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.Goods">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.Goods">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -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.gxwebsoft.shop.mapper.GoodsSkuMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_goods_sku a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.goodsId != null">
AND a.goods_id = #{param.goodsId}
</if>
<if test="param.sku != null">
AND a.sku LIKE CONCAT('%', #{param.sku}, '%')
</if>
<if test="param.image != null">
AND a.image LIKE CONCAT('%', #{param.image}, '%')
</if>
<if test="param.price != null">
AND a.price = #{param.price}
</if>
<if test="param.salePrice != null">
AND a.sale_price = #{param.salePrice}
</if>
<if test="param.cost != null">
AND a.cost = #{param.cost}
</if>
<if test="param.stock != null">
AND a.stock = #{param.stock}
</if>
<if test="param.skuNo != null">
AND a.sku_no LIKE CONCAT('%', #{param.skuNo}, '%')
</if>
<if test="param.uuid != null">
AND a.uuid LIKE CONCAT('%', #{param.uuid}, '%')
</if>
<if test="param.weight != null">
AND a.weight = #{param.weight}
</if>
<if test="param.volume != null">
AND a.volume = #{param.volume}
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
OR a.goods_id = #{param.keywords}
OR a.uuid = #{param.keywords}
OR a.sku_no = #{param.keywords}
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsSku">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsSku">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,45 @@
<?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.shop.mapper.GoodsSpecMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_goods_spec a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.goodsId != null">
AND a.goods_id = #{param.goodsId}
</if>
<if test="param.specId != null">
AND a.spec_id = #{param.specId}
</if>
<if test="param.specName != null">
AND a.spec_name LIKE CONCAT('%', #{param.specName}, '%')
</if>
<if test="param.specValue != null">
AND a.spec_value LIKE CONCAT('%', #{param.specValue}, '%')
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsSpec">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsSpec">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,63 @@
<?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.shop.mapper.MerchantAccountMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*,b.merchant_name,b.goods_review
FROM shop_merchant_account a
LEFT JOIN shop_merchant b ON a.merchant_id = b.merchant_id
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.phone != null">
AND a.phone = #{param.phone}
</if>
<if test="param.realName != null">
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
</if>
<if test="param.merchantId != null">
AND a.merchant_id = #{param.merchantId}
</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.status != null">
AND a.status = #{param.status}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
OR a.phone = #{param.keywords}
OR a.real_name = #{param.keywords}
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.MerchantAccount">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.MerchantAccount">
<include refid="selectSql"></include>
</select>
<select id="getMerchantAccountByPhone" resultType="com.gxwebsoft.shop.entity.MerchantAccount">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -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.gxwebsoft.shop.mapper.MerchantApplyMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_merchant_apply a
<where>
<if test="param.applyId != null">
AND a.apply_id = #{param.applyId}
</if>
<if test="param.merchantName != null">
AND a.merchant_name LIKE CONCAT('%', #{param.merchantName}, '%')
</if>
<if test="param.image != null">
AND a.image LIKE CONCAT('%', #{param.image}, '%')
</if>
<if test="param.phone != null">
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
</if>
<if test="param.realName != null">
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
</if>
<if test="param.shopType != null">
AND a.shop_type LIKE CONCAT('%', #{param.shopType}, '%')
</if>
<if test="param.category != null">
AND a.category LIKE CONCAT('%', #{param.category}, '%')
</if>
<if test="param.commission != null">
AND a.commission = #{param.commission}
</if>
<if test="param.keywords != null">
AND a.keywords LIKE CONCAT('%', #{param.keywords}, '%')
</if>
<if test="param.files != null">
AND a.files LIKE CONCAT('%', #{param.files}, '%')
</if>
<if test="param.ownStore != null">
AND a.own_store = #{param.ownStore}
</if>
<if test="param.recommend != null">
AND a.recommend = #{param.recommend}
</if>
<if test="param.goodsReview != null">
AND a.goods_review = #{param.goodsReview}
</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.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.MerchantApply">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.MerchantApply">
<include refid="selectSql"></include>
</select>
</mapper>
+111
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.gxwebsoft.shop.mapper.MerchantMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_merchant a
<where>
<if test="param.merchantId != null">
AND a.merchant_id = #{param.merchantId}
</if>
<if test="param.merchantName != null">
AND a.merchant_name LIKE CONCAT('%', #{param.merchantName}, '%')
</if>
<if test="param.merchantCode != null">
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.image != null">
AND a.image LIKE CONCAT('%', #{param.image}, '%')
</if>
<if test="param.phone != null">
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
</if>
<if test="param.realName != null">
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
</if>
<if test="param.shopType != null">
AND a.shop_type LIKE CONCAT('%', #{param.shopType}, '%')
</if>
<if test="param.itemType != null">
AND a.item_type LIKE CONCAT('%', #{param.itemType}, '%')
</if>
<if test="param.category != null">
AND a.category LIKE CONCAT('%', #{param.category}, '%')
</if>
<if test="param.commission != null">
AND a.commission = #{param.commission}
</if>
<if test="param.keywords != null">
AND a.keywords LIKE CONCAT('%', #{param.keywords}, '%')
</if>
<if test="param.files != null">
AND a.files LIKE CONCAT('%', #{param.files}, '%')
</if>
<if test="param.ownStore != null">
AND a.own_store = #{param.ownStore}
</if>
<if test="param.recommend != null">
AND a.recommend = #{param.recommend}
</if>
<if test="param.goodsReview != null">
AND a.goods_review = #{param.goodsReview}
</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.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.merchantIds != null">
AND a.merchant_id IN
<foreach collection="param.merchantIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="param.merchantCodes != null">
AND a.merchant_code IN
<foreach collection="param.merchantCodes" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="param.keywords != null">
AND (
a.merchant_name LIKE CONCAT('%', #{param.keywords}, '%')
OR a.phone LIKE CONCAT('%', #{param.keywords}, '%')
OR a.real_name LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.Merchant">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.Merchant">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,48 @@
<?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.shop.mapper.MerchantTypeMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_merchant_type a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</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.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.MerchantType">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.MerchantType">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,96 @@
<?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.shop.mapper.OrderGoodsMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_order_goods a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.orderId != null">
AND a.order_id = #{param.orderId}
</if>
<if test="param.orderCode != null">
AND a.order_code LIKE CONCAT('%', #{param.orderCode}, '%')
</if>
<if test="param.merchantId != null">
AND a.merchant_id = #{param.merchantId}
</if>
<if test="param.merchantName != null">
AND a.merchant_name LIKE CONCAT('%', #{param.merchantName}, '%')
</if>
<if test="param.image != null">
AND a.image LIKE CONCAT('%', #{param.image}, '%')
</if>
<if test="param.goodsId != null">
AND a.goods_id = #{param.goodsId}
</if>
<if test="param.goodsName != null">
AND a.goods_name LIKE CONCAT('%', #{param.goodsName}, '%')
</if>
<if test="param.price != null">
AND a.price = #{param.price}
</if>
<if test="param.payStatus != null">
AND a.pay_status = #{param.payStatus}
</if>
<if test="param.orderStatus != null">
AND a.order_status = #{param.orderStatus}
</if>
<if test="param.isFree != null">
AND a.is_free = #{param.isFree}
</if>
<if test="param.version != null">
AND a.version = #{param.version}
</if>
<if test="param.timePeriod != null">
AND a.time_period LIKE CONCAT('%', #{param.timePeriod}, '%')
</if>
<if test="param.dateTime != null">
AND a.date_time LIKE CONCAT('%', #{param.dateTime}, '%')
</if>
<if test="param.startTime != null">
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
</if>
<if test="param.endTime != null">
AND a.end_time LIKE CONCAT('%', #{param.endTime}, '%')
</if>
<if test="param.timeFlag != null">
AND a.time_flag LIKE CONCAT('%', #{param.timeFlag}, '%')
</if>
<if test="param.expirationTime != null">
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.OrderGoods">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.OrderGoods">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,48 @@
<?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.shop.mapper.OrderInfoLogMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_order_info_log a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.orderId != null">
AND a.order_id = #{param.orderId}
</if>
<if test="param.merchantId != null">
AND a.merchant_id = #{param.merchantId}
</if>
<if test="param.fieldId != null">
AND a.field_id = #{param.fieldId}
</if>
<if test="param.useNum != null">
AND a.use_num = #{param.useNum}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.OrderInfoLog">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.OrderInfoLog">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,90 @@
<?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.shop.mapper.OrderInfoMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_order_info a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.oid != null">
AND a.oid = #{param.oid}
</if>
<if test="param.sid != null">
AND a.sid = #{param.sid}
</if>
<if test="param.fid != null">
AND a.fid = #{param.fid}
</if>
<if test="param.siteName != null">
AND a.site_name LIKE CONCAT('%', #{param.siteName}, '%')
</if>
<if test="param.fieldName != null">
AND a.field_name LIKE CONCAT('%', #{param.fieldName}, '%')
</if>
<if test="param.dateTime != null">
AND a.date_time LIKE CONCAT('%', #{param.dateTime}, '%')
</if>
<if test="param.price != null">
AND a.price = #{param.price}
</if>
<if test="param.childrenPrice != null">
AND a.children_price = #{param.childrenPrice}
</if>
<if test="param.adultNum != null">
AND a.adult_num = #{param.adultNum}
</if>
<if test="param.childrenNum != null">
AND a.children_num = #{param.childrenNum}
</if>
<if test="param.payStatus != null">
AND a.pay_status = #{param.payStatus}
</if>
<if test="param.isFree != null">
AND a.is_free = #{param.isFree}
</if>
<if test="param.isChildren != null">
AND a.is_children = #{param.isChildren}
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.mergeData != null">
AND a.merge_data LIKE CONCAT('%', #{param.mergeData}, '%')
</if>
<if test="param.startTime != null">
AND a.start_time = #{param.startTime}
</if>
<if test="param.orderTime != null">
AND a.order_time = #{param.orderTime}
</if>
<if test="param.timeFlag != null">
AND a.time_flag LIKE CONCAT('%', #{param.timeFlag}, '%')
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.OrderInfo">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.OrderInfo">
<include refid="selectSql"></include>
</select>
</mapper>
+169
View File
@@ -0,0 +1,169 @@
<?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.shop.mapper.OrderMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*, b.username as nickname, b.truename as realName
FROM shop_order a
LEFT JOIN shop_users b ON a.uid = b.id
<where>
<if test="param.orderId != null">
AND a.order_id = #{param.orderId}
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.orderNo != null">
AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%')
</if>
<if test="param.channel != null">
AND a.channel = #{param.channel}
</if>
<if test="param.transactionId != null">
AND a.transaction_id LIKE CONCAT('%', #{param.transactionId}, '%')
</if>
<if test="param.refundOrder != null">
AND a.refund_order LIKE CONCAT('%', #{param.refundOrder}, '%')
</if>
<if test="param.merchantId != null">
AND a.merchant_id = #{param.merchantId}
</if>
<if test="param.merchantName != null">
AND a.merchant_name LIKE CONCAT('%', #{param.merchantName}, '%')
</if>
<if test="param.merchantCode != null">
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
</if>
<if test="param.uid != null">
AND a.uid = #{param.uid}
</if>
<if test="param.cid != null">
AND a.cid = #{param.cid}
</if>
<if test="param.vid != null">
AND a.vid = #{param.vid}
</if>
<if test="param.aid != null">
AND a.aid = #{param.aid}
</if>
<if test="param.adminId != null">
AND a.admin_id = #{param.adminId}
</if>
<if test="param.code != null">
AND a.code LIKE CONCAT('%', #{param.code}, '%')
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.phone != null">
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
</if>
<if test="param.totalPrice != null">
AND a.total_price = #{param.totalPrice}
</if>
<if test="param.reducePrice != null">
AND a.reduce_price = #{param.reducePrice}
</if>
<if test="param.payPrice != null">
AND a.pay_price = #{param.payPrice}
</if>
<if test="param.price != null">
AND a.price = #{param.price}
</if>
<if test="param.money != null">
AND a.money = #{param.money}
</if>
<if test="param.refundMoney != null">
AND a.refund_money = #{param.refundMoney}
</if>
<if test="param.coachPrice != null">
AND a.coach_price = #{param.coachPrice}
</if>
<if test="param.coachId != null">
AND a.coach_id = #{param.coachId}
</if>
<if test="param.payType != null">
AND a.pay_type = #{param.payType}
</if>
<if test="param.payStatus != null">
AND a.pay_status = #{param.payStatus}
</if>
<if test="param.orderStatus != null">
AND a.order_status = #{param.orderStatus}
</if>
<if test="param.couponType != null">
AND a.coupon_type = #{param.couponType}
</if>
<if test="param.qrcode != null">
AND a.qrcode LIKE CONCAT('%', #{param.qrcode}, '%')
</if>
<if test="param.couponDesc != null">
AND a.coupon_desc LIKE CONCAT('%', #{param.couponDesc}, '%')
</if>
<if test="param.returnNum != null">
AND a.return_num = #{param.returnNum}
</if>
<if test="param.returnMoney != null">
AND a.return_money = #{param.returnMoney}
</if>
<if test="param.startTime != null">
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
</if>
<if test="param.isInvoice != null">
AND a.is_invoice = #{param.isInvoice}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.payTime != null">
AND a.pay_time = #{param.payTime}
</if>
<if test="param.refundTime != null">
AND a.refund_time = #{param.refundTime}
</if>
<if test="param.refundApplyTime != null">
AND a.refund_apply_time = #{param.refundApplyTime}
</if>
<if test="param.expirationTime != null">
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
</if>
<if test="param.checkBill != null">
AND a.check_bill = #{param.checkBill}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</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.keywords != null">
AND (a.order_no = #{param.keywords}
OR a.order_id = #{param.keywords}
OR a.phone = #{param.keywords}
OR a.user_id = #{param.keywords}
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.Order">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.Order">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -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.gxwebsoft.shop.mapper.RechargeOrderMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_recharge_order a
<where>
<if test="param.orderId != null">
AND a.order_id = #{param.orderId}
</if>
<if test="param.orderNo != null">
AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%')
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.rechargeType != null">
AND a.recharge_type = #{param.rechargeType}
</if>
<if test="param.organizationId != null">
AND a.organization_id = #{param.organizationId}
</if>
<if test="param.planId != null">
AND a.plan_id = #{param.planId}
</if>
<if test="param.payPrice != null">
AND a.pay_price = #{param.payPrice}
</if>
<if test="param.giftMoney != null">
AND a.gift_money = #{param.giftMoney}
</if>
<if test="param.actualMoney != null">
AND a.actual_money = #{param.actualMoney}
</if>
<if test="param.balance != null">
AND a.balance = #{param.balance}
</if>
<if test="param.payMethod != null">
AND a.pay_method LIKE CONCAT('%', #{param.payMethod}, '%')
</if>
<if test="param.payStatus != null">
AND a.pay_status = #{param.payStatus}
</if>
<if test="param.payTime != null">
AND a.pay_time = #{param.payTime}
</if>
<if test="param.tradeId != null">
AND a.trade_id = #{param.tradeId}
</if>
<if test="param.platform != null">
AND a.platform LIKE CONCAT('%', #{param.platform}, '%')
</if>
<if test="param.shopId != null">
AND a.shop_id = #{param.shopId}
</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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.RechargeOrder">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.RechargeOrder">
<include refid="selectSql"></include>
</select>
</mapper>
+57
View File
@@ -0,0 +1,57 @@
<?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.shop.mapper.SpecMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_spec a
<where>
<if test="param.specId != null">
AND a.spec_id = #{param.specId}
</if>
<if test="param.specName != null">
AND a.spec_name LIKE CONCAT('%', #{param.specName}, '%')
</if>
<if test="param.specValue != null">
AND a.spec_value LIKE CONCAT('%', #{param.specValue}, '%')
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.updater != null">
AND a.updater = #{param.updater}
</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.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.Spec">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.Spec">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,42 @@
<?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.shop.mapper.SpecValueMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_spec_value a
<where>
<if test="param.specValueId != null">
AND a.spec_value_id = #{param.specValueId}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.specId != null">
AND a.spec_id = #{param.specId}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.SpecValue">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.SpecValue">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,69 @@
<?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.shop.mapper.UserAddressMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_user_address a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.phone != null">
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
</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 a.city LIKE CONCAT('%', #{param.city}, '%')
</if>
<if test="param.region != null">
AND a.region LIKE CONCAT('%', #{param.region}, '%')
</if>
<if test="param.address != null">
AND a.address LIKE CONCAT('%', #{param.address}, '%')
</if>
<if test="param.gender != null">
AND a.gender = #{param.gender}
</if>
<if test="param.type != null">
AND a.type LIKE CONCAT('%', #{param.type}, '%')
</if>
<if test="param.isDefault != null">
AND a.is_default = #{param.isDefault}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.UserAddress">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.UserAddress">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,69 @@
<?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.shop.mapper.UserBalanceLogMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_user_balance_log a
<where>
<if test="param.logId != null">
AND a.log_id = #{param.logId}
</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.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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.UserBalanceLog">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.UserBalanceLog">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,42 @@
<?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.shop.mapper.UserCollectionMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_user_collection a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.tid != null">
AND a.tid = #{param.tid}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.UserCollection">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.UserCollection">
<include refid="selectSql"></include>
</select>
</mapper>
+83
View 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.shop.mapper.UsersMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_users a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.openId != null">
AND a.open_id LIKE CONCAT('%', #{param.openId}, '%')
</if>
<if test="param.sessionKey != null">
AND a.session_key LIKE CONCAT('%', #{param.sessionKey}, '%')
</if>
<if test="param.username != null">
AND a.username LIKE CONCAT('%', #{param.username}, '%')
</if>
<if test="param.avatarUrl != null">
AND a.avatar_url LIKE CONCAT('%', #{param.avatarUrl}, '%')
</if>
<if test="param.gender != null">
AND a.gender = #{param.gender}
</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 a.city LIKE CONCAT('%', #{param.city}, '%')
</if>
<if test="param.phone != null">
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
</if>
<if test="param.integral != null">
AND a.integral = #{param.integral}
</if>
<if test="param.money != null">
AND a.money = #{param.money}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.idcard != null">
AND a.idcard LIKE CONCAT('%', #{param.idcard}, '%')
</if>
<if test="param.truename != null">
AND a.truename LIKE CONCAT('%', #{param.truename}, '%')
</if>
<if test="param.isAdmin != null">
AND a.is_admin = #{param.isAdmin}
</if>
<if test="param.keywords != null">
AND (a.id = #{param.keywords}
OR a.open_id = #{param.keywords}
OR a.phone = #{param.keywords}
OR a.username LIKE CONCAT('%', #{param.keywords}, '%')
OR a.truename LIKE CONCAT('%', #{param.keywords}, '%')
OR a.idcard = #{param.keywords}
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.Users">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.Users">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -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.gxwebsoft.shop.mapper.WechatDepositMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_wechat_deposit a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.oid != null">
AND a.oid = #{param.oid}
</if>
<if test="param.uid != null">
AND a.uid = #{param.uid}
</if>
<if test="param.orderNum != null">
AND a.order_num LIKE CONCAT('%', #{param.orderNum}, '%')
</if>
<if test="param.wechatOrder != null">
AND a.wechat_order LIKE CONCAT('%', #{param.wechatOrder}, '%')
</if>
<if test="param.wechatReturn != null">
AND a.wechat_return LIKE CONCAT('%', #{param.wechatReturn}, '%')
</if>
<if test="param.siteName != null">
AND a.site_name LIKE CONCAT('%', #{param.siteName}, '%')
</if>
<if test="param.username != null">
AND a.username LIKE CONCAT('%', #{param.username}, '%')
</if>
<if test="param.phone != null">
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
</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.status != null">
AND a.status = #{param.status}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.oid = #{param.keywords}
OR a.order_num = #{param.keywords}
OR a.phone = #{param.keywords}
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.WechatDeposit">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.WechatDeposit">
<include refid="selectSql"></include>
</select>
</mapper>