Commit 4daeb03c6e72852b47bb78b0b73fff329cfc9474
1 parent
584e65a3f2
Exists in
master
and in
1 other branch
add weixin code config
Showing 6 changed files with 432 additions and 0 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/WeixinQrcodeConfigMapper.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/WeixinQrcodeConfig.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/WeixinQrcodeConfigQuery.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/WeixinQrcodeConfigService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/WeixinQrcodeConfigServiceImpl.java
- platform-biz-service/src/main/resources/mainOrm/master/WeixinShowqrcodeConfig.xml
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/WeixinQrcodeConfigMapper.java
View file @
4daeb03
| 1 | +package com.lyms.platform.permission.dao.master; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.lyms.platform.permission.model.WeixinQrcodeConfig; | |
| 5 | +import com.lyms.platform.permission.model.WeixinQrcodeConfigQuery; | |
| 6 | + | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | +public interface WeixinQrcodeConfigMapper { | |
| 10 | + public void addWeixinShowqrcodeConfig(WeixinQrcodeConfig obj); | |
| 11 | + | |
| 12 | + public void updateWeixinShowqrcodeConfig(WeixinQrcodeConfig obj); | |
| 13 | + | |
| 14 | + public void deleteWeixinShowqrcodeConfig(Integer id); | |
| 15 | + | |
| 16 | + public WeixinQrcodeConfig getWeixinShowqrcodeConfig(Integer id); | |
| 17 | + | |
| 18 | + public int queryWeixinShowqrcodeConfigCount(WeixinQrcodeConfigQuery query); | |
| 19 | + | |
| 20 | + public List<WeixinQrcodeConfig> queryWeixinShowqrcodeConfig(WeixinQrcodeConfigQuery query); | |
| 21 | + | |
| 22 | +} |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/WeixinQrcodeConfig.java
View file @
4daeb03
| 1 | +package com.lyms.platform.permission.model; | |
| 2 | + | |
| 3 | +import org.apache.commons.lang.builder.ToStringBuilder; | |
| 4 | + | |
| 5 | +import java.util.Date; | |
| 6 | + | |
| 7 | +public class WeixinQrcodeConfig | |
| 8 | +{ | |
| 9 | + private Integer id; | |
| 10 | + private String hospitalId; | |
| 11 | + private Integer dpId; | |
| 12 | + private String ticket; | |
| 13 | + private Date created; | |
| 14 | + private Date modified; | |
| 15 | + private String wxUrl; | |
| 16 | + | |
| 17 | + public String getHospitalId() | |
| 18 | + { | |
| 19 | + return hospitalId; | |
| 20 | + } | |
| 21 | + | |
| 22 | + public void setHospitalId(String hospitalId) | |
| 23 | + { | |
| 24 | + this.hospitalId = hospitalId; | |
| 25 | + } | |
| 26 | + | |
| 27 | + public String getWxUrl() | |
| 28 | + { | |
| 29 | + return wxUrl; | |
| 30 | + } | |
| 31 | + | |
| 32 | + public void setWxUrl(String wxUrl) | |
| 33 | + { | |
| 34 | + this.wxUrl = wxUrl; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public Integer getId() | |
| 38 | + { | |
| 39 | + return id; | |
| 40 | + } | |
| 41 | + | |
| 42 | + | |
| 43 | + public void setId(Integer id) | |
| 44 | + { | |
| 45 | + this.id = id; | |
| 46 | + | |
| 47 | + } | |
| 48 | + | |
| 49 | + public Integer getDpId() | |
| 50 | + { | |
| 51 | + return dpId; | |
| 52 | + } | |
| 53 | + | |
| 54 | + | |
| 55 | + public void setDpId(Integer dpId) | |
| 56 | + { | |
| 57 | + this.dpId = dpId; | |
| 58 | + | |
| 59 | + } | |
| 60 | + | |
| 61 | + public String getTicket() | |
| 62 | + { | |
| 63 | + return ticket; | |
| 64 | + } | |
| 65 | + | |
| 66 | + | |
| 67 | + public void setTicket(String ticket) | |
| 68 | + { | |
| 69 | + this.ticket = ticket; | |
| 70 | + | |
| 71 | + } | |
| 72 | + | |
| 73 | + public Date getCreated() | |
| 74 | + { | |
| 75 | + return created; | |
| 76 | + } | |
| 77 | + | |
| 78 | + | |
| 79 | + public void setCreated(Date created) | |
| 80 | + { | |
| 81 | + this.created = created; | |
| 82 | + | |
| 83 | + } | |
| 84 | + | |
| 85 | + public Date getModified() | |
| 86 | + { | |
| 87 | + return modified; | |
| 88 | + } | |
| 89 | + | |
| 90 | + | |
| 91 | + public void setModified(Date modified) | |
| 92 | + { | |
| 93 | + this.modified = modified; | |
| 94 | + } | |
| 95 | + | |
| 96 | + @Override | |
| 97 | + public String toString() | |
| 98 | + { | |
| 99 | + return ToStringBuilder.reflectionToString(this); | |
| 100 | + } | |
| 101 | +} |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/WeixinQrcodeConfigQuery.java
View file @
4daeb03
| 1 | +package com.lyms.platform.permission.model; | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | +import com.lyms.platform.common.dao.BaseQuery; | |
| 6 | + | |
| 7 | +import java.util.Date; | |
| 8 | + | |
| 9 | + | |
| 10 | +public class WeixinQrcodeConfigQuery extends BaseQuery | |
| 11 | +{ | |
| 12 | + private Integer id; | |
| 13 | + private String hospitalId; | |
| 14 | + private Integer dpId; | |
| 15 | + private String wxUrl; | |
| 16 | + private String ticket; | |
| 17 | + private Date created; | |
| 18 | + private Date modified; | |
| 19 | + | |
| 20 | + public String getHospitalId() | |
| 21 | + { | |
| 22 | + return hospitalId; | |
| 23 | + } | |
| 24 | + | |
| 25 | + public void setHospitalId(String hospitalId) | |
| 26 | + { | |
| 27 | + this.hospitalId = hospitalId; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public String getWxUrl() | |
| 31 | + { | |
| 32 | + return wxUrl; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public void setWxUrl(String wxUrl) | |
| 36 | + { | |
| 37 | + this.wxUrl = wxUrl; | |
| 38 | + } | |
| 39 | + | |
| 40 | + public Integer getId() | |
| 41 | + { | |
| 42 | + return id; | |
| 43 | + } | |
| 44 | + | |
| 45 | + | |
| 46 | + public void setId(Integer id) | |
| 47 | + { | |
| 48 | + this.id = id; | |
| 49 | + | |
| 50 | + } | |
| 51 | + | |
| 52 | + public String getHospitalid() | |
| 53 | + { | |
| 54 | + return hospitalId; | |
| 55 | + } | |
| 56 | + | |
| 57 | + | |
| 58 | + public void setHospitalid(String hospitalId) | |
| 59 | + { | |
| 60 | + this.hospitalId = hospitalId; | |
| 61 | + } | |
| 62 | + | |
| 63 | + public Integer getDpId() | |
| 64 | + { | |
| 65 | + return dpId; | |
| 66 | + } | |
| 67 | + | |
| 68 | + | |
| 69 | + public void setDpId(Integer dpId) | |
| 70 | + { | |
| 71 | + this.dpId = dpId; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public String getTicket() | |
| 75 | + { | |
| 76 | + return ticket; | |
| 77 | + } | |
| 78 | + | |
| 79 | + | |
| 80 | + public void setTicket(String ticket) | |
| 81 | + { | |
| 82 | + this.ticket = ticket; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public Date getCreated() | |
| 86 | + { | |
| 87 | + return created; | |
| 88 | + } | |
| 89 | + | |
| 90 | + | |
| 91 | + public void setCreated(Date created) | |
| 92 | + { | |
| 93 | + this.created = created; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public Date getModified() | |
| 97 | + { | |
| 98 | + return modified; | |
| 99 | + } | |
| 100 | + | |
| 101 | + | |
| 102 | + public void setModified(Date modified) | |
| 103 | + { | |
| 104 | + this.modified = modified; | |
| 105 | + } | |
| 106 | +} |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/WeixinQrcodeConfigService.java
View file @
4daeb03
| 1 | +package com.lyms.platform.permission.service; | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | +import com.lyms.platform.permission.model.WeixinQrcodeConfig; | |
| 6 | +import com.lyms.platform.permission.model.WeixinQrcodeConfigQuery; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +public interface WeixinQrcodeConfigService | |
| 11 | +{ | |
| 12 | + public void addWeixinShowqrcodeConfig(WeixinQrcodeConfig obj); | |
| 13 | + | |
| 14 | + public void updateWeixinShowqrcodeConfig(WeixinQrcodeConfig obj); | |
| 15 | + | |
| 16 | + public void deleteWeixinShowqrcodeConfig(Integer id); | |
| 17 | + | |
| 18 | + public WeixinQrcodeConfig getWeixinShowqrcodeConfig(Integer id); | |
| 19 | + | |
| 20 | + public int queryWeixinShowqrcodeConfigCount(WeixinQrcodeConfigQuery query); | |
| 21 | + | |
| 22 | + public List<WeixinQrcodeConfig> queryWeixinShowqrcodeConfig(WeixinQrcodeConfigQuery query); | |
| 23 | + | |
| 24 | +} |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/WeixinQrcodeConfigServiceImpl.java
View file @
4daeb03
| 1 | +package com.lyms.platform.permission.service.impl; | |
| 2 | + | |
| 3 | +import com.lyms.platform.permission.dao.master.WeixinQrcodeConfigMapper; | |
| 4 | +import com.lyms.platform.permission.model.WeixinQrcodeConfig; | |
| 5 | +import com.lyms.platform.permission.model.WeixinQrcodeConfigQuery; | |
| 6 | +import com.lyms.platform.permission.service.WeixinQrcodeConfigService; | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | +import org.springframework.stereotype.Service; | |
| 9 | + | |
| 10 | +import java.util.Date; | |
| 11 | +import java.util.List; | |
| 12 | + | |
| 13 | +@Service | |
| 14 | +public class WeixinQrcodeConfigServiceImpl implements WeixinQrcodeConfigService | |
| 15 | +{ | |
| 16 | + | |
| 17 | + @Autowired | |
| 18 | + private WeixinQrcodeConfigMapper weixinShowqrcodeConfigMapper; | |
| 19 | + | |
| 20 | + @Override | |
| 21 | + public void addWeixinShowqrcodeConfig(WeixinQrcodeConfig obj) | |
| 22 | + { | |
| 23 | + obj.setCreated(new Date()); | |
| 24 | + obj.setModified(new Date()); | |
| 25 | + weixinShowqrcodeConfigMapper.addWeixinShowqrcodeConfig(obj); | |
| 26 | + } | |
| 27 | + | |
| 28 | + @Override | |
| 29 | + public void updateWeixinShowqrcodeConfig(WeixinQrcodeConfig obj) | |
| 30 | + { | |
| 31 | + obj.setModified(new Date()); | |
| 32 | + weixinShowqrcodeConfigMapper.updateWeixinShowqrcodeConfig(obj); | |
| 33 | + } | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public void deleteWeixinShowqrcodeConfig(Integer id) | |
| 37 | + { | |
| 38 | + weixinShowqrcodeConfigMapper.deleteWeixinShowqrcodeConfig(id); | |
| 39 | + } | |
| 40 | + | |
| 41 | + @Override | |
| 42 | + public WeixinQrcodeConfig getWeixinShowqrcodeConfig(Integer id) | |
| 43 | + { | |
| 44 | + return weixinShowqrcodeConfigMapper.getWeixinShowqrcodeConfig(id); | |
| 45 | + } | |
| 46 | + | |
| 47 | + @Override | |
| 48 | + public int queryWeixinShowqrcodeConfigCount(WeixinQrcodeConfigQuery | |
| 49 | + query) | |
| 50 | + { | |
| 51 | + return weixinShowqrcodeConfigMapper.queryWeixinShowqrcodeConfigCount(query); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public List<WeixinQrcodeConfig> queryWeixinShowqrcodeConfig(WeixinQrcodeConfigQuery query) | |
| 56 | + { | |
| 57 | + if (query.getNeed() != null) | |
| 58 | + { | |
| 59 | + query.mysqlBuild(weixinShowqrcodeConfigMapper.queryWeixinShowqrcodeConfigCount(query)); | |
| 60 | + } | |
| 61 | + return weixinShowqrcodeConfigMapper.queryWeixinShowqrcodeConfig(query); | |
| 62 | + } | |
| 63 | +} |
platform-biz-service/src/main/resources/mainOrm/master/WeixinShowqrcodeConfig.xml
View file @
4daeb03
| 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.lymsh.mommybaby.maindata.dao.WeixinQrcodeConfigMapper"> | |
| 4 | + | |
| 5 | +<resultMap id="WeixinShowqrcodeConfigResultMap" type="com.lymsh.mommybaby.maindata.model.WeixinQrcodeConfig"> | |
| 6 | +<id column="id" property="id" jdbcType="INTEGER" /> | |
| 7 | +<result column="hospitalId" property="hospitalId" jdbcType="VARCHAR" /> | |
| 8 | +<result column="dp_id" property="dpId" jdbcType="INTEGER" /> | |
| 9 | +<result column="ticket" property="ticket" jdbcType="VARCHAR" /> | |
| 10 | +<result column="wx_url" property="wxUrl" jdbcType="VARCHAR" /> | |
| 11 | +<result column="created" property="created" jdbcType="TIMESTAMP" /> | |
| 12 | +<result column="modified" property="modified" jdbcType="TIMESTAMP" /> | |
| 13 | +</resultMap> | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | +<insert id="addWeixinShowqrcodeConfig" parameterType="com.lymsh.mommybaby.maindata.model.WeixinQrcodeConfig"> | |
| 18 | + <selectKey resultType="java.lang.Integer" keyProperty="id" order="AFTER"> | |
| 19 | + SELECT LAST_INSERT_ID() | |
| 20 | + </selectKey> | |
| 21 | +insert into weixin_qrcode_config (hospitalId,dp_id,ticket,created,modified,wx_url) values (#{hospitalId},#{dpId},#{ticket},#{created},#{modified},#{wxUrl}) | |
| 22 | +</insert> | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | +<update id="updateWeixinShowqrcodeConfig" parameterType="com.lymsh.mommybaby.maindata.model.WeixinQrcodeConfig"> | |
| 27 | +update weixin_qrcode_config <set><if test="hospitalId != null and hospitalId != ''"> | |
| 28 | +hospitalId = #{hospitalId,jdbcType=VARCHAR}, | |
| 29 | +</if> | |
| 30 | + | |
| 31 | +<if test="dpId != null and dpId >= 0"> | |
| 32 | +dp_id = #{dpId,jdbcType=INTEGER}, | |
| 33 | +</if> | |
| 34 | +<if test="wxUrl != null"> | |
| 35 | + wx_url = #{wxUrl,jdbcType=VARCHAR}, | |
| 36 | +</if> | |
| 37 | +<if test="ticket != null and ticket != ''"> | |
| 38 | +ticket = #{ticket,jdbcType=VARCHAR}, | |
| 39 | +</if> | |
| 40 | +<if test="created != null"> | |
| 41 | +created = #{created,jdbcType=TIMESTAMP}, | |
| 42 | +</if> | |
| 43 | +<if test="modified != null"> | |
| 44 | +modified = #{modified,jdbcType=TIMESTAMP}, | |
| 45 | +</if> | |
| 46 | +</set> | |
| 47 | +where id = #{id,jdbcType=INTEGER} | |
| 48 | +</update> | |
| 49 | + | |
| 50 | + | |
| 51 | +<delete id="deleteWeixinShowqrcodeConfig" parameterType="java.lang.Integer"> | |
| 52 | +delete from weixin_qrcode_config where id = #{id,jdbcType=INTEGER} | |
| 53 | +</delete> | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | +<select id="getWeixinShowqrcodeConfig" resultMap="WeixinShowqrcodeConfigResultMap" parameterType="java.lang.Integer"> | |
| 58 | +select id,hospitalId,dp_id,ticket,created,modified,wx_url | |
| 59 | + from weixin_qrcode_config where id = #{id,jdbcType=INTEGER} | |
| 60 | +</select> | |
| 61 | + | |
| 62 | + | |
| 63 | +<sql id="orderAndLimit"> | |
| 64 | +<if test="sort != null and sort != '' "> | |
| 65 | +order by ${sort} | |
| 66 | +<if test="need != null"> | |
| 67 | +limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} | |
| 68 | +</if> | |
| 69 | +</if> | |
| 70 | +</sql> | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | +<sql id="WeixinShowqrcodeConfigCondition"> | |
| 75 | +<where> | |
| 76 | + 1 = 1 | |
| 77 | +<if test="id != null and id >= 0"> | |
| 78 | +and id = #{id,jdbcType=INTEGER} | |
| 79 | +</if> | |
| 80 | +<if test="hospitalId != null and hospitalId != ''"> | |
| 81 | +and hospitalId = #{hospitalId,jdbcType=VARCHAR} | |
| 82 | +</if> | |
| 83 | +<if test="dpId != null and dpId >= 0"> | |
| 84 | +and dp_id = #{dpId,jdbcType=INTEGER} | |
| 85 | +</if> | |
| 86 | +<if test="ticket != null and ticket != ''"> | |
| 87 | +and ticket = #{ticket,jdbcType=VARCHAR} | |
| 88 | +</if> | |
| 89 | +<if test="created != null"> | |
| 90 | +and created = #{created,jdbcType=TIMESTAMP} | |
| 91 | +</if> | |
| 92 | +<if test="wxUrl != null"> | |
| 93 | +and wx_url = #{wxUrl,jdbcType=VARCHAR} | |
| 94 | +</if> | |
| 95 | +<if test="modified != null"> | |
| 96 | +and modified = #{modified,jdbcType=TIMESTAMP} | |
| 97 | +</if> | |
| 98 | +</where> | |
| 99 | +</sql> | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | +<select id="queryWeixinShowqrcodeConfig" resultMap="WeixinShowqrcodeConfigResultMap" parameterType="com.lymsh.mommybaby.maindata.model.WeixinQrcodeConfigQuery"> | |
| 104 | +select id,hospitalId,dp_id,ticket,created,modified,wx_url | |
| 105 | + from weixin_qrcode_config | |
| 106 | +<include refid="WeixinShowqrcodeConfigCondition" /> | |
| 107 | +<include refid="orderAndLimit" /> | |
| 108 | +</select> | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | +<select id="queryWeixinShowqrcodeConfigCount" resultType="int" parameterType="com.lymsh.mommybaby.maindata.model.WeixinQrcodeConfigQuery"> | |
| 113 | +select count(1) from weixin_qrcode_config | |
| 114 | +<include refid="WeixinShowqrcodeConfigCondition" /> | |
| 115 | +</select> | |
| 116 | +</mapper> |