liaoyongfei il y a 4 ans
Parent
commit
e775511d6b

+ 2 - 0
mpwechatApp/src/main/java/com/liangjian11/wx/mp/service/application/AppMsgRefService.java

@@ -24,4 +24,6 @@ public interface AppMsgRefService {
      * @return
      */
     List<Map<String,Object>> getAllMsgConfig(Integer portRefId);
+
+    void save(AppMsgRef appMsgRef);
 }

+ 11 - 0
mpwechatApp/src/main/java/com/liangjian11/wx/mp/service/application/impl/AppMsgRefServiceImpl.java

@@ -46,4 +46,15 @@ public class AppMsgRefServiceImpl implements AppMsgRefService {
     public List<Map<String, Object>> getAllMsgConfig(Integer portRefId) {
         return msgRefMapper.getAllMsgConfig(portRefId);
     }
+
+    @Override
+    public void save(AppMsgRef appMsgRef) {
+        if(appMsgRef.getId() == null ){
+            // 新增
+            msgRefMapper.insertAppMsgRef(appMsgRef);
+        } else {
+            // 存在ID 则编辑
+            msgRefMapper.updateByIdSelect(appMsgRef);
+        }
+    }
 }