Merge remote-tracking branch 'origin/master'

master
chen 4 years ago
commit ba415c136c
  1. 13
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java
  2. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationDetailResponse.java
  3. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgApplyAmountInfoService.java
  4. 63
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  5. 5
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java
  6. 31
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/WXTokenController.java
  7. 15
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java
  8. 47
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/SHA1.java
  9. 24
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/WXPublicUtils.java
  10. 10
      dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java
  11. 3
      dq-govern-gateway/src/main/resources/jwt.properties

@ -406,4 +406,17 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 根据业务id查询业务申请详情
* @param id
* @return
*/
@Log(detail = "小程序业务申请详情",level = 3,operationUnit = OperationUnit.APPLYAMOUNTINFO,operationType = OperationType.SELECT)
@GetMapping("/xcxBusinessAppDetail")
@ApiOperation(value = "小程序业务申请详情")
public ResponseResult xcxBusinessAppDetail(Integer id){
BusinessApplicationDetailResponse response = applyAmountInfoService.xcxBusinessAppDetail(id);
return ResponseResult.SUCCESS(response);
}
}

@ -32,8 +32,8 @@ public class BusinessApplicationDetailResponse implements Serializable {
/**
* 企业详细
*/
/* @ApiModelProperty(value = "企业详细")
private LinkedHashMap linkedHashMap;*/
@ApiModelProperty(value = "企业详细")
private LinkedHashMap linkedHashMap;
/**
* 附件详细

@ -39,4 +39,6 @@ public interface IDgApplyAmountInfoService extends IService<DgApplyAmountInfo> {
DgApplyField queryApplyField();
Boolean updateApplyField(DgApplyField dgApplyField);
BusinessApplicationDetailResponse xcxBusinessAppDetail(Integer id);
}

@ -300,6 +300,19 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
@Override
public BusinessApplicationDetailResponse businessApplicationDetail(Integer id) {
//根据id查询业务id
DgApplyAmountList dgApplyAmountList = dgApplyAmountListMapper.selectById(id);
BusinessApplicationDetailResponse response = publicBusinessCommon(id);
//根据业务id查询备份企业信息
DgBusinessCompany dgBusinessCompany = dgBusinessCompanyMapper.selectOne(new QueryWrapper<DgBusinessCompany>()
.eq("business_id", dgApplyAmountList.getBusinessId()));
response.setDgBusinessCompany(dgBusinessCompany);
return response;
}
public BusinessApplicationDetailResponse publicBusinessCommon(Integer id) {
//根据id查询业务id
DgApplyAmountList dgApplyAmountList = dgApplyAmountListMapper.selectById(id);
//根据主键id查询业务申请详细信息
@ -316,10 +329,6 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
}
dgApplyAmountInfo.setRemark(dgApplyAmountList.getApplyContent());
//根据业务id查询备份企业信息
DgBusinessCompany dgBusinessCompany = dgBusinessCompanyMapper.selectOne(new QueryWrapper<DgBusinessCompany>()
.eq("business_id", dgApplyAmountList.getBusinessId()));
//查询附件详细,附件关联业务主键id
DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(dgApplyAmountList.getBusinessId());
@ -355,29 +364,45 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
}
/* if(arr1List2.size()>0){
if(!arr1List2.get(0).toString().equals("[]"))*/
dgEnclosureInfo.setAccountingFirmList((List<String>) arr1List2.get(0));
dgEnclosureInfo.setAssessmentReportList((List<String>) arr1List2.get(1));
dgEnclosureInfo.setBusinessLicenseList((List<String>) arr1List2.get(2));
dgEnclosureInfo.setCertificateAuthorizationList((List<String>) arr1List2.get(3));
dgEnclosureInfo.setCompanyConstitutionList((List<String>) arr1List2.get(4));
dgEnclosureInfo.setCompanyCreditList((List<String>) arr1List2.get(5));
dgEnclosureInfo.setConversationSummaryList((List<String>) arr1List2.get(6));
dgEnclosureInfo.setCreditReportList((List<String>) arr1List2.get(7));
dgEnclosureInfo.setInspectionPhotosList((List<String>) arr1List2.get(8));
dgEnclosureInfo.setLegalCardCopyList((List<String>) arr1List2.get(9));
dgEnclosureInfo.setLegalCopyList((List<String>) arr1List2.get(10));
dgEnclosureInfo.setTaxCertificateList((List<String>) arr1List2.get(11));
dgEnclosureInfo.setMeetingMinutesList((List<String>) arr1List2.get(12));
dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13));
dgEnclosureInfo.setAccountingFirmList((List<String>) arr1List2.get(0));
dgEnclosureInfo.setAssessmentReportList((List<String>) arr1List2.get(1));
dgEnclosureInfo.setBusinessLicenseList((List<String>) arr1List2.get(2));
dgEnclosureInfo.setCertificateAuthorizationList((List<String>) arr1List2.get(3));
dgEnclosureInfo.setCompanyConstitutionList((List<String>) arr1List2.get(4));
dgEnclosureInfo.setCompanyCreditList((List<String>) arr1List2.get(5));
dgEnclosureInfo.setConversationSummaryList((List<String>) arr1List2.get(6));
dgEnclosureInfo.setCreditReportList((List<String>) arr1List2.get(7));
dgEnclosureInfo.setInspectionPhotosList((List<String>) arr1List2.get(8));
dgEnclosureInfo.setLegalCardCopyList((List<String>) arr1List2.get(9));
dgEnclosureInfo.setLegalCopyList((List<String>) arr1List2.get(10));
dgEnclosureInfo.setTaxCertificateList((List<String>) arr1List2.get(11));
dgEnclosureInfo.setMeetingMinutesList((List<String>) arr1List2.get(12));
dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13));
// }
BusinessApplicationDetailResponse businessApplicationDetail= new BusinessApplicationDetailResponse();
businessApplicationDetail.setDgApplyAmountInfo(dgApplyAmountInfo);
businessApplicationDetail.setDgEnclosureInfo(dgEnclosureInfo);
businessApplicationDetail.setDgBusinessCompany(dgBusinessCompany);
return businessApplicationDetail;
}
@Override
public BusinessApplicationDetailResponse xcxBusinessAppDetail(Integer id) {
//根据id查询业务id
DgApplyAmountList dgApplyAmountList = dgApplyAmountListMapper.selectById(id);
BusinessApplicationDetailResponse response = publicBusinessCommon(id);
DgApplyAmountInfo dgApplyAmountInfo = dgApplyAmountInfoMapper.selectById(dgApplyAmountList.getBusinessId());
DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest();
applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
//根据企业id查询企业详情
ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo);
LinkedHashMap linkedList = (LinkedHashMap)result.getData();
response.setLinkedHashMap(linkedList);
return response;
}
@Override
public int updateBusinessApplication(BusinessApplicationRequest businessApplication) {
//根据业务id以及type查询对应的记录

@ -140,10 +140,9 @@ public class UserLoginController implements UserLoginControllerApi {
headerImg = URLDecoder.decode(imgUrl,encoder);
//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://test.feifanhitech.com/dq/index.html#/login?token="+token+"&account="+account+"&headerImg="+headerImg);
// response.sendRedirect("https://test.feifanhitech.com/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.feifanhitech.com/index/#/login?token="+token+"&account="+account+"&headerImg="+headerImg);
}
}else {
userService.weChatBinding(code,response,state);

@ -0,0 +1,31 @@
package com.daqing.financial.hrauth.controller;
import com.daqing.financial.hrauth.util.WXPublicUtils;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/wxpublic")
@Api(tags = "验证公众平台token")
@Slf4j
public class WXTokenController {
@RequestMapping("/verify_wx_token")
public String verifyWXToken(HttpServletRequest request) {
String msgSignature = request.getParameter("signature");
String msgTimestamp = request.getParameter("timestamp");
String msgNonce = request.getParameter("nonce");
String echostr = request.getParameter("echostr");
if (WXPublicUtils.verifyUrl(msgSignature, msgTimestamp, msgNonce)) {
return echostr;
}
return null;
}
}

@ -94,10 +94,9 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> 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.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);//跳转绑定手机号页面
response.sendRedirect("https://test.feifanhitech.com/dq/index.html#/bind-phone?matched="+md5UnionId);//跳转绑定手机号页面
// response.sendRedirect("https://test.feifanhitech.com/dq/index.html#/bind-phone?matched="+md5UnionId);//跳转绑定手机号页面
} catch (IOException e) {
e.printStackTrace();
}
@ -163,9 +162,8 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple
try {
log.info("微信重复了,我走到了这里.............................");
// 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://test.feifanhitech.com/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://test.feifanhitech.com/dq/index.html#/workbench-manpower?token="+token+"&message=1");
response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token+"&message=1");
} catch (IOException e) {
e.printStackTrace();
}
@ -176,9 +174,8 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple
try {
log.info("转发成功---------------------------------------");
// 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://test.feifanhitech.com/dq/index.html#/workbench-manpower?token="+token);
// response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token);
// response.sendRedirect("https://test.feifanhitech.com/dq/index.html#/workbench-manpower?token="+token);
response.sendRedirect("https://www.feifanhitech.com/index/#/workbench-manpower?token="+token);
}catch (IOException e){
e.printStackTrace();
}

