| @@ -1,8 +1,9 @@ | |||||
| package com.iformall.controller.sys; | package com.iformall.controller.sys; | ||||
| import com.alibaba.fastjson.JSON; | |||||
| import com.google.common.base.Function; | import com.google.common.base.Function; | ||||
| import com.google.common.collect.*; | |||||
| import com.google.common.collect.ImmutableList; | |||||
| import com.google.common.collect.ImmutableListMultimap; | |||||
| import com.google.common.collect.Multimaps; | |||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.common.IdWorker; | import com.iformall.common.IdWorker; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| @@ -14,11 +15,13 @@ import com.iformall.enums.EnumUserType; | |||||
| import com.iformall.mapper.*; | import com.iformall.mapper.*; | ||||
| import com.iformall.service.WxCreditHistoryService; | import com.iformall.service.WxCreditHistoryService; | ||||
| import com.iformall.utils.DateUtils; | import com.iformall.utils.DateUtils; | ||||
| import io.swagger.annotations.ApiImplicitParam; | |||||
| import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
| import org.apache.commons.collections.CollectionUtils; | import org.apache.commons.collections.CollectionUtils; | ||||
| import org.checkerframework.checker.nullness.qual.Nullable; | import org.checkerframework.checker.nullness.qual.Nullable; | ||||
| import org.springframework.transaction.annotation.Transactional; | import org.springframework.transaction.annotation.Transactional; | ||||
| import org.springframework.web.bind.annotation.GetMapping; | import org.springframework.web.bind.annotation.GetMapping; | ||||
| import org.springframework.web.bind.annotation.PostMapping; | |||||
| import org.springframework.web.bind.annotation.RequestMapping; | import org.springframework.web.bind.annotation.RequestMapping; | ||||
| import org.springframework.web.bind.annotation.RestController; | import org.springframework.web.bind.annotation.RestController; | ||||
| @@ -67,6 +70,23 @@ public class DataInitController extends BaseController { | |||||
| private WxMerchantMapper wxMerchantMapper; | private WxMerchantMapper wxMerchantMapper; | ||||
| @PostMapping("/createMsgModel") | |||||
| @ApiImplicitParam(name = "content", value = "content", dataType = "Long", paramType = "query", required = true) | |||||
| public ResultData createMsgModel(String content) { | |||||
| try { | |||||
| MallUserInfo userInfo = getUser(); | |||||
| if (userInfo.isFmSuperAdmin()) { | |||||
| addMsgModel(content); | |||||
| return new ResultData(); | |||||
| } | |||||
| } catch (Exception e) { | |||||
| log.error("DataInitController::createMsgModel error ", e); | |||||
| return new ResultData(ErrorCode.MSG_METHOD_REQUEST_ERROR, e.getMessage()); | |||||
| } | |||||
| return new ResultData(); | |||||
| } | |||||
| @GetMapping("/init") | @GetMapping("/init") | ||||
| public ResultData init() { | public ResultData init() { | ||||
| try { | try { | ||||
| @@ -344,6 +364,12 @@ public class DataInitController extends BaseController { | |||||
| }); | }); | ||||
| } | } | ||||
| @Transactional(rollbackFor = Exception.class) | |||||
| public void addMsgModel(String context) { | |||||
| IdWorker idWorker = IdWorker.get(); | |||||
| addBirthDayMsgModelToMall(EnumMsgModel.COUPON_BIRTHDAY_OPENED, idWorker, context); | |||||
| } | |||||
| /** | /** | ||||
| * 增加会员生日短信模板 | * 增加会员生日短信模板 | ||||
| */ | */ | ||||