feat: 3d模型

This commit is contained in:
2025-12-09 17:13:20 +08:00
parent 5f603bc69d
commit 358639a8ac
492 changed files with 74670 additions and 190 deletions
@@ -37,5 +37,16 @@
</where>
ORDER BY id DESC
</select>
<!-- 根据素材ID列表查询 -->
<select id="findByIds" resultType="com.central.order.model.TourismFile">
SELECT * FROM tourisms_files
WHERE id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
AND (is_del = 0 OR is_del IS NULL)
ORDER BY id DESC
</select>
</mapper>
@@ -0,0 +1,112 @@
<?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.central.order.mapper.guide.GuideCommissionMapper">
<resultMap id="BaseResultMap" type="com.central.order.model.guide.GuideCommission">
<id column="id" property="id"/>
<result column="commission_no" property="commissionNo"/>
<result column="guide_id" property="guideId"/>
<result column="order_no" property="orderNo"/>
<result column="order_amount" property="orderAmount"/>
<result column="commission_rate" property="commissionRate"/>
<result column="commission_amount" property="commissionAmount"/>
<result column="status" property="status"/>
<result column="settle_time" property="settleTime"/>
<result column="remark" property="remark"/>
<result column="tenant_id" property="tenantId"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="guide_name" property="guideName"/>
<result column="guide_no" property="guideNo"/>
</resultMap>
<select id="selectByOrderNo" resultMap="BaseResultMap">
SELECT gc.*, t.tourism_name as guide_name, gp.guide_no
FROM guide_commissions gc
LEFT JOIN tourisms t ON gc.guide_id = t.id
LEFT JOIN guide_profiles gp ON gc.guide_id = gp.tourism_id
WHERE gc.order_no = #{orderNo}
</select>
<select id="selectByCommissionNo" resultMap="BaseResultMap">
SELECT gc.*, t.tourism_name as guide_name, gp.guide_no
FROM guide_commissions gc
LEFT JOIN tourisms t ON gc.guide_id = t.id
LEFT JOIN guide_profiles gp ON gc.guide_id = gp.tourism_id
WHERE gc.commission_no = #{commissionNo}
</select>
<select id="findList" resultMap="BaseResultMap">
SELECT gc.*, t.tourism_name as guide_name, gp.guide_no
FROM guide_commissions gc
LEFT JOIN tourisms t ON gc.guide_id = t.id
LEFT JOIN guide_profiles gp ON gc.guide_id = gp.tourism_id
<where>
<if test="p.tenantIds != null and p.tenantIds.size > 0">
AND gc.tenant_id IN
<foreach collection="p.tenantIds" item="tid" open="(" separator="," close=")">
#{tid}
</foreach>
</if>
<if test="(p.tenantIds == null or p.tenantIds.size == 0) and p.tenantId != null and p.tenantId != ''">
AND gc.tenant_id = #{p.tenantId}
</if>
<if test="p.guideId != null">
AND gc.guide_id = #{p.guideId}
</if>
<if test="p.status != null">
AND gc.status = #{p.status}
</if>
<if test="p.orderNo != null and p.orderNo != ''">
AND gc.order_no = #{p.orderNo}
</if>
<if test="p.commissionNo != null and p.commissionNo != ''">
AND gc.commission_no = #{p.commissionNo}
</if>
<if test="p.startTime != null">
AND gc.create_time >= #{p.startTime}
</if>
<if test="p.endTime != null">
AND gc.create_time &lt;= #{p.endTime}
</if>
</where>
ORDER BY gc.id DESC
</select>
<select id="selectPendingSettleList" resultMap="BaseResultMap">
SELECT gc.*, t.tourism_name as guide_name, gp.guide_no
FROM guide_commissions gc
LEFT JOIN tourisms t ON gc.guide_id = t.id
LEFT JOIN guide_profiles gp ON gc.guide_id = gp.tourism_id
WHERE gc.status = 0
AND gc.create_time &lt;= #{beforeTime}
ORDER BY gc.create_time ASC
<if test="limit != null and limit > 0">
LIMIT #{limit}
</if>
</select>
<select id="sumTodayCommission" resultType="java.lang.Long">
SELECT IFNULL(SUM(commission_amount), 0)
FROM guide_commissions
WHERE guide_id = #{guideId}
AND DATE(create_time) = CURDATE()
</select>
<select id="sumMonthCommission" resultType="java.lang.Long">
SELECT IFNULL(SUM(commission_amount), 0)
FROM guide_commissions
WHERE guide_id = #{guideId}
AND YEAR(create_time) = YEAR(CURDATE())
AND MONTH(create_time) = MONTH(CURDATE())
</select>
<select id="countPendingSettle" resultType="java.lang.Integer">
SELECT COUNT(*)
FROM guide_commissions
WHERE guide_id = #{guideId}
AND status = 0
</select>
</mapper>
@@ -0,0 +1,120 @@
<?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.central.order.mapper.guide.GuideProfileMapper">
<resultMap id="BaseResultMap" type="com.central.order.model.guide.GuideProfile">
<id column="id" property="id"/>
<result column="tourism_id" property="tourismId"/>
<result column="user_id" property="userId"/>
<result column="guide_no" property="guideNo"/>
<result column="id_card" property="idCard"/>
<result column="openid" property="openid"/>
<result column="bank_account" property="bankAccount"/>
<result column="bank_name" property="bankName"/>
<result column="status" property="status"/>
<result column="audit_remark" property="auditRemark"/>
<result column="commission_rate" property="commissionRate"/>
<result column="total_commission" property="totalCommission"/>
<result column="available_commission" property="availableCommission"/>
<result column="frozen_commission" property="frozenCommission"/>
<result column="withdrawn_commission" property="withdrawnCommission"/>
<result column="tenant_id" property="tenantId"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="guide_name" property="guideName"/>
<result column="guide_phone" property="guidePhone"/>
</resultMap>
<select id="selectByTourismId" resultMap="BaseResultMap">
SELECT gp.*, t.tourism_name as guide_name, t.tourism_phone as guide_phone
FROM guide_profiles gp
LEFT JOIN tourisms t ON gp.tourism_id = t.id
WHERE gp.tourism_id = #{tourismId}
</select>
<select id="selectByUserId" resultMap="BaseResultMap">
SELECT gp.*, t.tourism_name as guide_name, t.tourism_phone as guide_phone
FROM guide_profiles gp
LEFT JOIN tourisms t ON gp.tourism_id = t.id
WHERE gp.user_id = #{userId}
</select>
<select id="selectByGuideNo" resultMap="BaseResultMap">
SELECT gp.*, t.tourism_name as guide_name, t.tourism_phone as guide_phone
FROM guide_profiles gp
LEFT JOIN tourisms t ON gp.tourism_id = t.id
WHERE gp.guide_no = #{guideNo}
</select>
<select id="findList" resultMap="BaseResultMap">
SELECT gp.*, t.tourism_name as guide_name, t.tourism_phone as guide_phone
FROM guide_profiles gp
LEFT JOIN tourisms t ON gp.tourism_id = t.id
WHERE t.tourism_type = 2
<if test="p.tenantIds != null and p.tenantIds.size > 0">
AND gp.tenant_id IN
<foreach collection="p.tenantIds" item="tid" open="(" separator="," close=")">
#{tid}
</foreach>
</if>
<if test="(p.tenantIds == null or p.tenantIds.size == 0) and p.tenantId != null and p.tenantId != ''">
AND gp.tenant_id = #{p.tenantId}
</if>
<if test="p.guideName != null and p.guideName != ''">
AND t.tourism_name LIKE CONCAT('%', #{p.guideName}, '%')
</if>
<if test="p.guideNo != null and p.guideNo != ''">
AND gp.guide_no = #{p.guideNo}
</if>
<if test="p.status != null">
AND gp.status = #{p.status}
</if>
<if test="p.phone != null and p.phone != ''">
AND t.tourism_phone = #{p.phone}
</if>
ORDER BY gp.id DESC
</select>
<update id="addTotalCommission">
UPDATE guide_profiles
SET total_commission = total_commission + #{amount},
update_time = NOW()
WHERE id = #{id}
</update>
<update id="addAvailableCommission">
UPDATE guide_profiles
SET available_commission = available_commission + #{amount},
update_time = NOW()
WHERE id = #{id}
</update>
<update id="freezeCommission">
UPDATE guide_profiles
SET available_commission = available_commission - #{amount},
frozen_commission = frozen_commission + #{amount},
update_time = NOW()
WHERE id = #{id}
AND available_commission >= #{amount}
</update>
<update id="unfreezeCommission">
UPDATE guide_profiles
SET available_commission = available_commission + #{amount},
frozen_commission = frozen_commission - #{amount},
update_time = NOW()
WHERE id = #{id}
AND frozen_commission >= #{amount}
</update>
<update id="completeWithdrawal">
UPDATE guide_profiles
SET frozen_commission = frozen_commission - #{amount},
withdrawn_commission = withdrawn_commission + #{amount},
update_time = NOW()
WHERE id = #{id}
AND frozen_commission >= #{amount}
</update>
</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.central.order.mapper.guide.GuideWithdrawalMapper">
<resultMap id="BaseResultMap" type="com.central.order.model.guide.GuideWithdrawal">
<id column="id" property="id"/>
<result column="withdraw_no" property="withdrawNo"/>
<result column="guide_id" property="guideId"/>
<result column="amount" property="amount"/>
<result column="actual_amount" property="actualAmount"/>
<result column="fee" property="fee"/>
<result column="withdraw_type" property="withdrawType"/>
<result column="account_info" property="accountInfo"/>
<result column="status" property="status"/>
<result column="apply_time" property="applyTime"/>
<result column="audit_user_id" property="auditUserId"/>
<result column="audit_time" property="auditTime"/>
<result column="audit_remark" property="auditRemark"/>
<result column="transfer_time" property="transferTime"/>
<result column="transfer_no" property="transferNo"/>
<result column="fail_reason" property="failReason"/>
<result column="tenant_id" property="tenantId"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="guide_name" property="guideName"/>
<result column="guide_no" property="guideNo"/>
<result column="guide_phone" property="guidePhone"/>
</resultMap>
<select id="selectByWithdrawNo" resultMap="BaseResultMap">
SELECT gw.*, t.tourism_name as guide_name, t.tourism_phone as guide_phone, gp.guide_no
FROM guide_withdrawals gw
LEFT JOIN tourisms t ON gw.guide_id = t.id
LEFT JOIN guide_profiles gp ON gw.guide_id = gp.tourism_id
WHERE gw.withdraw_no = #{withdrawNo}
</select>
<select id="findList" resultMap="BaseResultMap">
SELECT gw.*, t.tourism_name as guide_name, t.tourism_phone as guide_phone, gp.guide_no
FROM guide_withdrawals gw
LEFT JOIN tourisms t ON gw.guide_id = t.id
LEFT JOIN guide_profiles gp ON gw.guide_id = gp.tourism_id
<where>
<if test="p.tenantIds != null and p.tenantIds.size > 0">
AND gw.tenant_id IN
<foreach collection="p.tenantIds" item="tid" open="(" separator="," close=")">
#{tid}
</foreach>
</if>
<if test="(p.tenantIds == null or p.tenantIds.size == 0) and p.tenantId != null and p.tenantId != ''">
AND gw.tenant_id = #{p.tenantId}
</if>
<if test="p.guideId != null">
AND gw.guide_id = #{p.guideId}
</if>
<if test="p.status != null">
AND gw.status = #{p.status}
</if>
<if test="p.withdrawNo != null and p.withdrawNo != ''">
AND gw.withdraw_no = #{p.withdrawNo}
</if>
<if test="p.startTime != null">
AND gw.apply_time >= #{p.startTime}
</if>
<if test="p.endTime != null">
AND gw.apply_time &lt;= #{p.endTime}
</if>
</where>
ORDER BY gw.id DESC
</select>
<select id="selectApprovedList" resultMap="BaseResultMap">
SELECT gw.*, t.tourism_name as guide_name, t.tourism_phone as guide_phone, gp.guide_no
FROM guide_withdrawals gw
LEFT JOIN tourisms t ON gw.guide_id = t.id
LEFT JOIN guide_profiles gp ON gw.guide_id = gp.tourism_id
WHERE gw.status = 1
ORDER BY gw.audit_time ASC
<if test="limit != null and limit > 0">
LIMIT #{limit}
</if>
</select>
<select id="countTodayWithdrawal" resultType="java.lang.Integer">
SELECT COUNT(*)
FROM guide_withdrawals
WHERE guide_id = #{guideId}
AND DATE(apply_time) = CURDATE()
AND status NOT IN (2, 5)
</select>
</mapper>