|
|
@@ -1,22 +1,22 @@
|
|
|
package com.lc.ibps.org.provider;
|
|
|
|
|
|
-import javax.annotation.Resource;
|
|
|
-
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-
|
|
|
import com.lc.ibps.api.base.constants.StateEnum;
|
|
|
import com.lc.ibps.api.org.constant.PartyRelType;
|
|
|
+import com.lc.ibps.base.core.constants.StringPool;
|
|
|
import com.lc.ibps.base.core.util.I18nUtil;
|
|
|
+import com.lc.ibps.base.framework.request.signature.annotation.Signature;
|
|
|
import com.lc.ibps.cloud.entity.APIResult;
|
|
|
import com.lc.ibps.cloud.provider.GenericProvider;
|
|
|
import com.lc.ibps.org.api.IPartyRelService;
|
|
|
+import com.lc.ibps.org.party.domain.PartyRel;
|
|
|
import com.lc.ibps.org.party.persistence.entity.PartyRelPo;
|
|
|
import com.lc.ibps.org.party.repository.PartyRelRepository;
|
|
|
+import io.swagger.annotations.*;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import io.swagger.annotations.ApiParam;
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.validation.Valid;
|
|
|
|
|
|
/**
|
|
|
* 参与者关系
|
|
|
@@ -71,4 +71,27 @@ public class PartyRelProvider extends GenericProvider implements IPartyRelServic
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @ApiOperation(value = "保存", notes = "保存参与者与人对象",
|
|
|
+ extensions = {
|
|
|
+ @Extension(properties = {
|
|
|
+ @ExtensionProperty(name = "submitCtrl", value = StringPool.Y)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ @Signature
|
|
|
+ @Override
|
|
|
+ public APIResult<Void> save(@Valid PartyRelPo partyRelPo) {
|
|
|
+ APIResult<Void> result = new APIResult<Void>();
|
|
|
+ try {
|
|
|
+ logger.debug("com.lc.ibps.org.provider.PartyRelPo.save()--->partyRelPo: {}",partyRelPo.toString());
|
|
|
+ PartyRel partyRel = partyRelRepository.newInstance(partyRelPo);
|
|
|
+ partyRel.save();
|
|
|
+ result.setMessage(I18nUtil.getMessage("com.lc.ibps.org.provider.PartyRelProvider.save"));
|
|
|
+ result.addVariable("id", partyRelPo.getId());
|
|
|
+ } catch (Exception e) {
|
|
|
+ setExceptionResult(result, StateEnum.ERROR_ENTITY.getCode(), I18nUtil.getMessage(StateEnum.ERROR_ENTITY.getCode()+""), e);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
}
|