Commit c2e3c616 by 范富荣

添加查询/修改客户档案到接口层

1 parent bb67c29e
......@@ -7,7 +7,7 @@
</parent>
<groupId>cn.com.glsx</groupId>
<artifactId>rpc-dj-mindworkplate-api</artifactId>
<version>5.7.0-SNAPSHOT</version>
<version>5.7.10-SNAPSHOT</version>
<name>rpc-dj-mindworkplate-api</name>
<properties>
<deploy.scanPackage>cn.com.glsx.remote</deploy.scanPackage>
......
package cn.com.glsx.dj.mindworkplate.remote;
import cn.com.glsx.dj.mindworkplate.dto.ReceptionCustomerFileDetailDTO;
import cn.com.glsx.dj.mindworkplate.dto.ReceptionCustomerFileUpdateRequestDTO;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
public interface ReceptionCustomerFileRemote {
RpcResponse<ReceptionCustomerFileDetailDTO> findDetailByReceptionId(Integer receptionId);
RpcResponse<Boolean> updateCustomerFile(ReceptionCustomerFileUpdateRequestDTO request);
}
......@@ -51,7 +51,7 @@
<dependency>
<groupId>cn.com.glsx</groupId>
<artifactId>rpc-dj-mindworkplate-api</artifactId>
<version>5.7.0-SNAPSHOT</version>
<version>5.7.10-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
......
package cn.com.glsx.dj.mindworkplate.remote;
import cn.com.glsx.dj.mindworkplate.dto.ReceptionCustomerFileDetailDTO;
import cn.com.glsx.dj.mindworkplate.dto.ReceptionCustomerFileUpdateRequestDTO;
import cn.com.glsx.dj.mindworkplate.service.customer.ReceptionCustomerFileGenerateService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Slf4j
@DubboService(protocol = "dubbo")
@Component
public class ReceptionCustomerFileRemoteImpl implements ReceptionCustomerFileRemote {
@Autowired
private ReceptionCustomerFileGenerateService receptionCustomerFileGenerateService;
@Override
public RpcResponse<ReceptionCustomerFileDetailDTO> findDetailByReceptionId(Integer receptionId) {
try {
ReceptionCustomerFileDetailDTO result = receptionCustomerFileGenerateService.findDetailByReceptionId(receptionId);
return RpcResponse.success(result);
} catch (RpcServiceException e) {
log.error("查询客户档案详情接口调用异常!", e);
return RpcResponse.error(e);
} catch (Exception e) {
log.error("查询客户档案详情接口调用异常!", e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Boolean> updateCustomerFile(ReceptionCustomerFileUpdateRequestDTO request) {
try {
boolean result = receptionCustomerFileGenerateService.updateCustomerFile(request);
return RpcResponse.success(result);
} catch (RpcServiceException e) {
log.error("更新客户档案接口调用异常!", e);
return RpcResponse.error(e);
} catch (Exception e) {
log.error("更新客户档案接口调用异常!", e);
return RpcResponse.error(e);
}
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!