嗨森逛服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hai-server/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapperEx...

41 lines
1.6 KiB

package com.hai.dao;
import com.hai.model.HighOrderPreModel;
import com.hai.model.HighUserDiscountUnicomModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
/**
* mapper扩展类
*/
public interface HighDiscountUserRelMapperExt {
@Select({"<script>" +
" SELECT" +
" hdur.id id , " +
" hdur.using_attribution usingAttribution , " +
" hdur.use_time useTime , " +
" hdur.use_end_time useEndTime , " +
" hdur.status status , " +
" hdur.create_time createTime , " +
" hd.discount_name discountName , " +
" hd.discount_condition discountCondition , " +
" hd.discount_price discountPrice , " +
" hd.discount_type discountType " +
" FROM" +
" high_discount_user_rel hdur join high_discount hd on hdur.discount_id = hd.id " +
" WHERE" +
" 1=1" +
" <if test='map.usingAttribution != null'> and hdur.using_attribution = #{map.usingAttribution} </if> " +
" <if test='map.userId != null'> and hdur.user_id = #{map.userId} </if>",
" <if test='map.createTimeS != null'> <![CDATA[ and hdur.create_time >= #{map.createTimeS} ]]> </if>",
" <if test='map.createTimeE != null'> <![CDATA[ and hdur.create_time <= #{map.createTimeE} ]]> </if>",
" ORDER BY hdur.create_time desc" +
"</script>"})
List<HighUserDiscountUnicomModel> getUserCouponsList(@Param("map") Map<String,Object> map);
}