1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <?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.miaxis.newgzpt.mapper.GzptUserInfoMapper">
- <!-- 定义结果映射 -->
- <resultMap type="com.miaxis.newgzpt.vo.GzptExamInfoVO" id="GzptExamInfoVOResultMap">
- <result property="userId" column="EI_USER_ID"/>
- <result property="userName" column="EI_USERNAME"/>
- <result property="kskm" column="EI_KSKM"/>
- <result property="score" column="EI_SCORE"/>
- <result property="crdate" column="EI_CRDATE"/>
- <result property="startDate" column="EI_STARTDATE"/>
- <result property="endDate" column="EI_ENDDATE"/>
- </resultMap>
- <select id="getList" resultType="com.miaxis.newgzpt.domain.GzptUserInfo">
- select * from GZPT_USER_INFO
- </select>
- <select id="getUserByWxlogin" parameterType="com.miaxis.newgzpt.dto.GzptUserInfoDTO" resultType="com.miaxis.newgzpt.domain.GzptUserInfo">
- select * from gzpt_user_info g where g.id =
- (select max(id) from gzpt_user_info g where g.logincode=#{logincode} and g.password=#{password} and city=#{city})
- </select>
- <select id="getUserByLoginCodeAndPw" parameterType="com.miaxis.newgzpt.dto.GzptUserInfoDTO" resultType="com.miaxis.newgzpt.domain.GzptUserInfo">
- select * from gzpt_user_info g where g.id =
- (select max(id) from gzpt_user_info g where g.logincode=#{logincode} and g.password=#{password})
- </select>
- <select id="getAppleUserInfo" parameterType="com.miaxis.newgzpt.dto.GzptUserInfoDTO" resultType="com.miaxis.newgzpt.domain.GzptUserInfo">
- select * from gzpt_user_info g where g.id =
- (select max(id) from gzpt_user_info g where g.logincode=#{logincode} and apptype=2)
- </select>
- <insert id="saveGzptUserInfo" parameterType="com.miaxis.newgzpt.domain.GzptUserInfo">
- insert into gzpt_user_info (id,user_name,sex,logincode,CARTYPE,PASSWORD,PHOTO
- ,NICKNAME,APPTYPE,CRDATE,pxjd,MN_STATUS,EDU_STATUS)
- VALUES (seq_gzpt_user_info.nextval, #{userName},
- #{sex},
- #{logincode},
- #{cartype},
- #{password},
- #{photo},
- #{nickname},
- #{apptype,jdbcType=VARCHAR},
- #{crdate},
- #{pxjd,jdbcType=NUMERIC},
- #{mnStatus,jdbcType=NUMERIC},
- #{eduStatus,jdbcType=NUMERIC})
- </insert>
- <select id="getInfoById" resultType="com.miaxis.newgzpt.domain.GzptUserInfo">
- select * from GZPT_USER_INFO where id =#{id,jdbcType=NUMERIC}
- </select>
- <select id="getInfoByOutId" resultType="com.miaxis.newgzpt.domain.GzptUserInfo">
- select * from GZPT_USER_INFO where out_id =#{outId,jdbcType=NUMERIC}
- </select>
- <update id="updateUserBindCoach">
- update gzpt_user_info set is_bind_coach = 1 where out_id = #{outId,jdbcType=NUMERIC}
- </update>
- <update id="updateGzptUserOpenid">
- update gzpt_user_info set open_id = #{openid,jdbcType=VARCHAR} where id = (select max(id) from gzpt_user_info g where g.logincode=#{logincode,jdbcType=VARCHAR} and g.password=#{password,jdbcType=VARCHAR})
- </update>
- <select id="getUserScoreByOutId" resultMap="GzptExamInfoVOResultMap">
- select ei_user_id,ei_username,ei_kskm,ei_score,ei_crdate,ei_startdate,ei_enddate from gzpt_exam_info g where ei_user_id = (select id from gzpt_user_info u where u.out_id =#{stuOutId})
- order by ei_id desc
- </select>
- <select id="getUserInfoByOpenid" resultType="com.miaxis.newgzpt.domain.GzptUserInfo">
- select * from GZPT_USER_INFO where open_id =#{openid,jdbcType=VARCHAR}
- </select>
- <select id="getUserInfoCountByOpenid" resultType="Integer">
- select count(*) from GZPT_USER_INFO where open_id =#{openid,jdbcType=VARCHAR}
- </select>
- </mapper>
|