From 4d11844c34d09c35fdea5052ebccb25c6d6266cc Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 30 Jun 2021 12:43:49 +0800
Subject: [PATCH] modify
---
gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java | 35 ++++++++++++++++++++++++++++++++---
1 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java b/gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java
index 19fc575..9c01856 100644
--- a/gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java
+++ b/gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java
@@ -6,10 +6,12 @@
import com.github.pagehelper.PageInfo;
import com.xzx.gc.common.exception.RestException;
import com.xzx.gc.entity.JhyInfo;
+import com.xzx.gc.user.dto.ExamineJwyDto;
import com.xzx.gc.user.dto.JhyApplyDto;
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;
@@ -19,6 +21,7 @@
import java.util.List;
import java.util.Map;
+@Slf4j
@Service
@Transactional
public class JhyInfoService {
@@ -38,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);
}
@@ -53,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) {
@@ -74,4 +89,18 @@
data.put("code", 0);
return data;
}
+
+ public void examineJwy(ExamineJwyDto model) {
+ long id = model.getId();
+ JhyInfo jhyInfo = jhyInfoMapper.selectByPrimaryKey(id);
+ Integer type = model.getType();
+ if(1 == type){
+ jhyInfo.setStatus(2);
+ jhyInfo.setIsJhy(1+"");
+ }else if(2 == type){
+ jhyInfo.setStatus(3);
+ jhyInfo.setIsJhy(2+"");
+ }
+ jhyInfoMapper.updateByPrimaryKey(jhyInfo);
+ }
}
--
Gitblit v1.9.1