<?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="cn.iocoder.mall.user.dao.UserMapper">

    <insert id="insert" parameterType="UserDO" useGeneratedKeys="true" keyProperty="id">
        INSERT INTO users (
          id, mobile, create_time
        ) VALUES (
          #{id}, #{mobile}, #{createTime}
        )
    </insert>

    <select id="selectByMobile" parameterType="String" resultType="UserDO">
      SELECT
          id, mobile
      FROM users
      WHERE mobile = #{mobile}
    </select>

</mapper>