Commit 7cc9d9f111740debedb2caeedd25b971313acacb
1 parent
97a862cfaa
Exists in
master
and in
6 other branches
孕妇VIP服务开通记录服务层
Showing 6 changed files with 523 additions and 0 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/PatientServiceMapper.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/PatientService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/PatientServiceQuery.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/PatientServiceService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/PatientServiceServiceImpl.java
- platform-biz-service/src/main/resources/mainOrm/master/PatientService.xml
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/PatientServiceMapper.java
View file @
7cc9d9f
1 | +package com.lyms.platform.permission.dao.master; | |
2 | + | |
3 | +import com.lyms.platform.permission.model.PatientService; | |
4 | +import com.lyms.platform.permission.model.PatientServiceQuery; | |
5 | + | |
6 | +import java.util.List; | |
7 | + | |
8 | +public interface PatientServiceMapper { | |
9 | + public void addPatientService(PatientService obj); | |
10 | + | |
11 | + public void updatePatientService(PatientService obj); | |
12 | + | |
13 | + public void deletePatientService(String id); | |
14 | + | |
15 | + public PatientService getPatientService(String id); | |
16 | + | |
17 | + public int queryPatientServiceCount(PatientServiceQuery query); | |
18 | + | |
19 | + public List<PatientService> queryPatientService(PatientServiceQuery query); | |
20 | + | |
21 | +} |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/PatientService.java
View file @
7cc9d9f
1 | +package com.lyms.platform.permission.model; | |
2 | + | |
3 | +import java.util.Date; | |
4 | + | |
5 | +public class PatientService { | |
6 | + private String id; | |
7 | + private String parentid; | |
8 | + private String pid; | |
9 | + private Integer serType; | |
10 | + private String serDoct; | |
11 | + private Date createDate; | |
12 | + private String createUserName; | |
13 | + private String createUser; | |
14 | + private Integer serStatus; | |
15 | + private Date updateDate; | |
16 | + private String updateUserName; | |
17 | + private String updateUser; | |
18 | + | |
19 | + public String getId() { | |
20 | + return id; | |
21 | + } | |
22 | + | |
23 | + | |
24 | + public void setId(String id) { | |
25 | + this.id = id; | |
26 | + | |
27 | + } | |
28 | + | |
29 | + public String getParentid() { | |
30 | + return parentid; | |
31 | + } | |
32 | + | |
33 | + | |
34 | + public void setParentid(String parentid) { | |
35 | + this.parentid = parentid; | |
36 | + | |
37 | + } | |
38 | + | |
39 | + public String getPid() { | |
40 | + return pid; | |
41 | + } | |
42 | + | |
43 | + | |
44 | + public void setPid(String pid) { | |
45 | + this.pid = pid; | |
46 | + | |
47 | + } | |
48 | + | |
49 | + public Integer getSerType() { | |
50 | + return serType; | |
51 | + } | |
52 | + | |
53 | + | |
54 | + public void setSerType(Integer serType) { | |
55 | + this.serType = serType; | |
56 | + | |
57 | + } | |
58 | + | |
59 | + public String getSerDoct() { | |
60 | + return serDoct; | |
61 | + } | |
62 | + | |
63 | + | |
64 | + public void setSerDoct(String serDoct) { | |
65 | + this.serDoct = serDoct; | |
66 | + | |
67 | + } | |
68 | + | |
69 | + public Date getCreateDate() { | |
70 | + return createDate; | |
71 | + } | |
72 | + | |
73 | + | |
74 | + public void setCreateDate(Date createDate) { | |
75 | + this.createDate = createDate; | |
76 | + | |
77 | + } | |
78 | + | |
79 | + public String getCreateUserName() { | |
80 | + return createUserName; | |
81 | + } | |
82 | + | |
83 | + | |
84 | + public void setCreateUserName(String createUserName) { | |
85 | + this.createUserName = createUserName; | |
86 | + | |
87 | + } | |
88 | + | |
89 | + public String getCreateUser() { | |
90 | + return createUser; | |
91 | + } | |
92 | + | |
93 | + | |
94 | + public void setCreateUser(String createUser) { | |
95 | + this.createUser = createUser; | |
96 | + | |
97 | + } | |
98 | + | |
99 | + public Integer getSerStatus() { | |
100 | + return serStatus; | |
101 | + } | |
102 | + | |
103 | + | |
104 | + public void setSerStatus(Integer serStatus) { | |
105 | + this.serStatus = serStatus; | |
106 | + | |
107 | + } | |
108 | + | |
109 | + public Date getUpdateDate() { | |
110 | + return updateDate; | |
111 | + } | |
112 | + | |
113 | + | |
114 | + public void setUpdateDate(Date updateDate) { | |
115 | + this.updateDate = updateDate; | |
116 | + | |
117 | + } | |
118 | + | |
119 | + public String getUpdateUserName() { | |
120 | + return updateUserName; | |
121 | + } | |
122 | + | |
123 | + | |
124 | + public void setUpdateUserName(String updateUserName) { | |
125 | + this.updateUserName = updateUserName; | |
126 | + | |
127 | + } | |
128 | + | |
129 | + public String getUpdateUser() { | |
130 | + return updateUser; | |
131 | + } | |
132 | + | |
133 | + | |
134 | + public void setUpdateUser(String updateUser) { | |
135 | + this.updateUser = updateUser; | |
136 | + | |
137 | + } | |
138 | +} |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/PatientServiceQuery.java
View file @
7cc9d9f
1 | +package com.lyms.platform.permission.model; | |
2 | + | |
3 | + | |
4 | +import com.lyms.platform.common.dao.BaseQuery; | |
5 | + | |
6 | +import java.util.Date; | |
7 | + | |
8 | + | |
9 | +public class PatientServiceQuery extends BaseQuery { | |
10 | + private String id; | |
11 | + private String parentid; | |
12 | + private String pid; | |
13 | + private Integer serType; | |
14 | + private String serDoct; | |
15 | + private Date createDate; | |
16 | + private String createUserName; | |
17 | + private String createUser; | |
18 | + private Integer serStatus; | |
19 | + private Date updateDate; | |
20 | + private String updateUserName; | |
21 | + private String updateUser; | |
22 | + | |
23 | + public String getId() { | |
24 | + return id; | |
25 | + } | |
26 | + | |
27 | + | |
28 | + public void setId(String id) { | |
29 | + this.id = id; | |
30 | + | |
31 | + } | |
32 | + | |
33 | + public String getParentid() { | |
34 | + return parentid; | |
35 | + } | |
36 | + | |
37 | + | |
38 | + public void setParentid(String parentid) { | |
39 | + this.parentid = parentid; | |
40 | + | |
41 | + } | |
42 | + | |
43 | + public String getPid() { | |
44 | + return pid; | |
45 | + } | |
46 | + | |
47 | + | |
48 | + public void setPid(String pid) { | |
49 | + this.pid = pid; | |
50 | + | |
51 | + } | |
52 | + | |
53 | + public Integer getSerType() { | |
54 | + return serType; | |
55 | + } | |
56 | + | |
57 | + | |
58 | + public void setSerType(Integer serType) { | |
59 | + this.serType = serType; | |
60 | + | |
61 | + } | |
62 | + | |
63 | + public String getSerDoct() { | |
64 | + return serDoct; | |
65 | + } | |
66 | + | |
67 | + | |
68 | + public void setSerDoct(String serDoct) { | |
69 | + this.serDoct = serDoct; | |
70 | + | |
71 | + } | |
72 | + | |
73 | + public Date getCreateDate() { | |
74 | + return createDate; | |
75 | + } | |
76 | + | |
77 | + | |
78 | + public void setCreateDate(Date createDate) { | |
79 | + this.createDate = createDate; | |
80 | + | |
81 | + } | |
82 | + | |
83 | + public String getCreateUserName() { | |
84 | + return createUserName; | |
85 | + } | |
86 | + | |
87 | + | |
88 | + public void setCreateUserName(String createUserName) { | |
89 | + this.createUserName = createUserName; | |
90 | + | |
91 | + } | |
92 | + | |
93 | + public String getCreateUser() { | |
94 | + return createUser; | |
95 | + } | |
96 | + | |
97 | + | |
98 | + public void setCreateUser(String createUser) { | |
99 | + this.createUser = createUser; | |
100 | + | |
101 | + } | |
102 | + | |
103 | + public Integer getSerStatus() { | |
104 | + return serStatus; | |
105 | + } | |
106 | + | |
107 | + | |
108 | + public void setSerStatus(Integer serStatus) { | |
109 | + this.serStatus = serStatus; | |
110 | + | |
111 | + } | |
112 | + | |
113 | + public Date getUpdateDate() { | |
114 | + return updateDate; | |
115 | + } | |
116 | + | |
117 | + | |
118 | + public void setUpdateDate(Date updateDate) { | |
119 | + this.updateDate = updateDate; | |
120 | + | |
121 | + } | |
122 | + | |
123 | + public String getUpdateUserName() { | |
124 | + return updateUserName; | |
125 | + } | |
126 | + | |
127 | + | |
128 | + public void setUpdateUserName(String updateUserName) { | |
129 | + this.updateUserName = updateUserName; | |
130 | + | |
131 | + } | |
132 | + | |
133 | + public String getUpdateUser() { | |
134 | + return updateUser; | |
135 | + } | |
136 | + | |
137 | + | |
138 | + public void setUpdateUser(String updateUser) { | |
139 | + this.updateUser = updateUser; | |
140 | + | |
141 | + } | |
142 | +} |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/PatientServiceService.java
View file @
7cc9d9f
1 | +package com.lyms.platform.permission.service; | |
2 | + | |
3 | +import com.lyms.platform.permission.model.PatientService; | |
4 | +import com.lyms.platform.permission.model.PatientServiceQuery; | |
5 | + | |
6 | +import java.util.List; | |
7 | + | |
8 | +public interface PatientServiceService { | |
9 | + public void addPatientService(PatientService obj); | |
10 | + | |
11 | + public void updatePatientService(PatientService obj); | |
12 | + | |
13 | + public void deletePatientService(String id); | |
14 | + | |
15 | + public PatientService getPatientService(String id); | |
16 | + | |
17 | + public int queryPatientServiceCount(PatientServiceQuery query); | |
18 | + | |
19 | + public List<PatientService> queryPatientService(PatientServiceQuery query); | |
20 | + | |
21 | +} |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/PatientServiceServiceImpl.java
View file @
7cc9d9f
1 | +package com.lyms.platform.permission.service.impl; | |
2 | + | |
3 | +import com.lyms.platform.permission.dao.master.PatientServiceMapper; | |
4 | +import com.lyms.platform.permission.model.PatientService; | |
5 | +import com.lyms.platform.permission.model.PatientServiceQuery; | |
6 | +import com.lyms.platform.permission.service.PatientServiceService; | |
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 PatientServiceServiceImpl implements PatientServiceService { | |
14 | + | |
15 | + @Autowired | |
16 | + private PatientServiceMapper patientServiceMapper; | |
17 | + | |
18 | + @Override | |
19 | + public void addPatientService(PatientService obj) { | |
20 | + patientServiceMapper.addPatientService(obj); | |
21 | + } | |
22 | + | |
23 | + @Override | |
24 | + public void updatePatientService(PatientService obj) { | |
25 | + patientServiceMapper.updatePatientService(obj); | |
26 | + } | |
27 | + | |
28 | + @Override | |
29 | + public void deletePatientService(String id) { | |
30 | + patientServiceMapper.deletePatientService(id); | |
31 | + } | |
32 | + | |
33 | + @Override | |
34 | + public PatientService getPatientService(String id) { | |
35 | + return patientServiceMapper.getPatientService(id); | |
36 | + } | |
37 | + | |
38 | + @Override | |
39 | + public int queryPatientServiceCount(PatientServiceQuery query) { | |
40 | + return patientServiceMapper.queryPatientServiceCount(query); | |
41 | + } | |
42 | + | |
43 | + @Override | |
44 | + public List<PatientService> queryPatientService(PatientServiceQuery query) { | |
45 | + if (query.getNeed() != null) { | |
46 | + query.mysqlBuild(patientServiceMapper.queryPatientServiceCount(query)); | |
47 | + } | |
48 | + return patientServiceMapper.queryPatientService(query); | |
49 | + } | |
50 | + | |
51 | +} |
platform-biz-service/src/main/resources/mainOrm/master/PatientService.xml
View file @
7cc9d9f
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.master.PatientServiceMapper"> | |
4 | + | |
5 | +<resultMap id="PatientServiceResultMap" type="com.lyms.platform.permission.model.PatientService"> | |
6 | +<id column="id" property="id" jdbcType="VARCHAR" /> | |
7 | +<result column="parentid" property="parentid" jdbcType="VARCHAR" /> | |
8 | +<result column="pid" property="pid" jdbcType="VARCHAR" /> | |
9 | +<result column="ser_type" property="serType" jdbcType="INTEGER" /> | |
10 | +<result column="ser_doct" property="serDoct" jdbcType="VARCHAR" /> | |
11 | +<result column="create_date" property="createDate" jdbcType="TIMESTAMP" /> | |
12 | +<result column="create_user_name" property="createUserName" jdbcType="VARCHAR" /> | |
13 | +<result column="create_user" property="createUser" jdbcType="VARCHAR" /> | |
14 | +<result column="ser_status" property="serStatus" jdbcType="INTEGER" /> | |
15 | +<result column="update_date" property="updateDate" jdbcType="TIMESTAMP" /> | |
16 | +<result column="update_user_name" property="updateUserName" jdbcType="VARCHAR" /> | |
17 | +<result column="update_user" property="updateUser" jdbcType="VARCHAR" /> | |
18 | +</resultMap> | |
19 | + | |
20 | + | |
21 | + | |
22 | +<insert id="addPatientService" parameterType="com.lyms.platform.permission.model.PatientService"> | |
23 | +insert into patient_service (id,parentid,pid,ser_type,ser_doct,create_date,create_user_name,create_user,ser_status,update_date,update_user_name,update_user) values (#{id},#{parentid},#{pid},#{serType},#{serDoct},#{createDate},#{createUserName},#{createUser},#{serStatus},#{updateDate},#{updateUserName},#{updateUser}) | |
24 | +</insert> | |
25 | + | |
26 | + | |
27 | + | |
28 | +<update id="updatePatientService" parameterType="com.lyms.platform.permission.model.PatientService"> | |
29 | +update patient_service <set><if test="parentid != null and parentid != ''"> | |
30 | +parentid = #{parentid,jdbcType=VARCHAR}, | |
31 | +</if> | |
32 | +<if test="pid != null and pid != ''"> | |
33 | +pid = #{pid,jdbcType=VARCHAR}, | |
34 | +</if> | |
35 | +<if test="serType != null and serType >= 0"> | |
36 | +ser_type = #{serType,jdbcType=INTEGER}, | |
37 | +</if> | |
38 | +<if test="serDoct != null and serDoct != ''"> | |
39 | +ser_doct = #{serDoct,jdbcType=VARCHAR}, | |
40 | +</if> | |
41 | +<if test="createDate != null"> | |
42 | +create_date = #{createDate,jdbcType=TIMESTAMP}, | |
43 | +</if> | |
44 | +<if test="createUserName != null and createUserName != ''"> | |
45 | +create_user_name = #{createUserName,jdbcType=VARCHAR}, | |
46 | +</if> | |
47 | +<if test="createUser != null and createUser != ''"> | |
48 | +create_user = #{createUser,jdbcType=VARCHAR}, | |
49 | +</if> | |
50 | +<if test="serStatus != null and serStatus >= 0"> | |
51 | +ser_status = #{serStatus,jdbcType=INTEGER}, | |
52 | +</if> | |
53 | +<if test="updateDate != null"> | |
54 | +update_date = #{updateDate,jdbcType=TIMESTAMP}, | |
55 | +</if> | |
56 | +<if test="updateUserName != null and updateUserName != ''"> | |
57 | +update_user_name = #{updateUserName,jdbcType=VARCHAR}, | |
58 | +</if> | |
59 | +<if test="updateUser != null and updateUser != ''"> | |
60 | +update_user = #{updateUser,jdbcType=VARCHAR}, | |
61 | +</if> | |
62 | +</set> | |
63 | +where id = #{id,jdbcType=VARCHAR} | |
64 | +</update> | |
65 | + | |
66 | + | |
67 | +<delete id="deletePatientService" parameterType="java.lang.String"> | |
68 | +delete from patient_service where id = #{id,jdbcType=VARCHAR} | |
69 | +</delete> | |
70 | + | |
71 | + | |
72 | + | |
73 | +<select id="getPatientService" resultMap="PatientServiceResultMap" parameterType="java.lang.String"> | |
74 | +select id,parentid,pid,ser_type,ser_doct,create_date,create_user_name,create_user,ser_status,update_date,update_user_name,update_user | |
75 | + from patient_service where id = #{id,jdbcType=VARCHAR} | |
76 | +</select> | |
77 | + | |
78 | + | |
79 | +<sql id="orderAndLimit"> | |
80 | +<if test="sort != null and sort != '' "> | |
81 | +order by ${sort} | |
82 | +<if test="need != null"> | |
83 | +limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} | |
84 | +</if> | |
85 | +</if> | |
86 | +</sql> | |
87 | + | |
88 | + | |
89 | + | |
90 | +<sql id="PatientServiceCondition"> | |
91 | +<where> | |
92 | + 1 = 1 | |
93 | +<if test="id != null and id != ''"> | |
94 | +and id = #{id,jdbcType=VARCHAR} | |
95 | +</if> | |
96 | +<if test="parentid != null and parentid != ''"> | |
97 | +and parentid = #{parentid,jdbcType=VARCHAR} | |
98 | +</if> | |
99 | +<if test="pid != null and pid != ''"> | |
100 | +and pid = #{pid,jdbcType=VARCHAR} | |
101 | +</if> | |
102 | +<if test="serType != null and serType >= 0"> | |
103 | +and ser_type = #{serType,jdbcType=INTEGER} | |
104 | +</if> | |
105 | +<if test="serDoct != null and serDoct != ''"> | |
106 | +and ser_doct = #{serDoct,jdbcType=VARCHAR} | |
107 | +</if> | |
108 | +<if test="createDate != null"> | |
109 | +and create_date = #{createDate,jdbcType=TIMESTAMP} | |
110 | +</if> | |
111 | +<if test="createUserName != null and createUserName != ''"> | |
112 | +and create_user_name = #{createUserName,jdbcType=VARCHAR} | |
113 | +</if> | |
114 | +<if test="createUser != null and createUser != ''"> | |
115 | +and create_user = #{createUser,jdbcType=VARCHAR} | |
116 | +</if> | |
117 | +<if test="serStatus != null and serStatus >= 0"> | |
118 | +and ser_status = #{serStatus,jdbcType=INTEGER} | |
119 | +</if> | |
120 | +<if test="updateDate != null"> | |
121 | +and update_date = #{updateDate,jdbcType=TIMESTAMP} | |
122 | +</if> | |
123 | +<if test="updateUserName != null and updateUserName != ''"> | |
124 | +and update_user_name = #{updateUserName,jdbcType=VARCHAR} | |
125 | +</if> | |
126 | +<if test="updateUser != null and updateUser != ''"> | |
127 | +and update_user = #{updateUser,jdbcType=VARCHAR} | |
128 | +</if> | |
129 | +</where> | |
130 | +</sql> | |
131 | + | |
132 | + | |
133 | + | |
134 | +<select id="queryPatientService" resultMap="PatientServiceResultMap" parameterType="com.lyms.platform.permission.model.PatientServiceQuery"> | |
135 | +select id,parentid,pid,ser_type,ser_doct,create_date,create_user_name,create_user,ser_status,update_date,update_user_name,update_user | |
136 | + from patient_service | |
137 | +<include refid="PatientServiceCondition" /> | |
138 | +<include refid="orderAndLimit" /> | |
139 | +</select> | |
140 | + | |
141 | + | |
142 | + | |
143 | +<select id="queryPatientServiceCount" resultType="int" parameterType="com.lyms.platform.permission.model.PatientServiceQuery"> | |
144 | +select count(1) from patient_service | |
145 | +<include refid="PatientServiceCondition" /> | |
146 | +</select> | |
147 | + | |
148 | + | |
149 | + | |
150 | +</mapper> |