Merge remote-tracking branch 'origin/master'

master
Jiang Peng 2024-06-18 09:49:05 +08:00
commit f88a2ec153
69 changed files with 985 additions and 938 deletions

View File

@ -53,7 +53,7 @@ public class ManyDataSource {
List<EnterPriseInfo> list = new ArrayList<>(); List<EnterPriseInfo> list = new ArrayList<>();
list.add( list.add(
EnterPriseInfo.builder() EnterPriseInfo.builder()
.entCode("jiang_0606") .entCode("jiang_0612")
.ip("101.34.248.9") .ip("101.34.248.9")
.port(3309) .port(3309)
.build() .build()

View File

@ -1,12 +1,12 @@
package com.muyu.customer.business.domain.req; 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 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 * fence

View File

@ -1,12 +1,12 @@
package com.muyu.customer.business.domain.req; 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 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 * fence

View File

@ -1,12 +1,12 @@
package com.muyu.customer.business.domain.req; 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 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 * fence

View File

@ -1,15 +1,16 @@
package com.muyu.customer.business.domain.req; 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.math.BigDecimal;
import java.util.Date; 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 * vehicle

View File

@ -1,15 +1,16 @@
package com.muyu.customer.business.domain.req; 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.math.BigDecimal;
import java.util.Date; 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 * vehicle

View File

@ -1,15 +1,16 @@
package com.muyu.customer.business.domain.req; 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.math.BigDecimal;
import java.util.Date; 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 * vehicle

View File

@ -102,10 +102,11 @@ public class FenceController extends BaseController {
*/ */
@RequiresPermissions("customerBusiness:fence:remove") @RequiresPermissions("customerBusiness:fence:remove")
@Log(title = "电子围栏", businessType = BusinessType.DELETE) @Log(title = "电子围栏", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
@ApiOperation("删除电子围栏") @ApiOperation("删除电子围栏")
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4") @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
public Result<String> remove(@PathVariable List<Long> ids) { public Result<String> remove(@PathVariable List<Long> ids) {
return toAjax(fenceService.removeBatchByIds(ids)); return toAjax(fenceService.removeBatchByIds(ids));
} }
} }

View File

@ -3,6 +3,8 @@ package com.muyu.customer.business.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; 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 io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -36,9 +38,12 @@ import com.muyu.common.core.web.page.TableDataInfo;
@RestController @RestController
@RequestMapping("/vehicle") @RequestMapping("/vehicle")
public class VehicleController extends BaseController { public class VehicleController extends BaseController {
@Autowired @Autowired
private VehicleService vehicleService; private VehicleService vehicleService;
@Autowired
private VehicleMapper vehicleMapper;
/** /**
* *
*/ */
@ -102,10 +107,15 @@ public class VehicleController extends BaseController {
*/ */
@RequiresPermissions("customerBusiness:vehicle:remove") @RequiresPermissions("customerBusiness:vehicle:remove")
@Log(title = "车辆录入", businessType = BusinessType.DELETE) @Log(title = "车辆录入", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
@ApiOperation("删除车辆录入") @ApiOperation("删除车辆录入")
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4") @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
public Result<String> remove(@PathVariable List<Long> ids) { public Result<String> remove(@PathVariable List<Long> ids) {
return toAjax(vehicleService.removeBatchByIds(ids)); return toAjax(vehicleService.removeBatchByIds(ids));
} }
@GetMapping("/list/all")
public Result<List<Vehicle>> findAll () {
return Result.success(vehicleMapper.selectList(new QueryWrapper<>()));
}
} }

View File

@ -1,77 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.customer.business.mapper.GroupMapper">
<resultMap type="com.muyu.customer.business.domain.Group" id="GroupResult">
<result property="id" column="id" />
<result property="groupName" column="group_name" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectGroupVo">
select id, group_name, remark, create_by, create_time, update_by, update_time from `group`
</sql>
<select id="selectGroupList" parameterType="com.muyu.customer.business.domain.Group" resultMap="GroupResult">
<include refid="selectGroupVo"/>
<where>
<if test="groupName != null and groupName != ''"> and group_name like concat('%', #{groupName}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
</where>
</select>
<select id="selectGroupById" parameterType="Long" resultMap="GroupResult">
<include refid="selectGroupVo"/>
where id = #{id}
</select>
<insert id="insertGroup" parameterType="com.muyu.customer.business.domain.Group" useGeneratedKeys="true" keyProperty="id">
insert into `group`
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="groupName != null">group_name,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="groupName != null">#{groupName},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateGroup" parameterType="com.muyu.customer.business.domain.Group">
update `group`
<trim prefix="SET" suffixOverrides=",">
<if test="groupName != null">group_name = #{groupName},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteGroupById" parameterType="Long">
delete from `group` where id = #{id}
</delete>
<delete id="deleteGroupByIds" parameterType="String">
delete from `group` where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -22,6 +22,11 @@
<groupId>com.muyu</groupId> <groupId>com.muyu</groupId>
<artifactId>muyu-common-core</artifactId> <artifactId>muyu-common-core</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.muyu</groupId>
<artifactId>muyu-common-security</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.muyu.common.security.utils.SecurityUtils;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
@ -29,168 +30,165 @@ import com.muyu.common.core.web.domain.BaseEntity;
@AllArgsConstructor @AllArgsConstructor
@TableName("enterprise") @TableName("enterprise")
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Enterprise", description = "企业信息") @ApiModel(value = "Enterprise", description = "车辆运营平台")
public class Enterprise extends BaseEntity { public class Enterprise extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 主键 */ /** 主键 */
@TableId(value = "id",type = IdType.AUTO) @TableId(value = "id",type = IdType.AUTO)
@ApiModelProperty(name = "主键", value = "主键") @ApiModelProperty(name = "主键", value = "主键")
private String id; private Integer id;
/** 企业名称 */ /** 企业名称 */
@Excel(name = "企业名称") @Excel(name = "企业名称")
@ApiModelProperty(name = "企业名称", value = "企业名称") @ApiModelProperty(name = "企业名称", value = "企业名称")
private String ebterpriseName; private String ebterpriseName;
/** 法定代表人 */ /** 法定代表人 */
@Excel(name = "法定代表人") @Excel(name = "法定代表人")
@ApiModelProperty(name = "法定代表人", value = "法定代表人") @ApiModelProperty(name = "法定代表人", value = "法定代表人")
private String legalPerson; private String legalPerson;
/** 经营执照凭证号码 */ /** 经营执照凭证号码 */
@Excel(name = "经营执照凭证号码") @Excel(name = "经营执照凭证号码")
@ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码")
private String businessLincenseNumber; private String businessLincenseNumber;
/** 企业成立时间 */ /** 企业成立时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "企业成立时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "企业成立时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(name = "企业成立时间", value = "企业成立时间") @ApiModelProperty(name = "企业成立时间", value = "企业成立时间")
private Date estabinessDate; private Date estabinessDate;
/** 经营范围 */ /** 经营范围 */
@Excel(name = "经营范围") @Excel(name = "经营范围")
@ApiModelProperty(name = "经营范围", value = "经营范围") @ApiModelProperty(name = "经营范围", value = "经营范围")
private String businessScope; private String businessScope;
/** 注册地址 */ /** 注册地址 */
@Excel(name = "注册地址") @Excel(name = "注册地址")
@ApiModelProperty(name = "注册地址", value = "注册地址") @ApiModelProperty(name = "注册地址", value = "注册地址")
private String address; private String address;
/** 企业联系方式 */ /** 企业联系方式 */
@Excel(name = "企业联系方式") @Excel(name = "企业联系方式")
@ApiModelProperty(name = "企业联系方式", value = "企业联系方式") @ApiModelProperty(name = "企业联系方式", value = "企业联系方式")
private String contactPhone; private String contactPhone;
/** 公司邮箱 */ /** 公司邮箱 */
@Excel(name = "公司邮箱") @Excel(name = "公司邮箱")
@ApiModelProperty(name = "公司邮箱", value = "公司邮箱") @ApiModelProperty(name = "公司邮箱", value = "公司邮箱")
private String email; private String email;
/** 企业当前状态 */ /** 企业当前状态 */
@Excel(name = "企业当前状态") @Excel(name = "企业当前状态")
@ApiModelProperty(name = "企业当前状态", value = "企业当前状态") @ApiModelProperty(name = "企业当前状态", value = "企业当前状态")
private String status; private String enterpriseStatus;
/** 企业入驻平台时期 */ /** 企业入驻平台时期 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "企业入驻平台时期", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "企业入驻平台时期", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期")
private Date registrationDate; private Date registrationDate;
/** 企业认证id */ /** 企业认证id */
@Excel(name = "企业认证id") @Excel(name = "企业认证id")
@ApiModelProperty(name = "企业认证id", value = "企业认证id") @ApiModelProperty(name = "企业认证id", value = "企业认证id")
private Long certificationId; private Long certificationId;
/** 认证时间 */ /** 认证时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "认证时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "认证时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(name = "认证时间", value = "认证时间") @ApiModelProperty(name = "认证时间", value = "认证时间")
private Date authenticationDate; private Date authenticationDate;
/** 服务级别 */ /** 服务级别 */
@Excel(name = "服务级别") @Excel(name = "服务级别")
@ApiModelProperty(name = "服务级别", value = "服务级别") @ApiModelProperty(name = "服务级别", value = "服务级别")
private Long serviceLevel; private Long serviceLevel;
/** 开通服务id */ /** 开通服务id */
@Excel(name = "开通服务id") @Excel(name = "开通服务id")
@ApiModelProperty(name = "开通服务id", value = "开通服务id") @ApiModelProperty(name = "开通服务id", value = "开通服务id")
private Long openServerId; private Long openServerId;
/** 增值服务id */ /** 增值服务id */
@Excel(name = "增值服务id") @Excel(name = "增值服务id")
@ApiModelProperty(name = "增值服务id", value = "增值服务id") @ApiModelProperty(name = "增值服务id", value = "增值服务id")
private Long addServerId; private Long addServerId;
/** /**
* *
*/ */
public static Enterprise queryBuild( EnterpriseQueryReq enterpriseQueryReq){ public static Enterprise queryBuild( EnterpriseQueryReq enterpriseQueryReq){
return Enterprise.builder() return Enterprise.builder()
.ebterpriseName(enterpriseQueryReq.getEbterpriseName()) .ebterpriseName(enterpriseQueryReq.getEbterpriseName())
.legalPerson(enterpriseQueryReq.getLegalPerson()) .legalPerson(enterpriseQueryReq.getLegalPerson())
.businessLincenseNumber(enterpriseQueryReq.getBusinessLincenseNumber()) .businessLincenseNumber(enterpriseQueryReq.getBusinessLincenseNumber())
.estabinessDate(enterpriseQueryReq.getEstabinessDate()) .estabinessDate(enterpriseQueryReq.getEstabinessDate())
.businessScope(enterpriseQueryReq.getBusinessScope()) .businessScope(enterpriseQueryReq.getBusinessScope())
.address(enterpriseQueryReq.getAddress()) .address(enterpriseQueryReq.getAddress())
.contactPhone(enterpriseQueryReq.getContactPhone()) .contactPhone(enterpriseQueryReq.getContactPhone())
.email(enterpriseQueryReq.getEmail()) .email(enterpriseQueryReq.getEmail())
.status(enterpriseQueryReq.getStatus()) .enterpriseStatus(enterpriseQueryReq.getEnterpriseStatus())
.registrationDate(enterpriseQueryReq.getRegistrationDate()) .registrationDate(enterpriseQueryReq.getRegistrationDate())
.certificationId(enterpriseQueryReq.getCertificationId()) .certificationId(enterpriseQueryReq.getCertificationId())
.authenticationDate(enterpriseQueryReq.getAuthenticationDate()) .authenticationDate(enterpriseQueryReq.getAuthenticationDate())
.serviceLevel(enterpriseQueryReq.getServiceLevel()) .serviceLevel(enterpriseQueryReq.getServiceLevel())
.openServerId(enterpriseQueryReq.getOpenServerId()) .openServerId(enterpriseQueryReq.getOpenServerId())
.addServerId(enterpriseQueryReq.getAddServerId()) .addServerId(enterpriseQueryReq.getAddServerId())
.build(); .build();
} }
/** /**
* *
*/ */
public static Enterprise saveBuild(EnterpriseSaveReq enterpriseSaveReq){ public static Enterprise saveBuild(EnterpriseSaveReq enterpriseSaveReq){
return Enterprise.builder() return Enterprise.builder()
.ebterpriseName(enterpriseSaveReq.getEbterpriseName()) .ebterpriseName(enterpriseSaveReq.getEbterpriseName())
.legalPerson(enterpriseSaveReq.getLegalPerson()) .legalPerson(enterpriseSaveReq.getLegalPerson())
.businessLincenseNumber(enterpriseSaveReq.getBusinessLincenseNumber()) .businessLincenseNumber(enterpriseSaveReq.getBusinessLincenseNumber())
.estabinessDate(enterpriseSaveReq.getEstabinessDate()) .estabinessDate(enterpriseSaveReq.getEstabinessDate())
.businessScope(enterpriseSaveReq.getBusinessScope()) .businessScope(enterpriseSaveReq.getBusinessScope())
.address(enterpriseSaveReq.getAddress()) .address(enterpriseSaveReq.getAddress())
.contactPhone(enterpriseSaveReq.getContactPhone()) .contactPhone(enterpriseSaveReq.getContactPhone())
.email(enterpriseSaveReq.getEmail()) .email(enterpriseSaveReq.getEmail())
.status(enterpriseSaveReq.getStatus()) .enterpriseStatus(enterpriseSaveReq.getEnterpriseStatus())
.registrationDate(enterpriseSaveReq.getRegistrationDate()) .registrationDate(enterpriseSaveReq.getRegistrationDate())
.certificationId(enterpriseSaveReq.getCertificationId()) .certificationId(enterpriseSaveReq.getCertificationId())
.authenticationDate(enterpriseSaveReq.getAuthenticationDate()) .authenticationDate(enterpriseSaveReq.getAuthenticationDate())
.serviceLevel(enterpriseSaveReq.getServiceLevel()) .serviceLevel(enterpriseSaveReq.getServiceLevel())
.openServerId(enterpriseSaveReq.getOpenServerId()) .openServerId(enterpriseSaveReq.getOpenServerId())
.addServerId(enterpriseSaveReq.getAddServerId()) .addServerId(enterpriseSaveReq.getAddServerId())
.createBy(enterpriseSaveReq.getCreateBy()) .createBy(SecurityUtils.getUsername())
.createTime(new Date()) .createTime(new Date())
.remark(enterpriseSaveReq.getRemark()) .build();
.build(); }
}
/** /**
* *
*/ */
public static Enterprise editBuild(String id, EnterpriseEditReq enterpriseEditReq){ public static Enterprise editBuild(Integer id, EnterpriseEditReq enterpriseEditReq){
return Enterprise.builder() return Enterprise.builder()
.id(id) .id(id)
.ebterpriseName(enterpriseEditReq.getEbterpriseName()) .ebterpriseName(enterpriseEditReq.getEbterpriseName()) .legalPerson(enterpriseEditReq.getLegalPerson())
.legalPerson(enterpriseEditReq.getLegalPerson()) .businessLincenseNumber(enterpriseEditReq.getBusinessLincenseNumber())
.businessLincenseNumber(enterpriseEditReq.getBusinessLincenseNumber()) .estabinessDate(enterpriseEditReq.getEstabinessDate())
.estabinessDate(enterpriseEditReq.getEstabinessDate()) .businessScope(enterpriseEditReq.getBusinessScope())
.businessScope(enterpriseEditReq.getBusinessScope()) .address(enterpriseEditReq.getAddress())
.address(enterpriseEditReq.getAddress()) .contactPhone(enterpriseEditReq.getContactPhone())
.contactPhone(enterpriseEditReq.getContactPhone()) .email(enterpriseEditReq.getEmail())
.email(enterpriseEditReq.getEmail()) .enterpriseStatus(enterpriseEditReq.getEnterpriseStatus())
.status(enterpriseEditReq.getStatus()) .registrationDate(enterpriseEditReq.getRegistrationDate())
.registrationDate(enterpriseEditReq.getRegistrationDate()) .certificationId(enterpriseEditReq.getCertificationId())
.certificationId(enterpriseEditReq.getCertificationId()) .authenticationDate(enterpriseEditReq.getAuthenticationDate())
.authenticationDate(enterpriseEditReq.getAuthenticationDate()) .serviceLevel(enterpriseEditReq.getServiceLevel())
.serviceLevel(enterpriseEditReq.getServiceLevel()) .openServerId(enterpriseEditReq.getOpenServerId())
.openServerId(enterpriseEditReq.getOpenServerId()) .addServerId(enterpriseEditReq.getAddServerId())
.addServerId(enterpriseEditReq.getAddServerId()) .updateBy(SecurityUtils.getUsername())
.updateBy(enterpriseEditReq.getUpdateBy()) .updateTime(new Date())
.updateTime(new Date()) .build();
.remark(enterpriseEditReq.getRemark()) }
.build();
}
} }

View File

@ -9,83 +9,84 @@ import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder; import lombok.experimental.SuperBuilder;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import com.muyu.common.core.web.domain.BaseEntity; import com.muyu.common.core.web.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;
/** /**
* enterprise * enterprise
* *
* @author muyu * @author muyu
* @date 2024-05-27 * @date 2024-06-05
*/ */
@Data @Data
@SuperBuilder @SuperBuilder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@ApiModel(value = "EnterpriseEditReq", description = "企业信息") @ApiModel(value = "EnterpriseEditReq", description = "车辆运营平台")
public class EnterpriseEditReq extends BaseEntity { public class EnterpriseEditReq extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 企业名称 */ /** 企业名称 */
@ApiModelProperty(name = "企业名称", value = "企业名称") @ApiModelProperty(name = "企业名称", value = "企业名称")
private String ebterpriseName; private String ebterpriseName;
/** 法定代表人 */ /** 法定代表人 */
@ApiModelProperty(name = "法定代表人", value = "法定代表人") @ApiModelProperty(name = "法定代表人", value = "法定代表人")
private String legalPerson; private String legalPerson;
/** 经营执照凭证号码 */ /** 经营执照凭证号码 */
@ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码")
private String businessLincenseNumber; private String businessLincenseNumber;
/** 企业成立时间 */ /** 企业成立时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "企业成立时间", value = "企业成立时间") @ApiModelProperty(name = "企业成立时间", value = "企业成立时间")
private Date estabinessDate; private Date estabinessDate;
/** 经营范围 */ /** 经营范围 */
@ApiModelProperty(name = "经营范围", value = "经营范围") @ApiModelProperty(name = "经营范围", value = "经营范围")
private String businessScope; private String businessScope;
/** 注册地址 */ /** 注册地址 */
@ApiModelProperty(name = "注册地址", value = "注册地址") @ApiModelProperty(name = "注册地址", value = "注册地址")
private String address; private String address;
/** 企业联系方式 */ /** 企业联系方式 */
@ApiModelProperty(name = "企业联系方式", value = "企业联系方式") @ApiModelProperty(name = "企业联系方式", value = "企业联系方式")
private String contactPhone; private String contactPhone;
/** 公司邮箱 */ /** 公司邮箱 */
@ApiModelProperty(name = "公司邮箱", value = "公司邮箱") @ApiModelProperty(name = "公司邮箱", value = "公司邮箱")
private String email; private String email;
/** 企业当前状态 */ /** 企业当前状态 */
@ApiModelProperty(name = "企业当前状态", value = "企业当前状态") @ApiModelProperty(name = "企业当前状态", value = "企业当前状态")
private String status; private String enterpriseStatus;
/** 企业入驻平台时期 */ /** 企业入驻平台时期 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期")
private Date registrationDate; private Date registrationDate;
/** 企业认证id */ /** 企业认证id */
@ApiModelProperty(name = "企业认证id", value = "企业认证id") @ApiModelProperty(name = "企业认证id", value = "企业认证id")
private Long certificationId; private Long certificationId;
/** 认证时间 */ /** 认证时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "认证时间", value = "认证时间") @ApiModelProperty(name = "认证时间", value = "认证时间")
private Date authenticationDate; private Date authenticationDate;
/** 服务级别 */ /** 服务级别 */
@ApiModelProperty(name = "服务级别", value = "服务级别") @ApiModelProperty(name = "服务级别", value = "服务级别")
private Long serviceLevel; private Long serviceLevel;
/** 开通服务id */ /** 开通服务id */
@ApiModelProperty(name = "开通服务id", value = "开通服务id") @ApiModelProperty(name = "开通服务id", value = "开通服务id")
private Long openServerId; private Long openServerId;
/** 增值服务id */ /** 增值服务id */
@ApiModelProperty(name = "增值服务id", value = "增值服务id") @ApiModelProperty(name = "增值服务id", value = "增值服务id")
private Long addServerId; private Long addServerId;
} }

View File

@ -11,81 +11,81 @@ import io.swagger.annotations.*;
import com.muyu.common.core.web.domain.BaseEntity; import com.muyu.common.core.web.domain.BaseEntity;
/** /**
* enterprise * enterprise
* *
* @author muyu * @author muyu
* @date 2024-05-27 * @date 2024-06-05
*/ */
@Data @Data
@SuperBuilder @SuperBuilder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@ApiModel(value = "EnterpriseQueryReq", description = "企业信息") @ApiModel(value = "EnterpriseQueryReq", description = "车辆运营平台")
public class EnterpriseQueryReq extends BaseEntity { public class EnterpriseQueryReq extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 企业名称 */ /** 企业名称 */
@ApiModelProperty(name = "企业名称", value = "企业名称") @ApiModelProperty(name = "企业名称", value = "企业名称")
private String ebterpriseName; private String ebterpriseName;
/** 法定代表人 */ /** 法定代表人 */
@ApiModelProperty(name = "法定代表人", value = "法定代表人") @ApiModelProperty(name = "法定代表人", value = "法定代表人")
private String legalPerson; private String legalPerson;
/** 经营执照凭证号码 */ /** 经营执照凭证号码 */
@ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码")
private String businessLincenseNumber; private String businessLincenseNumber;
/** 企业成立时间 */ /** 企业成立时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "企业成立时间", value = "企业成立时间") @ApiModelProperty(name = "企业成立时间", value = "企业成立时间")
private Date estabinessDate; private Date estabinessDate;
/** 经营范围 */ /** 经营范围 */
@ApiModelProperty(name = "经营范围", value = "经营范围") @ApiModelProperty(name = "经营范围", value = "经营范围")
private String businessScope; private String businessScope;
/** 注册地址 */ /** 注册地址 */
@ApiModelProperty(name = "注册地址", value = "注册地址") @ApiModelProperty(name = "注册地址", value = "注册地址")
private String address; private String address;
/** 企业联系方式 */ /** 企业联系方式 */
@ApiModelProperty(name = "企业联系方式", value = "企业联系方式") @ApiModelProperty(name = "企业联系方式", value = "企业联系方式")
private String contactPhone; private String contactPhone;
/** 公司邮箱 */ /** 公司邮箱 */
@ApiModelProperty(name = "公司邮箱", value = "公司邮箱") @ApiModelProperty(name = "公司邮箱", value = "公司邮箱")
private String email; private String email;
/** 企业当前状态 */ /** 企业当前状态 */
@ApiModelProperty(name = "企业当前状态", value = "企业当前状态") @ApiModelProperty(name = "企业当前状态", value = "企业当前状态")
private String status; private String enterpriseStatus;
/** 企业入驻平台时期 */ /** 企业入驻平台时期 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期")
private Date registrationDate; private Date registrationDate;
/** 企业认证id */ /** 企业认证id */
@ApiModelProperty(name = "企业认证id", value = "企业认证id") @ApiModelProperty(name = "企业认证id", value = "企业认证id")
private Long certificationId; private Long certificationId;
/** 认证时间 */ /** 认证时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "认证时间", value = "认证时间") @ApiModelProperty(name = "认证时间", value = "认证时间")
private Date authenticationDate; private Date authenticationDate;
/** 服务级别 */ /** 服务级别 */
@ApiModelProperty(name = "服务级别", value = "服务级别") @ApiModelProperty(name = "服务级别", value = "服务级别")
private Long serviceLevel; private Long serviceLevel;
/** 开通服务id */ /** 开通服务id */
@ApiModelProperty(name = "开通服务id", value = "开通服务id") @ApiModelProperty(name = "开通服务id", value = "开通服务id")
private Long openServerId; private Long openServerId;
/** 增值服务id */ /** 增值服务id */
@ApiModelProperty(name = "增值服务id", value = "增值服务id") @ApiModelProperty(name = "增值服务id", value = "增值服务id")
private Long addServerId; private Long addServerId;
} }

View File

@ -11,101 +11,101 @@ import io.swagger.annotations.*;
import com.muyu.common.core.web.domain.BaseEntity; import com.muyu.common.core.web.domain.BaseEntity;
/** /**
* enterprise * enterprise
* *
* @author muyu * @author muyu
* @date 2024-05-27 * @date 2024-06-05
*/ */
@Data @Data
@SuperBuilder @SuperBuilder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@ApiModel(value = "EnterpriseSaveReq", description = "企业信息") @ApiModel(value = "EnterpriseSaveReq", description = "车辆运营平台")
public class EnterpriseSaveReq extends BaseEntity { public class EnterpriseSaveReq extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 主键 */ /** 主键 */
@ApiModelProperty(name = "主键", value = "主键") @ApiModelProperty(name = "主键", value = "主键")
private String id; private String id;
/** 企业名称 */ /** 企业名称 */
@ApiModelProperty(name = "企业名称", value = "企业名称") @ApiModelProperty(name = "企业名称", value = "企业名称")
private String ebterpriseName; private String ebterpriseName;
/** 法定代表人 */ /** 法定代表人 */
@ApiModelProperty(name = "法定代表人", value = "法定代表人") @ApiModelProperty(name = "法定代表人", value = "法定代表人")
private String legalPerson; private String legalPerson;
/** 经营执照凭证号码 */ /** 经营执照凭证号码 */
@ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码")
private String businessLincenseNumber; private String businessLincenseNumber;
/** 企业成立时间 */ /** 企业成立时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "企业成立时间", value = "企业成立时间") @ApiModelProperty(name = "企业成立时间", value = "企业成立时间")
private Date estabinessDate; private Date estabinessDate;
/** 经营范围 */ /** 经营范围 */
@ApiModelProperty(name = "经营范围", value = "经营范围") @ApiModelProperty(name = "经营范围", value = "经营范围")
private String businessScope; private String businessScope;
/** 注册地址 */ /** 注册地址 */
@ApiModelProperty(name = "注册地址", value = "注册地址") @ApiModelProperty(name = "注册地址", value = "注册地址")
private String address; private String address;
/** 企业联系方式 */ /** 企业联系方式 */
@ApiModelProperty(name = "企业联系方式", value = "企业联系方式") @ApiModelProperty(name = "企业联系方式", value = "企业联系方式")
private String contactPhone; private String contactPhone;
/** 公司邮箱 */ /** 公司邮箱 */
@ApiModelProperty(name = "公司邮箱", value = "公司邮箱") @ApiModelProperty(name = "公司邮箱", value = "公司邮箱")
private String email; private String email;
/** 企业当前状态 */ /** 企业当前状态 */
@ApiModelProperty(name = "企业当前状态", value = "企业当前状态") @ApiModelProperty(name = "企业当前状态", value = "企业当前状态")
private String status; private String enterpriseStatus;
/** 企业入驻平台时期 */ /** 企业入驻平台时期 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期")
private Date registrationDate; private Date registrationDate;
/** 企业认证id */ /** 企业认证id */
@ApiModelProperty(name = "企业认证id", value = "企业认证id") @ApiModelProperty(name = "企业认证id", value = "企业认证id")
private Long certificationId; private Long certificationId;
/** 认证时间 */ /** 认证时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "认证时间", value = "认证时间") @ApiModelProperty(name = "认证时间", value = "认证时间")
private Date authenticationDate; private Date authenticationDate;
/** 服务级别 */ /** 服务级别 */
@ApiModelProperty(name = "服务级别", value = "服务级别") @ApiModelProperty(name = "服务级别", value = "服务级别")
private Long serviceLevel; private Long serviceLevel;
/** 开通服务id */ /** 开通服务id */
@ApiModelProperty(name = "开通服务id", value = "开通服务id") @ApiModelProperty(name = "开通服务id", value = "开通服务id")
private Long openServerId; private Long openServerId;
/** 增值服务id */ /** 增值服务id */
@ApiModelProperty(name = "增值服务id", value = "增值服务id") @ApiModelProperty(name = "增值服务id", value = "增值服务id")
private Long addServerId; private Long addServerId;
} }

View File

@ -10,17 +10,12 @@ import com.muyu.common.system.domain.SysDept;
import com.muyu.common.system.domain.SysUser; import com.muyu.common.system.domain.SysUser;
import com.muyu.system.remote.RemoteSysDeptService; import com.muyu.system.remote.RemoteSysDeptService;
import com.muyu.system.remote.RemoteSysUserService; import com.muyu.system.remote.RemoteSysUserService;
import com.muyu.system.remote.factory.RemoteSysDeptFactory;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import io.swagger.models.auth.In;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
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 com.muyu.common.core.domain.Result; import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil; import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController; 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; import com.muyu.common.core.web.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author muyu * @author muyu
* @date 2024-05-27 * @date 2024-06-05
*/ */
@Api(tags = "车辆运营平台") @Api(tags = "车辆运营平台")
@Log4j2 @Log4j2
@RestController @RestController
@RequestMapping("/car") @RequestMapping("/car")
public class EnterpriseController extends BaseController { public class EnterpriseController extends BaseController {
@Autowired
private EnterpriseService enterpriseService;
@Autowired @Autowired
private EnterpriseService enterpriseService; private RemoteSysDeptService remoteSysDeptService;
@Autowired
private RemoteSysUserService remoteSysUserService;
@Autowired /**
private RemoteSysDeptService remoteSysDeptService; *
*/
@ApiOperation("获取车辆运营平台列表")
@RequiresPermissions("netWorking:car:list")
@GetMapping("/list")
public Result<TableDataInfo<Enterprise>> list(EnterpriseQueryReq enterpriseQueryReq) {
startPage();
List<Enterprise> 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<Enterprise> list = enterpriseService.list(enterprise);
ExcelUtil<Enterprise> util = new ExcelUtil<Enterprise>(Enterprise.class);
util.exportExcel(response, list, "车辆运营平台数据");
}
/** /**
* *
*/ */
@ApiOperation("获取车辆运营平台列表") @ApiOperation("获取车辆运营平台详细信息")
@RequiresPermissions("netWorking:car:list") @RequiresPermissions("netWorking:car:query")
@GetMapping("/list") @GetMapping(value = "/{id}")
public Result<TableDataInfo<Enterprise>> list(EnterpriseQueryReq enterpriseQueryReq) { @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class)
startPage(); public Result<Enterprise> getInfo(@PathVariable("id") String id) {
List<Enterprise> list = enterpriseService.list(Enterprise.queryBuild(enterpriseQueryReq)); return Result.success(enterpriseService.getById(id));
return getDataTable(list); }
/**
*
*/
@RequiresPermissions("netWorking:car:add")
@Log(title = "车辆运营平台", businessType = BusinessType.INSERT)
@PostMapping
@ApiOperation("新增车辆运营平台")
public Result<String> add(@RequestBody EnterpriseSaveReq enterpriseSaveReq) {
LoginUser loginUser = SecurityUtils.getLoginUser();
SysUser sysUser = loginUser.getSysUser();
Result<SysDept> DeptList = remoteSysDeptService.selectDeptByName(enterpriseSaveReq.getEbterpriseName());
SysDept sysDept = DeptList.getData();
if(sysDept!=null){
return Result.error("部门名称重复");
} }
addDept(enterpriseSaveReq, sysUser);
addUser(enterpriseSaveReq,sysUser);
/** return toAjax(enterpriseService.save(Enterprise.saveBuild(enterpriseSaveReq)));
* }
*/
@ApiOperation("导出车辆运营平台列表")
@RequiresPermissions("netWorking:car:export")
@Log(title = "车辆运营平台", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Enterprise enterprise) {
List<Enterprise> list = enterpriseService.list(enterprise);
ExcelUtil<Enterprise> util = new ExcelUtil<Enterprise>(Enterprise.class);
util.exportExcel(response, list, "车辆运营平台数据");
}
/** /**
* *
*/ * @param enterpriseSaveReq
@ApiOperation("获取车辆运营平台详细信息") * @param sysUser
@RequiresPermissions("netWorking:car:query") * @return
@GetMapping(value = "/{id}") */
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class) public void addDept(EnterpriseSaveReq enterpriseSaveReq,SysUser sysUser){
public Result<Enterprise> getInfo(@PathVariable("id") String id) {
return Result.success(enterpriseService.getById(id));
}
/** SysDept DeptBuild = SysDept.builder()
* .deptName(enterpriseSaveReq.getEbterpriseName())
*/ .parentId(100L)
@RequiresPermissions("netWorking:car:add") .ancestors("0,100")
@Log(title = "车辆运营平台", businessType = BusinessType.INSERT) .orderNum(2)
@PostMapping .status("0")
@ApiOperation("新增车辆运营平台") .createBy(sysUser.getUserName())
public Result<String> add(@RequestBody EnterpriseSaveReq enterpriseSaveReq) { .createTime(new Date())
LoginUser loginUser = SecurityUtils.getLoginUser(); .leader(sysUser.getNickName())
SysUser sysUser = loginUser.getSysUser(); .phone(sysUser.getPhonenumber())
Result<SysDept> DeptList = remoteSysDeptService.selectDeptByName(enterpriseSaveReq.getEbterpriseName()); .email(sysUser.getEmail())
SysDept sysDept = DeptList.getData(); .delFlag("0")
if(sysDept!=null){ .build();
return Result.error("部门名称重复"); remoteSysDeptService.add(DeptBuild);
} }
addDept(enterpriseSaveReq, sysUser);
addUser(enterpriseSaveReq,sysUser);
return toAjax(enterpriseService.save(Enterprise.saveBuild(enterpriseSaveReq))); public void addUser(EnterpriseSaveReq enterpriseSaveReq,SysUser sysUser){
} Result<SysDept> 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 @RequiresPermissions("netWorking:car:edit")
* @return @Log(title = "车辆运营平台", businessType = BusinessType.UPDATE)
*/ @PutMapping("/{id}")
public void addDept(EnterpriseSaveReq enterpriseSaveReq,SysUser sysUser){ @ApiOperation("修改车辆运营平台")
public Result<String> 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") @GetMapping("/selectByName")
.orderNum(2) public Result<Enterprise> selectByName() {
.status("0") String username = SecurityUtils.getLoginUser().getUsername();
.createBy(sysUser.getUserName()) Enterprise enterprise = enterpriseService.selectByName(username);
.createTime(new Date()) return Result.success(enterprise);
.leader(sysUser.getNickName()) }
.phone(sysUser.getPhonenumber())
.email(sysUser.getEmail())
.delFlag("0")
.build();
remoteSysDeptService.add(DeptBuild);
}
public void addUser(EnterpriseSaveReq enterpriseSaveReq,SysUser sysUser){ /**
Result<SysDept> sysDeptResult = remoteSysDeptService.selectDeptByName(enterpriseSaveReq.getEbterpriseName()); *
SysDept sysDept = sysDeptResult.getData(); */
SysUser UserBuild = SysUser.builder() @RequiresPermissions("netWorking:car:remove")
.userName(enterpriseSaveReq.getEbterpriseName()) @Log(title = "车辆运营平台", businessType = BusinessType.DELETE)
.nickName(enterpriseSaveReq.getEbterpriseName()) @DeleteMapping("/{ids}")
.password("123456") @ApiOperation("删除车辆运营平台")
.deptId(sysDept.getDeptId()) @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
.email(enterpriseSaveReq.getEmail()) public Result<String> remove(@PathVariable List<String> ids) {
.phonenumber(enterpriseSaveReq.getContactPhone()) return toAjax(enterpriseService.removeBatchByIds(ids));
.status("0") }
.delFlag("0")
.roleId(3L)
.roleIds(new Long[]{3L})
.createBy(sysUser.getUserName())
.createTime(new Date())
.remark(enterpriseSaveReq.getRemark())
.build();
remoteSysUserService.add(UserBuild);
}
/** /**
* *
*/ * @param id
@RequiresPermissions("netWorking:car:edit") * @param enterpriseEditReq
@Log(title = "车辆运营平台", businessType = BusinessType.UPDATE) * @return
@PutMapping("/{id}") */
@ApiOperation("修改车辆运营平台") @PostMapping("/updateEnterprise/{id}")
public Result<String> edit(@PathVariable String id, @RequestBody EnterpriseEditReq enterpriseEditReq) { public Result<String> updateEnterprise(@PathVariable Integer id, @RequestBody EnterpriseEditReq enterpriseEditReq) {
return toAjax(enterpriseService.updateById(Enterprise.editBuild(id,enterpriseEditReq))); return toAjax(enterpriseService.updateById(Enterprise.editBuild(id,enterpriseEditReq)));
} }
/** /**
* *
*/ */
@RequiresPermissions("netWorking:car:remove") @PostMapping("/authentication")
@Log(title = "车辆运营平台", businessType = BusinessType.DELETE) public Result<String> authentication(@RequestBody Enterprise enterprise ) {
@DeleteMapping("/{ids}") enterpriseService.authentication(enterprise);
@ApiOperation("删除车辆运营平台") return Result.success();
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4") }
public Result<String> remove(@PathVariable List<String> ids) {
return toAjax(enterpriseService.removeBatchByIds(ids));
}
} }

View File

@ -3,6 +3,7 @@ package com.muyu.net.working.mapper;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.net.working.domain.Enterprise; import com.muyu.net.working.domain.Enterprise;
import org.apache.ibatis.annotations.Param;
/** /**
* Mapper * Mapper
@ -12,4 +13,8 @@ import com.muyu.net.working.domain.Enterprise;
*/ */
public interface EnterpriseMapper extends BaseMapper<Enterprise> { public interface EnterpriseMapper extends BaseMapper<Enterprise> {
Enterprise selectByName(@Param("name") String name);
void authentication(Enterprise enterprise);
} }

View File

@ -17,6 +17,10 @@ public interface EnterpriseService extends IService<Enterprise> {
* @param enterprise * @param enterprise
* @return * @return
*/ */
public List<Enterprise> list(Enterprise enterprise); List<Enterprise> list(Enterprise enterprise);
Enterprise selectByName(String name);
void authentication(Enterprise enterprise);
} }

View File

@ -1,9 +1,18 @@
package com.muyu.net.working.service.impl; 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.List;
import java.util.Map;
import com.alibaba.fastjson.JSON;
import com.muyu.common.core.utils.ObjUtils; import com.muyu.common.core.utils.ObjUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.muyu.net.working.mapper.EnterpriseMapper; import com.muyu.net.working.mapper.EnterpriseMapper;
import com.muyu.net.working.domain.Enterprise; import com.muyu.net.working.domain.Enterprise;
@ -21,81 +30,132 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@Service @Service
public class EnterpriseServiceImpl extends ServiceImpl<EnterpriseMapper, Enterprise> implements EnterpriseService { public class EnterpriseServiceImpl extends ServiceImpl<EnterpriseMapper, Enterprise> implements EnterpriseService {
/** @Autowired
* private EnterpriseMapper enterpriseMapper;
* /**
* @param enterprise *
* @return *
*/ * @param enterprise
@Override * @return
public List<Enterprise> list(Enterprise enterprise) { */
LambdaQueryWrapper<Enterprise> queryWrapper = new LambdaQueryWrapper<>(); @Override
public List<Enterprise> list(Enterprise enterprise) {
LambdaQueryWrapper<Enterprise> queryWrapper = new LambdaQueryWrapper<>();
if (ObjUtils.notNull(enterprise.getEbterpriseName())){ if (ObjUtils.notNull(enterprise.getEbterpriseName())){
queryWrapper.like(Enterprise::getEbterpriseName, 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.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<String, String> 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();
}
} }

View File

@ -1,34 +1,40 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.net.working.mapper.EnterpriseMapper"> <mapper namespace="com.muyu.net.working.mapper.EnterpriseMapper">
<resultMap type="com.muyu.net.working.domain.Enterprise" id="EnterpriseResult"> <resultMap type="com.muyu.net.working.domain.Enterprise" id="EnterpriseResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="ebterpriseName" column="ebterprise_name" /> <result property="ebterpriseName" column="ebterprise_name" />
<result property="legalPerson" column="legal_person" /> <result property="legalPerson" column="legal_person" />
<result property="businessLincenseNumber" column="business_lincense_number" /> <result property="businessLincenseNumber" column="business_lincense_number" />
<result property="estabinessDate" column="estabiness_date" /> <result property="estabinessDate" column="estabiness_date" />
<result property="businessScope" column="business_scope" /> <result property="businessScope" column="business_scope" />
<result property="address" column="address" /> <result property="address" column="address" />
<result property="contactPhone" column="contact_phone" /> <result property="contactPhone" column="contact_phone" />
<result property="email" column="email" /> <result property="email" column="email" />
<result property="status" column="status" /> <result property="enterpriseStatus" column="enterprise_status" />
<result property="registrationDate" column="registration_date" /> <result property="registrationDate" column="registration_date" />
<result property="certificationId" column="certification_id" /> <result property="certificationId" column="certification_id" />
<result property="authenticationDate" column="authentication_date" /> <result property="authenticationDate" column="authentication_date" />
<result property="serviceLevel" column="service_level" /> <result property="serviceLevel" column="service_level" />
<result property="openServerId" column="open_server_id" /> <result property="openServerId" column="open_server_id" />
<result property="addServerId" column="add_server_id" /> <result property="addServerId" column="add_server_id" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
</resultMap> </resultMap>
<sql id="selectEnterpriseVo"> <sql id="selectEnterpriseVo">
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
</sql> </sql>
<update id="authentication">
update enterprise set enterprise_status = 'N' where id = #{id}
</update>
<select id="selectByName" resultType="com.muyu.net.working.domain.Enterprise">
select * from enterprise where ebterprise_name = #{name}
</select>
</mapper> </mapper>

View File

@ -1,9 +1,9 @@
package com.muyu.system.controller; package com.muyu.system.controller;
import com.muyu.common.core.constant.UserConstants; 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.utils.StringUtils;
import com.muyu.common.core.web.controller.BaseController; 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.annotation.Log;
import com.muyu.common.log.enums.BusinessType; import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions; import com.muyu.common.security.annotation.RequiresPermissions;

View File

@ -1,9 +1,9 @@
package com.muyu.system.controller; 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.StringUtils;
import com.muyu.common.core.utils.poi.ExcelUtil; import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController; 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.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log; import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType; import com.muyu.common.log.enums.BusinessType;

View File

@ -1,8 +1,8 @@
package com.muyu.system.controller; 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.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController; 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.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log; import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType; import com.muyu.common.log.enums.BusinessType;

View File

@ -1,9 +1,9 @@
package com.muyu.system.controller; package com.muyu.system.controller;
import com.muyu.common.core.constant.CacheConstants; 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.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController; 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.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log; import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType; import com.muyu.common.log.enums.BusinessType;

View File

@ -1,9 +1,9 @@
package com.muyu.system.controller; package com.muyu.system.controller;
import com.muyu.common.core.constant.UserConstants; 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.utils.StringUtils;
import com.muyu.common.core.web.controller.BaseController; 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.annotation.Log;
import com.muyu.common.log.enums.BusinessType; import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions; import com.muyu.common.security.annotation.RequiresPermissions;

View File

@ -1,7 +1,7 @@
package com.muyu.system.controller; 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.domain.Result;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.web.page.TableDataInfo; import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log; import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType; import com.muyu.common.log.enums.BusinessType;

View File

@ -1,8 +1,8 @@
package com.muyu.system.controller; 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.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController; 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.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log; import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType; import com.muyu.common.log.enums.BusinessType;

View File

@ -1,8 +1,8 @@
package com.muyu.system.controller; 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.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController; 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.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log; import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType; import com.muyu.common.log.enums.BusinessType;

View File

@ -9,10 +9,10 @@ import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType; import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.service.TokenService; import com.muyu.common.security.service.TokenService;
import com.muyu.common.security.utils.SecurityUtils; 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.SysFile;
import com.muyu.common.system.domain.SysUser; 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.domain.resp.ProfileResp;
import com.muyu.system.service.SysUserService; import com.muyu.system.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,8 +1,8 @@
package com.muyu.system.controller; 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.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController; 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.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log; import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType; import com.muyu.common.log.enums.BusinessType;

View File

@ -10,10 +10,10 @@ import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.InnerAuth; import com.muyu.common.security.annotation.InnerAuth;
import com.muyu.common.security.annotation.RequiresPermissions; import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.common.security.utils.SecurityUtils; 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.SysDept;
import com.muyu.common.system.domain.SysRole; import com.muyu.common.system.domain.SysRole;
import com.muyu.common.system.domain.SysUser; 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.AuthRoleResp;
import com.muyu.system.domain.resp.UserDetailInfoResp; import com.muyu.system.domain.resp.UserDetailInfoResp;
import com.muyu.system.domain.resp.UserInfoResp; import com.muyu.system.domain.resp.UserInfoResp;

View File

@ -1,9 +1,9 @@
package com.muyu.system.controller; package com.muyu.system.controller;
import com.muyu.common.core.constant.CacheConstants; 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.utils.StringUtils;
import com.muyu.common.core.web.controller.BaseController; 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.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log; import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType; import com.muyu.common.log.enums.BusinessType;

View File

@ -1,5 +1,7 @@
package com.muyu.system.domain; package com.muyu.system.domain;
/** /**
* 线 * 线
* *

View File

@ -19,7 +19,7 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
* *
* @return * @return
*/ */
public List<SysDept> selectDeptList (SysDept dept); List<SysDept> selectDeptList(SysDept dept);
/** /**
* ID * ID
@ -29,7 +29,7 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
* *
* @return * @return
*/ */
public List<Long> selectDeptListByRoleId (@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly); List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
/** /**
* ID * ID
@ -38,7 +38,7 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
* *
* @return * @return
*/ */
public SysDept selectDeptById (Long deptId); SysDept selectDeptById(Long deptId);
/** /**
* ID * ID
@ -47,7 +47,7 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
* *
* @return * @return
*/ */
public List<SysDept> selectChildrenDeptById (Long deptId); List<SysDept> selectChildrenDeptById(Long deptId);
/** /**
* ID * ID
@ -56,7 +56,7 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
* *
* @return * @return
*/ */
public int selectNormalChildrenDeptById (Long deptId); int selectNormalChildrenDeptById(Long deptId);
/** /**
* *
@ -65,7 +65,7 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
* *
* @return * @return
*/ */
public int hasChildByDeptId (Long deptId); int hasChildByDeptId(Long deptId);
/** /**
* *
@ -74,7 +74,7 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
* *
* @return * @return
*/ */
public int checkDeptExistUser (Long deptId); int checkDeptExistUser(Long deptId);
/** /**
* *
@ -84,7 +84,7 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
* *
* @return * @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<SysDept> {
* *
* @return * @return
*/ */
public int insertDept (SysDept dept); int insertDept(SysDept dept);
/** /**
* *
@ -102,14 +102,14 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
* *
* @return * @return
*/ */
public int updateDept (SysDept dept); int updateDept(SysDept dept);
/** /**
* *
* *
* @param deptIds ID * @param deptIds ID
*/ */
public void updateDeptStatusNormal (Long[] deptIds); void updateDeptStatusNormal(Long[] deptIds);
/** /**
* *
@ -118,7 +118,7 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
* *
* @return * @return
*/ */
public int updateDeptChildren (@Param("depts") List<SysDept> depts); int updateDeptChildren(@Param("depts") List<SysDept> depts);
/** /**
* *
@ -127,8 +127,7 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
* *
* @return * @return
*/ */
public int deleteDeptById (Long deptId); int deleteDeptById(Long deptId);
SysDept selectDeptByName(@Param("name") String name); SysDept selectDeptByName(@Param("name") String name);
} }

View File

@ -19,7 +19,7 @@ public interface SysDictDataMapper extends BaseMapper<SysDictData> {
* *
* @return * @return
*/ */
public List<SysDictData> selectDictDataList (SysDictData dictData); List<SysDictData> selectDictDataList(SysDictData dictData);
/** /**
* *
@ -28,7 +28,7 @@ public interface SysDictDataMapper extends BaseMapper<SysDictData> {
* *
* @return * @return
*/ */
public List<SysDictData> selectDictDataByType (String dictType); List<SysDictData> selectDictDataByType(String dictType);
/** /**
* *
@ -38,7 +38,7 @@ public interface SysDictDataMapper extends BaseMapper<SysDictData> {
* *
* @return * @return
*/ */
public String selectDictLabel (@Param("dictType") String dictType, @Param("dictValue") String dictValue); String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue);
/** /**
* ID * ID
@ -47,7 +47,7 @@ public interface SysDictDataMapper extends BaseMapper<SysDictData> {
* *
* @return * @return
*/ */
public SysDictData selectDictDataById (Long dictCode); SysDictData selectDictDataById(Long dictCode);
/** /**
* *
@ -56,7 +56,7 @@ public interface SysDictDataMapper extends BaseMapper<SysDictData> {
* *
* @return * @return
*/ */
public int countDictDataByType (String dictType); int countDictDataByType(String dictType);
/** /**
* ID * ID
@ -65,7 +65,7 @@ public interface SysDictDataMapper extends BaseMapper<SysDictData> {
* *
* @return * @return
*/ */
public int deleteDictDataById (Long dictCode); int deleteDictDataById(Long dictCode);
/** /**
* *
@ -74,7 +74,7 @@ public interface SysDictDataMapper extends BaseMapper<SysDictData> {
* *
* @return * @return
*/ */
public int deleteDictDataByIds (Long[] dictCodes); int deleteDictDataByIds(Long[] dictCodes);
/** /**
* *
@ -83,7 +83,7 @@ public interface SysDictDataMapper extends BaseMapper<SysDictData> {
* *
* @return * @return
*/ */
public int insertDictData (SysDictData dictData); int insertDictData(SysDictData dictData);
/** /**
* *
@ -92,7 +92,7 @@ public interface SysDictDataMapper extends BaseMapper<SysDictData> {
* *
* @return * @return
*/ */
public int updateDictData (SysDictData dictData); int updateDictData(SysDictData dictData);
/** /**
* *
@ -102,5 +102,5 @@ public interface SysDictDataMapper extends BaseMapper<SysDictData> {
* *
* @return * @return
*/ */
public int updateDictDataType (@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType); int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
} }

View File

@ -18,14 +18,14 @@ public interface SysDictTypeMapper extends BaseMapper<SysDictType> {
* *
* @return * @return
*/ */
public List<SysDictType> selectDictTypeList (SysDictType dictType); List<SysDictType> selectDictTypeList(SysDictType dictType);
/** /**
* *
* *
* @return * @return
*/ */
public List<SysDictType> selectDictTypeAll (); List<SysDictType> selectDictTypeAll();
/** /**
* ID * ID
@ -34,7 +34,7 @@ public interface SysDictTypeMapper extends BaseMapper<SysDictType> {
* *
* @return * @return
*/ */
public SysDictType selectDictTypeById (Long dictId); SysDictType selectDictTypeById(Long dictId);
/** /**
* *
@ -43,7 +43,7 @@ public interface SysDictTypeMapper extends BaseMapper<SysDictType> {
* *
* @return * @return
*/ */
public SysDictType selectDictTypeByType (String dictType); SysDictType selectDictTypeByType(String dictType);
/** /**
* ID * ID
@ -52,7 +52,7 @@ public interface SysDictTypeMapper extends BaseMapper<SysDictType> {
* *
* @return * @return
*/ */
public int deleteDictTypeById (Long dictId); int deleteDictTypeById(Long dictId);
/** /**
* *
@ -61,7 +61,7 @@ public interface SysDictTypeMapper extends BaseMapper<SysDictType> {
* *
* @return * @return
*/ */
public int deleteDictTypeByIds (Long[] dictIds); int deleteDictTypeByIds(Long[] dictIds);
/** /**
* *
@ -70,7 +70,7 @@ public interface SysDictTypeMapper extends BaseMapper<SysDictType> {
* *
* @return * @return
*/ */
public int insertDictType (SysDictType dictType); int insertDictType(SysDictType dictType);
/** /**
* *
@ -79,7 +79,7 @@ public interface SysDictTypeMapper extends BaseMapper<SysDictType> {
* *
* @return * @return
*/ */
public int updateDictType (SysDictType dictType); int updateDictType(SysDictType dictType);
/** /**
* *
@ -88,5 +88,5 @@ public interface SysDictTypeMapper extends BaseMapper<SysDictType> {
* *
* @return * @return
*/ */
public SysDictType checkDictTypeUnique (String dictType); SysDictType checkDictTypeUnique(String dictType);
} }

View File

@ -16,7 +16,7 @@ public interface SysLogininforMapper extends BaseMapper<SysLogininfor> {
* *
* @param logininfor 访 * @param logininfor 访
*/ */
public int insertLogininfor (SysLogininfor logininfor); int insertLogininfor(SysLogininfor logininfor);
/** /**
* *
@ -25,7 +25,7 @@ public interface SysLogininforMapper extends BaseMapper<SysLogininfor> {
* *
* @return * @return
*/ */
public List<SysLogininfor> selectLogininforList (SysLogininfor logininfor); List<SysLogininfor> selectLogininforList(SysLogininfor logininfor);
/** /**
* *
@ -34,12 +34,12 @@ public interface SysLogininforMapper extends BaseMapper<SysLogininfor> {
* *
* @return * @return
*/ */
public int deleteLogininforByIds (Long[] infoIds); int deleteLogininforByIds(Long[] infoIds);
/** /**
* *
* *
* @return * @return
*/ */
public int cleanLogininfor (); int cleanLogininfor();
} }

