Browse Source

Merge branches 'dev1.0' and 'dev1.0-authlogin' of http://121.42.41.42:7070/r/epmet-cloud into dev1.0-authlogin

 Conflicts:
	epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml
	epmet-auth/pom.xml
	epmet-module/epmet-demo/epmet-demo-server/pom.xml
	epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/feign/OperCrmFeignClient.java
	epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/service/DemoService.java
	epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/service/impl/DemoServiceImpl.java
	epmet-module/oper-crm/oper-crm-server/pom.xml
	epmet-user/epmet-user-server/pom.xml
	epmet-user/epmet-user-server/src/main/resources/bootstrap.yml
dev
yinzuomei 6 years ago
parent
commit
e307b88ccc
  1. 13
      epmet-auth/pom.xml
  2. 6
      epmet-module/epmet-activiti/epmet-activiti-server/pom.xml
  3. 12
      epmet-module/epmet-demo/epmet-demo-server/pom.xml
  4. 46
      epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/controller/DemoController.java
  5. 25
      epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/feign/OperCrmFeignClient.java
  6. 9
      epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/feign/fallback/OperCrmFeignClientFallBack.java
  7. 33
      epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/service/DemoService.java
  8. 7
      epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/service/impl/DemoServiceImpl.java
  9. 6
      epmet-module/epmet-message/epmet-message-server/pom.xml
  10. 6
      epmet-module/epmet-oss/epmet-oss-server/pom.xml
  11. 27
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java
  12. 9
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java
  13. 14
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java
  14. 12
      epmet-user/epmet-user-server/pom.xml
  15. 1
      epmet-user/epmet-user-server/src/main/resources/bootstrap.yml

13
epmet-auth/pom.xml

@ -57,6 +57,12 @@
<artifactId>kaptcha</artifactId>
<version>${kaptcha.version}</version>
</dependency>
<!-- 替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>10.3.0</version>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-common-clienttoken</artifactId>
@ -80,13 +86,6 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<!-- 替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>10.3.0</version>
</dependency>
</dependencies>
<build>

6
epmet-module/epmet-activiti/epmet-activiti-server/pom.xml

@ -124,6 +124,12 @@
</exclusion>
</exclusions>
</dependency>
<!-- 替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>10.3.0</version>
</dependency>
</dependencies>
<build>

12
epmet-module/epmet-demo/epmet-demo-server/pom.xml

@ -55,18 +55,18 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>gov-org-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<!-- 替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>10.3.0</version>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>gov-org-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

46
epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/controller/DemoController.java

