Commit 4c8d18cd4fe5aa6978ea1173e85c65572cc7f7b0

Authored by yangfei
1 parent 94fb00acc6

医院服务价格配置

Showing 12 changed files with 741 additions and 0 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/HospitalDoctServiceMapper.java View file @ 4c8d18c
  1 +package com.lyms.platform.permission.dao.master;
  2 +
  3 +import com.lyms.platform.permission.model.HospitalDoctService;
  4 +import com.lyms.platform.permission.model.HospitalDoctServiceQuery;
  5 +
  6 +import java.util.List;
  7 +
  8 +public interface HospitalDoctServiceMapper {
  9 + public void addHospitalDoctService(HospitalDoctService obj);
  10 +
  11 + public void updateHospitalDoctService(HospitalDoctService obj);
  12 +
  13 + public void deleteHospitalDoctService(String id);
  14 +
  15 + public HospitalDoctService getHospitalDoctService(String id);
  16 +
  17 + public int queryHospitalDoctServiceCount(HospitalDoctServiceQuery query);
  18 +
  19 + public List<HospitalDoctService> queryHospitalDoctService(HospitalDoctServiceQuery query);
  20 +
  21 +}
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/HospitalServiceContentMapper.java View file @ 4c8d18c
  1 +package com.lyms.platform.permission.dao.master;
  2 +
  3 +import com.lyms.platform.permission.model.HospitalServiceContent;
  4 +import com.lyms.platform.permission.model.HospitalServiceContentQuery;
  5 +
  6 +import java.util.List;
  7 +
  8 +public interface HospitalServiceContentMapper {
  9 + public void addHospitalServiceContent(HospitalServiceContent obj);
  10 +
  11 + public void updateHospitalServiceContent(HospitalServiceContent obj);
  12 +
  13 + public void deleteHospitalServiceContent(String id);
  14 +
  15 + public HospitalServiceContent getHospitalServiceContent(String id);
  16 +
  17 + public int queryHospitalServiceContentCount(HospitalServiceContentQuery query);
  18 +
  19 + public List<HospitalServiceContent> queryHospitalServiceContent(HospitalServiceContentQuery query);
  20 +
  21 +}
platform-biz-service/src/main/java/com/lyms/platform/permission/model/HospitalDoctService.java View file @ 4c8d18c
  1 +package com.lyms.platform.permission.model;
  2 +
  3 +import java.math.BigDecimal;
  4 +
  5 +/**
  6 + * 服务医生信息
  7 + */
  8 +public class HospitalDoctService {
  9 + /**
  10 + * id
  11 + */
  12 + private String id;
  13 + /**
  14 + * 医院服务内容id
  15 + */
  16 + private String hospServiceId;
  17 + /**
  18 + * 医生id
  19 + */
  20 + private String doctId;
  21 + /**
  22 + * 医院id
  23 + */
  24 + private String hospId;
  25 + /**
  26 + * 医生价格
  27 + */
  28 + private BigDecimal doctPrice;
  29 +
  30 + public String getId() {
  31 + return id;
  32 + }
  33 +
  34 +
  35 + public void setId(String id) {
  36 + this.id = id;
  37 +
  38 + }
  39 +
  40 + public String getHospServiceId() {
  41 + return hospServiceId;
  42 + }
  43 +
  44 +
  45 + public void setHospServiceId(String hospServiceId) {
  46 + this.hospServiceId = hospServiceId;
  47 +
  48 + }
  49 +
  50 + public String getDoctId() {
  51 + return doctId;
  52 + }
  53 +
  54 +
  55 + public void setDoctId(String doctId) {
  56 + this.doctId = doctId;
  57 +
  58 + }
  59 +
  60 + public String getHospId() {
  61 + return hospId;
  62 + }
  63 +
  64 +
  65 + public void setHospId(String hospId) {
  66 + this.hospId = hospId;
  67 +
  68 + }
  69 +
  70 + public BigDecimal getDoctPrice() {
  71 + return doctPrice;
  72 + }
  73 +
  74 +
  75 + public void setDoctPrice(BigDecimal doctPrice) {
  76 + this.doctPrice = doctPrice;
  77 +
  78 + }
  79 +}
