|
@ -58,10 +58,12 @@ public class ResourceService {
|
58
|
58
|
|
59
|
59
|
@Post
|
60
|
60
|
@Path
|
61
|
|
public String insert(@JdbcConn(true) Connection con, Resource resource, String fn) {
|
|
61
|
public String insert(@JdbcConn(true) Connection con, Resource resource, @Nullable String fn) {
|
62
|
62
|
String resourceId = StringUtil.buildUUID();
|
63
|
63
|
try {
|
64
|
|
this.imagesService.insert(con, resourceId, fn);
|
|
64
|
if(null != fn){
|
|
65
|
this.imagesService.insert(con, resourceId, fn);
|
|
66
|
}
|
65
|
67
|
resource.setResourceId(resourceId);
|
66
|
68
|
this.resourceDao.insert(con, resource);
|
67
|
69
|
} catch (SQLException | IOException e) {
|