Compare commits
2 Commits
6b0232e12d
...
d2c824e64d
Author | SHA1 | Date |
---|---|---|
|
d2c824e64d | |
|
d9feee5a28 |
|
@ -38,6 +38,12 @@
|
||||||
<profile.active>llg</profile.active>
|
<profile.active>llg</profile.active>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>xel</id> <!--xel-->
|
||||||
|
<properties>
|
||||||
|
<profile.active>xel</profile.active>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
<id>zqtlocal</id> <!--曾庆拓-->
|
<id>zqtlocal</id> <!--曾庆拓-->
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
@ -19,17 +19,3 @@ spring:
|
||||||
savefile:
|
savefile:
|
||||||
# 文件保存路径
|
# 文件保存路径
|
||||||
path: /Users/xiangerlin/work/app/file/dev
|
path: /Users/xiangerlin/work/app/file/dev
|
||||||
cbs8:
|
|
||||||
appId: 1P4AGrpz
|
|
||||||
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
|
||||||
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
|
||||||
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
|
||||||
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
|
||||||
# 这个私钥到时候上传到cbs,和下面到是同一对
|
|
||||||
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
|
||||||
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
|
||||||
cbs_public_key: 0469146F06BF3B01236E84632441E826F3067A6B93BC3839C836A06007869CD351FBBE388B51F742859388BBC1DE089923AAFBC69E448F15141DDF30EE6CE90185
|
|
||||||
#电子回单下载临时存放位置
|
|
||||||
elec_path: /Users/xiangerlin/Downloads/
|
|
||||||
OA:
|
|
||||||
data_source_code: yc-test
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.aspectj.lang.JoinPoint;
|
||||||
import org.aspectj.lang.annotation.Aspect;
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
import org.aspectj.lang.annotation.Before;
|
import org.aspectj.lang.annotation.Before;
|
||||||
import org.aspectj.lang.annotation.Pointcut;
|
import org.aspectj.lang.annotation.Pointcut;
|
||||||
|
import org.aspectj.lang.reflect.MethodSignature;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
@ -38,6 +39,9 @@ public class BindUserIdAop {
|
||||||
if (StpUtil.isLogin()) {
|
if (StpUtil.isLogin()) {
|
||||||
Object loginId = StpUtil.getLoginId();
|
Object loginId = StpUtil.getLoginId();
|
||||||
Object obj = objs[0];
|
Object obj = objs[0];
|
||||||
|
// 获取方法签名
|
||||||
|
MethodSignature signature = (MethodSignature) point.getSignature();
|
||||||
|
String methodName = signature.getName();
|
||||||
if (obj instanceof HashMap) {
|
if (obj instanceof HashMap) {
|
||||||
((HashMap<String,Object>) obj).put("create_user_id",loginId);
|
((HashMap<String,Object>) obj).put("create_user_id",loginId);
|
||||||
((HashMap<String,Object>) obj).put("modify_user_id",loginId);
|
((HashMap<String,Object>) obj).put("modify_user_id",loginId);
|
||||||
|
@ -51,21 +55,25 @@ public class BindUserIdAop {
|
||||||
jsonStrObj = JSON.parseObject(jsonStr);
|
jsonStrObj = JSON.parseObject(jsonStr);
|
||||||
}
|
}
|
||||||
if(null != jsonStrObj){
|
if(null != jsonStrObj){
|
||||||
if (jsonStrObj.getString("create_user_id") == null) {
|
//如果是update的方法,则不处理create_user_id 和 create_time
|
||||||
jsonStrObj.put("create_user_id",loginId);
|
|
||||||
}
|
|
||||||
if (jsonStrObj.getString("modify_user_id") == null) {
|
if (jsonStrObj.getString("modify_user_id") == null) {
|
||||||
jsonStrObj.put("modify_user_id",loginId);
|
jsonStrObj.put("modify_user_id",loginId);
|
||||||
}
|
}
|
||||||
if (jsonStrObj.getString("create_time") == null) {
|
|
||||||
jsonStrObj.put("create_time",DateUtil.now());
|
|
||||||
}
|
|
||||||
if (jsonStrObj.getString("modify_time") == null) {
|
if (jsonStrObj.getString("modify_time") == null) {
|
||||||
jsonStrObj.put("modify_time",DateUtil.now());
|
jsonStrObj.put("modify_time",DateUtil.now());
|
||||||
}
|
}
|
||||||
|
//save方法才要赋值create_user_id 和 creat_time id
|
||||||
|
if (methodName.startsWith("save")){
|
||||||
|
if (jsonStrObj.getString("create_user_id") == null) {
|
||||||
|
jsonStrObj.put("create_user_id",loginId);
|
||||||
|
}
|
||||||
|
if (jsonStrObj.getString("create_time") == null) {
|
||||||
|
jsonStrObj.put("create_time",DateUtil.now());
|
||||||
|
}
|
||||||
if (jsonStrObj.getString("id") == null) {
|
if (jsonStrObj.getString("id") == null) {
|
||||||
jsonStrObj.put("id",UUIDLong.longUUID());
|
jsonStrObj.put("id",UUIDLong.longUUID());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
jsonStrObj = new JSONObject();
|
jsonStrObj = new JSONObject();
|
||||||
jsonStrObj.put("create_user_id",loginId);
|
jsonStrObj.put("create_user_id",loginId);
|
||||||
|
|
Loading…
Reference in New Issue