|
|
@ -450,7 +450,20 @@ public class SubscribeServiceImpl implements SubscribeService { |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void delPersonalTemp(DelPersonalTempFormDTO formDTO) { |
|
|
|
|
|
|
|
AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(formDTO.getCustomerId(), formDTO.getClientType()); |
|
|
|
if (null == authInfo) { |
|
|
|
throw new RenException("未授权或token已过期"); |
|
|
|
} |
|
|
|
formDTO.getTempIdList().forEach(tempId -> { |
|
|
|
PersonalTemplateDTO dto = personalTemplateService.get(tempId); |
|
|
|
WxDelTemplateReq request = new WxDelTemplateReq(); |
|
|
|
request.setPriTmplId(dto.getPriTmplId()); |
|
|
|
WxResult wxResult = wxMaSubscribeService.delTemplate(authInfo.getAuthorizerAccessToken(), request); |
|
|
|
if (!wxResult.success()) { |
|
|
|
throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg()); |
|
|
|
} |
|
|
|
personalTemplateService.deleteById(dto.getId()); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
private WxGetCategoryResult getCategoryResult(String accessToken) { |
|
|
|