| @@ -0,0 +1,200 @@ | |||||
| ALTER TABLE `mallink`.`wx_batch_order_0` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_1` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_2` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_3` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_4` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_5` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_6` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_7` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_8` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_9` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_10` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_11` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_12` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_13` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_14` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_15` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_16` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_17` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_18` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_19` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_20` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_21` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_22` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_23` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_24` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_25` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_26` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_27` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_28` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_29` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_30` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_31` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_32` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_33` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_34` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_35` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_36` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_37` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_38` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_39` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_40` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_41` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_42` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_43` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_44` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_45` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_46` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_47` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_48` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_49` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_50` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_51` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_52` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_53` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_54` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_55` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_56` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_57` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_58` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_59` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_60` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_61` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_62` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_63` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_64` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_65` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_66` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_67` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_68` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_69` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_70` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_71` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_72` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_73` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_74` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_75` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_76` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_77` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_78` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_79` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_80` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_81` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_82` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_83` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_84` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_85` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_86` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_87` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_88` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_89` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_90` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_91` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_92` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_93` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_94` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_95` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_96` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_97` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_98` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| ALTER TABLE `mallink`.`wx_batch_order_99` | |||||
| ADD COLUMN `is_tt_poi_order` int(1) DEFAULT NULL COMMENT '是否poi订单' AFTER `order_type`; | |||||
| @@ -10,7 +10,9 @@ import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| import lombok.ToString; | import lombok.ToString; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.HashMap; | |||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | |||||
| @TableName(value = "wx_batch_order") | @TableName(value = "wx_batch_order") | ||||
| @Data | @Data | ||||
| @@ -38,6 +40,9 @@ public class WxBatchOrder extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "组合订单类型EnumComposeOrder", name = "orderType") | @io.swagger.annotations.ApiModelProperty(value = "组合订单类型EnumComposeOrder", name = "orderType") | ||||
| private Integer orderType; | private Integer orderType; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "EnumYesOrNo是否抖音poi订单", name = "isTtPoiOrder") | |||||
| private Integer isTtPoiOrder; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @io.swagger.annotations.ApiModelProperty(value = "订单集合", name = "orders") | @io.swagger.annotations.ApiModelProperty(value = "订单集合", name = "orders") | ||||
| private List<WxOrderCouponVo> orders; | private List<WxOrderCouponVo> orders; | ||||
| @@ -70,6 +70,9 @@ public class WxOrderCouponVo extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="0: 未使用 1: 已核销 2:已过期 3:已退款",name="couponOrderStatus") | @io.swagger.annotations.ApiModelProperty(value="0: 未使用 1: 已核销 2:已过期 3:已退款",name="couponOrderStatus") | ||||
| private Integer couponOrderStatus; | private Integer couponOrderStatus; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "操作券B端小程序用户商户ID", name = "bMerchantId") | |||||
| private Long bMerchantId; | |||||
| /** 券类型信息 */ | /** 券类型信息 */ | ||||
| @io.swagger.annotations.ApiModelProperty(value="券类型(1.满减券,2.代金券,3.团购券,4.礼品券,5.停车券,6.多商户券,8.砍价券,9.团购券,100.消费卡)",name="type") | @io.swagger.annotations.ApiModelProperty(value="券类型(1.满减券,2.代金券,3.团购券,4.礼品券,5.停车券,6.多商户券,8.砍价券,9.团购券,100.消费卡)",name="type") | ||||
| private Integer type; | private Integer type; | ||||
| @@ -218,6 +221,7 @@ public class WxOrderCouponVo extends TenantEntity { | |||||
| public void initByCouponOrder(WxCouponOrder couponOrder) { | public void initByCouponOrder(WxCouponOrder couponOrder) { | ||||
| this.setCouponOrderId(couponOrder.getId()); | this.setCouponOrderId(couponOrder.getId()); | ||||
| this.setCouponOrderStatus(couponOrder.getCouponOrderStatus()); | this.setCouponOrderStatus(couponOrder.getCouponOrderStatus()); | ||||
| this.setBMerchantId(couponOrder.getBMerchantId()); | |||||
| this.setShippingStatus(couponOrder.getShippingStatus()); | this.setShippingStatus(couponOrder.getShippingStatus()); | ||||
| this.setDeliveryInfo(couponOrder.getDeliveryInfo()); | this.setDeliveryInfo(couponOrder.getDeliveryInfo()); | ||||
| this.setCreateDate(couponOrder.getCreateDate()); | this.setCreateDate(couponOrder.getCreateDate()); | ||||
| @@ -2,6 +2,7 @@ package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.TtCouponChannelPoi; | import com.iformall.domain.po.TtCouponChannelPoi; | ||||
| import org.apache.ibatis.annotations.Param; | |||||
| import java.util.List; | import java.util.List; | ||||
| @@ -11,4 +12,5 @@ public interface TtCouponChannelPoiMapper extends CommonMapper<TtCouponChannelPo | |||||
| List<Long> findIdList(TtCouponChannelPoi record); | List<Long> findIdList(TtCouponChannelPoi record); | ||||
| Integer getPoiPutOnCount(@Param("tenantId")String tenantId, @Param("ids")List<Long> ids); | |||||
| } | } | ||||
| @@ -1,11 +1,11 @@ | |||||
| package com.iformall.service.msg.impl; | package com.iformall.service.msg.impl; | ||||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.po.msg.BaseMsg; | import com.iformall.domain.po.msg.BaseMsg; | ||||
| import com.iformall.domain.po.msg.FmInsideOrderPushMsg; | import com.iformall.domain.po.msg.FmInsideOrderPushMsg; | ||||
| import com.iformall.enums.EnumComposeOrder; | |||||
| import com.iformall.enums.EnumPayWay; | |||||
| import com.iformall.enums.*; | |||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.mapper.TtCUserMapper; | import com.iformall.mapper.TtCUserMapper; | ||||
| import com.iformall.mapper.TtOrderPushErrorMapper; | import com.iformall.mapper.TtOrderPushErrorMapper; | ||||
| @@ -171,7 +171,8 @@ public class FmInsideOrderPushMsgServiceImpl implements MsgSendService { | |||||
| throw new MallinkException(ErrorCode.ORDER_IS_NOT_FIND.getCode(), "支付订单找到多个用户" + batchOrder.getId()); | throw new MallinkException(ErrorCode.ORDER_IS_NOT_FIND.getCode(), "支付订单找到多个用户" + batchOrder.getId()); | ||||
| } | } | ||||
| PayAdapterResult payAdapterResult = payServiceFactory.getPayAdapterService(EnumPayWay.PAY_WAY_TT.getCode()).payOrderPush(openIds.get(0), appinfo, batchOrder, payOrder); | |||||
| PayAdapterResult payAdapterResult = payServiceFactory.getPayAdapterService(EnumPayWay.PAY_WAY_TT.getCode()) | |||||
| .payOrderPush(openIds.get(0), appinfo, batchOrder, payOrder); | |||||
| if(payAdapterResult.isSuccess()){ | if(payAdapterResult.isSuccess()){ | ||||
| ttOrderPushErrorMapper.deleteById(batchOrder.getId()); | ttOrderPushErrorMapper.deleteById(batchOrder.getId()); | ||||
| @@ -1,13 +1,9 @@ | |||||
| package com.iformall.service.order.impl.batch; | package com.iformall.service.order.impl.batch; | ||||
| import java.util.ArrayList; | |||||
| import java.util.Date; | |||||
| import java.util.HashMap; | |||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| import java.util.*; | |||||
| import com.iformall.mapper.WxCouponMapper; | |||||
| import com.iformall.mapper.WxCouponOrderMapper; | |||||
| import com.iformall.enums.EnumYesOrNo; | |||||
| import com.iformall.mapper.*; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.context.annotation.Lazy; | import org.springframework.context.annotation.Lazy; | ||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| @@ -27,8 +23,6 @@ import com.iformall.enums.EnumComposeOrder; | |||||
| import com.iformall.enums.EnumOrderShopingType; | import com.iformall.enums.EnumOrderShopingType; | ||||
| import com.iformall.enums.EnumPayWay; | import com.iformall.enums.EnumPayWay; | ||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.mapper.WxBatchOrderMapper; | |||||
| import com.iformall.mapper.WxOrderMapper; | |||||
| import com.iformall.service.WxCouponChannelService; | import com.iformall.service.WxCouponChannelService; | ||||
| import com.iformall.service.WxOrderService; | import com.iformall.service.WxOrderService; | ||||
| import com.iformall.service.order.OrderAdapterService; | import com.iformall.service.order.OrderAdapterService; | ||||
| @@ -51,6 +45,9 @@ public abstract class BaseBatchOrderAdapterService implements OrderAdapterServic | |||||
| WxCouponOrderMapper wxCouponOrderMapper; | WxCouponOrderMapper wxCouponOrderMapper; | ||||
| @Autowired | @Autowired | ||||
| WxCouponMapper wxCouponMapper; | WxCouponMapper wxCouponMapper; | ||||
| @Autowired | |||||
| TtCouponChannelPoiMapper ttCouponChannelPoiMapper; | |||||
| @Lazy | @Lazy | ||||
| @Autowired | @Autowired | ||||
| @@ -92,6 +89,14 @@ public abstract class BaseBatchOrderAdapterService implements OrderAdapterServic | |||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| protected WxComposeOrder createDBMainOrder(TenantEntity tenantEntity,WxCUserBasicInfo user,int payment,EnumPayWay payWay,EnumComposeOrder composeOrderType,Map<Long,WxCouponChannel> couponChannelMap) { | protected WxComposeOrder createDBMainOrder(TenantEntity tenantEntity,WxCUserBasicInfo user,int payment,EnumPayWay payWay,EnumComposeOrder composeOrderType,Map<Long,WxCouponChannel> couponChannelMap) { | ||||
| //判断是否poi订单 | |||||
| Integer isTtPoiOrder = null; | |||||
| try{ | |||||
| if(EnumPayWay.PAY_WAY_TT.equals(payWay) && isTtPoiOrder(tenantEntity,couponChannelMap)){ | |||||
| isTtPoiOrder = EnumYesOrNo.YES.getCode(); | |||||
| } | |||||
| }catch(Exception e){} | |||||
| WxBatchOrder order =new WxBatchOrder(); | WxBatchOrder order =new WxBatchOrder(); | ||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| order.setId(idWorker.nextId()); | order.setId(idWorker.nextId()); | ||||
| @@ -100,6 +105,7 @@ public abstract class BaseBatchOrderAdapterService implements OrderAdapterServic | |||||
| order.setPayment(payment); | order.setPayment(payment); | ||||
| order.setPayVendor(payWay.getCode()); | order.setPayVendor(payWay.getCode()); | ||||
| order.setOrderType(composeOrderType.getCode()); | order.setOrderType(composeOrderType.getCode()); | ||||
| order.setIsTtPoiOrder(isTtPoiOrder); | |||||
| order.setCreateDate(new Date()); | order.setCreateDate(new Date()); | ||||
| wxBatchOrderMapper.insert(order); | wxBatchOrderMapper.insert(order); | ||||
| WxComposeOrder composeOrder = new WxComposeOrder(order.getId(), composeOrderType.getCode(), payment); | WxComposeOrder composeOrder = new WxComposeOrder(order.getId(), composeOrderType.getCode(), payment); | ||||
| @@ -110,6 +116,19 @@ public abstract class BaseBatchOrderAdapterService implements OrderAdapterServic | |||||
| return composeOrder; | return composeOrder; | ||||
| } | } | ||||
| //判断是否poi订单 | |||||
| private boolean isTtPoiOrder(TenantEntity tenantEntity,Map<Long,WxCouponChannel> couponChannelMap){ | |||||
| boolean isTtPoiOrder = false; | |||||
| if(null != couponChannelMap){ | |||||
| List<Long> couponChannelIds = (List<Long>) couponChannelMap.keySet(); | |||||
| Integer poiCount = ttCouponChannelPoiMapper.getPoiPutOnCount(tenantEntity.getTenantId(),couponChannelIds); | |||||
| if(couponChannelIds.size() == poiCount.intValue()){ | |||||
| isTtPoiOrder = true; | |||||
| } | |||||
| } | |||||
| return isTtPoiOrder; | |||||
| } | |||||
| protected WxComposeOrder getComposeOrder(Long mainOrderId, String tenantId,EnumComposeOrder composeOrderType) { | protected WxComposeOrder getComposeOrder(Long mainOrderId, String tenantId,EnumComposeOrder composeOrderType) { | ||||
| WxBatchOrder order = wxBatchOrderMapper.selectById(mainOrderId, tenantId); | WxBatchOrder order = wxBatchOrderMapper.selectById(mainOrderId, tenantId); | ||||
| WxComposeOrder corder = new WxComposeOrder(order.getId(),composeOrderType.getCode(),order.getPayment()); | WxComposeOrder corder = new WxComposeOrder(order.getId(),composeOrderType.getCode(),order.getPayment()); | ||||
| @@ -0,0 +1,49 @@ | |||||
| package com.iformall.service.pay.service.pay.douyin.miniApp; | |||||
| /** | |||||
| * Created by Stormeye on 2018/08/09. | |||||
| */ | |||||
| public enum EnumTtPoiOrderStatus { | |||||
| // 110. 待支付:正常、待支付、已转移、部分支付 | |||||
| //210. 待确认: | |||||
| //340. 预订成功:已支付,已完成。 | |||||
| //10. 已取消:已取消 | |||||
| //410. 退款中:未审核,退款单申请,已确认,退款单审核通过,退款审核通过,退款单处理中, | |||||
| //420. 退款成功:已退款 | |||||
| //430. 退款失败:不通过,退款单取消,退款单失败 | |||||
| ORDER_STATUS_110(110, "待支付"), | |||||
| ORDER_STATUS_210(210, "待确认"), | |||||
| ORDER_STATUS_310(310, "未使用"), | |||||
| ORDER_STATUS_340(340, "已使用"), | |||||
| ORDER_STATUS_10(10, "已取消"), | |||||
| ORDER_STATUS_410(410,"退款中"), | |||||
| ORDER_STATUS_420(420, "退款成功"), | |||||
| ORDER_STATUS_430(430, "退款失败"), | |||||
| ; | |||||
| public static EnumTtPoiOrderStatus getEnum(Integer code) { | |||||
| for (EnumTtPoiOrderStatus value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumTtPoiOrderStatus(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -2,26 +2,28 @@ package com.iformall.service.pay.service.pay.douyin.miniApp; | |||||
| import com.alibaba.fastjson.JSON; | import com.alibaba.fastjson.JSON; | ||||
| import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.vo.WxOrderCouponVo; | import com.iformall.domain.vo.WxOrderCouponVo; | ||||
| import com.iformall.douyin.miniapp.api.TtMaService; | import com.iformall.douyin.miniapp.api.TtMaService; | ||||
| import com.iformall.douyin.pay.DouYinPayHelper; | import com.iformall.douyin.pay.DouYinPayHelper; | ||||
| import com.iformall.douyin.pay.preOrder.CreatePreOrderResult; | import com.iformall.douyin.pay.preOrder.CreatePreOrderResult; | ||||
| import com.iformall.douyin.pay.preOrder.DouYinCreatePreOrder; | import com.iformall.douyin.pay.preOrder.DouYinCreatePreOrder; | ||||
| import com.iformall.enums.EnumAppPlat; | |||||
| import com.iformall.enums.EnumCouponOrderStatus; | |||||
| import com.iformall.enums.EnumOrderStatus; | |||||
| import com.iformall.enums.EnumPayShare; | |||||
| import com.iformall.enums.*; | |||||
| import com.iformall.mapper.TtMerchantPoiMapper; | |||||
| import com.iformall.mapper.WxAppinfoMapper; | |||||
| import com.iformall.service.order.entity.WxComposeOrder; | import com.iformall.service.order.entity.WxComposeOrder; | ||||
| import com.iformall.service.pay.entity.PayExtraParam; | import com.iformall.service.pay.entity.PayExtraParam; | ||||
| import com.iformall.service.pay.service.pay.CDrivingPayService; | import com.iformall.service.pay.service.pay.CDrivingPayService; | ||||
| import com.iformall.service.pay.service.pay.douyin.BaseTtPayAdapterService; | import com.iformall.service.pay.service.pay.douyin.BaseTtPayAdapterService; | ||||
| import com.iformall.service.pay.service.pay.entity.PayAdapterResult; | import com.iformall.service.pay.service.pay.entity.PayAdapterResult; | ||||
| import com.iformall.service.pay.service.pay.entity.PayQueryAdapterResult; | import com.iformall.service.pay.service.pay.entity.PayQueryAdapterResult; | ||||
| import com.iformall.utils.Constant; | |||||
| import com.iformall.utils.DateUtils; | import com.iformall.utils.DateUtils; | ||||
| import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
| import me.chanjar.weixin.common.error.WxErrorException; | import me.chanjar.weixin.common.error.WxErrorException; | ||||
| import me.chanjar.weixin.common.util.json.WxGsonBuilder; | import me.chanjar.weixin.common.util.json.WxGsonBuilder; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import java.io.File; | import java.io.File; | ||||
| @@ -31,6 +33,12 @@ import java.util.*; | |||||
| @Service | @Service | ||||
| public class TtMiniAppPayAdapterService extends BaseTtPayAdapterService implements CDrivingPayService{ | public class TtMiniAppPayAdapterService extends BaseTtPayAdapterService implements CDrivingPayService{ | ||||
| @Autowired | |||||
| private WxAppinfoMapper wxAppinfoMapper; | |||||
| @Autowired | |||||
| private TtMerchantPoiMapper ttMerchantPoiMapper; | |||||
| @Override | @Override | ||||
| public PayAdapterResult pay(WxPayAccount payAccount, WxPayOrder record,WxComposeOrder composeOrder,String productName,EnumPayShare isShare,WxAppinfo appInfo,Date currentDate, PayExtraParam params) throws Exception { | public PayAdapterResult pay(WxPayAccount payAccount, WxPayOrder record,WxComposeOrder composeOrder,String productName,EnumPayShare isShare,WxAppinfo appInfo,Date currentDate, PayExtraParam params) throws Exception { | ||||
| DouYinCreatePreOrder preOrder = new DouYinCreatePreOrder(); | DouYinCreatePreOrder preOrder = new DouYinCreatePreOrder(); | ||||
| @@ -93,43 +101,96 @@ public class TtMiniAppPayAdapterService extends BaseTtPayAdapterService implemen | |||||
| @Override | @Override | ||||
| public PayAdapterResult payOrderPush(String openId,WxAppinfo appInfo, WxBatchOrder batchOrder,WxPayOrder payOrder) throws Exception { | public PayAdapterResult payOrderPush(String openId,WxAppinfo appInfo, WxBatchOrder batchOrder,WxPayOrder payOrder) throws Exception { | ||||
| boolean isPoiOrder = false; | |||||
| //第三方在抖音开放平台申请的ClientKey | |||||
| String clientKey = ""; | |||||
| if(batchOrder.getIsTtPoiOrder() != null && EnumYesOrNo.YES.getCode().equals(batchOrder.getIsTtPoiOrder())){ | |||||
| WxAppinfo appinfoQ = new WxAppinfo(); | |||||
| appinfoQ.updateTenantInfo(batchOrder); | |||||
| appinfoQ.setPlat(EnumAppPlat.TOUTIAO.getCode()); | |||||
| appinfoQ.setType(EnumAppType.A.getCode()); | |||||
| WxAppinfo appinfo = wxAppinfoMapper.selectOne(new QueryWrapper<>(appinfoQ)); | |||||
| if(appinfo != null){ | |||||
| clientKey = appinfo.getAppId(); | |||||
| isPoiOrder = true; | |||||
| } | |||||
| } | |||||
| //目前订单都是一笔一笔同步,暂不支持购物车 | |||||
| WxOrderCouponVo wxOrderCouponVo = batchOrder.getOrders().get(0); | |||||
| TtMaService ttappService = maUtil.getTtMaService(appInfo); | TtMaService ttappService = maUtil.getTtMaService(appInfo); | ||||
| // map.put("access_token",appInfo.getAccessToken());//后面会自动加上 | |||||
| Map<String,Object> map = new HashMap<>(); | Map<String,Object> map = new HashMap<>(); | ||||
| // map.put("client_key","");//第三方在开放平台申请的 ClientKey(生活服务订单必传) | |||||
| // map.put("access_token",appInfo.getAccessToken()); | |||||
| // map.put("ext_shop_id","");//生活服务外部商户 id,购买店铺 id (生活服务订单必传) | |||||
| map.put("app_name","douyin"); | map.put("app_name","douyin"); | ||||
| map.put("open_id",openId); | map.put("open_id",openId); | ||||
| WxOrderCouponVo wxOrderCouponVo = batchOrder.getOrders().get(0); | |||||
| Map<String,Object> orderDetail = new HashMap<>(); | |||||
| orderDetail.put("order_id",payOrder.getPayOrderNo()); | |||||
| orderDetail.put("create_time",batchOrder.getCreateDate().getTime()); | |||||
| orderDetail.put("status", getTtOrderStatus(wxOrderCouponVo.getOrderStatus(),wxOrderCouponVo.getCouponOrderStatus()).getMessage()); | |||||
| orderDetail.put("total_price",batchOrder.getPayment()); | |||||
| orderDetail.put("detail_url",batchOrder.getWeappOrderPath(EnumAppPlat.TOUTIAO)); | |||||
| List<Map> itemList = new ArrayList<>(); | |||||
| for (WxOrderCouponVo orderVo:batchOrder.getOrders()) { | |||||
| Map<String,Object> item = new HashMap<>(); | |||||
| item.put("img",orderVo.getCoverImg()); | |||||
| item.put("title",orderVo.getTitle()); | |||||
| item.put("sub_title",orderVo.getSubTitle()); | |||||
| item.put("price",orderVo.getSalePrice()); | |||||
| itemList.add(item); | |||||
| } | |||||
| orderDetail.put("item_list",itemList); | |||||
| map.put("order_detail", JSON.toJSONString(orderDetail)); | |||||
| map.put("order_type",0); | |||||
| map.put("payment_order_no", payOrder.getTransactionId()); | |||||
| if(isPoiOrder){ | |||||
| map.put("client_key",clientKey);//第三方在开放平台申请的 ClientKey(生活服务订单必传) | |||||
| map.put("ext_shop_id",wxOrderCouponVo.getMerchantVoList().get(0).getId());//生活服务外部商户 id,购买店铺 id (生活服务订单必传) | |||||
| map.put("order_type",9101); | |||||
| }else{ | |||||
| map.put("order_type",0); | |||||
| map.put("order_status", getTtOrderStatus(wxOrderCouponVo.getOrderStatus(),wxOrderCouponVo.getCouponOrderStatus()).getCode()); | |||||
| } | |||||
| map.put("update_time", wxOrderCouponVo.getUpdateDate().getTime()); | map.put("update_time", wxOrderCouponVo.getUpdateDate().getTime()); | ||||
| // map.put("extra","");//自定义字段,用于关联具体业务场景下的特殊参数 | // map.put("extra","");//自定义字段,用于关联具体业务场景下的特殊参数 | ||||
| // map.put("scene","");//小程序场景值 | // map.put("scene","");//小程序场景值 | ||||
| // map.put("location","");//小程序场景值 | // map.put("location","");//小程序场景值 | ||||
| // map.put("launch_from","");//小程序场景值 | // map.put("launch_from","");//小程序场景值 | ||||
| map.put("order_status", getTtOrderStatus(wxOrderCouponVo.getOrderStatus(),wxOrderCouponVo.getCouponOrderStatus()).getCode()); | |||||
| map.put("payment_order_no", payOrder.getTransactionId()); | |||||
| Map<String,Object> orderDetail = new HashMap<>(); | |||||
| if(isPoiOrder){ | |||||
| orderDetail.put("ext_order_id",payOrder.getPayOrderNo()); | |||||
| orderDetail.put("status", getTtPoiOrderStatus(wxOrderCouponVo.getOrderStatus(),wxOrderCouponVo.getCouponOrderStatus()).getCode()); | |||||
| orderDetail.put("shop_name",wxOrderCouponVo.getMerchantVoList().get(0).getMerchantName()); | |||||
| orderDetail.put("entry_type",2); | |||||
| orderDetail.put("entry_schema",getOrderEntrySchema(appInfo.getAppId(),batchOrder.getId())); | |||||
| orderDetail.put("create_order_time",batchOrder.getCreateDate().getTime()); | |||||
| // orderDetail.put("description","");//备注(长度500) | |||||
| orderDetail.put("total_price",batchOrder.getPayment()); | |||||
| if(EnumPayStatus.PAY_STATUS_SUCCESS.getCode().equals(payOrder.getPayOrderStatus())){ | |||||
| orderDetail.put("pay_time",payOrder.getPayTimeEnd().getTime()); | |||||
| } | |||||
| if(EnumCouponOrderStatus.COUPON_ORDER_USED.getCode().equals(wxOrderCouponVo.getCouponOrderStatus()) | |||||
| && wxOrderCouponVo.getBMerchantId() != null){ | |||||
| orderDetail.put("ext_valid_shop_id",wxOrderCouponVo.getBMerchantId()); | |||||
| TtMerchantPoi merchantPoi = ttMerchantPoiMapper.selectById(wxOrderCouponVo.getBMerchantId()); | |||||
| if(merchantPoi != null){ | |||||
| orderDetail.put("valid_poi_id_str",merchantPoi.getPoiId()); | |||||
| } | |||||
| } | |||||
| orderDetail.put("ext_goods_id",wxOrderCouponVo.getCouponChannelId()); | |||||
| orderDetail.put("goods_name",wxOrderCouponVo.getTitle()); | |||||
| // orderDetail.put("goods_info","");//商品描述信息。向用户介绍商品,最多120字。 | |||||
| orderDetail.put("goods_cover_image",wxOrderCouponVo.getCoverImg()); | |||||
| orderDetail.put("goods_entry_type",2); | |||||
| orderDetail.put("goods_entry_schema",getGoodsEntrySchema(appInfo.getAppId(),wxOrderCouponVo.getCouponChannelId())); | |||||
| orderDetail.put("start_valid_time",DateUtils.date2String(wxOrderCouponVo.getValidStartDate())); | |||||
| orderDetail.put("end_valid_time",DateUtils.date2String(wxOrderCouponVo.getValidEndDate())); | |||||
| orderDetail.put("ticket_num",wxOrderCouponVo.getCouponNumber()); | |||||
| // orderDetail.put("ext_ticket_ids",); | |||||
| // orderDetail.put("ticket_description",); | |||||
| }else{ | |||||
| orderDetail.put("order_id",payOrder.getPayOrderNo()); | |||||
| orderDetail.put("create_time",batchOrder.getCreateDate().getTime()); | |||||
| orderDetail.put("status", getTtOrderStatus(wxOrderCouponVo.getOrderStatus(),wxOrderCouponVo.getCouponOrderStatus()).getMessage()); | |||||
| orderDetail.put("total_price",batchOrder.getPayment()); | |||||
| orderDetail.put("detail_url",batchOrder.getWeappOrderPath(EnumAppPlat.TOUTIAO)); | |||||
| List<Map> itemList = new ArrayList<>(); | |||||
| for (WxOrderCouponVo orderVo:batchOrder.getOrders()) { | |||||
| Map<String,Object> item = new HashMap<>(); | |||||
| item.put("img",orderVo.getCoverImg()); | |||||
| item.put("title",orderVo.getTitle()); | |||||
| item.put("sub_title",orderVo.getSubTitle()); | |||||
| item.put("price",orderVo.getSalePrice()); | |||||
| itemList.add(item); | |||||
| } | |||||
| orderDetail.put("item_list",itemList); | |||||
| } | |||||
| map.put("order_detail", JSON.toJSONString(orderDetail)); | |||||
| try { | try { | ||||
| String response = ttappService.post(ttappService.ORDER_PUSH, map); | String response = ttappService.post(ttappService.ORDER_PUSH, map); | ||||
| @@ -179,6 +240,58 @@ public class TtMiniAppPayAdapterService extends BaseTtPayAdapterService implemen | |||||
| } | } | ||||
| private EnumTtPoiOrderStatus getTtPoiOrderStatus(Integer orderStatus,Integer couponOrderStatus) throws Exception { | |||||
| if(EnumOrderStatus.getEnum(orderStatus).equals(EnumOrderStatus.ORDER_STATUS_PENDING_PAYMENT)){ | |||||
| return EnumTtPoiOrderStatus.ORDER_STATUS_110; | |||||
| } | |||||
| else if(EnumOrderStatus.getEnum(orderStatus).equals(EnumOrderStatus.ORDER_STATUS_PAYMENT_SUCCESS)){ | |||||
| if(EnumCouponOrderStatus.getEnum(couponOrderStatus).equals(EnumCouponOrderStatus.COUPON_ORDER_USED)){ | |||||
| return EnumTtPoiOrderStatus.ORDER_STATUS_340; | |||||
| } | |||||
| if(EnumCouponOrderStatus.getEnum(couponOrderStatus).equals(EnumCouponOrderStatus.COUPON_ORDER_OVER_TIME)){ | |||||
| return EnumTtPoiOrderStatus.ORDER_STATUS_420; | |||||
| } | |||||
| return EnumTtPoiOrderStatus.ORDER_STATUS_310; | |||||
| } | |||||
| else if(EnumOrderStatus.getEnum(orderStatus).equals(EnumOrderStatus.ORDER_STATUS_OVERTIME_CANCEL)){ | |||||
| return EnumTtPoiOrderStatus.ORDER_STATUS_10; | |||||
| } | |||||
| else if(EnumOrderStatus.getEnum(orderStatus).equals(EnumOrderStatus.ORDER_STATUS_PENDING_REFUND)){ | |||||
| return EnumTtPoiOrderStatus.ORDER_STATUS_410; | |||||
| } | |||||
| else if(EnumOrderStatus.getEnum(orderStatus).equals(EnumOrderStatus.ORDER_STATUS_REFUND_SUCCESS)){ | |||||
| return EnumTtPoiOrderStatus.ORDER_STATUS_420; | |||||
| } | |||||
| else if(EnumOrderStatus.getEnum(orderStatus).equals(EnumOrderStatus.ORDER_STATUS_REFUND_FAILD)){ | |||||
| return EnumTtPoiOrderStatus.ORDER_STATUS_430; | |||||
| } | |||||
| log.error("订单状态异常 。。。"); | |||||
| throw new Exception("订单状态异常"); | |||||
| } | |||||
| private String getOrderEntrySchema(String appid,Long batchOrderId){ | |||||
| Map<String,String> map = new HashMap<>(); | |||||
| map.put("app_id",appid); | |||||
| map.put("path", Constant.mainPageUrl); | |||||
| Map<String,Object> paramMap = new HashMap<>(); | |||||
| paramMap.put("type","dt"); | |||||
| paramMap.put("orderId",batchOrderId); | |||||
| map.put("params",JSON.toJSONString(paramMap)); | |||||
| return JSON.toJSONString(map); | |||||
| } | |||||
| private String getGoodsEntrySchema(String appid,Long couponChannelId){ | |||||
| Map<String,String> map = new HashMap<>(); | |||||
| map.put("app_id",appid); | |||||
| map.put("path", Constant.mainPageUrl); | |||||
| Map<String,Object> paramMap = new HashMap<>(); | |||||
| paramMap.put("type","cd"); | |||||
| paramMap.put("couponChannelId",couponChannelId); | |||||
| map.put("params",JSON.toJSONString(paramMap)); | |||||
| return JSON.toJSONString(map); | |||||
| } | |||||
| @Override | @Override | ||||
| public File getQrcode(WxAppinfo appinfo,String pageUrl,int type,String sceneParam) throws Exception{ | public File getQrcode(WxAppinfo appinfo,String pageUrl,int type,String sceneParam) throws Exception{ | ||||
| return super.getQrCode(appinfo, pageUrl, type, sceneParam); | return super.getQrCode(appinfo, pageUrl, type, sceneParam); | ||||
| @@ -77,4 +77,17 @@ | |||||
| where id = #{id} | where id = #{id} | ||||
| </update> | </update> | ||||
| <select id="getPoiPutOnCount" resultType="Integer"> | |||||
| select count(1) | |||||
| from tt_coupon_channel_poi | |||||
| where is_del = 0 | |||||
| and `tenant_id` = #{tenantId} | |||||
| and `status` = 1 | |||||
| and `id` in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||
| @@ -9,12 +9,13 @@ | |||||
| <result column="payment" jdbcType="INTEGER" property="payment"/> | <result column="payment" jdbcType="INTEGER" property="payment"/> | ||||
| <result column="pay_vendor" jdbcType="INTEGER" property="payVendor"/> | <result column="pay_vendor" jdbcType="INTEGER" property="payVendor"/> | ||||
| <result column="order_type" jdbcType="INTEGER" property="payVendor"/> | <result column="order_type" jdbcType="INTEGER" property="payVendor"/> | ||||
| <result column="is_tt_poi_order" jdbcType="INTEGER" property="isTtPoiOrder"/> | |||||
| <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> | <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> | ||||
| <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> | <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> | ||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`c_user_id`,`payment`,`pay_vendor`,`order_type`,`create_date`,`update_date` | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`c_user_id`,`payment`,`pay_vendor`,`order_type`,`is_tt_poi_order`,`create_date`,`update_date` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||