he2802 3 жил өмнө
parent
commit
7087e3c87f

+ 9 - 3
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java

@@ -254,10 +254,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         validEntityBeforeUpdate(update);
         validEntityBeforeUpdate(update);
         update.setUpdateTime(DateUtils.getNowTime());
         update.setUpdateTime(DateUtils.getNowTime());
         UserUpdateAddBo userUpdateAddBo = new UserUpdateAddBo();
         UserUpdateAddBo userUpdateAddBo = new UserUpdateAddBo();
+        Boolean isUpdateInfo = false;
         UserVo oldUser = queryById(bo.getUserId());
         UserVo oldUser = queryById(bo.getUserId());
         if (!StringUtils.isBlank(update.getRealname())){
         if (!StringUtils.isBlank(update.getRealname())){
-            userUpdateAddBo.setUserId(bo.getUserId());
-            userUpdateAddBo.setRealname(update.getRealname());
+            if(!oldUser.getRealname().equals(update.getRealname())){
+                userUpdateAddBo.setUserId(bo.getUserId());
+                userUpdateAddBo.setRealname(update.getRealname());
+                isUpdateInfo = true;
+            }
         }
         }
         if (!StringUtils.isBlank(update.getTelphone())){
         if (!StringUtils.isBlank(update.getTelphone())){
             //手机号变更
             //手机号变更
@@ -269,6 +273,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
                 }
                 }
                 userUpdateAddBo.setUserId(bo.getUserId());
                 userUpdateAddBo.setUserId(bo.getUserId());
                 userUpdateAddBo.setTelphone(update.getTelphone());
                 userUpdateAddBo.setTelphone(update.getTelphone());
+                isUpdateInfo = true;
             }
             }
 
 
         }
         }
@@ -281,9 +286,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
                 }
                 }
                 userUpdateAddBo.setUserId(bo.getUserId());
                 userUpdateAddBo.setUserId(bo.getUserId());
                 userUpdateAddBo.setIdCard(update.getIdCard());
                 userUpdateAddBo.setIdCard(update.getIdCard());
+                isUpdateInfo = true;
             }
             }
         }
         }
-        if (userUpdateAddBo != null) {
+        if (isUpdateInfo) {
             userUpdateService.insertByAddBo(userUpdateAddBo);
             userUpdateService.insertByAddBo(userUpdateAddBo);
         }
         }
         return this.updateById(update);
         return this.updateById(update);

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/vo/UserProfileExportGaiVo.java

@@ -68,7 +68,7 @@ public class UserProfileExportGaiVo {
 	@Excel(name = "个人近照")
 	@Excel(name = "个人近照")
 	private String recent_photos;
 	private String recent_photos;
 
 
-	@Excel(name = "身份证正面照")
+	@Excel(name = "身份证人像照")
 	private String idcard_face_photo;
 	private String idcard_face_photo;
 
 
 	@Excel(name = "身份证国徽照")
 	@Excel(name = "身份证国徽照")

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/vo/UserProfileExportVo.java

@@ -69,7 +69,7 @@ public class UserProfileExportVo {
 	@Excel(name = "个人近照")
 	@Excel(name = "个人近照")
 	private String recent_photos;
 	private String recent_photos;
 
 
-	@Excel(name = "身份证正面照")
+	@Excel(name = "身份证人像照")
 	private String idcard_face_photo;
 	private String idcard_face_photo;
 
 
 	@Excel(name = "身份证国徽照")
 	@Excel(name = "身份证国徽照")

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/bo/GoodsQueryBo.java

@@ -151,4 +151,7 @@ GoodsQueryBo extends BaseEntity {
 
 
 	@ApiModelProperty("搜索kEY")
 	@ApiModelProperty("搜索kEY")
 	private String searchKey;
 	private String searchKey;
+
+	@ApiModelProperty("获取有课程的视频商品 1获取 ")
+	private Long haveCourse;
 }
 }

+ 4 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/bo/ClassGradeQueryBo.java

@@ -35,9 +35,6 @@ public class ClassGradeQueryBo extends BaseEntity {
 	/** 排序的方向desc或者asc */
 	/** 排序的方向desc或者asc */
 	@ApiModelProperty(value = "排序的方向", example = "asc,desc")
 	@ApiModelProperty(value = "排序的方向", example = "asc,desc")
 	private String isAsc;
 	private String isAsc;
-
-
-
 	/** id */
 	/** id */
 	@ApiModelProperty("id")
 	@ApiModelProperty("id")
 	private Long gradeId;
 	private Long gradeId;
@@ -127,4 +124,8 @@ public class ClassGradeQueryBo extends BaseEntity {
 	/** 学员ID */
 	/** 学员ID */
 	@ApiModelProperty("学员ID")
 	@ApiModelProperty("学员ID")
 	private Long userId;
 	private Long userId;
+
+	/** 查找key */
+	@ApiModelProperty("searchKey")
+	private String searchKey;
 }
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/bo/ClassGradeUserQueryBo.java

@@ -141,4 +141,7 @@ public class ClassGradeUserQueryBo extends BaseEntity {
 
 
 	@ApiModelProperty("查询结束时间")
 	@ApiModelProperty("查询结束时间")
 	private Long searchEndTime;
 	private Long searchEndTime;
+
+	@ApiModelProperty("班级名称")
+	private String className;
 }
 }

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -564,13 +564,13 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
             return "班级商品不存在";
             return "班级商品不存在";
         }
         }
 
 
