From 3d99a9b56767a6937fcc495d76e4dc5c6f3dcda0 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Tue, 30 Mar 2021 15:41:29 +0800 Subject: [PATCH 1/5] bug --- .../service/impl/AlRepaymentEntryServiceImpl.java | 7 ------- .../service/impl/DgApplyAmountInfoServiceImpl.java | 14 +++++++++----- .../hrauth/controller/UserLoginController.java | 4 ++-- .../hrauth/service/impl/UserServiceImpl.java | 12 ++++++------ .../framework/model/response/PromptSuccess.java | 8 ++++---- 5 files changed, 21 insertions(+), 24 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java index 52c71b84..9eb024af 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java @@ -172,14 +172,7 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpllist = this.baseMapper.selectOverDueDays(); - //查询所有数据 - //List list = this.baseMapper.selectList(new QueryWrapper<>()); - Listlist = this.baseMapper.selectBind(); - Date date = new Date(); - //long times1 = date.getTime();//当前时间 SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java index 07d6c6a4..aa89198f 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java @@ -356,8 +356,15 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl() + .eq("business_id", businessApplication.getBusinessId()).eq("type", 1)); + //审批状态为草稿或已撤销的情况下进行判断 + if(dgApplyAmountList.getStatus().equals(StatusCode.SP_DRAFT) || dgApplyAmountList.getStatus().equals(StatusCode.SP_RESCINDED)){ + //根据社会统一信用代码判断是否可以申请业务,同一客户如果有一笔业务在业务流程在进行中,则不能再申请 + this.repeatBusiness(businessApplication); + } + //申请贷款相关信息 DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo(); dgApplyAmountInfo.setId(businessApplication.getBusinessId()); @@ -376,9 +383,6 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl() - .eq("business_id", businessApplication.getBusinessId()).eq("type", 1)); //草稿状态下,新增业务状态到业务状态表,同时新增一条记录到担保经理处理 if(dgApplyAmountList.getStatus().equals(StatusCode.SP_DRAFT)){ diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java index 727dd310..043c9a92 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java @@ -141,8 +141,8 @@ public class UserLoginController implements UserLoginControllerApi { //account = new String(username.getBytes("GBK"),"iso-8859-1"); log.info("account==========="+account+"headerImg============="+headerImg); //response.sendRedirect("http://8.129.127.185/dq/index.html#/login?token="+token+"&account="+account+"&headerImg="+headerImg); -// response.sendRedirect("https://www.huorantech.cn/index/#/login?token="+token+"&account="+account+"&headerImg="+headerImg); - response.sendRedirect("https://www.feifanhitech.com/index/#/login?token="+token+"&account="+account+"&headerImg="+headerImg); + response.sendRedirect("https://www.huorantech.cn/index/#/login?token="+token+"&account="+account+"&headerImg="+headerImg); +// response.sendRedirect("https://www.feifanhitech.com/index/#/login?token="+token+"&account="+account+"&headerImg="+headerImg); } }else { userService.weChatBinding(code,response,state); diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java index 9c7458cc..b99ad50f 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java @@ -92,8 +92,8 @@ public class UserServiceImpl extends ServiceImpl imple if(dbUser == null){//openId不存在,返回绑定手机号页面,须另写绑定手机号接口 log.info("dbUser为空,openId不存在,请先绑定手机号哦~~~"); try { - response.sendRedirect("https://www.feifanhitech.com/index/#/bind-phone?matched="+md5UnionId); -// response.sendRedirect("https://www.huorantech.cn/index/#/bind-phone?matched="+md5UnionId);//跳转绑定手机号页面 +// response.sendRedirect("https://www.feifanhitech.com/index/#/bind-phone?matched="+md5UnionId); + response.sendRedirect("https://www.huorantech.cn/index/#/bind-phone?matched="+md5UnionId);//跳转绑定手机号页面 //response.sendRedirect("http://8.129.127.185/dq/index.html#/bind-phone?matched="+md5UnionId);//跳转绑定手机号页面 } catch (IOException e) { e.printStackTrace(); @@ -159,9 +159,9 @@ public class UserServiceImpl extends ServiceImpl imple if (countWeChatId > 0){ try { log.info("微信重复了,我走到了这里............................."); -// response.sendRedirect("https://www.huorantech.cn/index/#/workbench-manpower?token="+token+"&message=1"); + response.sendRedirect("https://www.huorantech.cn/index/#/workbench-manpower?token="+token+"&message=1"); //response.sendRedirect("http://8.129.127.185/dq/index.html#/workbench-manpower?token="+token+"&message=1"); - response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token+"&message=1"); +// response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token+"&message=1"); } catch (IOException e) { e.printStackTrace(); } @@ -171,9 +171,9 @@ public class UserServiceImpl extends ServiceImpl imple if (result){ try { log.info("转发成功---------------------------------------"); -// response.sendRedirect("https://www.huorantech.cn/index/#/workbench-manpower?token="+token); + response.sendRedirect("https://www.huorantech.cn/index/#/workbench-manpower?token="+token); //response.sendRedirect("http://8.129.127.185/dq/index.html#/workbench-manpower?token="+token); - response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token); +// response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token); }catch (IOException e){ e.printStackTrace(); } diff --git a/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java b/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java index d30c3063..6a3c080e 100644 --- a/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java +++ b/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java @@ -32,17 +32,17 @@ public class PromptSuccess { public static final String UPLOAD_FILE_PATH = "//usr//local//nginx//html//admin//headImg//"; // linux图片存放路径 -// public static final String IMAGE_URL_PATH = "https://www.huorantech.cn/headImg/"; // 数据库/预加载图片路径 + public static final String IMAGE_URL_PATH = "https://www.huorantech.cn/headImg/"; // 数据库/预加载图片路径 //public static final String IMAGE_URL_PATH = "http://8.129.127.185/headImg/"; // 数据库/预加载图片路径 - public static final String IMAGE_URL_PATH = "https://www.feifanhitech.com/headImg/"; // 数据库/预加载图片路径 +// public static final String IMAGE_URL_PATH = "https://www.feifanhitech.com/headImg/"; // 数据库/预加载图片路径 public static final String[] LETTERS = {"A","B","C","D","E"}; // 员工姓名重复时自动加的字母,可再添加 public static final String STATUS_REFUSE = "拒绝"; -// public static final String ENCLOSUREFILE_URL_PATH = "https://www.huorantech.cn/enclosureFile/"; // 附件文件存放路径 + public static final String ENCLOSUREFILE_URL_PATH = "https://www.huorantech.cn/enclosureFile/"; // 附件文件存放路径 //public static final String ENCLOSUREFILE_URL_PATH = "http://8.129.127.185/enclosureFile/"; // 附件文件存放路径 - public static final String ENCLOSUREFILE_URL_PATH = "https://www.feifanhitech.com/enclosureFile/"; // 附件文件存放路径 +// public static final String ENCLOSUREFILE_URL_PATH = "https://www.feifanhitech.com/enclosureFile/"; // 附件文件存放路径 public static final String FILE_URL_PATH = "//usr//local//nginx//html//admin//enclosureFile//"; // 附件文件存放路径 From 1ea8de62a8c5ed27de6f2cfe0c62cfe66effe930 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Tue, 30 Mar 2021 18:16:24 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/bootstrap.properties | 2 +- .../src/main/resources/bootstrap.properties | 2 +- .../hrauth/controller/UserLoginController.java | 4 ++-- .../hrauth/service/impl/UserServiceImpl.java | 14 ++++++++------ .../src/main/resources/bootstrap.properties | 2 +- .../src/main/resources/bootstrap.properties | 2 +- .../framework/model/response/PromptSuccess.java | 8 ++++---- .../src/main/resources/bootstrap.properties | 2 +- 8 files changed, 19 insertions(+), 17 deletions(-) diff --git a/dq-financial-crms/src/main/resources/bootstrap.properties b/dq-financial-crms/src/main/resources/bootstrap.properties index d96f785e..f255f463 100644 --- a/dq-financial-crms/src/main/resources/bootstrap.properties +++ b/dq-financial-crms/src/main/resources/bootstrap.properties @@ -1,7 +1,7 @@ #服务名称 spring.application.name=dq-financial-crms #配置中心地址 -spring.cloud.nacos.config.server-addr=192.168.31.140:8848 +spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.file-extension=yml #redis配置 spring.redis.host=127.0.0.1 diff --git a/dq-financial-guarantee/src/main/resources/bootstrap.properties b/dq-financial-guarantee/src/main/resources/bootstrap.properties index 5ac23aac..b9faae67 100644 --- a/dq-financial-guarantee/src/main/resources/bootstrap.properties +++ b/dq-financial-guarantee/src/main/resources/bootstrap.properties @@ -1,7 +1,7 @@ #服务名称 spring.application.name=dq-financial-guarantee #配置中心地址 -spring.cloud.nacos.config.server-addr=192.168.31.140:8848 +spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.file-extension=yml #redis配置 spring.redis.host=127.0.0.1 diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java index 043c9a92..727dd310 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java @@ -141,8 +141,8 @@ public class UserLoginController implements UserLoginControllerApi { //account = new String(username.getBytes("GBK"),"iso-8859-1"); log.info("account==========="+account+"headerImg============="+headerImg); //response.sendRedirect("http://8.129.127.185/dq/index.html#/login?token="+token+"&account="+account+"&headerImg="+headerImg); - response.sendRedirect("https://www.huorantech.cn/index/#/login?token="+token+"&account="+account+"&headerImg="+headerImg); -// response.sendRedirect("https://www.feifanhitech.com/index/#/login?token="+token+"&account="+account+"&headerImg="+headerImg); +// response.sendRedirect("https://www.huorantech.cn/index/#/login?token="+token+"&account="+account+"&headerImg="+headerImg); + response.sendRedirect("https://www.feifanhitech.com/index/#/login?token="+token+"&account="+account+"&headerImg="+headerImg); } }else { userService.weChatBinding(code,response,state); diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java index b99ad50f..46391665 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java @@ -51,6 +51,8 @@ public class UserServiceImpl extends ServiceImpl imple public UserEntity saveWeChatUser(String code,HttpServletResponse response) { String accessTokenUrl = String.format(weChatConfig.getOPEN_ACCESS_TOKEN_URL(),weChatConfig.getOpenAppid(),weChatConfig.getOpenAppsecret(),code); + System.out.println("code===="+code); + System.out.println("accessTokenUrl===="+accessTokenUrl); //获取access_token Map baseMap = HttpUtils.doGet(accessTokenUrl); @@ -92,8 +94,8 @@ public class UserServiceImpl extends ServiceImpl imple if(dbUser == null){//openId不存在,返回绑定手机号页面,须另写绑定手机号接口 log.info("dbUser为空,openId不存在,请先绑定手机号哦~~~"); try { -// response.sendRedirect("https://www.feifanhitech.com/index/#/bind-phone?matched="+md5UnionId); - response.sendRedirect("https://www.huorantech.cn/index/#/bind-phone?matched="+md5UnionId);//跳转绑定手机号页面 + response.sendRedirect("https://www.feifanhitech.com/index/#/bind-phone?matched="+md5UnionId); +// response.sendRedirect("https://www.huorantech.cn/index/#/bind-phone?matched="+md5UnionId);//跳转绑定手机号页面 //response.sendRedirect("http://8.129.127.185/dq/index.html#/bind-phone?matched="+md5UnionId);//跳转绑定手机号页面 } catch (IOException e) { e.printStackTrace(); @@ -159,9 +161,9 @@ public class UserServiceImpl extends ServiceImpl imple if (countWeChatId > 0){ try { log.info("微信重复了,我走到了这里............................."); - response.sendRedirect("https://www.huorantech.cn/index/#/workbench-manpower?token="+token+"&message=1"); +// response.sendRedirect("https://www.huorantech.cn/index/#/workbench-manpower?token="+token+"&message=1"); //response.sendRedirect("http://8.129.127.185/dq/index.html#/workbench-manpower?token="+token+"&message=1"); -// response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token+"&message=1"); + response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token+"&message=1"); } catch (IOException e) { e.printStackTrace(); } @@ -171,9 +173,9 @@ public class UserServiceImpl extends ServiceImpl imple if (result){ try { log.info("转发成功---------------------------------------"); - response.sendRedirect("https://www.huorantech.cn/index/#/workbench-manpower?token="+token); +// response.sendRedirect("https://www.huorantech.cn/index/#/workbench-manpower?token="+token); //response.sendRedirect("http://8.129.127.185/dq/index.html#/workbench-manpower?token="+token); -// response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token); + response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token); }catch (IOException e){ e.printStackTrace(); } diff --git a/dq-financial-hrms-auth/src/main/resources/bootstrap.properties b/dq-financial-hrms-auth/src/main/resources/bootstrap.properties index b8985c09..a0715411 100644 --- a/dq-financial-hrms-auth/src/main/resources/bootstrap.properties +++ b/dq-financial-hrms-auth/src/main/resources/bootstrap.properties @@ -1,7 +1,7 @@ #服务名称 spring.application.name=dq-financial-hrms-auth #配置中心地址 -spring.cloud.nacos.config.server-addr=192.168.31.140:8848 +spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.file-extension=yml #redis配置 spring.redis.host=127.0.0.1 diff --git a/dq-financial-hrms/src/main/resources/bootstrap.properties b/dq-financial-hrms/src/main/resources/bootstrap.properties index db27d3dd..71d08eb4 100644 --- a/dq-financial-hrms/src/main/resources/bootstrap.properties +++ b/dq-financial-hrms/src/main/resources/bootstrap.properties @@ -1,7 +1,7 @@ #服务名称 spring.application.name=dq-financial-hrms #配置中心地址 -spring.cloud.nacos.config.server-addr=192.168.31.140:8848 +spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.file-extension=yml #redis配置 spring.redis.host=127.0.0.1 diff --git a/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java b/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java index 6a3c080e..d30c3063 100644 --- a/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java +++ b/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java @@ -32,17 +32,17 @@ public class PromptSuccess { public static final String UPLOAD_FILE_PATH = "//usr//local//nginx//html//admin//headImg//"; // linux图片存放路径 - public static final String IMAGE_URL_PATH = "https://www.huorantech.cn/headImg/"; // 数据库/预加载图片路径 +// public static final String IMAGE_URL_PATH = "https://www.huorantech.cn/headImg/"; // 数据库/预加载图片路径 //public static final String IMAGE_URL_PATH = "http://8.129.127.185/headImg/"; // 数据库/预加载图片路径 -// public static final String IMAGE_URL_PATH = "https://www.feifanhitech.com/headImg/"; // 数据库/预加载图片路径 + public static final String IMAGE_URL_PATH = "https://www.feifanhitech.com/headImg/"; // 数据库/预加载图片路径 public static final String[] LETTERS = {"A","B","C","D","E"}; // 员工姓名重复时自动加的字母,可再添加 public static final String STATUS_REFUSE = "拒绝"; - public static final String ENCLOSUREFILE_URL_PATH = "https://www.huorantech.cn/enclosureFile/"; // 附件文件存放路径 +// public static final String ENCLOSUREFILE_URL_PATH = "https://www.huorantech.cn/enclosureFile/"; // 附件文件存放路径 //public static final String ENCLOSUREFILE_URL_PATH = "http://8.129.127.185/enclosureFile/"; // 附件文件存放路径 -// public static final String ENCLOSUREFILE_URL_PATH = "https://www.feifanhitech.com/enclosureFile/"; // 附件文件存放路径 + public static final String ENCLOSUREFILE_URL_PATH = "https://www.feifanhitech.com/enclosureFile/"; // 附件文件存放路径 public static final String FILE_URL_PATH = "//usr//local//nginx//html//admin//enclosureFile//"; // 附件文件存放路径 diff --git a/dq-govern-gateway/src/main/resources/bootstrap.properties b/dq-govern-gateway/src/main/resources/bootstrap.properties index 8cd12f31..b071353a 100644 --- a/dq-govern-gateway/src/main/resources/bootstrap.properties +++ b/dq-govern-gateway/src/main/resources/bootstrap.properties @@ -1,7 +1,7 @@ #服务名称 spring.application.name=dq-govern-gateway #配置中心地址 -spring.cloud.nacos.config.server-addr=192.168.31.140:8848 +spring.cloud.nacos.config.server-addr=127.0.0.1:8848 spring.cloud.nacos.config.file-extension=yml #redis配置 spring.redis.host=127.0.0.1 From 6781c145b2ba379b479ef8369a0d4af1cb0af527 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Wed, 31 Mar 2021 11:05:07 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=8F=90=E5=8D=95?= =?UTF-8?q?=E4=BA=BA=E9=BB=98=E8=AE=A4=EF=BC=8CPC=E5=92=8C=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=99=BB=E5=BD=95=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../guarantee/controller/DgApplyAmountInfoController.java | 2 ++ .../hrauth/service/impl/UserLoginServiceImpl.java | 8 ++++++-- .../framework/domain/hrms/request/LoginRequest.java | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java index dc0899fd..52f81621 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java @@ -212,6 +212,8 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA if(response.getPresenterId().equals(res.get("id"))){//如果提单人id相同情况下,就往对象里面赋值 response.setAccount(JSONObject.toJSONString(res.get("account")).replace("\"","")); response.setDeptName(JSONObject.toJSONString(res.get("deptName")).replace("\"","")); + }else{ + response.setAccount("客户"); } } } diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java index c1afb9fc..0a03a32c 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java @@ -241,7 +241,11 @@ public class UserLoginServiceImpl extends ServiceImpl } recordsLog.setAccount(userEntity.getAccount()); recordsLog.setName(name); - recordsLog.setType(0);//用户端类型:0->PC;1->小程序; + if(loginRequest.getType()==3 || loginRequest.getType()==4){//小程序登录 + recordsLog.setType(1);//用户端类型:0->PC;1->小程序; + }else{ + recordsLog.setType(0); + } recordsLog.setLoginTime(new Date()); recordsLog.setUserId(userEntity.getId().intValue()); hrmsAccessRecordsLogMapper.insert(recordsLog); @@ -401,7 +405,7 @@ public class UserLoginServiceImpl extends ServiceImpl //查询员工数据 int count2 = userLoginDao.selectUserEmpCount(md5UnionId); if(identify==0){//员工小程序登录 - loginRequest.setType(2); + loginRequest.setType(4); if(count<=0 || count2<=0){//如果微信绑定的不是员工 return ResponseResult.FAIL(60001,"您的账号没有权限,无法登录!"); } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/LoginRequest.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/LoginRequest.java index 4350cc08..4db3d5fb 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/LoginRequest.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/LoginRequest.java @@ -11,7 +11,7 @@ public class LoginRequest { @ApiModelProperty(value = "手机号码/账号") private String phone; - @ApiModelProperty(value = "登录类型(1:手机号 2:微信登录 3:客户小程序登录)") + @ApiModelProperty(value = "登录类型(1:手机号 2:微信扫码登录 3:客户小程序登录 4:企业小程序登录)") private int type; @ApiModelProperty(value = "微信唯一编号(unionId)") From c1a16d9f7391216e4c8fee6f1dd9f8b4280d3963 Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Wed, 31 Mar 2021 14:23:12 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BC=98=E5=8C=96sql=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/guarantee/DgCopyUserMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml index ab195f78..f1184e42 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgCopyUserMapper.xml @@ -34,7 +34,7 @@ cf.pic_url FROM dg_copy_user cu - LEFT JOIN dg_copy_for cf ON cu.copy_id = cf.id + JOIN dg_copy_for cf ON cu.copy_id = cf.id LEFT JOIN dg_apply_amount_info aai ON cf.business_id = aai.id LEFT JOIN crms_company_customer ccc ON aai.company_id = ccc.id LEFT JOIN crms_customer cc ON ccc.customer_id = cc.id From 5b1c22f95efed809051f4d6cbe0d53333c159d7e Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Wed, 31 Mar 2021 15:45:05 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DgApplyAmountInfoController.java | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java index 52f81621..af4f6d20 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java @@ -37,8 +37,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.IOException; +import java.io.*; import java.util.*; /** @@ -144,6 +143,38 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA return ResponseResult.SUCCESS(list); } + /** + * 下载单个文件 + * + * @param response + * @param fileName + * @return + */ + @RequestMapping("/download") + public String download(HttpServletResponse response, @RequestParam("fileName") String fileName) { + File file = new File(PromptSuccess.FILE_URL_PATH + fileName); + if (file.exists()) { + response.setContentType("application/force-download;charset=UTF-8"); + response.setCharacterEncoding("UTF-8"); + response.setHeader("Content-Disposition", "attachment;fileName =" + fileName); + byte[] buffer = new byte[1024]; + + try (FileInputStream inputStream = new FileInputStream(file); + OutputStream outStream = response.getOutputStream(); + BufferedInputStream buffStream = new BufferedInputStream(inputStream);) { + int i = 0; + while ((i = buffStream.read(buffer)) != -1) { + outStream.write(buffer); + outStream.write(buffer, 0, i); + } + return "download success"; + } catch (Exception e) { + log.error("download error {}", e.getMessage()); + } + } + return null; + } + /** * 删除服务上的文件 * @param filePath 路径