<?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.platform.dao.UserDao">

	<insert id="save" parameterType="com.platform.entity.UserVo" useGeneratedKeys="true" keyProperty="userId">
		insert into tb_user
		(
			`username`,
			`mobile`,
			`password`,
			`create_time`
		)
		values
			(
				#{username},
				#{mobile},
				#{password},
				#{createTime}
			)
	</insert>

	<select id="queryObject" resultType="com.platform.entity.UserVo">
		select * from tb_user where user_id = #{value}
	</select>

	<select id="queryByMobile" resultType="com.platform.entity.UserVo">
		select * from tb_user where mobile = #{value}
	</select>

</mapper>