platform-biz-service/src/main/java/com/lyms/platform/permission/model/HospitalDoctServiceQuery.java View file @ 4c8d18c
  1 +package com.lyms.platform.permission.model;
  2 +
  3 +
  4 +import com.lyms.platform.common.dao.BaseQuery;
  5 +
  6 +import java.math.BigDecimal;
  7 +
  8 +/**
  9 + * 服务医生信息
  10 + */
  11 +public class HospitalDoctServiceQuery extends BaseQuery {
  12 + /**
  13 + * id
  14 + */
  15 + private String id;
  16 + /**
  17 + * 医院服务内容id
  18 + */
  19 + private String hospServiceId;
  20 + /**
  21 + * 医生id
  22 + */
  23 + private String doctId;
  24 + /**
  25 + * 医院id
  26 + */
  27 + private String hospId;
  28 + /**
  29 + * 医生价格
  30 + */
  31 + private BigDecimal doctPrice;
  32 +
  33 + public String getId() {
  34 + return id;
  35 + }
  36 +
  37 +
  38 + public void setId(String id) {
  39 + this.id = id;
  40 +
  41 + }
  42 +
  43 + public String getHospServiceId() {
  44 + return hospServiceId;
  45 + }
  46 +
  47 +
  48 + public void setHospServiceId(String hospServiceId) {
  49 + this.hospServiceId = hospServiceId;
  50 +
  51 + }
  52 +
  53 + public String getDoctId() {
  54 + return doctId;
  55 + }
  56 +
  57 +
  58 + public void setDoctId(String doctId) {
  59 + this.doctId = doctId;
  60 +
  61 + }
  62 +
  63 + public String getHospId() {
  64 + return hospId;
  65 + }
  66 +
  67 +
  68 + public void setHospId(String hospId) {
  69 + this.hospId = hospId;
  70 +
  71 + }
  72 +
  73 + public BigDecimal getDoctPrice() {
  74 + return doctPrice;
  75 + }
  76 +
  77 +
  78 + public void setDoctPrice(BigDecimal doctPrice) {
  79 + this.doctPrice = doctPrice;
  80 +
  81 + }
  82 +}
platform-biz-service/src/main/java/com/lyms/platform/permission/model/HospitalServiceContent.java View file @ 4c8d18c
  1 +package com.lyms.platform.permission.model;
  2 +
  3 +import java.math.BigDecimal;
  4 +import java.util.Date;
  5 +
  6 +/**
  7 + * 医院服务配置
  8 + */
  9 +public class HospitalServiceContent {
  10 + /**
  11 + * id
  12 + */
  13 + private String id;
  14 + /**
  15 + * 医院id
  16 + */
  17 + private String hospitalId;
  18 + /**
  19 + * 服务类型
  20 + */
  21 + private Integer serType;
  22 + /**
  23 + * 服务价格
  24 + */
  25 + private BigDecimal serPrice;
  26 + /**
  27 + * 操作时间
  28 + */
  29 + private Date createDate;
  30 + /**
  31 + * 操作人
  32 + */
  33 + private String createUser;
  34 +
  35 + public String getId() {
  36 + return id;
  37 + }
  38 +
  39 +
  40 + public void setId(String id) {
  41 + this.id = id;
  42 +
  43 + }
  44 +
  45 + public String getHospitalId() {
  46 + return hospitalId;
  47 + }
  48 +
  49 +
  50 + public void setHospitalId(String hospitalId) {
  51 + this.hospitalId = hospitalId;
  52 +
  53 + }
  54 +
  55 + public Integer getSerType() {
  56 + return serType;
  57 + }
  58 +
  59 +
  60 + public void setSerType(Integer serType) {
  61 + this.serType = serType;
  62 +
  63 + }
  64 +
  65 + public BigDecimal getSerPrice() {
  66 + return serPrice;
  67 + }
  68 +
  69 +
  70 + public void setSerPrice(BigDecimal serPrice) {
  71 + this.serPrice = serPrice;
  72 +
  73 + }
  74 +
  75 + public Date getCreateDate() {
  76 + return createDate;
  77 + }
  78 +
  79 +
  80 + public void setCreateDate(Date createDate) {
  81 + this.createDate = createDate;
  82 +
  83 + }
  84 +
  85 + public String getCreateUser() {
  86 + return createUser;
  87 + }
  88 +
  89 +
  90 + public void setCreateUser(String createUser) {
  91 + this.createUser = createUser;
  92 +
  93 + }
  94 +}
