|
@ -15,6 +15,7 @@ import com.epmet.dao.MiniInfoDao; |
|
|
import com.epmet.dto.*; |
|
|
import com.epmet.dto.*; |
|
|
import com.epmet.dto.form.*; |
|
|
import com.epmet.dto.form.*; |
|
|
import com.epmet.dto.result.*; |
|
|
import com.epmet.dto.result.*; |
|
|
|
|
|
import com.epmet.feign.OperCrmOpenFeignClient; |
|
|
import com.epmet.feign.OssFeignClient; |
|
|
import com.epmet.feign.OssFeignClient; |
|
|
import com.epmet.service.*; |
|
|
import com.epmet.service.*; |
|
|
import com.epmet.wxapi.param.*; |
|
|
import com.epmet.wxapi.param.*; |
|
@ -68,6 +69,8 @@ public class CodeServiceImpl implements CodeService { |
|
|
private PaCustomerService paCustomerService; |
|
|
private PaCustomerService paCustomerService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private MiniInfoDao miniInfoDao; |
|
|
private MiniInfoDao miniInfoDao; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private OperCrmOpenFeignClient operCrmOpenFeignClient; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<TemplateListResultDTO> templateList() { |
|
|
public List<TemplateListResultDTO> templateList() { |
|
@ -97,11 +100,7 @@ public class CodeServiceImpl implements CodeService { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public String getExtJson(CodeUploadFormDTO formDTO) { |
|
|
public String getExtJson(CodeUploadFormDTO formDTO) { |
|
|
CodeExtDTO codeExtDTO = codeExtService.getExtByCustomer(formDTO.getCustomerId(), formDTO.getClientType()); |
|
|
return codeExtService.getExtTemplate(formDTO.getClientType()); |
|
|
if (null == codeExtDTO) { |
|
|
|
|
|
return codeExtService.getExtTemplate(formDTO.getClientType()); |
|
|
|
|
|
} |
|
|
|
|
|
return codeExtDTO.getExtJson(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -118,6 +117,12 @@ public class CodeServiceImpl implements CodeService { |
|
|
if (null == authInfo) { |
|
|
if (null == authInfo) { |
|
|
throw new RenException("未授权"); |
|
|
throw new RenException("未授权"); |
|
|
} |
|
|
} |
|
|
|
|
|
CustomerDTO customerFormDTO = new CustomerDTO(); |
|
|
|
|
|
customerFormDTO.setId(formDTO.getCustomerId()); |
|
|
|
|
|
Result<CustomerDTO> result = operCrmOpenFeignClient.getCustomerInfo(customerFormDTO); |
|
|
|
|
|
if (!result.success()) { |
|
|
|
|
|
throw new RenException(result.getCode(), result.getMsg()); |
|
|
|
|
|
} |
|
|
//获取小程序居民端与工作端名称
|
|
|
//获取小程序居民端与工作端名称
|
|
|
String resiName = miniInfoDao.getNickName(formDTO.getCustomerId(), "resi"); |
|
|
String resiName = miniInfoDao.getNickName(formDTO.getCustomerId(), "resi"); |
|
|
String workName = miniInfoDao.getNickName(formDTO.getCustomerId(), "work"); |
|
|
String workName = miniInfoDao.getNickName(formDTO.getCustomerId(), "work"); |
|
@ -127,6 +132,7 @@ public class CodeServiceImpl implements CodeService { |
|
|
wxExtJson.getExt().setExtAppid(authInfo.getAuthorizerAppid()); |
|
|
wxExtJson.getExt().setExtAppid(authInfo.getAuthorizerAppid()); |
|
|
wxExtJson.getExt().setResiName(resiName); |
|
|
wxExtJson.getExt().setResiName(resiName); |
|
|
wxExtJson.getExt().setWorkName(workName); |
|
|
wxExtJson.getExt().setWorkName(workName); |
|
|
|
|
|
wxExtJson.getExt().setCustomerName(null == result.getData().getCustomerName()?"":result.getData().getCustomerName()); |
|
|
extJson = JSON.toJSONString(wxExtJson); |
|
|
extJson = JSON.toJSONString(wxExtJson); |
|
|
CodeExtDTO codeExtDTO = codeExtService.getExtByCustomer(formDTO.getCustomerId(), formDTO.getClientType()); |
|
|
CodeExtDTO codeExtDTO = codeExtService.getExtByCustomer(formDTO.getCustomerId(), formDTO.getClientType()); |
|
|
if (null == codeExtDTO) { |
|
|
if (null == codeExtDTO) { |
|
|