Pu Zhibing
2025-10-11 f2530067b6cd16a87b76190cf524d2ed75bf9592
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCheckCarExplainServiceImpl.java
@@ -1,10 +1,12 @@
package com.stylefeng.guns.modular.system.service.impl;
import com.stylefeng.guns.core.beetl.ShiroExtUtil;
import com.stylefeng.guns.core.shiro.ShiroKit;
import com.stylefeng.guns.modular.system.model.TCheckCarExplain;
import com.stylefeng.guns.modular.system.dao.TCheckCarExplainMapper;
import com.stylefeng.guns.modular.system.service.ITCheckCarExplainService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
@@ -17,12 +19,17 @@
 */
@Service
public class TCheckCarExplainServiceImpl extends ServiceImpl<TCheckCarExplainMapper, TCheckCarExplain> implements ITCheckCarExplainService {
    @Autowired
    private ShiroExtUtil shiroExtUtil;
    @Override
    public void saveOrUpdate(TCheckCarExplain tCheckCarExplain) {
        if (ShiroKit.isAdmin()) {
            tCheckCarExplain.setBranchOfficeId(-1);
        } else {
            tCheckCarExplain.setBranchOfficeId(ShiroKit.getUser().getObjectId());
            tCheckCarExplain.setBranchOfficeId(shiroExtUtil.getUser().getObjectId());
        }
        if (tCheckCarExplain.getId() == null) {