From de5ebb32e7746838c64a86581ea012efb2b75098 Mon Sep 17 00:00:00 2001 From: Xiao Fan <461179989@qq.com> Date: Fri, 29 Mar 2024 22:31:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=82=96=E5=87=A13.29=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- muyu-common/muyu-common-core/pom.xml | 16 +++ .../muyu/common/core/domain/PageResult.java | 35 +++++ .../mapper/business/EnterpriseInfoMapper.xml | 20 +-- .../mapper/generator/GenTableColumnMapper.xml | 8 +- .../mapper/generator/GenTableMapper.xml | 12 +- .../resources/mapper/job/SysJobLogMapper.xml | 6 +- .../resources/mapper/job/SysJobMapper.xml | 8 +- .../com/muyu/system/common/domain/Car.java | 121 ++++++++++++++++++ .../muyu/system/common/domain/CarInfo.java | 58 +++++++++ .../com/muyu/system/common/domain/Fence.java | 62 +++++++++ .../system/common/domain/req/CarAddReq.java | 83 ++++++++++++ .../system/common/domain/req/CarRequest.java | 19 +++ .../common/domain/req/CarUpdateReq.java | 90 +++++++++++++ .../muyu/system/common/domain/vo/CarVo.java | 26 ++++ .../muyu-system/muyu-system-server/pom.xml | 6 + .../muyu/system/MuYuSystemApplication.java | 2 + .../muyu/system/controller/CarController.java | 121 ++++++++++++++++++ .../com/muyu/system/mapper/CarMapper.java | 36 ++++++ .../com/muyu/system/service/CarService.java | 44 +++++++ .../system/service/impl/CarServiceImpl.java | 83 ++++++++++++ .../resources/mapper/system/CarMapper.xml | 103 +++++++++++++++ .../mapper/system/SysConfigMapper.xml | 10 +- .../resources/mapper/system/SysDeptMapper.xml | 8 +- .../mapper/system/SysDictDataMapper.xml | 10 +- .../mapper/system/SysDictTypeMapper.xml | 8 +- .../mapper/system/SysLogininforMapper.xml | 6 +- .../resources/mapper/system/SysMenuMapper.xml | 12 +- .../mapper/system/SysNoticeMapper.xml | 8 +- .../mapper/system/SysOperLogMapper.xml | 6 +- .../resources/mapper/system/SysPostMapper.xml | 8 +- .../mapper/system/SysRoleDeptMapper.xml | 2 +- .../resources/mapper/system/SysRoleMapper.xml | 8 +- .../mapper/system/SysRoleMenuMapper.xml | 2 +- .../resources/mapper/system/SysUserMapper.xml | 24 ++-- .../mapper/system/SysUserPostMapper.xml | 2 +- .../mapper/system/SysUserRoleMapper.xml | 4 +- 36 files changed, 991 insertions(+), 86 deletions(-) create mode 100644 muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/domain/PageResult.java create mode 100644 muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/Car.java create mode 100644 muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/CarInfo.java create mode 100644 muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/Fence.java create mode 100644 muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/CarAddReq.java create mode 100644 muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/CarRequest.java create mode 100644 muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/CarUpdateReq.java create mode 100644 muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/vo/CarVo.java create mode 100644 muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/controller/CarController.java create mode 100644 muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/mapper/CarMapper.java create mode 100644 muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/service/CarService.java create mode 100644 muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/service/impl/CarServiceImpl.java create mode 100644 muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/CarMapper.xml diff --git a/muyu-common/muyu-common-core/pom.xml b/muyu-common/muyu-common-core/pom.xml index ae5fd1b..010328c 100644 --- a/muyu-common/muyu-common-core/pom.xml +++ b/muyu-common/muyu-common-core/pom.xml @@ -90,6 +90,22 @@ commons-io commons-io + + + com.baomidou + mybatis-plus-boot-starter + 3.5.3.1 + + + com.github.jsqlparser + jsqlparser + + + org.mybatis + mybatis + + + diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/domain/PageResult.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/domain/PageResult.java new file mode 100644 index 0000000..589a420 --- /dev/null +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/domain/PageResult.java @@ -0,0 +1,35 @@ +package com.muyu.common.core.domain; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 列表返回结果集 + * @author XiaoFan + * @description: 列表返回结果集 + */ +@Data +public class PageResult implements Serializable { + /** + * 总条数 + */ + private long total; + /** + * 结果集合 + */ + private List list; + public PageResult() { + } + public PageResult(long total, List list) { + this.total = total; + this.list = list; + } + public static PageResult toPageResult(long total, List list){ + return new PageResult(total , list); + } + public static Result> toResult(long total, List list){ + return Result.success(PageResult.toPageResult(total,list)); + } +} diff --git a/muyu-modules/muyu-business/muyu-business-server/src/main/resources/mapper/business/EnterpriseInfoMapper.xml b/muyu-modules/muyu-business/muyu-business-server/src/main/resources/mapper/business/EnterpriseInfoMapper.xml index 9019001..952576b 100644 --- a/muyu-modules/muyu-business/muyu-business-server/src/main/resources/mapper/business/EnterpriseInfoMapper.xml +++ b/muyu-modules/muyu-business/muyu-business-server/src/main/resources/mapper/business/EnterpriseInfoMapper.xml @@ -3,8 +3,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - + + @@ -22,9 +22,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select enterprise_id, enterprise_name, contact_person, contact_email, user_id, enterprise_address, phone_number, industry, employee_count, status, identifier from enterprise_info - - + and enterprise_name like concat('%', #{enterpriseName}, '%') and contact_person = #{contactPerson} and contact_email = #{contactEmail} @@ -37,13 +37,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and identifier = #{identifier} - + - - + + insert into enterprise_info enterprise_name, @@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + update enterprise_info enterprise_name = #{enterpriseName}, @@ -93,9 +93,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from enterprise_info where enterprise_id in + delete from enterprise_info where enterprise_id in #{enterpriseId} - \ No newline at end of file + diff --git a/muyu-modules/muyu-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml b/muyu-modules/muyu-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml index 59f40b1..afb0ac6 100644 --- a/muyu-modules/muyu-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml +++ b/muyu-modules/muyu-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml @@ -4,7 +4,7 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -33,7 +33,7 @@ select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, dict_type, sort, create_by, create_time, update_by, update_time from gen_table_column - where table_id = #{tableId} @@ -60,7 +60,7 @@ order by ordinal_position - + insert into gen_table_column ( table_id, column_name, @@ -104,7 +104,7 @@ ) - + update gen_table_column column_comment = #{columnComment}, diff --git a/muyu-modules/muyu-gen/src/main/resources/mapper/generator/GenTableMapper.xml b/muyu-modules/muyu-gen/src/main/resources/mapper/generator/GenTableMapper.xml index ba659e1..198066a 100644 --- a/muyu-modules/muyu-gen/src/main/resources/mapper/generator/GenTableMapper.xml +++ b/muyu-modules/muyu-gen/src/main/resources/mapper/generator/GenTableMapper.xml @@ -4,7 +4,7 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -30,7 +30,7 @@ - + @@ -59,7 +59,7 @@ select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, tpl_web_type, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table - @@ -77,7 +77,7 @@ - select table_schema as database_name,table_name, table_comment, create_time, update_time from information_schema.tables where @@ -162,7 +162,7 @@ where table_schema not in ('information_schema','mysql','performance_schema','sys') - + insert into gen_table ( database_name, table_name, @@ -200,7 +200,7 @@ ) - + update gen_table table_name = #{tableName}, diff --git a/muyu-modules/muyu-job/src/main/resources/mapper/job/SysJobLogMapper.xml b/muyu-modules/muyu-job/src/main/resources/mapper/job/SysJobLogMapper.xml index 8e590e7..8a5ac22 100644 --- a/muyu-modules/muyu-job/src/main/resources/mapper/job/SysJobLogMapper.xml +++ b/muyu-modules/muyu-job/src/main/resources/mapper/job/SysJobLogMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sys_job_log - @@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" truncate table sys_job_log - + insert into sys_job_log( job_log_id, job_name, diff --git a/muyu-modules/muyu-job/src/main/resources/mapper/job/SysJobMapper.xml b/muyu-modules/muyu-job/src/main/resources/mapper/job/SysJobMapper.xml index 9a98bf4..1b0b21b 100644 --- a/muyu-modules/muyu-job/src/main/resources/mapper/job/SysJobMapper.xml +++ b/muyu-modules/muyu-job/src/main/resources/mapper/job/SysJobMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sys_job - @@ -63,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + update sys_job job_name = #{jobName}, @@ -80,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where job_id = #{jobId} - + insert into sys_job( job_id, job_name, diff --git a/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/Car.java b/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/Car.java new file mode 100644 index 0000000..7d0a3bc --- /dev/null +++ b/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/Car.java @@ -0,0 +1,121 @@ +package com.muyu.system.common.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.muyu.system.common.domain.req.CarAddReq; +import com.muyu.system.common.domain.req.CarUpdateReq; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * 车辆管理表 car + * @ProjectName: colud-vehicles + * @PackageName: com.muyu.system.common.domain + * @Description TODO + * @Author XiaoFan + * @Date 2024/3/28 21:49 + * @Version 1.0 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +@TableName("car") +public class Car { + @TableId(value = "car_id",type = IdType.AUTO) + /** + * 车辆表ID + */ + private Integer carId; + /** + * 车辆表vin + */ + private String carVin; + /** + * 车辆类型 + */ + private Integer carType; + /** + * 电子围栏ID + */ + private Integer carFenceId; + /** + * 车辆状态 + */ + private Integer state; + /** + * 电机厂商 + */ + private String carElectricalmachiney; + /** + * 电池厂商 + */ + private String carBattery; + /** + * 电机编号 + */ + private Integer carElectricalmachineyId; + /** + * 电池厂商 + */ + private Integer carBatteryId; + /** + * 创建者 + */ + private String createBy; + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + /** + * 更新者 + */ + private String updateBy; + /** + * 更新时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + /** + * 备注 + */ + private String remark; + + public static Car addReqBuild(CarAddReq carAddReq){ + return Car.builder() + .carVin(carAddReq.getCarVin()) + .carType(carAddReq.getCarType()) + .carFenceId(carAddReq.getCarFenceId()) + .state(carAddReq.getState()) + .carElectricalmachiney(carAddReq.getCarElectricalmachiney()) + .carBattery(carAddReq.getCarBattery()) + .carElectricalmachineyId(carAddReq.getCarElectricalmachineyId()) + .carBatteryId(carAddReq.getCarBatteryId()) + .build(); + } + + public static Car updateReqBuild(CarUpdateReq carUpdateReq){ + return Car.builder() + .carId(carUpdateReq.getCarId()) + .carVin(carUpdateReq.getCarVin()) + .carType(carUpdateReq.getCarType()) + .carFenceId(carUpdateReq.getCarFenceId()) + .state(carUpdateReq.getState()) + .carElectricalmachiney(carUpdateReq.getCarElectricalmachiney()) + .carBattery(carUpdateReq.getCarBattery()) + .carElectricalmachineyId(carUpdateReq.getCarElectricalmachineyId()) + .carBatteryId(carUpdateReq.getCarBatteryId()) + .build(); + } + + + + +} diff --git a/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/CarInfo.java b/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/CarInfo.java new file mode 100644 index 0000000..b63f620 --- /dev/null +++ b/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/CarInfo.java @@ -0,0 +1,58 @@ +package com.muyu.system.common.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.muyu.common.core.web.domain.BaseEntity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * 车辆上线记录 car_info + * @ProjectName: colud-vehicles + * @PackageName: com.muyu.system.common.domain + * @Description TODO + * @Author XiaoFan + * @Date 2024/3/26 19:46 + * @Version 1.0 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class CarInfo extends BaseEntity{ + /** + * 日志表ID + */ + private Integer logId; + /** + * 车辆表vin + */ + private String carVin; + /** + * 上线时间 + */ + private Date logDate; + /** + * 创建者 + */ + private String createBy; + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + /** + * 更新者 + */ + private String updateBy; + /** + * 更新时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + /** + * 备注 + */ + private String remark; +} diff --git a/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/Fence.java b/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/Fence.java new file mode 100644 index 0000000..63cb7e1 --- /dev/null +++ b/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/Fence.java @@ -0,0 +1,62 @@ +package com.muyu.system.common.domain; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.experimental.SuperBuilder; + +/** + * 电子围栏实体类 Fence + * @ClassName Fence + * @Description 电子围栏实体类 + * @Author YinYuYang + * @Date 2024/3/26 20:48 + * Version 1.0 + */ +@Data +@SuperBuilder +@AllArgsConstructor +@NoArgsConstructor +@TableName("fence_info") +public class Fence{ + + /** + * 围栏ID + */ + @TableId(value = "fence_id", type = IdType.AUTO) + private Integer fenceId; + + /** + * 围栏编码 + */ + @TableField("fence_encoding") + private String fenceEncoding; + + /** + * 围栏名称 + */ + @TableField("fence_name") + private String fenceName; + + /** + * 围栏类型 + */ + @TableField("fence_type") + private Integer fenceType; + + /** + * 围栏状态 + */ + @TableField("fence_state") + private Integer fenceState; + + /** + * 经纬度信息 + */ + @TableField("fence_radius") + private String fenceRadius; + +} diff --git a/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/CarAddReq.java b/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/CarAddReq.java new file mode 100644 index 0000000..513f90a --- /dev/null +++ b/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/CarAddReq.java @@ -0,0 +1,83 @@ +package com.muyu.system.common.domain.req; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.*; + +/** + * 车辆表添加 + * @ProjectName: cloud-vehicles + * @PackageName: com.muyu.system.common.domain.req + * @Description TODO + * @Author XiaoFan + * @Date 2024/3/29 19:04 + * @Version 1.0 + */ + +@Data +@ApiModel(value = "请求参数") +public class CarAddReq { + /** + * 车俩表vin + */ + @NotEmpty + @Length(max = 255) + @Pattern(regexp = "^[0-9a-zA-Z]{17}$",message = "请输入正确的vin码") + @ApiModelProperty(value = "车辆vin码") + private String carVin; + /** + * 车辆类型 + */ + @NotNull + @Min(value = 1, message = "车辆类型必须大于等于1") + @ApiModelProperty(value = "车辆类型") + private Integer carType; + /** + * 电子围栏ID + */ + @NotNull + @Min(value = 1, message = "电子围栏必须大于等于1") + @ApiModelProperty(value = "电子围栏ID") + private Integer carFenceId; + /** + * 车辆状态 + */ + @NotNull + @Min(value = 1, message = "车辆状态必须大于等于1") + @ApiModelProperty(value = "车辆状态") + private Integer state; + /** + * 电机厂商 + */ + @NotEmpty + @Length(max = 255) + @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,20}$",message = "请输入正确的电机厂商") + @ApiModelProperty(value = "电机厂商") + private String carElectricalmachiney; + /** + * 电池厂商 + */ + @NotEmpty + @Length(max = 255) + @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,20}$",message = "请输入正确的电池厂商") + @ApiModelProperty(value = "电池厂商") + private String carBattery; + /** + * 电机编号 + */ + @NotNull + @Min(value = 1, message = "电机编号必须大于等于1") + @ApiModelProperty(value = "电机编号") + private Integer carElectricalmachineyId; + /** + * 电池编号 + */ + @NotNull + @Min(value = 1, message = "电池编号必须大于等于1") + @ApiModelProperty(value = "电池编号") + private Integer carBatteryId; + +} diff --git a/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/CarRequest.java b/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/CarRequest.java new file mode 100644 index 0000000..a152fe1 --- /dev/null +++ b/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/CarRequest.java @@ -0,0 +1,19 @@ +package com.muyu.system.common.domain.req; + +import lombok.Data; + +/** + * 列表分页参数 + * @ProjectName: cloud-vehicles + * @PackageName: com.muyu.system.common.domain.req + * @Description TODO + * @Author XiaoFan + * @Date 2024/3/29 19:03 + * @Version 1.0 + */ +@Data +public class CarRequest { + private Integer pageNum; + private Integer pageSize; +} + diff --git a/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/CarUpdateReq.java b/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/CarUpdateReq.java new file mode 100644 index 0000000..45ac5d1 --- /dev/null +++ b/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/CarUpdateReq.java @@ -0,0 +1,90 @@ +package com.muyu.system.common.domain.req; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; + +/** + * 车辆表修改 + * @ProjectName: cloud-vehicles + * @PackageName: com.muyu.system.common.domain.req + * @Description TODO + * @Author XiaoFan + * @Date 2024/3/29 19:05 + * @Version 1.0 + */ +@Data +@ApiModel(value = "请求参数") +public class CarUpdateReq { + /** + * 车辆表id + */ + @ApiModelProperty(value = "车辆表id") + private Integer carId; + /** + * 车俩表vin + */ + @NotEmpty + @Length(max = 255) + @Pattern(regexp = "^[0-9a-zA-Z]{17}$",message = "请输入正确的vin码") + @ApiModelProperty(value = "车辆vin码") + private String carVin; + /** + * 车辆类型 + */ + @NotNull + @Min(value = 1, message = "车辆类型必须大于等于1") + @ApiModelProperty(value = "车辆类型") + private Integer carType; + /** + * 电子围栏ID + */ + @NotNull + @Min(value = 1, message = "电子围栏必须大于等于1") + @ApiModelProperty(value = "电子围栏ID") + private Integer carFenceId; + /** + * 车辆状态 + */ + @NotNull + @Min(value = 1, message = "车辆状态必须大于等于1") + @ApiModelProperty(value = "车辆状态") + private Integer state; + /** + * 电机厂商 + */ + @NotEmpty + @Length(max = 255) + @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,20}$",message = "请输入正确的电机厂商") + @ApiModelProperty(value = "电机厂商") + private String carElectricalmachiney; + /** + * 电池厂商 + */ + @NotEmpty + @Length(max = 255) + @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,20}$",message = "请输入正确的电池厂商") + @ApiModelProperty(value = "电池厂商") + private String carBattery; + /** + * 电机编号 + */ + @NotNull + @Min(value = 1, message = "电机编号必须大于等于1") + @ApiModelProperty(value = "电机编号") + private Integer carElectricalmachineyId; + /** + * 电池编号 + */ + @NotNull + @Min(value = 1, message = "电池编号必须大于等于1") + @ApiModelProperty(value = "电池编号") + private Integer carBatteryId; + +} diff --git a/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/vo/CarVo.java b/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/vo/CarVo.java new file mode 100644 index 0000000..a2b5dae --- /dev/null +++ b/muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/vo/CarVo.java @@ -0,0 +1,26 @@ +package com.muyu.system.common.domain.vo; + +import com.muyu.system.common.domain.req.CarRequest; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 列表条件查询参数 + * @ProjectName: cloud-vehicles + * @PackageName: com.muyu.system.common.domain.vo + * @Description TODO + * @Author XiaoFan + * @Date 2024/3/29 19:03 + * @Version 1.0 + */ +@Data +@ApiModel(value = "请求参数") +public class CarVo extends CarRequest { + @ApiModelProperty(value = "车辆vin码") + private String carVin; + + + + +} diff --git a/muyu-modules/muyu-system/muyu-system-server/pom.xml b/muyu-modules/muyu-system/muyu-system-server/pom.xml index d837819..5c958b6 100644 --- a/muyu-modules/muyu-system/muyu-system-server/pom.xml +++ b/muyu-modules/muyu-system/muyu-system-server/pom.xml @@ -22,6 +22,12 @@ com.muyu muyu-system-common + + + io.springfox + springfox-boot-starter + 3.0.0 + com.alibaba.cloud diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/MuYuSystemApplication.java b/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/MuYuSystemApplication.java index db15ed3..e8f19a2 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/MuYuSystemApplication.java +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/MuYuSystemApplication.java @@ -3,6 +3,7 @@ package com.muyu.system; import com.muyu.common.security.annotation.EnableCustomConfig; import com.muyu.common.security.annotation.EnableRyFeignClients; import com.muyu.common.swagger.annotation.EnableCustomSwagger2; +import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -15,6 +16,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; @EnableCustomSwagger2 @EnableRyFeignClients @SpringBootApplication +@MapperScan("com.muyu.system.mapper") public class MuYuSystemApplication { public static void main(String[] args) diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/controller/CarController.java b/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/controller/CarController.java new file mode 100644 index 0000000..89b141f --- /dev/null +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/controller/CarController.java @@ -0,0 +1,121 @@ +package com.muyu.system.controller; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.muyu.common.core.domain.PageResult; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.system.common.domain.Car; +import com.muyu.system.common.domain.Fence; +import com.muyu.system.common.domain.SysDept; +import com.muyu.system.common.domain.SysDictData; +import com.muyu.system.common.domain.req.CarAddReq; +import com.muyu.system.common.domain.req.CarUpdateReq; +import com.muyu.system.common.domain.vo.CarVo; +import com.muyu.system.service.CarService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +/** + * 车辆管理 + * @ProjectName: colud-vehicles + * @PackageName: com.muyu.system.controller + * @Description TODO + * @Author XiaoFan + * @Date 2024/3/26 19:57 + * @Version 1.0 + */ + +@RestController +@Slf4j +@RequestMapping("/car") +public class CarController extends BaseController{ + @Autowired + private CarService carService; + @Autowired + private HttpServletRequest request; + + + @GetMapping("/list") + @RequiresPermissions("system:car:list") + @Log(title = "车辆列表") + public Result> list(@Validated CarVo carVo){ + log.info("执行操作:查询车辆列表,请求URL:{},请求方法:{},请求参数:{}",request.getRequestURI(), + request.getMethod(), carVo); + Result> list=carService.list(carVo); + log.info("执行操作:查询车辆列表,请求URL:{},请求方式:{},响应结果:{}",request.getRequestURI(), + request.getMethod(),JSONObject.toJSONString(list)); + return list; + } + @PostMapping("/add") + @RequiresPermissions("system:config:add") + @Log(title = "车辆管理",businessType = BusinessType.INSERT) + public Result add(@RequestBody @Validated CarAddReq carAddReq){ + log.info("执行操作:添加车辆数据,请求URL:{},请求方式:{},请求参数:{}",request.getRequestURI(), + request.getMethod(),JSONObject.toJSONString(carAddReq)); + Result result=Result.success(carAddReq); + carService.add(Car.addReqBuild(carAddReq)); + log.info("执行操作:添加车辆数据,请求URL:{},请求方式:{},响应结果:{}",request.getRequestURI(), + request.getMethod(),JSONObject.toJSONString(carAddReq)); + return result; + } + @PostMapping("/update") + @RequiresPermissions("system:config:edit") + @Log(title = "车辆管理",businessType = BusinessType.UPDATE) + public Result update(@RequestBody @Validated CarUpdateReq carUpdateReq){ + log.info("执行操作:修改车辆数据,请求URL:{},请求方式:{},请求参数:{}",request.getRequestURI(), + request.getMethod(),JSONObject.toJSONString(carUpdateReq)); + Result result=Result.success(carUpdateReq); + carService.update(Car.updateReqBuild(carUpdateReq)); + log.info("执行操作:修改车辆数据,请求URL:{},请求方式:{},响应结果:{}",request.getRequestURI(), + request.getMethod(),JSONObject.toJSONString(result)); + return result; + } + @PostMapping("/del/{carId}") + @RequiresPermissions("system:config:remove") + @Log(title = "车辆管理",businessType = BusinessType.DELETE) + public Result del(@PathVariable Integer carId){ + log.info("执行操作:删除,请求URL:{},请求方式:{},请求参数:{}",request.getRequestURI(), + request.getMethod(),JSONObject.toJSONString(carId)); + Result result=Result.success(carId); + carService.del(carId); + log.info("执行操作:删除,请求URL:{},请求方式:{},响应结果:{}",request.getRequestURI(), + request.getMethod(),JSONObject.toJSONString(result)); + return result; + } + @GetMapping("/findById/{carId}") + @RequiresPermissions("system:car:query") + @Log(title = "车辆管理") + public Car findById(@PathVariable Integer carId){ + log.info("执行操作:根据id查询数据,请求URL:{},请求方式:{},请求参数:{}",request.getRequestURI(), + request.getMethod(),JSONObject.toJSONString(carId)); + Car car=carService.findById(carId); + log.info("执行操作:根据id查询数据,请求URL:{},请求方式:{},请求参数:{}",request.getRequestURI(), + request.getMethod(), JSONObject.toJSONString(car)); + return car; + } + @GetMapping("/selectFence") + @Log(title = "查询电子围栏表") + public Result> selectFence(){ + log.info("执行操作:根据id查询电子围栏表,请求URL:{},请求方式:{}",request.getRequestURI(), + request.getMethod()); + List list=carService.selectFence(); + return Result.success(list); + } + @GetMapping("/selectState") + @Log(title = "查询字典表") + public Result> selectState(){ + log.info("执行操作:查询规则,请求URL:{},请求方式:{}",request.getRequestURI(), + request.getMethod()); + List list=carService.selectState(); + return Result.success(list); + } +} diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/mapper/CarMapper.java b/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/mapper/CarMapper.java new file mode 100644 index 0000000..232f6c7 --- /dev/null +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/mapper/CarMapper.java @@ -0,0 +1,36 @@ +package com.muyu.system.mapper; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.muyu.system.common.domain.Car; +import com.muyu.system.common.domain.Fence; +import com.muyu.system.common.domain.SysDictData; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 车辆管理 数据层 + * @ProjectName: colud-vehicles + * @PackageName: com.muyu.system.mapper + * @Description TODO + * @Author XiaoFan + * @Date 2024/3/26 19:59 + * @Version 1.0 + */ +@Mapper +public interface CarMapper extends BaseMapper { + List selectState(); + + List selectFence(); + + + +// List list(carVo carVo); + +// void add(Car car); +// +//void update(car car); +// +// void del(Integer carId); +} diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/service/CarService.java b/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/service/CarService.java new file mode 100644 index 0000000..702a03f --- /dev/null +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/service/CarService.java @@ -0,0 +1,44 @@ +package com.muyu.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.muyu.common.core.domain.PageResult; +import com.muyu.common.core.domain.Result; +import com.muyu.system.common.domain.Car; +import com.muyu.system.common.domain.Fence; +import com.muyu.system.common.domain.SysDept; +import com.muyu.system.common.domain.SysDictData; +import com.muyu.system.common.domain.vo.CarVo; + +import java.util.List; + + +/** + * 车辆管理 服务层 + * @ProjectName: colud-vehicles + * @PackageName: com.muyu.system.service + * @Description TODO + * @Author XiaoFan + * @Date 2024/3/26 19:58 + * @Version 1.0 + */ +public interface CarService extends IService { + Result> list(CarVo carVo); + + + void add(Car car); + + void update(Car car); + + void del(Integer carId); + + + Car findById(Integer carId); + + List selectState(); + + + + List selectFence(); + + +} diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/service/impl/CarServiceImpl.java b/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/service/impl/CarServiceImpl.java new file mode 100644 index 0000000..59a66e0 --- /dev/null +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/service/impl/CarServiceImpl.java @@ -0,0 +1,83 @@ +package com.muyu.system.service.impl; + + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.muyu.common.core.domain.PageResult; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.StringUtils; +import com.muyu.common.core.utils.uuid.IdUtils; +import com.muyu.system.common.domain.Car; +import com.muyu.system.common.domain.Fence; +import com.muyu.system.common.domain.SysDept; +import com.muyu.system.common.domain.SysDictData; +import com.muyu.system.common.domain.vo.CarVo; +import com.muyu.system.mapper.CarMapper; +import com.muyu.system.service.CarService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 车辆管理 业务层 + * @ProjectName: colud-vehicles + * @PackageName: com.muyu.system.service.impl + * @Description TODO + * @Author XiaoFan + * @Date 2024/3/26 19:58 + * @Version 1.0 + */ +@Service +public class CarServiceImpl extends ServiceImpl implements CarService { + @Autowired + private CarMapper carMapper; + + @Override + public Result> list(CarVo carVo) { + PageHelper.startPage(carVo.getPageNum(),carVo.getPageSize()); + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + //判断一个字符串是否为空字符串 + if (StringUtils.isNotEmpty(carVo.getCarVin())){ + lambdaQueryWrapper.like(Car::getCarVin,carVo.getCarVin()); + } + List list=this.list(lambdaQueryWrapper); + PageInfo info = new PageInfo<>(list); + return PageResult.toResult(info.getTotal(),info.getList()); + } + + @Override + public void add(Car car) { + car.setCarVin("vin"+IdUtils.fastSimpleUUID()); + carMapper.insert(car); + } + + @Override + public void update(Car car) { + carMapper.updateById(car); + } + + @Override + public void del(Integer carId) { + carMapper.deleteById(carId); + } + + @Override + public Car findById(Integer carId) { + return carMapper.selectById(carId); + } + + @Override + public List selectState() { + return carMapper.selectState(); + } + + + + @Override + public List selectFence() { + return carMapper.selectFence(); + } +} diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/CarMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/CarMapper.xml new file mode 100644 index 0000000..0185653 --- /dev/null +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/CarMapper.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysConfigMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysConfigMapper.xml index e296b52..966cce3 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysConfigMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysConfigMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -33,12 +33,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - @@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where config_key = #{configKey} limit 1 - + insert into sys_config ( config_name, config_key, @@ -89,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) - + update sys_config config_name = #{configName}, diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysDeptMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysDeptMapper.xml index 8377ef6..71a626b 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysDeptMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sys_dept d - where d.del_flag = '0' @@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1 - + insert into sys_dept( dept_id, parent_id, @@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) - + update sys_dept parent_id = #{parentId}, diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysDictDataMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysDictDataMapper.xml index cc543e4..668b8bb 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysDictDataMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysDictDataMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sys_dict_data - @@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by dict_sort asc - where status = '0' and dict_type = #{dictType} order by dict_sort asc @@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + update sys_dict_data dict_sort = #{dictSort}, @@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType} - + insert into sys_dict_data( dict_sort, dict_label, diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysDictTypeMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysDictTypeMapper.xml index a16581f..d8dee1d 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysDictTypeMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysDictTypeMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sys_dict_type - @@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + update sys_dict_type dict_name = #{dictName}, @@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where dict_id = #{dictId} - + insert into sys_dict_type( dict_name, dict_type, diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysLogininforMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysLogininforMapper.xml index 9a3f492..768d6f0 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysLogininforMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysLogininforMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -13,12 +13,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + insert into sys_logininfor (user_name, status, ipaddr, msg, access_time) values (#{userName}, #{status}, #{ipaddr}, #{msg}, sysdate()) - select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysMenuMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysMenuMapper.xml index fce89c4..fcb8072 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysMenuMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysMenuMapper.xml @@ -4,7 +4,7 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -32,7 +32,7 @@ from sys_menu - @@ -54,7 +54,7 @@ order by m.parent_id, m.order_num - select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time from sys_menu m left join sys_role_menu rm on m.menu_id = rm.menu_id @@ -127,12 +127,12 @@ select count(1) from sys_menu where parent_id = #{menuId} - where menu_name=#{menuName} and parent_id = #{parentId} limit 1 - + update sys_menu menu_name = #{menuName}, @@ -155,7 +155,7 @@ where menu_id = #{menuId} - + insert into sys_menu( menu_id, parent_id, diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysNoticeMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysNoticeMapper.xml index d73d8f6..cb15200 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysNoticeMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysNoticeMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where notice_id = #{noticeId} - @@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + insert into sys_notice ( notice_title, notice_type, @@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) - + update sys_notice notice_title = #{noticeTitle}, diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysOperLogMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysOperLogMapper.xml index f35b5df..d484bb8 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysOperLogMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysOperLogMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -28,12 +28,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sys_oper_log - + insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_param, json_result, status, error_msg, cost_time, oper_time) values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate()) - diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysPostMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysPostMapper.xml index 93616ff..4146a19 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysPostMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysPostMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sys_post - @@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where post_code=#{postCode} limit 1 - + update sys_post post_code = #{postCode}, @@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where post_id = #{postId} - + insert into sys_post( post_id, post_code, diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysRoleDeptMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysRoleDeptMapper.xml index 2ca1f5a..79ee876 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysRoleDeptMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysRoleDeptMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysRoleMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysRoleMapper.xml index 8ab4b92..4a635d4 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysRoleMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join sys_dept d on u.dept_id = d.dept_id - where r.del_flag = '0' @@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where r.role_key=#{roleKey} and r.del_flag = '0' limit 1 - + insert into sys_role( role_id, role_name, @@ -121,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) - + update sys_role role_name = #{roleName}, diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysRoleMenuMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysRoleMenuMapper.xml index 231dcf5..15fbc96 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysRoleMenuMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysRoleMenuMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysUserMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysUserMapper.xml index a2464c3..07885a4 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysUserMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysUserMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -23,11 +23,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + @@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + @@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join sys_role r on r.role_id = ur.role_id - select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u left join sys_dept d on u.dept_id = d.dept_id where u.del_flag = '0' @@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ${params.dataScope} - select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time from sys_user u left join sys_dept d on u.dept_id = d.dept_id @@ -102,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ${params.dataScope} - select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time from sys_user u left join sys_dept d on u.dept_id = d.dept_id @@ -142,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1 - + insert into sys_user( user_id, dept_id, @@ -174,7 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) - + update sys_user dept_id = #{deptId}, @@ -195,15 +195,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where user_id = #{userId} - + update sys_user set status = #{status} where user_id = #{userId} - + update sys_user set avatar = #{avatar} where user_name = #{userName} - + update sys_user set password = #{password} where user_name = #{userName} diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysUserPostMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysUserPostMapper.xml index ac35414..9cbcd2d 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysUserPostMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysUserPostMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + diff --git a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysUserRoleMapper.xml b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysUserRoleMapper.xml index 5511cdb..9dd1ca9 100644 --- a/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysUserRoleMapper.xml +++ b/muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysUserRoleMapper.xml @@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + delete from sys_user_role where user_id=#{userId} and role_id=#{roleId}