@ -0,0 +1,47 @@
package com.daqing.financial.hrauth.util;
import java.security.MessageDigest;
import java.util.Arrays;
public class SHA1 {
/**
* 用SHA1算法验证Token
*
* @param token 票据
* @param timestamp 时间戳
* @param nonce 随机字符串
* @return 安全签名
*/
public static String getSHA1(String token, String timestamp, String nonce) {
try {
String[] array = new String[]{token, timestamp, nonce};
StringBuffer sb = new StringBuffer();
// 字符串排序
Arrays.sort(array);
for (int i = 0; i < 3; i++) {
sb.append(array[i]);
}
String str = sb.toString();
// SHA1签名生成
MessageDigest md = MessageDigest.getInstance("SHA-1");
md.update(str.getBytes());
byte[] digest = md.digest();
StringBuffer hexstr = new StringBuffer();
String shaHex = "";
for (int i = 0; i < digest.length; i++) {
shaHex = Integer.toHexString(digest[i] & 0xFF);
if (shaHex.length() < 2) {
hexstr.append(0);
}
hexstr.append(shaHex);
}
return hexstr.toString();
} catch (Exception e) {
e.printStackTrace();
throw new IllegalArgumentException("用SHA1算法验证Token异常");
}
}
}

@ -0,0 +1,24 @@
package com.daqing.financial.hrauth.util;
public class WXPublicUtils {
/**
* 验证Token
* @param msgSignature 签名串对应URL参数的signature
* @param timeStamp 时间戳对应URL参数的timestamp
* @param nonce 随机串对应URL参数的nonce
*
* @return 是否为安全签名
*/
public static boolean verifyUrl(String msgSignature, String timeStamp, String nonce){
// 这里的 WXPublicConstants.TOKEN 填写你自己设置的Token就可以了
String signature = SHA1.getSHA1("123456", timeStamp, nonce);
if (!signature.equals(msgSignature)) {
// throw new AesException(AesException.ValidateSignatureError);
throw new IllegalArgumentException("验证Token异常");
}
return true;
}
}

@ -33,18 +33,16 @@ 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 = "http://8.129.127.185/headImg/"; // 数据库/预加载图片路径
public static final String IMAGE_URL_PATH = "https://test.feifanhitech.com/headImg/"; // 数据库/预加载图片路径
// public static final String IMAGE_URL_PATH = "https://www.feifanhitech.com/headImg/"; // 数据库/预加载图片路径
// public static final String IMAGE_URL_PATH = "https://test.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 = "http://8.129.127.185/enclosureFile/"; // 附件文件存放路径
public static final String ENCLOSUREFILE_URL_PATH = "https://test.feifanhitech.com/enclosureFile/"; // 附件文件存放路径
// public static final String ENCLOSUREFILE_URL_PATH = "https://www.feifanhitech.com/enclosureFile/"; // 附件文件存放路径
// public static final String ENCLOSUREFILE_URL_PATH = "https://test.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//"; // 附件文件存放路径

@ -35,7 +35,8 @@ jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\
/api-guarantee/al-repayment-entry/excelExport,\
/api-guarantee/al-collection/list/export/excel,\
/api-guarantee/al-collection/collection/list/export/excel,\
/api-guarantee/dg-apply-amount-info/download
/api-guarantee/dg-apply-amount-info/download,\
/apiHrmsAuth/wxpublic/verify_wx_token

Loading…
Cancel
Save