奖惩
This commit is contained in:
@ -9,6 +9,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ -91,12 +92,12 @@ public class HseRewardsPunishmentsBo extends BaseEntity {
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
private LocalDateTime endTime;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package org.dromara.safety.service.impl;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||
@ -124,6 +126,9 @@ public class HseRewardsPunishmentsServiceImpl extends ServiceImpl<HseRewardsPuni
|
||||
public Boolean insertByBo(HseRewardsPunishmentsBo bo) {
|
||||
HseRewardsPunishments add = MapstructUtils.convert(bo, HseRewardsPunishments.class);
|
||||
validEntityBeforeSave(add);
|
||||
Snowflake snowflake = IdUtil.getSnowflake(1, 1);
|
||||
long id = snowflake.nextId();
|
||||
add.setRpCode("JC-" + id);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
|
||||
Reference in New Issue
Block a user