From c5bee43b37c2e3909ec94aa171eaf0b506468ef4 Mon Sep 17 00:00:00 2001 From: litao Date: Thu, 25 May 2017 23:27:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=8A=BD=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../permission/service/impl/CouponServiceImpl.java | 3 + .../mainOrm/master/WeixinQrcodeConfigMapper.xml | 116 +++++++++++++++++++++ .../src/main/resources/database.properties | 2 +- 3 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 platform-biz-service/src/main/resources/mainOrm/master/WeixinQrcodeConfigMapper.xml diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java index 27963b9..8e7c525 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java @@ -392,6 +392,9 @@ public class CouponServiceImpl implements CouponService { PersonModel person = mongoTemplate.findById(userId, PersonModel.class); + if (person == null) + return "http://weixin.qq.com/r/Fi9bQyLEgH--rWYg93oE"; + Map params = new HashMap<>(); params.put("hId", hId); params.put("dpId", person.getType() == 2 ? "2" : "1"); diff --git a/platform-biz-service/src/main/resources/mainOrm/master/WeixinQrcodeConfigMapper.xml b/platform-biz-service/src/main/resources/mainOrm/master/WeixinQrcodeConfigMapper.xml new file mode 100644 index 0000000..5172d6d --- /dev/null +++ b/platform-biz-service/src/main/resources/mainOrm/master/WeixinQrcodeConfigMapper.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + SELECT LAST_INSERT_ID() + + insert into weixin_qrcode_config (hospitalId,dp_id,ticket,created,modified,wx_url) values (#{hospitalId},#{dpId},#{ticket},#{created},#{modified},#{wxUrl}) + + + + + + update weixin_qrcode_config + hospitalId = #{hospitalId,jdbcType=VARCHAR}, + + + + dp_id = #{dpId,jdbcType=INTEGER}, + + + wx_url = #{wxUrl,jdbcType=VARCHAR}, + + + ticket = #{ticket,jdbcType=VARCHAR}, + + + created = #{created,jdbcType=TIMESTAMP}, + + + modified = #{modified,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + + +delete from weixin_qrcode_config where id = #{id,jdbcType=INTEGER} + + + + + + + + + + order by ${sort} + + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} + + + + + + + + + 1 = 1 + + and id = #{id,jdbcType=INTEGER} + + + and hospitalId = #{hospitalId,jdbcType=VARCHAR} + + + and dp_id = #{dpId,jdbcType=INTEGER} + + + and ticket = #{ticket,jdbcType=VARCHAR} + + + and created = #{created,jdbcType=TIMESTAMP} + + + and wx_url = #{wxUrl,jdbcType=VARCHAR} + + + and modified = #{modified,jdbcType=TIMESTAMP} + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-operate-api/src/main/resources/database.properties b/platform-operate-api/src/main/resources/database.properties index 1ea0dc1..54bcff1 100644 --- a/platform-operate-api/src/main/resources/database.properties +++ b/platform-operate-api/src/main/resources/database.properties @@ -88,4 +88,4 @@ sequence.schedule.expression=0 */1 * * * ? or.code.url=https://rp-api.healthbaby.com.cn/scan?code={0} or.code.create.url=http://ams.api.healthbaby.com.cn/v1/create/qrcode # 二维码地址生成方式 1=本地 2=线上 -or.code.create.type=2 +or.code.create.type=1 -- 1.8.3.1