View File

@ -19,14 +19,14 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
* *
* @return * @return
*/ */
public List<SysMenu> selectMenuList (SysMenu menu); List<SysMenu> selectMenuList(SysMenu menu);
/** /**
* *
* *
* @return * @return
*/ */
public List<String> selectMenuPerms (); List<String> selectMenuPerms();
/** /**
* *
@ -35,7 +35,7 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
* *
* @return * @return
*/ */
public List<SysMenu> selectMenuListByUserId (SysMenu menu); List<SysMenu> selectMenuListByUserId(SysMenu menu);
/** /**
* ID * ID
@ -44,7 +44,7 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
* *
* @return * @return
*/ */
public List<String> selectMenuPermsByRoleId (Long roleId); List<String> selectMenuPermsByRoleId(Long roleId);
/** /**
* ID * ID
@ -53,14 +53,14 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
* *
* @return * @return
*/ */
public List<String> selectMenuPermsByUserId (Long userId); List<String> selectMenuPermsByUserId(Long userId);
/** /**
* ID * ID
* *
* @return * @return
*/ */
public List<SysMenu> selectMenuTreeAll (); List<SysMenu> selectMenuTreeAll();
/** /**
* ID * ID
@ -69,7 +69,7 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
* *
* @return * @return
*/ */
public List<SysMenu> selectMenuTreeByUserId (Long userId); List<SysMenu> selectMenuTreeByUserId(Long userId);
/** /**
* ID * ID
@ -79,7 +79,7 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
* *
* @return * @return
*/ */
public List<Long> selectMenuListByRoleId (@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly); List<Long> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly);
/** /**
* ID * ID
@ -88,7 +88,7 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
* *
* @return * @return
*/ */
public SysMenu selectMenuById (Long menuId); SysMenu selectMenuById(Long menuId);
/** /**
* *
@ -97,7 +97,7 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
* *
* @return * @return
*/ */
public int hasChildByMenuId (Long menuId); int hasChildByMenuId(Long menuId);
/** /**
* *
@ -106,7 +106,7 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
* *
* @return * @return
*/ */
public int insertMenu (SysMenu menu); int insertMenu(SysMenu menu);
/** /**
* *
@ -115,7 +115,7 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
* *
* @return * @return
*/ */
public int updateMenu (SysMenu menu); int updateMenu(SysMenu menu);
/** /**
* *
@ -124,7 +124,7 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
* *
* @return * @return
*/ */
public int deleteMenuById (Long menuId); int deleteMenuById(Long menuId);
/** /**
* *
@ -134,5 +134,5 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
* *
* @return * @return
*/ */
public SysMenu checkMenuNameUnique (@Param("menuName") String menuName, @Param("parentId") Long parentId); SysMenu checkMenuNameUnique(@Param("menuName") String menuName, @Param("parentId") Long parentId);
} }

View File

@ -18,7 +18,7 @@ public interface SysNoticeMapper extends BaseMapper<SysNotice> {
* *
* @return * @return
*/ */
public SysNotice selectNoticeById (Long noticeId); SysNotice selectNoticeById(Long noticeId);
/** /**
* *
@ -27,7 +27,7 @@ public interface SysNoticeMapper extends BaseMapper<SysNotice> {
* *
* @return * @return
*/ */
public List<SysNotice> selectNoticeList (SysNotice notice); List<SysNotice> selectNoticeList(SysNotice notice);
/** /**
* *
@ -36,7 +36,7 @@ public interface SysNoticeMapper extends BaseMapper<SysNotice> {
* *
* @return * @return
*/ */
public int insertNotice (SysNotice notice); int insertNotice(SysNotice notice);
/** /**
* *
@ -45,7 +45,7 @@ public interface SysNoticeMapper extends BaseMapper<SysNotice> {
* *
* @return * @return
*/ */
public int updateNotice (SysNotice notice); int updateNotice(SysNotice notice);
/** /**
* *
@ -54,7 +54,7 @@ public interface SysNoticeMapper extends BaseMapper<SysNotice> {
* *
* @return * @return
*/ */
public int deleteNoticeById (Long noticeId); int deleteNoticeById(Long noticeId);
/** /**
* *
@ -63,5 +63,5 @@ public interface SysNoticeMapper extends BaseMapper<SysNotice> {
* *
* @return * @return
*/ */
public int deleteNoticeByIds (Long[] noticeIds); int deleteNoticeByIds(Long[] noticeIds);
} }