@ -33,6 +33,7 @@ import com.epmet.dto.form.SaveCustomerFormDTO;
import com.epmet.dto.result.ValidCustomerResultDTO;
import com.epmet.excel.DemoExcel;
import com.epmet.service.DemoService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -101,18 +102,57 @@ public class DemoController {
return demoService.insertEpmetDemo();
}
/**
* @param
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.ValidCustomerResultDTO>>
* @Author yinzuomei
* @Description 测试:无参get请求feign示例
* @Date 2020/3/18 9:10
**/
@GetMapping("getValidCustomerlist")
public Result<List<ValidCustomerResultDTO>> getValidCustomerList(){
public Result<List<ValidCustomerResultDTO>> getValidCustomerList() {
return demoService.getValidCustomerList();
}
/**
* @param customerId
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.CustomerDTO>
* @Author yinzuomei
* @Description 测试:有参get请求feign@PathVariable
* @Date 2020/3/18 9:11
**/
@GetMapping("/queryCustomInfo/{customerId}")
public Result<CustomerDTO> queryCustomInfo(@PathVariable("customerId") String customerId){
public Result<CustomerDTO> queryCustomInfo(@PathVariable("customerId") String customerId) {
if (StringUtils.isBlank(customerId)) {
return new Result<CustomerDTO>().error("customerId不能为空");
}
return demoService.queryCustomerInfo(customerId);
}
/**
* @param customerId
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.CustomerDTO>
* @Author yinzuomei
* @Description 测试:有参get请求feign@RequestParam
* @Date 2020/3/18 9:32
**/
@GetMapping("/queryCustomInfoByCustomerId")
public Result<CustomerDTO> queryCustomInfoByCustomerId(@RequestParam("customerId") String customerId) {
if (StringUtils.isBlank(customerId)) {
return new Result<CustomerDTO>().error("customerId不能为空");
}
return demoService.queryCustomInfoByCustomerId(customerId);
}
/**
* @param dto
* @return com.epmet.commons.tools.utils.Result
* @Author yinzuomei
* @Description 测试:有参post请求示例,并返回插入主键
* @Date 2020/3/18 9:11
**/
@PostMapping("/saveCustomerInfo")
public Result saveCustomerInfo(@RequestBody SaveCustomerFormDTO dto){
public Result<String> saveCustomerInfo(@RequestBody SaveCustomerFormDTO dto) {
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
return demoService.saveCustomerInfo(dto);
}

25
epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/feign/OperCrmFeignClient.java

@ -7,10 +7,7 @@ import com.epmet.dto.result.ValidCustomerResultDTO;
import com.epmet.feign.fallback.OperCrmFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -25,7 +22,7 @@ public interface OperCrmFeignClient {
* @param
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.ValidCustomerResultDTO>>
* @Author yinzuomei
* @Description 查询有效客户列表
* @Description 测试:查询有效客户列表
* @Date 2020/3/11 23:28
**/
@GetMapping("/oper/crm/customer/getvalidcustomerlist")
@ -35,7 +32,7 @@ public interface OperCrmFeignClient {
* @param id
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.ValidCustomerResultDTO>>
* @Author yinzuomei
* @Description 根据id查看客户详情
* @Description 测试:根据id查看客户详情
* @Date 2020/3/11 23:28
**/
@GetMapping("/oper/crm/customer/{id}")
@ -45,9 +42,19 @@ public interface OperCrmFeignClient {
* @param dto
* @return com.epmet.commons.tools.utils.Result
* @Author yinzuomei
* @Description 保存客户信息
* @Description 测试:保存客户信息
* @Date 2020/3/11 23:32
**/
@PostMapping(value = "/oper/crm/customer/save", consumes = MediaType.APPLICATION_JSON_VALUE)
Result saveCustomerInfo(@RequestBody CustomerDTO dto);
@PostMapping(value = "/oper/crm/customer/saveCustomerInfo", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
Result<String> saveCustomerInfo(@RequestBody CustomerDTO dto);
/**
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.CustomerDTO>
* @param customerId
* @Author yinzuomei
* @Description 测试:根据id查看客户详情
* @Date 2020/3/18 9:47
**/
@GetMapping("/oper/crm/customer/queryCustomInfoByCustomerId")
Result<CustomerDTO> queryCustomInfoByCustomerId(@RequestParam("customerId") String customerId);
}

9
epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/feign/fallback/OperCrmFeignClientFallBack.java

@ -28,7 +28,12 @@ public class OperCrmFeignClientFallBack implements OperCrmFeignClient {
}
@Override
public Result saveCustomerInfo(CustomerDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "save",dto);
public Result<String> saveCustomerInfo(CustomerDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "saveCustomerInfo",dto);
}
@Override
public Result<CustomerDTO> queryCustomInfoByCustomerId(String customerId) {
return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "queryCustomInfoByCustomerId",customerId);
}
}

33
epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/service/DemoService.java

@ -101,10 +101,41 @@ public interface DemoService extends BaseService<DemoEntity> {
Result insertEpmetDemo();
/**
* @param
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.ValidCustomerResultDTO>>
* @Author yinzuomei
* @Description 测试:无参get请求feign示例
* @Date 2020/3/18 9:51
**/
Result<List<ValidCustomerResultDTO>> getValidCustomerList();
Result<CustomerDTO> queryCustomerInfo(String customerId);
/**
* @param customerId
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.CustomerDTO>
* @Author yinzuomei
* @Description 测试:有参get请求feign@PathVariable
* @Date 2020/3/18 9:51
**/
Result<CustomerDTO> queryCustomerInfo(String customerId);
/**
* @param customerId
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.CustomerDTO>
* @Author yinzuomei
* @Description 测试:有参get请求feign@RequestParam
* @Date 2020/3/18 9:51
**/
Result<CustomerDTO> queryCustomInfoByCustomerId(String customerId);
/**
* @param dto
* @return com.epmet.commons.tools.utils.Result<java.lang.String>
* @Author yinzuomei
* @Description 测试:有参post请求示例,并返回插入主键
* @Date 2020/3/18 9:51
**/
Result<String> saveCustomerInfo(SaveCustomerFormDTO dto);
Result saveCustomerInfo(SaveCustomerFormDTO dto);
Result<CustomerGridDTO> getcustomergrid(String id);

7
epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/service/impl/DemoServiceImpl.java

@ -143,7 +143,7 @@ public class DemoServiceImpl extends BaseServiceImpl<DemoDao, DemoEntity> implem
}
@Override
public Result saveCustomerInfo(SaveCustomerFormDTO formDTO) {
public Result<String> saveCustomerInfo(SaveCustomerFormDTO formDTO) {
CustomerDTO dto =ConvertUtils.sourceToTarget(formDTO, CustomerDTO.class);
SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd");
try {
@ -154,6 +154,11 @@ public class DemoServiceImpl extends BaseServiceImpl<DemoDao, DemoEntity> implem
return operCrmFeignClient.saveCustomerInfo(dto);
}
@Override
public Result<CustomerDTO> queryCustomInfoByCustomerId(String customerId) {
return operCrmFeignClient.queryCustomInfoByCustomerId(customerId);
}
@Override
public Result<CustomerGridDTO> getcustomergrid(String id) {
return govOrgFeignClient.getcustomergrid(id);

6
epmet-module/epmet-message/epmet-message-server/pom.xml

@ -84,6 +84,12 @@
<artifactId>freemarker</artifactId>
<version>${freemarker.version}</version>
</dependency>
<!-- 替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>10.3.0</version>
</dependency>
</dependencies>
<build>

6
epmet-module/epmet-oss/epmet-oss-server/pom.xml

@ -92,6 +92,12 @@
<artifactId>fastdfs-client</artifactId>
<version>${fastdfs.version}</version>
</dependency>
<!-- 替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>10.3.0</version>
</dependency>
</dependencies>
<build>

27
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java

@ -98,6 +98,33 @@ public class CustomerController {
ExcelUtils.exportExcelToTarget(response, null, list, CustomerExcel.class);
}
/**
* @param customerId
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.CustomerDTO>
* @Author yinzuomei
* @Description 测试:测试demo模块通过feign调用opercrm
* @Date 2020/3/18 9:43
**/
@GetMapping("queryCustomInfoByCustomerId")
public Result<CustomerDTO> queryCustomInfoByCustomerId(@RequestParam("customerId") String customerId) {
CustomerDTO data = customerService.get(customerId);
return new Result<CustomerDTO>().ok(data);
}
/**
* @param dto
* @return com.epmet.commons.tools.utils.Result<java.lang.String>
* @Author yinzuomei
* @Description 测试:测试demo模块通过feign调用opercrm
* @Date 2020/3/18 9:43
**/
@PostMapping("saveCustomerInfo")
public Result<String> saveCustomerInfo(@RequestBody CustomerDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
return customerService.saveCustomerInfo(dto);
}
/**
* @param
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.ValidCustomerResultDTO>

9
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java

@ -104,4 +104,13 @@ public interface CustomerService extends BaseService<CustomerEntity> {
* @date 2020-03-11
*/
Result<List<ValidCustomerResultDTO>> getValidCustomerList();
/**
* @param dto
* @return com.epmet.commons.tools.utils.Result<java.lang.String>
* @Author yinzuomei
* @Description 保存客户信息并返回主键
* @Date 2020/3/18 9:44
**/
Result<String> saveCustomerInfo(CustomerDTO dto);
}

14
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java

@ -115,4 +115,18 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
return new Result<List<ValidCustomerResultDTO>>().ok(baseDao.selectListValidCustomerResultDTO());
}
/**
* @param dto
* @return com.epmet.commons.tools.utils.Result<java.lang.String>
* @Author yinzuomei
* @Description 测试:保存客户信息并返回主键
* @Date 2020/3/18 9:48
**/
@Override
public Result<String> saveCustomerInfo(CustomerDTO dto) {
CustomerEntity entity = ConvertUtils.sourceToTarget(dto, CustomerEntity.class);
insert(entity);
return new Result<String>().ok(entity.getId());
}
}

12
epmet-user/epmet-user-server/pom.xml

@ -48,6 +48,12 @@
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- 替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>10.3.0</version>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-common-clienttoken</artifactId>
@ -58,12 +64,6 @@
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
</dependency>
<!-- 替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>10.3.0</version>
</dependency>
</dependencies>
<build>

1
epmet-user/epmet-user-server/src/main/resources/bootstrap.yml

@ -106,6 +106,7 @@ feign:
httpclient:
enabled: true
hystrix:
command:
default:

Loading…
Cancel
Save