mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-27 14:35:11 +08:00
添加vin码启动相关逻辑代码
This commit is contained in:
113
jsowell-pile/src/main/resources/mapper/pile/CarVinInfoMapper.xml
Normal file
113
jsowell-pile/src/main/resources/mapper/pile/CarVinInfoMapper.xml
Normal file
@@ -0,0 +1,113 @@
|
||||
<?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.jsowell.pile.mapper.CarVinInfoMapper">
|
||||
|
||||
<resultMap type="com.jsowell.pile.domain.CarVinInfo" id="CarVinInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="vinCode" column="vin_code" />
|
||||
<result property="status" column="status" />
|
||||
<result property="memberId" column="member_id" />
|
||||
<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="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCarVinInfoVo">
|
||||
select id, vin_code, status, member_id, create_by, create_time, update_by, update_time, del_flag from car_vin_info
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, vin_code, status, member_id, create_by, create_time, update_by, update_time, del_flag
|
||||
</sql>
|
||||
|
||||
<select id="selectCarVinInfoList" parameterType="com.jsowell.pile.domain.CarVinInfo" resultMap="CarVinInfoResult">
|
||||
<include refid="selectCarVinInfoVo"/>
|
||||
<where>
|
||||
<if test="vinCode != null and vinCode != ''"> and vin_code = #{vinCode}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="memberId != null and memberId != ''"> and member_id = #{memberId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCarVinInfoById" parameterType="Long" resultMap="CarVinInfoResult">
|
||||
<include refid="selectCarVinInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCarVinInfo" parameterType="com.jsowell.pile.domain.CarVinInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into car_vin_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="vinCode != null">vin_code,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="memberId != null">member_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="vinCode != null">#{vinCode},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="memberId != null">#{memberId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCarVinInfo" parameterType="com.jsowell.pile.domain.CarVinInfo">
|
||||
update car_vin_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="vinCode != null">vin_code = #{vinCode},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="memberId != null">member_id = #{memberId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCarVinInfoById" parameterType="Long">
|
||||
delete from car_vin_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCarVinInfoByIds" parameterType="String">
|
||||
delete from car_vin_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectVinInfoByVin" resultMap="CarVinInfoResult">
|
||||
select <include refid="Base_Column_List"/>
|
||||
from car_vin_info
|
||||
where vin_code = #{vinCode,jdbcType=VARCHAR}
|
||||
and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="getMemberInfoByVinCode" resultType="com.jsowell.pile.vo.CarVinInfoVO">
|
||||
select
|
||||
t1.id,
|
||||
t1.vin_code as vinCode,
|
||||
t1.status,
|
||||
t1.member_id as memberId,
|
||||
t2.mobile_number as phoneNumber,
|
||||
t3.principal_balance as principalBalance,
|
||||
t3.gift_balance as giftBalance
|
||||
from
|
||||
car_vin_info t1
|
||||
join member_basic_info t2 on t1.member_id = t2.member_id and t1.del_flag = '0'
|
||||
join member_wallet_info t3 on t2.member_id = t3.member_id and t2.status = '1'
|
||||
where t1.vin_code = #{vinCode,jdbcType=VARCHAR}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -14,6 +14,7 @@
|
||||
<result property="connectorCode" column="connector_code"/>
|
||||
<result property="pileConnectorCode" column="pile_connector_code"/>
|
||||
<result property="logicCard" column="logic_card"/>
|
||||
<result property="vinCode" column="vin_code"/>
|
||||
<result property="startMode" column="start_mode"/>
|
||||
<result property="payMode" column="pay_mode"/>
|
||||
<result property="payStatus" column="pay_status"/>
|
||||
@@ -94,6 +95,7 @@
|
||||
connector_code,
|
||||
pile_connector_code,
|
||||
logic_card,
|
||||
vin_code,
|
||||
start_mode,
|
||||
pay_mode,
|
||||
pay_status,
|
||||
|
||||
Reference in New Issue
Block a user