package com.hzs.system.sys.provider;

import com.hzs.common.core.domain.R;
import com.hzs.common.domain.system.sys.SysOperationLog;
import com.hzs.system.sys.IOperationLogServiceApi;
import com.hzs.system.sys.service.ISysOperationLogService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Description: 后台日志操作dubbo服务
 * Author: jiang chao
 * Time: 2022/9/14 15:38
 * Classname: OperationLogServiceProvider
 * PackageName: com.hzs.system.sys.provider
 */
@DubboService
public class OperationLogServiceProvider implements IOperationLogServiceApi {

    @Autowired
    private ISysOperationLogService iSysOperationLogService;

    @Override
    public R<Boolean> saveOperationLog(SysOperationLog operationLog) {
        if (iSysOperationLogService.insertLog(operationLog) > 0) {
            return R.ok();
        }
        return R.fail();
    }

}