platform-biz-service/src/main/java/com/lyms/platform/permission/model/HospitalServiceContentQuery.java View file @ 4c8d18c
  1 +package com.lyms.platform.permission.model;
  2 +
  3 +
  4 +import com.lyms.platform.common.dao.BaseQuery;
  5 +
  6 +import java.math.BigDecimal;
  7 +import java.util.Date;
  8 +
  9 +/**
  10 + * 医院服务配置
  11 + */
  12 +public class HospitalServiceContentQuery extends BaseQuery {
  13 + /**
  14 + * id
  15 + */
  16 + private String id;
  17 + /**
  18 + * 医院id
  19 + */
  20 + private String hospitalId;
  21 + /**
  22 + * 服务类型
  23 + */
  24 + private Integer serType;
  25 + /**
  26 + * 服务价格
  27 + */
  28 + private BigDecimal serPrice;
  29 + /**
  30 + * 操作时间
  31 + */
  32 + private Date createDate;
  33 + /**
  34 + * 操作人
  35 + */
  36 + private String createUser;
  37 +
  38 + public String getId() {
  39 + return id;
  40 + }
  41 +
  42 +
  43 + public void setId(String id) {
  44 + this.id = id;
  45 +
  46 + }
  47 +
  48 + public String getHospitalId() {
  49 + return hospitalId;
  50 + }
  51 +
  52 +
  53 + public void setHospitalId(String hospitalId) {
  54 + this.hospitalId = hospitalId;
  55 +
  56 + }
  57 +
  58 + public Integer getSerType() {
  59 + return serType;
  60 + }
  61 +
  62 +
  63 + public void setSerType(Integer serType) {
  64 + this.serType = serType;
  65 +
  66 + }
  67 +
  68 + public BigDecimal getSerPrice() {
  69 + return serPrice;
  70 + }
  71 +
  72 +
  73 + public void setSerPrice(BigDecimal serPrice) {
  74 + this.serPrice = serPrice;
  75 +
  76 + }
  77 +
  78 + public Date getCreateDate() {
  79 + return createDate;
  80 + }
  81 +
  82 +
  83 + public void setCreateDate(Date createDate) {
  84 + this.createDate = createDate;
  85 +
  86 + }
  87 +
  88 + public String getCreateUser() {
  89 + return createUser;
  90 + }
  91 +
  92 +
  93 + public void setCreateUser(String createUser) {
  94 + this.createUser = createUser;
  95 +
  96 + }
  97 +}
platform-biz-service/src/main/java/com/lyms/platform/permission/service/HospitalDoctServiceService.java View file @ 4c8d18c
  1 +package com.lyms.platform.permission.service;
  2 +
  3 +import com.lyms.platform.permission.model.HospitalDoctService;
  4 +import com.lyms.platform.permission.model.HospitalDoctServiceQuery;
  5 +
  6 +import java.util.List;
  7 +
  8 +public interface HospitalDoctServiceService {
  9 + public void addHospitalDoctService(HospitalDoctService obj);
  10 +
  11 + public void updateHospitalDoctService(HospitalDoctService obj);
  12 +
  13 + public void deleteHospitalDoctService(String id);
  14 +
  15 + public HospitalDoctService getHospitalDoctService(String id);
  16 +
  17 + public int queryHospitalDoctServiceCount(HospitalDoctServiceQuery query);
  18 +
  19 + public List<HospitalDoctService> queryHospitalDoctService(HospitalDoctServiceQuery query);
  20 +
  21 +}
