me.chanjar.weixin.cp.api.impl.WxCpTaskCardServiceImpl Maven / Gradle / Ivy
package me.chanjar.weixin.cp.api.impl;
import lombok.RequiredArgsConstructor;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
import me.chanjar.weixin.cp.api.WxCpService;
import me.chanjar.weixin.cp.api.WxCpTaskCardService;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.TaskCard.*;
/**
*
* 任务卡片管理接口.
* Created by Jeff on 2019-05-16.
*
*
* @author Jeff
* @date 2019-05-16
*/
@RequiredArgsConstructor
public class WxCpTaskCardServiceImpl implements WxCpTaskCardService {
private final WxCpService mainService;
@Override
public void update(List userIds, String taskId, String clickedKey) throws WxErrorException {
Integer agentId = this.mainService.getWxCpConfigStorage().getAgentId();
Map data = new HashMap<>(4);
data.put("userids", userIds);
data.put("agentid", agentId);
data.put("task_id", taskId);
data.put("clicked_key", clickedKey);
String url = this.mainService.getWxCpConfigStorage().getApiUrl(UPDATE_TASK_CARD);
this.mainService.post(url, WxGsonBuilder.create().toJson(data));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy