Compare commits
2 Commits
157a009ce2
...
2c4959267b
| Author | SHA1 | Date |
|---|---|---|
|
|
2c4959267b | |
|
|
f176c14386 |
|
|
@ -53,12 +53,12 @@ public class Sm4Utils {
|
|||
|
||||
// 测试方法,演示加密和解密过程
|
||||
public static void main(String[] args) {
|
||||
String plainText = "15398187429";
|
||||
String plainText = "0637408c46ba0d91f40523e84a0e11cda20cef429d9f7f1c7f7e804498feb1aa09372fbf128d227c67396f81a0f1764f8b64e5897564ebb16f5d365904e6dcdb2a3d97b458cf6130c7f9e5ab3bbce042";
|
||||
System.out.println("原文: " + plainText);
|
||||
|
||||
// 加密明文
|
||||
String encryptedText = Sm4Utils.encrypt(plainText);
|
||||
System.out.println("加密后: " + encryptedText);
|
||||
// String encryptedText = Sm4Utils.encrypt(plainText);
|
||||
// System.out.println("加密后: " + encryptedText);
|
||||
|
||||
// 解密密文
|
||||
String decryptedText = Sm4Utils.decrypt(plainText);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.gateway.filter;
|
||||
|
||||
import com.bonus.common.core.exception.CaptchaException;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.utils.encryption.Sm3Util;
|
||||
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -78,10 +79,16 @@ public class RequestCoverFilter implements GlobalFilter, Ordered {
|
|||
// 如果解密和完整性校验均未启用,则直接通过过滤链
|
||||
ServerHttpRequest request = exchange.getRequest();
|
||||
MediaType contentType = request.getHeaders().getContentType();
|
||||
String jm=request.getHeaders().getFirst("encryptrequest");
|
||||
if (contentType == null) {
|
||||
log.info("请求头中无Content-Type信息,直接继续过滤链。");
|
||||
if(StringUtils.isEmpty(jm) || "false".equals(jm)){
|
||||
return chain.filter(exchange);
|
||||
}else{
|
||||
return handleUrlParams(exchange, chain);
|
||||
}
|
||||
// return chain.filter(exchange);
|
||||
return handleUrlParams(exchange, chain);
|
||||
|
||||
} else if (contentType.isCompatibleWith(MediaType.APPLICATION_JSON)) {
|
||||
return handleBodyRequest(exchange, chain);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -44,6 +44,12 @@ public class BmWorkerWageCard {
|
|||
@Excel(name = "银行支行名称", type = Excel.Type.EXPORT, sort = 6)
|
||||
private String bankBranchName;
|
||||
|
||||
/**
|
||||
* 银行联号
|
||||
*/
|
||||
@Excel(name = "银行联号", type = Excel.Type.EXPORT, sort = 7)
|
||||
private String bankIdentifierCode;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
<result column="bank_card_code" property="bankCardCode" />
|
||||
<result column="bank_name" property="bankName" />
|
||||
<result column="bank_branch_name" property="bankBranchName" />
|
||||
<result column="bank_identifier_code" property="bankIdentifierCode" />
|
||||
<result column="create_user" property="createUser" />
|
||||
<result column="update_user" property="updateUser" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
|
|
@ -25,8 +26,8 @@
|
|||
</delete>
|
||||
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.bonus.bmw.domain.vo.BmWorkerWageCard" useGeneratedKeys="true">
|
||||
insert into bm_worker_wage_card (worker_id, bank_card_code, bank_name, bank_branch_name, create_user)
|
||||
values (#{workerId}, #{bankCardCode}, #{bankName}, #{bankBranchName}, #{createUser})
|
||||
insert into bm_worker_wage_card (worker_id, bank_card_code, bank_name, bank_branch_name,bank_identifier_code, create_user)
|
||||
values (#{workerId}, #{bankCardCode}, #{bankName}, #{bankBranchName},#{bankIdentifierCode}, #{createUser})
|
||||
</insert>
|
||||
|
||||
<select id="selectWageCardList" resultMap="BaseResultMap">
|
||||
|
|
@ -39,6 +40,7 @@
|
|||
bwwc.bank_card_code,
|
||||
bwwc.bank_name,
|
||||
bwwc.bank_branch_name,
|
||||
bwwc.bank_identifier_code,
|
||||
bwwc.update_time,
|
||||
if(bwwc.id is not null, 1, 0) AS is_upload
|
||||
FROM
|
||||
|
|
@ -78,6 +80,7 @@
|
|||
pw.phone,
|
||||
bwwc.id,
|
||||
bwwc.bank_card_code,
|
||||
bwwc.bank_identifier_code,
|
||||
bwwc.bank_name,
|
||||
bwwc.bank_branch_name,
|
||||
bwwc.update_time
|
||||
|
|
@ -107,6 +110,9 @@
|
|||
<if test="bankBranchName != null and bankBranchName != ''">
|
||||
bank_branch_name = #{bankBranchName},
|
||||
</if>
|
||||
<if test="bankIdentifierCode != null and bankIdentifierCode != ''">
|
||||
bank_identifier_code = #{bankIdentifierCode},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
@ -139,7 +145,8 @@
|
|||
bwwc.id,
|
||||
bwwc.bank_card_code,
|
||||
bwwc.bank_name,
|
||||
bwwc.bank_branch_name
|
||||
bwwc.bank_branch_name,
|
||||
bwwc.bank_identifier_code
|
||||
FROM
|
||||
`bm_worker_wage_card` bwwc
|
||||
WHERE
|
||||
|
|
|
|||
Loading…
Reference in New Issue