Commit ae8cd1a4 authored by shiyu's avatar shiyu

消息格式变化

parent dafbbb50
......@@ -70,4 +70,37 @@ public class MessageEnum {
}
public enum contentIdTypeEnum {
ITEM(0, "商品"),
COLLECTION_BOOK(1, "收藏册"),
HOMEPAGE(2, "主页"),
;
private int code;
private String des;
contentIdTypeEnum(int code, String des) {
this.code = code;
this.des = des;
}
public static String getNameByCode(int code) {
for (contentIdTypeEnum contentIdTypeEnum : contentIdTypeEnum.values()) {
if (code == contentIdTypeEnum.getCode()) {
return contentIdTypeEnum.getDes();
}
}
return null;
}
public int getCode() {
return code;
}
public String getDes() {
return des;
}
}
}
package com.wwdz.ch.wx.entity;
import com.xxdxxs.entity.Entity;
import lombok.Data;
@Data
public class MessageContentText implements Entity {
/**
* 消息内容中的id
* (商品id,收藏册id,主页id)
*/
private Long id;
/**
* 消息类型
* 对应enum
*/
private Integer idType;
/**
* 消息文字内容
*/
private String text;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment