From cda9decfde8c6b518639c5da506aa293c07f88ff Mon Sep 17 00:00:00 2001 From: p-honggang.li <p-honggang.li@pcitc.com> Date: 星期一, 08 九月 2025 16:43:04 +0800 Subject: [PATCH] 修改附件上传用户id类型为string,及审核页面不显示带文件上传状态 --- src/main/resources/mapper/OrderInfoMapper.xml | 202 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 195 insertions(+), 7 deletions(-) diff --git a/src/main/resources/mapper/OrderInfoMapper.xml b/src/main/resources/mapper/OrderInfoMapper.xml index e1c3538..ed2ceb7 100644 --- a/src/main/resources/mapper/OrderInfoMapper.xml +++ b/src/main/resources/mapper/OrderInfoMapper.xml @@ -24,25 +24,26 @@ <result column="created_at" property="createdAt" jdbcType="TIMESTAMP"/> <result column="updated_at" property="updatedAt" jdbcType="TIMESTAMP"/> <result column="deleted" property="deleted" jdbcType="INTEGER"/> + <result column="is_evaluate" property="isEvaluate" jdbcType="VARCHAR"/> </resultMap> <!-- 鍩虹瀛楁鍒楄〃 --> <sql id="Base_Column_List"> order_id, product_id, user_id, unit_id, product_name, provider_name, provider_id, apply_time, order_status, total_amount, payment_type, payment_status, workflow_id, - current_step, approval_flow, buyer_remarks, seller_remarks, created_at, updated_at, deleted + current_step, approval_flow, buyer_remarks, seller_remarks, created_at, updated_at, deleted, is_evaluate </sql> <!-- 鍒嗛〉鏌ヨ涔板璁㈠崟鍒楄〃 --> <select id="selectBuyerOrderPage" resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List"/> - FROM order_info + FROM tb_order_info WHERE deleted = 0 <if test="userId != null"> AND user_id = #{userId} </if> - <if test="unitId != null"> + <if test="unitId != null and unitId != ''"> AND unit_id = #{unitId} </if> <if test="orderStatus != null and orderStatus != ''"> @@ -98,9 +99,9 @@ <select id="selectSellerOrderPage" resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List"/> - FROM order_info + FROM tb_order_info WHERE deleted = 0 - <if test="providerId != null"> + <if test="providerId != null and providerId != ''"> AND provider_id = #{providerId} </if> <if test="orderStatus != null and orderStatus != ''"> @@ -150,9 +151,9 @@ <select id="selectPendingApprovalOrderPage" resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List"/> - FROM order_info + FROM tb_order_info WHERE deleted = 0 - AND order_status IN ('寰呭鎵�', '寰呭鎵规巿鏉�', '寰呮巿鏉�') + AND order_status IN ('寰呭鎵规巿鏉�','寰呮巿鏉�', '寰呬氦鏄撶‘璁�', '宸插畬鎴�', '宸插彇娑�') <if test="orderStatus != null and orderStatus != ''"> AND order_status = #{orderStatus} </if> @@ -171,6 +172,193 @@ <if test="applyTimeEnd != null and applyTimeEnd != ''"> AND apply_time <= #{applyTimeEnd}::timestamp </if> + <if test="workFlowIds != null and workFlowIds.size() > 0"> + AND workflow_id IN + <foreach collection="workFlowIds" item="workFlowId" open="(" separator="," close=")"> + #{workFlowId} + </foreach> + </if> + ORDER BY + <choose> + <when test="orderBy != null and orderBy != ''"> + ${orderBy} + </when> + <otherwise> + created_at + </otherwise> + </choose> + <choose> + <when test="orderDirection != null and orderDirection == 'asc'"> + ASC + </when> + <otherwise> + DESC + </otherwise> + </choose> + </select> + + <!-- 鍒嗛〉鏌ヨ寰呭鎵硅鍗曞垪琛紙鏀寔浜у搧鏉′欢锛� --> + <select id="selectPendingApprovalOrderPageWithProductConditions" resultMap="BaseResultMap"> + SELECT + <include refid="Base_Column_List"/> + FROM tb_order_info + WHERE deleted = 0 + AND order_status IN ('寰呮巿鏉�', '寰呭鎵规巿鏉�', '寰呬氦鏄撶‘璁�', '宸插畬鎴�', '宸插彇娑�') + <if test="orderStatus != null and orderStatus != ''"> + AND order_status = #{orderStatus} + </if> + <if test="productName != null and productName != ''"> + AND product_name LIKE CONCAT('%', #{productName}, '%') + </if> + <if test="providerName != null and providerName != ''"> + AND provider_name LIKE CONCAT('%', #{providerName}, '%') + </if> + <if test="orderId != null and orderId != ''"> + AND order_id LIKE CONCAT('%', #{orderId}, '%') + </if> + <if test="applyTimeStart != null and applyTimeStart != ''"> + AND apply_time >= #{applyTimeStart}::timestamp + </if> + <if test="applyTimeEnd != null and applyTimeEnd != ''"> + AND apply_time <= #{applyTimeEnd}::timestamp + </if> + <if test="productIds != null and productIds.size() > 0"> + AND product_id IN + <foreach collection="productIds" item="productId" open="(" separator="," close=")"> + #{productId} + </foreach> + </if> + <if test="workFlowIds != null and workFlowIds.size() > 0"> + AND workflow_id IN + <foreach collection="workFlowIds" item="workFlowId" open="(" separator="," close=")"> + #{workFlowId} + </foreach> + </if> + ORDER BY + <choose> + <when test="orderBy != null and orderBy != ''"> + ${orderBy} + </when> + <otherwise> + created_at + </otherwise> + </choose> + <choose> + <when test="orderDirection != null and orderDirection == 'asc'"> + ASC + </when> + <otherwise> + DESC + </otherwise> + </choose> + </select> + + <!-- 鍒嗛〉鏌ヨ涔板璁㈠崟鍒楄〃锛堟敮鎸佷骇鍝佹潯浠讹級 --> + <select id="selectBuyerOrderPageWithProductConditions" resultMap="BaseResultMap"> + SELECT + <include refid="Base_Column_List"/> + FROM tb_order_info + WHERE deleted = 0 + <if test="userId != null"> + AND user_id = #{userId} + </if> + <if test="unitId != null and unitId != ''"> + AND unit_id = #{unitId} + </if> + <if test="orderStatus != null and orderStatus != ''"> + AND order_status = #{orderStatus} + </if> + <if test="paymentStatus != null and paymentStatus != ''"> + AND payment_status = #{paymentStatus} + </if> + <if test="paymentType != null and paymentType != ''"> + AND payment_type = #{paymentType} + </if> + <if test="productName != null and productName != ''"> + AND product_name LIKE CONCAT('%', #{productName}, '%') + </if> + <if test="providerName != null and providerName != ''"> + AND provider_name LIKE CONCAT('%', #{providerName}, '%') + </if> + <if test="orderId != null and orderId != ''"> + AND order_id LIKE CONCAT('%', #{orderId}, '%') + </if> + <if test="applyTimeStart != null and applyTimeStart != ''"> + AND apply_time >= #{applyTimeStart}::timestamp + </if> + <if test="applyTimeEnd != null and applyTimeEnd != ''"> + AND apply_time <= #{applyTimeEnd}::timestamp + </if> + <if test="createTimeStart != null and createTimeStart != ''"> + AND created_at >= #{createTimeStart}::timestamp + </if> + <if test="createTimeEnd != null and createTimeEnd != ''"> + AND created_at <= #{createTimeEnd}::timestamp + </if> + <if test="productIds != null and productIds.size() > 0"> + AND product_id IN + <foreach collection="productIds" item="productId" open="(" separator="," close=")"> + #{productId} + </foreach> + </if> + ORDER BY + <choose> + <when test="orderBy != null and orderBy != ''"> + ${orderBy} + </when> + <otherwise> + created_at + </otherwise> + </choose> + <choose> + <when test="orderDirection != null and orderDirection == 'asc'"> + ASC + </when> + <otherwise> + DESC + </otherwise> + </choose> + </select> + + <!-- 鍒嗛〉鏌ヨ鍗栧璁㈠崟鍒楄〃锛堟敮鎸佷骇鍝佹潯浠讹級 --> + <select id="selectSellerOrderPageWithProductConditions" resultMap="BaseResultMap"> + SELECT + <include refid="Base_Column_List"/> + FROM tb_order_info + WHERE deleted = 0 + <if test="providerId != null and providerId != ''"> + AND provider_id = #{providerId} + </if> + <if test="orderStatus != null and orderStatus != ''"> + AND order_status = #{orderStatus} + </if> + <if test="paymentStatus != null and paymentStatus != ''"> + AND payment_status = #{paymentStatus} + </if> + <if test="productName != null and productName != ''"> + AND product_name LIKE CONCAT('%', #{productName}, '%') + </if> + <if test="orderId != null and orderId != ''"> + AND order_id LIKE CONCAT('%', #{orderId}, '%') + </if> + <if test="applyTimeStart != null and applyTimeStart != ''"> + AND apply_time >= #{applyTimeStart}::timestamp + </if> + <if test="applyTimeEnd != null and applyTimeEnd != ''"> + AND apply_time <= #{applyTimeEnd}::timestamp + </if> + <if test="createTimeStart != null and createTimeStart != ''"> + AND created_at >= #{createTimeStart}::timestamp + </if> + <if test="createTimeEnd != null and createTimeEnd != ''"> + AND created_at <= #{createTimeEnd}::timestamp + </if> + <if test="productIds != null and productIds.size() > 0"> + AND product_id IN + <foreach collection="productIds" item="productId" open="(" separator="," close=")"> + #{productId} + </foreach> + </if> ORDER BY <choose> <when test="orderBy != null and orderBy != ''"> -- Gitblit v1.8.0