提交邮件配置功能代码

Signed-off-by: zhangwei <zhangwei@intranet.com>
This commit is contained in:
zhangwei
2018-06-04 17:29:49 +08:00
parent 1dc2ddbc59
commit 9ba7998f0c
14 changed files with 2236 additions and 18 deletions

View File

@@ -271,7 +271,7 @@ public class ConfigServiceUtil {
* @return
* @throws Exception
*/
public static ToMaatResult getFileDigest(String params,File file,Map<String, Object> fileDesc) throws MaatConvertException{
public static ToMaatResult getFileDigest(String params,File file,String fileDesc) throws MaatConvertException{
String result = null;
ToMaatResult bean = null;
String url = Constants.SERVICE_URL+Constants.FILE_DIGEST_CFG;
@@ -280,7 +280,7 @@ public class ConfigServiceUtil {
FormDataMultiPart formDataMultiPart=new FormDataMultiPart();
FileDataBodyPart bodyPart=new FileDataBodyPart("file",file);
formDataMultiPart.bodyPart(bodyPart);
Builder header = wt.request(MediaType.APPLICATION_JSON).header("File-Desc",ClientUtil.formatFileDesc(fileDesc) );
Builder header = wt.request(MediaType.APPLICATION_JSON).header("File-Desc",fileDesc);
Response response= header.post(Entity.entity(formDataMultiPart, formDataMultiPart.getMediaType()));
if( response.getStatus() == 200){
result= response.readEntity(String.class);