Procházet zdrojové kódy

feat : 用户和订单的同步逻辑

bilingfeng před 1 rokem
rodič
revize
0213b8deb7

+ 5 - 0
game-platform/game-platform-serve/src/main/java/com/zanxiang/game/platform/serve/pojo/dto/PlatformDeYangOrderDTO.java

@@ -81,4 +81,9 @@ public class PlatformDeYangOrderDTO {
      * 游戏名称
      * 游戏名称
      */
      */
     private String gameName;
     private String gameName;
+
+    /**
+     * 更新时间
+     */
+    private LocalDateTime updateTime;
 }
 }

+ 5 - 0
game-platform/game-platform-serve/src/main/java/com/zanxiang/game/platform/serve/pojo/dto/PlatformDeYangUserDTO.java

@@ -96,4 +96,9 @@ public class PlatformDeYangUserDTO {
      * 趣程标识
      * 趣程标识
      */
      */
     private String quChengSign;
     private String quChengSign;
+
+    /**
+     * 更新时间
+     */
+    private LocalDateTime updateTime;
 }
 }

+ 0 - 6
game-platform/game-platform-serve/src/main/java/com/zanxiang/game/platform/serve/pojo/entity/PlatformDeYangOrder.java

@@ -10,7 +10,6 @@ import lombok.NoArgsConstructor;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
-import java.util.Date;
 
 
 /**
 /**
  * @author : lingfeng
  * @author : lingfeng
@@ -97,11 +96,6 @@ public class PlatformDeYangOrder implements Serializable {
      */
      */
     private String gameName;
     private String gameName;
 
 
-    /**
-     * 创建时间
-     */
-    private LocalDateTime createTime;
-
     /**
     /**
      * 更新时间
      * 更新时间
      */
      */

+ 0 - 5
game-platform/game-platform-serve/src/main/java/com/zanxiang/game/platform/serve/pojo/entity/PlatformDeYangUser.java

