|
@@ -6,12 +6,13 @@
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
<result column="servant_code" property="servant_code" jdbcType="INTEGER" />
|
|
<result column="servant_code" property="servant_code" jdbcType="INTEGER" />
|
|
<result column="certificate_code" property="certificate_code" jdbcType="INTEGER" />
|
|
<result column="certificate_code" property="certificate_code" jdbcType="INTEGER" />
|
|
- <result column="start_date" property="start_date" jdbcType="DATE" />
|
|
|
|
- <result column="end_date" property="end_date" jdbcType="DATE" />
|
|
|
|
|
|
+ <result column="start_date" property="start_date" jdbcType="VARCHAR" />
|
|
|
|
+ <result column="end_date" property="end_date" jdbcType="VARCHAR" />
|
|
|
|
+ <result column="certificate_name" property="certificate_name" jdbcType="VARCHAR" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List" >
|
|
<sql id="Base_Column_List" >
|
|
- id, servant_code, certificate_code,start_date,end_date
|
|
|
|
|
|
+ id, servant_code, certificate_code,start_date,end_date,certificate_name
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<!-- 得到月嫂证书信息 -->
|
|
<!-- 得到月嫂证书信息 -->
|
|
@@ -21,10 +22,20 @@
|
|
from mm_info_certificate
|
|
from mm_info_certificate
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <!-- 根据id查找月嫂证书信息 -->
|
|
|
|
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
|
|
|
+ <select id="getCertificateCount" parameterType="java.lang.Integer" resultType="java.lang.Integer" >
|
|
select
|
|
select
|
|
- <include refid="Base_Column_List" />
|
|
|
|
|
|
+ count(1)
|
|
|
|
+ from mm_info_certificate
|
|
|
|
+ where servant_code = #{servant_code,jdbcType=INTEGER}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getInfoCertificate" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
|
+ select
|
|
|
|
+ id,
|
|
|
|
+ fgetcertificatename(certificate_code) certificate_name,
|
|
|
|
+ certificate_code,
|
|
|
|
+ DATE_FORMAT(start_date,'%Y-%m-%d') start_date,
|
|
|
|
+ DATE_FORMAT(end_date,'%Y-%m-%d') end_date
|
|
from mm_info_certificate
|
|
from mm_info_certificate
|
|
where servant_code = #{servant_code,jdbcType=INTEGER}
|
|
where servant_code = #{servant_code,jdbcType=INTEGER}
|
|
</select>
|
|
</select>
|
|
@@ -78,10 +89,10 @@
|
|
certificate_code = #{certificate_code,jdbcType=VARCHAR},
|
|
certificate_code = #{certificate_code,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
<if test="start_date != null" >
|
|
<if test="start_date != null" >
|
|
- start_date = #{start_date,jdbcType=INTEGER},
|
|
|
|
|
|
+ start_date = #{start_date,jdbcType=DATE},
|
|
</if>
|
|
</if>
|
|
<if test="end_date != null" >
|
|
<if test="end_date != null" >
|
|
- end_date = #{end_date,jdbcType=VARCHAR}
|
|
|
|
|
|
+ end_date = #{end_date,jdbcType=DATE}
|
|
</if>
|
|
</if>
|
|
</set>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|