skyouc
3 天以前 38738b94b499ba1ccd37ab8824b5569db6662d5f
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/WaveRuleController.java
@@ -11,7 +11,10 @@
import com.vincent.rsf.server.common.domain.PageParam;
import com.vincent.rsf.server.manager.entity.WaveRule;
import com.vincent.rsf.server.manager.service.WaveRuleService;
import com.vincent.rsf.server.system.constant.SerialRuleCode;
import com.vincent.rsf.server.system.controller.BaseController;
import com.vincent.rsf.server.system.utils.SerialRuleUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@@ -59,6 +62,10 @@
        waveRule.setCreateTime(new Date());
        waveRule.setUpdateBy(getLoginUserId());
        waveRule.setUpdateTime(new Date());
        String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_WAVE_RULE_CODE, null);
        if (!StringUtils.isBlank(ruleCode)) {
               waveRule.setCode(ruleCode);
        }
        if (!waveRuleService.save(waveRule)) {
            return R.error("Save Fail");
        }