个人中心更新资料

hehai
mzh820631607 4 years ago
parent a9a9c3c0fe
commit 601ab3a545
  1. 2
      src/main/java/com/msdw/tms/api/UserControllerApi.java
  2. 6
      src/main/java/com/msdw/tms/controller/UserController.java
  3. 2
      src/main/java/com/msdw/tms/dao/UserDao.java
  4. 4
      src/main/java/com/msdw/tms/entity/EvaluationQuestionEntity.java
  5. 2
      src/main/java/com/msdw/tms/service/UserService.java
  6. 4
      src/main/java/com/msdw/tms/service/impl/UserServiceImpl.java
  7. 2
      src/main/resources/mapper/tms/EvaluationQuestionDao.xml
  8. 7
      src/main/resources/mapper/tms/UserDao.xml

@ -13,7 +13,7 @@ import java.util.List;
public interface UserControllerApi {
@ApiOperation(value = "个人中心信息展示",notes = "个人中心信息展示")
R userInfo(Integer id, List<Integer> personalFileId);
R userInfo(Integer id);
@ApiOperation(value = "个人中心信息修改",notes = "个人中心信息修改")
R update(UserProsonalEntityVo userProsonalEntityVo);

@ -46,10 +46,10 @@ public class UserController implements UserControllerApi {
}
@Override
@PostMapping("/userinfo/{id}")
public R userInfo(@PathVariable("id") Integer id,@RequestBody List<Integer> personalFileId){
@GetMapping("/userinfo/{id}")
public R userInfo(@PathVariable("id") Integer id){
HashMap<String,UserProsonalEntityVo> userEntityVoList = userService.queryUserInfo(id,personalFileId);
HashMap<String,UserProsonalEntityVo> userEntityVoList = userService.queryUserInfo(id);
// UserEntityVo userEntityVo = userService.queryUserId(id);
return R.ok().put("data",userEntityVoList);
}

@ -15,6 +15,6 @@ public interface UserDao extends BaseMapper<UserEntity> {
void updateUserPersonal(UserEntityVo vo);
List<UserProsonalEntityVo> queryPersonalFile(Integer userid,List<Integer> personalFileId);
List<UserProsonalEntityVo> queryPersonalFile(Integer userid);
List<UserProsonalEntityVo> queryUserInfo(Integer userid);
}

@ -55,9 +55,5 @@ public class EvaluationQuestionEntity implements Serializable {
* 试题得分
*/
private Integer questionScore;
/**
* 测评类型(0虚拟仿真实验1教学实验)
*/
private Integer type;
}

@ -18,5 +18,5 @@ public interface UserService extends IService<UserEntity> {
void updateUserPersonal(UserEntityVo personalFile);
HashMap<String,UserProsonalEntityVo> queryUserInfo(Integer id, List<Integer> personalFileId);
HashMap<String,UserProsonalEntityVo> queryUserInfo(Integer id);
}

@ -49,13 +49,13 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
}
@Override
public HashMap<String,UserProsonalEntityVo> queryUserInfo(Integer id,List<Integer> personalIds) {
public HashMap<String,UserProsonalEntityVo> queryUserInfo(Integer id) {
HashMap map = new HashMap();
//用户sql user
List<UserProsonalEntityVo> userInfo = userMapper.queryUserInfo(id);
map.put("userInfo",userInfo);
//个人档案sql
List<UserProsonalEntityVo> userEntityVos = userMapper.queryPersonalFile(id, personalIds);
List<UserProsonalEntityVo> userEntityVos = userMapper.queryPersonalFile(id);
map.put("userPersonalFile",userEntityVos);
return map;
}

@ -19,8 +19,6 @@
<update id="updateById" parameterType="com.msdw.tms.entity.EvaluationQuestionEntity">
UPDATE
tms_evaluation_question
set
type = 0,
<set>
<if test="questionStatus != null">
question_status=#{questionStatus, jdbcType=INTEGER},

@ -30,7 +30,7 @@
u.provinceId = pro.provinceId
AND u.schoolId = s.schoolId
AND u.cityId = c.cityId
AND u.isdel = #{pro.isdel}
AND u.isdel = 0
AND u.provinceId = c.provinceId
AND u.userId = #{userid}
AND pro.isdel = 0
@ -58,11 +58,6 @@
per.schoolId = s.schoolId
AND per.userId = #{userid}
AND s.isdel = 0
AND per.personalFileId IN
<foreach collection="personalFileId" item="personalFileId" separator="," open="(" close=")">
#{personalFileId}
</foreach>
</select>
<update id="updateUserPersonal" parameterType="com.msdw.tms.entity.vo.UserProsonalEntityVo">

Loading…
Cancel
Save