|
@@ -11,6 +11,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.fasterxml.jackson.databind.exc.InvalidFormatException;
|
|
|
import com.openhtmltopdf.swing.Java2DRenderer;
|
|
|
import com.openhtmltopdf.util.FSImageWriter;
|
|
@@ -259,6 +260,89 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
//给模板绑定数据
|
|
|
Calendar rightNow = Calendar.getInstance();
|
|
|
Map<String, Object> bindingMap = new HashMap<>();
|
|
|
+// if (ObjectUtils.isNull(maps.get("name"))){
|
|
|
+// bindingMap.put("username", " ");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("username", JSONObject.parseObject(String.valueOf(maps.get("name")), UserProfileFit.class).getValue());
|
|
|
+// }
|
|
|
+// if (ObjectUtils.isNull(maps.get("s"))){
|
|
|
+// bindingMap.put("s", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("s", JSONObject.parseObject(String.valueOf(maps.get("sex")), UserProfileFit.class).getValue());
|
|
|
+// }
|
|
|
+// if (ObjectUtils.isNull(maps.get("post"))){
|
|
|
+// bindingMap.put("post", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("post", JSONObject.parseObject(String.valueOf(maps.get("apply_post")), UserProfileFit.class).getValue());
|
|
|
+// }
|
|
|
+// if (ObjectUtils.isNull(maps.get("idcard"))){
|
|
|
+// bindingMap.put("idcard", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("idcard", JSONObject.parseObject(String.valueOf(maps.get("idcard")), UserProfileFit.class).getValue());
|
|
|
+// }
|
|
|
+// if (ObjectUtils.isNull(maps.get("phone"))){
|
|
|
+// bindingMap.put("phone", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("phone", JSONObject.parseObject(String.valueOf(maps.get("telphone")), UserProfileFit.class).getValue());
|
|
|
+// }
|
|
|
+// if (ObjectUtils.isNull(maps.get("school"))){
|
|
|
+// bindingMap.put("school", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("school", JSONObject.parseObject(String.valueOf(maps.get("school")), UserProfileFit.class).getValue());
|
|
|
+// }
|
|
|
+// if (ObjectUtils.isNull(maps.get("edu"))){
|
|
|
+// bindingMap.put("edu", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("edu", JSONObject.parseObject(String.valueOf(maps.get("education")), UserProfileFit.class).getValue());
|
|
|
+// }
|
|
|
+// String major = maps.get("major");
|
|
|
+// if (ObjectUtils.isNull(major)){
|
|
|
+// bindingMap.put("major", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("major", JSONObject.parseObject(String.valueOf(maps.get("major")), UserProfileFit.class).getValue());
|
|
|
+// }
|
|
|
+// if (StringUtils.isBlank(maps.get("cname"))){
|
|
|
+// bindingMap.put("cname", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("cname", JSONObject.parseObject(String.valueOf(maps.get("unit_contact")), UserProfileFit.class).getValue());
|
|
|
+// }
|
|
|
+// if (ObjectUtils.isNull(maps.get("cphone"))){
|
|
|
+// bindingMap.put("cphone", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("cphone", JSONObject.parseObject(String.valueOf(maps.get("unit_tel")), UserProfileFit.class).getValue());
|
|
|
+// }
|
|
|
+// if (ObjectUtils.isNull(maps.get("image"))){
|
|
|
+// bindingMap.put("image", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("image", ALIYUN_OSS_ENDPOINT + "/" + JSONObject.parseObject(String.valueOf(maps.get("commitment_electr_signature")), UserProfileFit.class).getValue());
|
|
|
+// }
|
|
|
+// if (ObjectUtils.isNull(maps.get("y"))){
|
|
|
+// bindingMap.put("y", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("y", Convert.toStr(rightNow.get(Calendar.YEAR)));
|
|
|
+// }
|
|
|
+// if (ObjectUtils.isNull(maps.get("m"))){
|
|
|
+// bindingMap.put("m", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("m", rightNow.get(Calendar.MONTH) + 1);
|
|
|
+// }
|
|
|
+// if (ObjectUtils.isNull(maps.get("d"))){
|
|
|
+// bindingMap.put("d", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("d", rightNow.get(Calendar.DAY_OF_MONTH));
|
|
|
+// }
|
|
|
+// if (ObjectUtils.isNull(maps.get("time"))){
|
|
|
+// bindingMap.put("time", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("time", JSONObject.parseObject(String.valueOf(maps.get("graduation_time")), UserProfileFit.class).getValue());
|
|
|
+// }
|
|
|
+// if (ObjectUtils.isNull(maps.get("year"))){
|
|
|
+// bindingMap.put("year", "");
|
|
|
+// }else {
|
|
|
+// bindingMap.put("year", JSONObject.parseObject(String.valueOf(maps.get("working_years")), UserProfileFit.class).getValue());
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
bindingMap.put("username", JSONObject.parseObject(String.valueOf(maps.get("name")), UserProfileFit.class).getValue());
|
|
|
bindingMap.put("s", JSONObject.parseObject(String.valueOf(maps.get("sex")), UserProfileFit.class).getValue());
|
|
|
bindingMap.put("post", JSONObject.parseObject(String.valueOf(maps.get("apply_post")), UserProfileFit.class).getValue());
|