mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 17:09:36 +08:00
新增修改单位用户密码
This commit is contained in:
parent
b4ab48be59
commit
773c32e0f5
@ -19,6 +19,7 @@ import com.ics.common.core.controller.BaseController;
|
|||||||
import com.ics.common.core.domain.IcsCustomerStaff;
|
import com.ics.common.core.domain.IcsCustomerStaff;
|
||||||
import com.ics.common.core.domain.R;
|
import com.ics.common.core.domain.R;
|
||||||
import com.ics.common.utils.DateUtils;
|
import com.ics.common.utils.DateUtils;
|
||||||
|
import com.ics.common.utils.StringUtils;
|
||||||
import com.ics.common.utils.bean.BeanUtils;
|
import com.ics.common.utils.bean.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@ -424,4 +425,25 @@ public class MeetingReservationController extends BaseController {
|
|||||||
meetingRecordVo.setUserId(userId);
|
meetingRecordVo.setUserId(userId);
|
||||||
return result(meetingReservationService.selectMeetingReservationList(meetingRecordVo));
|
return result(meetingReservationService.selectMeetingReservationList(meetingRecordVo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改单位用户密码
|
||||||
|
* 参数:
|
||||||
|
* loginName 登录名
|
||||||
|
* password 原密码
|
||||||
|
* newPassword 新密码
|
||||||
|
* rePassword 确认密码
|
||||||
|
* 返回
|
||||||
|
* code 为0 成功,为500 失败
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@PostMapping("changePswd")
|
||||||
|
public R changePswd(@RequestBody MeetingUto meetingUto) {
|
||||||
|
if (StringUtils.isNotBlank(meetingUto.getLoginName()) && StringUtils.isNotBlank(meetingUto.getPassword()) && StringUtils.isNotBlank(meetingUto.getNewPassword())) {
|
||||||
|
if (meetingUto.getNewPassword().equals(meetingUto.getRePassword())) {
|
||||||
|
return toAjax(meetingUtoService.changePassword(meetingUto));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return R.error("修改密码失败");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.ics.admin.domain;
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.ics.common.core.domain.BaseEntity;
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -30,6 +32,16 @@ public class MeetingUto extends BaseEntity<MeetingUto> {
|
|||||||
/** 密码 */
|
/** 密码 */
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
/** 新密码 */
|
||||||
|
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String newPassword;
|
||||||
|
|
||||||
|
/** 确认密码 */
|
||||||
|
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String rePassword;
|
||||||
|
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@ -52,6 +52,13 @@ public interface MeetingUtoMapper {
|
|||||||
*/
|
*/
|
||||||
int updateMeetingUto(MeetingUto meetingUto);
|
int updateMeetingUto(MeetingUto meetingUto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改密码
|
||||||
|
* @param meetingUto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int changePassword(MeetingUto meetingUto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除用户与机构关联
|
* 删除用户与机构关联
|
||||||
*
|
*
|
||||||
|
@ -56,6 +56,13 @@ public interface IMeetingUtoService {
|
|||||||
*/
|
*/
|
||||||
String updateMeetingUto(MeetingUto meetingUto);
|
String updateMeetingUto(MeetingUto meetingUto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改密码
|
||||||
|
* @param meetingUto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int changePassword(MeetingUto meetingUto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除用户与机构关联
|
* 批量删除用户与机构关联
|
||||||
*
|
*
|
||||||
|
@ -96,6 +96,11 @@ public class MeetingUtoServiceImpl implements IMeetingUtoService {
|
|||||||
return IMeetingUtoService.OK;
|
return IMeetingUtoService.OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int changePassword(MeetingUto meetingUto){
|
||||||
|
return meetingUtoMapper.changePassword(meetingUto);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除用户与机构关联对象
|
* 删除用户与机构关联对象
|
||||||
*
|
*
|
||||||
|
@ -117,6 +117,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</trim>
|
</trim>
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="changePassword" parameterType="MeetingUto">
|
||||||
|
update ics_meeting_uto set password = #{newPassword} where login_name = #{loginName} and password = #{password} and delete_flag=0
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteMeetingUtoById" parameterType="Long">
|
<delete id="deleteMeetingUtoById" parameterType="Long">
|
||||||
DELETE FROM ics_meeting_uto WHERE id = #{id}
|
DELETE FROM ics_meeting_uto WHERE id = #{id}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user