forked from zhangyuan/epmet-cloud-lingshan
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.8 KiB
56 lines
1.8 KiB
<?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.epmet.dao.MiniInfoDao">
|
|
|
|
<!-- 插入小程序信息 -->
|
|
<insert id="insertMiniInfo">
|
|
<selectKey keyProperty="id" order="AFTER" resultType="String">
|
|
SELECT LAST_INSERT_ID() AS id
|
|
</selectKey>
|
|
INSERT INTO mini_info ( ID, CUSTOMER_ID, CLIENT_TYPE, NICK_NAME, HEAD_IMG, SERVICE_TYPE_INFO, VERIFY_TYPE_INFO, USER_NAME,
|
|
PRINCIPAL_NAME, SIGNATURE, QRCODE_URL, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME)
|
|
VALUES
|
|
(
|
|
REPLACE ( UUID(), '-', '' ),
|
|
#{customerId},
|
|
#{clientType},
|
|
#{nick_name},
|
|
#{head_img},
|
|
#{service_type_info},
|
|
#{verify_type_info},
|
|
#{user_name},
|
|
#{principal_name},
|
|
#{signature},
|
|
#{qrcode_url},
|
|
#{delFlag},
|
|
#{revision},
|
|
#{createdBy},
|
|
NOW(),
|
|
#{updatedBy},
|
|
NOW()
|
|
)
|
|
</insert>
|
|
|
|
<!-- 根据原始ID查询 customerId 和 clientType -->
|
|
<select id="selectCustomerIdAndClientByToUserName" resultType="com.epmet.dto.result.CustomerIdAndClientResultDTO">
|
|
SELECT
|
|
customer_id AS customerId,
|
|
client_type AS clientType
|
|
FROM
|
|
mini_info
|
|
WHERE
|
|
del_flag = 0
|
|
AND user_name = #{toUserName}
|
|
UNION ALL
|
|
SELECT
|
|
customer_id AS customerId,
|
|
client_type AS clientType
|
|
FROM
|
|
pa_info
|
|
WHERE
|
|
del_flag = 0
|
|
AND user_name = #{toUserName}
|
|
LIMIT 1
|
|
</select>
|
|
</mapper>
|