@@ -111,11 +111,6 @@ public class PlatformDeYangUser implements Serializable {
      */
      */
     private String quChengSign;
     private String quChengSign;
 
 
-    /**
-     * 创建时间
-     */
-    private LocalDateTime createTime;
-
     /**
     /**
      * 更新时间
      * 更新时间
      */
      */

+ 9 - 0
game-platform/game-platform-serve/src/main/java/com/zanxiang/game/platform/serve/service/IPlatformDeYangOrderService.java

@@ -1,6 +1,7 @@
 package com.zanxiang.game.platform.serve.service;
 package com.zanxiang.game.platform.serve.service;
 
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.zanxiang.game.platform.serve.pojo.dto.PlatformDeYangOrderDTO;
 import com.zanxiang.game.platform.serve.pojo.entity.PlatformDeYangOrder;
 import com.zanxiang.game.platform.serve.pojo.entity.PlatformDeYangOrder;
 
 
 /**
 /**
@@ -9,4 +10,12 @@ import com.zanxiang.game.platform.serve.pojo.entity.PlatformDeYangOrder;
  * @description :
  * @description :
  */
  */
 public interface IPlatformDeYangOrderService extends IService<PlatformDeYangOrder> {
 public interface IPlatformDeYangOrderService extends IService<PlatformDeYangOrder> {
+
+    /**
+     * 添加或更新
+     *
+     * @param orderDTO 订单dto
+     * @return {@link Boolean}
+     */
+    Boolean addOrUpdate(PlatformDeYangOrderDTO orderDTO);
 }
 }

+ 9 - 0
game-platform/game-platform-serve/src/main/java/com/zanxiang/game/platform/serve/service/IPlatformDeYangUserService.java

@@ -1,6 +1,7 @@
 package com.zanxiang.game.platform.serve.service;
 package com.zanxiang.game.platform.serve.service;
 
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.zanxiang.game.platform.serve.pojo.dto.PlatformDeYangUserDTO;
 import com.zanxiang.game.platform.serve.pojo.entity.PlatformDeYangUser;
 import com.zanxiang.game.platform.serve.pojo.entity.PlatformDeYangUser;
 
 
 /**
 /**
@@ -9,4 +10,12 @@ import com.zanxiang.game.platform.serve.pojo.entity.PlatformDeYangUser;
  * @description : 德阳用户
  * @description : 德阳用户
  */
  */
 public interface IPlatformDeYangUserService extends IService<PlatformDeYangUser> {
 public interface IPlatformDeYangUserService extends IService<PlatformDeYangUser> {
+
+    /**
+     * 添加或更新
+     *
+     * @param userDTO 用户dto
+     * @return {@link Boolean}
+     */
+    Boolean addOrUpdate(PlatformDeYangUserDTO userDTO);
 }
 }

+ 7 - 0
game-platform/game-platform-serve/src/main/java/com/zanxiang/game/platform/serve/service/impl/PlatformDeYangOrderServiceImpl.java

@@ -2,8 +2,10 @@ package com.zanxiang.game.platform.serve.service.impl;
 
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.zanxiang.game.platform.serve.dao.mapper.PlatformDeYangOrderMapper;
 import com.zanxiang.game.platform.serve.dao.mapper.PlatformDeYangOrderMapper;
+import com.zanxiang.game.platform.serve.pojo.dto.PlatformDeYangOrderDTO;
 import com.zanxiang.game.platform.serve.pojo.entity.PlatformDeYangOrder;
 import com.zanxiang.game.platform.serve.pojo.entity.PlatformDeYangOrder;
 import com.zanxiang.game.platform.serve.service.IPlatformDeYangOrderService;
 import com.zanxiang.game.platform.serve.service.IPlatformDeYangOrderService;
+import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
@@ -15,4 +17,9 @@ import org.springframework.stereotype.Service;
 @Slf4j
 @Slf4j
 @Service
 @Service
 public class PlatformDeYangOrderServiceImpl extends ServiceImpl<PlatformDeYangOrderMapper, PlatformDeYangOrder> implements IPlatformDeYangOrderService {
 public class PlatformDeYangOrderServiceImpl extends ServiceImpl<PlatformDeYangOrderMapper, PlatformDeYangOrder> implements IPlatformDeYangOrderService {
+
+    @Override
+    public Boolean addOrUpdate(PlatformDeYangOrderDTO orderDTO) {
+        return super.saveOrUpdate(BeanUtil.copy(orderDTO, PlatformDeYangOrder.class));
+    }
 }
 }

+ 7 - 0
game-platform/game-platform-serve/src/main/java/com/zanxiang/game/platform/serve/service/impl/PlatformDeYangUserServiceImpl.java

@@ -2,8 +2,10 @@ package com.zanxiang.game.platform.serve.service.impl;
 
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.zanxiang.game.platform.serve.dao.mapper.PlatformDeYangUserMapper;
 import com.zanxiang.game.platform.serve.dao.mapper.PlatformDeYangUserMapper;
+import com.zanxiang.game.platform.serve.pojo.dto.PlatformDeYangUserDTO;
 import com.zanxiang.game.platform.serve.pojo.entity.PlatformDeYangUser;
 import com.zanxiang.game.platform.serve.pojo.entity.PlatformDeYangUser;
 import com.zanxiang.game.platform.serve.service.IPlatformDeYangUserService;
 import com.zanxiang.game.platform.serve.service.IPlatformDeYangUserService;
+import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
@@ -15,4 +17,9 @@ import org.springframework.stereotype.Service;
 @Slf4j
 @Slf4j
 @Service
 @Service
 public class PlatformDeYangUserServiceImpl extends ServiceImpl<PlatformDeYangUserMapper, PlatformDeYangUser> implements IPlatformDeYangUserService {
 public class PlatformDeYangUserServiceImpl extends ServiceImpl<PlatformDeYangUserMapper, PlatformDeYangUser> implements IPlatformDeYangUserService {
+
+    @Override
+    public Boolean addOrUpdate(PlatformDeYangUserDTO userDTO) {
+        return super.saveOrUpdate(BeanUtil.copy(userDTO, PlatformDeYangUser.class));
+    }
 }
 }