Merge remote-tracking branch 'origin/liyongjie'
# Conflicts: # muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/FaultCodeInfo.java # muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/FaultCodeReq.java # muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/FaultCodesAddReq.java # muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/req/FaultCodesUpdReq.java # muyu-modules/muyu-system/muyu-system-common/src/main/java/com/muyu/system/common/domain/res/FaultCodeResponse.java # muyu-modules/muyu-system/muyu-system-server/src/main/java/com/muyu/system/controller/FaultCodesController.java # muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/FaultCodesMapper.xml # muyu-modules/muyu-system/muyu-system-server/src/main/resources/mapper/system/SysDeptMapper.xmlvehicle-yinyuyang
commit
9b16aa9a1b
|
@ -77,7 +77,22 @@
|
|||
<artifactId>jjwt</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- mybatis - plus 依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.5.3.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.github.jsqlparser</groupId>
|
||||
<artifactId>jsqlparser</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- Apache Lang3 -->
|
||||
<dependency>
|
||||
|
|
|
@ -11,11 +11,6 @@
|
|||
|
||||
<artifactId>muyu-business-common</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>20</maven.compiler.source>
|
||||
<maven.compiler.target>20</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
package com.muyu.business.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.*;
|
||||
import com.muyu.business.domain.*;
|
||||
import com.muyu.business.domain.req.*;
|
||||
import com.muyu.business.domain.res.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 故障码Mapper接口
|
||||
*
|
||||
* @author Li YongJie
|
||||
* @date 2024-03-28
|
||||
*/
|
||||
public interface FaultCodesMapper extends BaseMapper<FaultCodeInfo> {
|
||||
|
||||
/**
|
||||
* 查询故障码列表
|
||||
*
|
||||
* @param faultCodeReq 故障码
|
||||
* @return 故障码集合
|
||||
*/
|
||||
// public List<FaultCodeResponse> selectFaultCodesList(FaultCodeReq faultCodeReq);
|
||||
|
||||
/**
|
||||
* 新增故障码
|
||||
*
|
||||
* @param faultCodes 故障码
|
||||
* @return 结果
|
||||
*/
|
||||
// public int insertFaultCodes(FaultCodeInfo faultCodes);
|
||||
|
||||
/**
|
||||
* 查询故障码
|
||||
*
|
||||
* @param faultId 故障码主键
|
||||
* @return 故障码
|
||||
*/
|
||||
// public FaultCodeInfo selectFaultCodesByFaultId(Long faultId);
|
||||
|
||||
/**
|
||||
* 修改故障码
|
||||
*
|
||||
* @param faultCodes 故障码
|
||||
* @return 结果
|
||||
*/
|
||||
// public int updateFaultCodes(FaultCodeInfo faultCodes);
|
||||
|
||||
/**
|
||||
* 删除故障码
|
||||
*
|
||||
* @param faultId 故障码主键
|
||||
* @return 结果
|
||||
*/
|
||||
// public int deleteFaultCodesByFaultId(Long faultId);
|
||||
|
||||
/**
|
||||
* 批量删除故障码
|
||||
*
|
||||
* @param faultIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
// public int deleteFaultCodesByFaultIds(Long[] faultIds);
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package com.muyu.business.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.*;
|
||||
import com.muyu.business.domain.*;
|
||||
import com.muyu.business.domain.req.*;
|
||||
import com.muyu.business.domain.res.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 故障码Service接口
|
||||
*
|
||||
* @author Li YongJie
|
||||
* @date 2024-03-28
|
||||
*/
|
||||
public interface FaultCodesService extends IService<FaultCodeInfo> {
|
||||
/**
|
||||
* 查询故障码列表
|
||||
*
|
||||
* @param faultCodes 故障码
|
||||
* @return 故障码集合
|
||||
*/
|
||||
public List<FaultCodeInfo> selectFaultCodesList(FaultCodeReq faultCodes);
|
||||
|
||||
/**
|
||||
* 新增故障码
|
||||
*
|
||||
* @param faultCodes 故障码
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFaultCodes(FaultCodeInfo faultCodes);
|
||||
|
||||
/**
|
||||
* 故障码详情
|
||||
*
|
||||
* @param faultId 故障码主键
|
||||
* @return 故障码
|
||||
*/
|
||||
public FaultCodeInfo selectFaultCodesByFaultId(Long faultId);
|
||||
|
||||
/**
|
||||
* 修改故障码
|
||||
*
|
||||
* @param faultCodes 故障码
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFaultCodes(FaultCodeInfo faultCodes);
|
||||
|
||||
/**
|
||||
* 删除故障码信息
|
||||
*
|
||||
* @param faultId 故障码主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFaultCodesByFaultId(Long faultId);
|
||||
|
||||
/**
|
||||
* 批量删除故障码
|
||||
*
|
||||
* @param faultIds 需要删除的故障码主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFaultCodesByFaultIds(Long[] faultIds);
|
||||
|
||||
/**
|
||||
* 修改故障码状态
|
||||
*
|
||||
* @param faultCodeInfo
|
||||
* @return
|
||||
*/
|
||||
int updateFaultCodesStatus(FaultCodeInfo faultCodeInfo);
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
package com.muyu.business.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.*;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.*;
|
||||
import com.muyu.business.domain.*;
|
||||
import com.muyu.business.domain.req.*;
|
||||
import com.muyu.business.domain.res.*;
|
||||
import com.muyu.business.mapper.*;
|
||||
import com.muyu.business.service.*;
|
||||
import com.muyu.common.core.utils.*;
|
||||
import com.muyu.common.security.utils.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import org.springframework.stereotype.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 故障码Service业务层处理
|
||||
*
|
||||
* @author Li YongJie
|
||||
* @date 2024-03-28
|
||||
*/
|
||||
@Service
|
||||
public class FaultCodesServiceImpl extends ServiceImpl<FaultCodesMapper, FaultCodeInfo>
|
||||
implements FaultCodesService {
|
||||
|
||||
/**
|
||||
* 注入故障码Mapper
|
||||
*/
|
||||
@Autowired
|
||||
private FaultCodesMapper faultCodesMapper;
|
||||
|
||||
/**
|
||||
* 查询故障码列表
|
||||
*
|
||||
* @param faultCodeReq 故障码查询对象
|
||||
* @return 故障码
|
||||
*/
|
||||
@Override
|
||||
public List<FaultCodeInfo> selectFaultCodesList(FaultCodeReq faultCodeReq) {
|
||||
LambdaQueryWrapper<FaultCodeInfo> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.like(StringUtils.isNotEmpty(faultCodeReq.getFaultName()),FaultCodeInfo::getFaultName, faultCodeReq.getFaultName());
|
||||
wrapper.eq(StringUtils.isNotNull(faultCodeReq.getFaultCode()),FaultCodeInfo::getFaultCode, faultCodeReq.getFaultCode());
|
||||
wrapper.eq(StringUtils.isNotEmpty(faultCodeReq.getAlarmFlag()),FaultCodeInfo::getAlarmFlag, faultCodeReq.getAlarmFlag());
|
||||
return faultCodesMapper.selectList(wrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增故障码
|
||||
*
|
||||
* @param faultCodes 故障码
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertFaultCodes(FaultCodeInfo faultCodes) {
|
||||
faultCodes.setCreateBy(SecurityUtils.getUsername());
|
||||
faultCodes.setCreateTime(DateUtils.getNowDate());
|
||||
return faultCodesMapper.insert(faultCodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 故障码详情
|
||||
*
|
||||
* @param faultId 故障码主键
|
||||
* @return 故障码
|
||||
*/
|
||||
@Override
|
||||
public FaultCodeInfo selectFaultCodesByFaultId(Long faultId) {
|
||||
return faultCodesMapper.selectById(faultId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改故障码
|
||||
*
|
||||
* @param faultCodes 故障码
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateFaultCodes(FaultCodeInfo faultCodes) {
|
||||
faultCodes.setUpdateBy(SecurityUtils.getUsername());
|
||||
faultCodes.setUpdateTime(DateUtils.getNowDate());
|
||||
return faultCodesMapper.updateById(faultCodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除故障码信息
|
||||
*
|
||||
* @param faultId 故障码主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteFaultCodesByFaultId(Long faultId) {
|
||||
return faultCodesMapper.deleteById(faultId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除故障码
|
||||
*
|
||||
* @param faultIds 需要删除的故障码主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteFaultCodesByFaultIds(Long[] faultIds) {
|
||||
return faultCodesMapper.deleteBatchIds(Arrays.asList(faultIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改故障码状态
|
||||
*
|
||||
* @param faultCodeInfo 故障码
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int updateFaultCodesStatus(FaultCodeInfo faultCodeInfo) {
|
||||
faultCodeInfo.setUpdateBy(SecurityUtils.getUsername());
|
||||
faultCodeInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return faultCodesMapper.updateById(faultCodeInfo);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
-- 故障码管理
|
||||
-- 故障码信息表
|
||||
drop table if exists fault_code_info;
|
||||
create table fault_code_info(
|
||||
fault_id int(11) comment '故障码主键' primary key auto_increment,
|
||||
fault_name varchar(32) comment '故障名称',
|
||||
fault_code varchar(32) comment '故障码',
|
||||
fault_type tinyint(4) comment '故障类型:1-通讯丢失故障 2-车身故障 3-底盘故障 4-电子围栏故障 5-其他故障',
|
||||
fault_level tinyint(4) comment '故障等级:1-高级故障 2-中级故障 3-低级故障',
|
||||
alarm_flag char(1) default 'Y' comment '是否产生报警(Y正常 N报警)',
|
||||
fault_desc varchar(100) comment '故障描述',
|
||||
fault_location tinyint(4) comment '故障位置',
|
||||
fault_value bigint(20) comment '故障值',
|
||||
status char(1) default '0' comment '故障码状态(0正常 1停用)',
|
||||
del_flag char(1) default '0' comment '删除标志(0存在 2删除)',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
remark varchar(200) comment '备注'
|
||||
) engine=innodb comment = '故障码表';
|
||||
insert into fault_code_info(fault_name, fault_code, fault_type, fault_level, alarm_flag, fault_desc, fault_location, fault_value, status, del_flag, create_by, create_time, remark) values ('通讯丢失故障', '0001', 1, 1, '0', '通讯丢失故障', '车辆', 0, '0', '0', 'admin', now(), '通讯丢失故障');
|
||||
insert into fault_code_info(fault_name, fault_code, fault_type, fault_level, alarm_flag, fault_desc, fault_location, fault_value, status, del_flag, create_by, create_time, remark) values ('车身故障', '0002', 2, 1, '0', '车身故障', '车辆', 0, '0', '0', 'admin', now(), '车身故障');
|
||||
insert into fault_code_info(fault_name, fault_code, fault_type, fault_level, alarm_flag, fault_desc, fault_location, fault_value, status, del_flag, create_by, create_time, remark) values ('底盘故障', '0003', 3, 1, '0', '底盘故障', '车辆', 0, '0', '0', 'admin', now(),'底盘故障');
|
||||
insert into fault_code_info(fault_name, fault_code, fault_type, fault_level, alarm_flag, fault_desc, fault_location, fault_value, status, del_flag, create_by, create_time, remark) values ('电子围栏故障', '0004', 4, 1, '0', '电子围栏故障', '车辆', 0, '0', '0', 'admin', now(),'电子围栏故障');
|
||||
insert into fault_code_info(fault_name, fault_code, fault_type, fault_level, alarm_flag, fault_desc, fault_location, fault_value, status, del_flag, create_by, create_time, remark) values ('其他故障', '0005', 5, 1, '0', '其他故障', '车辆', 0, '0', '0', 'admin', now(), '其他故障');
|
||||
select fault_id,fault_name, fault_code, fault_type, fault_level, alarm_flag, fault_desc, fault_location, fault_value, status, del_flag from fault_code_info;
|
||||
|
||||
|
||||
-- 故障记录
|
||||
drop table if exists fault_logs;
|
||||
create table fault_logs (
|
||||
log_id int(11) comment '故障码主键' primary key auto_increment,
|
||||
car_vin varchar(100) comment '车辆VIN',
|
||||
car_id bigint(40) comment '车辆编号',
|
||||
fault_name varchar(32) comment '故障名称',
|
||||
fault_code varchar(32) comment '故障码',
|
||||
alarm_flag char(1) default 'Y' comment '是否产生报警(Y正常 N报警)',
|
||||
start_alarm_time datetime comment '开始报警时间',
|
||||
end_alarm_time datetime comment '最近报警时间',
|
||||
processing_time datetime comment '处理时间',
|
||||
processing_by varchar(32) comment '处理人',
|
||||
processing_status char(1) comment ''
|
||||
)engine=innodb comment = '故障记录表';
|
|
@ -4,7 +4,7 @@
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.gen.mapper.GenTableColumnMapper">
|
||||
|
||||
<resultMap type="GenTableColumn" id="GenTableColumnResult">
|
||||
<resultMap type="com.muyu.gen.domain.GenTableColumn" id="GenTableColumnResult">
|
||||
<id property="columnId" column="column_id" />
|
||||
<result property="tableId" column="table_id" />
|
||||
<result property="columnName" column="column_name" />
|
||||
|
@ -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
|
||||
</sql>
|
||||
|
||||
<select id="selectGenTableColumnListByTableId" parameterType="GenTableColumn" resultMap="GenTableColumnResult">
|
||||
<select id="selectGenTableColumnListByTableId" parameterType="com.muyu.gen.domain.GenTableColumn" resultMap="GenTableColumnResult">
|
||||
<include refid="selectGenTableColumnVo"/>
|
||||
where table_id = #{tableId}
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
|||
order by ordinal_position
|
||||
</select>
|
||||
|
||||
<insert id="insertGenTableColumn" parameterType="GenTableColumn" useGeneratedKeys="true" keyProperty="columnId">
|
||||
<insert id="insertGenTableColumn" parameterType="com.muyu.gen.domain.GenTableColumn" useGeneratedKeys="true" keyProperty="columnId">
|
||||
insert into gen_table_column (
|
||||
<if test="tableId != null and tableId != ''">table_id,</if>
|
||||
<if test="columnName != null and columnName != ''">column_name,</if>
|
||||
|
@ -104,7 +104,7 @@
|
|||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateGenTableColumn" parameterType="GenTableColumn">
|
||||
<update id="updateGenTableColumn" parameterType="com.muyu.gen.domain.GenTableColumn">
|
||||
update gen_table_column
|
||||
<set>
|
||||
<if test="columnComment != null">column_comment = #{columnComment},</if>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.gen.mapper.GenTableMapper">
|
||||
|
||||
<resultMap type="GenTable" id="GenTableResult">
|
||||
<resultMap type="com.muyu.gen.domain.GenTable" id="GenTableResult">
|
||||
<id property="tableId" column="table_id" />
|
||||
<result property="tableName" column="table_name" />
|
||||
<result property="databaseName" column="database_name" />
|
||||
|
@ -30,7 +30,7 @@
|
|||
<collection property="columns" javaType="java.util.List" resultMap="GenTableColumnResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="GenTableColumn" id="GenTableColumnResult">
|
||||
<resultMap type="com.muyu.gen.domain.GenTableColumn" id="GenTableColumnResult">
|
||||
<id property="columnId" column="column_id" />
|
||||
<result property="tableId" column="table_id" />
|
||||
<result property="columnName" column="column_name" />
|
||||
|
@ -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
|
||||
</sql>
|
||||
|
||||
<select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult">
|
||||
<select id="selectGenTableList" parameterType="com.muyu.gen.domain.GenTable" resultMap="GenTableResult">
|
||||
<include refid="selectGenTableVo"/>
|
||||
<where>
|
||||
<if test="tableName != null and tableName != ''">
|
||||
|
@ -77,7 +77,7 @@
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult">
|
||||
<select id="selectDbTableList" parameterType="com.muyu.gen.domain.GenTable" resultMap="GenTableResult">
|
||||
select table_schema as database_name,table_name, table_comment, create_time, update_time from information_schema.tables
|
||||
where
|
||||
<choose>
|
||||
|
@ -162,7 +162,7 @@
|
|||
where table_schema not in ('information_schema','mysql','performance_schema','sys')
|
||||
</select>
|
||||
|
||||
<insert id="insertGenTable" parameterType="GenTable" useGeneratedKeys="true" keyProperty="tableId">
|
||||
<insert id="insertGenTable" parameterType="com.muyu.gen.domain.GenTable" useGeneratedKeys="true" keyProperty="tableId">
|
||||
insert into gen_table (
|
||||
<if test="databaseName != null">database_name,</if>
|
||||
<if test="tableName != null">table_name,</if>
|
||||
|
@ -200,7 +200,7 @@
|
|||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateGenTable" parameterType="GenTable">
|
||||
<update id="updateGenTable" parameterType="com.muyu.gen.domain.GenTable">
|
||||
update gen_table
|
||||
<set>
|
||||
<if test="tableName != null">table_name = #{tableName},</if>
|
||||
|
|
|
@ -170,7 +170,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
@ -447,9 +447,9 @@ export default {
|
|||
}
|
||||
#end
|
||||
#end
|
||||
list${BusinessName}(this.queryParams).then(response => {
|
||||
this.${businessName}List = response.rows;
|
||||
this.total = response.total;
|
||||
list${BusinessName}(this.queryParams).then(res => {
|
||||
this.${businessName}List = res.data.rows;
|
||||
this.total = res.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.job.mapper.SysJobLogMapper">
|
||||
|
||||
<resultMap type="SysJobLog" id="SysJobLogResult">
|
||||
<resultMap type="com.muyu.job.domain.SysJobLog" id="SysJobLogResult">
|
||||
<id property="jobLogId" column="job_log_id" />
|
||||
<result property="jobName" column="job_name" />
|
||||
<result property="jobGroup" column="job_group" />
|
||||
|
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sys_job_log
|
||||
</sql>
|
||||
|
||||
<select id="selectJobLogList" parameterType="SysJobLog" resultMap="SysJobLogResult">
|
||||
<select id="selectJobLogList" parameterType="com.muyu.job.domain.SysJobLog" resultMap="SysJobLogResult">
|
||||
<include refid="selectJobLogVo"/>
|
||||
<where>
|
||||
<if test="jobName != null and jobName != ''">
|
||||
|
@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
truncate table sys_job_log
|
||||
</update>
|
||||
|
||||
<insert id="insertJobLog" parameterType="SysJobLog">
|
||||
<insert id="insertJobLog" parameterType="com.muyu.job.domain.SysJobLog">
|
||||
insert into sys_job_log(
|
||||
<if test="jobLogId != null and jobLogId != 0">job_log_id,</if>
|
||||
<if test="jobName != null and jobName != ''">job_name,</if>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.job.mapper.SysJobMapper">
|
||||
|
||||
<resultMap type="SysJob" id="SysJobResult">
|
||||
<resultMap type="com.muyu.job.domain.SysJob" id="SysJobResult">
|
||||
<id property="jobId" column="job_id" />
|
||||
<result property="jobName" column="job_name" />
|
||||
<result property="jobGroup" column="job_group" />
|
||||
|
@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sys_job
|
||||
</sql>
|
||||
|
||||
<select id="selectJobList" parameterType="SysJob" resultMap="SysJobResult">
|
||||
<select id="selectJobList" parameterType="com.muyu.job.domain.SysJob" resultMap="SysJobResult">
|
||||
<include refid="selectJobVo"/>
|
||||
<where>
|
||||
<if test="jobName != null and jobName != ''">
|
||||
|
@ -63,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateJob" parameterType="SysJob">
|
||||
<update id="updateJob" parameterType="com.muyu.job.domain.SysJob">
|
||||
update sys_job
|
||||
<set>
|
||||
<if test="jobName != null and jobName != ''">job_name = #{jobName},</if>
|
||||
|
@ -80,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where job_id = #{jobId}
|
||||
</update>
|
||||
|
||||
<insert id="insertJob" parameterType="SysJob" useGeneratedKeys="true" keyProperty="jobId">
|
||||
<insert id="insertJob" parameterType="com.muyu.job.domain.SysJob" useGeneratedKeys="true" keyProperty="jobId">
|
||||
insert into sys_job(
|
||||
<if test="jobId != null and jobId != 0">job_id,</if>
|
||||
<if test="jobName != null and jobName != ''">job_name,</if>
|
||||
|
|
|
@ -0,0 +1,119 @@
|
|||
package com.muyu.business.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import com.muyu.business.domain.req.*;
|
||||
import lombok.*;
|
||||
import lombok.experimental.*;
|
||||
import org.springframework.format.annotation.*;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 故障码对象 fault_codes
|
||||
*
|
||||
* @author Li YongJie
|
||||
* @date 2024-03-28
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("fault_code_info")
|
||||
public class FaultCodeInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 故障码主键 */
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long faultId;
|
||||
|
||||
/** 故障名称 */
|
||||
private String faultName;
|
||||
|
||||
/** 故障码 */
|
||||
private String faultCode;
|
||||
|
||||
/** 故障类型:1-通讯丢失故障 2-车身故障 3-底盘故障 4-电子围栏故障 5-其他故障 */
|
||||
private Integer faultType;
|
||||
|
||||
/** 故障等级:1-高级故障 2-中级故障 3-低级故障 */
|
||||
private Integer faultLevel;
|
||||
|
||||
/** 是否产生报警(Y正常 N报警) */
|
||||
private String alarmFlag;
|
||||
|
||||
/** 故障描述 */
|
||||
private String faultDesc;
|
||||
|
||||
/** 故障位 */
|
||||
private Integer faultLocation;
|
||||
|
||||
/** 故障值 */
|
||||
private Long faultValue;
|
||||
|
||||
/** 故障码状态(0正常 1停用) */
|
||||
private String status;
|
||||
|
||||
/** 删除标志(0存在 2删除) */
|
||||
private String delFlag;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
public static FaultCodeInfo addFaultCodesReq(FaultCodesAddReq faultCodes) {
|
||||
return FaultCodeInfo.builder()
|
||||
.faultName(faultCodes.getFaultName())
|
||||
.faultCode(faultCodes.getFaultCode())
|
||||
.faultType(faultCodes.getFaultType())
|
||||
.faultLevel(faultCodes.getFaultLevel())
|
||||
.alarmFlag(faultCodes.getAlarmFlag())
|
||||
.faultDesc(faultCodes.getFaultDesc())
|
||||
.faultLocation(faultCodes.getFaultLocation())
|
||||
.faultValue(faultCodes.getFaultValue())
|
||||
.status(faultCodes.getStatus())
|
||||
.delFlag(faultCodes.getDelFlag())
|
||||
.createBy(faultCodes.getCreateBy())
|
||||
.createTime(faultCodes.getCreateTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static FaultCodeInfo updFaultCodesReq(FaultCodesUpdReq faultCodes) {
|
||||
return FaultCodeInfo.builder()
|
||||
.faultId(faultCodes.getFaultId())
|
||||
.faultName(faultCodes.getFaultName())
|
||||
.faultCode(faultCodes.getFaultCode())
|
||||
.faultType(faultCodes.getFaultType())
|
||||
.faultLevel(faultCodes.getFaultLevel())
|
||||
.alarmFlag(faultCodes.getAlarmFlag())
|
||||
.faultDesc(faultCodes.getFaultDesc())
|
||||
.faultLocation(faultCodes.getFaultLocation())
|
||||
.faultValue(faultCodes.getFaultValue())
|
||||
.status(faultCodes.getStatus())
|
||||
.delFlag(faultCodes.getDelFlag())
|
||||
.updateBy(faultCodes.getUpdateBy())
|
||||
.updateTime(faultCodes.getUpdateTime())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package com.muyu.business.domain.req;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.*;
|
||||
import com.baomidou.mybatisplus.core.conditions.segments.*;
|
||||
import com.muyu.business.domain.*;
|
||||
import lombok.*;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* 查询故障码对象
|
||||
* @Author LiYonJie
|
||||
* @Date 2024/3/28
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class FaultCodeReq implements Serializable {
|
||||
/** 故障名称 */
|
||||
private String faultName;
|
||||
|
||||
/** 故障码 */
|
||||
private String faultCode;
|
||||
|
||||
/** 是否产生报警(Y正常 N报警) */
|
||||
private String alarmFlag;
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
package com.muyu.business.domain.req;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import lombok.*;
|
||||
import org.springframework.format.annotation.*;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 新增故障码对象
|
||||
* @author LiYonJie
|
||||
* @date 2024/3/28
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class FaultCodesAddReq implements Serializable {
|
||||
/** 故障名称 */
|
||||
@NotBlank(message = "故障名称不能为空")
|
||||
private String faultName;
|
||||
|
||||
/** 故障码 */
|
||||
@NotBlank(message = "故障码不能为空")
|
||||
private String faultCode;
|
||||
|
||||
/** 故障类型:1-通讯丢失故障 2-车身故障 3-底盘故障 4-电子围栏故障 5-其他故障 */
|
||||
@NotNull(message = "故障类型不能为空")
|
||||
private Integer faultType;
|
||||
|
||||
/** 故障等级:1-高级故障 2-中级故障 3-低级故障 */
|
||||
@NotNull(message = "故障等级不能为空")
|
||||
private Integer faultLevel;
|
||||
|
||||
/** 是否产生报警(Y正常 N报警) */
|
||||
private String alarmFlag;
|
||||
|
||||
/** 故障描述 */
|
||||
@NotBlank(message = "故障描述不能为空")
|
||||
private String faultDesc;
|
||||
|
||||
/** 故障位 */
|
||||
@NotNull(message = "故障位不能为空")
|
||||
private Integer faultLocation;
|
||||
|
||||
/** 故障值 */
|
||||
@NotNull(message = "故障值不能为空")
|
||||
private Long faultValue;
|
||||
|
||||
/** 故障码状态(0正常 1停用) */
|
||||
private String status;
|
||||
|
||||
/** 删除标志(0存在 2删除) */
|
||||
private String delFlag;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
/*
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package com.muyu.business.domain.req;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import lombok.*;
|
||||
import org.springframework.format.annotation.*;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 编辑故障码对象
|
||||
* @author LiYonJie
|
||||
* @date 2024/3/28
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class FaultCodesUpdReq implements Serializable {
|
||||
/** 故障码主键 */
|
||||
private Long faultId;
|
||||
|
||||
/** 故障名称 */
|
||||
@NotBlank(message = "故障名称不能为空")
|
||||
private String faultName;
|
||||
|
||||
/** 故障码 */
|
||||
@NotBlank(message = "故障码不能为空")
|
||||
private String faultCode;
|
||||
|
||||
/** 故障类型:1-通讯丢失故障 2-车身故障 3-底盘故障 4-电子围栏故障 5-其他故障 */
|
||||
@NotNull(message = "故障类型不能为空")
|
||||
private Integer faultType;
|
||||
|
||||
/** 故障等级:1-高级故障 2-中级故障 3-低级故障 */
|
||||
@NotNull(message = "故障等级不能为空")
|
||||
private Integer faultLevel;
|
||||
|
||||
/** 是否产生报警(Y正常 N报警) */
|
||||
private String alarmFlag;
|
||||
|
||||
/** 故障描述 */
|
||||
@NotBlank(message = "故障描述不能为空")
|
||||
private String faultDesc;
|
||||
|
||||
/** 故障位 */
|
||||
@NotNull(message = "故障位不能为空")
|
||||
private Integer faultLocation;
|
||||
|
||||
/** 故障值 */
|
||||
@NotNull(message = "故障值不能为空")
|
||||
private Long faultValue;
|
||||
|
||||
/** 故障码状态(0正常 1停用) */
|
||||
private String status;
|
||||
|
||||
/** 删除标志(0存在 2删除) */
|
||||
private String delFlag;
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package com.muyu.business.domain.res;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.muyu.business.domain.*;
|
||||
import lombok.*;
|
||||
import lombok.experimental.*;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* 故障码响应类
|
||||
*
|
||||
* @Author LiYonJie
|
||||
* @Date 2024/3/29
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class FaultCodeResponse implements Serializable {
|
||||
/** 故障码主键 */
|
||||
private Long faultId;
|
||||
|
||||
/** 故障名称 */
|
||||
private String faultName;
|
||||
|
||||
/** 故障码 */
|
||||
private String faultCode;
|
||||
|
||||
/** 故障类型:1-通讯丢失故障 2-车身故障 3-底盘故障 4-电子围栏故障 5-其他故障 */
|
||||
private Integer faultType;
|
||||
|
||||
/** 故障等级:1-高级故障 2-中级故障 3-低级故障 */
|
||||
private Integer faultLevel;
|
||||
|
||||
/** 是否产生报警(0正常 1报警) */
|
||||
private String alarmFlag;
|
||||
|
||||
/** 故障描述 */
|
||||
private String faultDesc;
|
||||
|
||||
/** 故障位 */
|
||||
private Integer faultLocation;
|
||||
|
||||
/** 故障值 */
|
||||
private Long faultValue;
|
||||
|
||||
/** 故障码状态(0正常 1停用) */
|
||||
private String status;
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
package com.muyu.business.controller;
|
||||
|
||||
import com.muyu.business.domain.*;
|
||||
import com.muyu.business.domain.req.*;
|
||||
import com.muyu.business.domain.res.*;
|
||||
import com.muyu.business.service.*;
|
||||
import com.muyu.common.core.domain.*;
|
||||
import com.muyu.common.core.web.controller.*;
|
||||
import com.muyu.common.core.web.page.*;
|
||||
import com.muyu.common.log.annotation.*;
|
||||
import com.muyu.common.log.enums.*;
|
||||
import com.muyu.common.security.annotation.*;
|
||||
import org.springframework.beans.factory.annotation.*;
|
||||
import org.springframework.validation.annotation.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 故障码Controller
|
||||
*
|
||||
* @author Li YongJie
|
||||
* @date 2024-03-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/faultCodes")
|
||||
public class FaultCodesController extends BaseController {
|
||||
|
||||
/**
|
||||
* 注入故障码Service
|
||||
*/
|
||||
@Autowired
|
||||
private FaultCodesService faultCodesService;
|
||||
|
||||
/**
|
||||
* 查询故障码列表
|
||||
*/
|
||||
@RequiresPermissions("business:faultCodes:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo> list(FaultCodeReq faultCodes) {
|
||||
startPage();
|
||||
List<FaultCodeInfo> list = faultCodesService.selectFaultCodesList(faultCodes);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增故障码
|
||||
*/
|
||||
@RequiresPermissions("business:faultCodes:add")
|
||||
@Log(title = "故障码", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public Result add(@RequestBody @Validated FaultCodesAddReq faultCodesAddReq) {
|
||||
return toAjax(faultCodesService.insertFaultCodes(FaultCodeInfo.addFaultCodesReq(faultCodesAddReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取故障码详细信息
|
||||
*/
|
||||
@RequiresPermissions("business:faultCodes:query")
|
||||
@GetMapping(value = "/{faultId}")
|
||||
public Result getInfo(@PathVariable("faultId") Long faultId) {
|
||||
return success(faultCodesService.selectFaultCodesByFaultId(faultId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改故障码
|
||||
*/
|
||||
@RequiresPermissions("business:faultCodes:edit")
|
||||
@Log(title = "故障码", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody @Validated FaultCodesUpdReq faultCodesUpdReq) {
|
||||
return toAjax(faultCodesService.updateFaultCodesStatus(FaultCodeInfo.updFaultCodesReq(faultCodesUpdReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改故障码状态
|
||||
*/
|
||||
@RequiresPermissions("business:faultCodes:edit")
|
||||
@Log(title = "故障码", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeStatus")
|
||||
public Result changeStatus(@RequestBody FaultCodesUpdReq faultCodesUpdReq) {
|
||||
return toAjax(faultCodesService.updateFaultCodes(FaultCodeInfo.updFaultCodesReq(faultCodesUpdReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除故障码
|
||||
*/
|
||||
@RequiresPermissions("business:faultCodes:remove")
|
||||
@Log(title = "故障码", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{faultIds}")
|
||||
public Result remove(@PathVariable Long[] faultIds) {
|
||||
return toAjax(faultCodesService.deleteFaultCodesByFaultIds(faultIds));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
<?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">
|
||||
<!-- mybatis数据层 namespace命名空间-->
|
||||
<mapper namespace="com.muyu.business.mapper.FaultCodesMapper">
|
||||
<!-- <resultMap type="com.muyu.business.domain.FaultCodeInfo" id="FaultCodeInfoResult">-->
|
||||
<!-- <result property="faultId" column="fault_id" />-->
|
||||
<!-- <result property="faultName" column="fault_name" />-->
|
||||
<!-- <result property="faultCode" column="fault_code" />-->
|
||||
<!-- <result property="faultType" column="fault_type" />-->
|
||||
<!-- <result property="faultLevel" column="fault_level" />-->
|
||||
<!-- <result property="alarmFlag" column="alarm_flag" />-->
|
||||
<!-- <result property="faultDesc" column="fault_desc" />-->
|
||||
<!-- <result property="faultLocation" column="fault_location" />-->
|
||||
<!-- <result property="faultValue" column="fault_value" />-->
|
||||
<!-- <result property="status" column="status" />-->
|
||||
<!-- <result property="delFlag" column="del_flag" />-->
|
||||
<!-- <result property="createBy" column="create_by" />-->
|
||||
<!-- <result property="createTime" column="create_time" />-->
|
||||
<!-- <result property="updateBy" column="update_by" />-->
|
||||
<!-- <result property="updateTime" column="update_time" />-->
|
||||
<!-- <result property="remark" column="remark" />-->
|
||||
<!-- </resultMap>-->
|
||||
|
||||
<!-- <sql id="selectFaultCodeInfoVo">-->
|
||||
<!-- select fault_id, fault_name, fault_code, fault_type, fault_level, alarm_flag, fault_desc, fault_location, fault_value, status, del_flag, create_by, create_time, update_by, update_time, remark from fault_code_info-->
|
||||
<!-- </sql>-->
|
||||
|
||||
<!-- <select id="selectFaultCodesList" parameterType="com.muyu.business.domain.FaultCodeInfo" resultMap="FaultCodeInfoResult">-->
|
||||
<!-- <include refid="selectFaultCodeInfoVo"/>-->
|
||||
<!-- <where>-->
|
||||
<!-- <if test="faultName != null and faultName != ''"> and fault_name like concat('%', #{faultName}, '%')</if>-->
|
||||
<!-- <if test="faultCode != null"> and fault_code = #{faultCode}</if>-->
|
||||
<!-- <if test="alarmFlag != null"> and alarm_flag = #{alarmFlag}</if>-->
|
||||
<!-- </where>-->
|
||||
<!-- </select>-->
|
||||
</mapper>
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysConfigMapper">
|
||||
|
||||
<resultMap type="SysConfig" id="SysConfigResult">
|
||||
<resultMap type="com.muyu.system.common.domain.SysConfig" id="SysConfigResult">
|
||||
<id property="configId" column="config_id" />
|
||||
<result property="configName" column="config_name" />
|
||||
<result property="configKey" column="config_key" />
|
||||
|
@ -33,12 +33,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="selectConfig" parameterType="SysConfig" resultMap="SysConfigResult">
|
||||
<select id="selectConfig" parameterType="com.muyu.system.common.domain.SysConfig" resultMap="SysConfigResult">
|
||||
<include refid="selectConfigVo"/>
|
||||
<include refid="sqlwhereSearch"/>
|
||||
</select>
|
||||
|
||||
<select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult">
|
||||
<select id="selectConfigList" parameterType="com.muyu.system.common.domain.SysConfig" resultMap="SysConfigResult">
|
||||
<include refid="selectConfigVo"/>
|
||||
<where>
|
||||
<if test="configName != null and configName != ''">
|
||||
|
@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where config_key = #{configKey} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertConfig" parameterType="SysConfig">
|
||||
<insert id="insertConfig" parameterType="com.muyu.system.common.domain.SysConfig">
|
||||
insert into sys_config (
|
||||
<if test="configName != null and configName != '' ">config_name,</if>
|
||||
<if test="configKey != null and configKey != '' ">config_key,</if>
|
||||
|
@ -89,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateConfig" parameterType="SysConfig">
|
||||
<update id="updateConfig" parameterType="com.muyu.system.common.domain.SysConfig">
|
||||
update sys_config
|
||||
<set>
|
||||
<if test="configName != null and configName != ''">config_name = #{configName},</if>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysDictDataMapper">
|
||||
|
||||
<resultMap type="SysDictData" id="SysDictDataResult">
|
||||
<resultMap type="com.muyu.system.common.domain.SysDictData" id="SysDictDataResult">
|
||||
<id property="dictCode" column="dict_code" />
|
||||
<result property="dictSort" column="dict_sort" />
|
||||
<result property="dictLabel" column="dict_label" />
|
||||
|
@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sys_dict_data
|
||||
</sql>
|
||||
|
||||
<select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult">
|
||||
<select id="selectDictDataList" parameterType="com.muyu.system.common.domain.SysDictData" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
<where>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
|
@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by dict_sort asc
|
||||
</select>
|
||||
|
||||
<select id="selectDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult">
|
||||
<select id="selectDictDataByType" parameterType="com.muyu.system.common.domain.SysDictData" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
where status = '0' and dict_type = #{dictType} order by dict_sort asc
|
||||
</select>
|
||||
|
@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateDictData" parameterType="SysDictData">
|
||||
<update id="updateDictData" parameterType="com.muyu.system.common.domain.SysDictData">
|
||||
update sys_dict_data
|
||||
<set>
|
||||
<if test="dictSort != null">dict_sort = #{dictSort},</if>
|
||||
|
@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
||||
</update>
|
||||
|
||||
<insert id="insertDictData" parameterType="SysDictData">
|
||||
<insert id="insertDictData" parameterType="com.muyu.system.common.domain.SysDictData">
|
||||
insert into sys_dict_data(
|
||||
<if test="dictSort != null">dict_sort,</if>
|
||||
<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysDictTypeMapper">
|
||||
|
||||
<resultMap type="SysDictType" id="SysDictTypeResult">
|
||||
<resultMap type="com.muyu.system.common.domain.SysDictType" id="SysDictTypeResult">
|
||||
<id property="dictId" column="dict_id" />
|
||||
<result property="dictName" column="dict_name" />
|
||||
<result property="dictType" column="dict_type" />
|
||||
|
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sys_dict_type
|
||||
</sql>
|
||||
|
||||
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
|
||||
<select id="selectDictTypeList" parameterType="com.muyu.system.common.domain.SysDictType" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
<where>
|
||||
<if test="dictName != null and dictName != ''">
|
||||
|
@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateDictType" parameterType="SysDictType">
|
||||
<update id="updateDictType" parameterType="com.muyu.system.common.domain.SysDictType">
|
||||
update sys_dict_type
|
||||
<set>
|
||||
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
|
||||
|
@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where dict_id = #{dictId}
|
||||
</update>
|
||||
|
||||
<insert id="insertDictType" parameterType="SysDictType">
|
||||
<insert id="insertDictType" parameterType="com.muyu.system.common.domain.SysDictType">
|
||||
insert into sys_dict_type(
|
||||
<if test="dictName != null and dictName != ''">dict_name,</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysLogininforMapper">
|
||||
|
||||
<resultMap type="SysLogininfor" id="SysLogininforResult">
|
||||
<resultMap type="com.muyu.system.common.domain.SysLogininfor" id="SysLogininforResult">
|
||||
<id property="infoId" column="info_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="status" column="status" />
|
||||
|
@ -13,12 +13,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="accessTime" column="access_time" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertLogininfor" parameterType="SysLogininfor">
|
||||
<insert id="insertLogininfor" parameterType="com.muyu.system.common.domain.SysLogininfor">
|
||||
insert into sys_logininfor (user_name, status, ipaddr, msg, access_time)
|
||||
values (#{userName}, #{status}, #{ipaddr}, #{msg}, sysdate())
|
||||
</insert>
|
||||
|
||||
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
|
||||
<select id="selectLogininforList" parameterType="com.muyu.system.common.domain.SysLogininfor" resultMap="SysLogininforResult">
|
||||
select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor
|
||||
<where>
|
||||
<if test="ipaddr != null and ipaddr != ''">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysMenuMapper">
|
||||
|
||||
<resultMap type="SysMenu" id="SysMenuResult">
|
||||
<resultMap type="com.muyu.system.common.domain.SysMenu" id="SysMenuResult">
|
||||
<id property="menuId" column="menu_id" />
|
||||
<result property="menuName" column="menu_name" />
|
||||
<result property="parentName" column="parent_name" />
|
||||
|
@ -32,7 +32,7 @@
|
|||
from sys_menu
|
||||
</sql>
|
||||
|
||||
<select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
<select id="selectMenuList" parameterType="com.muyu.system.common.domain.SysMenu" resultMap="SysMenuResult">
|
||||
<include refid="selectMenuVo"/>
|
||||
<where>
|
||||
<if test="menuName != null and menuName != ''">
|
||||
|
@ -54,7 +54,7 @@
|
|||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
<select id="selectMenuListByUserId" parameterType="com.muyu.system.common.domain.SysMenu" resultMap="SysMenuResult">
|
||||
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}
|
||||
</select>
|
||||
|
||||
<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
<select id="checkMenuNameUnique" parameterType="com.muyu.system.common.domain.SysMenu" resultMap="SysMenuResult">
|
||||
<include refid="selectMenuVo"/>
|
||||
where menu_name=#{menuName} and parent_id = #{parentId} limit 1
|
||||
</select>
|
||||
|
||||
<update id="updateMenu" parameterType="SysMenu">
|
||||
<update id="updateMenu" parameterType="com.muyu.system.common.domain.SysMenu">
|
||||
update sys_menu
|
||||
<set>
|
||||
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
|
||||
|
@ -155,7 +155,7 @@
|
|||
where menu_id = #{menuId}
|
||||
</update>
|
||||
|
||||
<insert id="insertMenu" parameterType="SysMenu">
|
||||
<insert id="insertMenu" parameterType="com.muyu.system.common.domain.SysMenu">
|
||||
insert into sys_menu(
|
||||
<if test="menuId != null and menuId != 0">menu_id,</if>
|
||||
<if test="parentId != null and parentId != 0">parent_id,</if>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysNoticeMapper">
|
||||
|
||||
<resultMap type="SysNotice" id="SysNoticeResult">
|
||||
<resultMap type="com.muyu.system.common.domain.SysNotice" id="SysNoticeResult">
|
||||
<result property="noticeId" column="notice_id" />
|
||||
<result property="noticeTitle" column="notice_title" />
|
||||
<result property="noticeType" column="notice_type" />
|
||||
|
@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where notice_id = #{noticeId}
|
||||
</select>
|
||||
|
||||
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
|
||||
<select id="selectNoticeList" parameterType="com.muyu.system.common.domain.SysNotice" resultMap="SysNoticeResult">
|
||||
<include refid="selectNoticeVo"/>
|
||||
<where>
|
||||
<if test="noticeTitle != null and noticeTitle != ''">
|
||||
|
@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertNotice" parameterType="SysNotice">
|
||||
<insert id="insertNotice" parameterType="com.muyu.system.common.domain.SysNotice">
|
||||
insert into sys_notice (
|
||||
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
|
||||
<if test="noticeType != null and noticeType != '' ">notice_type, </if>
|
||||
|
@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateNotice" parameterType="SysNotice">
|
||||
<update id="updateNotice" parameterType="com.muyu.system.common.domain.SysNotice">
|
||||
update sys_notice
|
||||
<set>
|
||||
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysOperLogMapper">
|
||||
|
||||
<resultMap type="SysOperLog" id="SysOperLogResult">
|
||||
<resultMap type="com.muyu.system.common.domain.SysOperLog" id="SysOperLogResult">
|
||||
<id property="operId" column="oper_id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="businessType" column="business_type" />
|
||||
|
@ -28,12 +28,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sys_oper_log
|
||||
</sql>
|
||||
|
||||
<insert id="insertOperlog" parameterType="SysOperLog">
|
||||
<insert id="insertOperlog" parameterType="com.muyu.system.common.domain.SysOperLog">
|
||||
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())
|
||||
</insert>
|
||||
|
||||
<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
|
||||
<select id="selectOperLogList" parameterType="com.muyu.system.common.domain.SysOperLog" resultMap="SysOperLogResult">
|
||||
<include refid="selectOperLogVo"/>
|
||||
<where>
|
||||
<if test="operIp != null and operIp != ''">
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysPostMapper">
|
||||
|
||||
<resultMap type="SysPost" id="SysPostResult">
|
||||
<resultMap type="com.muyu.system.common.domain.SysPost" id="SysPostResult">
|
||||
<id property="postId" column="post_id" />
|
||||
<result property="postCode" column="post_code" />
|
||||
<result property="postName" column="post_name" />
|
||||
|
@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sys_post
|
||||
</sql>
|
||||
|
||||
<select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
|
||||
<select id="selectPostList" parameterType="com.muyu.system.common.domain.SysPost" resultMap="SysPostResult">
|
||||
<include refid="selectPostVo"/>
|
||||
<where>
|
||||
<if test="postCode != null and postCode != ''">
|
||||
|
@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where post_code=#{postCode} limit 1
|
||||
</select>
|
||||
|
||||
<update id="updatePost" parameterType="SysPost">
|
||||
<update id="updatePost" parameterType="com.muyu.system.common.domain.SysPost">
|
||||
update sys_post
|
||||
<set>
|
||||
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
|
||||
|
@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where post_id = #{postId}
|
||||
</update>
|
||||
|
||||
<insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
|
||||
<insert id="insertPost" parameterType="com.muyu.system.common.domain.SysPost" useGeneratedKeys="true" keyProperty="postId">
|
||||
insert into sys_post(
|
||||
<if test="postId != null and postId != 0">post_id,</if>
|
||||
<if test="postCode != null and postCode != ''">post_code,</if>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysRoleDeptMapper">
|
||||
|
||||
<resultMap type="SysRoleDept" id="SysRoleDeptResult">
|
||||
<resultMap type="com.muyu.system.common.domain.SysRoleDept" id="SysRoleDeptResult">
|
||||
<result property="roleId" column="role_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
</resultMap>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysRoleMapper">
|
||||
|
||||
<resultMap type="SysRole" id="SysRoleResult">
|
||||
<resultMap type="com.muyu.system.common.domain.SysRole" id="SysRoleResult">
|
||||
<id property="roleId" column="role_id" />
|
||||
<result property="roleName" column="role_name" />
|
||||
<result property="roleKey" column="role_key" />
|
||||
|
@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
</sql>
|
||||
|
||||
<select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
|
||||
<select id="selectRoleList" parameterType="com.muyu.system.common.domain.SysRole" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
where r.del_flag = '0'
|
||||
<if test="roleId != null and roleId != 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
|
||||
</select>
|
||||
|
||||
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
||||
<insert id="insertRole" parameterType="com.muyu.system.common.domain.SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
||||
insert into sys_role(
|
||||
<if test="roleId != null and roleId != 0">role_id,</if>
|
||||
<if test="roleName != null and roleName != ''">role_name,</if>
|
||||
|
@ -121,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateRole" parameterType="SysRole">
|
||||
<update id="updateRole" parameterType="com.muyu.system.common.domain.SysRole">
|
||||
update sys_role
|
||||
<set>
|
||||
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysRoleMenuMapper">
|
||||
|
||||
<resultMap type="SysRoleMenu" id="SysRoleMenuResult">
|
||||
<resultMap type="com.muyu.system.common.domain.SysRoleMenu" id="SysRoleMenuResult">
|
||||
<result property="roleId" column="role_id" />
|
||||
<result property="menuId" column="menu_id" />
|
||||
</resultMap>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysUserMapper">
|
||||
|
||||
<resultMap type="SysUser" id="SysUserResult">
|
||||
<resultMap type="com.muyu.system.common.domain.SysUser" id="SysUserResult">
|
||||
<id property="userId" column="user_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
|
@ -23,11 +23,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<association property="dept" javaType="SysDept" resultMap="deptResult" />
|
||||
<association property="dept" javaType="com.muyu.system.common.domain.SysDept" resultMap="deptResult" />
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="deptResult" type="SysDept">
|
||||
<resultMap id="deptResult" type="com.muyu.system.common.domain.SysDept">
|
||||
<id property="deptId" column="dept_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
|
@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="status" column="dept_status" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="RoleResult" type="SysRole">
|
||||
<resultMap id="RoleResult" type="com.muyu.system.common.domain.SysRole">
|
||||
<id property="roleId" column="role_id" />
|
||||
<result property="roleName" column="role_name" />
|
||||
<result property="roleKey" column="role_key" />
|
||||
|
@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join sys_role r on r.role_id = ur.role_id
|
||||
</sql>
|
||||
|
||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
<select id="selectUserList" parameterType="com.muyu.system.common.domain.SysUser" resultMap="SysUserResult">
|
||||
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'
|
||||
|
@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
<select id="selectAllocatedList" parameterType="com.muyu.system.common.domain.SysUser" resultMap="SysUserResult">
|
||||
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
|
||||
|
@ -100,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
<select id="selectUnallocatedList" parameterType="com.muyu.system.common.domain.SysUser" resultMap="SysUserResult">
|
||||
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
|
||||
|
@ -140,7 +140,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
|
||||
</select>
|
||||
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
<insert id="insertUser" parameterType="com.muyu.system.common.domain.SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into sys_user(
|
||||
<if test="userId != null and userId != 0">user_id,</if>
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
|
@ -172,7 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateUser" parameterType="SysUser">
|
||||
<update id="updateUser" parameterType="com.muyu.system.common.domain.SysUser">
|
||||
update sys_user
|
||||
<set>
|
||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
||||
|
@ -193,15 +193,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateUserStatus" parameterType="SysUser">
|
||||
<update id="updateUserStatus" parameterType="com.muyu.system.common.domain.SysUser">
|
||||
update sys_user set status = #{status} where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateUserAvatar" parameterType="SysUser">
|
||||
<update id="updateUserAvatar" parameterType="com.muyu.system.common.domain.SysUser">
|
||||
update sys_user set avatar = #{avatar} where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
<update id="resetUserPwd" parameterType="SysUser">
|
||||
<update id="resetUserPwd" parameterType="com.muyu.system.common.domain.SysUser">
|
||||
update sys_user set password = #{password} where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysUserPostMapper">
|
||||
|
||||
<resultMap type="SysUserPost" id="SysUserPostResult">
|
||||
<resultMap type="com.muyu.system.common.domain.SysUserPost" id="SysUserPostResult">
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="postId" column="post_id" />
|
||||
</resultMap>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysUserRoleMapper">
|
||||
|
||||
<resultMap type="SysUserRole" id="SysUserRoleResult">
|
||||
<resultMap type="com.muyu.system.common.domain.SysUserRole" id="SysUserRoleResult">
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="roleId" column="role_id" />
|
||||
</resultMap>
|
||||
|
@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteUserRoleInfo" parameterType="SysUserRole">
|
||||
<delete id="deleteUserRoleInfo" parameterType="com.muyu.system.common.domain.SysUserRole">
|
||||
delete from sys_user_role where user_id=#{userId} and role_id=#{roleId}
|
||||
</delete>
|
||||
|
||||
|
|
Loading…
Reference in New Issue