|
|
@@ -87,6 +87,9 @@ public class CardInfoServiceImpl extends SuperService implements CardInfoService
|
|
|
}
|
|
|
}
|
|
|
BeanUtils.copyProperties(param, cardInfo, "cardState");
|
|
|
+ if(cardInfo.getCardState() == null) {
|
|
|
+ cardInfo.setCardState(CardState.Enable);
|
|
|
+ }
|
|
|
if (StringUtils.isNotEmpty(oid)) {
|
|
|
Organization organization = organizationDao.findTopByOid(oid);
|
|
|
cardInfo.setOrganization(organization);
|
|
|
@@ -334,6 +337,17 @@ public class CardInfoServiceImpl extends SuperService implements CardInfoService
|
|
|
return ResultContent.buildSuccess(model);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public ResultContent<CardInfoModel> getCardDetailByCode(String code) {
|
|
|
+ Assert.hasText(code, "code不能为空");
|
|
|
+ CardInfo cardInfo = cardInfoDao.findByCode(code);
|
|
|
+ if (ObjectUtils.isEmpty(cardInfo)) {
|
|
|
+ return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIST, code));
|
|
|
+ }
|
|
|
+ CardInfoModel model = toModel(cardInfo);
|
|
|
+ return ResultContent.buildSuccess(model);
|
|
|
+ }
|
|
|
+
|
|
|
public CardInfoModel toModel(CardInfo entity) {
|
|
|
CardInfoModel model = null;
|
|
|
if (ObjectUtils.isNotEmpty(entity)) {
|