View File

@ -16,7 +16,7 @@ public interface SysOperLogMapper extends BaseMapper<SysOperLog> {
* *
* @param operLog * @param operLog
*/ */
public int insertOperlog (SysOperLog operLog); int insertOperlog(SysOperLog operLog);
/** /**
* *
@ -25,7 +25,7 @@ public interface SysOperLogMapper extends BaseMapper<SysOperLog> {
* *
* @return * @return
*/ */
public List<SysOperLog> selectOperLogList (SysOperLog operLog); List<SysOperLog> selectOperLogList(SysOperLog operLog);
/** /**
* *
@ -34,7 +34,7 @@ public interface SysOperLogMapper extends BaseMapper<SysOperLog> {
* *
* @return * @return
*/ */
public int deleteOperLogByIds (Long[] operIds); int deleteOperLogByIds(Long[] operIds);
/** /**
* *
@ -43,10 +43,10 @@ public interface SysOperLogMapper extends BaseMapper<SysOperLog> {
* *
* @return * @return
*/ */
public SysOperLog selectOperLogById (Long operId); SysOperLog selectOperLogById(Long operId);
/** /**
* *
*/ */
public void cleanOperLog (); void cleanOperLog();
} }

View File

@ -18,14 +18,14 @@ public interface SysPostMapper extends BaseMapper<SysPost> {
* *
* @return * @return
*/ */
public List<SysPost> selectPostList (SysPost post); List<SysPost> selectPostList(SysPost post);
/** /**
* *
* *
* @return * @return
*/ */
public List<SysPost> selectPostAll (); List<SysPost> selectPostAll();
/** /**
* ID * ID
@ -34,7 +34,7 @@ public interface SysPostMapper extends BaseMapper<SysPost> {
* *
* @return * @return
*/ */
public SysPost selectPostById (Long postId); SysPost selectPostById(Long postId);
/** /**
* ID * ID
@ -43,7 +43,7 @@ public interface SysPostMapper extends BaseMapper<SysPost> {
* *
* @return ID * @return ID
*/ */
public List<Long> selectPostListByUserId (Long userId); List<Long> selectPostListByUserId(Long userId);
/** /**
* *
@ -52,7 +52,7 @@ public interface SysPostMapper extends BaseMapper<SysPost> {
* *
* @return * @return
*/ */
public List<SysPost> selectPostsByUserName (String userName); List<SysPost> selectPostsByUserName(String userName);
/** /**
* *
@ -61,7 +61,7 @@ public interface SysPostMapper extends BaseMapper<SysPost> {
* *
* @return * @return
*/ */
public int deletePostById (Long postId); int deletePostById(Long postId);
/** /**
* *
@ -70,7 +70,7 @@ public interface SysPostMapper extends BaseMapper<SysPost> {
* *
* @return * @return
*/ */
public int deletePostByIds (Long[] postIds); int deletePostByIds(Long[] postIds);
/** /**
* *
@ -79,7 +79,7 @@ public interface SysPostMapper extends BaseMapper<SysPost> {
* *
* @return * @return
*/ */
public int updatePost (SysPost post); int updatePost(SysPost post);
/** /**
* *
@ -88,7 +88,7 @@ public interface SysPostMapper extends BaseMapper<SysPost> {
* *
* @return * @return
*/ */
public int insertPost (SysPost post); int insertPost(SysPost post);
/** /**
* *
@ -97,7 +97,7 @@ public interface SysPostMapper extends BaseMapper<SysPost> {
* *
* @return * @return
*/ */
public SysPost checkPostNameUnique (String postName); SysPost checkPostNameUnique(String postName);
/** /**
* *
@ -106,5 +106,5 @@ public interface SysPostMapper extends BaseMapper<SysPost> {
* *
* @return * @return
*/ */
public SysPost checkPostCodeUnique (String postCode); SysPost checkPostCodeUnique(String postCode);
} }

