|
@@ -251,7 +251,8 @@ public class RedisCache
|
|
|
* @return
|
|
|
*/
|
|
|
public String getFlowCode(){
|
|
|
- String currentDate = DateUtils.formatDate(new Date(), DateUtils.YYYYMMDD);
|
|
|
+ String currentDate = DateUtils.formatDate(new Date(), DateUtils.YYMMDD);
|
|
|
+
|
|
|
Long num = getIncrementNum("salesLeads:robotTask:str"+currentDate);
|
|
|
String flowCode = getSequence(num);
|
|
|
//System.out.println("taskId------->>>>"+currentDate+flowCode);
|
|
@@ -269,12 +270,12 @@ public class RedisCache
|
|
|
return counter;
|
|
|
}
|
|
|
|
|
|
- static final int DEFAULT_LENGTH = 8;
|
|
|
+ static final int DEFAULT_LENGTH = 3;
|
|
|
|
|
|
public String getSequence(long seq) {
|
|
|
String str = String.valueOf(seq);
|
|
|
int len = str.length();
|
|
|
- if (len >= DEFAULT_LENGTH) {// 取决于业务规模,应该不会到达8
|
|
|
+ if (len >= DEFAULT_LENGTH) {// 取决于业务规模,应该不会到达3
|
|
|
return str;
|
|
|
}
|
|
|
int rest = DEFAULT_LENGTH - len;
|