|
|
@@ -1,45 +0,0 @@ |
|
|
|
package com.iformall.controller; |
|
|
|
|
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.WxTemplateMsg; |
|
|
|
import com.iformall.enums.EnumYesOrNo; |
|
|
|
import com.iformall.service.WxTemplateMsgService; |
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
|
* @author gongbiao |
|
|
|
*/ |
|
|
|
@RestController |
|
|
|
@RequestMapping("/api/templateMsg") |
|
|
|
public class WxTemplateMsgController extends BaseController { |
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass()); |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxTemplateMsgService wxTemplateMsgService; |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("模板列表接口") |
|
|
|
@GetMapping("list") |
|
|
|
@ApiImplicitParams({}) |
|
|
|
public ResultData templateList(@ModelAttribute WxTemplateMsg wxTemplateMsg) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxTemplateMsgController::list"); |
|
|
|
if(wxTemplateMsg.getProjectType() == null || wxTemplateMsg.getPlat() == null){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); |
|
|
|
} |
|
|
|
wxTemplateMsg.updateTenantInfo(getTenantInfo()); |
|
|
|
wxTemplateMsg.setOnOff(EnumYesOrNo.YES.getCode()); |
|
|
|
List<WxTemplateMsg> list = wxTemplateMsgService.findList(wxTemplateMsg); |
|
|
|
//todo 微信订阅消息一次只支持3个 |
|
|
|
|
|
|
|
return new ResultData(list); |
|
|
|
} |
|
|
|
|
|
|
|
} |