xieb
2023-05-17 bf26126ff049fdd8939862b0f117656e5afaafd2
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
35
36
37
38
39
40
41
42
package cn.gistack.sm.sjztmd.service.impl;
 
import cn.gistack.sm.sjztmd.entity.AttResStagChar;
import cn.gistack.sm.sjztmd.mapper.AttResStagCharMapper;
import cn.gistack.sm.sjztmd.service.IAttResStagCharService;
import cn.gistack.system.user.feign.IUserClient;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
/**
 * @ClassName AttResStagCharServiceImpl
 * @Description TODO
 * @Author aix
 * @Date 2023/4/21 20:01
 * @Version 1.0
 */
@Service
@DS("zt")
public class AttResStagCharServiceImpl extends ServiceImpl<AttResStagCharMapper, AttResStagChar> implements IAttResStagCharService {
 
    @Autowired
    private IUserClient userClient;
 
    @Override
    public AttResStagChar getByResGuid(String resGuid) {
        return baseMapper.getByResGuid(resGuid);
    }
 
    @Override
    public Boolean customizeUpdateByGuid(AttResStagChar attResStagChar) {
        attResStagChar.setUpdateTime(DateUtil.now());
        attResStagChar.setUpdateUserCode(String.valueOf(AuthUtil.getUserId()));
        attResStagChar.setUpdateUserName(AuthUtil.getUserName());
        attResStagChar.setUpdateUserPhone(userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone());
        return SqlHelper.retBool(baseMapper.customizeUpdateByGuid(attResStagChar));
    }
}