|
|
@ -11,6 +11,7 @@ import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.constant.CodeConstant; |
|
|
|
import com.epmet.dao.AuthorizationInfoDao; |
|
|
|
import com.epmet.dao.ComponentAccessTokenDao; |
|
|
|
import com.epmet.dao.MiniInfoDao; |
|
|
|
import com.epmet.dto.*; |
|
|
|
import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.result.*; |
|
|
@ -65,6 +66,8 @@ public class CodeServiceImpl implements CodeService { |
|
|
|
private OssFeignClient ossFeignClient; |
|
|
|
@Autowired |
|
|
|
private PaCustomerService paCustomerService; |
|
|
|
@Autowired |
|
|
|
private MiniInfoDao miniInfoDao; |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<TemplateListResultDTO> templateList() { |
|
|
@ -115,10 +118,15 @@ public class CodeServiceImpl implements CodeService { |
|
|
|
if (null == authInfo) { |
|
|
|
throw new RenException("未授权"); |
|
|
|
} |
|
|
|
//获取小程序居民端与工作端名称
|
|
|
|
String resiName = miniInfoDao.getNickName(formDTO.getCustomerId(), "resi"); |
|
|
|
String workName = miniInfoDao.getNickName(formDTO.getCustomerId(), "work"); |
|
|
|
String extJson = getExtJson(formDTO); |
|
|
|
WxExtJson wxExtJson = JSONObject.parseObject(extJson, WxExtJson.class); |
|
|
|
wxExtJson.setExtAppid(authInfo.getAuthorizerAppid()); |
|
|
|
wxExtJson.getExt().setExtAppid(authInfo.getAuthorizerAppid()); |
|
|
|
wxExtJson.getExt().setResiName(resiName); |
|
|
|
wxExtJson.getExt().setWorkName(workName); |
|
|
|
extJson = JSON.toJSONString(wxExtJson); |
|
|
|
CodeExtDTO codeExtDTO = codeExtService.getExtByCustomer(formDTO.getCustomerId(), formDTO.getClientType()); |
|
|
|
if (null == codeExtDTO) { |
|
|
|