| | |
| | | throw new ParamsException(1, "参数不完整");
|
| | |
|
| | | // 判断是否存在
|
| | | TeamDividentsRecord old = teamDividentsRecordMapper.selectByUidAndDayForUpdate(record.getUid(),
|
| | | record.getDay());
|
| | | TeamDividentsRecord old = teamDividentsRecordMapper.selectByUidAndDayAndTypeForUpdate(record.getUid(),
|
| | | record.getDay(),record.getType());
|
| | | if (old != null)
|
| | | throw new TeamDividentsRecordException(TeamDividentsRecordException.CODE_EXIST, "记录已存在");
|
| | | // 加入记录
|
| | |
|
| | | if (record.getCreateTime() == null)
|
| | | record.setCreateTime(new Date());
|
| | | teamDividentsRecordMapper.insertSelective(record);
|