platform-biz-service/src/main/java/com/lyms/platform/permission/service/HospitalServiceContentService.java View file @ 4c8d18c
  1 +package com.lyms.platform.permission.service;
  2 +
  3 +import com.lyms.platform.permission.model.HospitalServiceContent;
  4 +import com.lyms.platform.permission.model.HospitalServiceContentQuery;
  5 +
  6 +import java.util.List;
  7 +
  8 +public interface HospitalServiceContentService {
  9 + public void addHospitalServiceContent(HospitalServiceContent obj);
  10 +
  11 + public void updateHospitalServiceContent(HospitalServiceContent obj);
  12 +
  13 + public void deleteHospitalServiceContent(String id);
  14 +
  15 + public HospitalServiceContent getHospitalServiceContent(String id);
  16 +
  17 + public int queryHospitalServiceContentCount(HospitalServiceContentQuery query);
  18 +
  19 + public List<HospitalServiceContent> queryHospitalServiceContent(HospitalServiceContentQuery query);
  20 +
  21 +}
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/HospitalDoctServiceServiceImpl.java View file @ 4c8d18c
  1 +package com.lyms.platform.permission.service.impl;
  2 +
  3 +import com.lyms.platform.permission.dao.master.HospitalDoctServiceMapper;
  4 +import com.lyms.platform.permission.model.HospitalDoctService;
  5 +import com.lyms.platform.permission.model.HospitalDoctServiceQuery;
  6 +import com.lyms.platform.permission.service.HospitalDoctServiceService;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.stereotype.Service;
  9 +
  10 +import java.util.List;
  11 +
  12 +@Service
  13 +public class HospitalDoctServiceServiceImpl implements HospitalDoctServiceService {
  14 +
  15 + @Autowired
  16 + private HospitalDoctServiceMapper hospitalDoctServiceMapper;
  17 +
  18 + @Override
  19 + public void addHospitalDoctService(HospitalDoctService obj) {
  20 + hospitalDoctServiceMapper.addHospitalDoctService(obj);
  21 + }
  22 +
  23 + @Override
  24 + public void updateHospitalDoctService(HospitalDoctService obj) {
  25 + hospitalDoctServiceMapper.updateHospitalDoctService(obj);
  26 + }
  27 +
  28 + @Override
  29 + public void deleteHospitalDoctService(String id) {
  30 + hospitalDoctServiceMapper.deleteHospitalDoctService(id);
  31 + }
  32 +
  33 + @Override
  34 + public HospitalDoctService getHospitalDoctService(String id) {
  35 + return hospitalDoctServiceMapper.getHospitalDoctService(id);
  36 + }
  37 +
  38 + @Override
  39 + public int queryHospitalDoctServiceCount(HospitalDoctServiceQuery query) {
  40 + return hospitalDoctServiceMapper.queryHospitalDoctServiceCount(query);
  41 + }
  42 +
  43 + @Override
  44 + public List<HospitalDoctService> queryHospitalDoctService(HospitalDoctServiceQuery query) {
  45 + if (query.getNeed() != null) {
  46 + query.mysqlBuild(hospitalDoctServiceMapper.queryHospitalDoctServiceCount(query));
  47 + }
  48 + return hospitalDoctServiceMapper.queryHospitalDoctService(query);
  49 + }
  50 +
  51 +}
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/HospitalServiceContentServiceImpl.java View file @ 4c8d18c
  1 +package com.lyms.platform.permission.service.impl;
  2 +
  3 +import com.lyms.platform.permission.dao.master.HospitalServiceContentMapper;
  4 +import com.lyms.platform.permission.model.HospitalServiceContent;
  5 +import com.lyms.platform.permission.model.HospitalServiceContentQuery;
  6 +import com.lyms.platform.permission.service.HospitalServiceContentService;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.stereotype.Service;
  9 +
  10 +import java.util.List;
  11 +
  12 +@Service
  13 +public class HospitalServiceContentServiceImpl implements HospitalServiceContentService {
  14 +
  15 + @Autowired
  16 + private HospitalServiceContentMapper hospitalServiceContentMapper;
  17 +
  18 + @Override
  19 + public void addHospitalServiceContent(HospitalServiceContent obj) {
  20 + hospitalServiceContentMapper.addHospitalServiceContent(obj);
  21 + }
  22 +
  23 + @Override
  24 + public void updateHospitalServiceContent(HospitalServiceContent obj) {
  25 + hospitalServiceContentMapper.updateHospitalServiceContent(obj);
  26 + }
  27 +
  28 + @Override
  29 + public void deleteHospitalServiceContent(String id) {
  30 + hospitalServiceContentMapper.deleteHospitalServiceContent(id);
  31 + }
  32 +
  33 + @Override
  34 + public HospitalServiceContent getHospitalServiceContent(String id) {
  35 + return hospitalServiceContentMapper.getHospitalServiceContent(id);
  36 + }
  37 +
  38 + @Override
  39 + public int queryHospitalServiceContentCount(HospitalServiceContentQuery query) {
  40 + return hospitalServiceContentMapper.queryHospitalServiceContentCount(query);
  41 + }
  42 +
  43 + @Override
  44 + public List<HospitalServiceContent> queryHospitalServiceContent(HospitalServiceContentQuery query) {
  45 + if (query.getNeed() != null) {
  46 + query.mysqlBuild(hospitalServiceContentMapper.queryHospitalServiceContentCount(query));
  47 + }
  48 + return hospitalServiceContentMapper.queryHospitalServiceContent(query);
  49 + }
  50 +
  51 +}
platform-biz-service/src/main/resources/mainOrm/master/HospitalDoctService.xml View file @ 4c8d18c
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3 +<mapper namespace="com.lyms.platform.permission.dao.HospitalDoctServiceMapper">
  4 +
  5 + <resultMap id="HospitalDoctServiceResultMap" type="com.lyms.platform.permission.model.HospitalDoctService">
  6 + <id column="id" property="id" jdbcType="VARCHAR"/>
  7 + <result column="hosp_service_id" property="hospServiceId" jdbcType="VARCHAR"/>
  8 + <result column="doct_id" property="doctId" jdbcType="VARCHAR"/>
  9 + <result column="hosp_id" property="hospId" jdbcType="VARCHAR"/>
  10 + <result column="doct_price" property="doctPrice" jdbcType="DECIMAL"/>
  11 + </resultMap>
  12 +
  13 +
  14 + <insert id="addHospitalDoctService" parameterType="com.lyms.platform.permission.model.HospitalDoctService">
  15 +insert into hospital_doct_service (id,hosp_service_id,doct_id,hosp_id,doct_price) values (#{id},#{hospServiceId},#{doctId},#{hospId},#{doctPrice})
  16 +</insert>
  17 +
  18 +
  19 + <update id="updateHospitalDoctService" parameterType="com.lyms.platform.permission.model.HospitalDoctService">
  20 + update hospital_doct_service
  21 + <set>
  22 + <if test="hospServiceId != null and hospServiceId != ''">
  23 + hosp_service_id = #{hospServiceId,jdbcType=VARCHAR},
  24 + </if>
  25 + <if test="doctId != null and doctId != ''">
  26 + doct_id = #{doctId,jdbcType=VARCHAR},
  27 + </if>
  28 + <if test="hospId != null and hospId != ''">
  29 + hosp_id = #{hospId,jdbcType=VARCHAR},
  30 + </if>
  31 + <if test="doctPrice != null">
  32 + doct_price = #{doctPrice,jdbcType=DECIMAL},
  33 + </if>
  34 + </set>
  35 + where id = #{id,jdbcType=VARCHAR}
  36 + </update>
  37 +
  38 +
  39 + <delete id="deleteHospitalDoctService" parameterType="java.lang.String">
  40 +delete from hospital_doct_service where id = #{id,jdbcType=VARCHAR}
  41 +</delete>
  42 +
  43 +
  44 + <select id="getHospitalDoctService" resultMap="HospitalDoctServiceResultMap" parameterType="java.lang.String">
  45 +select id,hosp_service_id,doct_id,hosp_id,doct_price
  46 + from hospital_doct_service where id = #{id,jdbcType=VARCHAR}
  47 +</select>
  48 +
  49 +
  50 + <sql id="orderAndLimit">
  51 + <if test="sort != null and sort != '' ">
  52 + order by ${sort}
  53 + <if test="need != null">
  54 + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER}
  55 + </if>
  56 + </if>
  57 + </sql>
  58 +
  59 +
  60 + <sql id="HospitalDoctServiceCondition">
  61 + <where>
  62 + 1 = 1
  63 + <if test="id != null and id != ''">
  64 + and id = #{id,jdbcType=VARCHAR}
  65 + </if>
  66 + <if test="hospServiceId != null and hospServiceId != ''">
  67 + and hosp_service_id = #{hospServiceId,jdbcType=VARCHAR}
  68 + </if>
  69 + <if test="doctId != null and doctId != ''">
  70 + and doct_id = #{doctId,jdbcType=VARCHAR}
  71 + </if>
  72 + <if test="hospId != null and hospId != ''">
  73 + and hosp_id = #{hospId,jdbcType=VARCHAR}
  74 + </if>
  75 + <if test="doctPrice != null">
  76 + and doct_price = #{doctPrice,jdbcType=DECIMAL}
  77 + </if>
  78 + </where>
  79 + </sql>
  80 +
  81 +
  82 + <select id="queryHospitalDoctService" resultMap="HospitalDoctServiceResultMap"
  83 + parameterType="com.lyms.platform.permission.model.HospitalDoctServiceQuery">
  84 + select id,hosp_service_id,doct_id,hosp_id,doct_price
  85 + from hospital_doct_service
  86 + <include refid="HospitalDoctServiceCondition"/>
  87 + <include refid="orderAndLimit"/>
  88 + </select>
  89 +
  90 +
  91 + <select id="queryHospitalDoctServiceCount" resultType="int"
  92 + parameterType="com.lyms.platform.permission.model.HospitalDoctServiceQuery">
  93 + select count(1) from hospital_doct_service
  94 + <include refid="HospitalDoctServiceCondition"/>
  95 + </select>
  96 +
  97 +
  98 +</mapper>
