新增同步操作日志相关方法
parent
bc7237177c
commit
6b0a8cf8cc
@ -0,0 +1,12 @@
|
|||||||
|
package com.glxp.api.dao.sync;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.glxp.api.entity.sync.SyncEditLogEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface SyncEditLogMapper extends BaseMapper<SyncEditLogEntity> {
|
||||||
|
int insertOrUpdate(SyncEditLogEntity record);
|
||||||
|
|
||||||
|
int insertOrUpdateSelective(SyncEditLogEntity record);
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.glxp.api.dao.sync;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.glxp.api.entity.sync.SyncEditTypeEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface SyncEditTypeMapper extends BaseMapper<SyncEditTypeEntity> {
|
||||||
|
int insertOrUpdate(SyncEditTypeEntity record);
|
||||||
|
|
||||||
|
int insertOrUpdateSelective(SyncEditTypeEntity record);
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.glxp.api.entity.sync;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@ApiModel(value="com-glxp-api-entity-sync-SyncEditType")
|
||||||
|
@Data
|
||||||
|
@TableName(value = "sync_edit_type")
|
||||||
|
public class SyncEditTypeEntity implements Serializable {
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
@ApiModelProperty(value="")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "code")
|
||||||
|
@ApiModelProperty(value="操作类型")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作类型名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "`name`")
|
||||||
|
@ApiModelProperty(value="操作类型名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@TableField(value = "remark")
|
||||||
|
@ApiModelProperty(value="备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.glxp.api.service.sync;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.glxp.api.entity.sync.SyncEditLogEntity;
|
||||||
|
import com.glxp.api.dao.sync.SyncEditLogMapper;
|
||||||
|
@Service
|
||||||
|
public class SyncEditLogService extends ServiceImpl<SyncEditLogMapper, SyncEditLogEntity> {
|
||||||
|
|
||||||
|
|
||||||
|
public int insertOrUpdate(SyncEditLogEntity record) {
|
||||||
|
return baseMapper.insertOrUpdate(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int insertOrUpdateSelective(SyncEditLogEntity record) {
|
||||||
|
return baseMapper.insertOrUpdateSelective(record);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.glxp.api.service.sync;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.glxp.api.dao.sync.SyncEditTypeMapper;
|
||||||
|
import com.glxp.api.entity.sync.SyncEditTypeEntity;
|
||||||
|
@Service
|
||||||
|
public class SyncEditTypeService extends ServiceImpl<SyncEditTypeMapper, SyncEditTypeEntity> {
|
||||||
|
|
||||||
|
|
||||||
|
public int insertOrUpdate(SyncEditTypeEntity record) {
|
||||||
|
return baseMapper.insertOrUpdate(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int insertOrUpdateSelective(SyncEditTypeEntity record) {
|
||||||
|
return baseMapper.insertOrUpdateSelective(record);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,186 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.glxp.api.dao.sync.SyncEditLogMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.glxp.api.entity.sync.SyncEditLogEntity">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table sync_edit_log-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="recordCode" jdbcType="VARCHAR" property="recordCode" />
|
||||||
|
<result column="operType" jdbcType="TINYINT" property="operType" />
|
||||||
|
<result column="dataType" jdbcType="VARCHAR" property="dataType" />
|
||||||
|
<result column="url" jdbcType="VARCHAR" property="url" />
|
||||||
|
<result column="param" jdbcType="VARCHAR" property="param" />
|
||||||
|
<result column="jsonResult" jdbcType="VARCHAR" property="jsonResult" />
|
||||||
|
<result column="directType" jdbcType="TINYINT" property="directType" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="operUser" jdbcType="VARCHAR" property="operUser" />
|
||||||
|
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, recordCode, operType, dataType, url, param, jsonResult, directType, remark, operUser,
|
||||||
|
updateTime
|
||||||
|
</sql>
|
||||||
|
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.sync.SyncEditLogEntity" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into sync_edit_log
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
recordCode,
|
||||||
|
operType,
|
||||||
|
dataType,
|
||||||
|
url,
|
||||||
|
param,
|
||||||
|
jsonResult,
|
||||||
|
directType,
|
||||||
|
remark,
|
||||||
|
operUser,
|
||||||
|
updateTime,
|
||||||
|
</trim>
|
||||||
|
values
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
#{recordCode,jdbcType=VARCHAR},
|
||||||
|
#{operType,jdbcType=TINYINT},
|
||||||
|
#{dataType,jdbcType=VARCHAR},
|
||||||
|
#{url,jdbcType=VARCHAR},
|
||||||
|
#{param,jdbcType=VARCHAR},
|
||||||
|
#{jsonResult,jdbcType=VARCHAR},
|
||||||
|
#{directType,jdbcType=TINYINT},
|
||||||
|
#{remark,jdbcType=VARCHAR},
|
||||||
|
#{operUser,jdbcType=VARCHAR},
|
||||||
|
#{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</trim>
|
||||||
|
on duplicate key update
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id = #{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
recordCode = #{recordCode,jdbcType=VARCHAR},
|
||||||
|
operType = #{operType,jdbcType=TINYINT},
|
||||||
|
dataType = #{dataType,jdbcType=VARCHAR},
|
||||||
|
url = #{url,jdbcType=VARCHAR},
|
||||||
|
param = #{param,jdbcType=VARCHAR},
|
||||||
|
jsonResult = #{jsonResult,jdbcType=VARCHAR},
|
||||||
|
directType = #{directType,jdbcType=TINYINT},
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
operUser = #{operUser,jdbcType=VARCHAR},
|
||||||
|
updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.sync.SyncEditLogEntity" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into sync_edit_log
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="recordCode != null">
|
||||||
|
recordCode,
|
||||||
|
</if>
|
||||||
|
<if test="operType != null">
|
||||||
|
operType,
|
||||||
|
</if>
|
||||||
|
<if test="dataType != null">
|
||||||
|
dataType,
|
||||||
|
</if>
|
||||||
|
<if test="url != null">
|
||||||
|
url,
|
||||||
|
</if>
|
||||||
|
<if test="param != null">
|
||||||
|
param,
|
||||||
|
</if>
|
||||||
|
<if test="jsonResult != null">
|
||||||
|
jsonResult,
|
||||||
|
</if>
|
||||||
|
<if test="directType != null">
|
||||||
|
directType,
|
||||||
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
remark,
|
||||||
|
</if>
|
||||||
|
<if test="operUser != null">
|
||||||
|
operUser,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
updateTime,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
values
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="recordCode != null">
|
||||||
|
#{recordCode,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="operType != null">
|
||||||
|
#{operType,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="dataType != null">
|
||||||
|
#{dataType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="url != null">
|
||||||
|
#{url,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="param != null">
|
||||||
|
#{param,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="jsonResult != null">
|
||||||
|
#{jsonResult,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="directType != null">
|
||||||
|
#{directType,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
#{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="operUser != null">
|
||||||
|
#{operUser,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
#{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
on duplicate key update
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id = #{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="recordCode != null">
|
||||||
|
recordCode = #{recordCode,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="operType != null">
|
||||||
|
operType = #{operType,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="dataType != null">
|
||||||
|
dataType = #{dataType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="url != null">
|
||||||
|
url = #{url,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="param != null">
|
||||||
|
param = #{param,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="jsonResult != null">
|
||||||
|
jsonResult = #{jsonResult,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="directType != null">
|
||||||
|
directType = #{directType,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="operUser != null">
|
||||||
|
operUser = #{operUser,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
@ -0,0 +1,94 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.glxp.api.dao.sync.SyncEditTypeMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.glxp.api.entity.sync.SyncEditTypeEntity">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table sync_edit_type-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, code, `name`, remark
|
||||||
|
</sql>
|
||||||
|
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.sync.SyncEditTypeEntity" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into sync_edit_type
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
code,
|
||||||
|
`name`,
|
||||||
|
remark,
|
||||||
|
</trim>
|
||||||
|
values
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
#{code,jdbcType=VARCHAR},
|
||||||
|
#{name,jdbcType=VARCHAR},
|
||||||
|
#{remark,jdbcType=VARCHAR},
|
||||||
|
</trim>
|
||||||
|
on duplicate key update
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id = #{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
code = #{code,jdbcType=VARCHAR},
|
||||||
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.sync.SyncEditTypeEntity" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into sync_edit_type
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="code != null">
|
||||||
|
code,
|
||||||
|
</if>
|
||||||
|
<if test="name != null">
|
||||||
|
`name`,
|
||||||
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
remark,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
values
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="code != null">
|
||||||
|
#{code,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="name != null">
|
||||||
|
#{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
#{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
on duplicate key update
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id = #{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="code != null">
|
||||||
|
code = #{code,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="name != null">
|
||||||
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue