无关风月
2024-12-18 0e0995a1aa2bf36015c556509de79077f749a8a2
applet/src/main/resources/mapping/TOrderMapper.xml
@@ -37,11 +37,33 @@
        <result column="isAccounting" property="isAccounting" />
        <result column="accountingName" property="accountingName" />
        <result column="accountingTime" property="accountingTime" />
        <result column="brandId" property="brandId" />
        <result column="brandName" property="brandName" />
        <result column="seriesName" property="seriesName" />
        <result column="modelName" property="modelName" />
    </resultMap>
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, code, userId, optometryId, storeId, modelId, color, series, rLens, lLens, type, refractiveIndex, createTime, updateTime, createBy, updateBy, isDelete, sysId, couponId, itemsId, remark, isMail, mailName, mailPhone, mailAddress, orderMoney, couponMoney, payMoney, isMachining, machiningCode, isAccounting, accountingName, accountingTime
        id, code, userId, optometryId, storeId, modelId, color, series, rLens, lLens, `type`, refractiveIndex,
            createTime, updateTime, createBy, updateBy, isDelete, sysId, couponId, itemsId, remark, isMail, mailName,
            mailPhone, mailAddress, orderMoney, couponMoney, payMoney, isMachining, machiningCode, isAccounting, accountingName,
            accountingTime,brandId,brandName,seriesName,modelName
    </sql>
    <select id="pageList" resultType="com.jilongda.applet.vo.TOrderVO">
        select t.id, t.code, t.userId, t.optometryId, t.storeId, t.modelId, t.color, t.series, t.rLens, t.lLens, t.`type`, t.refractiveIndex,
        t.createTime, t.updateTime, t.createBy, t.updateBy, t.isDelete, t.sysId, t.couponId, t.itemsId, t.remark, t.isMail, t.mailName,
        t.mailPhone, t.mailAddress, t.orderMoney, t.couponMoney, t.payMoney, t.isMachining, t.machiningCode, t.isAccounting, t.accountingName,
        t.accountingTime,t.brandId,t.brandName,t.seriesName,t.modelName,ts.name as storeName
        from t_order t
        left join t_store ts on ts.id = t.storeId
        <where>
            <if test="query.userId != null">
                and t.userId = #{query.userId}
            </if>
            AND t.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY t.createTime DESC
    </select>
</mapper>