完成设备操作日志接口
This commit is contained in:
parent
50577b5453
commit
3b49f43789
@ -149,10 +149,30 @@ public class XhpcCardController extends BaseController {
|
||||
return xhpcCardService.reportTheLossOfCard(cardId);
|
||||
}
|
||||
|
||||
@GetMapping("/operateCardLog")
|
||||
public R<OperateCardLogResponse> operateCardLog(OperateCardLogRequest operateCardLogRequest) {
|
||||
/**
|
||||
* query to list of operate card
|
||||
*
|
||||
* @author WH
|
||||
* @date 2022/2/14 10:32
|
||||
* @since version-1.0
|
||||
*/
|
||||
@GetMapping("/operateCardsLog")
|
||||
public R<OperateCardsLogResponse> operateCardsLog(OperateCardsLogRequest operateCardsLogRequest) {
|
||||
|
||||
return xhpcCardService.operateCardLog(operateCardLogRequest);
|
||||
return xhpcCardService.operateCardLog(operateCardsLogRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* query log of operating devices
|
||||
*
|
||||
* @author WH
|
||||
* @date 2022/2/14 11:13
|
||||
* @since version-1.0
|
||||
*/
|
||||
@GetMapping("/operateDevicesLog")
|
||||
public R<OperateDevicesLogResponse> operateDevicesLog(@Validated OperateDevicesLogRequest operateDevicesLogRequest) {
|
||||
|
||||
return xhpcCardService.operateDevicesLog(operateDevicesLogRequest);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,69 @@
|
||||
package com.xhpc.card.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 授权设备日志实体类
|
||||
*
|
||||
* @author WH
|
||||
* @date 2022/2/14 13:53
|
||||
* @since version-1.0
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class DeviceLogInfo {
|
||||
|
||||
/**
|
||||
* 设备信息
|
||||
*/
|
||||
@JsonProperty("deviceInfo")
|
||||
private DeviceInfoDTO deviceInfo;
|
||||
/**
|
||||
* 执行此操作的运营商id
|
||||
*/
|
||||
@JsonProperty("operatorId")
|
||||
private Long operatorId;
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
@JsonProperty("operate")
|
||||
private Integer operate;
|
||||
|
||||
/**
|
||||
* DeviceInfoDTO
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class DeviceInfoDTO {
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@JsonProperty("devName")
|
||||
private String devName;
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
@JsonProperty("devType")
|
||||
private String devType;
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
@JsonProperty("serialNumber")
|
||||
private String serialNumber;
|
||||
/**
|
||||
* 授权运营商id
|
||||
*/
|
||||
@JsonProperty("corpIndex")
|
||||
private Long corpIndex;
|
||||
/**
|
||||
* 授权运营商名称
|
||||
*/
|
||||
@JsonProperty("corpName")
|
||||
private String corpName;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -13,7 +13,7 @@ import lombok.NoArgsConstructor;
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class OperateCardLogRequest {
|
||||
public class OperateCardsLogRequest {
|
||||
|
||||
/**
|
||||
* operateType
|
||||
@ -15,7 +15,7 @@ import java.util.List;
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class OperateCardLogResponse {
|
||||
public class OperateCardsLogResponse {
|
||||
|
||||
|
||||
/**
|
||||
@ -0,0 +1,48 @@
|
||||
package com.xhpc.card.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* Wrapper class of the interface of OperateDevicesLogRequest
|
||||
*
|
||||
* @author WH
|
||||
* @date 2022/2/14 11:14
|
||||
* @since version-1.0
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class OperateDevicesLogRequest {
|
||||
|
||||
/**
|
||||
* operateType
|
||||
*/
|
||||
@JsonProperty("operateType")
|
||||
private Integer operateType;
|
||||
/**
|
||||
* logStartTime
|
||||
*/
|
||||
@JsonProperty("logStartTime")
|
||||
private String logStartTime;
|
||||
/**
|
||||
* logEndTime
|
||||
*/
|
||||
@JsonProperty("logEndTime")
|
||||
private String logEndTime;
|
||||
/**
|
||||
* currentPage
|
||||
*/
|
||||
@JsonProperty("currentPage")
|
||||
@NotNull(message = "currentPage不能为null")
|
||||
private Long currentPage;
|
||||
/**
|
||||
* items
|
||||
*/
|
||||
@NotNull(message = "items不能为null")
|
||||
@JsonProperty("items")
|
||||
private Long items;
|
||||
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
package com.xhpc.card.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Response Wrapper
|
||||
*
|
||||
* @author WH
|
||||
* @date 2022/2/14 11:18
|
||||
* @since version-1.0
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class OperateDevicesLogResponse {
|
||||
|
||||
/**
|
||||
* totalItems
|
||||
*/
|
||||
@JsonProperty("totalItems")
|
||||
private Long totalItems;
|
||||
/**
|
||||
* data
|
||||
*/
|
||||
@JsonProperty("data")
|
||||
private List<DataDTO> data;
|
||||
|
||||
/**
|
||||
* DataDTO
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class DataDTO {
|
||||
|
||||
/**
|
||||
* deviceSerialNumber
|
||||
*/
|
||||
@JsonProperty("deviceSerialNumber")
|
||||
private String deviceSerialNumber;
|
||||
/**
|
||||
* operateType
|
||||
*/
|
||||
@JsonProperty("operateType")
|
||||
private Integer operateType;
|
||||
/**
|
||||
* deviceName
|
||||
*/
|
||||
@JsonProperty("deviceName")
|
||||
private String deviceName;
|
||||
/**
|
||||
* deviceType
|
||||
*/
|
||||
@JsonProperty("deviceType")
|
||||
private String deviceType;
|
||||
/**
|
||||
* grantOperatorName
|
||||
*/
|
||||
@JsonProperty("grantOperatorName")
|
||||
private String grantOperatorName;
|
||||
/**
|
||||
* operatorName
|
||||
*/
|
||||
@JsonProperty("operatorName")
|
||||
private String operatorName;
|
||||
/**
|
||||
* operateTime
|
||||
*/
|
||||
@JsonProperty("operateTime")
|
||||
private String operateTime;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xhpc.card.mapper;
|
||||
|
||||
import com.xhpc.card.domain.OperateCardLogRequest;
|
||||
import com.xhpc.card.domain.OperateCardsLogRequest;
|
||||
import com.xhpc.card.domain.OperateDevicesLogRequest;
|
||||
import com.xhpc.card.pojo.TIccardLog;
|
||||
|
||||
import java.util.List;
|
||||
@ -26,7 +27,7 @@ public interface TIccardLogMapper {
|
||||
* @date 2022/2/13 22:43
|
||||
* @since version-1.0
|
||||
*/
|
||||
List<TIccardLog> selectByCondition(OperateCardLogRequest operateCardLogRequest);
|
||||
List<TIccardLog> selectByCondition(OperateCardsLogRequest operateCardsLogRequest);
|
||||
|
||||
/**
|
||||
* query count of list of log of operate card
|
||||
@ -35,6 +36,24 @@ public interface TIccardLogMapper {
|
||||
* @date 2022/2/13 23:11
|
||||
* @since version-1.0
|
||||
*/
|
||||
Long selectCountByCondition(OperateCardLogRequest operateCardLogRequest);
|
||||
Long selectCountByCondition(OperateCardsLogRequest operateCardsLogRequest);
|
||||
|
||||
/**
|
||||
* query list of log of operate device
|
||||
*
|
||||
* @author WH
|
||||
* @date 2022/2/14 13:59
|
||||
* @since version-1.0
|
||||
*/
|
||||
List<TIccardLog> selectDeviceLogListByCondition(OperateDevicesLogRequest operateDevicesLogRequest);
|
||||
|
||||
/**
|
||||
* query count of log of operating device
|
||||
*
|
||||
* @author WH
|
||||
* @date 2022/2/14 14:22
|
||||
* @since version-1.0
|
||||
*/
|
||||
Long selectCountOfDeviceLogListByCondition(OperateDevicesLogRequest operateDevicesLogRequest);
|
||||
|
||||
}
|
||||
@ -126,6 +126,17 @@ public interface IXhpcCardService {
|
||||
* @date 2022/2/13 22:35
|
||||
* @since version-1.0
|
||||
*/
|
||||
R<OperateCardLogResponse> operateCardLog(OperateCardLogRequest operateCardLogRequest);
|
||||
R<OperateCardsLogResponse> operateCardLog(OperateCardsLogRequest operateCardsLogRequest);
|
||||
|
||||
/**
|
||||
* query log of operation devices
|
||||
*
|
||||
* @param operateDevicesLogRequest wrapper class of condition
|
||||
* @return return response wrapper class OperateCardsLogResponse
|
||||
* @author WH
|
||||
* @date 2022/2/14 11:10
|
||||
* @since version-1.0
|
||||
*/
|
||||
R<OperateDevicesLogResponse> operateDevicesLog(OperateDevicesLogRequest operateDevicesLogRequest);
|
||||
|
||||
}
|
||||
|
||||
@ -452,20 +452,20 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<OperateCardLogResponse> operateCardLog(OperateCardLogRequest operateCardLogRequest) {
|
||||
public R<OperateCardsLogResponse> operateCardLog(OperateCardsLogRequest operateCardsLogRequest) {
|
||||
//计算分页索引
|
||||
long startIndex = MyPagingUtil.calculateStartIndex(operateCardLogRequest.getCurrentPage(), operateCardLogRequest.getItems());
|
||||
operateCardLogRequest.setCurrentPage(startIndex);
|
||||
OperateCardLogResponse operateCardLogResponse = new OperateCardLogResponse();
|
||||
operateCardLogResponse.setData(new ArrayList<>());
|
||||
List<TIccardLog> dataList = tIccardLogMapper.selectByCondition(operateCardLogRequest);
|
||||
long startIndex = MyPagingUtil.calculateStartIndex(operateCardsLogRequest.getCurrentPage(), operateCardsLogRequest.getItems());
|
||||
operateCardsLogRequest.setCurrentPage(startIndex);
|
||||
OperateCardsLogResponse operateCardsLogResponse = new OperateCardsLogResponse();
|
||||
operateCardsLogResponse.setData(new ArrayList<>());
|
||||
List<TIccardLog> dataList = tIccardLogMapper.selectByCondition(operateCardsLogRequest);
|
||||
if (dataList.isEmpty()) {
|
||||
return R.ok(operateCardLogResponse);
|
||||
return R.ok(operateCardsLogResponse);
|
||||
}
|
||||
Long totalItems = tIccardLogMapper.selectCountByCondition(operateCardLogRequest);
|
||||
operateCardLogResponse.setTotalItems(totalItems);
|
||||
Long totalItems = tIccardLogMapper.selectCountByCondition(operateCardsLogRequest);
|
||||
operateCardsLogResponse.setTotalItems(totalItems);
|
||||
for (TIccardLog tIccardLog : dataList) {
|
||||
OperateCardLogResponse.DataDTO dataDTO = new OperateCardLogResponse.DataDTO();
|
||||
OperateCardsLogResponse.DataDTO dataDTO = new OperateCardsLogResponse.DataDTO();
|
||||
String log = tIccardLog.getLog();
|
||||
CardLogInfo cardLogInfo = JSONUtil.toBean(log, CardLogInfo.class);
|
||||
CardLogInfo.CardInfoDTO cardInfo = cardLogInfo.getCardInfo();
|
||||
@ -478,9 +478,41 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
||||
dataDTO.setOperateTime(MyDateUtil.parseDateToStr(tIccardLog.getCreatetime()));
|
||||
XhpcOperator operator2 = xhpcOperatorMapper.selectByPrimaryKey(cardLogInfo.getOperatorId());
|
||||
dataDTO.setOperatorName(operator2.getName());
|
||||
operateCardLogResponse.getData().add(dataDTO);
|
||||
operateCardsLogResponse.getData().add(dataDTO);
|
||||
}
|
||||
return R.ok(operateCardLogResponse);
|
||||
return R.ok(operateCardsLogResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<OperateDevicesLogResponse> operateDevicesLog(OperateDevicesLogRequest operateDevicesLogRequest) {
|
||||
//计算分页索引
|
||||
long startIndex = MyPagingUtil.calculateStartIndex(operateDevicesLogRequest.getCurrentPage(), operateDevicesLogRequest.getItems());
|
||||
operateDevicesLogRequest.setCurrentPage(startIndex);
|
||||
OperateDevicesLogResponse operateDevicesLogResponse = new OperateDevicesLogResponse();
|
||||
operateDevicesLogResponse.setData(new ArrayList<>());
|
||||
List<TIccardLog> dataList = tIccardLogMapper.selectDeviceLogListByCondition(operateDevicesLogRequest);
|
||||
if (dataList.isEmpty()) {
|
||||
return R.ok(operateDevicesLogResponse);
|
||||
}
|
||||
Long totalItems = tIccardLogMapper.selectCountOfDeviceLogListByCondition(operateDevicesLogRequest);
|
||||
operateDevicesLogResponse.setTotalItems(totalItems);
|
||||
for (TIccardLog tIccardLog : dataList) {
|
||||
OperateDevicesLogResponse.DataDTO dataDTO = new OperateDevicesLogResponse.DataDTO();
|
||||
String log = tIccardLog.getLog();
|
||||
DeviceLogInfo deviceLogInfo = JSONUtil.toBean(log, DeviceLogInfo.class);
|
||||
DeviceLogInfo.DeviceInfoDTO deviceInfo = deviceLogInfo.getDeviceInfo();
|
||||
dataDTO.setDeviceSerialNumber(deviceInfo.getSerialNumber());
|
||||
dataDTO.setOperateType(Integer.valueOf(tIccardLog.getOperate()));
|
||||
dataDTO.setDeviceName(deviceInfo.getDevName());
|
||||
dataDTO.setDeviceType(deviceInfo.getDevType());
|
||||
dataDTO.setGrantOperatorName(deviceInfo.getCorpName());
|
||||
Integer operatorId = tIccardLog.getOperatorid();
|
||||
XhpcOperator operator = xhpcOperatorMapper.selectByPrimaryKey(Long.valueOf(operatorId));
|
||||
dataDTO.setOperatorName(operator.getName());
|
||||
dataDTO.setOperateTime(MyDateUtil.parseDateToStr(tIccardLog.getCreatetime()));
|
||||
operateDevicesLogResponse.getData().add(dataDTO);
|
||||
}
|
||||
return R.ok(operateDevicesLogResponse);
|
||||
}
|
||||
|
||||
private void fillUserInfo(CardUserInfo cardUserInfo, Map<String, Object> userData) {
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.xhpc.card.utils;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.xhpc.common.core.utils.DateUtils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
@ -22,11 +21,11 @@ public class MyDateUtil {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
System.out.println(getCurrentDateStr());
|
||||
System.out.println(parseDateToStr(new Date()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 对parseDateStr方法进行再次封装,默认转换格式为YYYY_MM_DD_HH_MM_SS
|
||||
* 转换Date对象,转换格式为YYYY_MM_DD_HH_MM_SS的时间字符串
|
||||
*
|
||||
* @param date 时间对象
|
||||
* @return YYYY_MM_DD_HH_MM_SS格式的时间字符串
|
||||
@ -36,12 +35,7 @@ public class MyDateUtil {
|
||||
*/
|
||||
public static final String parseDateToStr(final Date date) {
|
||||
|
||||
return parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, date);
|
||||
}
|
||||
|
||||
public static final String parseDateToStr(final String format, final Date date) {
|
||||
|
||||
return new SimpleDateFormat(format).format(date);
|
||||
return new SimpleDateFormat(MyDateUtil.YYYY_MM_DD_HH_MM_SS).format(date);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -0,0 +1,184 @@
|
||||
<?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">
|
||||
<!--suppress SqlDialectInspection -->
|
||||
<mapper namespace="com.xhpc.card.mapper.TIccardLogMapper">
|
||||
<resultMap id="BaseResultMap" type="com.xhpc.card.pojo.TIccardLog">
|
||||
<id column="id" jdbcType="INTEGER" property="id"/>
|
||||
<result column="uniqueID" jdbcType="VARCHAR" property="uniqueid"/>
|
||||
<result column="type" jdbcType="TINYINT" property="type"/>
|
||||
<result column="operate" jdbcType="TINYINT" property="operate"/>
|
||||
<result column="operatorId" jdbcType="INTEGER" property="operatorid"/>
|
||||
<result column="log" jdbcType="VARCHAR" property="log"/>
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createtime"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, uniqueID, `type`, operate, operatorId, log, createTime
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from t_iccard_log
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectByCondition" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM
|
||||
t_iccard_log
|
||||
<where>
|
||||
<if test="logStartTime!=null and logStartTime!='' ">
|
||||
AND createTime >= #{logStartTime}
|
||||
</if>
|
||||
<if test="logEndTime!=null and logEndTime != '' ">
|
||||
AND createTime <= #{logEndTime}
|
||||
</if>
|
||||
<if test="operateType!=null">
|
||||
AND operate = #{operateType}
|
||||
</if>
|
||||
</where>
|
||||
LIMIT #{currentPage},#{items}
|
||||
</select>
|
||||
<select id="selectCountByCondition" resultType="java.lang.Long">
|
||||
SELECT
|
||||
count(id)
|
||||
FROM
|
||||
t_iccard_log
|
||||
<where>
|
||||
<if test="logStartTime!=null and logStartTime!=''">
|
||||
and createTime >= #{logStartTime}
|
||||
</if>
|
||||
<if test="logEndTime!=null and logEndTime != ''">
|
||||
AND createTime <= #{logEndTime}
|
||||
</if>
|
||||
<if test="operateType!=null">
|
||||
AND operate = #{operateType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectDeviceLogListByCondition" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM
|
||||
t_iccard_log
|
||||
WHERE
|
||||
type = 1
|
||||
<if test="operateType!=null">
|
||||
AND operate = #{operateType}
|
||||
</if>
|
||||
<if test="logStartTime!=null and logStartTime!='' ">
|
||||
AND createTime >= #{logStartTime}
|
||||
</if>
|
||||
<if test="logEndTime!=null and logEndTime!='' ">
|
||||
AND createTime <= #{logEndTime}
|
||||
</if>
|
||||
limit #{currentPage},#{items}
|
||||
</select>
|
||||
<select id="selectCountOfDeviceLogListByCondition" resultType="java.lang.Long">
|
||||
SELECT
|
||||
count(id)
|
||||
FROM
|
||||
t_iccard_log
|
||||
WHERE
|
||||
type = 1
|
||||
<if test="operateType!=null">
|
||||
AND operate = #{operateType}
|
||||
</if>
|
||||
<if test="logStartTime!=null and logStartTime!='' ">
|
||||
AND createTime >= #{logStartTime}
|
||||
</if>
|
||||
<if test="logEndTime!=null and logEndTime!='' ">
|
||||
AND createTime <= #{logEndTime}
|
||||
</if>
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete
|
||||
from t_iccard_log
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.xhpc.card.pojo.TIccardLog"
|
||||
useGeneratedKeys="true">
|
||||
insert into t_iccard_log (uniqueID, `type`, operate,
|
||||
operatorId, log, createTime)
|
||||
values (#{uniqueid,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, #{operate,jdbcType=TINYINT},
|
||||
#{operatorid,jdbcType=INTEGER}, #{log,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.xhpc.card.pojo.TIccardLog"
|
||||
useGeneratedKeys="true">
|
||||
insert into t_iccard_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="uniqueid != null">
|
||||
uniqueID,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type`,
|
||||
</if>
|
||||
<if test="operate != null">
|
||||
operate,
|
||||
</if>
|
||||
<if test="operatorid != null">
|
||||
operatorId,
|
||||
</if>
|
||||
<if test="log != null">
|
||||
log,
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="uniqueid != null">
|
||||
#{uniqueid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="operate != null">
|
||||
#{operate,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="operatorid != null">
|
||||
#{operatorid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="log != null">
|
||||
#{log,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
#{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.xhpc.card.pojo.TIccardLog">
|
||||
update t_iccard_log
|
||||
<set>
|
||||
<if test="uniqueid != null">
|
||||
uniqueID = #{uniqueid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type` = #{type,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="operate != null">
|
||||
operate = #{operate,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="operatorid != null">
|
||||
operatorId = #{operatorid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="log != null">
|
||||
log = #{log,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.xhpc.card.pojo.TIccardLog">
|
||||
update t_iccard_log
|
||||
set uniqueID = #{uniqueid,jdbcType=VARCHAR},
|
||||
`type` = #{type,jdbcType=TINYINT},
|
||||
operate = #{operate,jdbcType=TINYINT},
|
||||
operatorId = #{operatorid,jdbcType=INTEGER},
|
||||
log = #{log,jdbcType=VARCHAR},
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
Loading…
x
Reference in New Issue
Block a user