Commit 8f5a5179 authored by mengmeng's avatar mengmeng

api serviceOrder modules add

parent 8b127d5d
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.annotation.LogOperation;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.ExcelUtils;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.NewsDTO;
import io.hmit.modules.serviceOrder.excel.NewsExcel;
import io.hmit.modules.serviceOrder.service.NewsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 新闻管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/news")
@Api(tags="新闻管理")
public class NewsController {
@Autowired
private NewsService newsService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
@RequiresPermissions("serviceOrder:news:page")
public Result<PageData<NewsDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<NewsDTO> page = newsService.page(params);
return new Result<PageData<NewsDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
@RequiresPermissions("serviceOrder:news:info")
public Result<NewsDTO> get(@PathVariable("id") Long id){
NewsDTO data = newsService.get(id);
return new Result<NewsDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
@RequiresPermissions("serviceOrder:news:save")
public Result save(@RequestBody NewsDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
newsService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
@RequiresPermissions("serviceOrder:news:update")
public Result update(@RequestBody NewsDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
newsService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
@RequiresPermissions("serviceOrder:news:delete")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
newsService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
@RequiresPermissions("serviceOrder:news:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<NewsDTO> list = newsService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, NewsExcel.class);
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.annotation.LogOperation;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.ExcelUtils;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.NewsDocumentDTO;
import io.hmit.modules.serviceOrder.excel.NewsDocumentExcel;
import io.hmit.modules.serviceOrder.service.NewsDocumentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/newsdocument")
@Api(tags="服务及相关图片附件关联表")
public class NewsDocumentController {
@Autowired
private NewsDocumentService newsDocumentService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
@RequiresPermissions("serviceOrder:newsdocument:page")
public Result<PageData<NewsDocumentDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<NewsDocumentDTO> page = newsDocumentService.page(params);
return new Result<PageData<NewsDocumentDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
@RequiresPermissions("serviceOrder:newsdocument:info")
public Result<NewsDocumentDTO> get(@PathVariable("id") Long id){
NewsDocumentDTO data = newsDocumentService.get(id);
return new Result<NewsDocumentDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
@RequiresPermissions("serviceOrder:newsdocument:save")
public Result save(@RequestBody NewsDocumentDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
newsDocumentService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
@RequiresPermissions("serviceOrder:newsdocument:update")
public Result update(@RequestBody NewsDocumentDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
newsDocumentService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
@RequiresPermissions("serviceOrder:newsdocument:delete")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
newsDocumentService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
@RequiresPermissions("serviceOrder:newsdocument:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<NewsDocumentDTO> list = newsDocumentService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, NewsDocumentExcel.class);
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.annotation.LogOperation;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.ExcelUtils;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.RoleDTO;
import io.hmit.modules.serviceOrder.excel.RoleExcel;
import io.hmit.modules.serviceOrder.service.RoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 角色管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/role")
@Api(tags="角色管理")
public class RoleController {
@Autowired
private RoleService roleService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
@RequiresPermissions("serviceOrder:role:page")
public Result<PageData<RoleDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<RoleDTO> page = roleService.page(params);
return new Result<PageData<RoleDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
@RequiresPermissions("serviceOrder:role:info")
public Result<RoleDTO> get(@PathVariable("id") Long id){
RoleDTO data = roleService.get(id);
return new Result<RoleDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
@RequiresPermissions("serviceOrder:role:save")
public Result save(@RequestBody RoleDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
roleService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
@RequiresPermissions("serviceOrder:role:update")
public Result update(@RequestBody RoleDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
roleService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
@RequiresPermissions("serviceOrder:role:delete")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
roleService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
@RequiresPermissions("serviceOrder:role:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<RoleDTO> list = roleService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, RoleExcel.class);
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.annotation.LogOperation;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.ExcelUtils;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.RoleServiceDTO;
import io.hmit.modules.serviceOrder.excel.RoleServiceExcel;
import io.hmit.modules.serviceOrder.service.RoleServiceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 角色菜单关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/roleservice")
@Api(tags="角色菜单关系")
public class RoleServiceController {
@Autowired
private RoleServiceService roleServiceService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
@RequiresPermissions("serviceOrder:roleservice:page")
public Result<PageData<RoleServiceDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<RoleServiceDTO> page = roleServiceService.page(params);
return new Result<PageData<RoleServiceDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
@RequiresPermissions("serviceOrder:roleservice:info")
public Result<RoleServiceDTO> get(@PathVariable("id") Long id){
RoleServiceDTO data = roleServiceService.get(id);
return new Result<RoleServiceDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
@RequiresPermissions("serviceOrder:roleservice:save")
public Result save(@RequestBody RoleServiceDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
roleServiceService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
@RequiresPermissions("serviceOrder:roleservice:update")
public Result update(@RequestBody RoleServiceDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
roleServiceService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
@RequiresPermissions("serviceOrder:roleservice:delete")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
roleServiceService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
@RequiresPermissions("serviceOrder:roleservice:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<RoleServiceDTO> list = roleServiceService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, RoleServiceExcel.class);
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.annotation.LogOperation;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.ExcelUtils;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.RoleUserDTO;
import io.hmit.modules.serviceOrder.excel.RoleUserExcel;
import io.hmit.modules.serviceOrder.service.RoleUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 角色用户关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/roleuser")
@Api(tags="角色用户关系")
public class RoleUserController {
@Autowired
private RoleUserService roleUserService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
@RequiresPermissions("serviceOrder:roleuser:page")
public Result<PageData<RoleUserDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<RoleUserDTO> page = roleUserService.page(params);
return new Result<PageData<RoleUserDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
@RequiresPermissions("serviceOrder:roleuser:info")
public Result<RoleUserDTO> get(@PathVariable("id") Long id){
RoleUserDTO data = roleUserService.get(id);
return new Result<RoleUserDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
@RequiresPermissions("serviceOrder:roleuser:save")
public Result save(@RequestBody RoleUserDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
roleUserService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
@RequiresPermissions("serviceOrder:roleuser:update")
public Result update(@RequestBody RoleUserDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
roleUserService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
@RequiresPermissions("serviceOrder:roleuser:delete")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
roleUserService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
@RequiresPermissions("serviceOrder:roleuser:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<RoleUserDTO> list = roleUserService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, RoleUserExcel.class);
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.NewsEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 新闻管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface NewsDao extends BaseDao<NewsEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.NewsDocumentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface NewsDocumentDao extends BaseDao<NewsDocumentEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.RoleEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 角色管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface RoleDao extends BaseDao<RoleEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.RoleServiceEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 角色菜单关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface RoleServiceDao extends BaseDao<RoleServiceEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.RoleUserEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 角色用户关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface RoleUserDao extends BaseDao<RoleUserEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 新闻管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "新闻管理")
public class NewsDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "标题")
private String title;
@ApiModelProperty(value = "内容")
private String content;
@ApiModelProperty(value = "发布时间")
private Date pubDate;
@ApiModelProperty(value = "创建者dept_id")
private Long deptId;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "服务及相关图片附件关联表")
public class NewsDocumentDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "")
private Long id;
@ApiModelProperty(value = "新闻id")
private Long newId;
@ApiModelProperty(value = "文件id")
private Long docId;
@ApiModelProperty(value = "文件名")
private String fileName;
@ApiModelProperty(value = "文件链接")
private String filePath;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 角色管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "角色管理")
public class RoleDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "角色名称")
private String name;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "部门ID")
private Long deptId;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 角色菜单关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "角色菜单关系")
public class RoleServiceDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "角色ID")
private Long roleId;
@ApiModelProperty(value = "菜单ID")
private Long serviceTypeId;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 角色用户关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "角色用户关系")
public class RoleUserDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "角色ID")
private Long roleId;
@ApiModelProperty(value = "用户ID")
private Long userId;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_news_document")
public class NewsDocumentEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 新闻id
*/
private Long newId;
/**
* 文件id
*/
private Long docId;
/**
* 文件名
*/
private String fileName;
/**
* 文件链接
*/
private String filePath;
/**
* 备注
*/
private String remark;
/**
* 更新者
*/
private Long updater;
/**
* 更新时间
*/
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 新闻管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_news")
public class NewsEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 发布时间
*/
private Date pubDate;
/**
* 创建者dept_id
*/
private Long deptId;
/**
* 更新者
*/
private Long updater;
/**
* 更新时间
*/
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 角色管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_role")
public class RoleEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 角色名称
*/
private String name;
/**
* 备注
*/
private String remark;
/**
* 部门ID
*/
private Long deptId;
/**
* 更新者
*/
private Long updater;
/**
* 更新时间
*/
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 角色菜单关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_role_service")
public class RoleServiceEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 角色ID
*/
private Long roleId;
/**
* 菜单ID
*/
private Long serviceTypeId;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 角色用户关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_role_user")
public class RoleUserEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 角色ID
*/
private Long roleId;
/**
* 用户ID
*/
private Long userId;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
public class NewsDocumentExcel {
@Excel(name = "")
private Long id;
@Excel(name = "新闻id")
private Long newId;
@Excel(name = "文件id")
private Long docId;
@Excel(name = "文件名")
private String fileName;
@Excel(name = "文件链接")
private String filePath;
@Excel(name = "备注")
private String remark;
@Excel(name = "创建者")
private Long creator;
@Excel(name = "创建时间")
private Date createDate;
@Excel(name = "更新者")
private Long updater;
@Excel(name = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 新闻管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
public class NewsExcel {
@Excel(name = "id")
private Long id;
@Excel(name = "标题")
private String title;
@Excel(name = "内容")
private String content;
@Excel(name = "发布时间")
private Date pubDate;
@Excel(name = "创建者dept_id")
private Long deptId;
@Excel(name = "创建者")
private Long creator;
@Excel(name = "创建时间")
private Date createDate;
@Excel(name = "更新者")
private Long updater;
@Excel(name = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 角色管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
public class RoleExcel {
@Excel(name = "id")
private Long id;
@Excel(name = "角色名称")
private String name;
@Excel(name = "备注")
private String remark;
@Excel(name = "部门ID")
private Long deptId;
@Excel(name = "创建者")
private Long creator;
@Excel(name = "创建时间")
private Date createDate;
@Excel(name = "更新者")
private Long updater;
@Excel(name = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 角色菜单关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
public class RoleServiceExcel {
@Excel(name = "id")
private Long id;
@Excel(name = "角色ID")
private Long roleId;
@Excel(name = "菜单ID")
private Long serviceTypeId;
@Excel(name = "创建者")
private Long creator;
@Excel(name = "创建时间")
private Date createDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 角色用户关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
public class RoleUserExcel {
@Excel(name = "id")
private Long id;
@Excel(name = "角色ID")
private Long roleId;
@Excel(name = "用户ID")
private Long userId;
@Excel(name = "创建者")
private Long creator;
@Excel(name = "创建时间")
private Date createDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.NewsDocumentDTO;
import io.hmit.modules.serviceOrder.entity.NewsDocumentEntity;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface NewsDocumentService extends CrudService<NewsDocumentEntity, NewsDocumentDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.NewsDTO;
import io.hmit.modules.serviceOrder.entity.NewsEntity;
/**
* 新闻管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface NewsService extends CrudService<NewsEntity, NewsDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.RoleDTO;
import io.hmit.modules.serviceOrder.entity.RoleEntity;
/**
* 角色管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface RoleService extends CrudService<RoleEntity, RoleDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.RoleServiceDTO;
import io.hmit.modules.serviceOrder.entity.RoleServiceEntity;
/**
* 角色菜单关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface RoleServiceService extends CrudService<RoleServiceEntity, RoleServiceDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.RoleUserDTO;
import io.hmit.modules.serviceOrder.entity.RoleUserEntity;
/**
* 角色用户关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface RoleUserService extends CrudService<RoleUserEntity, RoleUserDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.NewsDocumentDao;
import io.hmit.modules.serviceOrder.dto.NewsDocumentDTO;
import io.hmit.modules.serviceOrder.entity.NewsDocumentEntity;
import io.hmit.modules.serviceOrder.service.NewsDocumentService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class NewsDocumentServiceImpl extends CrudServiceImpl<NewsDocumentDao, NewsDocumentEntity, NewsDocumentDTO> implements NewsDocumentService {
@Override
public QueryWrapper<NewsDocumentEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<NewsDocumentEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.NewsDao;
import io.hmit.modules.serviceOrder.dto.NewsDTO;
import io.hmit.modules.serviceOrder.entity.NewsEntity;
import io.hmit.modules.serviceOrder.service.NewsService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 新闻管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class NewsServiceImpl extends CrudServiceImpl<NewsDao, NewsEntity, NewsDTO> implements NewsService {
@Override
public QueryWrapper<NewsEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<NewsEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.RoleDao;
import io.hmit.modules.serviceOrder.dto.RoleDTO;
import io.hmit.modules.serviceOrder.entity.RoleEntity;
import io.hmit.modules.serviceOrder.service.RoleService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 角色管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class RoleServiceImpl extends CrudServiceImpl<RoleDao, RoleEntity, RoleDTO> implements RoleService {
@Override
public QueryWrapper<RoleEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<RoleEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.RoleServiceDao;
import io.hmit.modules.serviceOrder.dto.RoleServiceDTO;
import io.hmit.modules.serviceOrder.entity.RoleServiceEntity;
import io.hmit.modules.serviceOrder.service.RoleServiceService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 角色菜单关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class RoleServiceServiceImpl extends CrudServiceImpl<RoleServiceDao, RoleServiceEntity, RoleServiceDTO> implements RoleServiceService {
@Override
public QueryWrapper<RoleServiceEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<RoleServiceEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.RoleUserDao;
import io.hmit.modules.serviceOrder.dto.RoleUserDTO;
import io.hmit.modules.serviceOrder.entity.RoleUserEntity;
import io.hmit.modules.serviceOrder.service.RoleUserService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 角色用户关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class RoleUserServiceImpl extends CrudServiceImpl<RoleUserDao, RoleUserEntity, RoleUserDTO> implements RoleUserService {
@Override
public QueryWrapper<RoleUserEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<RoleUserEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
<?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="io.hmit.modules.serviceOrder.dao.NewsDao">
<resultMap type="io.hmit.modules.serviceOrder.entity.NewsEntity" id="newsMap">
<result property="id" column="id"/>
<result property="title" column="title"/>
<result property="content" column="content"/>
<result property="pubDate" column="pub_date"/>
<result property="deptId" column="dept_id"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="updateDate" column="update_date"/>
</resultMap>
</mapper>
\ No newline at end of file
<?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="io.hmit.modules.serviceOrder.dao.NewsDocumentDao">
<resultMap type="io.hmit.modules.serviceOrder.entity.NewsDocumentEntity" id="newsDocumentMap">
<result property="id" column="id"/>
<result property="newId" column="new_id"/>
<result property="docId" column="doc_id"/>
<result property="fileName" column="file_name"/>
<result property="filePath" column="file_path"/>
<result property="remark" column="remark"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="updateDate" column="update_date"/>
</resultMap>
</mapper>
\ No newline at end of file
<?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="io.hmit.modules.serviceOrder.dao.RoleDao">
<resultMap type="io.hmit.modules.serviceOrder.entity.RoleEntity" id="roleMap">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="remark" column="remark"/>
<result property="deptId" column="dept_id"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="updateDate" column="update_date"/>
</resultMap>
</mapper>
\ No newline at end of file
<?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="io.hmit.modules.serviceOrder.dao.RoleServiceDao">
<resultMap type="io.hmit.modules.serviceOrder.entity.RoleServiceEntity" id="roleServiceMap">
<result property="id" column="id"/>
<result property="roleId" column="role_id"/>
<result property="serviceTypeId" column="service_type_id"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
</resultMap>
</mapper>
\ No newline at end of file
<?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="io.hmit.modules.serviceOrder.dao.RoleUserDao">
<resultMap type="io.hmit.modules.serviceOrder.entity.RoleUserEntity" id="roleUserMap">
<result property="id" column="id"/>
<result property="roleId" column="role_id"/>
<result property="userId" column="user_id"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
</resultMap>
</mapper>
\ No newline at end of file
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.NewsDTO;
import io.hmit.modules.serviceOrder.service.NewsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 新闻管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/news")
@Api(tags="新闻管理")
public class NewsController {
@Autowired
private NewsService newsService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
public Result<PageData<NewsDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<NewsDTO> page = newsService.page(params);
return new Result<PageData<NewsDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
public Result<NewsDTO> get(@PathVariable("id") Long id){
NewsDTO data = newsService.get(id);
return new Result<NewsDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
public Result save(@RequestBody NewsDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
newsService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
public Result update(@RequestBody NewsDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
newsService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
newsService.delete(ids);
return new Result();
}
}
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.NewsDocumentDTO;
import io.hmit.modules.serviceOrder.service.NewsDocumentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/newsdocument")
@Api(tags="服务及相关图片附件关联表")
public class NewsDocumentController {
@Autowired
private NewsDocumentService newsDocumentService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
public Result<PageData<NewsDocumentDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<NewsDocumentDTO> page = newsDocumentService.page(params);
return new Result<PageData<NewsDocumentDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
public Result<NewsDocumentDTO> get(@PathVariable("id") Long id){
NewsDocumentDTO data = newsDocumentService.get(id);
return new Result<NewsDocumentDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
public Result save(@RequestBody NewsDocumentDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
newsDocumentService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
public Result update(@RequestBody NewsDocumentDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
newsDocumentService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
newsDocumentService.delete(ids);
return new Result();
}
}
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.PensionOrderDTO;
import io.hmit.modules.serviceOrder.service.PensionOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 订单表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/pensionorder")
@Api(tags="订单表")
public class PensionOrderController {
@Autowired
private PensionOrderService pensionOrderService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
public Result<PageData<PensionOrderDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<PensionOrderDTO> page = pensionOrderService.page(params);
return new Result<PageData<PensionOrderDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
public Result<PensionOrderDTO> get(@PathVariable("id") Long id){
PensionOrderDTO data = pensionOrderService.get(id);
return new Result<PensionOrderDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
public Result save(@RequestBody PensionOrderDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
pensionOrderService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
public Result update(@RequestBody PensionOrderDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
pensionOrderService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
pensionOrderService.delete(ids);
return new Result();
}
}
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.PensionOrderServiceDTO;
import io.hmit.modules.serviceOrder.service.PensionOrderServiceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 订单服务关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/pensionorderservice")
@Api(tags="订单服务关联表")
public class PensionOrderServiceController {
@Autowired
private PensionOrderServiceService pensionOrderServiceService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
public Result<PageData<PensionOrderServiceDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<PensionOrderServiceDTO> page = pensionOrderServiceService.page(params);
return new Result<PageData<PensionOrderServiceDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
public Result<PensionOrderServiceDTO> get(@PathVariable("id") Long id){
PensionOrderServiceDTO data = pensionOrderServiceService.get(id);
return new Result<PensionOrderServiceDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
public Result save(@RequestBody PensionOrderServiceDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
pensionOrderServiceService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
public Result update(@RequestBody PensionOrderServiceDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
pensionOrderServiceService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
pensionOrderServiceService.delete(ids);
return new Result();
}
}
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.PensionServiceDTO;
import io.hmit.modules.serviceOrder.service.PensionServiceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 服务表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/pensionservice")
@Api(tags="服务表")
public class PensionServiceController {
@Autowired
private PensionServiceService pensionServiceService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
public Result<PageData<PensionServiceDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<PensionServiceDTO> page = pensionServiceService.page(params);
return new Result<PageData<PensionServiceDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
//@RequiresPermissions("serviceOrder:pensionservice:info")
public Result<PensionServiceDTO> get(@PathVariable("id") Long id){
PensionServiceDTO data = pensionServiceService.get(id);
return new Result<PensionServiceDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
//@RequiresPermissions("serviceOrder:pensionservice:save")
public Result save(@RequestBody PensionServiceDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
pensionServiceService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
//@RequiresPermissions("serviceOrder:pensionservice:update")
public Result update(@RequestBody PensionServiceDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
pensionServiceService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
//@RequiresPermissions("serviceOrder:pensionservice:delete")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
pensionServiceService.delete(ids);
return new Result();
}
}
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.PensionServiceDocumentDTO;
import io.hmit.modules.serviceOrder.service.PensionServiceDocumentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/pensionservicedocument")
@Api(tags="服务及相关图片附件关联表")
public class PensionServiceDocumentController {
@Autowired
private PensionServiceDocumentService pensionServiceDocumentService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
public Result<PageData<PensionServiceDocumentDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<PensionServiceDocumentDTO> page = pensionServiceDocumentService.page(params);
return new Result<PageData<PensionServiceDocumentDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
public Result<PensionServiceDocumentDTO> get(@PathVariable("id") Long id){
PensionServiceDocumentDTO data = pensionServiceDocumentService.get(id);
return new Result<PensionServiceDocumentDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
public Result save(@RequestBody PensionServiceDocumentDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
pensionServiceDocumentService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
public Result update(@RequestBody PensionServiceDocumentDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
pensionServiceDocumentService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
pensionServiceDocumentService.delete(ids);
return new Result();
}
}
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.PensionServiceTypeDTO;
import io.hmit.modules.serviceOrder.service.PensionServiceTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 服务种类表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/pensionservicetype")
@Api(tags="服务种类表")
public class PensionServiceTypeController {
@Autowired
private PensionServiceTypeService pensionServiceTypeService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
public Result<PageData<PensionServiceTypeDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<PensionServiceTypeDTO> page = pensionServiceTypeService.page(params);
return new Result<PageData<PensionServiceTypeDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
public Result<PensionServiceTypeDTO> get(@PathVariable("id") Long id){
PensionServiceTypeDTO data = pensionServiceTypeService.get(id);
return new Result<PensionServiceTypeDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
public Result save(@RequestBody PensionServiceTypeDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
pensionServiceTypeService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
public Result update(@RequestBody PensionServiceTypeDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
pensionServiceTypeService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
pensionServiceTypeService.delete(ids);
return new Result();
}
}
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.RoleDTO;
import io.hmit.modules.serviceOrder.service.RoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 角色管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/role")
@Api(tags="角色管理")
public class RoleController {
@Autowired
private RoleService roleService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
public Result<PageData<RoleDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<RoleDTO> page = roleService.page(params);
return new Result<PageData<RoleDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
public Result<RoleDTO> get(@PathVariable("id") Long id){
RoleDTO data = roleService.get(id);
return new Result<RoleDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
public Result save(@RequestBody RoleDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
roleService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
public Result update(@RequestBody RoleDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
roleService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
roleService.delete(ids);
return new Result();
}
}
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.RoleServiceDTO;
import io.hmit.modules.serviceOrder.service.RoleServiceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 角色菜单关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/roleservice")
@Api(tags="角色菜单关系")
public class RoleServiceController {
@Autowired
private RoleServiceService roleServiceService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
public Result<PageData<RoleServiceDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<RoleServiceDTO> page = roleServiceService.page(params);
return new Result<PageData<RoleServiceDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
public Result<RoleServiceDTO> get(@PathVariable("id") Long id){
RoleServiceDTO data = roleServiceService.get(id);
return new Result<RoleServiceDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
public Result save(@RequestBody RoleServiceDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
roleServiceService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
public Result update(@RequestBody RoleServiceDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
roleServiceService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
roleServiceService.delete(ids);
return new Result();
}
}
package io.hmit.modules.serviceOrder.controller;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.Result;
import io.hmit.common.validator.AssertUtils;
import io.hmit.common.validator.ValidatorUtils;
import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.serviceOrder.dto.RoleUserDTO;
import io.hmit.modules.serviceOrder.service.RoleUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 角色用户关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@RestController
@RequestMapping("serviceOrder/roleuser")
@Api(tags="角色用户关系")
public class RoleUserController {
@Autowired
private RoleUserService roleUserService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
public Result<PageData<RoleUserDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<RoleUserDTO> page = roleUserService.page(params);
return new Result<PageData<RoleUserDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
public Result<RoleUserDTO> get(@PathVariable("id") Long id){
RoleUserDTO data = roleUserService.get(id);
return new Result<RoleUserDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
public Result save(@RequestBody RoleUserDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
roleUserService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
public Result update(@RequestBody RoleUserDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
roleUserService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
roleUserService.delete(ids);
return new Result();
}
}
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.NewsEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 新闻管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface NewsDao extends BaseDao<NewsEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.NewsDocumentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface NewsDocumentDao extends BaseDao<NewsDocumentEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.PensionOrderEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 订单表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface PensionOrderDao extends BaseDao<PensionOrderEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.PensionOrderServiceEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 订单服务关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface PensionOrderServiceDao extends BaseDao<PensionOrderServiceEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.PensionServiceEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 服务表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface PensionServiceDao extends BaseDao<PensionServiceEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.PensionServiceDocumentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface PensionServiceDocumentDao extends BaseDao<PensionServiceDocumentEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.PensionServiceTypeEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 服务种类表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface PensionServiceTypeDao extends BaseDao<PensionServiceTypeEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.RoleEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 角色管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface RoleDao extends BaseDao<RoleEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.RoleServiceEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 角色菜单关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface RoleServiceDao extends BaseDao<RoleServiceEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.entity.RoleUserEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 角色用户关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Mapper
public interface RoleUserDao extends BaseDao<RoleUserEntity> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 新闻管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "新闻管理")
public class NewsDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "标题")
private String title;
@ApiModelProperty(value = "内容")
private String content;
@ApiModelProperty(value = "发布时间")
private Date pubDate;
@ApiModelProperty(value = "创建者dept_id")
private Long deptId;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "服务及相关图片附件关联表")
public class NewsDocumentDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "")
private Long id;
@ApiModelProperty(value = "新闻id")
private Long newId;
@ApiModelProperty(value = "文件id")
private Long docId;
@ApiModelProperty(value = "文件名")
private String fileName;
@ApiModelProperty(value = "文件链接")
private String filePath;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 订单表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "订单表")
public class PensionOrderDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "订单编号")
private String orderNum;
@ApiModelProperty(value = "订单状态")
private Integer status;
@ApiModelProperty(value = "订单状态名称")
private String statusName;
@ApiModelProperty(value = "详细地址")
private String address;
@ApiModelProperty(value = "订单所属的服务id")
private Long serviceId;
@ApiModelProperty(value = "订单所属的服务名称")
private String serviceName;
@ApiModelProperty(value = "预约人")
private String appointmentPerson;
@ApiModelProperty(value = "预约人电话")
private String appointmentPhone;
@ApiModelProperty(value = "预约时间")
private Date appointmentTime;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "接单人id")
private Long orderRecipientId;
@ApiModelProperty(value = "接单人姓名")
private String orderRecipientName;
@ApiModelProperty(value = "接单时间")
private Date orderRecipientTime;
@ApiModelProperty(value = "接单人电话")
private String orderRecipientPhone;
@ApiModelProperty(value = "部门ID")
private Long deptId;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "订单发起人")
private String creatorName;
@ApiModelProperty(value = "订单发起人联系电话")
private String creatorTel;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 订单服务关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "订单服务关联表")
public class PensionOrderServiceDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "")
private Long id;
@ApiModelProperty(value = "订单id")
private Long orderId;
@ApiModelProperty(value = "服务id")
private Long serviceId;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 服务表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "服务表")
public class PensionServiceDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "服务名称")
private String name;
@ApiModelProperty(value = "服务类型")
private Long serviceTypeId;
@ApiModelProperty(value = "排序")
private Integer sort;
@ApiModelProperty(value = "首页图标地址")
private String icon;
@ApiModelProperty(value = "详情页大图地址")
private String detailPicture;
@ApiModelProperty(value = "价格")
private BigDecimal price;
@ApiModelProperty(value = "积分值")
private Integer giftPoint;
@ApiModelProperty(value = "服务次数")
private Integer timesNum;
@ApiModelProperty(value = "服务时间")
private String serviceTime;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "部门ID")
private Long deptId;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "服务及相关图片附件关联表")
public class PensionServiceDocumentDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "")
private Long id;
@ApiModelProperty(value = "服务id")
private Long serviceId;
@ApiModelProperty(value = "文件id")
private Long docId;
@ApiModelProperty(value = "文件名")
private String fileName;
@ApiModelProperty(value = "文件链接")
private String filePath;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 服务种类表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "服务种类表")
public class PensionServiceTypeDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "类型名称")
private String name;
@ApiModelProperty(value = "排序")
private Integer sort;
@ApiModelProperty(value = "图标地址")
private String icon;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "部门ID")
private Long deptId;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 角色管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "角色管理")
public class RoleDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "角色名称")
private String name;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "部门ID")
private Long deptId;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 角色菜单关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "角色菜单关系")
public class RoleServiceDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "角色ID")
private Long roleId;
@ApiModelProperty(value = "菜单ID")
private Long serviceTypeId;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 角色用户关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@ApiModel(value = "角色用户关系")
public class RoleUserDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "角色ID")
private Long roleId;
@ApiModelProperty(value = "用户ID")
private Long userId;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_news_document")
public class NewsDocumentEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 新闻id
*/
private Long newId;
/**
* 文件id
*/
private Long docId;
/**
* 文件名
*/
private String fileName;
/**
* 文件链接
*/
private String filePath;
/**
* 备注
*/
private String remark;
/**
* 更新者
*/
private Long updater;
/**
* 更新时间
*/
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 新闻管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_news")
public class NewsEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 发布时间
*/
private Date pubDate;
/**
* 创建者dept_id
*/
private Long deptId;
/**
* 更新者
*/
private Long updater;
/**
* 更新时间
*/
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 订单表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("pension_order")
public class PensionOrderEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 订单编号
*/
private String orderNum;
/**
* 订单状态
*/
private Integer status;
/**
* 订单状态名称
*/
private String statusName;
/**
* 详细地址
*/
private String address;
/**
* 订单所属的服务id
*/
private Long serviceId;
/**
* 订单所属的服务名称
*/
private String serviceName;
/**
* 预约人
*/
private String appointmentPerson;
/**
* 预约人电话
*/
private String appointmentPhone;
/**
* 预约时间
*/
private Date appointmentTime;
/**
* 备注
*/
private String remark;
/**
* 接单人id
*/
private Long orderRecipientId;
/**
* 接单人姓名
*/
private String orderRecipientName;
/**
* 接单时间
*/
private Date orderRecipientTime;
/**
* 接单人电话
*/
private String orderRecipientPhone;
/**
* 部门ID
*/
private Long deptId;
/**
* 订单发起人
*/
private String creatorName;
/**
* 订单发起人联系电话
*/
private String creatorTel;
/**
* 更新者
*/
private Long updater;
/**
* 更新时间
*/
private Date updateDate;
}
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 订单服务关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("pension_order_service")
public class PensionOrderServiceEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 订单id
*/
private Long orderId;
/**
* 服务id
*/
private Long serviceId;
/**
* 备注
*/
private String remark;
/**
* 更新者
*/
private Long updater;
/**
* 更新时间
*/
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("pension_service_document")
public class PensionServiceDocumentEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 服务id
*/
private Long serviceId;
/**
* 文件id
*/
private Long docId;
/**
* 文件名
*/
private String fileName;
/**
* 文件链接
*/
private String filePath;
/**
* 备注
*/
private String remark;
/**
* 更新者
*/
private Long updater;
/**
* 更新时间
*/
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
/**
* 服务表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("pension_service")
public class PensionServiceEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 服务名称
*/
private String name;
/**
* 服务类型
*/
private Long serviceTypeId;
/**
* 排序
*/
private Integer sort;
/**
* 首页图标地址
*/
private String icon;
/**
* 详情页大图地址
*/
private String detailPicture;
/**
* 价格
*/
private BigDecimal price;
/**
* 积分值
*/
private Integer giftPoint;
/**
* 服务次数
*/
private Integer timesNum;
/**
* 服务时间
*/
private String serviceTime;
/**
* 备注
*/
private String remark;
/**
* 部门ID
*/
private Long deptId;
/**
* 更新者
*/
private Long updater;
/**
* 更新时间
*/
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 服务种类表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("pension_service_type")
public class PensionServiceTypeEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 类型名称
*/
private String name;
/**
* 排序
*/
private Integer sort;
/**
* 图标地址
*/
private String icon;
/**
* 备注
*/
private String remark;
/**
* 部门ID
*/
private Long deptId;
/**
* 更新者
*/
private Long updater;
/**
* 更新时间
*/
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 角色管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_role")
public class RoleEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 角色名称
*/
private String name;
/**
* 备注
*/
private String remark;
/**
* 部门ID
*/
private Long deptId;
/**
* 更新者
*/
private Long updater;
/**
* 更新时间
*/
private Date updateDate;
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 角色菜单关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_role_service")
public class RoleServiceEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 角色ID
*/
private Long roleId;
/**
* 菜单ID
*/
private Long serviceTypeId;
}
package io.hmit.modules.serviceOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.hmit.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 角色用户关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_role_user")
public class RoleUserEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 角色ID
*/
private Long roleId;
/**
* 用户ID
*/
private Long userId;
}
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.NewsDocumentDTO;
import io.hmit.modules.serviceOrder.entity.NewsDocumentEntity;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface NewsDocumentService extends CrudService<NewsDocumentEntity, NewsDocumentDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.NewsDTO;
import io.hmit.modules.serviceOrder.entity.NewsEntity;
/**
* 新闻管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface NewsService extends CrudService<NewsEntity, NewsDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.PensionOrderDTO;
import io.hmit.modules.serviceOrder.entity.PensionOrderEntity;
/**
* 订单表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface PensionOrderService extends CrudService<PensionOrderEntity, PensionOrderDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.PensionOrderServiceDTO;
import io.hmit.modules.serviceOrder.entity.PensionOrderServiceEntity;
/**
* 订单服务关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface PensionOrderServiceService extends CrudService<PensionOrderServiceEntity, PensionOrderServiceDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.PensionServiceDocumentDTO;
import io.hmit.modules.serviceOrder.entity.PensionServiceDocumentEntity;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface PensionServiceDocumentService extends CrudService<PensionServiceDocumentEntity, PensionServiceDocumentDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.PensionServiceDTO;
import io.hmit.modules.serviceOrder.entity.PensionServiceEntity;
/**
* 服务表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface PensionServiceService extends CrudService<PensionServiceEntity, PensionServiceDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.PensionServiceTypeDTO;
import io.hmit.modules.serviceOrder.entity.PensionServiceTypeEntity;
/**
* 服务种类表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface PensionServiceTypeService extends CrudService<PensionServiceTypeEntity, PensionServiceTypeDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.RoleDTO;
import io.hmit.modules.serviceOrder.entity.RoleEntity;
/**
* 角色管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface RoleService extends CrudService<RoleEntity, RoleDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.RoleServiceDTO;
import io.hmit.modules.serviceOrder.entity.RoleServiceEntity;
/**
* 角色菜单关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface RoleServiceService extends CrudService<RoleServiceEntity, RoleServiceDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.RoleUserDTO;
import io.hmit.modules.serviceOrder.entity.RoleUserEntity;
/**
* 角色用户关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
public interface RoleUserService extends CrudService<RoleUserEntity, RoleUserDTO> {
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.NewsDocumentDao;
import io.hmit.modules.serviceOrder.dto.NewsDocumentDTO;
import io.hmit.modules.serviceOrder.entity.NewsDocumentEntity;
import io.hmit.modules.serviceOrder.service.NewsDocumentService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class NewsDocumentServiceImpl extends CrudServiceImpl<NewsDocumentDao, NewsDocumentEntity, NewsDocumentDTO> implements NewsDocumentService {
@Override
public QueryWrapper<NewsDocumentEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<NewsDocumentEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.NewsDao;
import io.hmit.modules.serviceOrder.dto.NewsDTO;
import io.hmit.modules.serviceOrder.entity.NewsEntity;
import io.hmit.modules.serviceOrder.service.NewsService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 新闻管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class NewsServiceImpl extends CrudServiceImpl<NewsDao, NewsEntity, NewsDTO> implements NewsService {
@Override
public QueryWrapper<NewsEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<NewsEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.PensionOrderDao;
import io.hmit.modules.serviceOrder.dto.PensionOrderDTO;
import io.hmit.modules.serviceOrder.entity.PensionOrderEntity;
import io.hmit.modules.serviceOrder.service.PensionOrderService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 订单表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, PensionOrderEntity, PensionOrderDTO> implements PensionOrderService {
@Override
public QueryWrapper<PensionOrderEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<PensionOrderEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.PensionOrderServiceDao;
import io.hmit.modules.serviceOrder.dto.PensionOrderServiceDTO;
import io.hmit.modules.serviceOrder.entity.PensionOrderServiceEntity;
import io.hmit.modules.serviceOrder.service.PensionOrderServiceService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 订单服务关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class PensionOrderServiceServiceImpl extends CrudServiceImpl<PensionOrderServiceDao, PensionOrderServiceEntity, PensionOrderServiceDTO> implements PensionOrderServiceService {
@Override
public QueryWrapper<PensionOrderServiceEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<PensionOrderServiceEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.PensionServiceDocumentDao;
import io.hmit.modules.serviceOrder.dto.PensionServiceDocumentDTO;
import io.hmit.modules.serviceOrder.entity.PensionServiceDocumentEntity;
import io.hmit.modules.serviceOrder.service.PensionServiceDocumentService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 服务及相关图片附件关联表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class PensionServiceDocumentServiceImpl extends CrudServiceImpl<PensionServiceDocumentDao, PensionServiceDocumentEntity, PensionServiceDocumentDTO> implements PensionServiceDocumentService {
@Override
public QueryWrapper<PensionServiceDocumentEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<PensionServiceDocumentEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.PensionServiceDao;
import io.hmit.modules.serviceOrder.dto.PensionServiceDTO;
import io.hmit.modules.serviceOrder.entity.PensionServiceEntity;
import io.hmit.modules.serviceOrder.service.PensionServiceService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 服务表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class PensionServiceServiceImpl extends CrudServiceImpl<PensionServiceDao, PensionServiceEntity, PensionServiceDTO> implements PensionServiceService {
@Override
public QueryWrapper<PensionServiceEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<PensionServiceEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.PensionServiceTypeDao;
import io.hmit.modules.serviceOrder.dto.PensionServiceTypeDTO;
import io.hmit.modules.serviceOrder.entity.PensionServiceTypeEntity;
import io.hmit.modules.serviceOrder.service.PensionServiceTypeService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 服务种类表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class PensionServiceTypeServiceImpl extends CrudServiceImpl<PensionServiceTypeDao, PensionServiceTypeEntity, PensionServiceTypeDTO> implements PensionServiceTypeService {
@Override
public QueryWrapper<PensionServiceTypeEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<PensionServiceTypeEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.RoleDao;
import io.hmit.modules.serviceOrder.dto.RoleDTO;
import io.hmit.modules.serviceOrder.entity.RoleEntity;
import io.hmit.modules.serviceOrder.service.RoleService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 角色管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class RoleServiceImpl extends CrudServiceImpl<RoleDao, RoleEntity, RoleDTO> implements RoleService {
@Override
public QueryWrapper<RoleEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<RoleEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.RoleServiceDao;
import io.hmit.modules.serviceOrder.dto.RoleServiceDTO;
import io.hmit.modules.serviceOrder.entity.RoleServiceEntity;
import io.hmit.modules.serviceOrder.service.RoleServiceService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 角色菜单关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class RoleServiceServiceImpl extends CrudServiceImpl<RoleServiceDao, RoleServiceEntity, RoleServiceDTO> implements RoleServiceService {
@Override
public QueryWrapper<RoleServiceEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<RoleServiceEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
package io.hmit.modules.serviceOrder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.RoleUserDao;
import io.hmit.modules.serviceOrder.dto.RoleUserDTO;
import io.hmit.modules.serviceOrder.entity.RoleUserEntity;
import io.hmit.modules.serviceOrder.service.RoleUserService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 角色用户关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-01-26
*/
@Service
public class RoleUserServiceImpl extends CrudServiceImpl<RoleUserDao, RoleUserEntity, RoleUserDTO> implements RoleUserService {
@Override
public QueryWrapper<RoleUserEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<RoleUserEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment