|
@@ -5,9 +5,12 @@ import cn.hutool.core.convert.Convert;
|
|
|
import cn.hutool.core.lang.Validator;
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.zhongzheng.common.core.redis.RedisCache;
|
|
|
import com.zhongzheng.common.core.redis.RedisLockEntity;
|
|
|
import com.zhongzheng.common.exception.CustomException;
|
|
|
+import com.zhongzheng.common.utils.AES;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
@@ -31,7 +34,9 @@ import com.zhongzheng.modules.user.service.IUserStudyRecordPhotoService;
|
|
|
import com.zhongzheng.modules.user.service.IUserStudyRecordService;
|
|
|
import com.zhongzheng.modules.user.vo.SubjectStudyRecordVo;
|
|
|
import com.zhongzheng.modules.user.vo.UserStudyRecordPhotoVo;
|
|
|
+import org.apache.commons.codec.binary.Base64;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -89,6 +94,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
@Autowired
|
|
|
private IClassGradeUserService iClassGradeUserService;
|
|
|
|
|
|
+ @Value("${aliyun.oss.endpoint}")
|
|
|
+ private String ALIYUN_OSS_ENDPOINT;
|
|
|
+
|
|
|
@Override
|
|
|
public ClassGradeUserVo queryById(Long id){
|
|
|
ClassGradeUser db = this.baseMapper.selectById(id);
|
|
@@ -373,6 +381,32 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
//查找开始学习时间
|
|
|
classPeriodStudentVo.setStartTime(baseMapper.selectStart(classPeriodStudentVo.getUserId(),classPeriodStudentVo.getGoodsId(),classPeriodStudentVo.getGradeId()).get(0));
|
|
|
}
|
|
|
+ if(Validator.isNotEmpty(bo.getUserPhoto())&&bo.getUserPhoto()==1){
|
|
|
+ //解析身份证和一寸照
|
|
|
+ if(Validator.isNotEmpty(classPeriodStudentVo.getKeyValue())){
|
|
|
+ JSONObject keyJSON = null;
|
|
|
+ try {
|
|
|
+ keyJSON = JSON.parseObject(classPeriodStudentVo.getKeyValue());
|
|
|
+ if(keyJSON.containsKey("recent_photos")){
|
|
|
+ String recent_photos_data = keyJSON.getString("recent_photos");
|
|
|
+ JSONObject recent_photos_jsondata= JSON.parseObject(recent_photos_data);
|
|
|
+ String recent_photos = recent_photos_jsondata.getString("value");
|
|
|
+ classPeriodStudentVo.setOneInchPhotos(ALIYUN_OSS_ENDPOINT+"/"+recent_photos);
|
|
|
+ }
|
|
|
+ if(keyJSON.containsKey("idcard_face_photo")){
|
|
|
+ String idcard_face_photo_data = keyJSON.getString("idcard_face_photo");
|
|
|
+ JSONObject idcard_face_photo_jsondata= JSON.parseObject(idcard_face_photo_data);
|
|
|
+ String idcard_face_photo = idcard_face_photo_jsondata.getString("value");
|
|
|
+ classPeriodStudentVo.setIdCardImg1(ALIYUN_OSS_ENDPOINT+"/"+idcard_face_photo);
|
|
|
+ }
|
|
|
+ classPeriodStudentVo.setKeyValue(null);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
ClassPeriodStudentExportVo addItem = BeanUtil.toBean(classPeriodStudentVo, ClassPeriodStudentExportVo.class);
|
|
|
|
|
|
List<UserPeriodVo> periodVoList = new ArrayList<>();
|
|
@@ -514,6 +548,31 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
//查找开始学习时间
|
|
|
classPeriodStudentVo.setStartTime(baseMapper.selectStart(classPeriodStudentVo.getUserId(),classPeriodStudentVo.getGoodsId(),classPeriodStudentVo.getGradeId()).get(0));
|
|
|
}
|
|
|
+
|
|
|
+ if(Validator.isNotEmpty(bo.getUserPhoto())&&bo.getUserPhoto()==1){
|
|
|
+ //解析身份证和一寸照
|
|
|
+ if(Validator.isNotEmpty(classPeriodStudentVo.getKeyValue())){
|
|
|
+ JSONObject keyJSON = null;
|
|
|
+ try {
|
|
|
+ keyJSON = JSON.parseObject(classPeriodStudentVo.getKeyValue());
|
|
|
+ if(keyJSON.containsKey("recent_photos")){
|
|
|
+ String recent_photos_data = keyJSON.getString("recent_photos");
|
|
|
+ JSONObject recent_photos_jsondata= JSON.parseObject(recent_photos_data);
|
|
|
+ String recent_photos = recent_photos_jsondata.getString("value");
|
|
|
+ classPeriodStudentVo.setOneInchPhotos(recent_photos);
|
|
|
+ }
|
|
|
+ if(keyJSON.containsKey("idcard_face_photo")){
|
|
|
+ String idcard_face_photo_data = keyJSON.getString("idcard_face_photo");
|
|
|
+ JSONObject idcard_face_photo_jsondata= JSON.parseObject(idcard_face_photo_data);
|
|
|
+ String idcard_face_photo = idcard_face_photo_jsondata.getString("value");
|
|
|
+ classPeriodStudentVo.setIdCardImg1(idcard_face_photo);
|
|
|
+ }
|
|
|
+ classPeriodStudentVo.setKeyValue(null);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return classPeriodStudentVos;
|
|
|
}
|