|
|
@@ -1,5 +1,6 @@
|
|
|
package com.goafanti.business.controller;
|
|
|
|
|
|
+import java.util.Base64;
|
|
|
import java.util.Date;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
@@ -21,6 +22,7 @@ import com.goafanti.common.model.JtBusinessCategory;
|
|
|
import com.goafanti.common.model.JtBusinessProject;
|
|
|
import com.goafanti.common.model.JtTag;
|
|
|
import com.goafanti.common.utils.StringUtils;
|
|
|
+import com.goafanti.core.shiro.token.TokenManager;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping(value = "/api/user/jtBusiness")
|
|
|
@@ -154,6 +156,19 @@ public class UserJtBusinessController extends CertifyApiController{
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
+ @RequestMapping(value = "/project/uploadPicture64", method = RequestMethod.POST)
|
|
|
+ public Result uploadProjectPicture64(String picturebase, String filename,String sign) {
|
|
|
+ Result res = new Result();
|
|
|
+ byte[] bs=Base64.getDecoder().decode(picturebase);
|
|
|
+ AttachmentType attachmentType = AttachmentType.getField(sign);
|
|
|
+ if (attachmentType == AttachmentType.JT_PROJECT_PICTURE) {
|
|
|
+ //res.setData(handleFiles(res, "/jtProjects/", false, req, sign, ""));
|
|
|
+ res.setData(handleBaseFiles(res, "/jtProjects/", false,bs, sign, TokenManager.getUserId(),filename));
|
|
|
+ } else {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "图片"));
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
/*
|
|
|
* 查询品类
|