自动化立体仓库 - WMS系统
lty
1 天以前 1ec0f01384f5019aec98e0b8ced7c28c544a94e0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?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.zy.asrs.mapper.ErpTokenMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.ErpToken">
        <id column="id" property="id" />
        <result column="app_id" property="appId" />
        <result column="app_secrect" property="appSecrect" />
        <result column="token" property="token" />
        <result column="modi_time" property="modiTime" />
 
    </resultMap>
 
    <update id="upsertToken">
        if exists (select 1 from sys_erp_token where app_id = #{appId})
        begin
            update sys_erp_token
            set app_secrect = #{appSecrect},
                token = #{token},
                modi_time = #{modiTime}
            where app_id = #{appId}
        end
        else
        begin
            insert into sys_erp_token (app_id, app_secrect, token, modi_time)
            values (#{appId}, #{appSecrect}, #{token}, #{modiTime})
        end
    </update>
 
</mapper>