人员库-全员重置密码
This commit is contained in:
parent
9e91f12009
commit
12520642e4
|
|
@ -19,6 +19,7 @@ import com.bonus.boot.manager.manager.utils.GlobalConst;
|
|||
import com.bonus.boot.manager.task.UnifyTask;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -216,7 +217,7 @@ public class PersonnelLibraryController {
|
|||
|
||||
@LogAnnotation
|
||||
@PostMapping("resetPassword")
|
||||
@ApiOperation(value = "体检人员库-删除")
|
||||
@ApiOperation(value = "体检人员库-重置密码")
|
||||
public AjaxRes resetPassword(PersonnelLibraryBean bean) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
int result = service.resetPassword(bean);
|
||||
|
|
@ -320,4 +321,19 @@ public class PersonnelLibraryController {
|
|||
return isActive;
|
||||
}
|
||||
|
||||
@LogAnnotation
|
||||
@PostMapping("resetPasswordAll")
|
||||
@ApiOperation(value = "体检人员库-重置密码-全员")
|
||||
@PreAuthorize("hasAuthority('sys:reset:all')")
|
||||
public AjaxRes resetPasswordAll(PersonnelLibraryBean bean) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
int result = service.resetPasswordAll(bean);
|
||||
if (result > 0 ) {
|
||||
ar.setSucceedMsg(GlobalConst.DATA_SUCCEED);
|
||||
} else {
|
||||
ar.setFailMsg(GlobalConst.DATA_FAIL);
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,4 +57,6 @@ public interface PersonnelLibraryDao {
|
|||
int getIdNumber(@Param("idNumber")String idNumber);
|
||||
|
||||
PersonnelReservationBean getMealNameNew(@Param("setMeal")String setMeal);
|
||||
|
||||
int resetPasswordAll(PersonnelLibraryBean bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,4 +19,6 @@ public interface PersonnelLibraryService {
|
|||
int resetPassword(PersonnelLibraryBean bean);
|
||||
|
||||
List<ZNode> getDepartmentTree();
|
||||
|
||||
int resetPasswordAll(PersonnelLibraryBean bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,4 +120,11 @@ public class PersonnelLibraryServiceImpl implements PersonnelLibraryService {
|
|||
public List<ZNode> getDepartmentTree() {
|
||||
return dao.getDepartmentTree();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int resetPasswordAll(PersonnelLibraryBean bean) {
|
||||
bean.setPassword(passwordEncoder.encode("YNsbd@123456"));
|
||||
return dao.resetPasswordAll(bean);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -218,5 +218,11 @@
|
|||
base_name_id = #{setMeal}
|
||||
where is_active = '1' and id=#{id}
|
||||
</update>
|
||||
|
||||
<update id="resetPasswordAll">
|
||||
update pm_base_physical
|
||||
set phy_password = #{password}
|
||||
where is_active = '1'
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
|
|
@ -316,4 +316,19 @@ function importExcelNew() {
|
|||
}
|
||||
});
|
||||
$("#articleImageFileNew").val("");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
* @param id
|
||||
*/
|
||||
function resetPasswordAll(){
|
||||
layer.confirm('确定要重置密码吗?', {
|
||||
btn : [ '确定', '取消' ]
|
||||
}, function() {
|
||||
ajaxCommonMethods('/personnelLibrary/resetPasswordAll',{},"重置成功","重置失败","1");
|
||||
layer.close(1);
|
||||
});
|
||||
|
||||
}
|
||||
|
|
@ -157,5 +157,9 @@
|
|||
<button id="importExcelNew" style="margin-bottom: 3px" onclick="importExcelNew()" class="layui-btn layui-btn-sm" ><i class="layui-icon"></i>导入预约-新</button>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-btn-sm" onclick="resetPasswordAll()" permission="sys:reset:all" ><i class="layui-icon"></i>全员重置密码</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
Loading…
Reference in New Issue