platform-biz-service/src/main/resources/mainOrm/master/HospitalServiceContent.xml View file @ 4c8d18c
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3 +<mapper namespace="com.lyms.platform.permission.dao.HospitalServiceContentMapper">
  4 +
  5 + <resultMap id="HospitalServiceContentResultMap" type="com.lyms.platform.permission.model.HospitalServiceContent">
  6 + <id column="id" property="id" jdbcType="VARCHAR"/>
  7 + <result column="hospital_id" property="hospitalId" jdbcType="VARCHAR"/>
  8 + <result column="ser_type" property="serType" jdbcType="INTEGER"/>
  9 + <result column="ser_price" property="serPrice" jdbcType="DECIMAL"/>
  10 + <result column="create_date" property="createDate" jdbcType="TIMESTAMP"/>
  11 + <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
  12 + </resultMap>
  13 +
  14 +
  15 + <insert id="addHospitalServiceContent" parameterType="com.lyms.platform.permission.model.HospitalServiceContent">
  16 +insert into hospital_service_content (id,hospital_id,ser_type,ser_price,create_date,create_user) values (#{id},#{hospitalId},#{serType},#{serPrice},#{createDate},#{createUser})
  17 +</insert>
  18 +
  19 +
  20 + <update id="updateHospitalServiceContent" parameterType="com.lyms.platform.permission.model.HospitalServiceContent">
  21 + update hospital_service_content
  22 + <set>
  23 + <if test="hospitalId != null and hospitalId != ''">
  24 + hospital_id = #{hospitalId,jdbcType=VARCHAR},
  25 + </if>
  26 + <if test="serType != null and serType >= 0">
  27 + ser_type = #{serType,jdbcType=INTEGER},
  28 + </if>
  29 + <if test="serPrice != null">
  30 + ser_price = #{serPrice,jdbcType=DECIMAL},
  31 + </if>
  32 + <if test="createDate != null">
  33 + create_date = #{createDate,jdbcType=TIMESTAMP},
  34 + </if>
  35 + <if test="createUser != null and createUser != ''">
  36 + create_user = #{createUser,jdbcType=VARCHAR},
  37 + </if>
  38 + </set>
  39 + where id = #{id,jdbcType=VARCHAR}
  40 + </update>
  41 +
  42 +
  43 + <delete id="deleteHospitalServiceContent" parameterType="java.lang.String">
  44 +delete from hospital_service_content where id = #{id,jdbcType=VARCHAR}
  45 +</delete>
  46 +
  47 +
  48 + <select id="getHospitalServiceContent" resultMap="HospitalServiceContentResultMap" parameterType="java.lang.String">
  49 +select id,hospital_id,ser_type,ser_price,create_date,create_user
  50 + from hospital_service_content where id = #{id,jdbcType=VARCHAR}
  51 +</select>
  52 +
  53 +
  54 + <sql id="orderAndLimit">
  55 + <if test="sort != null and sort != '' ">
  56 + order by ${sort}
  57 + <if test="need != null">
  58 + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER}
  59 + </if>
  60 + </if>
  61 + </sql>
  62 +
  63 +
  64 + <sql id="HospitalServiceContentCondition">
  65 + <where>
  66 + 1 = 1
  67 + <if test="id != null and id != ''">
  68 + and id = #{id,jdbcType=VARCHAR}
  69 + </if>
  70 + <if test="hospitalId != null and hospitalId != ''">
  71 + and hospital_id = #{hospitalId,jdbcType=VARCHAR}
  72 + </if>
  73 + <if test="serType != null and serType >= 0">
  74 + and ser_type = #{serType,jdbcType=INTEGER}
  75 + </if>
  76 + <if test="serPrice != null">
  77 + and ser_price = #{serPrice,jdbcType=DECIMAL}
  78 + </if>
  79 + <if test="createDate != null">
  80 + and create_date = #{createDate,jdbcType=TIMESTAMP}
  81 + </if>
  82 + <if test="createUser != null and createUser != ''">
  83 + and create_user = #{createUser,jdbcType=VARCHAR}
  84 + </if>
  85 + </where>
  86 + </sql>
  87 +
  88 +
  89 + <select id="queryHospitalServiceContent" resultMap="HospitalServiceContentResultMap"
  90 + parameterType="com.lyms.platform.permission.model.HospitalServiceContentQuery">
  91 + select id,hospital_id,ser_type,ser_price,create_date,create_user
  92 + from hospital_service_content
  93 + <include refid="HospitalServiceContentCondition"/>
  94 + <include refid="orderAndLimit"/>
  95 + </select>
  96 +
  97 +
  98 + <select id="queryHospitalServiceContentCount" resultType="int"
  99 + parameterType="com.lyms.platform.permission.model.HospitalServiceContentQuery">
  100 + select count(1) from hospital_service_content
  101 + <include refid="HospitalServiceContentCondition"/>
  102 + </select>
  103 +
  104 +
  105 +</mapper>