代码生成

master
zhuqing 2 years ago
parent 4751ed93e1
commit 67d665d02a

@ -65,7 +65,7 @@ public class SwaggerConfig
/* 设置安全模式swagger可以设置访问token */ /* 设置安全模式swagger可以设置访问token */
.securitySchemes(securitySchemes()) .securitySchemes(securitySchemes())
.securityContexts(securityContexts()) .securityContexts(securityContexts())
.pathMapping(pathMapping); .pathMapping("");
} }
/** /**

@ -22,6 +22,10 @@ public class TDoctor extends BaseEntity
@Excel(name = "腾讯openid") @Excel(name = "腾讯openid")
private String openId; private String openId;
/** 用户ID */
@Excel(name = "用户ID")
private Long userId;
/** 编号 */ /** 编号 */
@Excel(name = "编号") @Excel(name = "编号")
private String identifier; private String identifier;
@ -58,6 +62,10 @@ public class TDoctor extends BaseEntity
@Excel(name = "简介") @Excel(name = "简介")
private String introduction; private String introduction;
/** 职业医师照片路径 */
@Excel(name = "职业医师照片路径")
private String medicalLicense;
/** 医院 */ /** 医院 */
@Excel(name = "医院") @Excel(name = "医院")
private Long hospitalId; private Long hospitalId;
@ -83,6 +91,15 @@ public class TDoctor extends BaseEntity
{ {
return openId; return openId;
} }
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setIdentifier(String identifier) public void setIdentifier(String identifier)
{ {
this.identifier = identifier; this.identifier = identifier;
@ -164,6 +181,15 @@ public class TDoctor extends BaseEntity
{ {
return introduction; return introduction;
} }
public void setMedicalLicense(String medicalLicense)
{
this.medicalLicense = medicalLicense;
}
public String getMedicalLicense()
{
return medicalLicense;
}
public void setHospitalId(Long hospitalId) public void setHospitalId(Long hospitalId)
{ {
this.hospitalId = hospitalId; this.hospitalId = hospitalId;
@ -188,6 +214,7 @@ public class TDoctor extends BaseEntity
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("openId", getOpenId()) .append("openId", getOpenId())
.append("userId", getUserId())
.append("identifier", getIdentifier()) .append("identifier", getIdentifier())
.append("name", getName()) .append("name", getName())
.append("phone", getPhone()) .append("phone", getPhone())
@ -197,6 +224,7 @@ public class TDoctor extends BaseEntity
.append("title", getTitle()) .append("title", getTitle())
.append("speciality", getSpeciality()) .append("speciality", getSpeciality())
.append("introduction", getIntroduction()) .append("introduction", getIntroduction())
.append("medicalLicense", getMedicalLicense())
.append("hospitalId", getHospitalId()) .append("hospitalId", getHospitalId())
.append("delFlag", getDelFlag()) .append("delFlag", getDelFlag())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())

@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="TDoctor" id="TDoctorResult"> <resultMap type="TDoctor" id="TDoctorResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="openId" column="open_id" /> <result property="openId" column="open_id" />
<result property="userId" column="user_id" />
<result property="identifier" column="identifier" /> <result property="identifier" column="identifier" />
<result property="name" column="name" /> <result property="name" column="name" />
<result property="phone" column="phone" /> <result property="phone" column="phone" />
@ -16,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="title" column="title" /> <result property="title" column="title" />
<result property="speciality" column="speciality" /> <result property="speciality" column="speciality" />
<result property="introduction" column="introduction" /> <result property="introduction" column="introduction" />
<result property="medicalLicense" column="medical_license" />
<result property="hospitalId" column="hospital_id" /> <result property="hospitalId" column="hospital_id" />
<result property="delFlag" column="del_flag" /> <result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
@ -23,13 +25,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectTDoctorVo"> <sql id="selectTDoctorVo">
select id, open_id, identifier, name, phone, sex, age, marriage, title, speciality, introduction, hospital_id, del_flag, create_time, update_time from t_doctor select id, open_id, user_id, identifier, name, phone, sex, age, marriage, title, speciality, introduction, medical_license, hospital_id, del_flag, create_time, update_time from t_doctor
</sql> </sql>
<select id="selectTDoctorList" parameterType="TDoctor" resultMap="TDoctorResult"> <select id="selectTDoctorList" parameterType="TDoctor" resultMap="TDoctorResult">
<include refid="selectTDoctorVo"/> <include refid="selectTDoctorVo"/>
<where> <where>
<if test="openId != null and openId != ''"> and open_id = #{openId}</if> <if test="openId != null and openId != ''"> and open_id = #{openId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="identifier != null and identifier != ''"> and identifier = #{identifier}</if> <if test="identifier != null and identifier != ''"> and identifier = #{identifier}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if> <if test="phone != null and phone != ''"> and phone = #{phone}</if>
@ -39,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="title != null and title != ''"> and title = #{title}</if> <if test="title != null and title != ''"> and title = #{title}</if>
<if test="speciality != null and speciality != ''"> and speciality = #{speciality}</if> <if test="speciality != null and speciality != ''"> and speciality = #{speciality}</if>
<if test="introduction != null and introduction != ''"> and introduction = #{introduction}</if> <if test="introduction != null and introduction != ''"> and introduction = #{introduction}</if>
<if test="medicalLicense != null and medicalLicense != ''"> and medical_license = #{medicalLicense}</if>
<if test="hospitalId != null "> and hospital_id = #{hospitalId}</if> <if test="hospitalId != null "> and hospital_id = #{hospitalId}</if>
</where> </where>
</select> </select>
@ -52,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into t_doctor insert into t_doctor
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="openId != null">open_id,</if> <if test="openId != null">open_id,</if>
<if test="userId != null">user_id,</if>
<if test="identifier != null">identifier,</if> <if test="identifier != null">identifier,</if>
<if test="name != null and name != ''">name,</if> <if test="name != null and name != ''">name,</if>
<if test="phone != null">phone,</if> <if test="phone != null">phone,</if>
@ -61,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="title != null">title,</if> <if test="title != null">title,</if>
<if test="speciality != null">speciality,</if> <if test="speciality != null">speciality,</if>
<if test="introduction != null">introduction,</if> <if test="introduction != null">introduction,</if>
<if test="medicalLicense != null">medical_license,</if>
<if test="hospitalId != null">hospital_id,</if> <if test="hospitalId != null">hospital_id,</if>
<if test="delFlag != null">del_flag,</if> <if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
@ -68,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="openId != null">#{openId},</if> <if test="openId != null">#{openId},</if>
<if test="userId != null">#{userId},</if>
<if test="identifier != null">#{identifier},</if> <if test="identifier != null">#{identifier},</if>
<if test="name != null and name != ''">#{name},</if> <if test="name != null and name != ''">#{name},</if>
<if test="phone != null">#{phone},</if> <if test="phone != null">#{phone},</if>
@ -77,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="title != null">#{title},</if> <if test="title != null">#{title},</if>
<if test="speciality != null">#{speciality},</if> <if test="speciality != null">#{speciality},</if>
<if test="introduction != null">#{introduction},</if> <if test="introduction != null">#{introduction},</if>
<if test="medicalLicense != null">#{medicalLicense},</if>
<if test="hospitalId != null">#{hospitalId},</if> <if test="hospitalId != null">#{hospitalId},</if>
<if test="delFlag != null">#{delFlag},</if> <if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
@ -88,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_doctor update t_doctor
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="openId != null">open_id = #{openId},</if> <if test="openId != null">open_id = #{openId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="identifier != null">identifier = #{identifier},</if> <if test="identifier != null">identifier = #{identifier},</if>
<if test="name != null and name != ''">name = #{name},</if> <if test="name != null and name != ''">name = #{name},</if>
<if test="phone != null">phone = #{phone},</if> <if test="phone != null">phone = #{phone},</if>
@ -97,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="title != null">title = #{title},</if> <if test="title != null">title = #{title},</if>
<if test="speciality != null">speciality = #{speciality},</if> <if test="speciality != null">speciality = #{speciality},</if>
<if test="introduction != null">introduction = #{introduction},</if> <if test="introduction != null">introduction = #{introduction},</if>
<if test="medicalLicense != null">medical_license = #{medicalLicense},</if>
<if test="hospitalId != null">hospital_id = #{hospitalId},</if> <if test="hospitalId != null">hospital_id = #{hospitalId},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if> <if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>

Loading…
Cancel
Save