|
|
@@ -5,6 +5,7 @@ import java.util.Calendar;
|
|
|
import java.util.UUID;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
@@ -22,6 +23,7 @@ import com.goafanti.common.constant.ErrorConstants;
|
|
|
import com.goafanti.common.controller.CertifyApiController;
|
|
|
import com.goafanti.common.enums.AchievementAuditStatus;
|
|
|
import com.goafanti.common.enums.AdminFields;
|
|
|
+import com.goafanti.common.enums.AttachmentType;
|
|
|
import com.goafanti.common.enums.CertifySubmitType;
|
|
|
import com.goafanti.common.enums.IdentityAuditStatus;
|
|
|
import com.goafanti.common.enums.IdentityProcess;
|
|
|
@@ -452,6 +454,24 @@ public class AdminApiController extends CertifyApiController {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 管理员上传用户图片
|
|
|
+ * @param req
|
|
|
+ * @param sign
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/uploadPicture", method = RequestMethod.POST)
|
|
|
+ public Result uploadPicture(HttpServletRequest req, String sign,String aid) {
|
|
|
+ Result res = new Result();
|
|
|
+ AttachmentType attachmentType = AttachmentType.getField(sign);
|
|
|
+ if (attachmentType == AttachmentType.USER_PICTURE) {
|
|
|
+ res.setData(handleFiles(res, "/user/", false, req, sign, aid));
|
|
|
+ } else {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|