| | |
| | | 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; |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | @Transactional |
| | | public class JhyInfoService { |
| | |
| | | |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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) { |