Browse Source

地图替换

anderx 3 years ago
parent
commit
97eaeddd94

+ 48 - 0
src/main/java/com/kede/wechat/controller/WeChatLiveTelecastApiController.java

@@ -0,0 +1,48 @@
+package com.kede.wechat.controller;
+
+
+import com.kede.common.bo.Result;
+import com.kede.common.constant.ErrorConstants;
+import com.kede.common.controller.BaseController;
+import com.kede.common.model.WechatShare;
+import com.kede.wechat.bo.WechatShareBo;
+import com.kede.wechat.service.WeChatLiveTelecastApiService;
+import com.kede.wechat.service.WeChatShareService;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+@RestController
+@RequestMapping(value = "/api/admin/weChatShare")
+public class WeChatLiveTelecastApiController extends BaseController{
+
+
+	@Resource
+	private WeChatLiveTelecastApiService weChatLiveTelecastApiService;
+
+
+	/**
+	 * 	新增分享信息
+	 * @return
+	 */
+	@RequestMapping(value = "/add", method = RequestMethod.POST)
+	public Result add(WechatShare in) {
+		Result res=new Result();
+		if (in.getType()==null||in.getTitle()==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"分类或者标题","分类或者标题"));
+			return res;
+		}
+		if (in.getType()>0) {
+			WechatShareBo use=(WechatShareBo) weChatShareService.openDetails(in.getType(), in.getPid());
+			if (use!=null) {
+				String str=new StringBuffer().append("分类").append(in.getType()).append("已存在").toString();
+				res.getError().add(buildError(str,str));
+				return res;
+			}
+		}
+		return res.data(weChatShareService.add(in));
+	}
+
+}

+ 6 - 0
src/main/java/com/kede/wechat/service/WeChatLiveTelecastApiService.java

@@ -0,0 +1,6 @@
+package com.kede.wechat.service;
+
+public interface WeChatLiveTelecastApiService {
+
+    Object addLiveTelecast();
+}

+ 18 - 0
src/main/java/com/kede/wechat/service/impl/WeChatLiveTelecastApiServiceImpl.java

@@ -0,0 +1,18 @@
+package com.kede.wechat.service.impl;
+
+import com.kede.wechat.service.WeChatLiveTelecastApiService;
+import com.kede.wxsdk.service.WxService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class WeChatLiveTelecastApiServiceImpl implements WeChatLiveTelecastApiService {
+    @Autowired
+    private WxService wxService;
+
+    @Override
+    public Object addLiveTelecast() {
+
+        return null;
+    }
+}