|
...
|
...
|
@@ -9,10 +9,7 @@ import com.zhonglai.luhui.api.controller.test.dto.ClueData; |
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import org.springframework.util.StreamUtils;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import java.io.IOException;
|
|
...
|
...
|
@@ -77,6 +74,20 @@ public class TestController { |
|
|
|
"}";
|
|
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("获取飞书多维表格数据")
|
|
|
|
@RequestMapping(value = "getFeishuTable/{app_token}/{table_id}")
|
|
|
|
public String getFeishuTable(@PathVariable String app_token, @PathVariable String table_id) throws IOException {
|
|
|
|
String str = FeishuUtil.getFeishuTable(FeishuUtil.gettenant_access_token("cli_a88a14d3b279d01c","Z3hpYKHeR1yR2aiv6Rp0mcnwKvehkzmT"),app_token,table_id);
|
|
|
|
if(null != str)
|
|
|
|
{
|
|
|
|
return str;
|
|
|
|
}
|
|
|
|
return "{\n" +
|
|
|
|
" \"code\": \"500\",\n" +
|
|
|
|
" \"message\": \"数据查询失败\"\n" +
|
|
|
|
"}";
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
String jsr= "{\"store_id\":0,\"create_time\":\"1746668144\",\"gender\":\"未知\",\"action_type\":3,\"telephone\":\"18061271693\",\"promotion_id\":0,\"clue_source\":5,\"store_pack_id\":0,\"refer_dy_id\":\"2046931013\",\"app_name\":\"暂未获取到\",\"ad_id\":\"0\",\"module_id\":\"1805421364269097\",\"flow_type\":1,\"name\":\"未命名\",\"site_id\":\"0\",\"remark_dict\":{},\"adv_id\":\"0\",\"clue_type\":2,\"location\":\"山东+泰安\",\"id\":\"7501883876034215974\",\"module_name\":\"官方电话\",\"clue_convert_status\":\"外部流量\",\"refer_dy_name\":\"鱼儿乐>智慧渔业系统\"}";
|
|
|
|
ClueData clueData = GsonConstructor.get().fromJson(jsr, ClueData.class);
|
|
...
|
...
|
@@ -96,7 +107,7 @@ public class TestController { |
|
|
|
field.put("线索时间",Integer.parseInt(clueData.getCreate_time())*1000l);
|
|
|
|
field.put("账号",clueData.getRefer_dy_name());
|
|
|
|
field.put("联系方式",clueData.getTelephone());
|
|
|
|
field.put("渠道","测试数据看到请删除");
|
|
|
|
field.put("渠道","抖音平台");
|
|
|
|
// field.addProperty("地区",clueData.getLocation());
|
|
|
|
FeishuUtil.subFeishuTables(FeishuUtil.gettenant_access_token("cli_a88a14d3b279d01c","Z3hpYKHeR1yR2aiv6Rp0mcnwKvehkzmT"),"VLGDbZTtPaJIrgsAzzJcyb8Vnve","tblgzxv9TNwKjUFv",field);
|
|
|
|
}
|
...
|
...
|
|