New file |
| | |
| | | <?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.matrix.system.activity.dao.ActivitySignWriteoffDao"> |
| | | <!-- 定义ActivitySignWriteoff 的复杂关联map --> |
| | | <resultMap type="com.matrix.system.activity.entity.ActivitySignWriteoff" id="ActivitySignWriteoffMap"> |
| | | <id property="id" column="id" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="writeoffTime" column="writeoff_time" /> |
| | | <result property="writeoffUser" column="writeoff_user" /> |
| | | <result property="writeoffCode" column="writeoff_code" /> |
| | | <result property="actId" column="act_id" /> |
| | | <result property="awardId" column="award_id" /> |
| | | <result property="winTime" column="win_time" /> |
| | | <result property="state" column="state" /> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="logisticsId" column="logistics_id" /> |
| | | <result property="receiveId" column="receive_id" /> |
| | | <result property="companyId" column="company_id" /> |
| | | <result property="shopId" column="shop_id" /> |
| | | <result property="writeoffUserid" column="writeoff_userid" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 定义ActivitySignWriteoff 的简单map ,本map不添加其他的关联属性 --> |
| | | <resultMap type="com.matrix.system.activity.entity.ActivitySignWriteoff" id="ActivitySignWriteoffSimpleMap"> |
| | | <id property="id" column="id" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="writeoffTime" column="writeoff_time" /> |
| | | <result property="writeoffUser" column="writeoff_user" /> |
| | | <result property="writeoffCode" column="writeoff_code" /> |
| | | <result property="actId" column="act_id" /> |
| | | <result property="awardId" column="award_id" /> |
| | | <result property="winTime" column="win_time" /> |
| | | <result property="state" column="state" /> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="logisticsId" column="logistics_id" /> |
| | | <result property="receiveId" column="receive_id" /> |
| | | <result property="companyId" column="company_id" /> |
| | | <result property="shopId" column="shop_id" /> |
| | | <result property="writeoffUserid" column="writeoff_userid" /> |
| | | </resultMap> |
| | | |
| | | <select id="findSignWriteoffList" resultType="com.matrix.system.activity.vo.SignWriteoffListVo"> |
| | | SELECT |
| | | a.id id, |
| | | a.writeoff_time writeoffTime, |
| | | a.writeoff_user writeoffUser, |
| | | a.writeoff_code writeoffCode, |
| | | a.state state, |
| | | b.nick_name receiveName, |
| | | c.act_name actName, |
| | | d.award_way awardWay, |
| | | d.award_name awardName, |
| | | e.receive_time winTime, |
| | | f.receive_address receiveAddress |
| | | FROM |
| | | activity_sign_writeoff a |
| | | left join biz_user b on a.user_id= b.user_id |
| | | left join shop_activities c on a.act_id= c.id |
| | | left join activity_sign_award_set d on a.award_id= d.id |
| | | left join activity_sign_receive_record e on a.receive_id= e.id |
| | | left join shop_delivery_info f on a.logistics_id= f.id |
| | | <where> |
| | | a.company_id = #{record.companyId} |
| | | <if test="record.zjzxm != null and record.zjzxm != ''"> |
| | | and b.nick_name like concat('%',#{record.zjzxm},'%') |
| | | </if> |
| | | <if test="record.hdmcbm != null and record.hdmcbm != ''"> |
| | | and (c.act_name like concat('%',#{record.hdmcbm},'%') or c.act_code like concat('%',#{record.hdmcbm},'%')) |
| | | </if> |
| | | </where> |
| | | <if test="record.sort !=null"> |
| | | order by |
| | | a.${record.sort} ${record.order} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectUsernameByUserId" resultType="com.matrix.system.activity.vo.ZjrVo"> |
| | | SELECT |
| | | a.receive_time zjsj, |
| | | b.nick_name zjr |
| | | FROM |
| | | activity_sign_receive_record a |
| | | left join biz_user b on a.user_id= b.user_id |
| | | where a.user_id = #{userId} and a.award_id = #{receiveId} |
| | | </select> |
| | | |
| | | <select id="selectShopDeliveryInfoByLogisticsId" resultType="com.matrix.system.shopXcx.bean.ShopDeliveryInfo"> |
| | | SELECT |
| | | * |
| | | FROM |
| | | shop_delivery_info a |
| | | where a.id = #{logisticsId} |
| | | </select> |
| | | |
| | | </mapper> |