1.公众号订阅新增type类型
This commit is contained in:
@@ -19,6 +19,8 @@ import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -38,6 +40,7 @@ import java.util.List;
|
||||
@RequiredArgsConstructor
|
||||
public class CommonController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(CommonController.class);
|
||||
private final ValidateCodeUtil validateCodeUtil;
|
||||
|
||||
@Autowired
|
||||
@@ -213,10 +216,11 @@ public class CommonController {
|
||||
*/
|
||||
@PostMapping("/subMsg")
|
||||
public Result subscribeWxAccount(@RequestBody WxMsgSubDTO wxMsgSubDTO) {
|
||||
log.info("接收到订阅消息接口调用,携带数据: {}", wxMsgSubDTO);
|
||||
if (wxMsgSubDTO.getOpenId() == null || wxMsgSubDTO.getShopId() == null) {
|
||||
return Result.fail("shopId或openId缺失");
|
||||
}
|
||||
loginService.addShopId(wxMsgSubDTO.getOpenId(), wxMsgSubDTO.getShopId());
|
||||
loginService.addShopId(wxMsgSubDTO.getOpenId(), wxMsgSubDTO.getShopId(), wxMsgSubDTO.getType());
|
||||
return Result.success(CodeEnum.SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user