瀏覽代碼

fix 模板编辑

he2802 3 年之前
父節點
當前提交
7b57b281aa

+ 1 - 1
zhongzheng-api/src/main/java/com/zhongzheng/controller/user/UserBankRecordController.java

@@ -85,7 +85,7 @@ public class UserBankRecordController extends BaseController {
     public AjaxResult<Void> addPhoto(@RequestBody UserStudyRecordPhotoAddBo bo) {
         ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
         bo.setUserId(loginUser.getUser().getUserId());
-        return toAjax(userStudyRecordPhotoService.insertByAddBo(bo) ? 1 : 0);
+        return toAjax(userStudyRecordPhotoService.insertExamByAddBo(bo) ? 1 : 0);
     }
 
     /**

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionServiceImpl.java

@@ -391,7 +391,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                 return value;
             }
             CourseEducationType info = iCourseEducationTypeService.getOne(new LambdaQueryWrapper<CourseEducationType>()
-                    .eq(CourseEducationType::getEducationName,edu));
+                    .eq(CourseEducationType::getEducationName,edu).eq(CourseEducationType::getStatus,1).last("limit 1"));
             if(info!=null){
                 redisCache.setCacheObject(key,info.getId(),3, TimeUnit.MINUTES);//3分钟
                 return info.getId();

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/vo/GoodsUserVo.java

@@ -291,4 +291,6 @@ public class GoodsUserVo {
 	private Long orderGoodsId;
 	@ApiModelProperty("资料审核状态  1通过 3不通过 2待审")
 	private Long profileStatus;
+	@ApiModelProperty("资料审核模板  1有 0没有")
+	private Long profileTpStatus;
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserStudyRecordPhotoService.java

@@ -35,6 +35,8 @@ public interface IUserStudyRecordPhotoService extends IService<UserStudyRecordPh
 	 */
 	Boolean insertByAddBo(UserStudyRecordPhotoAddBo bo);
 
+	Boolean insertExamByAddBo(UserStudyRecordPhotoAddBo bo);
+
 	/**
 	 * 根据编辑业务对象修改学习拍摄照片
 	 * @param bo 学习拍摄照片编辑业务对象

+ 9 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserStudyRecordPhotoServiceImpl.java

@@ -77,6 +77,15 @@ public class UserStudyRecordPhotoServiceImpl extends ServiceImpl<UserStudyRecord
 
     @Override
     public Boolean insertByAddBo(UserStudyRecordPhotoAddBo bo) {
+        UserStudyRecordPhoto add = BeanUtil.toBean(bo, UserStudyRecordPhoto.class);
+        validEntityBeforeSave(add);
+        add.setCreateTime(DateUtils.getNowTime());
+        add.setUpdateTime(DateUtils.getNowTime());
+        return this.save(add);
+    }
+
+    @Override
+    public Boolean insertExamByAddBo(UserStudyRecordPhotoAddBo bo) {
         UserBankRecordVo userBankRecord = iUserBankRecordService.queryById(bo.getRecordId());
         if(Validator.isEmpty(userBankRecord)){
             throw new CustomException("记录ID数据错误");

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserStudyRecordServiceImpl.java

@@ -402,6 +402,8 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
             userStudyRecordPhotoAddBo.setPhoto(bo.getPhoto());
             userStudyRecordPhotoAddBo.setRecordId(entity.getRecordId());
             userStudyRecordPhotoAddBo.setPeriodId(periodId);
+            userStudyRecordPhotoAddBo.setStatus(1);
+            userStudyRecordPhotoAddBo.setUserId(entity.getUserId());
             userStudyRecordPhotoService.insertByAddBo(userStudyRecordPhotoAddBo);
         }
     }

+ 1 - 0
zhongzheng-system/src/main/resources/mapper/modules/course/CourseMapper.xml

@@ -171,6 +171,7 @@
         <result property="courseNum" column="course_num"/>
         <result property="orderGoodsId" column="order_goods_id"/>
         <result property="profileStatus" column="profile_status"/>
+        <result property="profileTpStatus" column="profile_tp_status"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.grade.vo.ClassGradeVo" id="ClassGradeVoResult">