Commit 6756c101 by 陶光胜

企业微信取消授权回调处理

parent 46dfe5d6
......@@ -238,7 +238,7 @@ public class MessageApiServiceImpl implements MessageApiService {
if(dataType == GicDataType.STORE.getCode() || dataType == GicDataType.DEPARTMENT.getCode()){
startIndex = len - 1;
}
for(int i = startIndex; i< len; i--){
for(int i = startIndex ; i>=0 && i< len; i--){
DepartmentDTO department = this.departmentService.getByRelatedId(arr[i]);
if(department != null){
return department;
......@@ -250,6 +250,13 @@ public class MessageApiServiceImpl implements MessageApiService {
}
public static void main(String[] args){
System.out.println("1_".split("_").length);
String parentChain = "1_";
String[] arr = parentChain.split("_");
int len = arr.length;
int startIndex = len - 1;
System.out.println(len);
for(int i = startIndex ; i>=0 && i< len; i--){
System.out.println(i);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment