生成代码
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
*/
|
||||
@Api("${varPojoName}")
|
||||
@RestController
|
||||
@RequestMapping("${varPojoName}")
|
||||
@RequestMapping("/${varPojoName}")
|
||||
public class ${pojoName}Controller {
|
||||
|
||||
@Autowired
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
*/
|
||||
@Api("ucenterOauth")
|
||||
@RestController
|
||||
@RequestMapping("ucenterOauth")
|
||||
@RequestMapping("/ucenterOauth")
|
||||
public class UcenterOauthController {
|
||||
|
||||
@Autowired
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
*/
|
||||
@Api("ucenterUser")
|
||||
@RestController
|
||||
@RequestMapping("ucenterUser")
|
||||
@RequestMapping("/ucenterUser")
|
||||
public class UcenterUserController {
|
||||
|
||||
@Autowired
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
*/
|
||||
@Api("ucenterUserDetails")
|
||||
@RestController
|
||||
@RequestMapping("ucenterUserDetails")
|
||||
@RequestMapping("/ucenterUserDetails")
|
||||
public class UcenterUserDetailsController {
|
||||
|
||||
@Autowired
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
*/
|
||||
@Api("ucenterUserLog")
|
||||
@RestController
|
||||
@RequestMapping("ucenterUserLog")
|
||||
@RequestMapping("/ucenterUserLog")
|
||||
public class UcenterUserLogController {
|
||||
|
||||
@Autowired
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
*/
|
||||
@Api("ucenterUserOauth")
|
||||
@RestController
|
||||
@RequestMapping("ucenterUserOauth")
|
||||
@RequestMapping("/ucenterUserOauth")
|
||||
public class UcenterUserOauthController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -1,17 +1,24 @@
|
||||
package com.micro.fast.ucenter.dao;
|
||||
|
||||
import com.micro.fast.common.dao.SsmMapper;
|
||||
import com.micro.fast.ucenter.pojo.UcenterOauth;
|
||||
|
||||
public interface UcenterOauthMapper {
|
||||
public interface UcenterOauthMapper extends SsmMapper<UcenterOauth,Integer>{
|
||||
@Override
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
@Override
|
||||
int insert(UcenterOauth record);
|
||||
|
||||
@Override
|
||||
int insertSelective(UcenterOauth record);
|
||||
|
||||
@Override
|
||||
UcenterOauth selectByPrimaryKey(Integer id);
|
||||
|
||||
@Override
|
||||
int updateByPrimaryKeySelective(UcenterOauth record);
|
||||
|
||||
@Override
|
||||
int updateByPrimaryKey(UcenterOauth record);
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.micro.fast.ucenter.dao;
|
||||
|
||||
import com.micro.fast.common.dao.SsmMapper;
|
||||
import com.micro.fast.ucenter.pojo.UcenterUserDetails;
|
||||
|
||||
public interface UcenterUserDetailsMapper {
|
||||
public interface UcenterUserDetailsMapper extends SsmMapper<UcenterUserDetails,Integer> {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UcenterUserDetails record);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.micro.fast.ucenter.dao;
|
||||
|
||||
import com.micro.fast.common.dao.SsmMapper;
|
||||
import com.micro.fast.ucenter.pojo.UcenterUserLog;
|
||||
|
||||
public interface UcenterUserLogMapper {
|
||||
public interface UcenterUserLogMapper extends SsmMapper<UcenterUserLog,Integer> {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UcenterUserLog record);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.micro.fast.ucenter.dao;
|
||||
|
||||
import com.micro.fast.common.dao.SsmMapper;
|
||||
import com.micro.fast.ucenter.pojo.UcenterUser;
|
||||
|
||||
public interface UcenterUserMapper {
|
||||
public interface UcenterUserMapper extends SsmMapper<UcenterUser,Integer> {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UcenterUser record);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.micro.fast.ucenter.dao;
|
||||
|
||||
import com.micro.fast.common.dao.SsmMapper;
|
||||
import com.micro.fast.ucenter.pojo.UcenterUserOauth;
|
||||
|
||||
public interface UcenterUserOauthMapper {
|
||||
public interface UcenterUserOauthMapper extends SsmMapper<UcenterUserOauth,Integer> {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UcenterUserOauth record);
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.micro.fast.upms.controller;
|
||||
|
||||
import com.micro.fast.boot.starter.common.response.BaseConst;
|
||||
import com.micro.fast.boot.starter.common.response.ServerResponse;
|
||||
import com.micro.fast.upms.pojo.UpmsLog;
|
||||
import com.micro.fast.upms.service.UpmsLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindException;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lsy
|
||||
*/
|
||||
@Api("upmsLog")
|
||||
@RestController
|
||||
@RequestMapping("/upmsLog")
|
||||
public class UpmsLogController {
|
||||
|
||||
@Autowired
|
||||
private UpmsLogService<UpmsLog,Integer> upmsLogService;
|
||||
|
||||
@ApiOperation("添加信息")
|
||||
@PostMapping
|
||||
public ServerResponse addUpmsLog(@Valid UpmsLog upmsLog) throws BindException {
|
||||
return upmsLogService.add(upmsLog);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询详细信息")
|
||||
@GetMapping("/{id}")
|
||||
public ServerResponse getUpmsLogById(
|
||||
@PathVariable(value = "id") @NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
return upmsLogService.getById(Integer.valueOf(id));
|
||||
}
|
||||
|
||||
@ApiOperation("根据条件分页查询")
|
||||
@GetMapping
|
||||
public ServerResponse getUpmsLogByCondition(UpmsLog upmsLog,
|
||||
@RequestParam(defaultValue = "1",required = false) int pageNum,
|
||||
@RequestParam(defaultValue = "10",required = false)int pageSize,
|
||||
@RequestParam(required = false) String orderBy){
|
||||
return upmsLogService.getByCondition(upmsLog,pageNum,pageSize,orderBy);
|
||||
}
|
||||
|
||||
@ApiOperation("修改信息")
|
||||
@PutMapping("/{id}")
|
||||
public ServerResponse updateUpmsLog(UpmsLog upmsLog,
|
||||
@NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
upmsLog.setId(Integer.valueOf(id));
|
||||
return upmsLogService.update(upmsLog);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id删除,传入数组")
|
||||
@DeleteMapping
|
||||
public ServerResponse deleteUpmsLog(@NotEmpty(message = BaseConst.BASEMSG_PREFIX+"请传入ids") List<Integer> ids){
|
||||
return upmsLogService.deleteByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.micro.fast.upms.controller;
|
||||
|
||||
import com.micro.fast.boot.starter.common.response.BaseConst;
|
||||
import com.micro.fast.boot.starter.common.response.ServerResponse;
|
||||
import com.micro.fast.upms.pojo.UpmsOrganization;
|
||||
import com.micro.fast.upms.service.UpmsOrganizationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindException;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lsy
|
||||
*/
|
||||
@Api("upmsOrganization")
|
||||
@RestController
|
||||
@RequestMapping("/upmsOrganization")
|
||||
public class UpmsOrganizationController {
|
||||
|
||||
@Autowired
|
||||
private UpmsOrganizationService<UpmsOrganization,Integer> upmsOrganizationService;
|
||||
|
||||
@ApiOperation("添加信息")
|
||||
@PostMapping
|
||||
public ServerResponse addUpmsOrganization(@Valid UpmsOrganization upmsOrganization) throws BindException {
|
||||
return upmsOrganizationService.add(upmsOrganization);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询详细信息")
|
||||
@GetMapping("/{id}")
|
||||
public ServerResponse getUpmsOrganizationById(
|
||||
@PathVariable(value = "id") @NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
return upmsOrganizationService.getById(Integer.valueOf(id));
|
||||
}
|
||||
|
||||
@ApiOperation("根据条件分页查询")
|
||||
@GetMapping
|
||||
public ServerResponse getUpmsOrganizationByCondition(UpmsOrganization upmsOrganization,
|
||||
@RequestParam(defaultValue = "1",required = false) int pageNum,
|
||||
@RequestParam(defaultValue = "10",required = false)int pageSize,
|
||||
@RequestParam(required = false) String orderBy){
|
||||
return upmsOrganizationService.getByCondition(upmsOrganization,pageNum,pageSize,orderBy);
|
||||
}
|
||||
|
||||
@ApiOperation("修改信息")
|
||||
@PutMapping("/{id}")
|
||||
public ServerResponse updateUpmsOrganization(UpmsOrganization upmsOrganization,
|
||||
@NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
upmsOrganization.setId(Integer.valueOf(id));
|
||||
return upmsOrganizationService.update(upmsOrganization);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id删除,传入数组")
|
||||
@DeleteMapping
|
||||
public ServerResponse deleteUpmsOrganization(@NotEmpty(message = BaseConst.BASEMSG_PREFIX+"请传入ids") List<Integer> ids){
|
||||
return upmsOrganizationService.deleteByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.micro.fast.upms.controller;
|
||||
|
||||
import com.micro.fast.boot.starter.common.response.BaseConst;
|
||||
import com.micro.fast.boot.starter.common.response.ServerResponse;
|
||||
import com.micro.fast.upms.pojo.UpmsPermission;
|
||||
import com.micro.fast.upms.service.UpmsPermissionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindException;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lsy
|
||||
*/
|
||||
@Api("upmsPermission")
|
||||
@RestController
|
||||
@RequestMapping("/upmsPermission")
|
||||
public class UpmsPermissionController {
|
||||
|
||||
@Autowired
|
||||
private UpmsPermissionService<UpmsPermission,Integer> upmsPermissionService;
|
||||
|
||||
@ApiOperation("添加信息")
|
||||
@PostMapping
|
||||
public ServerResponse addUpmsPermission(@Valid UpmsPermission upmsPermission) throws BindException {
|
||||
return upmsPermissionService.add(upmsPermission);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询详细信息")
|
||||
@GetMapping("/{id}")
|
||||
public ServerResponse getUpmsPermissionById(
|
||||
@PathVariable(value = "id") @NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
return upmsPermissionService.getById(Integer.valueOf(id));
|
||||
}
|
||||
|
||||
@ApiOperation("根据条件分页查询")
|
||||
@GetMapping
|
||||
public ServerResponse getUpmsPermissionByCondition(UpmsPermission upmsPermission,
|
||||
@RequestParam(defaultValue = "1",required = false) int pageNum,
|
||||
@RequestParam(defaultValue = "10",required = false)int pageSize,
|
||||
@RequestParam(required = false) String orderBy){
|
||||
return upmsPermissionService.getByCondition(upmsPermission,pageNum,pageSize,orderBy);
|
||||
}
|
||||
|
||||
@ApiOperation("修改信息")
|
||||
@PutMapping("/{id}")
|
||||
public ServerResponse updateUpmsPermission(UpmsPermission upmsPermission,
|
||||
@NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
upmsPermission.setId(Integer.valueOf(id));
|
||||
return upmsPermissionService.update(upmsPermission);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id删除,传入数组")
|
||||
@DeleteMapping
|
||||
public ServerResponse deleteUpmsPermission(@NotEmpty(message = BaseConst.BASEMSG_PREFIX+"请传入ids") List<Integer> ids){
|
||||
return upmsPermissionService.deleteByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.micro.fast.upms.controller;
|
||||
|
||||
import com.micro.fast.boot.starter.common.response.BaseConst;
|
||||
import com.micro.fast.boot.starter.common.response.ServerResponse;
|
||||
import com.micro.fast.upms.pojo.UpmsRole;
|
||||
import com.micro.fast.upms.service.UpmsRoleService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindException;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lsy
|
||||
*/
|
||||
@Api("upmsRole")
|
||||
@RestController
|
||||
@RequestMapping("/upmsRole")
|
||||
public class UpmsRoleController {
|
||||
|
||||
@Autowired
|
||||
private UpmsRoleService<UpmsRole,Integer> upmsRoleService;
|
||||
|
||||
@ApiOperation("添加信息")
|
||||
@PostMapping
|
||||
public ServerResponse addUpmsRole(@Valid UpmsRole upmsRole) throws BindException {
|
||||
return upmsRoleService.add(upmsRole);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询详细信息")
|
||||
@GetMapping("/{id}")
|
||||
public ServerResponse getUpmsRoleById(
|
||||
@PathVariable(value = "id") @NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
return upmsRoleService.getById(Integer.valueOf(id));
|
||||
}
|
||||
|
||||
@ApiOperation("根据条件分页查询")
|
||||
@GetMapping
|
||||
public ServerResponse getUpmsRoleByCondition(UpmsRole upmsRole,
|
||||
@RequestParam(defaultValue = "1",required = false) int pageNum,
|
||||
@RequestParam(defaultValue = "10",required = false)int pageSize,
|
||||
@RequestParam(required = false) String orderBy){
|
||||
return upmsRoleService.getByCondition(upmsRole,pageNum,pageSize,orderBy);
|
||||
}
|
||||
|
||||
@ApiOperation("修改信息")
|
||||
@PutMapping("/{id}")
|
||||
public ServerResponse updateUpmsRole(UpmsRole upmsRole,
|
||||
@NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
upmsRole.setId(Integer.valueOf(id));
|
||||
return upmsRoleService.update(upmsRole);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id删除,传入数组")
|
||||
@DeleteMapping
|
||||
public ServerResponse deleteUpmsRole(@NotEmpty(message = BaseConst.BASEMSG_PREFIX+"请传入ids") List<Integer> ids){
|
||||
return upmsRoleService.deleteByIds(ids);
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.micro.fast.upms.controller;
|
||||
|
||||
import com.micro.fast.boot.starter.common.response.BaseConst;
|
||||
import com.micro.fast.boot.starter.common.response.ServerResponse;
|
||||
import com.micro.fast.upms.pojo.UpmsRolePermission;
|
||||
import com.micro.fast.upms.service.UpmsRolePermissionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindException;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lsy
|
||||
*/
|
||||
@Api("upmsRolePermission")
|
||||
@RestController
|
||||
@RequestMapping("/upmsRolePermission")
|
||||
public class UpmsRolePermissionController {
|
||||
|
||||
@Autowired
|
||||
private UpmsRolePermissionService<UpmsRolePermission,Integer> upmsRolePermissionService;
|
||||
|
||||
@ApiOperation("添加信息")
|
||||
@PostMapping
|
||||
public ServerResponse addUpmsRolePermission(@Valid UpmsRolePermission upmsRolePermission) throws BindException {
|
||||
return upmsRolePermissionService.add(upmsRolePermission);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询详细信息")
|
||||
@GetMapping("/{id}")
|
||||
public ServerResponse getUpmsRolePermissionById(
|
||||
@PathVariable(value = "id") @NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
return upmsRolePermissionService.getById(Integer.valueOf(id));
|
||||
}
|
||||
|
||||
@ApiOperation("根据条件分页查询")
|
||||
@GetMapping
|
||||
public ServerResponse getUpmsRolePermissionByCondition(UpmsRolePermission upmsRolePermission,
|
||||
@RequestParam(defaultValue = "1",required = false) int pageNum,
|
||||
@RequestParam(defaultValue = "10",required = false)int pageSize,
|
||||
@RequestParam(required = false) String orderBy){
|
||||
return upmsRolePermissionService.getByCondition(upmsRolePermission,pageNum,pageSize,orderBy);
|
||||
}
|
||||
|
||||
@ApiOperation("修改信息")
|
||||
@PutMapping("/{id}")
|
||||
public ServerResponse updateUpmsRolePermission(UpmsRolePermission upmsRolePermission,
|
||||
@NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
upmsRolePermission.setRolePermissionId(Integer.valueOf(id));
|
||||
return upmsRolePermissionService.update(upmsRolePermission);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id删除,传入数组")
|
||||
@DeleteMapping
|
||||
public ServerResponse deleteUpmsRolePermission(@NotEmpty(message = BaseConst.BASEMSG_PREFIX+"请传入ids") List<Integer> ids){
|
||||
return upmsRolePermissionService.deleteByIds(ids);
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.micro.fast.upms.controller;
|
||||
|
||||
import com.micro.fast.boot.starter.common.response.BaseConst;
|
||||
import com.micro.fast.boot.starter.common.response.ServerResponse;
|
||||
import com.micro.fast.upms.pojo.UpmsUserOrganization;
|
||||
import com.micro.fast.upms.service.UpmsUserOrganizationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindException;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lsy
|
||||
*/
|
||||
@Api("upmsUserOrganization")
|
||||
@RestController
|
||||
@RequestMapping("/upmsUserOrganization")
|
||||
public class UpmsUserOrganizationController {
|
||||
|
||||
@Autowired
|
||||
private UpmsUserOrganizationService<UpmsUserOrganization,Integer> upmsUserOrganizationService;
|
||||
|
||||
@ApiOperation("添加信息")
|
||||
@PostMapping
|
||||
public ServerResponse addUpmsUserOrganization(@Valid UpmsUserOrganization upmsUserOrganization) throws BindException {
|
||||
return upmsUserOrganizationService.add(upmsUserOrganization);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询详细信息")
|
||||
@GetMapping("/{id}")
|
||||
public ServerResponse getUpmsUserOrganizationById(
|
||||
@PathVariable(value = "id") @NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
return upmsUserOrganizationService.getById(Integer.valueOf(id));
|
||||
}
|
||||
|
||||
@ApiOperation("根据条件分页查询")
|
||||
@GetMapping
|
||||
public ServerResponse getUpmsUserOrganizationByCondition(UpmsUserOrganization upmsUserOrganization,
|
||||
@RequestParam(defaultValue = "1",required = false) int pageNum,
|
||||
@RequestParam(defaultValue = "10",required = false)int pageSize,
|
||||
@RequestParam(required = false) String orderBy){
|
||||
return upmsUserOrganizationService.getByCondition(upmsUserOrganization,pageNum,pageSize,orderBy);
|
||||
}
|
||||
|
||||
@ApiOperation("修改信息")
|
||||
@PutMapping("/{id}")
|
||||
public ServerResponse updateUpmsUserOrganization(UpmsUserOrganization upmsUserOrganization,
|
||||
@NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
upmsUserOrganization.setUserOrganizationId(Integer.valueOf(id));
|
||||
return upmsUserOrganizationService.update(upmsUserOrganization);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id删除,传入数组")
|
||||
@DeleteMapping
|
||||
public ServerResponse deleteUpmsUserOrganization(@NotEmpty(message = BaseConst.BASEMSG_PREFIX+"请传入ids") List<Integer> ids){
|
||||
return upmsUserOrganizationService.deleteByIds(ids);
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.micro.fast.upms.controller;
|
||||
|
||||
import com.micro.fast.boot.starter.common.response.BaseConst;
|
||||
import com.micro.fast.boot.starter.common.response.ServerResponse;
|
||||
import com.micro.fast.upms.pojo.UpmsUserPermission;
|
||||
import com.micro.fast.upms.service.UpmsUserPermissionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindException;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lsy
|
||||
*/
|
||||
@Api("upmsUserPermission")
|
||||
@RestController
|
||||
@RequestMapping("/upmsUserPermission")
|
||||
public class UpmsUserPermissionController {
|
||||
|
||||
@Autowired
|
||||
private UpmsUserPermissionService<UpmsUserPermission,Integer> upmsUserPermissionService;
|
||||
|
||||
@ApiOperation("添加信息")
|
||||
@PostMapping
|
||||
public ServerResponse addUpmsUserPermission(@Valid UpmsUserPermission upmsUserPermission) throws BindException {
|
||||
return upmsUserPermissionService.add(upmsUserPermission);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询详细信息")
|
||||
@GetMapping("/{id}")
|
||||
public ServerResponse getUpmsUserPermissionById(
|
||||
@PathVariable(value = "id") @NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
return upmsUserPermissionService.getById(Integer.valueOf(id));
|
||||
}
|
||||
|
||||
@ApiOperation("根据条件分页查询")
|
||||
@GetMapping
|
||||
public ServerResponse getUpmsUserPermissionByCondition(UpmsUserPermission upmsUserPermission,
|
||||
@RequestParam(defaultValue = "1",required = false) int pageNum,
|
||||
@RequestParam(defaultValue = "10",required = false)int pageSize,
|
||||
@RequestParam(required = false) String orderBy){
|
||||
return upmsUserPermissionService.getByCondition(upmsUserPermission,pageNum,pageSize,orderBy);
|
||||
}
|
||||
|
||||
@ApiOperation("修改信息")
|
||||
@PutMapping("/{id}")
|
||||
public ServerResponse updateUpmsUserPermission(UpmsUserPermission upmsUserPermission,
|
||||
@NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
upmsUserPermission.setUserPermissionId(Integer.valueOf(id));
|
||||
return upmsUserPermissionService.update(upmsUserPermission);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id删除,传入数组")
|
||||
@DeleteMapping
|
||||
public ServerResponse deleteUpmsUserPermission(@NotEmpty(message = BaseConst.BASEMSG_PREFIX+"请传入ids") List<Integer> ids){
|
||||
return upmsUserPermissionService.deleteByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.micro.fast.upms.controller;
|
||||
|
||||
import com.micro.fast.boot.starter.common.response.BaseConst;
|
||||
import com.micro.fast.boot.starter.common.response.ServerResponse;
|
||||
import com.micro.fast.upms.pojo.UpmsUserRole;
|
||||
import com.micro.fast.upms.service.UpmsUserRoleService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindException;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lsy
|
||||
*/
|
||||
@Api("upmsUserRole")
|
||||
@RestController
|
||||
@RequestMapping("/upmsUserRole")
|
||||
public class UpmsUserRoleController {
|
||||
|
||||
@Autowired
|
||||
private UpmsUserRoleService<UpmsUserRole,Integer> upmsUserRoleService;
|
||||
|
||||
@ApiOperation("添加信息")
|
||||
@PostMapping
|
||||
public ServerResponse addUpmsUserRole(@Valid UpmsUserRole upmsUserRole) throws BindException {
|
||||
return upmsUserRoleService.add(upmsUserRole);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询详细信息")
|
||||
@GetMapping("/{id}")
|
||||
public ServerResponse getUpmsUserRoleById(
|
||||
@PathVariable(value = "id") @NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
return upmsUserRoleService.getById(Integer.valueOf(id));
|
||||
}
|
||||
|
||||
@ApiOperation("根据条件分页查询")
|
||||
@GetMapping
|
||||
public ServerResponse getUpmsUserRoleByCondition(UpmsUserRole upmsUserRole,
|
||||
@RequestParam(defaultValue = "1",required = false) int pageNum,
|
||||
@RequestParam(defaultValue = "10",required = false)int pageSize,
|
||||
@RequestParam(required = false) String orderBy){
|
||||
return upmsUserRoleService.getByCondition(upmsUserRole,pageNum,pageSize,orderBy);
|
||||
}
|
||||
|
||||
@ApiOperation("修改信息")
|
||||
@PutMapping("/{id}")
|
||||
public ServerResponse updateUpmsUserRole(UpmsUserRole upmsUserRole,
|
||||
@NotBlank(message = BaseConst.BASEMSG_PREFIX+"请传入id") String id){
|
||||
upmsUserRole.setUserRoleId(Integer.valueOf(id));
|
||||
return upmsUserRoleService.update(upmsUserRole);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id删除,传入数组")
|
||||
@DeleteMapping
|
||||
public ServerResponse deleteUpmsUserRole(@NotEmpty(message = BaseConst.BASEMSG_PREFIX+"请传入ids") List<Integer> ids){
|
||||
return upmsUserRoleService.deleteByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.micro.fast.upms.dao;
|
||||
|
||||
import com.micro.fast.upms.pojo.PersistentLogins;
|
||||
|
||||
public interface PersistentLoginsMapper {
|
||||
int deleteByPrimaryKey(String series);
|
||||
|
||||
int insert(PersistentLogins record);
|
||||
|
||||
int insertSelective(PersistentLogins record);
|
||||
|
||||
PersistentLogins selectByPrimaryKey(String series);
|
||||
|
||||
int updateByPrimaryKeySelective(PersistentLogins record);
|
||||
|
||||
int updateByPrimaryKey(PersistentLogins record);
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.micro.fast.upms.dao;
|
||||
|
||||
import com.micro.fast.common.dao.SsmMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsLog;
|
||||
|
||||
public interface UpmsLogMapper {
|
||||
import java.util.List;
|
||||
|
||||
public interface UpmsLogMapper extends SsmMapper<UpmsLog,Integer> {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UpmsLog record);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.micro.fast.upms.dao;
|
||||
|
||||
import com.micro.fast.common.dao.SsmMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsOrganization;
|
||||
|
||||
public interface UpmsOrganizationMapper {
|
||||
public interface UpmsOrganizationMapper extends SsmMapper<UpmsOrganization,Integer> {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UpmsOrganization record);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.micro.fast.upms.dao;
|
||||
|
||||
import com.micro.fast.common.dao.SsmMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsPermission;
|
||||
|
||||
public interface UpmsPermissionMapper {
|
||||
public interface UpmsPermissionMapper extends SsmMapper<UpmsPermission,Integer> {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UpmsPermission record);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.micro.fast.upms.dao;
|
||||
|
||||
import com.micro.fast.common.dao.SsmMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsRole;
|
||||
|
||||
public interface UpmsRoleMapper {
|
||||
public interface UpmsRoleMapper extends SsmMapper<UpmsRole,Integer> {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UpmsRole record);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.micro.fast.upms.dao;
|
||||
|
||||
import com.micro.fast.common.dao.SsmMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsRolePermission;
|
||||
|
||||
public interface UpmsRolePermissionMapper {
|
||||
public interface UpmsRolePermissionMapper extends SsmMapper<UpmsRolePermission,Integer> {
|
||||
int deleteByPrimaryKey(Integer rolePermissionId);
|
||||
|
||||
int insert(UpmsRolePermission record);
|
||||
|
||||
@@ -1,17 +1,24 @@
|
||||
package com.micro.fast.upms.dao;
|
||||
|
||||
import com.micro.fast.common.dao.SsmMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsUserOrganization;
|
||||
|
||||
public interface UpmsUserOrganizationMapper {
|
||||
public interface UpmsUserOrganizationMapper extends SsmMapper<UpmsUserOrganization,Integer> {
|
||||
@Override
|
||||
int deleteByPrimaryKey(Integer userOrganizationId);
|
||||
|
||||
@Override
|
||||
int insert(UpmsUserOrganization record);
|
||||
|
||||
@Override
|
||||
int insertSelective(UpmsUserOrganization record);
|
||||
|
||||
@Override
|
||||
UpmsUserOrganization selectByPrimaryKey(Integer userOrganizationId);
|
||||
|
||||
@Override
|
||||
int updateByPrimaryKeySelective(UpmsUserOrganization record);
|
||||
|
||||
@Override
|
||||
int updateByPrimaryKey(UpmsUserOrganization record);
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.micro.fast.upms.dao;
|
||||
|
||||
import com.micro.fast.common.dao.SsmMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsUserPermission;
|
||||
|
||||
public interface UpmsUserPermissionMapper {
|
||||
public interface UpmsUserPermissionMapper extends SsmMapper<UpmsUserPermission,Integer> {
|
||||
int deleteByPrimaryKey(Integer userPermissionId);
|
||||
|
||||
int insert(UpmsUserPermission record);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.micro.fast.upms.dao;
|
||||
|
||||
import com.micro.fast.common.dao.SsmMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsUserRole;
|
||||
|
||||
public interface UpmsUserRoleMapper {
|
||||
public interface UpmsUserRoleMapper extends SsmMapper<UpmsUserRole,Integer> {
|
||||
int deleteByPrimaryKey(Integer userRoleId);
|
||||
|
||||
int insert(UpmsUserRole record);
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.micro.fast.upms.service;
|
||||
|
||||
import com.micro.fast.common.service.SsmService;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
public interface UpmsLogService<T,ID> extends SsmService<T,ID>{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.micro.fast.upms.service;
|
||||
|
||||
import com.micro.fast.common.service.SsmService;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
public interface UpmsOrganizationService<T,ID> extends SsmService<T,ID>{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.micro.fast.upms.service;
|
||||
|
||||
import com.micro.fast.common.service.SsmService;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
public interface UpmsPermissionService<T,ID> extends SsmService<T,ID>{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.micro.fast.upms.service;
|
||||
|
||||
import com.micro.fast.common.service.SsmService;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
public interface UpmsRolePermissionService<T,ID> extends SsmService<T,ID>{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.micro.fast.upms.service;
|
||||
|
||||
import com.micro.fast.common.service.SsmService;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
public interface UpmsRoleService<T,ID> extends SsmService<T,ID>{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.micro.fast.upms.service;
|
||||
|
||||
import com.micro.fast.common.service.SsmService;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
public interface UpmsUserOrganizationService<T,ID> extends SsmService<T,ID>{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.micro.fast.upms.service;
|
||||
|
||||
import com.micro.fast.common.service.SsmService;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
public interface UpmsUserPermissionService<T,ID> extends SsmService<T,ID>{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.micro.fast.upms.service;
|
||||
|
||||
import com.micro.fast.common.service.SsmService;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
public interface UpmsUserRoleService<T,ID> extends SsmService<T,ID>{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.micro.fast.upms.service.impl;
|
||||
|
||||
import com.micro.fast.common.service.impl.SsmServiceImpl;
|
||||
import com.micro.fast.upms.dao.UpmsLogMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsLog;
|
||||
import com.micro.fast.upms.service.UpmsLogService;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
@Service
|
||||
public class UpmsLogServiceImpl extends SsmServiceImpl<UpmsLog,Integer,UpmsLogMapper>
|
||||
implements UpmsLogService<UpmsLog,Integer>,InitializingBean {
|
||||
|
||||
@Autowired
|
||||
private UpmsLogMapper mapper;
|
||||
|
||||
/**
|
||||
* 在这个bean初始化完成后覆盖父类的mapper
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
super.setMapper(this.mapper);
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.micro.fast.upms.service.impl;
|
||||
|
||||
import com.micro.fast.common.service.impl.SsmServiceImpl;
|
||||
import com.micro.fast.upms.dao.UpmsOrganizationMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsOrganization;
|
||||
import com.micro.fast.upms.service.UpmsOrganizationService;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
@Service
|
||||
public class UpmsOrganizationServiceImpl extends SsmServiceImpl<UpmsOrganization,Integer,UpmsOrganizationMapper>
|
||||
implements UpmsOrganizationService<UpmsOrganization,Integer>,InitializingBean {
|
||||
|
||||
@Autowired
|
||||
private UpmsOrganizationMapper mapper;
|
||||
|
||||
/**
|
||||
* 在这个bean初始化完成后覆盖父类的mapper
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
super.setMapper(this.mapper);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.micro.fast.upms.service.impl;
|
||||
|
||||
import com.micro.fast.common.service.impl.SsmServiceImpl;
|
||||
import com.micro.fast.upms.dao.UpmsPermissionMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsPermission;
|
||||
import com.micro.fast.upms.service.UpmsPermissionService;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
@Service
|
||||
public class UpmsPermissionServiceImpl extends SsmServiceImpl<UpmsPermission,Integer,UpmsPermissionMapper>
|
||||
implements UpmsPermissionService<UpmsPermission,Integer>,InitializingBean {
|
||||
|
||||
@Autowired
|
||||
private UpmsPermissionMapper mapper;
|
||||
|
||||
/**
|
||||
* 在这个bean初始化完成后覆盖父类的mapper
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
super.setMapper(this.mapper);
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.micro.fast.upms.service.impl;
|
||||
|
||||
import com.micro.fast.common.service.impl.SsmServiceImpl;
|
||||
import com.micro.fast.upms.dao.UpmsRolePermissionMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsRolePermission;
|
||||
import com.micro.fast.upms.service.UpmsRolePermissionService;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
@Service
|
||||
public class UpmsRolePermissionServiceImpl extends SsmServiceImpl<UpmsRolePermission,Integer,UpmsRolePermissionMapper>
|
||||
implements UpmsRolePermissionService<UpmsRolePermission,Integer>,InitializingBean {
|
||||
|
||||
@Autowired
|
||||
private UpmsRolePermissionMapper mapper;
|
||||
|
||||
/**
|
||||
* 在这个bean初始化完成后覆盖父类的mapper
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
super.setMapper(this.mapper);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.micro.fast.upms.service.impl;
|
||||
|
||||
import com.micro.fast.common.service.impl.SsmServiceImpl;
|
||||
import com.micro.fast.upms.dao.UpmsRoleMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsRole;
|
||||
import com.micro.fast.upms.service.UpmsRoleService;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
@Service
|
||||
public class UpmsRoleServiceImpl extends SsmServiceImpl<UpmsRole,Integer,UpmsRoleMapper>
|
||||
implements UpmsRoleService<UpmsRole,Integer>,InitializingBean {
|
||||
|
||||
@Autowired
|
||||
private UpmsRoleMapper mapper;
|
||||
|
||||
/**
|
||||
* 在这个bean初始化完成后覆盖父类的mapper
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
super.setMapper(this.mapper);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.micro.fast.upms.service.impl;
|
||||
|
||||
import com.micro.fast.common.service.impl.SsmServiceImpl;
|
||||
import com.micro.fast.upms.dao.UpmsSystemMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsSystem;
|
||||
import com.micro.fast.upms.service.UpmsSystemService;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
@Service
|
||||
public class UpmsSystemServiceImpl extends SsmServiceImpl<UpmsSystem,Integer,UpmsSystemMapper>
|
||||
implements UpmsSystemService<UpmsSystem,Integer>,InitializingBean {
|
||||
|
||||
@Autowired
|
||||
private UpmsSystemMapper mapper;
|
||||
|
||||
/**
|
||||
* 在这个bean初始化完成后覆盖父类的mapper
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
super.setMapper(this.mapper);
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.micro.fast.upms.service.impl;
|
||||
|
||||
import com.micro.fast.common.service.impl.SsmServiceImpl;
|
||||
import com.micro.fast.upms.dao.UpmsUserOrganizationMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsUserOrganization;
|
||||
import com.micro.fast.upms.service.UpmsUserOrganizationService;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
@Service
|
||||
public class UpmsUserOrganizationServiceImpl extends SsmServiceImpl<UpmsUserOrganization,Integer,UpmsUserOrganizationMapper>
|
||||
implements UpmsUserOrganizationService<UpmsUserOrganization,Integer>,InitializingBean {
|
||||
|
||||
@Autowired
|
||||
private UpmsUserOrganizationMapper mapper;
|
||||
|
||||
/**
|
||||
* 在这个bean初始化完成后覆盖父类的mapper
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
super.setMapper(this.mapper);
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.micro.fast.upms.service.impl;
|
||||
|
||||
import com.micro.fast.common.service.impl.SsmServiceImpl;
|
||||
import com.micro.fast.upms.dao.UpmsUserPermissionMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsUserPermission;
|
||||
import com.micro.fast.upms.service.UpmsUserPermissionService;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
@Service
|
||||
public class UpmsUserPermissionServiceImpl extends SsmServiceImpl<UpmsUserPermission,Integer,UpmsUserPermissionMapper>
|
||||
implements UpmsUserPermissionService<UpmsUserPermission,Integer>,InitializingBean {
|
||||
|
||||
@Autowired
|
||||
private UpmsUserPermissionMapper mapper;
|
||||
|
||||
/**
|
||||
* 在这个bean初始化完成后覆盖父类的mapper
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
super.setMapper(this.mapper);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.micro.fast.upms.service.impl;
|
||||
|
||||
import com.micro.fast.common.service.impl.SsmServiceImpl;
|
||||
import com.micro.fast.upms.dao.UpmsUserRoleMapper;
|
||||
import com.micro.fast.upms.pojo.UpmsUserRole;
|
||||
import com.micro.fast.upms.service.UpmsUserRoleService;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
@Service
|
||||
public class UpmsUserRoleServiceImpl extends SsmServiceImpl<UpmsUserRole,Integer,UpmsUserRoleMapper>
|
||||
implements UpmsUserRoleService<UpmsUserRole,Integer>,InitializingBean {
|
||||
|
||||
@Autowired
|
||||
private UpmsUserRoleMapper mapper;
|
||||
|
||||
/**
|
||||
* 在这个bean初始化完成后覆盖父类的mapper
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
super.setMapper(this.mapper);
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.micro.fast.upms.dao.PersistentLoginsMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.micro.fast.upms.pojo.PersistentLogins" >
|
||||
<constructor >
|
||||
<idArg column="series" jdbcType="VARCHAR" javaType="java.lang.String" />
|
||||
<arg column="username" jdbcType="VARCHAR" javaType="java.lang.String" />
|
||||
<arg column="token" jdbcType="VARCHAR" javaType="java.lang.String" />
|
||||
<arg column="last_used" jdbcType="TIMESTAMP" javaType="java.util.Date" />
|
||||
</constructor>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
series, username, token, last_used
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from persistent_logins
|
||||
where series = #{series,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
||||
delete from persistent_logins
|
||||
where series = #{series,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.micro.fast.upms.pojo.PersistentLogins" >
|
||||
insert into persistent_logins (series, username, token,
|
||||
last_used)
|
||||
values (#{series,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{token,jdbcType=VARCHAR},
|
||||
#{lastUsed,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.micro.fast.upms.pojo.PersistentLogins" >
|
||||
insert into persistent_logins
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="series != null" >
|
||||
series,
|
||||
</if>
|
||||
<if test="username != null" >
|
||||
username,
|
||||
</if>
|
||||
<if test="token != null" >
|
||||
token,
|
||||
</if>
|
||||
<if test="lastUsed != null" >
|
||||
last_used,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="series != null" >
|
||||
#{series,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="username != null" >
|
||||
#{username,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="token != null" >
|
||||
#{token,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastUsed != null" >
|
||||
#{lastUsed,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.micro.fast.upms.pojo.PersistentLogins" >
|
||||
update persistent_logins
|
||||
<set >
|
||||
<if test="username != null" >
|
||||
username = #{username,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="token != null" >
|
||||
token = #{token,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastUsed != null" >
|
||||
last_used = #{lastUsed,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where series = #{series,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.micro.fast.upms.pojo.PersistentLogins" >
|
||||
update persistent_logins
|
||||
set username = #{username,jdbcType=VARCHAR},
|
||||
token = #{token,jdbcType=VARCHAR},
|
||||
last_used = #{lastUsed,jdbcType=TIMESTAMP}
|
||||
where series = #{series,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -6,7 +6,7 @@ db.username=root
|
||||
db.password=studyj2e
|
||||
mybatisGenerator.pojoPackage=com.micro.fast.upms.pojo
|
||||
mybatisGenerator.daoPackage=com.micro.fast.upms.dao
|
||||
mybatisGenerator.tablesPrefix=persistent
|
||||
mybatisGenerator.tablesPrefix=upms
|
||||
# Éú³Éservice²ãcontroller²ã
|
||||
mybatisGenerator.servicePackage=com.micro.fast.upms.service
|
||||
mybatisGenerator.controllerPackage=com.micro.fast.upms.controller
|
||||
|
||||
Reference in New Issue
Block a user