提交修改
This commit is contained in:
parent
4ca324ac4e
commit
4f8517d71b
@ -90,8 +90,11 @@ public class ApiConstants {
|
||||
public static final String get = "get";
|
||||
public static String NOT_SIGN_RECEIPT = "not_sign_receipt";
|
||||
public static String SIGN_RECEIPT = "sign_receipt";
|
||||
|
||||
public static String SET_TOKEN = "setToken";
|
||||
|
||||
public static String SET_BUYER_NAME = "setBuyerName";
|
||||
|
||||
public static final String token_activity = "token_activity";
|
||||
|
||||
/**
|
||||
|
||||
@ -84,8 +84,7 @@ public class VvTradeOrderConvertServiceImpl implements VvTradeOrderConvertServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addOrderLineStatusLogList(List<Long> tradeOrderLineIdList,
|
||||
Object status,
|
||||
public int addOrderLineStatusLogList(List<Long> tradeOrderLineIdList, Object status,
|
||||
Long changeStatusUserId,String changeStatusUser, String... reason) {
|
||||
for (Long tradeOrderLineId : tradeOrderLineIdList) {
|
||||
addOrderLineStatusLog(tradeOrderLineId, status,changeStatusUserId, changeStatusUser, reason);
|
||||
@ -93,9 +92,9 @@ public class VvTradeOrderConvertServiceImpl implements VvTradeOrderConvertServic
|
||||
return tradeOrderLineIdList.size();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int addOrderLineStatusLog(Long tradeOrderLineId, Object status
|
||||
,Long changeStatusUserId,String changeStatusUser, String ... reason) {
|
||||
public int addOrderLineStatusLog(Long tradeOrderLineId, Object status, Long changeStatusUserId, String changeStatusUser, String... reason) {
|
||||
VvTradeOrderLineStatusLogEntity entity = new VvTradeOrderLineStatusLogEntity();
|
||||
entity.setTradeOrderLineId(tradeOrderLineId);
|
||||
if (status instanceof OrderStatusEnums) {
|
||||
@ -120,9 +119,6 @@ public class VvTradeOrderConvertServiceImpl implements VvTradeOrderConvertServic
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<AppPackageDTO> buildAppPackageDTO(List<VVOrderListResp> vvOrderListResps) {
|
||||
List<AppPackageDTO> appPackageDTOList = new ArrayList<>();
|
||||
|
||||
@ -97,10 +97,8 @@ public class ZhenZhenLogAop {
|
||||
if (sig instanceof MethodSignature) {
|
||||
methodName = ((MethodSignature) sig).getMethod().getName();
|
||||
}
|
||||
|
||||
describe = AnnotationUtils.getAnnotationValueByMethod(method, "Describe", "value");
|
||||
|
||||
|
||||
Class clazz = point.getTarget().getClass();
|
||||
className = clazz.getName();
|
||||
|
||||
@ -122,18 +120,28 @@ public class ZhenZhenLogAop {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BuyerDTO buyerDTO = null;
|
||||
if (StringUtils.isNotBlank(token)) {
|
||||
Object tokenValue = redisUtils.get(token);
|
||||
if (tokenValue != null) {
|
||||
String tokenStr = tokenValue.toString();
|
||||
BuyerDTO buyerDTO = JSONObject.parseObject(tokenStr, BuyerDTO.class);
|
||||
buyerId = buyerDTO.getBuyerId();
|
||||
buyerDTO = JSONObject.parseObject(tokenStr, BuyerDTO.class);
|
||||
}
|
||||
}
|
||||
for (Method m : methods) {
|
||||
if (ApiConstants.SET_TOKEN.equalsIgnoreCase(m.getName())) {
|
||||
m.setAccessible(true);
|
||||
m.invoke(argArr, new Object[]{token});
|
||||
|
||||
if (buyerDTO != null) {
|
||||
for (Method m : methods) {
|
||||
if (ApiConstants.SET_TOKEN.equalsIgnoreCase(m.getName())) {
|
||||
m.setAccessible(true);
|
||||
m.invoke(argArr, new Object[]{token});
|
||||
}
|
||||
|
||||
if (ApiConstants.SET_BUYER_NAME.equalsIgnoreCase(m.getName())) {
|
||||
m.setAccessible(true);
|
||||
m.invoke(argArr, new Object[]{buyerDTO.getBuyerName()});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -146,7 +154,6 @@ public class ZhenZhenLogAop {
|
||||
if (!adminNotNeedLogin && tokenValue == null) {
|
||||
// return R.error("请登录");
|
||||
}
|
||||
|
||||
if (tokenValue != null) {
|
||||
try {
|
||||
VVAdminDTO vvAdminDTO = JSONObject.parseObject(tokenValue + "", VVAdminDTO.class);
|
||||
@ -167,19 +174,18 @@ public class ZhenZhenLogAop {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
result = point.proceed();
|
||||
if (result instanceof R) {
|
||||
R r = (R) result;
|
||||
Object object = r.getData();
|
||||
convertImage(object,token);
|
||||
convertImage(object, token);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("LogAop set error " + sb.toString(), e);
|
||||
} finally {
|
||||
@ -191,7 +197,7 @@ public class ZhenZhenLogAop {
|
||||
}
|
||||
|
||||
|
||||
public static void convertImage(Object object,String token) {
|
||||
public static void convertImage(Object object, String token) {
|
||||
if (object == null) {
|
||||
return;
|
||||
}
|
||||
@ -199,18 +205,18 @@ public class ZhenZhenLogAop {
|
||||
if (object instanceof List) {
|
||||
List list = (List) object;
|
||||
for (Object o : list) {
|
||||
convertImage(o,token);
|
||||
convertImage(o, token);
|
||||
}
|
||||
} else if (object instanceof Map) {
|
||||
Map map = (Map) object;
|
||||
for (Object key : map.keySet()) {
|
||||
Object value = map.get(key);
|
||||
convertImage(value,token);
|
||||
convertImage(value, token);
|
||||
}
|
||||
} else if (object.getClass().isArray()) {
|
||||
Object[] array = (Object[]) object;
|
||||
for (Object o : array) {
|
||||
convertImage(o,token);
|
||||
convertImage(o, token);
|
||||
}
|
||||
} else if (SanUtils.isBasicDataTypes(object.getClass())) {
|
||||
return;
|
||||
@ -224,7 +230,7 @@ public class ZhenZhenLogAop {
|
||||
for (Method method : methods) {
|
||||
try {
|
||||
method.setAccessible(true);
|
||||
if (method.getName().startsWith(ApiConstants.get )) {
|
||||
if (method.getName().startsWith(ApiConstants.get)) {
|
||||
Object image = method.invoke(object);
|
||||
// 如果是基本数据类型
|
||||
if (SanUtils.isBasicDataTypes(method.getReturnType())) {
|
||||
@ -246,7 +252,7 @@ public class ZhenZhenLogAop {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
convertImage(image,token);
|
||||
convertImage(image, token);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@ -257,8 +263,6 @@ public class ZhenZhenLogAop {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void printLog(Object result, String args, String ip, String className, String methodName,
|
||||
String preUri, String token, String traceId, Long startTime, Long buyerId,
|
||||
String describe
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user