IC card init..
This commit is contained in:
parent
a803955a9b
commit
5a3259ff81
@ -0,0 +1,70 @@
|
|||||||
|
package com.xhpc.common.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* t_iccard_info
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class IccardInfo implements Serializable {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卡序列号
|
||||||
|
*/
|
||||||
|
private String cardid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卡编号
|
||||||
|
*/
|
||||||
|
private String cardno;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卡类型。0.单机卡; 1.联网卡
|
||||||
|
*/
|
||||||
|
private Byte cardtype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* password
|
||||||
|
*/
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卡用户索引
|
||||||
|
*/
|
||||||
|
private Integer userindex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业编码
|
||||||
|
*/
|
||||||
|
private String corpno;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 押金
|
||||||
|
*/
|
||||||
|
private Integer cashpledge;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 余额
|
||||||
|
*/
|
||||||
|
private Integer balance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0.初始化, 1.正常, 2.锁卡, 3.挂失, 4.作废
|
||||||
|
*/
|
||||||
|
private Byte status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加日期
|
||||||
|
*/
|
||||||
|
private Date createtime;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,35 @@
|
|||||||
|
package com.xhpc.iccard.mapper;
|
||||||
|
|
||||||
|
import com.xhpc.common.domain.IccardInfo;
|
||||||
|
import com.xhpc.common.domain.IccardInfoExample;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface IccardInfoMapper {
|
||||||
|
|
||||||
|
long countByExample(IccardInfoExample example);
|
||||||
|
|
||||||
|
int deleteByExample(IccardInfoExample example);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int insert(IccardInfo record);
|
||||||
|
|
||||||
|
int insertSelective(IccardInfo record);
|
||||||
|
|
||||||
|
List<IccardInfo> selectByExample(IccardInfoExample example);
|
||||||
|
|
||||||
|
IccardInfo selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int updateByExampleSelective(@Param("record") IccardInfo record, @Param("example") IccardInfoExample example);
|
||||||
|
|
||||||
|
int updateByExample(@Param("record") IccardInfo record, @Param("example") IccardInfoExample example);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(IccardInfo record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(IccardInfo record);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,314 @@
|
|||||||
|
<?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.xhpc.iccard.mapper.IccardInfoMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.xhpc.common.domain.IccardInfo">
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id"/>
|
||||||
|
<result column="cardID" jdbcType="VARCHAR" property="cardid"/>
|
||||||
|
<result column="cardNo" jdbcType="VARCHAR" property="cardno"/>
|
||||||
|
<result column="cardType" jdbcType="TINYINT" property="cardtype"/>
|
||||||
|
<result column="password" jdbcType="VARCHAR" property="password"/>
|
||||||
|
<result column="userIndex" jdbcType="INTEGER" property="userindex"/>
|
||||||
|
<result column="corpNo" jdbcType="VARCHAR" property="corpno"/>
|
||||||
|
<result column="cashPledge" jdbcType="INTEGER" property="cashpledge"/>
|
||||||
|
<result column="balance" jdbcType="INTEGER" property="balance"/>
|
||||||
|
<result column="status" jdbcType="TINYINT" property="status"/>
|
||||||
|
<result column="createTime" jdbcType="TIMESTAMP" property="createtime"/>
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, cardID, cardNo, cardType, `password`, userIndex, corpNo, cashPledge, balance,
|
||||||
|
`status`, createTime
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExample" parameterType="com.xhpc.common.domain.IccardInfoExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
from t_iccard_info
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause"/>
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
<if test="limit != null">
|
||||||
|
<if test="offset != null">
|
||||||
|
limit ${offset}, ${limit}
|
||||||
|
</if>
|
||||||
|
<if test="offset == null">
|
||||||
|
limit ${limit}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<if test="forUpdate != null and forUpdate == true">
|
||||||
|
for update
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
from t_iccard_info
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
|
delete
|
||||||
|
from t_iccard_info
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="com.xhpc.common.domain.IccardInfoExample">
|
||||||
|
delete from t_iccard_info
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause"/>
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.xhpc.common.domain.IccardInfo"
|
||||||
|
useGeneratedKeys="true">
|
||||||
|
insert into t_iccard_info (cardID, cardNo, cardType,
|
||||||
|
`password`, userIndex, corpNo,
|
||||||
|
cashPledge, balance, `status`,
|
||||||
|
createTime)
|
||||||
|
values (#{cardid,jdbcType=VARCHAR}, #{cardno,jdbcType=VARCHAR}, #{cardtype,jdbcType=TINYINT},
|
||||||
|
#{password,jdbcType=VARCHAR}, #{userindex,jdbcType=INTEGER}, #{corpno,jdbcType=VARCHAR},
|
||||||
|
#{cashpledge,jdbcType=INTEGER}, #{balance,jdbcType=INTEGER}, #{status,jdbcType=TINYINT},
|
||||||
|
#{createtime,jdbcType=TIMESTAMP})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.xhpc.common.domain.IccardInfo"
|
||||||
|
useGeneratedKeys="true">
|
||||||
|
insert into t_iccard_info
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="cardid != null">
|
||||||
|
cardID,
|
||||||
|
</if>
|
||||||
|
<if test="cardno != null">
|
||||||
|
cardNo,
|
||||||
|
</if>
|
||||||
|
<if test="cardtype != null">
|
||||||
|
cardType,
|
||||||
|
</if>
|
||||||
|
<if test="password != null">
|
||||||
|
`password`,
|
||||||
|
</if>
|
||||||
|
<if test="userindex != null">
|
||||||
|
userIndex,
|
||||||
|
</if>
|
||||||
|
<if test="corpno != null">
|
||||||
|
corpNo,
|
||||||
|
</if>
|
||||||
|
<if test="cashpledge != null">
|
||||||
|
cashPledge,
|
||||||
|
</if>
|
||||||
|
<if test="balance != null">
|
||||||
|
balance,
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
`status`,
|
||||||
|
</if>
|
||||||
|
<if test="createtime != null">
|
||||||
|
createTime,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="cardid != null">
|
||||||
|
#{cardid,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cardno != null">
|
||||||
|
#{cardno,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cardtype != null">
|
||||||
|
#{cardtype,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="password != null">
|
||||||
|
#{password,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="userindex != null">
|
||||||
|
#{userindex,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="corpno != null">
|
||||||
|
#{corpno,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cashpledge != null">
|
||||||
|
#{cashpledge,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="balance != null">
|
||||||
|
#{balance,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
#{status,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="createtime != null">
|
||||||
|
#{createtime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="com.xhpc.common.domain.IccardInfoExample" resultType="java.lang.Long">
|
||||||
|
select count(*) from t_iccard_info
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause"/>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update t_iccard_info
|
||||||
|
<set>
|
||||||
|
<if test="record.id != null">
|
||||||
|
id = #{record.id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="record.cardid != null">
|
||||||
|
cardID = #{record.cardid,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.cardno != null">
|
||||||
|
cardNo = #{record.cardno,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.cardtype != null">
|
||||||
|
cardType = #{record.cardtype,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.password != null">
|
||||||
|
`password` = #{record.password,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.userindex != null">
|
||||||
|
userIndex = #{record.userindex,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="record.corpno != null">
|
||||||
|
corpNo = #{record.corpno,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.cashpledge != null">
|
||||||
|
cashPledge = #{record.cashpledge,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="record.balance != null">
|
||||||
|
balance = #{record.balance,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="record.status != null">
|
||||||
|
`status` = #{record.status,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.createtime != null">
|
||||||
|
createTime = #{record.createtime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update t_iccard_info
|
||||||
|
set id = #{record.id,jdbcType=INTEGER},
|
||||||
|
cardID = #{record.cardid,jdbcType=VARCHAR},
|
||||||
|
cardNo = #{record.cardno,jdbcType=VARCHAR},
|
||||||
|
cardType = #{record.cardtype,jdbcType=TINYINT},
|
||||||
|
`password` = #{record.password,jdbcType=VARCHAR},
|
||||||
|
userIndex = #{record.userindex,jdbcType=INTEGER},
|
||||||
|
corpNo = #{record.corpno,jdbcType=VARCHAR},
|
||||||
|
cashPledge = #{record.cashpledge,jdbcType=INTEGER},
|
||||||
|
balance = #{record.balance,jdbcType=INTEGER},
|
||||||
|
`status` = #{record.status,jdbcType=TINYINT},
|
||||||
|
createTime = #{record.createtime,jdbcType=TIMESTAMP}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.xhpc.common.domain.IccardInfo">
|
||||||
|
update t_iccard_info
|
||||||
|
<set>
|
||||||
|
<if test="cardid != null">
|
||||||
|
cardID = #{cardid,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cardno != null">
|
||||||
|
cardNo = #{cardno,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cardtype != null">
|
||||||
|
cardType = #{cardtype,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="password != null">
|
||||||
|
`password` = #{password,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="userindex != null">
|
||||||
|
userIndex = #{userindex,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="corpno != null">
|
||||||
|
corpNo = #{corpno,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="cashpledge != null">
|
||||||
|
cashPledge = #{cashpledge,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="balance != null">
|
||||||
|
balance = #{balance,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
`status` = #{status,jdbcType=TINYINT},
|
||||||
|
</if>
|
||||||
|
<if test="createtime != null">
|
||||||
|
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.xhpc.common.domain.IccardInfo">
|
||||||
|
update t_iccard_info
|
||||||
|
set cardID = #{cardid,jdbcType=VARCHAR},
|
||||||
|
cardNo = #{cardno,jdbcType=VARCHAR},
|
||||||
|
cardType = #{cardtype,jdbcType=TINYINT},
|
||||||
|
`password` = #{password,jdbcType=VARCHAR},
|
||||||
|
userIndex = #{userindex,jdbcType=INTEGER},
|
||||||
|
corpNo = #{corpno,jdbcType=VARCHAR},
|
||||||
|
cashPledge = #{cashpledge,jdbcType=INTEGER},
|
||||||
|
balance = #{balance,jdbcType=INTEGER},
|
||||||
|
`status` = #{status,jdbcType=TINYINT},
|
||||||
|
createTime = #{createtime,jdbcType=TIMESTAMP}
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
@ -2,12 +2,12 @@ package com.xhpc.pp.logic;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.xhpc.common.data.up.PileStartChargingData;
|
import com.xhpc.common.data.up.PileStartChargingData;
|
||||||
|
import com.xhpc.common.domain.IccardInfo;
|
||||||
|
import com.xhpc.common.domain.IccardInfoExample;
|
||||||
import com.xhpc.common.enums.StationDeviceEnum;
|
import com.xhpc.common.enums.StationDeviceEnum;
|
||||||
import com.xhpc.mapper.IccardInfoMapper;
|
import com.xhpc.iccard.mapper.IccardInfoMapper;
|
||||||
import com.xhpc.pp.domain.IccardInfo;
|
|
||||||
import com.xhpc.pp.domain.IccardInfoExample;
|
|
||||||
import com.xhpc.pp.domain.XhpcDeviceMessage;
|
|
||||||
import com.xhpc.mapper.XhpcDeviceMessageMapper;
|
import com.xhpc.mapper.XhpcDeviceMessageMapper;
|
||||||
|
import com.xhpc.pp.domain.XhpcDeviceMessage;
|
||||||
import com.xhpc.pp.tx.ServiceParameter;
|
import com.xhpc.pp.tx.ServiceParameter;
|
||||||
import com.xhpc.pp.tx.ServiceResult;
|
import com.xhpc.pp.tx.ServiceResult;
|
||||||
import com.xhpc.pp.tx.logic.ServiceLogic;
|
import com.xhpc.pp.tx.logic.ServiceLogic;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user