| @@ -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); | |||
| } | |||
| } | |||
| @@ -1,68 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxAppinfo; | |||
| import com.iformall.domain.po.WxTemplateMsg; | |||
| import com.iformall.enums.EnumTemplateType; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| public interface WxTemplateMsgService { | |||
| /** | |||
| * wx_template_msg 初始化 | |||
| * 设置核销成功通知,核销失败通知 | |||
| * @param tenantId | |||
| * @return | |||
| */ | |||
| void wxTemplateMsgInit(String tenantId); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param pageIndex | |||
| * @param pageSize | |||
| * @return | |||
| */ | |||
| PageInfo<WxTemplateMsg> listAsPage(WxTemplateMsg record, Integer pageIndex, Integer pageSize); | |||
| List<WxTemplateMsg> findList(WxTemplateMsg record); | |||
| /** | |||
| * 根据Id获得实体 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| WxTemplateMsg getById(Long id); | |||
| /** | |||
| * 根据Obj获得实体 | |||
| * | |||
| * @param record | |||
| * @return | |||
| */ | |||
| WxTemplateMsg getByObj(WxTemplateMsg record); | |||
| /** | |||
| * 保存或更新实体 | |||
| * | |||
| * @param record | |||
| */ | |||
| void saveOrUpdate(WxTemplateMsg record); | |||
| /** | |||
| * 根据Id删除实体 | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| PageInfo<WxTemplateMsg> listAsPageForMiniApp(WxTemplateMsg wxTemplateMsg, Integer pageNum, Integer pageSize); | |||
| void sendTemplateMsg(WxAppinfo appinfo, EnumTemplateType templateType, Long userId, String toPage, Map<String, String> param); | |||
| } | |||
| @@ -55,8 +55,6 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService { | |||
| @Autowired | |||
| WxScoreRulesService wxScoreRulesService; | |||
| @Autowired | |||
| WxTemplateMsgService wxTemplateMsgService; | |||
| @Autowired | |||
| WxQuestionService wxQuestionService; | |||
| @Autowired | |||
| WxMsgValidationcodeModelService wxMsgValidationcodeModelService; | |||
| @@ -144,7 +142,6 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService { | |||
| wxScoreRulesService.wxScoreRulesInit(wxMall.getTenantId()); | |||
| //# 17. wx_template_msg | |||
| //# 设置核销成功通知,核销失败通知 | |||
| wxTemplateMsgService.wxTemplateMsgInit(wxMall.getTenantId()); | |||
| // # 19. wx_question | |||
| wxQuestionService.wxQuestionInit(wxMall.getTenantId()); | |||
| //# 20. wx_msg_validationcode_model, 数据重新一下 | |||