View File

@ -19,7 +19,7 @@ public interface SysRoleDeptMapper extends BaseMapper<SysRoleDept> {
* *
* @return * @return
*/ */
public int deleteRoleDeptByRoleId (Long roleId); int deleteRoleDeptByRoleId(Long roleId);
/** /**
* *
@ -28,7 +28,7 @@ public interface SysRoleDeptMapper extends BaseMapper<SysRoleDept> {
* *
* @return * @return
*/ */
public int deleteRoleDept (Long[] ids); int deleteRoleDept(Long[] ids);
/** /**
* 使 * 使
@ -37,7 +37,7 @@ public interface SysRoleDeptMapper extends BaseMapper<SysRoleDept> {
* *
* @return * @return
*/ */
public int selectCountRoleDeptByDeptId (Long deptId); int selectCountRoleDeptByDeptId(Long deptId);
/** /**
* *
@ -46,5 +46,5 @@ public interface SysRoleDeptMapper extends BaseMapper<SysRoleDept> {
* *
* @return * @return
*/ */
public int batchRoleDept (List<SysRoleDept> roleDeptList); int batchRoleDept(List<SysRoleDept> roleDeptList);
} }

View File

@ -18,7 +18,7 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
* *
* @return * @return
*/ */
public List<SysRole> selectRoleList (SysRole role); List<SysRole> selectRoleList(SysRole role);
/** /**
* ID * ID
@ -27,14 +27,14 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
* *
* @return * @return
*/ */
public List<SysRole> selectRolePermissionByUserId (Long userId); List<SysRole> selectRolePermissionByUserId(Long userId);
/** /**
* *
* *
* @return * @return
*/ */
public List<SysRole> selectRoleAll (); List<SysRole> selectRoleAll();
/** /**
* ID * ID
@ -43,7 +43,7 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
* *
* @return ID * @return ID
*/ */
public List<Long> selectRoleListByUserId (Long userId); List<Long> selectRoleListByUserId(Long userId);
/** /**
* ID * ID
@ -52,7 +52,7 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
* *
* @return * @return
*/ */
public SysRole selectRoleById (Long roleId); SysRole selectRoleById(Long roleId);
/** /**
* ID * ID
@ -61,7 +61,7 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
* *
* @return * @return
*/ */
public List<SysRole> selectRolesByUserName (String userName); List<SysRole> selectRolesByUserName(String userName);
/** /**
* *
@ -70,7 +70,7 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
* *
* @return * @return
*/ */
public SysRole checkRoleNameUnique (String roleName); SysRole checkRoleNameUnique(String roleName);
/** /**
* *
@ -79,7 +79,7 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
* *
* @return * @return
*/ */
public SysRole checkRoleKeyUnique (String roleKey); SysRole checkRoleKeyUnique(String roleKey);
/** /**
* *
@ -88,7 +88,7 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
* *
* @return * @return
*/ */
public int updateRole (SysRole role); int updateRole(SysRole role);
/** /**
* *
@ -97,7 +97,7 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
* *
* @return * @return
*/ */
public int insertRole (SysRole role); int insertRole(SysRole role);
/** /**
* ID * ID
@ -106,7 +106,7 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
* *
* @return * @return
*/ */
public int deleteRoleById (Long roleId); int deleteRoleById(Long roleId);
/** /**
* *
@ -115,5 +115,5 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
* *
* @return * @return
*/ */
public int deleteRoleByIds (Long[] roleIds); int deleteRoleByIds(Long[] roleIds);
} }

