Browse Source

陌生人搜网格接口测试修改

master
sunyuchao 5 years ago
parent
commit
2d456983b6
  1. 3
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/EpmetThirdFeignClient.java
  2. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CustomerMpController.java
  3. 3
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CustomerMpServiceImpl.java
  4. 2
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml

3
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/EpmetThirdFeignClient.java

@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestBody;
*
* @Author zxc
* @CreateTime 2020/7/5 14:45
* ,url="localhost:8110"
*/
@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = EpmetThirdFeignClientFallback.class)
@ -103,6 +104,6 @@ public interface EpmetThirdFeignClient {
* @Author sun
* @Description 根据appId查询公众号注册的客户信息
**/
@PostMapping(value = "third/customermp/getcustomermsg")
@PostMapping(value = "third/customermp/getcustomermsg/{appId}")
Result<PublicCustomerResultDTO> getCustomerMsg(@PathVariable("appId") String appId);
}

2
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CustomerMpController.java

@ -111,7 +111,7 @@ public class CustomerMpController {
* @Author sun
* @Description 根据appId查询公众号注册的客户信息
**/
@PostMapping("getcustomermsg")
@PostMapping("getcustomermsg/{appId}")
public Result<PublicCustomerResultDTO> getCustomerMsg(@PathVariable("appId") String appId) {
return new Result<PublicCustomerResultDTO>().ok(customerMpService.getCustomerMsg(appId));
}

3
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CustomerMpServiceImpl.java

@ -156,7 +156,8 @@ public class CustomerMpServiceImpl extends BaseServiceImpl<CustomerMpDao, Custom
PublicCustomerResultDTO resultDTO = new PublicCustomerResultDTO();
//1.根据appid查询客户信息
PaCustomerDTO paCustomerDTO = baseDao.selectCustomerByAppId(appId);
if(null==paCustomerDTO){
if (null == paCustomerDTO) {
logger.error("根据小程序appId未查询到已授权并且已完成客户初始化的客户信息,appId->" + appId);
throw new RenException(PaConstant.SELECT_CUSTOMER_EXCEPTION);
}
resultDTO.setCustomer(paCustomerDTO);

2
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml

@ -110,6 +110,8 @@
WHERE
cm.del_flag = '0'
AND pc.del_flag = '0'
AND pc.is_initialize = '1' <!-- 已完成客户初始化 -->
AND cm.authorization_flag = '1' <!-- 已完成小程序授权 -->
AND cm.app_id = #{appId}
</select>

Loading…
Cancel
Save