|
|
@@ -28,6 +28,29 @@ import com.goafanti.common.utils.StringUtils;
|
|
|
public class AdminAchievementApiController extends CertifyApiController {
|
|
|
@Resource
|
|
|
private AchievementService achievementService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 需求资料--文本文件上传
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/uploadTextFile", method = RequestMethod.POST)
|
|
|
+ public Result uploadTextFile(HttpServletRequest req, String sign, String uid) {
|
|
|
+ Result res = new Result();
|
|
|
+
|
|
|
+ if (StringUtils.isBlank(uid)) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户ID", "用户ID"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ AttachmentType attachmentType = AttachmentType.getField(sign);
|
|
|
+
|
|
|
+ if (attachmentType == AttachmentType.DEMAND_TEXT_FILE) {
|
|
|
+ res.setData(handleFiles(res, "/achievement/", false, req, sign, "achievement"));
|
|
|
+ } else {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 图片上传
|