diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java index 36a9094..53a9be0 100644 --- a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java @@ -53,7 +53,7 @@ public class ManyDataSource { List list = new ArrayList<>(); list.add( EnterPriseInfo.builder() - .entCode("jiang_0606") + .entCode("jiang_0612") .ip("101.34.248.9") .port(3309) .build() diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceEditReq.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceEditReq.java index 90a34f5..33c7f85 100644 --- a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceEditReq.java +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceEditReq.java @@ -1,12 +1,12 @@ package com.muyu.customer.business.domain.req; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; -import lombok.AllArgsConstructor; -import lombok.experimental.SuperBuilder; -import io.swagger.annotations.*; import com.muyu.common.core.web.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; /** * 电子围栏对象 fence diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceQueryReq.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceQueryReq.java index f80157d..61beac3 100644 --- a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceQueryReq.java +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceQueryReq.java @@ -1,12 +1,12 @@ package com.muyu.customer.business.domain.req; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; -import lombok.AllArgsConstructor; -import lombok.experimental.SuperBuilder; -import io.swagger.annotations.*; import com.muyu.common.core.web.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; /** * 电子围栏对象 fence diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceSaveReq.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceSaveReq.java index 9244ffe..8361f72 100644 --- a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceSaveReq.java +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceSaveReq.java @@ -1,12 +1,12 @@ package com.muyu.customer.business.domain.req; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; -import lombok.AllArgsConstructor; -import lombok.experimental.SuperBuilder; -import io.swagger.annotations.*; import com.muyu.common.core.web.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; /** * 电子围栏对象 fence diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleEditReq.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleEditReq.java index 8e2b936..270283c 100644 --- a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleEditReq.java +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleEditReq.java @@ -1,15 +1,16 @@ package com.muyu.customer.business.domain.req; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.muyu.common.core.web.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + import java.math.BigDecimal; import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; -import lombok.AllArgsConstructor; -import lombok.experimental.SuperBuilder; -import io.swagger.annotations.*; -import com.muyu.common.core.web.domain.BaseEntity; /** * 车辆录入对象 vehicle diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleQueryReq.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleQueryReq.java index 0d7d90b..9584a75 100644 --- a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleQueryReq.java +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleQueryReq.java @@ -1,15 +1,16 @@ package com.muyu.customer.business.domain.req; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.muyu.common.core.web.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + import java.math.BigDecimal; import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; -import lombok.AllArgsConstructor; -import lombok.experimental.SuperBuilder; -import io.swagger.annotations.*; -import com.muyu.common.core.web.domain.BaseEntity; /** * 车辆录入对象 vehicle diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleSaveReq.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleSaveReq.java index 6a3c222..fd33857 100644 --- a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleSaveReq.java +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleSaveReq.java @@ -1,15 +1,16 @@ package com.muyu.customer.business.domain.req; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.muyu.common.core.web.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + import java.math.BigDecimal; import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; -import lombok.AllArgsConstructor; -import lombok.experimental.SuperBuilder; -import io.swagger.annotations.*; -import com.muyu.common.core.web.domain.BaseEntity; /** * 车辆录入对象 vehicle diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/FenceController.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/FenceController.java index 61fd27c..751d9e5 100644 --- a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/FenceController.java +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/FenceController.java @@ -102,10 +102,11 @@ public class FenceController extends BaseController { */ @RequiresPermissions("customerBusiness:fence:remove") @Log(title = "电子围栏", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") + @DeleteMapping("/{ids}") @ApiOperation("删除电子围栏") @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4") public Result remove(@PathVariable List ids) { return toAjax(fenceService.removeBatchByIds(ids)); } } + diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/VehicleController.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/VehicleController.java index 4e3e0fe..733f46f 100644 --- a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/VehicleController.java +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/VehicleController.java @@ -3,6 +3,8 @@ package com.muyu.customer.business.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.muyu.customer.business.mapper.VehicleMapper; import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -36,9 +38,12 @@ import com.muyu.common.core.web.page.TableDataInfo; @RestController @RequestMapping("/vehicle") public class VehicleController extends BaseController { + @Autowired private VehicleService vehicleService; + @Autowired + private VehicleMapper vehicleMapper; /** * 查询车辆录入列表 */ @@ -102,10 +107,15 @@ public class VehicleController extends BaseController { */ @RequiresPermissions("customerBusiness:vehicle:remove") @Log(title = "车辆录入", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") + @DeleteMapping("/{ids}") @ApiOperation("删除车辆录入") @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4") public Result remove(@PathVariable List ids) { return toAjax(vehicleService.removeBatchByIds(ids)); } + + @GetMapping("/list/all") + public Result> findAll () { + return Result.success(vehicleMapper.selectList(new QueryWrapper<>())); + } } diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/GroupMapper.xml b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/GroupMapper.xml deleted file mode 100644 index 63bc66d..0000000 --- a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/GroupMapper.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - select id, group_name, remark, create_by, create_time, update_by, update_time from `group` - - - - - - - - insert into `group` - - group_name, - remark, - create_by, - create_time, - update_by, - update_time, - - - #{groupName}, - #{remark}, - #{createBy}, - #{createTime}, - #{updateBy}, - #{updateTime}, - - - - - update `group` - - group_name = #{groupName}, - remark = #{remark}, - create_by = #{createBy}, - create_time = #{createTime}, - update_by = #{updateBy}, - update_time = #{updateTime}, - - where id = #{id} - - - - delete from `group` where id = #{id} - - - - delete from `group` where id in - - #{id} - - - diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/pom.xml b/muyu-modules/muyu-net-working/muyu-net-working-common/pom.xml index 0727768..29a521d 100644 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/pom.xml +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/pom.xml @@ -22,6 +22,11 @@ com.muyu muyu-common-core + + com.muyu + muyu-common-security + + diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Enterprise.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Enterprise.java index 6a11f5b..b90c702 100644 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Enterprise.java +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Enterprise.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.muyu.common.security.utils.SecurityUtils; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; @@ -29,168 +30,165 @@ import com.muyu.common.core.web.domain.BaseEntity; @AllArgsConstructor @TableName("enterprise") @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "Enterprise", description = "企业信息") +@ApiModel(value = "Enterprise", description = "车辆运营平台") public class Enterprise extends BaseEntity { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - /** 主键 */ - @TableId(value = "id",type = IdType.AUTO) - @ApiModelProperty(name = "主键", value = "主键") - private String id; + /** 主键 */ + @TableId(value = "id",type = IdType.AUTO) + @ApiModelProperty(name = "主键", value = "主键") + private Integer id; - /** 企业名称 */ - @Excel(name = "企业名称") - @ApiModelProperty(name = "企业名称", value = "企业名称") - private String ebterpriseName; + /** 企业名称 */ + @Excel(name = "企业名称") + @ApiModelProperty(name = "企业名称", value = "企业名称") + private String ebterpriseName; - /** 法定代表人 */ - @Excel(name = "法定代表人") - @ApiModelProperty(name = "法定代表人", value = "法定代表人") - private String legalPerson; + /** 法定代表人 */ + @Excel(name = "法定代表人") + @ApiModelProperty(name = "法定代表人", value = "法定代表人") + private String legalPerson; - /** 经营执照凭证号码 */ - @Excel(name = "经营执照凭证号码") - @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") - private String businessLincenseNumber; + /** 经营执照凭证号码 */ + @Excel(name = "经营执照凭证号码") + @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") + private String businessLincenseNumber; - /** 企业成立时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "企业成立时间", width = 30, dateFormat = "yyyy-MM-dd") - @ApiModelProperty(name = "企业成立时间", value = "企业成立时间") - private Date estabinessDate; + /** 企业成立时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "企业成立时间", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty(name = "企业成立时间", value = "企业成立时间") + private Date estabinessDate; - /** 经营范围 */ - @Excel(name = "经营范围") - @ApiModelProperty(name = "经营范围", value = "经营范围") - private String businessScope; + /** 经营范围 */ + @Excel(name = "经营范围") + @ApiModelProperty(name = "经营范围", value = "经营范围") + private String businessScope; - /** 注册地址 */ - @Excel(name = "注册地址") - @ApiModelProperty(name = "注册地址", value = "注册地址") - private String address; + /** 注册地址 */ + @Excel(name = "注册地址") + @ApiModelProperty(name = "注册地址", value = "注册地址") + private String address; - /** 企业联系方式 */ - @Excel(name = "企业联系方式") - @ApiModelProperty(name = "企业联系方式", value = "企业联系方式") - private String contactPhone; + /** 企业联系方式 */ + @Excel(name = "企业联系方式") + @ApiModelProperty(name = "企业联系方式", value = "企业联系方式") + private String contactPhone; - /** 公司邮箱 */ - @Excel(name = "公司邮箱") - @ApiModelProperty(name = "公司邮箱", value = "公司邮箱") - private String email; + /** 公司邮箱 */ + @Excel(name = "公司邮箱") + @ApiModelProperty(name = "公司邮箱", value = "公司邮箱") + private String email; - /** 企业当前状态 */ - @Excel(name = "企业当前状态") - @ApiModelProperty(name = "企业当前状态", value = "企业当前状态") - private String status; + /** 企业当前状态 */ + @Excel(name = "企业当前状态") + @ApiModelProperty(name = "企业当前状态", value = "企业当前状态") + private String enterpriseStatus; - /** 企业入驻平台时期 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "企业入驻平台时期", width = 30, dateFormat = "yyyy-MM-dd") - @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") - private Date registrationDate; + /** 企业入驻平台时期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "企业入驻平台时期", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") + private Date registrationDate; - /** 企业认证id */ - @Excel(name = "企业认证id") - @ApiModelProperty(name = "企业认证id", value = "企业认证id") - private Long certificationId; + /** 企业认证id */ + @Excel(name = "企业认证id") + @ApiModelProperty(name = "企业认证id", value = "企业认证id") + private Long certificationId; - /** 认证时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "认证时间", width = 30, dateFormat = "yyyy-MM-dd") - @ApiModelProperty(name = "认证时间", value = "认证时间") - private Date authenticationDate; + /** 认证时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "认证时间", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty(name = "认证时间", value = "认证时间") + private Date authenticationDate; - /** 服务级别 */ - @Excel(name = "服务级别") - @ApiModelProperty(name = "服务级别", value = "服务级别") - private Long serviceLevel; + /** 服务级别 */ + @Excel(name = "服务级别") + @ApiModelProperty(name = "服务级别", value = "服务级别") + private Long serviceLevel; - /** 开通服务id */ - @Excel(name = "开通服务id") - @ApiModelProperty(name = "开通服务id", value = "开通服务id") - private Long openServerId; + /** 开通服务id */ + @Excel(name = "开通服务id") + @ApiModelProperty(name = "开通服务id", value = "开通服务id") + private Long openServerId; - /** 增值服务id */ - @Excel(name = "增值服务id") - @ApiModelProperty(name = "增值服务id", value = "增值服务id") - private Long addServerId; + /** 增值服务id */ + @Excel(name = "增值服务id") + @ApiModelProperty(name = "增值服务id", value = "增值服务id") + private Long addServerId; - /** - * 查询构造器 - */ - public static Enterprise queryBuild( EnterpriseQueryReq enterpriseQueryReq){ - return Enterprise.builder() - .ebterpriseName(enterpriseQueryReq.getEbterpriseName()) - .legalPerson(enterpriseQueryReq.getLegalPerson()) - .businessLincenseNumber(enterpriseQueryReq.getBusinessLincenseNumber()) - .estabinessDate(enterpriseQueryReq.getEstabinessDate()) - .businessScope(enterpriseQueryReq.getBusinessScope()) - .address(enterpriseQueryReq.getAddress()) - .contactPhone(enterpriseQueryReq.getContactPhone()) - .email(enterpriseQueryReq.getEmail()) - .status(enterpriseQueryReq.getStatus()) - .registrationDate(enterpriseQueryReq.getRegistrationDate()) - .certificationId(enterpriseQueryReq.getCertificationId()) - .authenticationDate(enterpriseQueryReq.getAuthenticationDate()) - .serviceLevel(enterpriseQueryReq.getServiceLevel()) - .openServerId(enterpriseQueryReq.getOpenServerId()) - .addServerId(enterpriseQueryReq.getAddServerId()) - .build(); - } + /** + * 查询构造器 + */ + public static Enterprise queryBuild( EnterpriseQueryReq enterpriseQueryReq){ + return Enterprise.builder() + .ebterpriseName(enterpriseQueryReq.getEbterpriseName()) + .legalPerson(enterpriseQueryReq.getLegalPerson()) + .businessLincenseNumber(enterpriseQueryReq.getBusinessLincenseNumber()) + .estabinessDate(enterpriseQueryReq.getEstabinessDate()) + .businessScope(enterpriseQueryReq.getBusinessScope()) + .address(enterpriseQueryReq.getAddress()) + .contactPhone(enterpriseQueryReq.getContactPhone()) + .email(enterpriseQueryReq.getEmail()) + .enterpriseStatus(enterpriseQueryReq.getEnterpriseStatus()) + .registrationDate(enterpriseQueryReq.getRegistrationDate()) + .certificationId(enterpriseQueryReq.getCertificationId()) + .authenticationDate(enterpriseQueryReq.getAuthenticationDate()) + .serviceLevel(enterpriseQueryReq.getServiceLevel()) + .openServerId(enterpriseQueryReq.getOpenServerId()) + .addServerId(enterpriseQueryReq.getAddServerId()) + .build(); + } - /** - * 添加构造器 - */ - public static Enterprise saveBuild(EnterpriseSaveReq enterpriseSaveReq){ - return Enterprise.builder() - .ebterpriseName(enterpriseSaveReq.getEbterpriseName()) - .legalPerson(enterpriseSaveReq.getLegalPerson()) - .businessLincenseNumber(enterpriseSaveReq.getBusinessLincenseNumber()) - .estabinessDate(enterpriseSaveReq.getEstabinessDate()) - .businessScope(enterpriseSaveReq.getBusinessScope()) - .address(enterpriseSaveReq.getAddress()) - .contactPhone(enterpriseSaveReq.getContactPhone()) - .email(enterpriseSaveReq.getEmail()) - .status(enterpriseSaveReq.getStatus()) - .registrationDate(enterpriseSaveReq.getRegistrationDate()) - .certificationId(enterpriseSaveReq.getCertificationId()) - .authenticationDate(enterpriseSaveReq.getAuthenticationDate()) - .serviceLevel(enterpriseSaveReq.getServiceLevel()) - .openServerId(enterpriseSaveReq.getOpenServerId()) - .addServerId(enterpriseSaveReq.getAddServerId()) - .createBy(enterpriseSaveReq.getCreateBy()) - .createTime(new Date()) - .remark(enterpriseSaveReq.getRemark()) - .build(); - } + /** + * 添加构造器 + */ + public static Enterprise saveBuild(EnterpriseSaveReq enterpriseSaveReq){ + return Enterprise.builder() + .ebterpriseName(enterpriseSaveReq.getEbterpriseName()) + .legalPerson(enterpriseSaveReq.getLegalPerson()) + .businessLincenseNumber(enterpriseSaveReq.getBusinessLincenseNumber()) + .estabinessDate(enterpriseSaveReq.getEstabinessDate()) + .businessScope(enterpriseSaveReq.getBusinessScope()) + .address(enterpriseSaveReq.getAddress()) + .contactPhone(enterpriseSaveReq.getContactPhone()) + .email(enterpriseSaveReq.getEmail()) + .enterpriseStatus(enterpriseSaveReq.getEnterpriseStatus()) + .registrationDate(enterpriseSaveReq.getRegistrationDate()) + .certificationId(enterpriseSaveReq.getCertificationId()) + .authenticationDate(enterpriseSaveReq.getAuthenticationDate()) + .serviceLevel(enterpriseSaveReq.getServiceLevel()) + .openServerId(enterpriseSaveReq.getOpenServerId()) + .addServerId(enterpriseSaveReq.getAddServerId()) + .createBy(SecurityUtils.getUsername()) + .createTime(new Date()) + .build(); + } - /** - * 修改构造器 - */ - public static Enterprise editBuild(String id, EnterpriseEditReq enterpriseEditReq){ - return Enterprise.builder() - .id(id) - .ebterpriseName(enterpriseEditReq.getEbterpriseName()) - .legalPerson(enterpriseEditReq.getLegalPerson()) - .businessLincenseNumber(enterpriseEditReq.getBusinessLincenseNumber()) - .estabinessDate(enterpriseEditReq.getEstabinessDate()) - .businessScope(enterpriseEditReq.getBusinessScope()) - .address(enterpriseEditReq.getAddress()) - .contactPhone(enterpriseEditReq.getContactPhone()) - .email(enterpriseEditReq.getEmail()) - .status(enterpriseEditReq.getStatus()) - .registrationDate(enterpriseEditReq.getRegistrationDate()) - .certificationId(enterpriseEditReq.getCertificationId()) - .authenticationDate(enterpriseEditReq.getAuthenticationDate()) - .serviceLevel(enterpriseEditReq.getServiceLevel()) - .openServerId(enterpriseEditReq.getOpenServerId()) - .addServerId(enterpriseEditReq.getAddServerId()) - .updateBy(enterpriseEditReq.getUpdateBy()) - .updateTime(new Date()) - .remark(enterpriseEditReq.getRemark()) - .build(); - } + /** + * 修改构造器 + */ + public static Enterprise editBuild(Integer id, EnterpriseEditReq enterpriseEditReq){ + return Enterprise.builder() + .id(id) + .ebterpriseName(enterpriseEditReq.getEbterpriseName()) .legalPerson(enterpriseEditReq.getLegalPerson()) + .businessLincenseNumber(enterpriseEditReq.getBusinessLincenseNumber()) + .estabinessDate(enterpriseEditReq.getEstabinessDate()) + .businessScope(enterpriseEditReq.getBusinessScope()) + .address(enterpriseEditReq.getAddress()) + .contactPhone(enterpriseEditReq.getContactPhone()) + .email(enterpriseEditReq.getEmail()) + .enterpriseStatus(enterpriseEditReq.getEnterpriseStatus()) + .registrationDate(enterpriseEditReq.getRegistrationDate()) + .certificationId(enterpriseEditReq.getCertificationId()) + .authenticationDate(enterpriseEditReq.getAuthenticationDate()) + .serviceLevel(enterpriseEditReq.getServiceLevel()) + .openServerId(enterpriseEditReq.getOpenServerId()) + .addServerId(enterpriseEditReq.getAddServerId()) + .updateBy(SecurityUtils.getUsername()) + .updateTime(new Date()) + .build(); + } } diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseEditReq.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseEditReq.java index 7284615..8c3a1e1 100644 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseEditReq.java +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseEditReq.java @@ -9,83 +9,84 @@ import lombok.AllArgsConstructor; import lombok.experimental.SuperBuilder; import io.swagger.annotations.*; import com.muyu.common.core.web.domain.BaseEntity; +import org.springframework.format.annotation.DateTimeFormat; /** - * 企业信息对象 enterprise + * 车辆运营平台对象 enterprise * * @author muyu - * @date 2024-05-27 + * @date 2024-06-05 */ @Data @SuperBuilder @NoArgsConstructor @AllArgsConstructor -@ApiModel(value = "EnterpriseEditReq", description = "企业信息") +@ApiModel(value = "EnterpriseEditReq", description = "车辆运营平台") public class EnterpriseEditReq extends BaseEntity { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - /** 企业名称 */ - @ApiModelProperty(name = "企业名称", value = "企业名称") - private String ebterpriseName; + /** 企业名称 */ + @ApiModelProperty(name = "企业名称", value = "企业名称") + private String ebterpriseName; - /** 法定代表人 */ - @ApiModelProperty(name = "法定代表人", value = "法定代表人") - private String legalPerson; + /** 法定代表人 */ + @ApiModelProperty(name = "法定代表人", value = "法定代表人") + private String legalPerson; - /** 经营执照凭证号码 */ - @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") - private String businessLincenseNumber; + /** 经营执照凭证号码 */ + @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") + private String businessLincenseNumber; - /** 企业成立时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(name = "企业成立时间", value = "企业成立时间") - private Date estabinessDate; + /** 企业成立时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "企业成立时间", value = "企业成立时间") + private Date estabinessDate; - /** 经营范围 */ - @ApiModelProperty(name = "经营范围", value = "经营范围") - private String businessScope; + /** 经营范围 */ + @ApiModelProperty(name = "经营范围", value = "经营范围") + private String businessScope; - /** 注册地址 */ - @ApiModelProperty(name = "注册地址", value = "注册地址") - private String address; + /** 注册地址 */ + @ApiModelProperty(name = "注册地址", value = "注册地址") + private String address; - /** 企业联系方式 */ - @ApiModelProperty(name = "企业联系方式", value = "企业联系方式") - private String contactPhone; + /** 企业联系方式 */ + @ApiModelProperty(name = "企业联系方式", value = "企业联系方式") + private String contactPhone; - /** 公司邮箱 */ - @ApiModelProperty(name = "公司邮箱", value = "公司邮箱") - private String email; + /** 公司邮箱 */ + @ApiModelProperty(name = "公司邮箱", value = "公司邮箱") + private String email; - /** 企业当前状态 */ - @ApiModelProperty(name = "企业当前状态", value = "企业当前状态") - private String status; + /** 企业当前状态 */ + @ApiModelProperty(name = "企业当前状态", value = "企业当前状态") + private String enterpriseStatus; - /** 企业入驻平台时期 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") - private Date registrationDate; + /** 企业入驻平台时期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") + private Date registrationDate; - /** 企业认证id */ - @ApiModelProperty(name = "企业认证id", value = "企业认证id") - private Long certificationId; + /** 企业认证id */ + @ApiModelProperty(name = "企业认证id", value = "企业认证id") + private Long certificationId; - /** 认证时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(name = "认证时间", value = "认证时间") - private Date authenticationDate; + /** 认证时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "认证时间", value = "认证时间") + private Date authenticationDate; - /** 服务级别 */ - @ApiModelProperty(name = "服务级别", value = "服务级别") - private Long serviceLevel; + /** 服务级别 */ + @ApiModelProperty(name = "服务级别", value = "服务级别") + private Long serviceLevel; - /** 开通服务id */ - @ApiModelProperty(name = "开通服务id", value = "开通服务id") - private Long openServerId; + /** 开通服务id */ + @ApiModelProperty(name = "开通服务id", value = "开通服务id") + private Long openServerId; - /** 增值服务id */ - @ApiModelProperty(name = "增值服务id", value = "增值服务id") - private Long addServerId; + /** 增值服务id */ + @ApiModelProperty(name = "增值服务id", value = "增值服务id") + private Long addServerId; } diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseQueryReq.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseQueryReq.java index 2b893a3..705cae7 100644 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseQueryReq.java +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseQueryReq.java @@ -11,81 +11,81 @@ import io.swagger.annotations.*; import com.muyu.common.core.web.domain.BaseEntity; /** - * 企业信息对象 enterprise + * 车辆运营平台对象 enterprise * * @author muyu - * @date 2024-05-27 + * @date 2024-06-05 */ @Data @SuperBuilder @NoArgsConstructor @AllArgsConstructor -@ApiModel(value = "EnterpriseQueryReq", description = "企业信息") +@ApiModel(value = "EnterpriseQueryReq", description = "车辆运营平台") public class EnterpriseQueryReq extends BaseEntity { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - /** 企业名称 */ - @ApiModelProperty(name = "企业名称", value = "企业名称") - private String ebterpriseName; + /** 企业名称 */ + @ApiModelProperty(name = "企业名称", value = "企业名称") + private String ebterpriseName; - /** 法定代表人 */ - @ApiModelProperty(name = "法定代表人", value = "法定代表人") - private String legalPerson; + /** 法定代表人 */ + @ApiModelProperty(name = "法定代表人", value = "法定代表人") + private String legalPerson; - /** 经营执照凭证号码 */ - @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") - private String businessLincenseNumber; + /** 经营执照凭证号码 */ + @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") + private String businessLincenseNumber; - /** 企业成立时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(name = "企业成立时间", value = "企业成立时间") - private Date estabinessDate; + /** 企业成立时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "企业成立时间", value = "企业成立时间") + private Date estabinessDate; - /** 经营范围 */ - @ApiModelProperty(name = "经营范围", value = "经营范围") - private String businessScope; + /** 经营范围 */ + @ApiModelProperty(name = "经营范围", value = "经营范围") + private String businessScope; - /** 注册地址 */ - @ApiModelProperty(name = "注册地址", value = "注册地址") - private String address; + /** 注册地址 */ + @ApiModelProperty(name = "注册地址", value = "注册地址") + private String address; - /** 企业联系方式 */ - @ApiModelProperty(name = "企业联系方式", value = "企业联系方式") - private String contactPhone; + /** 企业联系方式 */ + @ApiModelProperty(name = "企业联系方式", value = "企业联系方式") + private String contactPhone; - /** 公司邮箱 */ - @ApiModelProperty(name = "公司邮箱", value = "公司邮箱") - private String email; + /** 公司邮箱 */ + @ApiModelProperty(name = "公司邮箱", value = "公司邮箱") + private String email; - /** 企业当前状态 */ - @ApiModelProperty(name = "企业当前状态", value = "企业当前状态") - private String status; + /** 企业当前状态 */ + @ApiModelProperty(name = "企业当前状态", value = "企业当前状态") + private String enterpriseStatus; - /** 企业入驻平台时期 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") - private Date registrationDate; + /** 企业入驻平台时期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") + private Date registrationDate; - /** 企业认证id */ - @ApiModelProperty(name = "企业认证id", value = "企业认证id") - private Long certificationId; + /** 企业认证id */ + @ApiModelProperty(name = "企业认证id", value = "企业认证id") + private Long certificationId; - /** 认证时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(name = "认证时间", value = "认证时间") - private Date authenticationDate; + /** 认证时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "认证时间", value = "认证时间") + private Date authenticationDate; - /** 服务级别 */ - @ApiModelProperty(name = "服务级别", value = "服务级别") - private Long serviceLevel; + /** 服务级别 */ + @ApiModelProperty(name = "服务级别", value = "服务级别") + private Long serviceLevel; - /** 开通服务id */ - @ApiModelProperty(name = "开通服务id", value = "开通服务id") - private Long openServerId; + /** 开通服务id */ + @ApiModelProperty(name = "开通服务id", value = "开通服务id") + private Long openServerId; - /** 增值服务id */ - @ApiModelProperty(name = "增值服务id", value = "增值服务id") - private Long addServerId; + /** 增值服务id */ + @ApiModelProperty(name = "增值服务id", value = "增值服务id") + private Long addServerId; } diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseSaveReq.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseSaveReq.java index 03c34b6..72f864f 100644 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseSaveReq.java +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseSaveReq.java @@ -11,101 +11,101 @@ import io.swagger.annotations.*; import com.muyu.common.core.web.domain.BaseEntity; /** - * 企业信息对象 enterprise + * 车辆运营平台对象 enterprise * * @author muyu - * @date 2024-05-27 + * @date 2024-06-05 */ @Data @SuperBuilder @NoArgsConstructor @AllArgsConstructor -@ApiModel(value = "EnterpriseSaveReq", description = "企业信息") +@ApiModel(value = "EnterpriseSaveReq", description = "车辆运营平台") public class EnterpriseSaveReq extends BaseEntity { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - /** 主键 */ + /** 主键 */ - @ApiModelProperty(name = "主键", value = "主键") - private String id; + @ApiModelProperty(name = "主键", value = "主键") + private String id; - /** 企业名称 */ + /** 企业名称 */ - @ApiModelProperty(name = "企业名称", value = "企业名称") - private String ebterpriseName; + @ApiModelProperty(name = "企业名称", value = "企业名称") + private String ebterpriseName; - /** 法定代表人 */ + /** 法定代表人 */ - @ApiModelProperty(name = "法定代表人", value = "法定代表人") - private String legalPerson; + @ApiModelProperty(name = "法定代表人", value = "法定代表人") + private String legalPerson; - /** 经营执照凭证号码 */ + /** 经营执照凭证号码 */ - @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") - private String businessLincenseNumber; + @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") + private String businessLincenseNumber; - /** 企业成立时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") + /** 企业成立时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(name = "企业成立时间", value = "企业成立时间") - private Date estabinessDate; + @ApiModelProperty(name = "企业成立时间", value = "企业成立时间") + private Date estabinessDate; - /** 经营范围 */ + /** 经营范围 */ - @ApiModelProperty(name = "经营范围", value = "经营范围") - private String businessScope; + @ApiModelProperty(name = "经营范围", value = "经营范围") + private String businessScope; - /** 注册地址 */ + /** 注册地址 */ - @ApiModelProperty(name = "注册地址", value = "注册地址") - private String address; + @ApiModelProperty(name = "注册地址", value = "注册地址") + private String address; - /** 企业联系方式 */ + /** 企业联系方式 */ - @ApiModelProperty(name = "企业联系方式", value = "企业联系方式") - private String contactPhone; + @ApiModelProperty(name = "企业联系方式", value = "企业联系方式") + private String contactPhone; - /** 公司邮箱 */ + /** 公司邮箱 */ - @ApiModelProperty(name = "公司邮箱", value = "公司邮箱") - private String email; + @ApiModelProperty(name = "公司邮箱", value = "公司邮箱") + private String email; - /** 企业当前状态 */ + /** 企业当前状态 */ - @ApiModelProperty(name = "企业当前状态", value = "企业当前状态") - private String status; + @ApiModelProperty(name = "企业当前状态", value = "企业当前状态") + private String enterpriseStatus; - /** 企业入驻平台时期 */ - @JsonFormat(pattern = "yyyy-MM-dd") + /** 企业入驻平台时期 */ + @JsonFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") - private Date registrationDate; + @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") + private Date registrationDate; - /** 企业认证id */ + /** 企业认证id */ - @ApiModelProperty(name = "企业认证id", value = "企业认证id") - private Long certificationId; + @ApiModelProperty(name = "企业认证id", value = "企业认证id") + private Long certificationId; - /** 认证时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") + /** 认证时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(name = "认证时间", value = "认证时间") - private Date authenticationDate; + @ApiModelProperty(name = "认证时间", value = "认证时间") + private Date authenticationDate; - /** 服务级别 */ + /** 服务级别 */ - @ApiModelProperty(name = "服务级别", value = "服务级别") - private Long serviceLevel; + @ApiModelProperty(name = "服务级别", value = "服务级别") + private Long serviceLevel; - /** 开通服务id */ + /** 开通服务id */ - @ApiModelProperty(name = "开通服务id", value = "开通服务id") - private Long openServerId; + @ApiModelProperty(name = "开通服务id", value = "开通服务id") + private Long openServerId; - /** 增值服务id */ + /** 增值服务id */ - @ApiModelProperty(name = "增值服务id", value = "增值服务id") - private Long addServerId; + @ApiModelProperty(name = "增值服务id", value = "增值服务id") + private Long addServerId; } diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/controller/EnterpriseController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/controller/EnterpriseController.java index 03e2871..bebd9a9 100644 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/controller/EnterpriseController.java +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/controller/EnterpriseController.java @@ -10,17 +10,12 @@ import com.muyu.common.system.domain.SysDept; import com.muyu.common.system.domain.SysUser; import com.muyu.system.remote.RemoteSysDeptService; import com.muyu.system.remote.RemoteSysUserService; +import com.muyu.system.remote.factory.RemoteSysDeptFactory; import io.swagger.annotations.*; +import io.swagger.models.auth.In; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import com.muyu.common.core.domain.Result; import com.muyu.common.core.utils.poi.ExcelUtil; import com.muyu.common.core.web.controller.BaseController; @@ -35,149 +30,177 @@ import com.muyu.net.working.service.EnterpriseService; import com.muyu.common.core.web.page.TableDataInfo; /** - * 企业信息Controller + * 车辆运营平台Controller * * @author muyu - * @date 2024-05-27 + * @date 2024-06-05 */ @Api(tags = "车辆运营平台") @Log4j2 @RestController @RequestMapping("/car") public class EnterpriseController extends BaseController { + @Autowired + private EnterpriseService enterpriseService; - @Autowired - private EnterpriseService enterpriseService; + @Autowired + private RemoteSysDeptService remoteSysDeptService; + @Autowired + private RemoteSysUserService remoteSysUserService; - @Autowired - private RemoteSysDeptService remoteSysDeptService; + /** + * 查询车辆运营平台列表 + */ + @ApiOperation("获取车辆运营平台列表") + @RequiresPermissions("netWorking:car:list") + @GetMapping("/list") + public Result> list(EnterpriseQueryReq enterpriseQueryReq) { + startPage(); + List list = enterpriseService.list(Enterprise.queryBuild(enterpriseQueryReq)); + return getDataTable(list); + } - @Autowired - private RemoteSysUserService remoteSysUserService; + /** + * 导出车辆运营平台列表 + */ + @ApiOperation("导出车辆运营平台列表") + @RequiresPermissions("netWorking:car:export") + @Log(title = "车辆运营平台", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Enterprise enterprise) { + List list = enterpriseService.list(enterprise); + ExcelUtil util = new ExcelUtil(Enterprise.class); + util.exportExcel(response, list, "车辆运营平台数据"); + } - /** - * 查询车辆运营平台列表 - */ - @ApiOperation("获取车辆运营平台列表") - @RequiresPermissions("netWorking:car:list") - @GetMapping("/list") - public Result> list(EnterpriseQueryReq enterpriseQueryReq) { - startPage(); - List list = enterpriseService.list(Enterprise.queryBuild(enterpriseQueryReq)); - return getDataTable(list); + /** + * 获取车辆运营平台详细信息 + */ + @ApiOperation("获取车辆运营平台详细信息") + @RequiresPermissions("netWorking:car:query") + @GetMapping(value = "/{id}") + @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class) + public Result getInfo(@PathVariable("id") String id) { + return Result.success(enterpriseService.getById(id)); + } + + /** + * 新增车辆运营平台 + */ + @RequiresPermissions("netWorking:car:add") + @Log(title = "车辆运营平台", businessType = BusinessType.INSERT) + @PostMapping + @ApiOperation("新增车辆运营平台") + public Result add(@RequestBody EnterpriseSaveReq enterpriseSaveReq) { + LoginUser loginUser = SecurityUtils.getLoginUser(); + SysUser sysUser = loginUser.getSysUser(); + Result DeptList = remoteSysDeptService.selectDeptByName(enterpriseSaveReq.getEbterpriseName()); + SysDept sysDept = DeptList.getData(); + if(sysDept!=null){ + return Result.error("部门名称重复"); } + addDept(enterpriseSaveReq, sysUser); + addUser(enterpriseSaveReq,sysUser); - /** - * 导出车辆运营平台列表 - */ - @ApiOperation("导出车辆运营平台列表") - @RequiresPermissions("netWorking:car:export") - @Log(title = "车辆运营平台", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, Enterprise enterprise) { - List list = enterpriseService.list(enterprise); - ExcelUtil util = new ExcelUtil(Enterprise.class); - util.exportExcel(response, list, "车辆运营平台数据"); - } + return toAjax(enterpriseService.save(Enterprise.saveBuild(enterpriseSaveReq))); + } - /** - * 获取车辆运营平台详细信息 - */ - @ApiOperation("获取车辆运营平台详细信息") - @RequiresPermissions("netWorking:car:query") - @GetMapping(value = "/{id}") - @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class) - public Result getInfo(@PathVariable("id") String id) { - return Result.success(enterpriseService.getById(id)); - } + /** + * 添加部门表信息 + * @param enterpriseSaveReq + * @param sysUser + * @return + */ + public void addDept(EnterpriseSaveReq enterpriseSaveReq,SysUser sysUser){ - /** - * 新增车辆运营平台 - */ - @RequiresPermissions("netWorking:car:add") - @Log(title = "车辆运营平台", businessType = BusinessType.INSERT) - @PostMapping - @ApiOperation("新增车辆运营平台") - public Result add(@RequestBody EnterpriseSaveReq enterpriseSaveReq) { - LoginUser loginUser = SecurityUtils.getLoginUser(); - SysUser sysUser = loginUser.getSysUser(); - Result DeptList = remoteSysDeptService.selectDeptByName(enterpriseSaveReq.getEbterpriseName()); - SysDept sysDept = DeptList.getData(); - if(sysDept!=null){ - return Result.error("部门名称重复"); - } - addDept(enterpriseSaveReq, sysUser); - addUser(enterpriseSaveReq,sysUser); + SysDept DeptBuild = SysDept.builder() + .deptName(enterpriseSaveReq.getEbterpriseName()) + .parentId(100L) + .ancestors("0,100") + .orderNum(2) + .status("0") + .createBy(sysUser.getUserName()) + .createTime(new Date()) + .leader(sysUser.getNickName()) + .phone(sysUser.getPhonenumber()) + .email(sysUser.getEmail()) + .delFlag("0") + .build(); + remoteSysDeptService.add(DeptBuild); + } - return toAjax(enterpriseService.save(Enterprise.saveBuild(enterpriseSaveReq))); - } + public void addUser(EnterpriseSaveReq enterpriseSaveReq,SysUser sysUser){ + Result sysDeptResult = remoteSysDeptService.selectDeptByName(enterpriseSaveReq.getEbterpriseName()); + SysDept sysDept = sysDeptResult.getData(); + SysUser UserBuild = SysUser.builder() + .userName(enterpriseSaveReq.getEbterpriseName()) + .nickName(enterpriseSaveReq.getEbterpriseName()) + .password("123456") + .deptId(sysDept.getDeptId()) + .email(enterpriseSaveReq.getEmail()) + .phonenumber(enterpriseSaveReq.getContactPhone()) + .status("0") + .delFlag("0") + .roleId(3L) + .roleIds(new Long[]{3L}) + .createBy(sysUser.getUserName()) + .createTime(new Date()) + .remark(enterpriseSaveReq.getRemark()) + .build(); + remoteSysUserService.add(UserBuild); + } - /** - * 添加部门表信息 - * @param enterpriseSaveReq - * @param sysUser - * @return - */ - public void addDept(EnterpriseSaveReq enterpriseSaveReq,SysUser sysUser){ + /** + * 修改车辆运营平台 + */ + @RequiresPermissions("netWorking:car:edit") + @Log(title = "车辆运营平台", businessType = BusinessType.UPDATE) + @PutMapping("/{id}") + @ApiOperation("修改车辆运营平台") + public Result edit(@PathVariable Integer id, @RequestBody EnterpriseEditReq enterpriseEditReq) { + String username = SecurityUtils.getUsername(); + return toAjax(enterpriseService.updateById(Enterprise.editBuild(id,enterpriseEditReq))); + } - SysDept DeptBuild = SysDept.builder() - .deptName(enterpriseSaveReq.getEbterpriseName()) - .parentId(100L) - .ancestors("0,100") - .orderNum(2) - .status("0") - .createBy(sysUser.getUserName()) - .createTime(new Date()) - .leader(sysUser.getNickName()) - .phone(sysUser.getPhonenumber()) - .email(sysUser.getEmail()) - .delFlag("0") - .build(); - remoteSysDeptService.add(DeptBuild); - } + /** + * 查询运营平台列表 + */ + @GetMapping("/selectByName") + public Result selectByName() { + String username = SecurityUtils.getLoginUser().getUsername(); + Enterprise enterprise = enterpriseService.selectByName(username); + return Result.success(enterprise); + } - public void addUser(EnterpriseSaveReq enterpriseSaveReq,SysUser sysUser){ - Result sysDeptResult = remoteSysDeptService.selectDeptByName(enterpriseSaveReq.getEbterpriseName()); - SysDept sysDept = sysDeptResult.getData(); - SysUser UserBuild = SysUser.builder() - .userName(enterpriseSaveReq.getEbterpriseName()) - .nickName(enterpriseSaveReq.getEbterpriseName()) - .password("123456") - .deptId(sysDept.getDeptId()) - .email(enterpriseSaveReq.getEmail()) - .phonenumber(enterpriseSaveReq.getContactPhone()) - .status("0") - .delFlag("0") - .roleId(3L) - .roleIds(new Long[]{3L}) - .createBy(sysUser.getUserName()) - .createTime(new Date()) - .remark(enterpriseSaveReq.getRemark()) - .build(); - remoteSysUserService.add(UserBuild); - } + /** + * 删除车辆运营平台 + */ + @RequiresPermissions("netWorking:car:remove") + @Log(title = "车辆运营平台", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + @ApiOperation("删除车辆运营平台") + @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4") + public Result remove(@PathVariable List ids) { + return toAjax(enterpriseService.removeBatchByIds(ids)); + } - /** - * 修改车辆运营平台 - */ - @RequiresPermissions("netWorking:car:edit") - @Log(title = "车辆运营平台", businessType = BusinessType.UPDATE) - @PutMapping("/{id}") - @ApiOperation("修改车辆运营平台") - public Result edit(@PathVariable String id, @RequestBody EnterpriseEditReq enterpriseEditReq) { - return toAjax(enterpriseService.updateById(Enterprise.editBuild(id,enterpriseEditReq))); - } + /** + * 完善企业信息 + * @param id + * @param enterpriseEditReq + * @return + */ + @PostMapping("/updateEnterprise/{id}") + public Result updateEnterprise(@PathVariable Integer id, @RequestBody EnterpriseEditReq enterpriseEditReq) { + return toAjax(enterpriseService.updateById(Enterprise.editBuild(id,enterpriseEditReq))); + } - /** - * 删除车辆运营平台 - */ - @RequiresPermissions("netWorking:car:remove") - @Log(title = "车辆运营平台", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - @ApiOperation("删除车辆运营平台") - @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4") - public Result remove(@PathVariable List ids) { - - return toAjax(enterpriseService.removeBatchByIds(ids)); - } + /** + * 企业认证 + */ + @PostMapping("/authentication") + public Result authentication(@RequestBody Enterprise enterprise ) { + enterpriseService.authentication(enterprise); + return Result.success(); + } } diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/mapper/EnterpriseMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/mapper/EnterpriseMapper.java index 0a82543..c802b4f 100644 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/mapper/EnterpriseMapper.java +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/mapper/EnterpriseMapper.java @@ -3,6 +3,7 @@ package com.muyu.net.working.mapper; import java.util.List; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.muyu.net.working.domain.Enterprise; +import org.apache.ibatis.annotations.Param; /** * 企业信息Mapper接口 @@ -12,4 +13,8 @@ import com.muyu.net.working.domain.Enterprise; */ public interface EnterpriseMapper extends BaseMapper { + Enterprise selectByName(@Param("name") String name); + + void authentication(Enterprise enterprise); + } diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/EnterpriseService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/EnterpriseService.java index 5bb5b4a..53754d8 100644 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/EnterpriseService.java +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/EnterpriseService.java @@ -17,6 +17,10 @@ public interface EnterpriseService extends IService { * @param enterprise 企业信息 * @return 企业信息集合 */ - public List list(Enterprise enterprise); + List list(Enterprise enterprise); + + Enterprise selectByName(String name); + + void authentication(Enterprise enterprise); } diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/impl/EnterpriseServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/impl/EnterpriseServiceImpl.java index 5ca6b7d..811fb64 100644 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/impl/EnterpriseServiceImpl.java +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/impl/EnterpriseServiceImpl.java @@ -1,9 +1,18 @@ package com.muyu.net.working.service.impl; +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import com.alibaba.fastjson.JSON; import com.muyu.common.core.utils.ObjUtils; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.muyu.net.working.mapper.EnterpriseMapper; import com.muyu.net.working.domain.Enterprise; @@ -21,81 +30,132 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @Service public class EnterpriseServiceImpl extends ServiceImpl implements EnterpriseService { - /** - * 查询企业信息列表 - * - * @param enterprise 企业信息 - * @return 企业信息 - */ - @Override - public List list(Enterprise enterprise) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + @Autowired + private EnterpriseMapper enterpriseMapper; + /** + * 查询车辆运营平台列表 + * + * @param enterprise 车辆运营平台 + * @return 车辆运营平台 + */ + @Override + public List list(Enterprise enterprise) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - if (ObjUtils.notNull(enterprise.getEbterpriseName())){ - queryWrapper.like(Enterprise::getEbterpriseName, enterprise.getEbterpriseName()); - } - - if (ObjUtils.notNull(enterprise.getLegalPerson())){ - queryWrapper.eq(Enterprise::getLegalPerson, enterprise.getLegalPerson()); - } - - if (ObjUtils.notNull(enterprise.getBusinessLincenseNumber())){ - queryWrapper.eq(Enterprise::getBusinessLincenseNumber, enterprise.getBusinessLincenseNumber()); - } - - if (ObjUtils.notNull(enterprise.getEstabinessDate())){ - queryWrapper.eq(Enterprise::getEstabinessDate, enterprise.getEstabinessDate()); - } - - if (ObjUtils.notNull(enterprise.getBusinessScope())){ - queryWrapper.eq(Enterprise::getBusinessScope, enterprise.getBusinessScope()); - } - - if (ObjUtils.notNull(enterprise.getAddress())){ - queryWrapper.eq(Enterprise::getAddress, enterprise.getAddress()); - } - - if (ObjUtils.notNull(enterprise.getContactPhone())){ - queryWrapper.eq(Enterprise::getContactPhone, enterprise.getContactPhone()); - } - - if (ObjUtils.notNull(enterprise.getEmail())){ - queryWrapper.eq(Enterprise::getEmail, enterprise.getEmail()); - } - - if (ObjUtils.notNull(enterprise.getStatus())){ - queryWrapper.eq(Enterprise::getStatus, enterprise.getStatus()); - } - - if (ObjUtils.notNull(enterprise.getRegistrationDate())){ - queryWrapper.eq(Enterprise::getRegistrationDate, enterprise.getRegistrationDate()); - } - - if (ObjUtils.notNull(enterprise.getCertificationId())){ - queryWrapper.eq(Enterprise::getCertificationId, enterprise.getCertificationId()); - } - - if (ObjUtils.notNull(enterprise.getAuthenticationDate())){ - queryWrapper.eq(Enterprise::getAuthenticationDate, enterprise.getAuthenticationDate()); - } - - if (ObjUtils.notNull(enterprise.getServiceLevel())){ - queryWrapper.eq(Enterprise::getServiceLevel, enterprise.getServiceLevel()); - } - - if (ObjUtils.notNull(enterprise.getOpenServerId())){ - queryWrapper.eq(Enterprise::getOpenServerId, enterprise.getOpenServerId()); - } - - if (ObjUtils.notNull(enterprise.getAddServerId())){ - queryWrapper.eq(Enterprise::getAddServerId, enterprise.getAddServerId()); - } - - - - - - return list(queryWrapper); + if (ObjUtils.notNull(enterprise.getEbterpriseName())){ + queryWrapper.like(Enterprise::getEbterpriseName, enterprise.getEbterpriseName()); } + + if (ObjUtils.notNull(enterprise.getLegalPerson())){ + queryWrapper.eq(Enterprise::getLegalPerson, enterprise.getLegalPerson()); + } + + if (ObjUtils.notNull(enterprise.getBusinessLincenseNumber())){ + queryWrapper.eq(Enterprise::getBusinessLincenseNumber, enterprise.getBusinessLincenseNumber()); + } + + if (ObjUtils.notNull(enterprise.getEstabinessDate())){ + queryWrapper.eq(Enterprise::getEstabinessDate, enterprise.getEstabinessDate()); + } + + if (ObjUtils.notNull(enterprise.getBusinessScope())){ + queryWrapper.eq(Enterprise::getBusinessScope, enterprise.getBusinessScope()); + } + + if (ObjUtils.notNull(enterprise.getAddress())){ + queryWrapper.eq(Enterprise::getAddress, enterprise.getAddress()); + } + + if (ObjUtils.notNull(enterprise.getContactPhone())){ + queryWrapper.eq(Enterprise::getContactPhone, enterprise.getContactPhone()); + } + + if (ObjUtils.notNull(enterprise.getEmail())){ + queryWrapper.eq(Enterprise::getEmail, enterprise.getEmail()); + } + + if (ObjUtils.notNull(enterprise.getEnterpriseStatus())){ + queryWrapper.eq(Enterprise::getEnterpriseStatus, enterprise.getEnterpriseStatus()); + } + + if (ObjUtils.notNull(enterprise.getRegistrationDate())){ + queryWrapper.eq(Enterprise::getRegistrationDate, enterprise.getRegistrationDate()); + } + + if (ObjUtils.notNull(enterprise.getCertificationId())){ + queryWrapper.eq(Enterprise::getCertificationId, enterprise.getCertificationId()); + } + + if (ObjUtils.notNull(enterprise.getAuthenticationDate())){ + queryWrapper.eq(Enterprise::getAuthenticationDate, enterprise.getAuthenticationDate()); + } + + if (ObjUtils.notNull(enterprise.getServiceLevel())){ + queryWrapper.eq(Enterprise::getServiceLevel, enterprise.getServiceLevel()); + } + + if (ObjUtils.notNull(enterprise.getOpenServerId())){ + queryWrapper.eq(Enterprise::getOpenServerId, enterprise.getOpenServerId()); + } + + if (ObjUtils.notNull(enterprise.getAddServerId())){ + queryWrapper.eq(Enterprise::getAddServerId, enterprise.getAddServerId()); + } + + return list(queryWrapper); + } + + @Override + public Enterprise selectByName(String name) { + return enterpriseMapper.selectByName(name); + } + + @Override + public void authentication(Enterprise enterprise) { + enterpriseMapper.authentication(enterprise); + try { + postTest(enterprise); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + public static void postTest(Enterprise enterprise) throws Exception { + // 1.请求URL + String postUrl = "http://101.34.248.9:10006/webhook/%E6%96%B0%E5%BB%BA%E4%BC%81%E4%B8%9A%E6%95%B0%E6%8D%AE%E5%BA%93"; + // 2.请求参数JSON格式 + Integer id = enterprise.getId(); + Map parammap = new HashMap<>(); + parammap.put("entId", "jiang-"+id); + parammap.put("mysqlPort", String.valueOf(3306+enterprise.getId())); + String json = JSON.toJSONString(parammap); + // 3.创建连接与设置连接参数 + URL urlObj = new URL(postUrl); + HttpURLConnection httpConn = (HttpURLConnection) urlObj.openConnection(); + httpConn.setRequestMethod("POST"); + httpConn.setRequestProperty("Charset", "UTF-8"); + // POST请求且JSON数据,必须设置 + httpConn.setRequestProperty("Content-Type", "application/json"); + // 打开输出流,默认是false + httpConn.setDoOutput(true); + // 打开输入流,默认是true,可省略 + httpConn.setDoInput(true); + // 4.从HttpURLConnection获取输出流和写数据 + OutputStream oStream = httpConn.getOutputStream(); + oStream.write(json.getBytes()); + oStream.flush(); + // 5.发起http调用(getInputStream触发http请求) + if (httpConn.getResponseCode() != 200) { + throw new Exception("调用服务端异常."); + } + // 6.从HttpURLConnection获取输入流和读数据 + BufferedReader br = new BufferedReader( + new InputStreamReader(httpConn.getInputStream())); + String resultData = br.readLine(); + System.out.println("从服务端返回结果: " + resultData); + // 7.关闭HttpURLConnection连接 + httpConn.disconnect(); + } + } diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/netWorking/EnterpriseMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/netWorking/EnterpriseMapper.xml index 74678d7..fecb9db 100644 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/netWorking/EnterpriseMapper.xml +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/netWorking/EnterpriseMapper.xml @@ -1,34 +1,40 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - select id, ebterprise_name, legal_person, business_lincense_number, estabiness_date, business_scope, address, contact_phone, email, status, registration_date, certification_id, authentication_date, service_level, open_server_id, add_server_id, create_by, create_time, update_by, update_time, remark from enterprise - + + select id, ebterprise_name, legal_person, business_lincense_number, estabiness_date, business_scope, address, contact_phone, email, enterprise_status, registration_date, certification_id, authentication_date, service_level, open_server_id, add_server_id, create_by, create_time, update_by, update_time, remark from enterprise + + + update enterprise set enterprise_status = 'N' where id = #{id} + + diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDeptController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDeptController.java index 861797e..c692ce0 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDeptController.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDeptController.java @@ -1,9 +1,9 @@ package com.muyu.system.controller; import com.muyu.common.core.constant.UserConstants; +import com.muyu.common.core.domain.Result; import com.muyu.common.core.utils.StringUtils; import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.domain.Result; import com.muyu.common.log.annotation.Log; import com.muyu.common.log.enums.BusinessType; import com.muyu.common.security.annotation.RequiresPermissions; diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDictDataController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDictDataController.java index 418ce2a..d2f5f65 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDictDataController.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDictDataController.java @@ -1,9 +1,9 @@ package com.muyu.system.controller; +import com.muyu.common.core.domain.Result; import com.muyu.common.core.utils.StringUtils; import com.muyu.common.core.utils.poi.ExcelUtil; import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.domain.Result; import com.muyu.common.core.web.page.TableDataInfo; import com.muyu.common.log.annotation.Log; import com.muyu.common.log.enums.BusinessType; diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDictTypeController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDictTypeController.java index 4d1325c..7079874 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDictTypeController.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDictTypeController.java @@ -1,8 +1,8 @@ package com.muyu.system.controller; +import com.muyu.common.core.domain.Result; import com.muyu.common.core.utils.poi.ExcelUtil; import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.domain.Result; import com.muyu.common.core.web.page.TableDataInfo; import com.muyu.common.log.annotation.Log; import com.muyu.common.log.enums.BusinessType; diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysLogininforController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysLogininforController.java index 7a4e5ac..767ac53 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysLogininforController.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysLogininforController.java @@ -1,9 +1,9 @@ package com.muyu.system.controller; import com.muyu.common.core.constant.CacheConstants; +import com.muyu.common.core.domain.Result; import com.muyu.common.core.utils.poi.ExcelUtil; import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.domain.Result; import com.muyu.common.core.web.page.TableDataInfo; import com.muyu.common.log.annotation.Log; import com.muyu.common.log.enums.BusinessType; diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysMenuController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysMenuController.java index c22f798..920d934 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysMenuController.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysMenuController.java @@ -1,9 +1,9 @@ package com.muyu.system.controller; import com.muyu.common.core.constant.UserConstants; +import com.muyu.common.core.domain.Result; import com.muyu.common.core.utils.StringUtils; import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.domain.Result; import com.muyu.common.log.annotation.Log; import com.muyu.common.log.enums.BusinessType; import com.muyu.common.security.annotation.RequiresPermissions; diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysNoticeController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysNoticeController.java index 9706350..82986d9 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysNoticeController.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysNoticeController.java @@ -1,7 +1,7 @@ package com.muyu.system.controller; -import com.muyu.common.core.web.controller.BaseController; import com.muyu.common.core.domain.Result; +import com.muyu.common.core.web.controller.BaseController; import com.muyu.common.core.web.page.TableDataInfo; import com.muyu.common.log.annotation.Log; import com.muyu.common.log.enums.BusinessType; diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysOperlogController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysOperlogController.java index add3ba5..ba16ac9 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysOperlogController.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysOperlogController.java @@ -1,8 +1,8 @@ package com.muyu.system.controller; +import com.muyu.common.core.domain.Result; import com.muyu.common.core.utils.poi.ExcelUtil; import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.domain.Result; import com.muyu.common.core.web.page.TableDataInfo; import com.muyu.common.log.annotation.Log; import com.muyu.common.log.enums.BusinessType; diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysPostController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysPostController.java index f9da917..80cb354 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysPostController.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysPostController.java @@ -1,8 +1,8 @@ package com.muyu.system.controller; +import com.muyu.common.core.domain.Result; import com.muyu.common.core.utils.poi.ExcelUtil; import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.domain.Result; import com.muyu.common.core.web.page.TableDataInfo; import com.muyu.common.log.annotation.Log; import com.muyu.common.log.enums.BusinessType; diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysProfileController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysProfileController.java index ae49255..d7ebacc 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysProfileController.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysProfileController.java @@ -9,10 +9,10 @@ import com.muyu.common.log.annotation.Log; import com.muyu.common.log.enums.BusinessType; import com.muyu.common.security.service.TokenService; import com.muyu.common.security.utils.SecurityUtils; -import com.muyu.common.system.remote.RemoteFileService; +import com.muyu.common.system.domain.LoginUser; import com.muyu.common.system.domain.SysFile; import com.muyu.common.system.domain.SysUser; -import com.muyu.common.system.domain.LoginUser; +import com.muyu.common.system.remote.RemoteFileService; import com.muyu.system.domain.resp.ProfileResp; import com.muyu.system.service.SysUserService; import org.springframework.beans.factory.annotation.Autowired; diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysRoleController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysRoleController.java index 63df7a9..b9c136b 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysRoleController.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysRoleController.java @@ -1,8 +1,8 @@ package com.muyu.system.controller; +import com.muyu.common.core.domain.Result; import com.muyu.common.core.utils.poi.ExcelUtil; import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.domain.Result; import com.muyu.common.core.web.page.TableDataInfo; import com.muyu.common.log.annotation.Log; import com.muyu.common.log.enums.BusinessType; diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysUserController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysUserController.java index 9811a0e..dd81556 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysUserController.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysUserController.java @@ -10,10 +10,10 @@ import com.muyu.common.log.enums.BusinessType; import com.muyu.common.security.annotation.InnerAuth; import com.muyu.common.security.annotation.RequiresPermissions; import com.muyu.common.security.utils.SecurityUtils; +import com.muyu.common.system.domain.LoginUser; import com.muyu.common.system.domain.SysDept; import com.muyu.common.system.domain.SysRole; import com.muyu.common.system.domain.SysUser; -import com.muyu.common.system.domain.LoginUser; import com.muyu.system.domain.resp.AuthRoleResp; import com.muyu.system.domain.resp.UserDetailInfoResp; import com.muyu.system.domain.resp.UserInfoResp; diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysUserOnlineController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysUserOnlineController.java index 26f7883..78b5354 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysUserOnlineController.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysUserOnlineController.java @@ -1,9 +1,9 @@ package com.muyu.system.controller; import com.muyu.common.core.constant.CacheConstants; +import com.muyu.common.core.domain.Result; import com.muyu.common.core.utils.StringUtils; import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.domain.Result; import com.muyu.common.core.web.page.TableDataInfo; import com.muyu.common.log.annotation.Log; import com.muyu.common.log.enums.BusinessType; diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/domain/SysUserOnline.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/domain/SysUserOnline.java index c89bd42..71f56a8 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/domain/SysUserOnline.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/domain/SysUserOnline.java @@ -1,5 +1,7 @@ package com.muyu.system.domain; + + /** * 当前在线会话 * diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDeptMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDeptMapper.java index c6b3616..3d00240 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDeptMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDeptMapper.java @@ -19,7 +19,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 部门信息集合 */ - public List selectDeptList (SysDept dept); + List selectDeptList(SysDept dept); /** * 根据角色ID查询部门树信息 @@ -29,7 +29,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 选中部门列表 */ - public List selectDeptListByRoleId (@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly); + List selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly); /** * 根据部门ID查询信息 @@ -38,7 +38,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 部门信息 */ - public SysDept selectDeptById (Long deptId); + SysDept selectDeptById(Long deptId); /** * 根据ID查询所有子部门 @@ -47,7 +47,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 部门列表 */ - public List selectChildrenDeptById (Long deptId); + List selectChildrenDeptById(Long deptId); /** * 根据ID查询所有子部门(正常状态) @@ -56,7 +56,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 子部门数 */ - public int selectNormalChildrenDeptById (Long deptId); + int selectNormalChildrenDeptById(Long deptId); /** * 是否存在子节点 @@ -65,7 +65,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 结果 */ - public int hasChildByDeptId (Long deptId); + int hasChildByDeptId(Long deptId); /** * 查询部门是否存在用户 @@ -74,7 +74,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 结果 */ - public int checkDeptExistUser (Long deptId); + int checkDeptExistUser(Long deptId); /** * 校验部门名称是否唯一 @@ -84,7 +84,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 结果 */ - public SysDept checkDeptNameUnique (@Param("deptName") String deptName, @Param("parentId") Long parentId); + SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId); /** * 新增部门信息 @@ -93,7 +93,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 结果 */ - public int insertDept (SysDept dept); + int insertDept(SysDept dept); /** * 修改部门信息 @@ -102,14 +102,14 @@ public interface SysDeptMapper extends BaseMapper { * * @return 结果 */ - public int updateDept (SysDept dept); + int updateDept(SysDept dept); /** * 修改所在部门正常状态 * * @param deptIds 部门ID组 */ - public void updateDeptStatusNormal (Long[] deptIds); + void updateDeptStatusNormal(Long[] deptIds); /** * 修改子元素关系 @@ -118,7 +118,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 结果 */ - public int updateDeptChildren (@Param("depts") List depts); + int updateDeptChildren(@Param("depts") List depts); /** * 删除部门管理信息 @@ -127,8 +127,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 结果 */ - public int deleteDeptById (Long deptId); + int deleteDeptById(Long deptId); SysDept selectDeptByName(@Param("name") String name); - } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictDataMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictDataMapper.java index 1e87a7e..f5cdc5d 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictDataMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictDataMapper.java @@ -19,7 +19,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 字典数据集合信息 */ - public List selectDictDataList (SysDictData dictData); + List selectDictDataList(SysDictData dictData); /** * 根据字典类型查询字典数据 @@ -28,7 +28,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 字典数据集合信息 */ - public List selectDictDataByType (String dictType); + List selectDictDataByType(String dictType); /** * 根据字典类型和字典键值查询字典数据信息 @@ -38,7 +38,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 字典标签 */ - public String selectDictLabel (@Param("dictType") String dictType, @Param("dictValue") String dictValue); + String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue); /** * 根据字典数据ID查询信息 @@ -47,7 +47,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 字典数据 */ - public SysDictData selectDictDataById (Long dictCode); + SysDictData selectDictDataById(Long dictCode); /** * 查询字典数据 @@ -56,7 +56,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 字典数据 */ - public int countDictDataByType (String dictType); + int countDictDataByType(String dictType); /** * 通过字典ID删除字典数据信息 @@ -65,7 +65,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 结果 */ - public int deleteDictDataById (Long dictCode); + int deleteDictDataById(Long dictCode); /** * 批量删除字典数据信息 @@ -74,7 +74,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 结果 */ - public int deleteDictDataByIds (Long[] dictCodes); + int deleteDictDataByIds(Long[] dictCodes); /** * 新增字典数据信息 @@ -83,7 +83,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 结果 */ - public int insertDictData (SysDictData dictData); + int insertDictData(SysDictData dictData); /** * 修改字典数据信息 @@ -92,7 +92,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 结果 */ - public int updateDictData (SysDictData dictData); + int updateDictData(SysDictData dictData); /** * 同步修改字典类型 @@ -102,5 +102,5 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 结果 */ - public int updateDictDataType (@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType); + int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictTypeMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictTypeMapper.java index 0a4ffe6..3b8473f 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictTypeMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictTypeMapper.java @@ -18,14 +18,14 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 字典类型集合信息 */ - public List selectDictTypeList (SysDictType dictType); + List selectDictTypeList(SysDictType dictType); /** * 根据所有字典类型 * * @return 字典类型集合信息 */ - public List selectDictTypeAll (); + List selectDictTypeAll(); /** * 根据字典类型ID查询信息 @@ -34,7 +34,7 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 字典类型 */ - public SysDictType selectDictTypeById (Long dictId); + SysDictType selectDictTypeById(Long dictId); /** * 根据字典类型查询信息 @@ -43,7 +43,7 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 字典类型 */ - public SysDictType selectDictTypeByType (String dictType); + SysDictType selectDictTypeByType(String dictType); /** * 通过字典ID删除字典信息 @@ -52,7 +52,7 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 结果 */ - public int deleteDictTypeById (Long dictId); + int deleteDictTypeById(Long dictId); /** * 批量删除字典类型信息 @@ -61,7 +61,7 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 结果 */ - public int deleteDictTypeByIds (Long[] dictIds); + int deleteDictTypeByIds(Long[] dictIds); /** * 新增字典类型信息 @@ -70,7 +70,7 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 结果 */ - public int insertDictType (SysDictType dictType); + int insertDictType(SysDictType dictType); /** * 修改字典类型信息 @@ -79,7 +79,7 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 结果 */ - public int updateDictType (SysDictType dictType); + int updateDictType(SysDictType dictType); /** * 校验字典类型称是否唯一 @@ -88,5 +88,5 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 结果 */ - public SysDictType checkDictTypeUnique (String dictType); + SysDictType checkDictTypeUnique(String dictType); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysLogininforMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysLogininforMapper.java index 0f1f86a..0e88949 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysLogininforMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysLogininforMapper.java @@ -16,7 +16,7 @@ public interface SysLogininforMapper extends BaseMapper { * * @param logininfor 访问日志对象 */ - public int insertLogininfor (SysLogininfor logininfor); + int insertLogininfor(SysLogininfor logininfor); /** * 查询系统登录日志集合 @@ -25,7 +25,7 @@ public interface SysLogininforMapper extends BaseMapper { * * @return 登录记录集合 */ - public List selectLogininforList (SysLogininfor logininfor); + List selectLogininforList(SysLogininfor logininfor); /** * 批量删除系统登录日志 @@ -34,12 +34,12 @@ public interface SysLogininforMapper extends BaseMapper { * * @return 结果 */ - public int deleteLogininforByIds (Long[] infoIds); + int deleteLogininforByIds(Long[] infoIds); /** * 清空系统登录日志 * * @return 结果 */ - public int cleanLogininfor (); + int cleanLogininfor(); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysMenuMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysMenuMapper.java index 8ceaaa0..92a2a01 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysMenuMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysMenuMapper.java @@ -19,14 +19,14 @@ public interface SysMenuMapper extends BaseMapper { * * @return 菜单列表 */ - public List selectMenuList (SysMenu menu); + List selectMenuList(SysMenu menu); /** * 根据用户所有权限 * * @return 权限列表 */ - public List selectMenuPerms (); + List selectMenuPerms(); /** * 根据用户查询系统菜单列表 @@ -35,7 +35,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 菜单列表 */ - public List selectMenuListByUserId (SysMenu menu); + List selectMenuListByUserId(SysMenu menu); /** * 根据角色ID查询权限 @@ -44,7 +44,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 权限列表 */ - public List selectMenuPermsByRoleId (Long roleId); + List selectMenuPermsByRoleId(Long roleId); /** * 根据用户ID查询权限 @@ -53,14 +53,14 @@ public interface SysMenuMapper extends BaseMapper { * * @return 权限列表 */ - public List selectMenuPermsByUserId (Long userId); + List selectMenuPermsByUserId(Long userId); /** * 根据用户ID查询菜单 * * @return 菜单列表 */ - public List selectMenuTreeAll (); + List selectMenuTreeAll(); /** * 根据用户ID查询菜单 @@ -69,7 +69,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 菜单列表 */ - public List selectMenuTreeByUserId (Long userId); + List selectMenuTreeByUserId(Long userId); /** * 根据角色ID查询菜单树信息 @@ -79,7 +79,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 选中菜单列表 */ - public List selectMenuListByRoleId (@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly); + List selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly); /** * 根据菜单ID查询信息 @@ -88,7 +88,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 菜单信息 */ - public SysMenu selectMenuById (Long menuId); + SysMenu selectMenuById(Long menuId); /** * 是否存在菜单子节点 @@ -97,7 +97,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 结果 */ - public int hasChildByMenuId (Long menuId); + int hasChildByMenuId(Long menuId); /** * 新增菜单信息 @@ -106,7 +106,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 结果 */ - public int insertMenu (SysMenu menu); + int insertMenu(SysMenu menu); /** * 修改菜单信息 @@ -115,7 +115,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 结果 */ - public int updateMenu (SysMenu menu); + int updateMenu(SysMenu menu); /** * 删除菜单管理信息 @@ -124,7 +124,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 结果 */ - public int deleteMenuById (Long menuId); + int deleteMenuById(Long menuId); /** * 校验菜单名称是否唯一 @@ -134,5 +134,5 @@ public interface SysMenuMapper extends BaseMapper { * * @return 结果 */ - public SysMenu checkMenuNameUnique (@Param("menuName") String menuName, @Param("parentId") Long parentId); + SysMenu checkMenuNameUnique(@Param("menuName") String menuName, @Param("parentId") Long parentId); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysNoticeMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysNoticeMapper.java index fee9930..3d97964 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysNoticeMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysNoticeMapper.java @@ -18,7 +18,7 @@ public interface SysNoticeMapper extends BaseMapper { * * @return 公告信息 */ - public SysNotice selectNoticeById (Long noticeId); + SysNotice selectNoticeById(Long noticeId); /** * 查询公告列表 @@ -27,7 +27,7 @@ public interface SysNoticeMapper extends BaseMapper { * * @return 公告集合 */ - public List selectNoticeList (SysNotice notice); + List selectNoticeList(SysNotice notice); /** * 新增公告 @@ -36,7 +36,7 @@ public interface SysNoticeMapper extends BaseMapper { * * @return 结果 */ - public int insertNotice (SysNotice notice); + int insertNotice(SysNotice notice); /** * 修改公告 @@ -45,7 +45,7 @@ public interface SysNoticeMapper extends BaseMapper { * * @return 结果 */ - public int updateNotice (SysNotice notice); + int updateNotice(SysNotice notice); /** * 批量删除公告 @@ -54,7 +54,7 @@ public interface SysNoticeMapper extends BaseMapper { * * @return 结果 */ - public int deleteNoticeById (Long noticeId); + int deleteNoticeById(Long noticeId); /** * 批量删除公告信息 @@ -63,5 +63,5 @@ public interface SysNoticeMapper extends BaseMapper { * * @return 结果 */ - public int deleteNoticeByIds (Long[] noticeIds); + int deleteNoticeByIds(Long[] noticeIds); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysOperLogMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysOperLogMapper.java index 6ea1bcd..752bb6b 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysOperLogMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysOperLogMapper.java @@ -16,7 +16,7 @@ public interface SysOperLogMapper extends BaseMapper { * * @param operLog 操作日志对象 */ - public int insertOperlog (SysOperLog operLog); + int insertOperlog(SysOperLog operLog); /** * 查询系统操作日志集合 @@ -25,7 +25,7 @@ public interface SysOperLogMapper extends BaseMapper { * * @return 操作日志集合 */ - public List selectOperLogList (SysOperLog operLog); + List selectOperLogList(SysOperLog operLog); /** * 批量删除系统操作日志 @@ -34,7 +34,7 @@ public interface SysOperLogMapper extends BaseMapper { * * @return 结果 */ - public int deleteOperLogByIds (Long[] operIds); + int deleteOperLogByIds(Long[] operIds); /** * 查询操作日志详细 @@ -43,10 +43,10 @@ public interface SysOperLogMapper extends BaseMapper { * * @return 操作日志对象 */ - public SysOperLog selectOperLogById (Long operId); + SysOperLog selectOperLogById(Long operId); /** * 清空操作日志 */ - public void cleanOperLog (); + void cleanOperLog(); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysPostMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysPostMapper.java index 4bfd66d..b379183 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysPostMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysPostMapper.java @@ -18,14 +18,14 @@ public interface SysPostMapper extends BaseMapper { * * @return 岗位数据集合 */ - public List selectPostList (SysPost post); + List selectPostList(SysPost post); /** * 查询所有岗位 * * @return 岗位列表 */ - public List selectPostAll (); + List selectPostAll(); /** * 通过岗位ID查询岗位信息 @@ -34,7 +34,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 角色对象信息 */ - public SysPost selectPostById (Long postId); + SysPost selectPostById(Long postId); /** * 根据用户ID获取岗位选择框列表 @@ -43,7 +43,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 选中岗位ID列表 */ - public List selectPostListByUserId (Long userId); + List selectPostListByUserId(Long userId); /** * 查询用户所属岗位组 @@ -52,7 +52,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 结果 */ - public List selectPostsByUserName (String userName); + List selectPostsByUserName(String userName); /** * 删除岗位信息 @@ -61,7 +61,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 结果 */ - public int deletePostById (Long postId); + int deletePostById(Long postId); /** * 批量删除岗位信息 @@ -70,7 +70,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 结果 */ - public int deletePostByIds (Long[] postIds); + int deletePostByIds(Long[] postIds); /** * 修改岗位信息 @@ -79,7 +79,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 结果 */ - public int updatePost (SysPost post); + int updatePost(SysPost post); /** * 新增岗位信息 @@ -88,7 +88,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 结果 */ - public int insertPost (SysPost post); + int insertPost(SysPost post); /** * 校验岗位名称 @@ -97,7 +97,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 结果 */ - public SysPost checkPostNameUnique (String postName); + SysPost checkPostNameUnique(String postName); /** * 校验岗位编码 @@ -106,5 +106,5 @@ public interface SysPostMapper extends BaseMapper { * * @return 结果 */ - public SysPost checkPostCodeUnique (String postCode); + SysPost checkPostCodeUnique(String postCode); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleDeptMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleDeptMapper.java index 0e6dd4d..1df12da 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleDeptMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleDeptMapper.java @@ -19,7 +19,7 @@ public interface SysRoleDeptMapper extends BaseMapper { * * @return 结果 */ - public int deleteRoleDeptByRoleId (Long roleId); + int deleteRoleDeptByRoleId(Long roleId); /** * 批量删除角色部门关联信息 @@ -28,7 +28,7 @@ public interface SysRoleDeptMapper extends BaseMapper { * * @return 结果 */ - public int deleteRoleDept (Long[] ids); + int deleteRoleDept(Long[] ids); /** * 查询部门使用数量 @@ -37,7 +37,7 @@ public interface SysRoleDeptMapper extends BaseMapper { * * @return 结果 */ - public int selectCountRoleDeptByDeptId (Long deptId); + int selectCountRoleDeptByDeptId(Long deptId); /** * 批量新增角色部门信息 @@ -46,5 +46,5 @@ public interface SysRoleDeptMapper extends BaseMapper { * * @return 结果 */ - public int batchRoleDept (List roleDeptList); + int batchRoleDept(List roleDeptList); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMapper.java index 2b01dc3..bb2de63 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMapper.java @@ -18,7 +18,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 角色数据集合信息 */ - public List selectRoleList (SysRole role); + List selectRoleList(SysRole role); /** * 根据用户ID查询角色 @@ -27,14 +27,14 @@ public interface SysRoleMapper extends BaseMapper { * * @return 角色列表 */ - public List selectRolePermissionByUserId (Long userId); + List selectRolePermissionByUserId(Long userId); /** * 查询所有角色 * * @return 角色列表 */ - public List selectRoleAll (); + List selectRoleAll(); /** * 根据用户ID获取角色选择框列表 @@ -43,7 +43,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 选中角色ID列表 */ - public List selectRoleListByUserId (Long userId); + List selectRoleListByUserId(Long userId); /** * 通过角色ID查询角色 @@ -52,7 +52,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 角色对象信息 */ - public SysRole selectRoleById (Long roleId); + SysRole selectRoleById(Long roleId); /** * 根据用户ID查询角色 @@ -61,7 +61,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 角色列表 */ - public List selectRolesByUserName (String userName); + List selectRolesByUserName(String userName); /** * 校验角色名称是否唯一 @@ -70,7 +70,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 角色信息 */ - public SysRole checkRoleNameUnique (String roleName); + SysRole checkRoleNameUnique(String roleName); /** * 校验角色权限是否唯一 @@ -79,7 +79,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 角色信息 */ - public SysRole checkRoleKeyUnique (String roleKey); + SysRole checkRoleKeyUnique(String roleKey); /** * 修改角色信息 @@ -88,7 +88,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 结果 */ - public int updateRole (SysRole role); + int updateRole(SysRole role); /** * 新增角色信息 @@ -97,7 +97,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 结果 */ - public int insertRole (SysRole role); + int insertRole(SysRole role); /** * 通过角色ID删除角色 @@ -106,7 +106,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 结果 */ - public int deleteRoleById (Long roleId); + int deleteRoleById(Long roleId); /** * 批量删除角色信息 @@ -115,5 +115,5 @@ public interface SysRoleMapper extends BaseMapper { * * @return 结果 */ - public int deleteRoleByIds (Long[] roleIds); + int deleteRoleByIds(Long[] roleIds); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMenuMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMenuMapper.java index 664ce26..1978e2d 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMenuMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMenuMapper.java @@ -19,7 +19,7 @@ public interface SysRoleMenuMapper extends BaseMapper { * * @return 结果 */ - public int checkMenuExistRole (Long menuId); + int checkMenuExistRole(Long menuId); /** * 通过角色ID删除角色和菜单关联 @@ -28,7 +28,7 @@ public interface SysRoleMenuMapper extends BaseMapper { * * @return 结果 */ - public int deleteRoleMenuByRoleId (Long roleId); + int deleteRoleMenuByRoleId(Long roleId); /** * 批量删除角色菜单关联信息 @@ -37,7 +37,7 @@ public interface SysRoleMenuMapper extends BaseMapper { * * @return 结果 */ - public int deleteRoleMenu (Long[] ids); + int deleteRoleMenu(Long[] ids); /** * 批量新增角色菜单信息 @@ -46,5 +46,5 @@ public interface SysRoleMenuMapper extends BaseMapper { * * @return 结果 */ - public int batchRoleMenu (List roleMenuList); + int batchRoleMenu(List roleMenuList); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserMapper.java index e037b34..76c8952 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserMapper.java @@ -19,7 +19,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 用户信息集合信息 */ - public List selectUserList (SysUser sysUser); + List selectUserList(SysUser sysUser); /** * 根据条件分页查询已配用户角色列表 @@ -28,7 +28,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 用户信息集合信息 */ - public List selectAllocatedList (SysUser user); + List selectAllocatedList(SysUser user); /** * 根据条件分页查询未分配用户角色列表 @@ -37,7 +37,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 用户信息集合信息 */ - public List selectUnallocatedList (SysUser user); + List selectUnallocatedList(SysUser user); /** * 通过用户名查询用户 @@ -46,7 +46,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 用户对象信息 */ - public SysUser selectUserByUserName (String userName); + SysUser selectUserByUserName(String userName); /** * 通过用户ID查询用户 @@ -55,7 +55,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 用户对象信息 */ - public SysUser selectUserById (Long userId); + SysUser selectUserById(Long userId); /** * 新增用户信息 @@ -64,7 +64,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public int insertUser (SysUser user); + int insertUser(SysUser user); /** * 修改用户信息 @@ -73,7 +73,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public int updateUser (SysUser user); + int updateUser(SysUser user); /** * 修改用户头像 @@ -83,7 +83,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public int updateUserAvatar (@Param("userName") String userName, @Param("avatar") String avatar); + int updateUserAvatar(@Param("userName") String userName, @Param("avatar") String avatar); /** * 重置用户密码 @@ -93,7 +93,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public int resetUserPwd (@Param("userName") String userName, @Param("password") String password); + int resetUserPwd(@Param("userName") String userName, @Param("password") String password); /** * 通过用户ID删除用户 @@ -102,7 +102,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserById (Long userId); + int deleteUserById(Long userId); /** * 批量删除用户信息 @@ -111,7 +111,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserByIds (Long[] userIds); + int deleteUserByIds(Long[] userIds); /** * 校验用户名称是否唯一 @@ -120,7 +120,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public SysUser checkUserNameUnique (String userName); + SysUser checkUserNameUnique(String userName); /** * 校验手机号码是否唯一 @@ -129,7 +129,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public SysUser checkPhoneUnique (String phonenumber); + SysUser checkPhoneUnique(String phonenumber); /** * 校验email是否唯一 @@ -138,5 +138,5 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public SysUser checkEmailUnique (String email); + SysUser checkEmailUnique(String email); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserPostMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserPostMapper.java index 8d09a47..db38b47 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserPostMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserPostMapper.java @@ -18,7 +18,7 @@ public interface SysUserPostMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserPostByUserId (Long userId); + int deleteUserPostByUserId(Long userId); /** * 通过岗位ID查询岗位使用数量 @@ -27,7 +27,7 @@ public interface SysUserPostMapper extends BaseMapper { * * @return 结果 */ - public int countUserPostById (Long postId); + int countUserPostById(Long postId); /** * 批量删除用户和岗位关联 @@ -36,7 +36,7 @@ public interface SysUserPostMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserPost (Long[] ids); + int deleteUserPost(Long[] ids); /** * 批量新增用户岗位信息 @@ -45,5 +45,5 @@ public interface SysUserPostMapper extends BaseMapper { * * @return 结果 */ - public int batchUserPost (List userPostList); + int batchUserPost(List userPostList); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserRoleMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserRoleMapper.java index 512adb8..c26f5fa 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserRoleMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserRoleMapper.java @@ -19,7 +19,7 @@ public interface SysUserRoleMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserRoleByUserId (Long userId); + int deleteUserRoleByUserId(Long userId); /** * 批量删除用户和角色关联 @@ -28,7 +28,7 @@ public interface SysUserRoleMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserRole (Long[] ids); + int deleteUserRole(Long[] ids); /** * 通过角色ID查询角色使用数量 @@ -37,7 +37,7 @@ public interface SysUserRoleMapper extends BaseMapper { * * @return 结果 */ - public int countUserRoleByRoleId (Long roleId); + int countUserRoleByRoleId(Long roleId); /** * 批量新增用户角色信息 @@ -46,7 +46,7 @@ public interface SysUserRoleMapper extends BaseMapper { * * @return 结果 */ - public int batchUserRole (List userRoleList); + int batchUserRole(List userRoleList); /** * 删除用户和角色关联信息 @@ -55,7 +55,7 @@ public interface SysUserRoleMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserRoleInfo (SysUserRole userRole); + int deleteUserRoleInfo(SysUserRole userRole); /** * 批量取消授权用户角色 @@ -65,5 +65,5 @@ public interface SysUserRoleMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserRoleInfos (@Param("roleId") Long roleId, @Param("userIds") Long[] userIds); + int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysDeptService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysDeptService.java index ead697e..02e5736 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysDeptService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysDeptService.java @@ -11,6 +11,12 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; +/** + * 远程调用部门接口 RemoteSysDeptService + * + * @author PengJiang + * Date 2024/6/7 09:00 + */ @FeignClient( contextId = "remoteSysDeptService", value = ServiceNameConstants.SYSTEM_SERVICE, @@ -18,11 +24,9 @@ import org.springframework.web.bind.annotation.RequestParam; path = "/dept" ) public interface RemoteSysDeptService { - @GetMapping("/selectDeptByName") - public Result selectDeptByName (@RequestParam("name") String name); + Result selectDeptByName(@RequestParam("name") String name); @PostMapping - public Result add (@Validated @RequestBody SysDept dept); - + Result add(@Validated @RequestBody SysDept dept); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysUserService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysUserService.java index db9965f..225c7b2 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysUserService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysUserService.java @@ -10,6 +10,12 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; +/** + * 远程调用用户 RemoteSysUserService + * + * @author PengJiang + * Date 2024/6/7 08:51 + */ @FeignClient( contextId = "remoteSysUserService", value = ServiceNameConstants.SYSTEM_SERVICE, @@ -24,5 +30,5 @@ public interface RemoteSysUserService { */ @RequiresPermissions("system:user:add") @PostMapping - public Result add (@Validated @RequestBody SysUser user); + Result add(@Validated @RequestBody SysUser user); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysConfigService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysConfigService.java index f23d67e..4ebc241 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysConfigService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysConfigService.java @@ -35,10 +35,10 @@ public interface SysConfigService extends IService { /** * 清空参数缓存数据 */ - public void clearConfigCache (); + void clearConfigCache(); /** * 加载参数缓存数据 */ - public void loadingConfigCache (); + void loadingConfigCache(); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDeptService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDeptService.java index cdb1d87..fcb8ce8 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDeptService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDeptService.java @@ -19,7 +19,7 @@ public interface SysDeptService extends IService { * * @return 部门信息集合 */ - public List selectDeptList (SysDept dept); + List selectDeptList(SysDept dept); /** * 查询部门树结构信息 @@ -28,7 +28,7 @@ public interface SysDeptService extends IService { * * @return 部门树信息集合 */ - public List selectDeptTreeList (SysDept dept); + List selectDeptTreeList(SysDept dept); /** * 构建前端所需要树结构 @@ -37,7 +37,7 @@ public interface SysDeptService extends IService { * * @return 树结构列表 */ - public List buildDeptTree (List depts); + List buildDeptTree(List depts); /** * 构建前端所需要下拉树结构 @@ -46,7 +46,7 @@ public interface SysDeptService extends IService { * * @return 下拉树结构列表 */ - public List buildDeptTreeSelect (List depts); + List buildDeptTreeSelect(List depts); /** * 根据角色ID查询部门树信息 @@ -55,7 +55,7 @@ public interface SysDeptService extends IService { * * @return 选中部门列表 */ - public List selectDeptListByRoleId (Long roleId); + List selectDeptListByRoleId(Long roleId); /** * 根据部门ID查询信息 @@ -64,7 +64,7 @@ public interface SysDeptService extends IService { * * @return 部门信息 */ - public SysDept selectDeptById (Long deptId); + SysDept selectDeptById(Long deptId); /** * 根据ID查询所有子部门(正常状态) @@ -73,7 +73,7 @@ public interface SysDeptService extends IService { * * @return 子部门数 */ - public int selectNormalChildrenDeptById (Long deptId); + int selectNormalChildrenDeptById(Long deptId); /** * 是否存在部门子节点 @@ -82,7 +82,7 @@ public interface SysDeptService extends IService { * * @return 结果 */ - public boolean hasChildByDeptId (Long deptId); + boolean hasChildByDeptId(Long deptId); /** * 查询部门是否存在用户 @@ -91,7 +91,7 @@ public interface SysDeptService extends IService { * * @return 结果 true 存在 false 不存在 */ - public boolean checkDeptExistUser (Long deptId); + boolean checkDeptExistUser(Long deptId); /** * 校验部门名称是否唯一 @@ -100,14 +100,14 @@ public interface SysDeptService extends IService { * * @return 结果 */ - public boolean checkDeptNameUnique (SysDept dept); + boolean checkDeptNameUnique(SysDept dept); /** * 校验部门是否有数据权限 * * @param deptId 部门id */ - public void checkDeptDataScope (Long deptId); + void checkDeptDataScope(Long deptId); /** * 新增保存部门信息 @@ -116,7 +116,7 @@ public interface SysDeptService extends IService { * * @return 结果 */ - public int insertDept (SysDept dept); + int insertDept(SysDept dept); /** * 修改保存部门信息 @@ -125,7 +125,7 @@ public interface SysDeptService extends IService { * * @return 结果 */ - public int updateDept (SysDept dept); + int updateDept(SysDept dept); /** * 删除部门管理信息 @@ -134,8 +134,7 @@ public interface SysDeptService extends IService { * * @return 结果 */ - public int deleteDeptById (Long deptId); + int deleteDeptById(Long deptId); SysDept selectDeptByName(String name); - } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictDataService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictDataService.java index 47aae4b..9fae9bc 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictDataService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictDataService.java @@ -18,7 +18,7 @@ public interface SysDictDataService extends IService { * * @return 字典数据集合信息 */ - public List selectDictDataList (SysDictData dictData); + List selectDictDataList(SysDictData dictData); /** * 根据字典类型和字典键值查询字典数据信息 @@ -28,7 +28,7 @@ public interface SysDictDataService extends IService { * * @return 字典标签 */ - public String selectDictLabel (String dictType, String dictValue); + String selectDictLabel(String dictType, String dictValue); /** * 根据字典数据ID查询信息 @@ -37,14 +37,14 @@ public interface SysDictDataService extends IService { * * @return 字典数据 */ - public SysDictData selectDictDataById (Long dictCode); + SysDictData selectDictDataById(Long dictCode); /** * 批量删除字典数据信息 * * @param dictCodes 需要删除的字典数据ID */ - public void deleteDictDataByIds (Long[] dictCodes); + void deleteDictDataByIds(Long[] dictCodes); /** * 新增保存字典数据信息 @@ -53,7 +53,7 @@ public interface SysDictDataService extends IService { * * @return 结果 */ - public int insertDictData (SysDictData dictData); + int insertDictData(SysDictData dictData); /** * 修改保存字典数据信息 @@ -62,5 +62,5 @@ public interface SysDictDataService extends IService { * * @return 结果 */ - public int updateDictData (SysDictData dictData); + int updateDictData(SysDictData dictData); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictTypeService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictTypeService.java index 1b3212d..b78947e 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictTypeService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictTypeService.java @@ -19,14 +19,14 @@ public interface SysDictTypeService extends IService { * * @return 字典类型集合信息 */ - public List selectDictTypeList (SysDictType dictType); + List selectDictTypeList(SysDictType dictType); /** * 根据所有字典类型 * * @return 字典类型集合信息 */ - public List selectDictTypeAll (); + List selectDictTypeAll(); /** * 根据字典类型查询字典数据 @@ -35,7 +35,7 @@ public interface SysDictTypeService extends IService { * * @return 字典数据集合信息 */ - public List selectDictDataByType (String dictType); + List selectDictDataByType(String dictType); /** * 根据字典类型ID查询信息 @@ -44,7 +44,7 @@ public interface SysDictTypeService extends IService { * * @return 字典类型 */ - public SysDictType selectDictTypeById (Long dictId); + SysDictType selectDictTypeById(Long dictId); /** * 根据字典类型查询信息 @@ -53,29 +53,29 @@ public interface SysDictTypeService extends IService { * * @return 字典类型 */ - public SysDictType selectDictTypeByType (String dictType); + SysDictType selectDictTypeByType(String dictType); /** * 批量删除字典信息 * * @param dictIds 需要删除的字典ID */ - public void deleteDictTypeByIds (Long[] dictIds); + void deleteDictTypeByIds(Long[] dictIds); /** * 加载字典缓存数据 */ - public void loadingDictCache (); + void loadingDictCache(); /** * 清空字典缓存数据 */ - public void clearDictCache (); + void clearDictCache(); /** * 重置字典缓存数据 */ - public void resetDictCache (); + void resetDictCache(); /** * 新增保存字典类型信息 @@ -84,7 +84,7 @@ public interface SysDictTypeService extends IService { * * @return 结果 */ - public int insertDictType (SysDictType dictType); + int insertDictType(SysDictType dictType); /** * 修改保存字典类型信息 @@ -93,7 +93,7 @@ public interface SysDictTypeService extends IService { * * @return 结果 */ - public int updateDictType (SysDictType dictType); + int updateDictType(SysDictType dictType); /** * 校验字典类型称是否唯一 @@ -102,5 +102,5 @@ public interface SysDictTypeService extends IService { * * @return 结果 */ - public boolean checkDictTypeUnique (SysDictType dictType); + boolean checkDictTypeUnique(SysDictType dictType); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysLogininforService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysLogininforService.java index bb3031e..a94e129 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysLogininforService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysLogininforService.java @@ -16,7 +16,7 @@ public interface SysLogininforService extends IService { * * @param logininfor 访问日志对象 */ - public int insertLogininfor (SysLogininfor logininfor); + int insertLogininfor(SysLogininfor logininfor); /** * 查询系统登录日志集合 @@ -25,7 +25,7 @@ public interface SysLogininforService extends IService { * * @return 登录记录集合 */ - public List selectLogininforList (SysLogininfor logininfor); + List selectLogininforList(SysLogininfor logininfor); /** * 批量删除系统登录日志 @@ -34,10 +34,10 @@ public interface SysLogininforService extends IService { * * @return 结果 */ - public int deleteLogininforByIds (Long[] infoIds); + int deleteLogininforByIds(Long[] infoIds); /** * 清空系统登录日志 */ - public void cleanLogininfor (); + void cleanLogininfor(); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysMenuService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysMenuService.java index 29bfb07..70b7733 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysMenuService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysMenuService.java @@ -21,7 +21,7 @@ public interface SysMenuService extends IService { * * @return 菜单列表 */ - public List selectMenuList (Long userId); + List selectMenuList(Long userId); /** * 根据用户查询系统菜单列表 @@ -31,7 +31,7 @@ public interface SysMenuService extends IService { * * @return 菜单列表 */ - public List selectMenuList (SysMenu menu, Long userId); + List selectMenuList(SysMenu menu, Long userId); /** * 根据用户ID查询权限 @@ -40,7 +40,7 @@ public interface SysMenuService extends IService { * * @return 权限列表 */ - public Set selectMenuPermsByUserId (Long userId); + Set selectMenuPermsByUserId(Long userId); /** * 根据角色ID查询权限 @@ -49,7 +49,7 @@ public interface SysMenuService extends IService { * * @return 权限列表 */ - public Set selectMenuPermsByRoleId (Long roleId); + Set selectMenuPermsByRoleId(Long roleId); /** * 根据用户ID查询菜单树信息 @@ -58,7 +58,7 @@ public interface SysMenuService extends IService { * * @return 菜单列表 */ - public List selectMenuTreeByUserId (Long userId); + List selectMenuTreeByUserId(Long userId); /** * 根据角色ID查询菜单树信息 @@ -67,7 +67,7 @@ public interface SysMenuService extends IService { * * @return 选中菜单列表 */ - public List selectMenuListByRoleId (Long roleId); + List selectMenuListByRoleId(Long roleId); /** * 构建前端路由所需要的菜单 @@ -76,7 +76,7 @@ public interface SysMenuService extends IService { * * @return 路由列表 */ - public List buildMenus (List menus); + List buildMenus(List menus); /** * 构建前端所需要树结构 @@ -85,7 +85,7 @@ public interface SysMenuService extends IService { * * @return 树结构列表 */ - public List buildMenuTree (List menus); + List buildMenuTree(List menus); /** * 构建前端所需要下拉树结构 @@ -94,7 +94,7 @@ public interface SysMenuService extends IService { * * @return 下拉树结构列表 */ - public List buildMenuTreeSelect (List menus); + List buildMenuTreeSelect(List menus); /** * 根据菜单ID查询信息 @@ -103,7 +103,7 @@ public interface SysMenuService extends IService { * * @return 菜单信息 */ - public SysMenu selectMenuById (Long menuId); + SysMenu selectMenuById(Long menuId); /** * 是否存在菜单子节点 @@ -112,7 +112,7 @@ public interface SysMenuService extends IService { * * @return 结果 true 存在 false 不存在 */ - public boolean hasChildByMenuId (Long menuId); + boolean hasChildByMenuId(Long menuId); /** * 查询菜单是否存在角色 @@ -121,7 +121,7 @@ public interface SysMenuService extends IService { * * @return 结果 true 存在 false 不存在 */ - public boolean checkMenuExistRole (Long menuId); + boolean checkMenuExistRole(Long menuId); /** * 新增保存菜单信息 @@ -130,7 +130,7 @@ public interface SysMenuService extends IService { * * @return 结果 */ - public int insertMenu (SysMenu menu); + int insertMenu(SysMenu menu); /** * 修改保存菜单信息 @@ -139,7 +139,7 @@ public interface SysMenuService extends IService { * * @return 结果 */ - public int updateMenu (SysMenu menu); + int updateMenu(SysMenu menu); /** * 删除菜单管理信息 @@ -148,7 +148,7 @@ public interface SysMenuService extends IService { * * @return 结果 */ - public int deleteMenuById (Long menuId); + int deleteMenuById(Long menuId); /** * 校验菜单名称是否唯一 @@ -157,5 +157,5 @@ public interface SysMenuService extends IService { * * @return 结果 */ - public boolean checkMenuNameUnique (SysMenu menu); + boolean checkMenuNameUnique(SysMenu menu); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysNoticeService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysNoticeService.java index a1afe02..a58ad23 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysNoticeService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysNoticeService.java @@ -18,7 +18,7 @@ public interface SysNoticeService extends IService { * * @return 公告信息 */ - public SysNotice selectNoticeById (Long noticeId); + SysNotice selectNoticeById(Long noticeId); /** * 查询公告列表 @@ -27,7 +27,7 @@ public interface SysNoticeService extends IService { * * @return 公告集合 */ - public List selectNoticeList (SysNotice notice); + List selectNoticeList(SysNotice notice); /** * 新增公告 @@ -36,7 +36,7 @@ public interface SysNoticeService extends IService { * * @return 结果 */ - public int insertNotice (SysNotice notice); + int insertNotice(SysNotice notice); /** * 修改公告 @@ -45,7 +45,7 @@ public interface SysNoticeService extends IService { * * @return 结果 */ - public int updateNotice (SysNotice notice); + int updateNotice(SysNotice notice); /** * 删除公告信息 @@ -54,7 +54,7 @@ public interface SysNoticeService extends IService { * * @return 结果 */ - public int deleteNoticeById (Long noticeId); + int deleteNoticeById(Long noticeId); /** * 批量删除公告信息 @@ -63,5 +63,5 @@ public interface SysNoticeService extends IService { * * @return 结果 */ - public int deleteNoticeByIds (Long[] noticeIds); + int deleteNoticeByIds(Long[] noticeIds); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysOperLogService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysOperLogService.java index 70b63ee..96d5a7d 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysOperLogService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysOperLogService.java @@ -18,7 +18,7 @@ public interface SysOperLogService extends IService { * * @return 结果 */ - public int insertOperlog (SysOperLog operLog); + int insertOperlog(SysOperLog operLog); /** * 查询系统操作日志集合 @@ -27,7 +27,7 @@ public interface SysOperLogService extends IService { * * @return 操作日志集合 */ - public List selectOperLogList (SysOperLog operLog); + List selectOperLogList(SysOperLog operLog); /** * 批量删除系统操作日志 @@ -36,7 +36,7 @@ public interface SysOperLogService extends IService { * * @return 结果 */ - public int deleteOperLogByIds (Long[] operIds); + int deleteOperLogByIds(Long[] operIds); /** * 查询操作日志详细 @@ -45,10 +45,10 @@ public interface SysOperLogService extends IService { * * @return 操作日志对象 */ - public SysOperLog selectOperLogById (Long operId); + SysOperLog selectOperLogById(Long operId); /** * 清空操作日志 */ - public void cleanOperLog (); + void cleanOperLog(); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPermissionService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPermissionService.java index 02e9d14..ad49156 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPermissionService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPermissionService.java @@ -17,7 +17,7 @@ public interface SysPermissionService { * * @return 角色权限信息 */ - public Set getRolePermission (SysUser user); + Set getRolePermission(SysUser user); /** * 获取菜单数据权限 @@ -26,5 +26,5 @@ public interface SysPermissionService { * * @return 菜单权限信息 */ - public Set getMenuPermission (SysUser user); + Set getMenuPermission(SysUser user); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPostService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPostService.java index fbd8677..0589f0d 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPostService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPostService.java @@ -18,14 +18,14 @@ public interface SysPostService extends IService { * * @return 岗位列表 */ - public List selectPostList (SysPost post); + List selectPostList(SysPost post); /** * 查询所有岗位 * * @return 岗位列表 */ - public List selectPostAll (); + List selectPostAll(); /** * 通过岗位ID查询岗位信息 @@ -34,7 +34,7 @@ public interface SysPostService extends IService { * * @return 角色对象信息 */ - public SysPost selectPostById (Long postId); + SysPost selectPostById(Long postId); /** * 根据用户ID获取岗位选择框列表 @@ -43,7 +43,7 @@ public interface SysPostService extends IService { * * @return 选中岗位ID列表 */ - public List selectPostListByUserId (Long userId); + List selectPostListByUserId(Long userId); /** * 校验岗位名称 @@ -52,7 +52,7 @@ public interface SysPostService extends IService { * * @return 结果 */ - public boolean checkPostNameUnique (SysPost post); + boolean checkPostNameUnique(SysPost post); /** * 校验岗位编码 @@ -61,7 +61,7 @@ public interface SysPostService extends IService { * * @return 结果 */ - public boolean checkPostCodeUnique (SysPost post); + boolean checkPostCodeUnique(SysPost post); /** * 通过岗位ID查询岗位使用数量 @@ -70,7 +70,7 @@ public interface SysPostService extends IService { * * @return 结果 */ - public int countUserPostById (Long postId); + int countUserPostById(Long postId); /** * 删除岗位信息 @@ -79,7 +79,7 @@ public interface SysPostService extends IService { * * @return 结果 */ - public int deletePostById (Long postId); + int deletePostById(Long postId); /** * 批量删除岗位信息 @@ -88,7 +88,7 @@ public interface SysPostService extends IService { * * @return 结果 */ - public int deletePostByIds (Long[] postIds); + int deletePostByIds(Long[] postIds); /** * 新增保存岗位信息 @@ -97,7 +97,7 @@ public interface SysPostService extends IService { * * @return 结果 */ - public int insertPost (SysPost post); + int insertPost(SysPost post); /** * 修改保存岗位信息 @@ -106,5 +106,5 @@ public interface SysPostService extends IService { * * @return 结果 */ - public int updatePost (SysPost post); + int updatePost(SysPost post); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysRoleService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysRoleService.java index 47009f8..5e2463e 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysRoleService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysRoleService.java @@ -20,7 +20,7 @@ public interface SysRoleService extends IService { * * @return 角色数据集合信息 */ - public List selectRoleList (SysRole role); + List selectRoleList(SysRole role); /** * 根据用户ID查询角色列表 @@ -29,7 +29,7 @@ public interface SysRoleService extends IService { * * @return 角色列表 */ - public List selectRolesByUserId (Long userId); + List selectRolesByUserId(Long userId); /** * 根据用户ID查询角色权限 @@ -38,14 +38,14 @@ public interface SysRoleService extends IService { * * @return 权限列表 */ - public Set selectRolePermissionByUserId (Long userId); + Set selectRolePermissionByUserId(Long userId); /** * 查询所有角色 * * @return 角色列表 */ - public List selectRoleAll (); + List selectRoleAll(); /** * 根据用户ID获取角色选择框列表 @@ -54,7 +54,7 @@ public interface SysRoleService extends IService { * * @return 选中角色ID列表 */ - public List selectRoleListByUserId (Long userId); + List selectRoleListByUserId(Long userId); /** * 通过角色ID查询角色 @@ -63,7 +63,7 @@ public interface SysRoleService extends IService { * * @return 角色对象信息 */ - public SysRole selectRoleById (Long roleId); + SysRole selectRoleById(Long roleId); /** * 校验角色名称是否唯一 @@ -72,7 +72,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public boolean checkRoleNameUnique (SysRole role); + boolean checkRoleNameUnique(SysRole role); /** * 校验角色权限是否唯一 @@ -81,21 +81,21 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public boolean checkRoleKeyUnique (SysRole role); + boolean checkRoleKeyUnique(SysRole role); /** * 校验角色是否允许操作 * * @param role 角色信息 */ - public void checkRoleAllowed (SysRole role); + void checkRoleAllowed(SysRole role); /** * 校验角色是否有数据权限 * * @param roleId 角色id */ - public void checkRoleDataScope (Long roleId); + void checkRoleDataScope(Long roleId); /** * 通过角色ID查询角色使用数量 @@ -104,7 +104,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int countUserRoleByRoleId (Long roleId); + int countUserRoleByRoleId(Long roleId); /** * 新增保存角色信息 @@ -113,7 +113,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int insertRole (SysRole role); + int insertRole(SysRole role); /** * 修改保存角色信息 @@ -122,7 +122,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int updateRole (SysRole role); + int updateRole(SysRole role); /** * 修改角色状态 @@ -131,7 +131,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int updateRoleStatus (SysRole role); + int updateRoleStatus(SysRole role); /** * 修改数据权限信息 @@ -140,7 +140,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int authDataScope (SysRole role); + int authDataScope(SysRole role); /** * 通过角色ID删除角色 @@ -149,7 +149,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int deleteRoleById (Long roleId); + int deleteRoleById(Long roleId); /** * 批量删除角色信息 @@ -158,7 +158,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int deleteRoleByIds (Long[] roleIds); + int deleteRoleByIds(Long[] roleIds); /** * 取消授权用户角色 @@ -167,7 +167,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int deleteAuthUser (SysUserRole userRole); + int deleteAuthUser(SysUserRole userRole); /** * 批量取消授权用户角色 @@ -177,7 +177,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int deleteAuthUsers (Long roleId, Long[] userIds); + int deleteAuthUsers(Long roleId, Long[] userIds); /** * 批量选择授权用户角色 @@ -187,5 +187,5 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int insertAuthUsers (Long roleId, Long[] userIds); + int insertAuthUsers(Long roleId, Long[] userIds); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserOnlineService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserOnlineService.java index 531735b..89c9e29 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserOnlineService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserOnlineService.java @@ -1,6 +1,5 @@ package com.muyu.system.service; -import com.baomidou.mybatisplus.extension.service.IService; import com.muyu.common.system.domain.LoginUser; import com.muyu.system.domain.SysUserOnline; @@ -18,7 +17,7 @@ public interface SysUserOnlineService { * * @return 在线用户信息 */ - public SysUserOnline selectOnlineByIpaddr (String ipaddr, LoginUser user); + SysUserOnline selectOnlineByIpaddr(String ipaddr, LoginUser user); /** * 通过用户名称查询信息 @@ -28,7 +27,7 @@ public interface SysUserOnlineService { * * @return 在线用户信息 */ - public SysUserOnline selectOnlineByUserName (String userName, LoginUser user); + SysUserOnline selectOnlineByUserName(String userName, LoginUser user); /** * 通过登录地址/用户名称查询信息 @@ -39,7 +38,7 @@ public interface SysUserOnlineService { * * @return 在线用户信息 */ - public SysUserOnline selectOnlineByInfo (String ipaddr, String userName, LoginUser user); + SysUserOnline selectOnlineByInfo(String ipaddr, String userName, LoginUser user); /** * 设置在线用户信息 @@ -48,5 +47,5 @@ public interface SysUserOnlineService { * * @return 在线用户 */ - public SysUserOnline loginUserToUserOnline (LoginUser user); + SysUserOnline loginUserToUserOnline(LoginUser user); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserService.java index f4c6167..0e25340 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserService.java @@ -18,7 +18,7 @@ public interface SysUserService extends IService { * * @return 用户信息集合信息 */ - public List selectUserList (SysUser user); + List selectUserList(SysUser user); /** * 根据条件分页查询已分配用户角色列表 @@ -27,7 +27,7 @@ public interface SysUserService extends IService { * * @return 用户信息集合信息 */ - public List selectAllocatedList (SysUser user); + List selectAllocatedList(SysUser user); /** * 根据条件分页查询未分配用户角色列表 @@ -36,7 +36,7 @@ public interface SysUserService extends IService { * * @return 用户信息集合信息 */ - public List selectUnallocatedList (SysUser user); + List selectUnallocatedList(SysUser user); /** * 通过用户名查询用户 @@ -45,7 +45,7 @@ public interface SysUserService extends IService { * * @return 用户对象信息 */ - public SysUser selectUserByUserName (String userName); + SysUser selectUserByUserName(String userName); /** * 通过用户ID查询用户 @@ -54,7 +54,7 @@ public interface SysUserService extends IService { * * @return 用户对象信息 */ - public SysUser selectUserById (Long userId); + SysUser selectUserById(Long userId); /** * 根据用户ID查询用户所属角色组 @@ -63,7 +63,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public String selectUserRoleGroup (String userName); + String selectUserRoleGroup(String userName); /** * 根据用户ID查询用户所属岗位组 @@ -72,7 +72,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public String selectUserPostGroup (String userName); + String selectUserPostGroup(String userName); /** * 校验用户名称是否唯一 @@ -81,7 +81,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public boolean checkUserNameUnique (SysUser user); + boolean checkUserNameUnique(SysUser user); /** * 校验手机号码是否唯一 @@ -90,7 +90,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public boolean checkPhoneUnique (SysUser user); + boolean checkPhoneUnique(SysUser user); /** * 校验email是否唯一 @@ -99,21 +99,21 @@ public interface SysUserService extends IService { * * @return 结果 */ - public boolean checkEmailUnique (SysUser user); + boolean checkEmailUnique(SysUser user); /** * 校验用户是否允许操作 * * @param user 用户信息 */ - public void checkUserAllowed (SysUser user); + void checkUserAllowed(SysUser user); /** * 校验用户是否有数据权限 * * @param userId 用户id */ - public void checkUserDataScope (Long userId); + void checkUserDataScope(Long userId); /** * 新增用户信息 @@ -122,7 +122,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int insertUser (SysUser user); + int insertUser(SysUser user); /** * 注册用户信息 @@ -131,7 +131,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public boolean registerUser (SysUser user); + boolean registerUser(SysUser user); /** * 修改用户信息 @@ -140,7 +140,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int updateUser (SysUser user); + int updateUser(SysUser user); /** * 用户授权角色 @@ -148,7 +148,7 @@ public interface SysUserService extends IService { * @param userId 用户ID * @param roleIds 角色组 */ - public void insertUserAuth (Long userId, Long[] roleIds); + void insertUserAuth(Long userId, Long[] roleIds); /** * 修改用户状态 @@ -157,7 +157,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int updateUserStatus (SysUser user); + int updateUserStatus(SysUser user); /** * 修改用户基本信息 @@ -166,7 +166,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int updateUserProfile (SysUser user); + int updateUserProfile(SysUser user); /** * 修改用户头像 @@ -176,7 +176,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public boolean updateUserAvatar (String userName, String avatar); + boolean updateUserAvatar(String userName, String avatar); /** * 重置用户密码 @@ -185,7 +185,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int resetPwd (SysUser user); + int resetPwd(SysUser user); /** * 重置用户密码 @@ -195,7 +195,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int resetUserPwd (String userName, String password); + int resetUserPwd(String userName, String password); /** * 通过用户ID删除用户 @@ -204,7 +204,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int deleteUserById (Long userId); + int deleteUserById(Long userId); /** * 批量删除用户信息 @@ -213,7 +213,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int deleteUserByIds (Long[] userIds); + int deleteUserByIds(Long[] userIds); /** * 导入用户数据 @@ -224,5 +224,5 @@ public interface SysUserService extends IService { * * @return 结果 */ - public String importUser (List userList, Boolean isUpdateSupport, String operName); + String importUser(List userList, Boolean isUpdateSupport, String operName); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysDeptServiceImpl.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysDeptServiceImpl.java index ba48c34..91423fd 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysDeptServiceImpl.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysDeptServiceImpl.java @@ -306,7 +306,7 @@ public class SysDeptServiceImpl extends ServiceImpl impl List tlist = new ArrayList(); Iterator it = list.iterator(); while (it.hasNext()) { - SysDept n = (SysDept) it.next(); + SysDept n = it.next(); if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getDeptId().longValue()) { tlist.add(n); } @@ -318,6 +318,6 @@ public class SysDeptServiceImpl extends ServiceImpl impl * 判断是否有子节点 */ private boolean hasChild (List list, SysDept t) { - return getChildList(list, t).size() > 0 ? true : false; + return getChildList(list, t).size() > 0; } } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysMenuServiceImpl.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysMenuServiceImpl.java index e4e2ec8..ac2190f 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysMenuServiceImpl.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysMenuServiceImpl.java @@ -204,7 +204,7 @@ public class SysMenuServiceImpl extends ServiceImpl impl List returnList = new ArrayList(); List tempList = menus.stream().map(SysMenu::getMenuId).collect(Collectors.toList()); for (Iterator iterator = menus.iterator() ; iterator.hasNext() ; ) { - SysMenu menu = (SysMenu) iterator.next(); + SysMenu menu = iterator.next(); // 如果是顶级节点, 遍历该父节点的所有子节点 if (!tempList.contains(menu.getParentId())) { recursionFn(menus, menu); @@ -426,7 +426,7 @@ public class SysMenuServiceImpl extends ServiceImpl impl public List getChildPerms (List list, int parentId) { List returnList = new ArrayList(); for (Iterator iterator = list.iterator() ; iterator.hasNext() ; ) { - SysMenu t = (SysMenu) iterator.next(); + SysMenu t = iterator.next(); // 一、根据传入的某个父节点ID,遍历该父节点的所有子节点 if (t.getParentId() == parentId) { recursionFn(list, t); @@ -460,7 +460,7 @@ public class SysMenuServiceImpl extends ServiceImpl impl List tlist = new ArrayList(); Iterator it = list.iterator(); while (it.hasNext()) { - SysMenu n = (SysMenu) it.next(); + SysMenu n = it.next(); if (n.getParentId().longValue() == t.getMenuId().longValue()) { tlist.add(n); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysPermissionServiceImpl.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysPermissionServiceImpl.java index a8641a1..0e260db 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysPermissionServiceImpl.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysPermissionServiceImpl.java @@ -1,6 +1,5 @@ package com.muyu.system.service.impl; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.muyu.common.system.domain.SysRole; import com.muyu.common.system.domain.SysUser; import com.muyu.system.service.SysMenuService; diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysUserOnlineServiceImpl.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysUserOnlineServiceImpl.java index 8ede754..c1ef1ee 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysUserOnlineServiceImpl.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysUserOnlineServiceImpl.java @@ -1,6 +1,5 @@ package com.muyu.system.service.impl; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.muyu.common.core.utils.StringUtils; import com.muyu.common.system.domain.LoginUser; import com.muyu.system.domain.SysUserOnline; diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysUserServiceImpl.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysUserServiceImpl.java index ab88e1c..45fc35a 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysUserServiceImpl.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysUserServiceImpl.java @@ -14,8 +14,8 @@ import com.muyu.system.domain.SysPost; import com.muyu.system.domain.SysUserPost; import com.muyu.system.domain.SysUserRole; import com.muyu.system.mapper.*; -import com.muyu.system.service.SysUserService; import com.muyu.system.service.SysConfigService; +import com.muyu.system.service.SysUserService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -238,11 +238,14 @@ public class SysUserServiceImpl extends ServiceImpl impl public int insertUser (SysUser user) { // 新增用户信息 int rows = userMapper.insertUser(user); + + //赋值userId +// user.setUserId((long) rows); // 新增用户岗位关联 insertUserPost(user); // 新增用户与角色管理 insertUserRole(user); - return rows; + return rows; } /** diff --git a/muyu-modules/muyu-system/src/main/resources/mapper/system/SysDeptMapper.xml b/muyu-modules/muyu-system/src/main/resources/mapper/system/SysDeptMapper.xml index 26f759a..2641ed2 100644 --- a/muyu-modules/muyu-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/muyu-modules/muyu-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -87,7 +87,7 @@ from sys_dept where del_flag = '0' and parent_id = #{deptId} - limit 1 + limit 1 + insert into sys_dept( @@ -180,9 +183,4 @@ where dept_id = #{deptId} - - - diff --git a/muyu-modules/muyu-system/src/main/resources/mapper/system/SysUserMapper.xml b/muyu-modules/muyu-system/src/main/resources/mapper/system/SysUserMapper.xml index 6f633b7..630d4fb 100644 --- a/muyu-modules/muyu-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/muyu-modules/muyu-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -165,7 +165,7 @@ from sys_user where user_name = #{userName} and del_flag = '0' - limit 1 + limit 1