| @@ -189,5 +189,7 @@ public interface WxMerchantService { | |||||
| Map<String, Object> detailByShopId(TenantEntity tenantInfo, Long shopId); | Map<String, Object> detailByShopId(TenantEntity tenantInfo, Long shopId); | ||||
| List<WxMerchantVo> newFindWithShopByCouponId(TenantEntity tenantInfo, Long couponId); | |||||
| List<WxMerchantVo> newFindByCouponId(TenantEntity tenantInfo, Long couponId); | List<WxMerchantVo> newFindByCouponId(TenantEntity tenantInfo, Long couponId); | ||||
| } | } | ||||
| @@ -648,8 +648,8 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| cvo.setPickStartDate(coupon.getPickStartDate()); | cvo.setPickStartDate(coupon.getPickStartDate()); | ||||
| cvo.setPickEndDate(coupon.getPickEndDate()); | cvo.setPickEndDate(coupon.getPickEndDate()); | ||||
| cvo.setAutoRefund(coupon.getAutoRefund()); | cvo.setAutoRefund(coupon.getAutoRefund()); | ||||
| cvo.setMerchantVoList(wxMerchantService.newFindWithShopByCouponId(cvo,coupon.getId())); | |||||
| } | } | ||||
| cvo.setMerchantVoList(wxMerchantService.newFindByCouponId(cvo,cvo.getCouponId())); | |||||
| return cvo; | return cvo; | ||||
| } catch (IllegalAccessException | InvocationTargetException e) { | } catch (IllegalAccessException | InvocationTargetException e) { | ||||
| logger.error("getCouponOrderCVo error.",e); | logger.error("getCouponOrderCVo error.",e); | ||||
| @@ -787,6 +787,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| cvo.setValidStartDate(coupon.getValidStartDate()); | cvo.setValidStartDate(coupon.getValidStartDate()); | ||||
| cvo.setValidEndDate(coupon.getValidEndDate()); | cvo.setValidEndDate(coupon.getValidEndDate()); | ||||
| cvo.setAutoRefund(coupon.getAutoRefund()); | cvo.setAutoRefund(coupon.getAutoRefund()); | ||||
| cvo.setMerchantVoList(wxMerchantService.newFindByCouponId(cvo,coupon.getId())); | |||||
| } | } | ||||
| WxCouponCar couponCar= couponCarMap.get(cvo.getCouponId()); | WxCouponCar couponCar= couponCarMap.get(cvo.getCouponId()); | ||||
| if (null != couponCar) { | if (null != couponCar) { | ||||
| @@ -1271,11 +1271,17 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| return null; | return null; | ||||
| } | } | ||||
| @Override | |||||
| public List<WxMerchantVo> newFindWithShopByCouponId(TenantEntity tenantInfo, Long couponId) { | |||||
| List<WxMerchantVo> wxMerchantVoList = this.newFindByCouponId(tenantInfo, couponId); | |||||
| handleShopVo(tenantInfo,wxMerchantVoList); | |||||
| return wxMerchantVoList; | |||||
| } | |||||
| @Override | @Override | ||||
| public List<WxMerchantVo> newFindByCouponId(TenantEntity tenantInfo, Long couponId) { | public List<WxMerchantVo> newFindByCouponId(TenantEntity tenantInfo, Long couponId) { | ||||
| List<Long> merchantIds = wxCouponMerchantMapper.findMerchantByProductId(tenantInfo.getTenantId(), couponId); | List<Long> merchantIds = wxCouponMerchantMapper.findMerchantByProductId(tenantInfo.getTenantId(), couponId); | ||||
| List<WxMerchantVo> wxMerchantVoList = wxMerchantMapper.newFindListCVo(tenantInfo.getTenantId(),merchantIds); | List<WxMerchantVo> wxMerchantVoList = wxMerchantMapper.newFindListCVo(tenantInfo.getTenantId(),merchantIds); | ||||
| handleShopVo(tenantInfo,wxMerchantVoList); | |||||
| return wxMerchantVoList; | return wxMerchantVoList; | ||||
| } | } | ||||
| @@ -762,8 +762,8 @@ | |||||
| </foreach> | </foreach> | ||||
| </if> | </if> | ||||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||||
| <if test=" null == sortColumns">order by co.id desc</if> | |||||
| <if test=" null != sortColumns">order by ${sortColumns} </if> | |||||
| <if test=" null == sortColumns">order by co.update_date desc</if> | |||||
| </select> | </select> | ||||
| @@ -771,7 +771,11 @@ | |||||
| select co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id, | select co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id, | ||||
| co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark, co.pay_vendor, | co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark, co.pay_vendor, | ||||
| co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`,co.subsidy | co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`,co.subsidy | ||||
| where co.id = #{id} and co.tenant_id = #{tenantId} and cu.final_tenant_id = #{finalTenantId} | |||||
| FROM wx_coupon_order co | |||||
| where co.id = #{id} and co.tenant_id = #{tenantId} | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and co.`parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| </select> | </select> | ||||
| @@ -188,7 +188,7 @@ | |||||
| #{cUserIdItem} | #{cUserIdItem} | ||||
| </foreach> | </foreach> | ||||
| </if> | </if> | ||||
| ORDER BY credit.id DESC | |||||
| ORDER BY credit.create_date DESC | |||||
| <if test=" null != begin "> | <if test=" null != begin "> | ||||
| limit #{begin}, #{limit} | limit #{begin}, #{limit} | ||||
| </if> | </if> | ||||
| @@ -235,7 +235,7 @@ | |||||
| </select> | </select> | ||||
| <select id="creditAmount" parameterType="java.lang.Long" resultType="java.lang.Integer"> | <select id="creditAmount" parameterType="java.lang.Long" resultType="java.lang.Integer"> | ||||
| SELECT credit_amount FROM wx_credit_history where c_user_id = #{cUserId} ORDER BY id desc limit 1 | |||||
| SELECT credit_amount FROM wx_credit_history where c_user_id = #{cUserId} ORDER BY create_date desc limit 1 | |||||
| </select> | </select> | ||||
| <select id="countList" parameterType="com.iformall.domain.po.WxCreditHistory" resultType="java.lang.Integer"> | <select id="countList" parameterType="com.iformall.domain.po.WxCreditHistory" resultType="java.lang.Integer"> | ||||