mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-08 13:16:41 +08:00
update IdGeneratorService
This commit is contained in:
parent
98d80a0a03
commit
0549798445
@ -1,17 +0,0 @@
|
||||
package net.lab1024.smartadmin.service.module.support.idgenerator.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Auther: 罗伊
|
||||
* @Date: 2018/8/7 0007 13:33
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
public class IdGeneratorLastNumberDTO {
|
||||
private LocalDateTime updateTime;
|
||||
private Long lastNumber;
|
||||
private LocalDateTime databaseTime;
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.lab1024.smartadmin.service.module.support.idgenerator.IdGeneratorRecordDao">
|
||||
|
||||
<!-- 查询最后生成记录 -->
|
||||
<select id="selectHistoryLastNumber" resultType="net.lab1024.smartadmin.service.module.support.idgenerator.domain.IdGeneratorRecordEntity">
|
||||
select * from t_id_generator_record
|
||||
where generator_id = #{generatorId}
|
||||
@ -11,21 +12,4 @@
|
||||
ORDER BY id DESC LIMIT 1
|
||||
</select>
|
||||
|
||||
<update id="replaceIdGeneratorRecord">
|
||||
UPDATE t_id_generator_record
|
||||
<set>
|
||||
<if test="null != year">
|
||||
and `year`= #{year}
|
||||
</if>
|
||||
<if test="null != month">
|
||||
and `month`= #{month}
|
||||
</if>
|
||||
<if test="null != day">
|
||||
and `day`= #{day}
|
||||
</if>
|
||||
</set>
|
||||
where generator_id = #{generatorId}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user