View File

@ -19,7 +19,7 @@ public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {
* *
* @return * @return
*/ */
public int checkMenuExistRole (Long menuId); int checkMenuExistRole(Long menuId);
/** /**
* ID * ID
@ -28,7 +28,7 @@ public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {
* *
* @return * @return
*/ */
public int deleteRoleMenuByRoleId (Long roleId); int deleteRoleMenuByRoleId(Long roleId);
/** /**
* *
@ -37,7 +37,7 @@ public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {
* *
* @return * @return
*/ */
public int deleteRoleMenu (Long[] ids); int deleteRoleMenu(Long[] ids);
/** /**
* *
@ -46,5 +46,5 @@ public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {
* *
* @return * @return
*/ */
public int batchRoleMenu (List<SysRoleMenu> roleMenuList); int batchRoleMenu(List<SysRoleMenu> roleMenuList);
} }

View File

@ -19,7 +19,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* *
* @return * @return
*/ */
public List<SysUser> selectUserList (SysUser sysUser); List<SysUser> selectUserList(SysUser sysUser);
/** /**
* *
@ -28,7 +28,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* *
* @return * @return
*/ */
public List<SysUser> selectAllocatedList (SysUser user); List<SysUser> selectAllocatedList(SysUser user);
/** /**
* *
@ -37,7 +37,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* *
* @return * @return
*/ */
public List<SysUser> selectUnallocatedList (SysUser user); List<SysUser> selectUnallocatedList(SysUser user);
/** /**
* *
@ -46,7 +46,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* *
* @return * @return
*/ */
public SysUser selectUserByUserName (String userName); SysUser selectUserByUserName(String userName);
/** /**
* ID * ID
@ -55,7 +55,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* *
* @return * @return
*/ */
public SysUser selectUserById (Long userId); SysUser selectUserById(Long userId);
/** /**
* *
@ -64,7 +64,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* *
* @return * @return
*/ */
public int insertUser (SysUser user); int insertUser(SysUser user);
/** /**
* *
@ -73,7 +73,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* *
* @return * @return
*/ */
public int updateUser (SysUser user); int updateUser(SysUser user);
/** /**
* *
@ -83,7 +83,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* *
* @return * @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<SysUser> {
* *
* @return * @return
*/ */
public int resetUserPwd (@Param("userName") String userName, @Param("password") String password); int resetUserPwd(@Param("userName") String userName, @Param("password") String password);
/** /**
* ID * ID
@ -102,7 +102,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* *
* @return * @return
*/ */
public int deleteUserById (Long userId); int deleteUserById(Long userId);
/** /**
* *
@ -111,7 +111,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* *
* @return * @return
*/ */
public int deleteUserByIds (Long[] userIds); int deleteUserByIds(Long[] userIds);
/** /**
* *
@ -120,7 +120,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* *
* @return * @return
*/ */
public SysUser checkUserNameUnique (String userName); SysUser checkUserNameUnique(String userName);
/** /**
* *
@ -129,7 +129,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* *
* @return * @return
*/ */
public SysUser checkPhoneUnique (String phonenumber); SysUser checkPhoneUnique(String phonenumber);
/** /**
* email * email
@ -138,5 +138,5 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* *
* @return * @return
*/ */
public SysUser checkEmailUnique (String email); SysUser checkEmailUnique(String email);
} }

View File

@ -18,7 +18,7 @@ public interface SysUserPostMapper extends BaseMapper<SysUserPost> {
* *
* @return * @return
*/ */
public int deleteUserPostByUserId (Long userId); int deleteUserPostByUserId(Long userId);
/** /**
* ID使 * ID使
@ -27,7 +27,7 @@ public interface SysUserPostMapper extends BaseMapper<SysUserPost> {
* *
* @return * @return
*/ */
public int countUserPostById (Long postId); int countUserPostById(Long postId);
/** /**
* *
@ -36,7 +36,7 @@ public interface SysUserPostMapper extends BaseMapper<SysUserPost> {
* *
* @return * @return
*/ */
public int deleteUserPost (Long[] ids); int deleteUserPost(Long[] ids);
/** /**
* *
@ -45,5 +45,5 @@ public interface SysUserPostMapper extends BaseMapper<SysUserPost> {
* *
* @return * @return
*/ */
public int batchUserPost (List<SysUserPost> userPostList); int batchUserPost(List<SysUserPost> userPostList);
} }

View File

@ -19,7 +19,7 @@ public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
* *
* @return * @return
*/ */
public int deleteUserRoleByUserId (Long userId); int deleteUserRoleByUserId(Long userId);
/** /**
* *
@ -28,7 +28,7 @@ public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
* *
* @return * @return
*/ */
public int deleteUserRole (Long[] ids); int deleteUserRole(Long[] ids);
/** /**
* ID使 * ID使
@ -37,7 +37,7 @@ public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
* *
* @return * @return
*/ */
public int countUserRoleByRoleId (Long roleId); int countUserRoleByRoleId(Long roleId);
/** /**
* *
@ -46,7 +46,7 @@ public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
* *
* @return * @return
*/ */
public int batchUserRole (List<SysUserRole> userRoleList); int batchUserRole(List<SysUserRole> userRoleList);
/** /**
* *
@ -55,7 +55,7 @@ public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
* *
* @return * @return
*/ */
public int deleteUserRoleInfo (SysUserRole userRole); int deleteUserRoleInfo(SysUserRole userRole);
/** /**
* *
@ -65,5 +65,5 @@ public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
* *
* @return * @return
*/ */
public int deleteUserRoleInfos (@Param("roleId") Long roleId, @Param("userIds") Long[] userIds); int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds);
} }

View File

@ -11,6 +11,12 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
/**
* RemoteSysDeptService
*
* @author PengJiang
* Date 2024/6/7 09:00
*/
@FeignClient( @FeignClient(
contextId = "remoteSysDeptService", contextId = "remoteSysDeptService",
value = ServiceNameConstants.SYSTEM_SERVICE, value = ServiceNameConstants.SYSTEM_SERVICE,
@ -18,11 +24,9 @@ import org.springframework.web.bind.annotation.RequestParam;
path = "/dept" path = "/dept"
) )
public interface RemoteSysDeptService { public interface RemoteSysDeptService {
@GetMapping("/selectDeptByName") @GetMapping("/selectDeptByName")
public Result<SysDept> selectDeptByName (@RequestParam("name") String name); Result<SysDept> selectDeptByName(@RequestParam("name") String name);
@PostMapping @PostMapping
public Result add (@Validated @RequestBody SysDept dept); Result add(@Validated @RequestBody SysDept dept);
} }

View File

@ -10,6 +10,12 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
/**
* RemoteSysUserService
*
* @author PengJiang
* Date 2024/6/7 08:51
*/
@FeignClient( @FeignClient(
contextId = "remoteSysUserService", contextId = "remoteSysUserService",
value = ServiceNameConstants.SYSTEM_SERVICE, value = ServiceNameConstants.SYSTEM_SERVICE,
@ -24,5 +30,5 @@ public interface RemoteSysUserService {
*/ */
@RequiresPermissions("system:user:add") @RequiresPermissions("system:user:add")
@PostMapping @PostMapping
public Result add (@Validated @RequestBody SysUser user); Result add(@Validated @RequestBody SysUser user);
} }

View File

@ -35,10 +35,10 @@ public interface SysConfigService extends IService<SysConfig> {
/** /**
* *
*/ */
public void clearConfigCache (); void clearConfigCache();
/** /**
* *
*/ */
public void loadingConfigCache (); void loadingConfigCache();
} }

View File

@ -19,7 +19,7 @@ public interface SysDeptService extends IService<SysDept> {
* *
* @return * @return
*/ */
public List<SysDept> selectDeptList (SysDept dept); List<SysDept> selectDeptList(SysDept dept);
/** /**
* *
@ -28,7 +28,7 @@ public interface SysDeptService extends IService<SysDept> {
* *
* @return * @return
*/ */
public List<TreeSelect> selectDeptTreeList (SysDept dept); List<TreeSelect> selectDeptTreeList(SysDept dept);
/** /**
* *
@ -37,7 +37,7 @@ public interface SysDeptService extends IService<SysDept> {
* *
* @return * @return
*/ */
public List<SysDept> buildDeptTree (List<SysDept> depts); List<SysDept> buildDeptTree(List<SysDept> depts);
/** /**
* *
@ -46,7 +46,7 @@ public interface SysDeptService extends IService<SysDept> {
* *
* @return * @return
*/ */
public List<TreeSelect> buildDeptTreeSelect (List<SysDept> depts); List<TreeSelect> buildDeptTreeSelect(List<SysDept> depts);
/** /**
* ID * ID
@ -55,7 +55,7 @@ public interface SysDeptService extends IService<SysDept> {
* *
* @return * @return
*/ */
public List<Long> selectDeptListByRoleId (Long roleId); List<Long> selectDeptListByRoleId(Long roleId);
/** /**
* ID * ID
@ -64,7 +64,7 @@ public interface SysDeptService extends IService<SysDept> {
* *
* @return * @return
*/ */
public SysDept selectDeptById (Long deptId); SysDept selectDeptById(Long deptId);
/** /**
* ID * ID
@ -73,7 +73,7 @@ public interface SysDeptService extends IService<SysDept> {
* *
* @return * @return
*/ */
public int selectNormalChildrenDeptById (Long deptId); int selectNormalChildrenDeptById(Long deptId);
/** /**
* *
@ -82,7 +82,7 @@ public interface SysDeptService extends IService<SysDept> {
* *
* @return * @return
*/ */
public boolean hasChildByDeptId (Long deptId); boolean hasChildByDeptId(Long deptId);
/** /**
* *
@ -91,7 +91,7 @@ public interface SysDeptService extends IService<SysDept> {
* *
* @return true false * @return true false
*/ */
public boolean checkDeptExistUser (Long deptId); boolean checkDeptExistUser(Long deptId);
/** /**
* *
@ -100,14 +100,14 @@ public interface SysDeptService extends IService<SysDept> {
* *
* @return * @return
*/ */
public boolean checkDeptNameUnique (SysDept dept); boolean checkDeptNameUnique(SysDept dept);
/** /**
* *
* *
* @param deptId id * @param deptId id
*/ */
public void checkDeptDataScope (Long deptId); void checkDeptDataScope(Long deptId);
/** /**
* *
@ -116,7 +116,7 @@ public interface SysDeptService extends IService<SysDept> {
* *
* @return * @return
*/ */
public int insertDept (SysDept dept); int insertDept(SysDept dept);
/** /**
* *
@ -125,7 +125,7 @@ public interface SysDeptService extends IService<SysDept> {
* *
* @return * @return
*/ */
public int updateDept (SysDept dept); int updateDept(SysDept dept);
/** /**
* *
@ -134,8 +134,7 @@ public interface SysDeptService extends IService<SysDept> {
* *
* @return * @return
*/ */
public int deleteDeptById (Long deptId); int deleteDeptById(Long deptId);
SysDept selectDeptByName(String name); SysDept selectDeptByName(String name);
} }

View File

@ -18,7 +18,7 @@ public interface SysDictDataService extends IService<SysDictData> {
* *
* @return * @return
*/ */
public List<SysDictData> selectDictDataList (SysDictData dictData); List<SysDictData> selectDictDataList(SysDictData dictData);
/** /**
* *
@ -28,7 +28,7 @@ public interface SysDictDataService extends IService<SysDictData> {
* *
* @return * @return
*/ */
public String selectDictLabel (String dictType, String dictValue); String selectDictLabel(String dictType, String dictValue);
/** /**
* ID * ID
@ -37,14 +37,14 @@ public interface SysDictDataService extends IService<SysDictData> {
* *
* @return * @return
*/ */
public SysDictData selectDictDataById (Long dictCode); SysDictData selectDictDataById(Long dictCode);
/** /**
* *
* *
* @param dictCodes ID * @param dictCodes ID
*/ */
public void deleteDictDataByIds (Long[] dictCodes); void deleteDictDataByIds(Long[] dictCodes);
/** /**
* *
@ -53,7 +53,7 @@ public interface SysDictDataService extends IService<SysDictData> {
* *
* @return * @return
*/ */
public int insertDictData (SysDictData dictData); int insertDictData(SysDictData dictData);
/** /**
* *
@ -62,5 +62,5 @@ public interface SysDictDataService extends IService<SysDictData> {
* *
* @return * @return
*/ */
public int updateDictData (SysDictData dictData); int updateDictData(SysDictData dictData);
} }

View File

@ -19,14 +19,14 @@ public interface SysDictTypeService extends IService<SysDictType> {
* *
* @return * @return
*/ */
public List<SysDictType> selectDictTypeList (SysDictType dictType); List<SysDictType> selectDictTypeList(SysDictType dictType);
/** /**
* *
* *
* @return * @return
*/ */
public List<SysDictType> selectDictTypeAll (); List<SysDictType> selectDictTypeAll();
/** /**
* *
@ -35,7 +35,7 @@ public interface SysDictTypeService extends IService<SysDictType> {
* *
* @return * @return
*/ */
public List<SysDictData> selectDictDataByType (String dictType); List<SysDictData> selectDictDataByType(String dictType);
/** /**
* ID * ID
@ -44,7 +44,7 @@ public interface SysDictTypeService extends IService<SysDictType> {
* *
* @return * @return
*/ */
public SysDictType selectDictTypeById (Long dictId); SysDictType selectDictTypeById(Long dictId);
/** /**
* *
@ -53,29 +53,29 @@ public interface SysDictTypeService extends IService<SysDictType> {
* *
* @return * @return
*/ */
public SysDictType selectDictTypeByType (String dictType); SysDictType selectDictTypeByType(String dictType);
/** /**
* *
* *
* @param dictIds ID * @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<SysDictType> {
* *
* @return * @return
*/ */
public int insertDictType (SysDictType dictType); int insertDictType(SysDictType dictType);
/** /**
* *
@ -93,7 +93,7 @@ public interface SysDictTypeService extends IService<SysDictType> {
* *
* @return * @return
*/ */
public int updateDictType (SysDictType dictType); int updateDictType(SysDictType dictType);
/** /**
* *
@ -102,5 +102,5 @@ public interface SysDictTypeService extends IService<SysDictType> {
* *
* @return * @return
*/ */
public boolean checkDictTypeUnique (SysDictType dictType); boolean checkDictTypeUnique(SysDictType dictType);
} }

View File

@ -16,7 +16,7 @@ public interface SysLogininforService extends IService<SysLogininfor> {
* *
* @param logininfor 访 * @param logininfor 访
*/ */
public int insertLogininfor (SysLogininfor logininfor); int insertLogininfor(SysLogininfor logininfor);
/** /**
* *
@ -25,7 +25,7 @@ public interface SysLogininforService extends IService<SysLogininfor> {
* *
* @return * @return
*/ */
public List<SysLogininfor> selectLogininforList (SysLogininfor logininfor); List<SysLogininfor> selectLogininforList(SysLogininfor logininfor);
/** /**
* *
@ -34,10 +34,10 @@ public interface SysLogininforService extends IService<SysLogininfor> {
* *
* @return * @return
*/ */
public int deleteLogininforByIds (Long[] infoIds); int deleteLogininforByIds(Long[] infoIds);
/** /**
* *
*/ */
public void cleanLogininfor (); void cleanLogininfor();
} }

View File

@ -21,7 +21,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return * @return
*/ */
public List<SysMenu> selectMenuList (Long userId); List<SysMenu> selectMenuList(Long userId);
/** /**
* *
@ -31,7 +31,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return * @return
*/ */
public List<SysMenu> selectMenuList (SysMenu menu, Long userId); List<SysMenu> selectMenuList(SysMenu menu, Long userId);
/** /**
* ID * ID
@ -40,7 +40,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return * @return
*/ */
public Set<String> selectMenuPermsByUserId (Long userId); Set<String> selectMenuPermsByUserId(Long userId);
/** /**
* ID * ID
@ -49,7 +49,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return * @return
*/ */
public Set<String> selectMenuPermsByRoleId (Long roleId); Set<String> selectMenuPermsByRoleId(Long roleId);
/** /**
* ID * ID
@ -58,7 +58,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return * @return
*/ */
public List<SysMenu> selectMenuTreeByUserId (Long userId); List<SysMenu> selectMenuTreeByUserId(Long userId);
/** /**
* ID * ID
@ -67,7 +67,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return * @return
*/ */
public List<Long> selectMenuListByRoleId (Long roleId); List<Long> selectMenuListByRoleId(Long roleId);
/** /**
* *
@ -76,7 +76,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return * @return
*/ */
public List<RouterVo> buildMenus (List<SysMenu> menus); List<RouterVo> buildMenus(List<SysMenu> menus);
/** /**
* *
@ -85,7 +85,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return * @return
*/ */
public List<SysMenu> buildMenuTree (List<SysMenu> menus); List<SysMenu> buildMenuTree(List<SysMenu> menus);
/** /**
* *
@ -94,7 +94,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return * @return
*/ */
public List<TreeSelect> buildMenuTreeSelect (List<SysMenu> menus); List<TreeSelect> buildMenuTreeSelect(List<SysMenu> menus);
/** /**
* ID * ID
@ -103,7 +103,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return * @return
*/ */
public SysMenu selectMenuById (Long menuId); SysMenu selectMenuById(Long menuId);
/** /**
* *
@ -112,7 +112,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return true false * @return true false
*/ */
public boolean hasChildByMenuId (Long menuId); boolean hasChildByMenuId(Long menuId);
/** /**
* *
@ -121,7 +121,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return true false * @return true false
*/ */
public boolean checkMenuExistRole (Long menuId); boolean checkMenuExistRole(Long menuId);
/** /**
* *
@ -130,7 +130,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return * @return
*/ */
public int insertMenu (SysMenu menu); int insertMenu(SysMenu menu);
/** /**
* *
@ -139,7 +139,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return * @return
*/ */
public int updateMenu (SysMenu menu); int updateMenu(SysMenu menu);
/** /**
* *
@ -148,7 +148,7 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return * @return
*/ */
public int deleteMenuById (Long menuId); int deleteMenuById(Long menuId);
/** /**
* *
@ -157,5 +157,5 @@ public interface SysMenuService extends IService<SysMenu> {
* *
* @return * @return
*/ */
public boolean checkMenuNameUnique (SysMenu menu); boolean checkMenuNameUnique(SysMenu menu);
} }

View File

@ -18,7 +18,7 @@ public interface SysNoticeService extends IService<SysNotice> {
* *
* @return * @return
*/ */
public SysNotice selectNoticeById (Long noticeId); SysNotice selectNoticeById(Long noticeId);
/** /**
* *
@ -27,7 +27,7 @@ public interface SysNoticeService extends IService<SysNotice> {
* *
* @return * @return
*/ */
public List<SysNotice> selectNoticeList (SysNotice notice); List<SysNotice> selectNoticeList(SysNotice notice);
/** /**
* *
@ -36,7 +36,7 @@ public interface SysNoticeService extends IService<SysNotice> {
* *
* @return * @return
*/ */
public int insertNotice (SysNotice notice); int insertNotice(SysNotice notice);
/** /**
* *
@ -45,7 +45,7 @@ public interface SysNoticeService extends IService<SysNotice> {
* *
* @return * @return
*/ */
public int updateNotice (SysNotice notice); int updateNotice(SysNotice notice);
/** /**
* *
@ -54,7 +54,7 @@ public interface SysNoticeService extends IService<SysNotice> {
* *
* @return * @return
*/ */
public int deleteNoticeById (Long noticeId); int deleteNoticeById(Long noticeId);
/** /**
* *
@ -63,5 +63,5 @@ public interface SysNoticeService extends IService<SysNotice> {
* *
* @return * @return
*/ */
public int deleteNoticeByIds (Long[] noticeIds); int deleteNoticeByIds(Long[] noticeIds);
} }

View File

@ -18,7 +18,7 @@ public interface SysOperLogService extends IService<SysOperLog> {
* *
* @return * @return
*/ */
public int insertOperlog (SysOperLog operLog); int insertOperlog(SysOperLog operLog);
/** /**
* *
@ -27,7 +27,7 @@ public interface SysOperLogService extends IService<SysOperLog> {
* *
* @return * @return
*/ */
public List<SysOperLog> selectOperLogList (SysOperLog operLog); List<SysOperLog> selectOperLogList(SysOperLog operLog);
/** /**
* *
@ -36,7 +36,7 @@ public interface SysOperLogService extends IService<SysOperLog> {
* *
* @return * @return
*/ */
public int deleteOperLogByIds (Long[] operIds); int deleteOperLogByIds(Long[] operIds);
/** /**
* *
@ -45,10 +45,10 @@ public interface SysOperLogService extends IService<SysOperLog> {
* *
* @return * @return
*/ */
public SysOperLog selectOperLogById (Long operId); SysOperLog selectOperLogById(Long operId);
/** /**
* *
*/ */
public void cleanOperLog (); void cleanOperLog();
} }

View File

@ -17,7 +17,7 @@ public interface SysPermissionService {
* *
* @return * @return
*/ */
public Set<String> getRolePermission (SysUser user); Set<String> getRolePermission(SysUser user);
/** /**
* *
@ -26,5 +26,5 @@ public interface SysPermissionService {
* *
* @return * @return
*/ */
public Set<String> getMenuPermission (SysUser user); Set<String> getMenuPermission(SysUser user);
} }

View File

@ -18,14 +18,14 @@ public interface SysPostService extends IService<SysPost> {
* *
* @return * @return
*/ */
public List<SysPost> selectPostList (SysPost post); List<SysPost> selectPostList(SysPost post);
/** /**
* *
* *
* @return * @return
*/ */
public List<SysPost> selectPostAll (); List<SysPost> selectPostAll();
/** /**
* ID * ID
@ -34,7 +34,7 @@ public interface SysPostService extends IService<SysPost> {
* *
* @return * @return
*/ */
public SysPost selectPostById (Long postId); SysPost selectPostById(Long postId);
/** /**
* ID * ID
@ -43,7 +43,7 @@ public interface SysPostService extends IService<SysPost> {
* *
* @return ID * @return ID
*/ */
public List<Long> selectPostListByUserId (Long userId); List<Long> selectPostListByUserId(Long userId);
/** /**
* *
@ -52,7 +52,7 @@ public interface SysPostService extends IService<SysPost> {
* *
* @return * @return
*/ */
public boolean checkPostNameUnique (SysPost post); boolean checkPostNameUnique(SysPost post);
/** /**
* *
@ -61,7 +61,7 @@ public interface SysPostService extends IService<SysPost> {
* *
* @return * @return
*/ */
public boolean checkPostCodeUnique (SysPost post); boolean checkPostCodeUnique(SysPost post);
/** /**
* ID使 * ID使
@ -70,7 +70,7 @@ public interface SysPostService extends IService<SysPost> {
* *
* @return * @return
*/ */
public int countUserPostById (Long postId); int countUserPostById(Long postId);
/** /**
* *
@ -79,7 +79,7 @@ public interface SysPostService extends IService<SysPost> {
* *
* @return * @return
*/ */
public int deletePostById (Long postId); int deletePostById(Long postId);
/** /**
* *
@ -88,7 +88,7 @@ public interface SysPostService extends IService<SysPost> {
* *
* @return * @return
*/ */
public int deletePostByIds (Long[] postIds); int deletePostByIds(Long[] postIds);
/** /**
* *
@ -97,7 +97,7 @@ public interface SysPostService extends IService<SysPost> {
* *
* @return * @return
*/ */
public int insertPost (SysPost post); int insertPost(SysPost post);
/** /**
* *
@ -106,5 +106,5 @@ public interface SysPostService extends IService<SysPost> {
* *
* @return * @return
*/ */
public int updatePost (SysPost post); int updatePost(SysPost post);
} }

View File

@ -20,7 +20,7 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public List<SysRole> selectRoleList (SysRole role); List<SysRole> selectRoleList(SysRole role);
/** /**
* ID * ID
@ -29,7 +29,7 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public List<SysRole> selectRolesByUserId (Long userId); List<SysRole> selectRolesByUserId(Long userId);
/** /**
* ID * ID
@ -38,14 +38,14 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public Set<String> selectRolePermissionByUserId (Long userId); Set<String> selectRolePermissionByUserId(Long userId);
/** /**
* *
* *
* @return * @return
*/ */
public List<SysRole> selectRoleAll (); List<SysRole> selectRoleAll();
/** /**
* ID * ID
@ -54,7 +54,7 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return ID * @return ID
*/ */
public List<Long> selectRoleListByUserId (Long userId); List<Long> selectRoleListByUserId(Long userId);
/** /**
* ID * ID
@ -63,7 +63,7 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public SysRole selectRoleById (Long roleId); SysRole selectRoleById(Long roleId);
/** /**
* *
@ -72,7 +72,7 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public boolean checkRoleNameUnique (SysRole role); boolean checkRoleNameUnique(SysRole role);
/** /**
* *
@ -81,21 +81,21 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public boolean checkRoleKeyUnique (SysRole role); boolean checkRoleKeyUnique(SysRole role);
/** /**
* *
* *
* @param role * @param role
*/ */
public void checkRoleAllowed (SysRole role); void checkRoleAllowed(SysRole role);
/** /**
* *
* *
* @param roleId id * @param roleId id
*/ */
public void checkRoleDataScope (Long roleId); void checkRoleDataScope(Long roleId);
/** /**
* ID使 * ID使
@ -104,7 +104,7 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public int countUserRoleByRoleId (Long roleId); int countUserRoleByRoleId(Long roleId);
/** /**
* *
@ -113,7 +113,7 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public int insertRole (SysRole role); int insertRole(SysRole role);
/** /**
* *
@ -122,7 +122,7 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public int updateRole (SysRole role); int updateRole(SysRole role);
/** /**
* *
@ -131,7 +131,7 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public int updateRoleStatus (SysRole role); int updateRoleStatus(SysRole role);
/** /**
* *
@ -140,7 +140,7 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public int authDataScope (SysRole role); int authDataScope(SysRole role);
/** /**
* ID * ID
@ -149,7 +149,7 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public int deleteRoleById (Long roleId); int deleteRoleById(Long roleId);
/** /**
* *
@ -158,7 +158,7 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public int deleteRoleByIds (Long[] roleIds); int deleteRoleByIds(Long[] roleIds);
/** /**
* *
@ -167,7 +167,7 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public int deleteAuthUser (SysUserRole userRole); int deleteAuthUser(SysUserRole userRole);
/** /**
* *
@ -177,7 +177,7 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public int deleteAuthUsers (Long roleId, Long[] userIds); int deleteAuthUsers(Long roleId, Long[] userIds);
/** /**
* *
@ -187,5 +187,5 @@ public interface SysRoleService extends IService<SysRole> {
* *
* @return * @return
*/ */
public int insertAuthUsers (Long roleId, Long[] userIds); int insertAuthUsers(Long roleId, Long[] userIds);
} }

