|
|
|
@@ -10,13 +10,9 @@ import com.iformall.enums.EnumScoreType; |
|
|
|
import com.iformall.enums.EnumUserType; |
|
|
|
import com.iformall.mapper.*; |
|
|
|
import com.iformall.service.WxCreditHistoryService; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
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.RestController; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.util.*; |
|
|
|
@@ -61,12 +57,11 @@ public class DataInitController extends BaseController { |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/createMsgModel") |
|
|
|
@ApiImplicitParam(name = "content", value = "content", dataType = "Long", paramType = "query", required = true) |
|
|
|
public ResultData createMsgModel(String content) { |
|
|
|
public ResultData createMsgModel(@RequestParam String content, @RequestParam Integer code) { |
|
|
|
try { |
|
|
|
MallUserInfo userInfo = getUser(); |
|
|
|
if (userInfo.isFmSuperAdmin()) { |
|
|
|
addMsgModel(content); |
|
|
|
addMsgModel(content, code); |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
@@ -167,9 +162,9 @@ public class DataInitController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void addMsgModel(String context) { |
|
|
|
public void addMsgModel(String context, Integer code) { |
|
|
|
IdWorker idWorker = IdWorker.get(); |
|
|
|
addBirthDayMsgModelToMall(EnumMsgModel.COUPON_CARD_SEND, idWorker, context); |
|
|
|
addBirthDayMsgModelToMall(EnumMsgModel.getEnum(code), idWorker, context); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|