-        UserProfile userProfile = iUserProfileService.getOne(new LambdaQueryWrapper<UserProfile>()
+       /* UserProfile userProfile = iUserProfileService.getOne(new LambdaQueryWrapper<UserProfile>()
                 .eq(UserProfile::getUserId, bo.getUserId()).eq(UserProfile::getGoodsId, orderGoods.getGoodsId())
                 .eq(UserProfile::getUserId, bo.getUserId()).eq(UserProfile::getGoodsId, orderGoods.getGoodsId())
                 .eq(UserProfile::getCurrentStatus, 1).eq(UserProfile::getTypeStatus, 1)
                 .eq(UserProfile::getCurrentStatus, 1).eq(UserProfile::getTypeStatus, 1)
                 .last("limit 1"));
                 .last("limit 1"));
         if (Validator.isNotEmpty(userProfile) && userProfile.getStatus() != 1) {
         if (Validator.isNotEmpty(userProfile) && userProfile.getStatus() != 1) {
             return "资料审核没通过";
             return "资料审核没通过";
-        }
+        }*/
 
 
         UserStudyRecordQueryBo studyRecordQueryBo = new UserStudyRecordQueryBo();
         UserStudyRecordQueryBo studyRecordQueryBo = new UserStudyRecordQueryBo();
         studyRecordQueryBo.setUserId(bo.getUserId());
         studyRecordQueryBo.setUserId(bo.getUserId());

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/course/MajorMapper.xml

@@ -73,6 +73,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="projectId != null and projectId!=0 ">
         <if test="projectId != null and projectId!=0 ">
             AND t.id = #{projectId}
             AND t.id = #{projectId}
         </if>
         </if>
+        <if test="categoryName != null and categoryName!=0 ">
+            AND m.category_name like concat('%', #{categoryName}, '%')
+        </if>
         <if test="businessId != null and businessId!=0 ">
         <if test="businessId != null and businessId!=0 ">
             AND b.id = #{businessId}
             AND b.id = #{businessId}
         </if>
         </if>

+ 4 - 0
zhongzheng-system/src/main/resources/mapper/modules/goods/GoodsMapper.xml

@@ -210,6 +210,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND (SELECT count(*) from goods_course gc LEFT JOIN course c ON gc.course_id = c.course_id where gc.goods_id = g.goods_id and c.`status` = 1
             AND (SELECT count(*) from goods_course gc LEFT JOIN course c ON gc.course_id = c.course_id where gc.goods_id = g.goods_id and c.`status` = 1
             AND c.subject_id = #{subjectId}) >0
             AND c.subject_id = #{subjectId}) >0
         </if>
         </if>
+        <if test="goodsType ==1 and haveCourse != null and haveCourse == 1">
+            AND (SELECT count(*) from goods_course gc LEFT JOIN course c ON gc.course_id = c.course_id where gc.goods_id = g.goods_id and c.`status` = 1
+            ) >0
+        </if>
         <if test="goodsType ==2 and subjectId >0">
         <if test="goodsType ==2 and subjectId >0">
             AND g.goods_id in(
             AND g.goods_id in(
             SELECT
             SELECT

+ 24 - 0
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeMapper.xml

@@ -186,6 +186,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="gradeId != null and gradeId !=0 ">
         <if test="gradeId != null and gradeId !=0 ">
             AND g.grade_id =  #{gradeId}
             AND g.grade_id =  #{gradeId}
         </if>
         </if>
+        <if test="searchKey != null and searchKey !='' ">
+            AND ((g.class_name like concat('%', #{searchKey}, '%')) or (
+            SELECT
+            COUNT(*)
+            FROM
+            class_grade_user cgu
+            LEFT JOIN `user` u ON cgu.user_id = u.user_id
+            WHERE
+            g.grade_id = cgu.grade_id
+            AND u.realname  like concat('%', #{searchKey}, '%')
+            ) >0 or (
+            SELECT
+            COUNT(*)
+            FROM
+            class_grade_goods s
+            LEFT JOIN goods d ON s.goods_id = d.goods_id
+            WHERE
+            g.grade_id = s.grade_id
+            AND d.goods_name  like concat('%', #{searchKey}, '%')
+            ) >0)
+        </if>
+        <if test="classStatus != null and classStatus !='' ">
+            AND g.class_status =  #{classStatus}
+        </if>
         <if test="className != null and className !='' ">
         <if test="className != null and className !='' ">
             AND g.class_name like concat('%', #{className}, '%')
             AND g.class_name like concat('%', #{className}, '%')
         </if>
         </if>

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -381,6 +381,9 @@
         <if test="studyStatus != null and studyStatus == 2 ">
         <if test="studyStatus != null and studyStatus == 2 ">
             and cgu.period_status != -1
             and cgu.period_status != -1
         </if>
         </if>
+        <if test="className != null and className !='' ">
+            and  cg.class_name like concat('%', #{className}, '%')
+        </if>
         <if test="searchKey != null and searchKey != '' ">
         <if test="searchKey != null and searchKey != '' ">
             and (u.realname like concat('%', #{searchKey}, '%') or u.id_card like concat('%', #{searchKey}, '%') or g.goods_name like concat('%', #{searchKey}, '%') or cg.class_name like concat('%', #{searchKey}, '%'))
             and (u.realname like concat('%', #{searchKey}, '%') or u.id_card like concat('%', #{searchKey}, '%') or g.goods_name like concat('%', #{searchKey}, '%') or cg.class_name like concat('%', #{searchKey}, '%'))
         </if>
         </if>