| @@ -21,6 +21,7 @@ import io.swagger.annotations.ApiImplicitParam; | |||||
| import io.swagger.annotations.ApiImplicitParams; | import io.swagger.annotations.ApiImplicitParams; | ||||
| import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
| import me.chanjar.weixin.common.error.WxErrorException; | import me.chanjar.weixin.common.error.WxErrorException; | ||||
| import org.apache.commons.lang3.StringUtils; | |||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| @@ -28,6 +29,7 @@ import org.springframework.web.bind.annotation.*; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | |||||
| /** | /** | ||||
| * Stormeye Wu | * Stormeye Wu | ||||
| @@ -132,7 +134,15 @@ public class WechatWeappMsgTemplateController { | |||||
| @ApiOperation("删除帐号下的某个模板") | @ApiOperation("删除帐号下的某个模板") | ||||
| @PostMapping("delTemplate") | @PostMapping("delTemplate") | ||||
| public ResultData delTemplate(@RequestParam(value = "appId") String appId, @RequestParam(value = "templateId") String templateId) { | |||||
| public ResultData delTemplate(@RequestBody Map<String, String> params) { | |||||
| String appId = params.get("appId"); | |||||
| String templateId = params.get("templteId"); | |||||
| if(StringUtils.isBlank(appId)) { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| if(StringUtils.isBlank(templateId)) { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| // check app | // check app | ||||
| WxAppinfo appinfo = appinfoService.getByAppId(appId); | WxAppinfo appinfo = appinfoService.getByAppId(appId); | ||||
| if(appinfo == null) { | if(appinfo == null) { | ||||