Commit 46263ca6 authored by luzhuang's avatar luzhuang

更新代码

parent adbf1721
......@@ -247,7 +247,13 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
@ResultMap(value = "BaseResultMap")
BLessonPerson selectById(String businessId);
@Select("select * from b_lesson_person where lesson_id = #{lessonId} and person_id = #{personId}")
/**
* 查询该用户在此培训中不删除的状态
* @param lessonId
* @param personId
* @return
*/
@Select("select * from b_lesson_person where lesson_id = #{lessonId} and person_id = #{personId} and del_flag != 1 ")
BLessonPerson getAppointInTraining(@Param("lessonId")String lessonId ,@Param("personId")String personId );
......@@ -262,4 +268,13 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
@ResultMap(value = "BaseResultMap")
List<BLessonPerson> trainPersons(@Param("param") FindTrainPersonDTO param);
/**
* 用户在表中有未删除的数据且未报名
* 更新 报名状态、报名时间、培训状态
* @return
*/
@Update("update b_lesson_person set apply_date=#{applyDate},is_apply =#{isApplay},train_is_sign = #{trainIsSign} " +
"where lesson_id= #{lessonId} and person_id=#{personId} and del_flag != 1 ")
int updateLessonPersonByUserId(BLessonPerson lessonPerson);
}
......@@ -793,8 +793,9 @@ public class BLessonServiceImpl implements BLessonService {
return 1;
}
UserUtil.setCurrentMergeOperation(person);
person.setTrainIsSign("0");
person.setIsApply("1");
return bLessonPersonRepository.updateByPrimaryKey(person);
return bLessonPersonRepository.updateLessonPersonByUserId(person);
} else {
UserUtil.setCurrentPersistOperation(bLessonPerson);
bLessonPerson.setPersonId(curUser.getUserId());
......
......@@ -58,6 +58,17 @@ public class SysUserServiceImpl implements SysUserService {
@Override
public List<SysUser> queryUsersByPagination(PageUtil pageUtil, QuerySysUserDTO dto) {
List<SysUser> users = this.qusers(dto);
return users;
}
/**
* 添加用户对应的 部门和岗位
* @param dto
* @return
*/
public List<SysUser> qusers(QuerySysUserDTO dto){
List<SysUser> users = sysUserMapper.queryUsers(dto);
List<String> list = new ArrayList<>();
for (SysUser user : users) {
......@@ -99,8 +110,7 @@ public class SysUserServiceImpl implements SysUserService {
return usersForDept;
}
return users;
return users;
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment