| | |
| | | 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.*; |
| | |
| | | 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"); |
| | | } |