Skip to content

Instantly share code, notes, and snippets.

@codeachange
Created September 6, 2017 15:26
Show Gist options
  • Save codeachange/5ab57b4a6f317331224fac0c99de0e6f to your computer and use it in GitHub Desktop.
Save codeachange/5ab57b4a6f317331224fac0c99de0e6f to your computer and use it in GitHub Desktop.
// insert and return id
@Insert("INSERT INTO photo_category (uuid, album_uuid, name, status, addtime, modtime) VALUES (" +
"REPLACE(UUID(), '-', ''), #{albumUuid}, #{name}, 0, UNIX_TIMESTAMP(), UNIX_TIMESTAMP())")
@SelectKey(before = false, keyProperty = "id", statement = "SELECT LAST_INSERT_ID()", resultType = Integer.class)
void insert(PhotoCategoryDO item);
// return HashMap
@ResultType(value = java.util.HashMap.class)
HashMap getSumDismissionRate(@Param("companyId") String companyId, @Param("yearmo") Integer yearmo);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment