|  |  |  | 
|---|
|  |  |  | <result property="couponId" column="couponId"></result> | 
|---|
|  |  |  | <result property="serviceTime" column="service_time"></result> | 
|---|
|  |  |  | <result property="companyId" column="company_id"/> | 
|---|
|  |  |  | <result property="mallType" column="mall_type"/> | 
|---|
|  |  |  | <result property="ableScorePay" column="able_score_pay"/> | 
|---|
|  |  |  | <result property="ableSales" column="able_sales"/> | 
|---|
|  |  |  | <result property="scoreCategoryId" column="score_category_id"/> | 
|---|
|  |  |  | <result property="isUnrealProduct" column="is_unreal_product"/> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <association property="shopCoupon" select="com.matrix.system.shopXcx.dao.ShopCouponDao.selectById" | 
|---|
|  |  |  | column="{id=couponId}"></association> | 
|---|
|  |  |  | 
|---|
|  |  |  | <result property="couponId" column="couponId"></result> | 
|---|
|  |  |  | <result property="serviceTime" column="service_time"></result> | 
|---|
|  |  |  | <result property="companyId" column="company_id"/> | 
|---|
|  |  |  | <result property="mallType" column="mall_type"/> | 
|---|
|  |  |  | <result property="ableScorePay" column="able_score_pay"/> | 
|---|
|  |  |  | <result property="ableSales" column="able_sales"/> | 
|---|
|  |  |  | <result property="scoreCategoryId" column="score_category_id"/> | 
|---|
|  |  |  | </resultMap> | 
|---|
|  |  |  | 
|---|
|  |  |  | service_time, | 
|---|
|  |  |  | shop_ids, | 
|---|
|  |  |  | company_id, | 
|---|
|  |  |  | mall_type, | 
|---|
|  |  |  | able_score_pay, | 
|---|
|  |  |  | able_sales, | 
|---|
|  |  |  | is_unreal_product, | 
|---|
|  |  |  | score_category_id | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  | 
|---|
|  |  |  | #{item.serviceTime}, | 
|---|
|  |  |  | #{item.shopIds}, | 
|---|
|  |  |  | #{item.companyId}, | 
|---|
|  |  |  | #{item.mallType}, | 
|---|
|  |  |  | #{item.ableSales}, | 
|---|
|  |  |  | #{item.ableScorePay}, | 
|---|
|  |  |  | #{item.ableSales}, | 
|---|
|  |  |  | #{item.isUnrealProduct}, | 
|---|
|  |  |  | #{item.scoreCategoryId} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  | 
|---|
|  |  |  | and a.company_id = #{record.companyId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <if test="record.mallType != null and record.mallType !='' "> | 
|---|
|  |  |  | and a.mall_type = #{record.mallType} | 
|---|
|  |  |  | <if test="record.ableScorePay != null and record.ableScorePay !='' "> | 
|---|
|  |  |  | and a.able_score_pay = #{record.ableScorePay} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.ableSales != null and record.ableSales !='' "> | 
|---|
|  |  |  | and a.able_sales = #{record.ableSales} | 
|---|
|  |  |  | 
|---|
|  |  |  | and b.attr_full_path like concat('%/',#{record.attrs},'/%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <if test="record.mallType != null and record.mallType !='' "> | 
|---|
|  |  |  | and a.mall_type = #{record.mallType} | 
|---|
|  |  |  | <if test="record.ableScorePay != null and record.ableScorePay !='' "> | 
|---|
|  |  |  | and a.able_score_pay = #{record.ableScorePay} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.ableSales != null and record.ableSales !='' "> | 
|---|
|  |  |  | and a.able_sales = #{record.ableSales} | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="_parameter.containsKey('ableSales')"> | 
|---|
|  |  |  | able_sales = #{ableSales}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="_parameter.containsKey('mallType')"> | 
|---|
|  |  |  | mall_type = #{mallType}, | 
|---|
|  |  |  | <if test="_parameter.containsKey('ableScorePay')"> | 
|---|
|  |  |  | able_score_pay = #{ableScorePay}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | shop_ids = #{record.shopIds}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <if test="record.mallType != null and record.mallType !='' "> | 
|---|
|  |  |  | mall_type = #{record.mallType}, | 
|---|
|  |  |  | <if test="record.ableScorePay != null and record.ableScorePay !='' "> | 
|---|
|  |  |  | able_score_pay = #{record.ableScorePay}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.ableSales != null and record.ableSales !='' "> | 
|---|
|  |  |  | able_sales = #{record.ableSales}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.scoreCategoryId != null and record.scoreCategoryId "> | 
|---|
|  |  |  | score_category_id = #{record.scoreCategoryId}, | 
|---|
|  |  |  | score_category_id = #{record.scoreCategoryId}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.isUnrealProduct != null and record.isUnrealProduct"> | 
|---|
|  |  |  | is_unreal_product = #{record.isUnrealProduct}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </set> | 
|---|
|  |  |  | 
|---|
|  |  |  | a.marked_price, | 
|---|
|  |  |  | b.attr_full_path, | 
|---|
|  |  |  | a.couponId, | 
|---|
|  |  |  | a.mall_type, | 
|---|
|  |  |  | a.able_score_pay, | 
|---|
|  |  |  | a.able_sales, | 
|---|
|  |  |  | a.score_category_id, | 
|---|
|  |  |  | (SELECT ROUND(SUM(ss.stock),2) from shop_sku  ss where ss.p_id = a.id) as stockNum, | 
|---|
|  |  |  | 
|---|
|  |  |  | a.marked_price, | 
|---|
|  |  |  | a.service_time, | 
|---|
|  |  |  | a.couponId, | 
|---|
|  |  |  | a.mall_type, | 
|---|
|  |  |  | a.able_score_pay, | 
|---|
|  |  |  | a.able_sales, | 
|---|
|  |  |  | a.score_category_id, | 
|---|
|  |  |  | (SELECT ROUND(SUM(ss.stock),2) from shop_sku  ss where ss.p_id = a.id) as stockNum | 
|---|
|  |  |  | 
|---|
|  |  |  | a.marked_price, | 
|---|
|  |  |  | b.attr_full_path, | 
|---|
|  |  |  | a.couponId, | 
|---|
|  |  |  | a.mall_type, | 
|---|
|  |  |  | a.able_score_pay, | 
|---|
|  |  |  | a.able_sales, | 
|---|
|  |  |  | a.score_category_id, | 
|---|
|  |  |  | a.service_time, | 
|---|
|  |  |  | 
|---|
|  |  |  | b.attr_full_path, | 
|---|
|  |  |  | a.service_time, | 
|---|
|  |  |  | a.couponId, | 
|---|
|  |  |  | a.mall_type, | 
|---|
|  |  |  | a.able_score_pay, | 
|---|
|  |  |  | a.able_sales, | 
|---|
|  |  |  | a.score_category_id, | 
|---|
|  |  |  | (SELECT ROUND(SUM(s.stock),2) from shop_sku s where s.p_id = a.id) as stockNum, | 
|---|
|  |  |  | 
|---|
|  |  |  | and find_in_set(#{record.shopIds}, a.shop_ids) | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <if test="record.mallType != null and record.mallType !='' "> | 
|---|
|  |  |  | and a.mall_type = #{record.mallType} | 
|---|
|  |  |  | <if test="record.ableScorePay != null and record.ableScorePay !='' "> | 
|---|
|  |  |  | and a.able_score_pay = #{record.ableScorePay} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.ableSales != null and record.ableSales !='' "> | 
|---|
|  |  |  | and a.able_sales = #{record.ableSales} | 
|---|
|  |  |  | 
|---|
|  |  |  | is_special_price, | 
|---|
|  |  |  | marked_price, | 
|---|
|  |  |  | couponId, | 
|---|
|  |  |  | a.mall_type, | 
|---|
|  |  |  | a.able_score_pay, | 
|---|
|  |  |  | a.able_sales, | 
|---|
|  |  |  | a.score_category_id, | 
|---|
|  |  |  | a.is_unreal_product, | 
|---|
|  |  |  | (SELECT SUM(s.stock) from shop_sku  s where s.p_id = a.id) as stockNum, | 
|---|
|  |  |  | (SELECT ROUND(SUM(s.stock),2) from shop_sku  s where s.p_id = a.id) as stockNum, | 
|---|
|  |  |  | shop_ids | 
|---|