public interface IDAllocMapper
| 限定符和类型 | 方法和说明 |
|---|---|
int |
deleteLeafAlloc(String tag) |
List<LeafAlloc> |
getAllLeafAllocs() |
List<String> |
getAllTags() |
LeafAlloc |
getLeafAlloc(String tag) |
int |
insertLeafAlloc(LeafAlloc leafAlloc) |
int |
updateMaxId(LeafAlloc leafAlloc) |
int |
updateMaxIdByCustomStep(LeafAlloc leafAlloc) |
@Select(value="SELECT BIZ_TAG, MAX_ID, STEP, DESCRIPTION, UPDATE_TIME FROM LEAF_ALLOC") @Result(column="BIZ_TAG",property="key") @Result(column="MAX_ID",property="maxId") @Result(column="STEP",property="step") @Result(column="DESCRIPTION",property="description") @Result(column="UPDATE_TIME",property="updateTime") List<LeafAlloc> getAllLeafAllocs()
@Select(value="SELECT BIZ_TAG, MAX_ID, STEP, DESCRIPTION, UPDATE_TIME FROM LEAF_ALLOC WHERE BIZ_TAG = #{tag}")
@Result(column="BIZ_TAG",property="key") @Result(column="MAX_ID",property="maxId") @Result(column="STEP",property="step") @Result(column="DESCRIPTION",property="description") @Result(column="UPDATE_TIME",property="updateTime")
LeafAlloc getLeafAlloc(@Param(value="tag")
String tag)
@Update(value="UPDATE LEAF_ALLOC SET MAX_ID = MAX_ID + STEP, UPDATE_TIME = #{updateTime} WHERE BIZ_TAG = #{key}")
int updateMaxId(@Param(value="leafAlloc")
LeafAlloc leafAlloc)
@Insert(value="INSERT INTO LEAF_ALLOC (BIZ_TAG, MAX_ID, STEP, DESCRIPTION, UPDATE_TIME) VALUES (#{key}, #{maxId}, #{step}, #{description}, #{updateTime})")
int insertLeafAlloc(@Param(value="leafAlloc")
LeafAlloc leafAlloc)
@Delete(value="DELETE FROM LEAF_ALLOC WHERE BIZ_TAG = #{tag}")
int deleteLeafAlloc(@Param(value="tag")
String tag)
@Update(value="UPDATE LEAF_ALLOC SET MAX_ID = MAX_ID + #{step}, UPDATE_TIME = #{updateTime} WHERE BIZ_TAG = #{key}")
int updateMaxIdByCustomStep(@Param(value="leafAlloc")
LeafAlloc leafAlloc)
Copyright © 2022 Meituan-Dianping Group. All rights reserved.