com.macro.mall.dto.UmsAdminParam Java Examples

The following examples show how to use com.macro.mall.dto.UmsAdminParam. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: UmsAdminServiceImpl.java    From mall-swarm with Apache License 2.0 6 votes vote down vote up
@Override
public UmsAdmin register(UmsAdminParam umsAdminParam) {
    UmsAdmin umsAdmin = new UmsAdmin();
    BeanUtils.copyProperties(umsAdminParam, umsAdmin);
    umsAdmin.setCreateTime(new Date());
    umsAdmin.setStatus(1);
    //查询是否有相同用户名的用户
    UmsAdminExample example = new UmsAdminExample();
    example.createCriteria().andUsernameEqualTo(umsAdmin.getUsername());
    List<UmsAdmin> umsAdminList = adminMapper.selectByExample(example);
    if (umsAdminList.size() > 0) {
        return null;
    }
    //将密码进行加密操作
    String encodePassword = passwordEncoder.encode(umsAdmin.getPassword());
    umsAdmin.setPassword(encodePassword);
    adminMapper.insert(umsAdmin);
    return umsAdmin;
}
 
Example #2
Source File: UmsAdminServiceImpl.java    From macrozheng with Apache License 2.0 6 votes vote down vote up
@Override
public UmsAdmin register(UmsAdminParam umsAdminParam) {
    UmsAdmin umsAdmin = new UmsAdmin();
    BeanUtils.copyProperties(umsAdminParam, umsAdmin);
    umsAdmin.setCreateTime(new Date());
    umsAdmin.setStatus(1);
    //查询是否有相同用户名的用户
    UmsAdminExample example = new UmsAdminExample();
    example.createCriteria().andUsernameEqualTo(umsAdmin.getUsername());
    List<UmsAdmin> umsAdminList = adminMapper.selectByExample(example);
    if (umsAdminList.size() > 0) {
        return null;
    }
    //将密码进行加密操作
    String encodePassword = passwordEncoder.encode(umsAdmin.getPassword());
    umsAdmin.setPassword(encodePassword);
    adminMapper.insert(umsAdmin);
    return umsAdmin;
}
 
Example #3
Source File: UmsAdminServiceImpl.java    From mall with Apache License 2.0 6 votes vote down vote up
@Override
public UmsAdmin register(UmsAdminParam umsAdminParam) {
    UmsAdmin umsAdmin = new UmsAdmin();
    BeanUtils.copyProperties(umsAdminParam, umsAdmin);
    umsAdmin.setCreateTime(new Date());
    umsAdmin.setStatus(1);
    //查询是否有相同用户名的用户
    UmsAdminExample example = new UmsAdminExample();
    example.createCriteria().andUsernameEqualTo(umsAdmin.getUsername());
    List<UmsAdmin> umsAdminList = adminMapper.selectByExample(example);
    if (umsAdminList.size() > 0) {
        return null;
    }
    //将密码进行加密操作
    String encodePassword = passwordEncoder.encode(umsAdmin.getPassword());
    umsAdmin.setPassword(encodePassword);
    adminMapper.insert(umsAdmin);
    return umsAdmin;
}
 
Example #4
Source File: UmsAdminServiceImpl.java    From macrozheng-mall with MIT License 6 votes vote down vote up
@Override
public UmsAdmin register(UmsAdminParam umsAdminParam) {
    UmsAdmin umsAdmin = new UmsAdmin();
    BeanUtils.copyProperties(umsAdminParam, umsAdmin);
    umsAdmin.setCreateTime(new Date());
    umsAdmin.setStatus(1);
    //查询是否有相同用户名的用户
    UmsAdminExample example = new UmsAdminExample();
    example.createCriteria().andUsernameEqualTo(umsAdmin.getUsername());
    List<UmsAdmin> umsAdminList = adminMapper.selectByExample(example);
    if (umsAdminList.size() > 0) {
        return null;
    }
    //将密码进行加密操作
    String md5Password = passwordEncoder.encodePassword(umsAdmin.getPassword(), null);
    umsAdmin.setPassword(md5Password);
    adminMapper.insert(umsAdmin);
    return umsAdmin;
}
 
Example #5
Source File: UmsAdminController.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@ApiOperation(value = "用户注册")
@RequestMapping(value = "/register", method = RequestMethod.POST)
@ResponseBody
public CommonResult<UmsAdmin> register(@RequestBody UmsAdminParam umsAdminParam, BindingResult result) {
    UmsAdmin umsAdmin = adminService.register(umsAdminParam);
    if (umsAdmin == null) {
        CommonResult.failed();
    }
    return CommonResult.success(umsAdmin);
}
 
Example #6
Source File: UmsAdminController.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@ApiOperation(value = "用户注册")
@RequestMapping(value = "/register", method = RequestMethod.POST)
@ResponseBody
public CommonResult<UmsAdmin> register(@RequestBody UmsAdminParam umsAdminParam, BindingResult result) {
    UmsAdmin umsAdmin = adminService.register(umsAdminParam);
    if (umsAdmin == null) {
        CommonResult.failed();
    }
    return CommonResult.success(umsAdmin);
}
 
Example #7
Source File: UmsAdminController.java    From mall with Apache License 2.0 5 votes vote down vote up
@ApiOperation(value = "用户注册")
@RequestMapping(value = "/register", method = RequestMethod.POST)
@ResponseBody
public CommonResult<UmsAdmin> register(@RequestBody UmsAdminParam umsAdminParam, BindingResult result) {
    UmsAdmin umsAdmin = adminService.register(umsAdminParam);
    if (umsAdmin == null) {
        CommonResult.failed();
    }
    return CommonResult.success(umsAdmin);
}
 
Example #8
Source File: UmsAdminController.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@ApiOperation(value = "用户注册")
@RequestMapping(value = "/register", method = RequestMethod.POST)
@ResponseBody
public Object register(@RequestBody UmsAdminParam umsAdminParam, BindingResult result) {
    UmsAdmin umsAdmin = adminService.register(umsAdminParam);
    if (umsAdmin == null) {
        new CommonResult().failed();
    }
    return new CommonResult().success(umsAdmin);
}
 
Example #9
Source File: UmsAdminService.java    From mall-swarm with Apache License 2.0 2 votes vote down vote up
/**
 * 注册功能
 */
UmsAdmin register(UmsAdminParam umsAdminParam);
 
Example #10
Source File: UmsAdminService.java    From macrozheng with Apache License 2.0 2 votes vote down vote up
/**
 * 注册功能
 */
UmsAdmin register(UmsAdminParam umsAdminParam);
 
Example #11
Source File: UmsAdminService.java    From mall with Apache License 2.0 2 votes vote down vote up
/**
 * 注册功能
 */
UmsAdmin register(UmsAdminParam umsAdminParam);
 
Example #12
Source File: UmsAdminService.java    From macrozheng-mall with MIT License 2 votes vote down vote up
/**
 * 注册功能
 */
UmsAdmin register(UmsAdminParam umsAdminParam);