|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | throw new RestException(-3, "手机号/身份证号已注册集物员"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | jhyInfoMapper.deleteByUserId(applyDto.getUserId()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | JhyInfo jhyInfo = new JhyInfo(); | 
|---|
|  |  |  | BeanUtil.copyProperties(applyDto, jhyInfo); | 
|---|
|  |  |  | jhyInfo.setCreatedTime(new Date()); | 
|---|
|  |  |  | 
|---|
|  |  |  | 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) { | 
|---|
|  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|