fix
Helius
2021-06-29 883bacde5e4cd64fd2ebd63eac5e45e2efd2a840
gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java
@@ -11,6 +11,7 @@
import com.xzx.gc.user.dto.JhyInfoListDto;
import com.xzx.gc.user.mapper.JhyInfoMapper;
import com.xzx.gc.user.vo.JhyInfoListVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -20,6 +21,7 @@
import java.util.List;
import java.util.Map;
@Slf4j
@Service
@Transactional
public class JhyInfoService {
@@ -39,9 +41,13 @@
        jhyInfoMapper.deleteByUserId(applyDto.getUserId());
        log.info("图片地址:{}", applyDto.getCardPos());
        JhyInfo jhyInfo = new JhyInfo();
        BeanUtil.copyProperties(applyDto, jhyInfo);
        jhyInfo.setCreatedTime(new Date());
        jhyInfo.setIsJhy(JhyInfo.IS_JHY_N);
        jhyInfo.setCardPos(applyDto.getCardPos());
        jhyInfo.setStatus(JhyInfo.CHECK_WAIT);
        jhyInfoMapper.insert(jhyInfo);
    }
@@ -54,13 +60,21 @@
        return jhyInfo.getStatus();
    }
    public boolean isJhy(String userId) {
    public int isJhy(String userId) {
        JhyInfo jhyInfo = jhyInfoMapper.selectJhyInfoByUserId(userId);
        if (jhyInfo == null) {
            return false;
            return 0;
        }
        return JhyInfo.CHECK_PASS.equals(jhyInfo.getStatus());
        if (JhyInfo.CHECK_REFUSE.equals(jhyInfo.getStatus())) {
            return 0;
        }
        if (JhyInfo.CHECK_PASS.equals(jhyInfo.getStatus())) {
            return 1;
        } else {
            return 2;
        }
    }
    public Map<String, Object> queryList(JhyInfoListDto jhyInfoListDto) {