|
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.zanxiang.game.module.mybatis.entity.User;
|
|
|
import com.zanxiang.game.module.mybatis.entity.UserLoginLog;
|
|
|
import com.zanxiang.game.module.mybatis.mapper.UserLoginLogMapper;
|
|
|
-import com.zanxiang.game.module.sdk.enums.DeviceTypeEnum;
|
|
|
import com.zanxiang.game.module.sdk.pojo.param.UserData;
|
|
|
import com.zanxiang.game.module.sdk.service.IUserLoginLogService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -31,20 +30,20 @@ public class UserLoginLogServiceImpl extends ServiceImpl<UserLoginLogMapper, Use
|
|
|
.roleName(roleName)
|
|
|
.os(userData.getDeviceSystem())
|
|
|
.ip(userData.getIp())
|
|
|
- .deviceType(DeviceTypeEnum.DEVICE_TYPE_ANDROID.getDeviceType())
|
|
|
+ .deviceType(userData.getDeviceType())
|
|
|
.type(type)
|
|
|
.createTime(LocalDateTime.now())
|
|
|
.build());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Boolean createUserLoginLog(User user, Integer type) {
|
|
|
+ public Boolean createUserLoginLog(User user, Integer type, Integer deviceType) {
|
|
|
return super.save(UserLoginLog.builder()
|
|
|
.userId(user.getId())
|
|
|
.gameId(user.getGameId())
|
|
|
.os(user.getDeviceSystem())
|
|
|
.ip(user.getIp())
|
|
|
- .deviceType(DeviceTypeEnum.DEVICE_TYPE_ANDROID.getDeviceType())
|
|
|
+ .deviceType(deviceType)
|
|
|
.type(type)
|
|
|
.createTime(LocalDateTime.now())
|
|
|
.build());
|