| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- package com.cyksj.model.entity;
- import com.baomidou.mybatisplus.annotation.TableField;
- import com.baomidou.mybatisplus.annotation.TableName;
- import lombok.Data;
- import lombok.Getter;
- import lombok.experimental.Accessors;
- import org.apache.commons.lang3.StringUtils;
- import java.io.Serializable;
- import java.util.stream.Stream;
- @TableName(value ="order_don_post")
- @Data
- @Accessors(chain = true)
- public class OrderDonPost extends BaseEntity implements Serializable {
- /**
- *
- */
- private Long orderId;
- /**
- * 回传参数
- */
- private String callback;
- /**
- * 状态 true 已回传 false 未回传
- */
- private Boolean status;
- /**
- * Ks 快手 Dy抖音
- */
- private Type type;
- /**
- * 回传类型
- */
- private String evenType;
- @TableField(exist = false)
- private static final long serialVersionUID = 1L;
- /**
- * 回传渠道类型
- */
- @Getter
- public enum Type {
- /**
- * 抖音
- */
- DY("抖音回传", "Dy", "2"),
- /**
- * 微信
- */
- WeChat("微信回传", "WeChat", "PURCHASE"),
- /**
- * adq
- */
- adq("腾讯回传", "adq", "PURCHASE"),
- /**
- * 360点睛
- */
- DJ("360点睛", "dj","ORDER"),
- /**
- * 百度
- */
- BaiDu("百度回传", "BaiDu", "3"),
- /**
- * oceanengine回传
- */
- OE("巨量回传","OE","active_pay"),
- ;
- /**
- * 描述
- */
- private String desc;
- /**
- * 回传类型
- */
- private String type;
- /**
- * 类型 表单提交
- */
- private String evenType;
- Type(String desc, String type, String evenType) {
- this.desc = desc;
- this.type = type;
- this.evenType = evenType;
- }
- /**
- * 根据type 获取
- *
- * @param type
- * @return
- */
- @SuppressWarnings("rawtypes")
- public static Type getByType(String type) {
- return Stream.of(Type.values())
- .filter((enums) -> enums.getType().equals(type)).findFirst().get();
- }
- /**
- * 根据type
- *
- * @param type
- * @return
- */
- @SuppressWarnings("rawtypes")
- public static Boolean verify(String type) {
- if (StringUtils.isBlank(type)) {
- return Boolean.FALSE;
- }
- return Stream.of(Type.values())
- .anyMatch((enums) -> enums.getType().equals(type));
- }
- }
- }
|