完善SEQN 生成算法

This commit is contained in:
zhouxiunai
2019-01-08 11:02:18 +08:00
parent cf31345289
commit 6b4fb1ac60
2 changed files with 18 additions and 2 deletions
@@ -1,5 +1,6 @@
package com.gzzn.omms.msgexchangeapi.dao;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.gzzn.omms.msgexchangeapi.entity.Cmoutmsg;
@@ -7,5 +8,10 @@ import com.gzzn.omms.msgexchangeapi.entity.Cmoutmsg;
public interface CmoutmsgDao extends CrudRepository<Cmoutmsg, Long> {
/**
* 获取最大的id值
* @return
*/
@Query("select max(coutmsgsId) from Cmoutmsg")
public Integer findMaxId();
}