View File

@ -1,6 +1,5 @@
package com.muyu.system.service; package com.muyu.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.common.system.domain.LoginUser; import com.muyu.common.system.domain.LoginUser;
import com.muyu.system.domain.SysUserOnline; import com.muyu.system.domain.SysUserOnline;
@ -18,7 +17,7 @@ public interface SysUserOnlineService {
* *
* @return 线 * @return 线
*/ */
public SysUserOnline selectOnlineByIpaddr (String ipaddr, LoginUser user); SysUserOnline selectOnlineByIpaddr(String ipaddr, LoginUser user);
/** /**
* *
@ -28,7 +27,7 @@ public interface SysUserOnlineService {
* *
* @return 线 * @return 线
*/ */
public SysUserOnline selectOnlineByUserName (String userName, LoginUser user); SysUserOnline selectOnlineByUserName(String userName, LoginUser user);
/** /**
* / * /
@ -39,7 +38,7 @@ public interface SysUserOnlineService {
* *
* @return 线 * @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 线 * @return 线
*/ */
public SysUserOnline loginUserToUserOnline (LoginUser user); SysUserOnline loginUserToUserOnline(LoginUser user);
} }

View File

@ -18,7 +18,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public List<SysUser> selectUserList (SysUser user); List<SysUser> selectUserList(SysUser user);
/** /**
* *
@ -27,7 +27,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public List<SysUser> selectAllocatedList (SysUser user); List<SysUser> selectAllocatedList(SysUser user);
/** /**
* *
@ -36,7 +36,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public List<SysUser> selectUnallocatedList (SysUser user); List<SysUser> selectUnallocatedList(SysUser user);
/** /**
* *
@ -45,7 +45,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public SysUser selectUserByUserName (String userName); SysUser selectUserByUserName(String userName);
/** /**
* ID * ID
@ -54,7 +54,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public SysUser selectUserById (Long userId); SysUser selectUserById(Long userId);
/** /**
* ID * ID
@ -63,7 +63,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public String selectUserRoleGroup (String userName); String selectUserRoleGroup(String userName);
/** /**
* ID * ID
@ -72,7 +72,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public String selectUserPostGroup (String userName); String selectUserPostGroup(String userName);
/** /**
* *
@ -81,7 +81,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public boolean checkUserNameUnique (SysUser user); boolean checkUserNameUnique(SysUser user);
/** /**
* *
@ -90,7 +90,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public boolean checkPhoneUnique (SysUser user); boolean checkPhoneUnique(SysUser user);
/** /**
* email * email
@ -99,21 +99,21 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public boolean checkEmailUnique (SysUser user); boolean checkEmailUnique(SysUser user);
/** /**
* *
* *
* @param user * @param user
*/ */
public void checkUserAllowed (SysUser user); void checkUserAllowed(SysUser user);
/** /**
* *
* *
* @param userId id * @param userId id
*/ */
public void checkUserDataScope (Long userId); void checkUserDataScope(Long userId);
/** /**
* *
@ -122,7 +122,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public int insertUser (SysUser user); int insertUser(SysUser user);
/** /**
* *
@ -131,7 +131,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public boolean registerUser (SysUser user); boolean registerUser(SysUser user);
/** /**
* *
@ -140,7 +140,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public int updateUser (SysUser user); int updateUser(SysUser user);
/** /**
* *
@ -148,7 +148,7 @@ public interface SysUserService extends IService<SysUser> {
* @param userId ID * @param userId ID
* @param roleIds * @param roleIds
*/ */
public void insertUserAuth (Long userId, Long[] roleIds); void insertUserAuth(Long userId, Long[] roleIds);
/** /**
* *
@ -157,7 +157,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public int updateUserStatus (SysUser user); int updateUserStatus(SysUser user);
/** /**
* *
@ -166,7 +166,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public int updateUserProfile (SysUser user); int updateUserProfile(SysUser user);
/** /**
* *
@ -176,7 +176,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public boolean updateUserAvatar (String userName, String avatar); boolean updateUserAvatar(String userName, String avatar);
/** /**
* *
@ -185,7 +185,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public int resetPwd (SysUser user); int resetPwd(SysUser user);
/** /**
* *
@ -195,7 +195,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public int resetUserPwd (String userName, String password); int resetUserPwd(String userName, String password);
/** /**
* ID * ID
@ -204,7 +204,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public int deleteUserById (Long userId); int deleteUserById(Long userId);
/** /**
* *
@ -213,7 +213,7 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public int deleteUserByIds (Long[] userIds); int deleteUserByIds(Long[] userIds);
/** /**
* *
@ -224,5 +224,5 @@ public interface SysUserService extends IService<SysUser> {
* *
* @return * @return
*/ */
public String importUser (List<SysUser> userList, Boolean isUpdateSupport, String operName); String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName);
} }

View File

@ -306,7 +306,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
List<SysDept> tlist = new ArrayList<SysDept>(); List<SysDept> tlist = new ArrayList<SysDept>();
Iterator<SysDept> it = list.iterator(); Iterator<SysDept> it = list.iterator();
while (it.hasNext()) { while (it.hasNext()) {
SysDept n = (SysDept) it.next(); SysDept n = it.next();
if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getDeptId().longValue()) { if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getDeptId().longValue()) {
tlist.add(n); tlist.add(n);
} }
@ -318,6 +318,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
* *
*/ */
private boolean hasChild (List<SysDept> list, SysDept t) { private boolean hasChild (List<SysDept> list, SysDept t) {
return getChildList(list, t).size() > 0 ? true : false; return getChildList(list, t).size() > 0;
} }
} }

View File

@ -204,7 +204,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
List<SysMenu> returnList = new ArrayList<SysMenu>(); List<SysMenu> returnList = new ArrayList<SysMenu>();
List<Long> tempList = menus.stream().map(SysMenu::getMenuId).collect(Collectors.toList()); List<Long> tempList = menus.stream().map(SysMenu::getMenuId).collect(Collectors.toList());
for (Iterator<SysMenu> iterator = menus.iterator() ; iterator.hasNext() ; ) { for (Iterator<SysMenu> iterator = menus.iterator() ; iterator.hasNext() ; ) {
SysMenu menu = (SysMenu) iterator.next(); SysMenu menu = iterator.next();
// 如果是顶级节点, 遍历该父节点的所有子节点 // 如果是顶级节点, 遍历该父节点的所有子节点
if (!tempList.contains(menu.getParentId())) { if (!tempList.contains(menu.getParentId())) {
recursionFn(menus, menu); recursionFn(menus, menu);
@ -426,7 +426,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
public List<SysMenu> getChildPerms (List<SysMenu> list, int parentId) { public List<SysMenu> getChildPerms (List<SysMenu> list, int parentId) {
List<SysMenu> returnList = new ArrayList<SysMenu>(); List<SysMenu> returnList = new ArrayList<SysMenu>();
for (Iterator<SysMenu> iterator = list.iterator() ; iterator.hasNext() ; ) { for (Iterator<SysMenu> iterator = list.iterator() ; iterator.hasNext() ; ) {
SysMenu t = (SysMenu) iterator.next(); SysMenu t = iterator.next();
// 一、根据传入的某个父节点ID,遍历该父节点的所有子节点 // 一、根据传入的某个父节点ID,遍历该父节点的所有子节点
if (t.getParentId() == parentId) { if (t.getParentId() == parentId) {
recursionFn(list, t); recursionFn(list, t);
@ -460,7 +460,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
List<SysMenu> tlist = new ArrayList<SysMenu>(); List<SysMenu> tlist = new ArrayList<SysMenu>();
Iterator<SysMenu> it = list.iterator(); Iterator<SysMenu> it = list.iterator();
while (it.hasNext()) { while (it.hasNext()) {
SysMenu n = (SysMenu) it.next(); SysMenu n = it.next();
if (n.getParentId().longValue() == t.getMenuId().longValue()) { if (n.getParentId().longValue() == t.getMenuId().longValue()) {
tlist.add(n); tlist.add(n);
} }

View File

@ -1,6 +1,5 @@
package com.muyu.system.service.impl; 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.SysRole;
import com.muyu.common.system.domain.SysUser; import com.muyu.common.system.domain.SysUser;
import com.muyu.system.service.SysMenuService; import com.muyu.system.service.SysMenuService;

View File

@ -1,6 +1,5 @@
package com.muyu.system.service.impl; 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.core.utils.StringUtils;
import com.muyu.common.system.domain.LoginUser; import com.muyu.common.system.domain.LoginUser;
import com.muyu.system.domain.SysUserOnline; import com.muyu.system.domain.SysUserOnline;

View File

@ -14,8 +14,8 @@ import com.muyu.system.domain.SysPost;
import com.muyu.system.domain.SysUserPost; import com.muyu.system.domain.SysUserPost;
import com.muyu.system.domain.SysUserRole; import com.muyu.system.domain.SysUserRole;
import com.muyu.system.mapper.*; import com.muyu.system.mapper.*;
import com.muyu.system.service.SysUserService;
import com.muyu.system.service.SysConfigService; import com.muyu.system.service.SysConfigService;
import com.muyu.system.service.SysUserService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -238,11 +238,14 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
public int insertUser (SysUser user) { public int insertUser (SysUser user) {
// 新增用户信息 // 新增用户信息
int rows = userMapper.insertUser(user); int rows = userMapper.insertUser(user);
//赋值userId
// user.setUserId((long) rows);
// 新增用户岗位关联 // 新增用户岗位关联
insertUserPost(user); insertUserPost(user);
// 新增用户与角色管理 // 新增用户与角色管理
insertUserRole(user); insertUserRole(user);
return rows; return rows;
} }
/** /**

View File

@ -87,7 +87,7 @@
from sys_dept from sys_dept
where del_flag = '0' where del_flag = '0'
and parent_id = #{deptId} and parent_id = #{deptId}
limit 1 limit 1
</select> </select>
<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult"> <select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
@ -108,6 +108,9 @@
<include refid="selectDeptVo"/> <include refid="selectDeptVo"/>
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1 where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
</select> </select>
<select id="selectDeptByName" resultType="com.muyu.common.system.domain.SysDept">
select * from sys_dept where dept_name=#{name}
</select>
<insert id="insertDept" parameterType="com.muyu.common.system.domain.SysDept"> <insert id="insertDept" parameterType="com.muyu.common.system.domain.SysDept">
insert into sys_dept( insert into sys_dept(
@ -180,9 +183,4 @@
where dept_id = #{deptId} where dept_id = #{deptId}
</delete> </delete>
<select id="selectDeptByName" resultType="com.muyu.common.system.domain.SysDept">
select * from sys_dept where dept_name=#{name}
</select>
</mapper> </mapper>

View File

@ -165,7 +165,7 @@
from sys_user from sys_user
where user_name = #{userName} where user_name = #{userName}
and del_flag = '0' and del_flag = '0'
limit 1 limit 1
</select> </select>
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult"> <select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
@ -173,7 +173,7 @@
from sys_user from sys_user
where phonenumber = #{phonenumber} where phonenumber = #{phonenumber}
and del_flag = '0' and del_flag = '0'
limit 1 limit 1
</select> </select>
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult"> <select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
@ -181,7 +181,7 @@
from sys_user from sys_user
where email = #{email} where email = #{email}
and del_flag = '0' and del_flag = '0'
limit 1 limit 1
</select> </select>
<insert id="insertUser" parameterType="com.muyu.common.system.domain.SysUser" useGeneratedKeys="true" keyProperty="userId"> <insert id="insertUser" parameterType="com.muyu.common.system.domain.SysUser" useGeneratedKeys="true" keyProperty="userId">