|
|
|
@ -1,7 +1,10 @@
|
|
|
|
|
package com.sztzjy.marketing.controller.stu;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
|
import com.alibaba.excel.EasyExcel;
|
|
|
|
|
import com.sztzjy.marketing.annotation.AnonymousAccess;
|
|
|
|
|
import com.sztzjy.marketing.entity.StuTableName;
|
|
|
|
|
import com.sztzjy.marketing.entity.StuTableNameExample;
|
|
|
|
|
import com.sztzjy.marketing.entity.StuUploadExcelUser;
|
|
|
|
@ -9,6 +12,7 @@ import com.sztzjy.marketing.entity.dto.StuUserProfileDto;
|
|
|
|
|
import com.sztzjy.marketing.mapper.StuTableNameMapper;
|
|
|
|
|
import com.sztzjy.marketing.mapper.StuUploadExcelUserMapper;
|
|
|
|
|
import com.sztzjy.marketing.service.StuUserProfileDatabaseService;
|
|
|
|
|
import com.sztzjy.marketing.util.HttpUtils;
|
|
|
|
|
import com.sztzjy.marketing.util.ResultEntity;
|
|
|
|
|
import com.sztzjy.marketing.util.excel.DemoDataListener;
|
|
|
|
|
import com.sztzjy.marketing.util.file.IFileUtil;
|
|
|
|
@ -58,7 +62,6 @@ public class StuUserProfileDatabaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getBaseInfoBySelect")
|
|
|
|
|
//@AnonymousAccess
|
|
|
|
|
@ApiOperation("条件查询用户表信息")
|
|
|
|
@ -81,7 +84,6 @@ public class StuUserProfileDatabaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//导入外部Excel格式的数据
|
|
|
|
|
@ApiOperation("外部excel上传")
|
|
|
|
|
@PostMapping("/uploadExcel")
|
|
|
|
@ -117,5 +119,30 @@ public class StuUserProfileDatabaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("外部excel上传")
|
|
|
|
|
@PostMapping("/readInfo")
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
public ResultEntity readInfo(String text, String userId) throws IOException {
|
|
|
|
|
|
|
|
|
|
String url = "http://wbdsj.sztzjy.com/prod-api/makesoft/report/sentiment";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject entries = HttpUtils.sendPost(url, text, null, null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String str = entries.getStr("respString");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 将字符串解析为JSONObject
|
|
|
|
|
JSONObject jsonObject = JSONUtil.parseObj(str);
|
|
|
|
|
|
|
|
|
|
// 获取 data 字段的值
|
|
|
|
|
String data = jsonObject.getStr("data");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, "成功", data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|