Pu Zhibing
22 小时以前 d0d6f8f40e5d9762d940b47c566da1876361020e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.stylefeng.guns.modular.system.service.impl;
 
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.stereotype.Service;
 
/**
 * <p>
 * 代检车说明内容表 服务实现类
 * </p>
 *
 * @author mitao
 * @since 2025-07-27
 */
@Service
public class TCheckCarExplainServiceImpl extends ServiceImpl<TCheckCarExplainMapper, TCheckCarExplain> implements ITCheckCarExplainService {
    @Override
    public void saveOrUpdate(TCheckCarExplain tCheckCarExplain) {
        if (ShiroKit.isAdmin()) {
            tCheckCarExplain.setBranchOfficeId(-1);
        } else {
            tCheckCarExplain.setBranchOfficeId(ShiroKit.getUser().getObjectId());
        }
        if (tCheckCarExplain.getId() == null) {
 
            this.insert(tCheckCarExplain);
        } else {
            this.updateById(tCheckCarExplain);
        }
    }
}