| @@ -6,10 +6,12 @@ import org.apache.ibatis.annotations.Param; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxOrderPress; | import com.iformall.domain.po.WxOrderPress; | ||||
| import com.iformall.domain.vo.WxOrderPressVo; | |||||
| public interface WxOrderPressMapper extends CommonMapper<WxOrderPress, Long> { | public interface WxOrderPressMapper extends CommonMapper<WxOrderPress, Long> { | ||||
| WxOrderPress selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | WxOrderPress selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | ||||
| List<WxOrderPress> findList(WxOrderPress wxOrderPress); | List<WxOrderPress> findList(WxOrderPress wxOrderPress); | ||||
| List<WxOrderPressVo> findPressList(Map paramMap); | |||||
| } | } | ||||
| @@ -1928,7 +1928,15 @@ public class WxOrderServiceImpl implements WxOrderService { | |||||
| @Override | @Override | ||||
| public WxOrderCouponPressVo detailPressVo(WxOrder record) { | public WxOrderCouponPressVo detailPressVo(WxOrder record) { | ||||
| return wxOrderMapper.selectDetailOfPress(record); | |||||
| WxOrderCouponPressVo pressVo = wxOrderMapper.selectDetailOfPress(record); | |||||
| if (null != pressVo) { | |||||
| Map paramMap = new HashMap(); | |||||
| paramMap.put("orderId", record.getId()); | |||||
| paramMap.put("tenantId", record.getTenantId()); | |||||
| paramMap.put("finalTenantId", record.getFinalTenantId()); | |||||
| pressVo.setOrderPressList(wxOrderPressMapper.findPressList(paramMap)); | |||||
| } | |||||
| return pressVo; | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -206,7 +206,7 @@ | |||||
| <result column="source_type" jdbcType="INTEGER" property="sourceType"/> | <result column="source_type" jdbcType="INTEGER" property="sourceType"/> | ||||
| <collection column="{productId=coupon_id}" property="merchantVoList" | |||||
| <collection column="{productId=coupon_id,tenantId=tenant_id}" property="merchantVoList" | |||||
| ofType="com.iformall.domain.vo.WxMerchantVo" | ofType="com.iformall.domain.vo.WxMerchantVo" | ||||
| javaType="java.util.List" | javaType="java.util.List" | ||||
| select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantNameList" > | select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantNameList" > | ||||
| @@ -304,7 +304,7 @@ | |||||
| <result column="conditions" jdbcType="VARCHAR" property="conditions" /> | <result column="conditions" jdbcType="VARCHAR" property="conditions" /> | ||||
| <result column="content_type" jdbcType="INTEGER" property="contentType"/> | <result column="content_type" jdbcType="INTEGER" property="contentType"/> | ||||
| <collection column="{productId=coupon_id}" property="merchantVoList" | |||||
| <collection column="{productId=coupon_id,tenantId=tenant_id}" property="merchantVoList" | |||||
| ofType="com.iformall.domain.vo.WxMerchantVo" | ofType="com.iformall.domain.vo.WxMerchantVo" | ||||
| javaType="java.util.List" | javaType="java.util.List" | ||||
| select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantVoList" > | select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantVoList" > | ||||
| @@ -618,7 +618,7 @@ | |||||
| <result column="content_type" jdbcType="INTEGER" property="contentType"/> | <result column="content_type" jdbcType="INTEGER" property="contentType"/> | ||||
| <result column="source_type" jdbcType="INTEGER" property="sourceType"/> | <result column="source_type" jdbcType="INTEGER" property="sourceType"/> | ||||
| <collection column="{productId=id}" property="merchantVoList" | |||||
| <collection column="{productId=id,tenantId=tenant_id}" property="merchantVoList" | |||||
| ofType="com.iformall.domain.vo.WxMerchantVo" | ofType="com.iformall.domain.vo.WxMerchantVo" | ||||
| javaType="java.util.List" | javaType="java.util.List" | ||||
| select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantBaseList"> | select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantBaseList"> | ||||
| @@ -688,7 +688,7 @@ | |||||
| <result column="verify_merchant_name" jdbcType="VARCHAR" property="verifyMerchantName"/> | <result column="verify_merchant_name" jdbcType="VARCHAR" property="verifyMerchantName"/> | ||||
| <collection column="{productId=coupon_id}" property="merchantVoList" | |||||
| <collection column="{productId=coupon_id,tenantId=tenant_id}" property="merchantVoList" | |||||
| ofType="com.iformall.domain.vo.WxMerchantVo" | ofType="com.iformall.domain.vo.WxMerchantVo" | ||||
| javaType="java.util.List" | javaType="java.util.List" | ||||
| select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantNameList" > | select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantNameList" > | ||||
| @@ -1052,7 +1052,7 @@ | |||||
| <result column="send_channel_type" jdbcType="INTEGER" property="sendChannelType" /> | <result column="send_channel_type" jdbcType="INTEGER" property="sendChannelType" /> | ||||
| <collection column="{productId=coupon_id}" property="merchantVoList" | |||||
| <collection column="{productId=coupon_id,tenantId=tenant_id}" property="merchantVoList" | |||||
| ofType="com.iformall.domain.vo.WxMerchantVo" | ofType="com.iformall.domain.vo.WxMerchantVo" | ||||
| javaType="java.util.List" | javaType="java.util.List" | ||||
| select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantVoList" > | select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantVoList" > | ||||
| @@ -1254,7 +1254,7 @@ | |||||
| <result column="coupon_free_id" jdbcType="INTEGER" property="couponFreeId"/> | <result column="coupon_free_id" jdbcType="INTEGER" property="couponFreeId"/> | ||||
| <collection column="{productId=coupon_id}" property="merchantVoList" | |||||
| <collection column="{productId=coupon_id,tenantId=tenant_id}" property="merchantVoList" | |||||
| ofType="com.iformall.domain.vo.WxMerchantVo" | ofType="com.iformall.domain.vo.WxMerchantVo" | ||||
| javaType="java.util.List" | javaType="java.util.List" | ||||
| select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantVoList" > | select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantVoList" > | ||||
| @@ -1315,7 +1315,7 @@ | |||||
| <result column="remaining_amount" jdbcType="INTEGER" property="remainingAmount" /> | <result column="remaining_amount" jdbcType="INTEGER" property="remainingAmount" /> | ||||
| <result column="support_transfer" jdbcType="INTEGER" property="supportTransfer"/> | <result column="support_transfer" jdbcType="INTEGER" property="supportTransfer"/> | ||||
| <collection column="{productId=coupon_id}" property="merchantVoList" | |||||
| <collection column="{productId=coupon_id,tenantId=tenant_id}" property="merchantVoList" | |||||
| ofType="com.iformall.domain.vo.WxMerchantVo" | ofType="com.iformall.domain.vo.WxMerchantVo" | ||||
| javaType="java.util.List" | javaType="java.util.List" | ||||
| select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantVoList" > | select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantVoList" > | ||||
| @@ -316,7 +316,7 @@ | |||||
| <result column="send_channel_type" jdbcType="INTEGER" property="sendChannelType" /> | <result column="send_channel_type" jdbcType="INTEGER" property="sendChannelType" /> | ||||
| <result column="support_transfer" jdbcType="INTEGER" property="supportTransfer"/> | <result column="support_transfer" jdbcType="INTEGER" property="supportTransfer"/> | ||||
| <collection column="{productId=product_id}" property="merchantVoList" | |||||
| <collection column="{productId=product_id,tenantId=tenant_id}" property="merchantVoList" | |||||
| ofType="com.iformall.domain.vo.WxMerchantVo" | ofType="com.iformall.domain.vo.WxMerchantVo" | ||||
| javaType="java.util.List" | javaType="java.util.List" | ||||
| select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantVoList" > | select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantVoList" > | ||||
| @@ -906,11 +906,11 @@ | |||||
| <result column="coupon_order_id" jdbcType="BIGINT" property="couponOrderId"/> | <result column="coupon_order_id" jdbcType="BIGINT" property="couponOrderId"/> | ||||
| <result column="coupon_order_status" jdbcType="INTEGER" property="couponOrderStatus"/> | <result column="coupon_order_status" jdbcType="INTEGER" property="couponOrderStatus"/> | ||||
| <collection column="{orderId=order_number}" property="orderPressList" | |||||
| <!-- <collection column="{orderId=order_number,tenantId=tenant_id}" property="orderPressList" | |||||
| ofType="com.iformall.domain.vo.WxOrderPressVo" | ofType="com.iformall.domain.vo.WxOrderPressVo" | ||||
| javaType="java.util.List" | javaType="java.util.List" | ||||
| select="com.iformall.mapper.WxOrderPressMapper.findPressList" > | select="com.iformall.mapper.WxOrderPressMapper.findPressList" > | ||||
| </collection> | |||||
| </collection> --> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allOrderPressListColumns"> | <sql id="allOrderPressListColumns"> | ||||
| @@ -55,4 +55,31 @@ | |||||
| select <include refid="allColumns" /> from wx_order_press | select <include refid="allColumns" /> from wx_order_press | ||||
| <include refid="dynamicWhereConditions" /> | <include refid="dynamicWhereConditions" /> | ||||
| </select> | </select> | ||||
| <resultMap id="VoBaseResultMap" type="com.iformall.domain.vo.WxOrderPressVo"> | |||||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||||
| <result column="order_id" jdbcType="BIGINT" property="orderId" /> | |||||
| <result column="user_id" jdbcType="BIGINT" property="userId" /> | |||||
| <result column="press_value" jdbcType="INTEGER" property="pressValue" /> | |||||
| <result column="create_date" jdbcType="TIMESTAMP" property="createDate" /> | |||||
| <result column="first" jdbcType="SMALLINT" property="first" /> | |||||
| <result column="nick_name" jdbcType="VARCHAR" property="nickName"/> | |||||
| <result column="avatar_url" jdbcType="VARCHAR" property="avatarUrl"/> | |||||
| </resultMap> | |||||
| <sql id="allVoColumns"> | |||||
| op.`id`,op.`order_id`,op.`user_id`,op.`press_value`,op.`create_date`,op.`first`, | |||||
| cu.`nick_name`, cu.`avatar_url` | |||||
| </sql> | |||||
| <select id="findPressList" parameterType="com.iformall.domain.vo.WxOrderPressVo" resultMap="VoBaseResultMap"> | |||||
| select <include refid="allVoColumns" /> | |||||
| from wx_order_press op | |||||
| left join wx_c_user_basic_info cu on cu.id = op.user_id | |||||
| where op.`order_id` = #{orderId} | |||||
| and op.tenant_id = #{tenantId} and cu.final_tenant_id = #{finalTenantId} | |||||
| order by op.`create_date` desc | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||