me.chanjar.weixin.mp.bean.shake.WxMpShakeAroundDeviceBindPageQuery Maven / Gradle / Ivy
package me.chanjar.weixin.mp.bean.shake;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import lombok.Data;
import java.util.Collection;
@Data
public class WxMpShakeAroundDeviceBindPageQuery {
private WxMpDeviceIdentifier deviceIdentifier;
private Collection pageIds;
public String toJsonString(){
JsonObject jsonObject = new JsonObject();
jsonObject.add("device_identifier", deviceIdentifier.toJsonObject());
JsonArray jsonArray = new JsonArray();
for(Integer pageid: pageIds){
jsonArray.add(pageid);
}
jsonObject.add("page_ids", jsonArray);
return jsonObject.toString();
}
}