kidgrow-business/kidgrow-filecenter/kidgrow-filecenter-server/src/main/java/com/kidgrow/filecenter/config/AliyunOSSAutoConfigure.java
@@ -72,7 +72,7 @@ String hospitalID = httpServletRequest.getHeader(SecurityConstants.USER_HOSPITAL_ID_HEADER); String depID = httpServletRequest.getHeader(SecurityConstants.USER_DEP_ID_HEADER); String folderByDate = DateUtil.formatDate(new Date()); int begin = file.getOriginalFilename().indexOf("."); int begin = file.getOriginalFilename().lastIndexOf("."); int last = file.getOriginalFilename().length(); String fileType = file.getOriginalFilename().substring(begin, last); String fileName = UUID.randomUUID().toString().replaceAll("-", "") + fileType; kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-server/src/main/java/com/kidgrow/oprationcenter/controller/weixin/WxController.java
@@ -1,5 +1,6 @@ package com.kidgrow.oprationcenter.controller.weixin; import cn.hutool.http.HttpUtil; import com.kidgrow.common.model.ResultBody; import com.kidgrow.common.utils.QRCodeUtil; import com.kidgrow.common.utils.StringUtils; @@ -15,10 +16,8 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections.MapUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; @@ -43,6 +42,12 @@ WeiXinOfficPayProperties weiXinOfficPayProperties; @Autowired WxService wxService; @Value("${wechat.miniapp.appid}") private String APPID; @Value("${wechat.miniapp.secret}") private String SECRET; @Value("${wechat.apiUrl}") private String APIURL; /** * 测试微信的预支付接口 @@ -121,6 +126,26 @@ return callback; } /** * 公众号或者小程序获取 openid * @param code * @return */ @GetMapping("/getOpenId") public ResultBody getOpenId(@RequestParam("code")String code){ if (StringUtils.isBlank(code)) { return ResultBody.failed("请输入code"); } Map<String,Object> map=new HashMap<>(); map.put("appid",APPID); map.put("secret",SECRET); map.put("js_code",code); map.put("grant_type","authorization_code"); String s = HttpUtil.get(APIURL + "/sns/jscode2session?", map); return ResultBody.ok().data(s); } public static void main(String[] args) throws Exception { WxController weixinController=new WxController(); Map<String,Object> map=null; kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/java/com/kidgrow/usercenter/service/impl/SysUserServiceImpl.java
@@ -107,7 +107,11 @@ @Override public LoginAppUser findByOpenId(String username) { SysUser sysUser = this.selectByOpenId(username); return getLoginAppUser(sysUser); if (sysUser == null) { return null; } else { return getLoginAppUser(sysUser); } } @Override kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysHospitalMapper.xml
@@ -130,6 +130,32 @@ <include refid="where"/> order by id desc </select> <sql id="wherelist_last"> <if test="p.isScreen != null and p.isScreen !=''"> and is_screen = #{p.isScreen} </if> <if test="p.isPay != null and p.isPay !=''"> and is_pay = #{p.isPay} </if> <if test="p.isAnswer != null and p.isAnswer !=''"> and is_answer = #{p.isAnswer} </if> <if test="p.hospitalState != null and p.hospitalState !=''"> and hospital_state = #{p.hospitalState} </if> <if test="p.hospitalProvince != null and p.hospitalProvince !=''"> and hospital_province = #{p.hospitalProvince} </if> <if test="p.hospitalCity != null and p.hospitalCity !=''"> and hospital_city = #{p.hospitalCity} </if> <if test="p.hospitalArea != null and p.hospitalArea !=''"> and hospital_area = #{p.hospitalArea} </if> <if test="p.hospitalName != null and p.hospitalName !=''"> and hospital_name LIKE concat('%',#{p.hospitalName},'%') </if> </sql> <sql id="whereList"> <where> hosisdel = 0 @@ -167,7 +193,7 @@ <if test="itemto.flag"> </if> <if test="!itemto.flag"> or ( hospitals.hosisdel = 0 and hospitals.hosenabled=1) or ( hospitals.hosisdel = 0 and hospitals.hosenabled=1 <include refid="wherelist_last"></include>) </if> </when> <when test="inx==2"> @@ -186,7 +212,7 @@ index=""> create_user_org_code = #{itemtoto.orgCode} </foreach> and hospitals.hosisdel = 0 and hospitals.hosenabled=1 and hospitals.hosisdel = 0 and hospitals.hosenabled=1 <include refid="wherelist_last"></include> ) </if> </when> @@ -196,7 +222,7 @@ create_user_org_code = #{itemto.object} </if> <if test="!itemto.flag"> or (create_user_org_code = #{itemto.object} and hospitals.hosisdel = 0 and hospitals.hosenabled=1) or (create_user_org_code = #{itemto.object} and hospitals.hosisdel = 0 and hospitals.hosenabled=1 <include refid="wherelist_last"></include>) </if> </when> <when test="inx == 4"> @@ -206,7 +232,7 @@ </if> <if test="!itemto.flag"> or (create_user_org_code like '${itemto.object}%' and hospitals.hosisdel = 0 and hospitals.hosenabled=1) hospitals.hosenabled=1 <include refid="wherelist_last"></include>) </if> </when> <when test="inx == 5"> @@ -215,7 +241,7 @@ hospitals.create_user_id = #{itemto.object} </if> <if test="!itemto.flag"> or (hospitals.create_user_id = #{itemto.object} and hospitals.hosisdel = 0 and hospitals.hosenabled=1) or (hospitals.create_user_id = #{itemto.object} and hospitals.hosisdel = 0 and hospitals.hosenabled=1 <include refid="wherelist_last"></include>) </if> </when> <otherwise> kidgrow-config/src/main/resources/application-dev.properties
@@ -72,4 +72,13 @@ kidgrow.audit-log.datasource.password=${kidgrow.datasource.password} ## appUrl \u9759\u6001\u6587\u4EF6\u4E0A\u4F20\u8DEF\u5F84 appUrl=http://192.168.2.240/upload/ appUrl=http://192.168.2.240/upload/ ## C\u7AEF\u4EA7\u54C1\u516C\u4F17\u53F7\u914D\u7F6E\u4FE1\u606F wechat.apiUrl=https://api.weixin.qq.com wechat.mp.appid=dev-wx1cc7074ce3014652 wechat.mp.secret=dev-0fa9eb188ae52aa8c2380744109f161c ## C\u7AEF\u4EA7\u54C1\u5C0F\u7A0B\u5E8F\u914D\u7F6E\u4FE1\u606F wechat.miniapp.appid=wx5a9bc7ebd13eb6cc wechat.miniapp.secret=c16d8e42e42137bd7ba6e6999f226803 kidgrow-config/src/main/resources/application-fat.properties
@@ -51,4 +51,14 @@ kidgrow.audit-log.datasource.driver-class-name=com.mysql.cj.jdbc.Driver kidgrow.audit-log.datasource.jdbc-url=jdbc:mysql://${kidgrow.datasource.ip}:3306/logger_center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai kidgrow.audit-log.datasource.username=${kidgrow.datasource.username} kidgrow.audit-log.datasource.password=${kidgrow.datasource.password} kidgrow.audit-log.datasource.password=${kidgrow.datasource.password} ## C\u7AEF\u4EA7\u54C1\u516C\u4F17\u53F7\u914D\u7F6E\u4FE1\u606F wechat.apiUrl=https://api.weixin.qq.com wechat.mp.appid=fat-wx1cc7074ce3014652 wechat.mp.secret=fat-0fa9eb188ae52aa8c2380744109f161c ## C\u7AEF\u4EA7\u54C1\u5C0F\u7A0B\u5E8F\u914D\u7F6E\u4FE1\u606F wechat.miniapp.appid=fat-wx87654dd4adb165f3 wechat.miniapp.secret=fat-6ed7bad82fc479f333de647cceca5c72 kidgrow-config/src/main/resources/application-open.properties
@@ -71,4 +71,14 @@ kidgrow.audit-log.datasource.password=${kidgrow.datasource.password} ##### \u79FB\u52A8\u7AEF\u4E0A\u4F20\u5149\u7247Web\u5E94\u7528URL appUrl=http://open.upload.kidgrow.cloud/ appUrl=http://open.upload.kidgrow.cloud/ ## C\u7AEF\u4EA7\u54C1\u516C\u4F17\u53F7\u914D\u7F6E\u4FE1\u606F wechat.apiUrl=https://api.weixin.qq.com wechat.mp.appid=open-wx1cc7074ce3014652 wechat.mp.secret=open-0fa9eb188ae52aa8c2380744109f161c ## C\u7AEF\u4EA7\u54C1\u5C0F\u7A0B\u5E8F\u914D\u7F6E\u4FE1\u606F wechat.miniapp.appid=open-wx87654dd4adb165f3 wechat.miniapp.secret=open-6ed7bad82fc479f333de647cceca5c72 kidgrow-config/src/main/resources/application-pro.properties
@@ -51,4 +51,14 @@ kidgrow.audit-log.datasource.driver-class-name=com.mysql.cj.jdbc.Driver kidgrow.audit-log.datasource.jdbc-url=jdbc:mysql://${kidgrow.datasource.ip}:3306/logger_center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai kidgrow.audit-log.datasource.username=${kidgrow.datasource.username} kidgrow.audit-log.datasource.password=${kidgrow.datasource.password} kidgrow.audit-log.datasource.password=${kidgrow.datasource.password} ## C\u7AEF\u4EA7\u54C1\u516C\u4F17\u53F7\u914D\u7F6E\u4FE1\u606F wechat.apiUrl=https://api.weixin.qq.com wechat.mp.appid=pro-wx1cc7074ce3014652 wechat.mp.secret=pro-0fa9eb188ae52aa8c2380744109f161c ## C\u7AEF\u4EA7\u54C1\u5C0F\u7A0B\u5E8F\u914D\u7F6E\u4FE1\u606F wechat.miniapp.appid=pro-wx87654dd4adb165f3 wechat.miniapp.secret=pro-6ed7bad82fc479f333de647cceca5c72 kidgrow-config/src/main/resources/application-uat.properties
@@ -73,4 +73,14 @@ kidgrow.audit-log.datasource.password=${kidgrow.datasource.password} ##### \u79FB\u52A8\u7AEF\u4E0A\u4F20\u5149\u7247Web\u5E94\u7528URL appUrl=https://upload.kidgrow.cloud/ appUrl=https://upload.kidgrow.cloud/ ## C\u7AEF\u4EA7\u54C1\u516C\u4F17\u53F7\u914D\u7F6E\u4FE1\u606F wechat.apiUrl=https://api.weixin.qq.com wechat.mp.appid=uat-wx1cc7074ce3014652 wechat.mp.secret=uat-0fa9eb188ae52aa8c2380744109f161c ## C\u7AEF\u4EA7\u54C1\u5C0F\u7A0B\u5E8F\u914D\u7F6E\u4FE1\u606F wechat.miniapp.appid=uat-wx87654dd4adb165f3 wechat.miniapp.secret=uat-6ed7bad82fc479f333de647cceca5c72 kidgrow-springcloud/kidgrow-springcloud-zuul/src/main/resources/application.yml
@@ -233,6 +233,7 @@ - /api-opration/alipay/return - /api-record/DiagnosticUnfinishedFegin/equipmentList - /api-record/DiagnosticUnfinishedFegin/equipmentUpload - /api-opration/wxController/getOpenId # - /api-user/syshospital/findAllByMap # - /api-user/sysdictionaries/findAll # - /api-user/sysdepartment/findListByHospitalId @@ -271,7 +272,8 @@ /api-opration/alipay/return, /api-opration/alipay/notify, /api-record/DiagnosticUnfinishedFegin/equipmentList, /api-record/DiagnosticUnfinishedFegin/equipmentUpload /api-record/DiagnosticUnfinishedFegin/equipmentUpload, /api-opration/wxController/getOpenId # /api-user/syshospital/findAllByMap, # /api-user/sysdictionaries/findAll, # /api-user/sysdepartment/findListByHospitalId