|
@@ -5,6 +5,11 @@ import cn.hutool.core.lang.Validator;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.zhongzheng.common.exception.CustomException;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
+import com.zhongzheng.modules.user.domain.UserBankRecord;
|
|
|
+import com.zhongzheng.modules.user.mapper.UserBankQuestionRecordMapper;
|
|
|
+import com.zhongzheng.modules.user.service.IUserBankRecordService;
|
|
|
+import com.zhongzheng.modules.user.vo.UserBankRecordVo;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -32,6 +37,9 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class UserStudyRecordPhotoServiceImpl extends ServiceImpl<UserStudyRecordPhotoMapper, UserStudyRecordPhoto> implements IUserStudyRecordPhotoService {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IUserBankRecordService iUserBankRecordService;
|
|
|
+
|
|
|
@Override
|
|
|
public UserStudyRecordPhotoVo queryById(Long id){
|
|
|
UserStudyRecordPhoto db = this.baseMapper.selectById(id);
|
|
@@ -69,6 +77,10 @@ public class UserStudyRecordPhotoServiceImpl extends ServiceImpl<UserStudyRecord
|
|
|
|
|
|
@Override
|
|
|
public Boolean insertByAddBo(UserStudyRecordPhotoAddBo bo) {
|
|
|
+ UserBankRecordVo userBankRecord = iUserBankRecordService.queryById(bo.getRecordId());
|
|
|
+ if(Validator.isEmpty(userBankRecord)){
|
|
|
+ throw new CustomException("记录ID数据错误");
|
|
|
+ }
|
|
|
if(Validator.isEmpty(bo.getRecordId())||Validator.isEmpty(bo.getPhoto())){
|
|
|
throw new CustomException("拍照数据错误");
|
|
|
}
|