All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.chanjar.weixin.cp.api.impl.WxCpTaskCardServiceImpl Maven / Gradle / Ivy

The newest version!
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;

/**
 * 
 *  任务卡片管理接口.
 *  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 = "https://qyapi.weixin.qq.com/cgi-bin/message/update_taskcard"; this.mainService.post(url, WxGsonBuilder.create().toJson(data)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy