|
|
|
@ -29,9 +29,7 @@ func genCacheKeys(table parser.Table) (map[string]Key, error) {
|
|
|
|
|
camelTableName := table.Name.ToCamel()
|
|
|
|
|
lowerStartCamelTableName := stringx.From(camelTableName).UnTitle()
|
|
|
|
|
for _, field := range fields {
|
|
|
|
|
if !field.IsKey {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
if field.IsUniqueKey || field.IsPrimaryKey {
|
|
|
|
|
camelFieldName := field.Name.ToCamel()
|
|
|
|
|
lowerStartCamelFieldName := stringx.From(camelFieldName).UnTitle()
|
|
|
|
|
left := fmt.Sprintf("cache%s%sPrefix", camelTableName, camelFieldName)
|
|
|
|
@ -47,5 +45,6 @@ func genCacheKeys(table parser.Table) (map[string]Key, error) {
|
|
|
|
|
RespKeyExpression: fmt.Sprintf(`%s := fmt.Sprintf("%s%s", %s,resp.%s)`, variable, "%s", "%v", left, camelFieldName),
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return m, nil
|
|
|
|
|
}
|
|
|
|
|