|
@ -49,10 +49,10 @@ public class CerePlatformMemberLevelServiceImpl implements CerePlatformMemberLev |
|
|
@Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) |
|
|
@Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) |
|
|
public void save(MemberLevelSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { |
|
|
public void save(MemberLevelSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { |
|
|
String time= TimeUtils.yyMMddHHmmss(); |
|
|
String time= TimeUtils.yyMMddHHmmss(); |
|
|
if (cerePlatformMemberLevelDAO.countMemberLevel(StringUtils.trim(param.getMemberLevelName()), param.getGrowth(), null) > 0) { |
|
|
|
|
|
|
|
|
/* if (cerePlatformMemberLevelDAO.countMemberLevel(StringUtils.trim(param.getMemberLevelName()), param.getGrowth(), null) > 0) { |
|
|
throw new CoBusinessException(CoReturnFormat.EXIST_MEMBER_LEVEL); |
|
|
throw new CoBusinessException(CoReturnFormat.EXIST_MEMBER_LEVEL); |
|
|
} |
|
|
|
|
|
if (param.getGrowth() != 0 && cerePlatformMemberLevelDAO.countByGrowth(0) == 0) { |
|
|
|
|
|
|
|
|
}*/ |
|
|
|
|
|
if (param.getGrowth() != 0 && cerePlatformMemberLevelDAO.countByGrowth(user.getBusinessId(), 0) == 0) { |
|
|
throw new CoBusinessException(CoReturnFormat.NEED_ZERO_GROWTH); |
|
|
throw new CoBusinessException(CoReturnFormat.NEED_ZERO_GROWTH); |
|
|
} |
|
|
} |
|
|
CerePlatformMemberLevel memberLevel=new CerePlatformMemberLevel(); |
|
|
CerePlatformMemberLevel memberLevel=new CerePlatformMemberLevel(); |
|
@ -73,9 +73,9 @@ public class CerePlatformMemberLevelServiceImpl implements CerePlatformMemberLev |
|
|
@Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) |
|
|
@Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) |
|
|
public void update(MemberLevelUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { |
|
|
public void update(MemberLevelUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { |
|
|
String time= TimeUtils.yyMMddHHmmss(); |
|
|
String time= TimeUtils.yyMMddHHmmss(); |
|
|
if (cerePlatformMemberLevelDAO.countMemberLevel(StringUtils.trim(param.getMemberLevelName()), param.getGrowth(), param.getMemberLevelId()) > 0) { |
|
|
|
|
|
|
|
|
/*if (cerePlatformMemberLevelDAO.countMemberLevel(StringUtils.trim(param.getMemberLevelName()), param.getGrowth(), param.getMemberLevelId()) > 0) { |
|
|
throw new CoBusinessException(CoReturnFormat.EXIST_MEMBER_LEVEL); |
|
|
throw new CoBusinessException(CoReturnFormat.EXIST_MEMBER_LEVEL); |
|
|
} |
|
|
|
|
|
|
|
|
}*/ |
|
|
CerePlatformMemberLevel oldLevel = cerePlatformMemberLevelDAO.selectByPrimaryKey(param.getMemberLevelId()); |
|
|
CerePlatformMemberLevel oldLevel = cerePlatformMemberLevelDAO.selectByPrimaryKey(param.getMemberLevelId()); |
|
|
if (oldLevel == null) { |
|
|
if (oldLevel == null) { |
|
|
throw new CoBusinessException(CoReturnFormat.PARAM_INVALID); |
|
|
throw new CoBusinessException(CoReturnFormat.PARAM_INVALID); |
|
|