更新历史版本排序权重
This commit is contained in:
parent
bb8c863bcc
commit
92977e81c3
|
|
@ -62,4 +62,6 @@ public interface SalarySysConfMapper {
|
|||
int delete(SalarySysConfPO salarySysConf);
|
||||
|
||||
SalarySysConfPO getOneByCode(String confKey);
|
||||
|
||||
int countByCode(String confKey);
|
||||
}
|
||||
|
|
@ -227,5 +227,11 @@
|
|||
AND conf_key = #{confKey}
|
||||
</select>
|
||||
|
||||
<select id="countByCode" resultType="java.lang.Integer">
|
||||
SELECT count(0)
|
||||
FROM hrsa_salary_sys_conf t
|
||||
WHERE delete_type = 0
|
||||
AND conf_key = #{confKey}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -30,7 +30,7 @@ public class InitServiceImpl {
|
|||
//当前版本
|
||||
SalarySysConfPO currentVersion = getSalarySysConfMapper().getOneByCode("currentVersion");
|
||||
//前一个版本
|
||||
SalarySysConfPO previousVersion = getSalarySysConfMapper().getOneByCode("previousVersion");
|
||||
int orderWeight = getSalarySysConfMapper().countByCode("previousVersion");
|
||||
if (currentVersion == null) {
|
||||
//初始化版本
|
||||
SalarySysConfPO current = SalarySysConfPO.builder()
|
||||
|
|
@ -39,6 +39,7 @@ public class InitServiceImpl {
|
|||
.confValue(version)
|
||||
.title("当前版本")
|
||||
.module("basic")
|
||||
.orderWeight(0)
|
||||
.createTime(date)
|
||||
.updateTime(date)
|
||||
.deleteType(0).build();
|
||||
|
|
@ -53,6 +54,7 @@ public class InitServiceImpl {
|
|||
.confValue(currentVersion.getConfValue())
|
||||
.title("上一个版本")
|
||||
.module("basic")
|
||||
.orderWeight(orderWeight)
|
||||
.createTime(date)
|
||||
.updateTime(date)
|
||||
.deleteType(0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue