| | |
| | | <result column="userId" property="userId" /> |
| | | <result column="optometryId" property="optometryId" /> |
| | | <result column="storeId" property="storeId" /> |
| | | <result column="modelId" property="modelId" /> |
| | | <result column="color" property="color" /> |
| | | <result column="series" property="series" /> |
| | | <result column="rLens" property="rLens" /> |
| | |
| | | <result column="realName" property="realName" /> |
| | | <result column="age" property="age" /> |
| | | <result column="gender" property="gender" /> |
| | | <result column="payTypeName" property="payTypeName" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, code, userId, optometryId, storeId, modelId, color, series, rLens, lLens, type, refractiveIndex, createTime, updateTime, createBy, |
| | | id, code, userId, optometryId, storeId, 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,phone, realName, age, gender |
| | | isMachining, machiningCode, isAccounting, accountingName, accountingTime,phone, realName, age, gender,payTypeName |
| | | </sql> |
| | | |
| | | <select id="getOrderDetailById" resultType="com.jilongda.manage.vo.TOrderVO"> |
| | | select o.id, o.code, o.userId, o.optometryId, o.storeId, o.color, o.series, o.rLens, o.lLens, o.`type`, o.refractiveIndex, o.createTime, o.updateTime, o.createBy, |
| | | o.updateBy, o.isDelete, o.sysId, o.couponId, o.itemsId, o.remark, o.isMail, o.mailName, o.mailPhone, o.mailAddress, o.orderMoney, o.couponMoney, o.payMoney, |
| | | o.isMachining, o.machiningCode, o.isAccounting, o.accountingName, o.accountingTime,o.phone, o.realName, o.age, o.gender,o.payTypeName, |
| | | su.nick_name AS staffName,s.name AS storeName,tc.name AS couponName |
| | | from t_order o |
| | | left join sec_user su on o.sysId = su.id |
| | | left join t_store s on s.id = o.storeId |
| | | left join t_coupon_receive tcr on tcr.id = o.couponId |
| | | left join t_coupon tc on tc.id = tcr.couponId |
| | | where o.id = #{orderId} and o.isDelete = 0 |
| | | </select> |
| | | <select id="pageList" resultType="com.jilongda.manage.model.TOrder"> |
| | | select * from t_order |
| | | where 1=1 |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | and createTime between #{query.startTime} and #{query.endTime} |
| | | </if> |
| | | <if test="query.startMoney != null "> |
| | | and orderMoney between #{query.startMoney} and #{query.endMoney} |
| | | </if> |
| | | <if test="query.realName != null and query.realName != ''"> |
| | | and `name` like concat('%',#{query.realName},'%') |
| | | </if> |
| | | <if test="query.storeId != null"> |
| | | and storeId = #{query.storeId} |
| | | </if> |
| | | <if test="query.sysId != null"> |
| | | and sysId = #{query.sysId} |
| | | </if> |
| | | <if test="query.userIds != null and query.userIds.size()>0"> |
| | | AND userId IN |
| | | <foreach collection="query.userIds" close=")" open="(" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.orderIds != null and query.orderIds.size()>0"> |
| | | AND id IN |
| | | <foreach collection="query.orderIds" close=")" open="(" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | </mapper> |