| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.applets.model.dtos.ComPbMemberCertificationDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ExcelShopOrderDTO; |
| | | import com.panzhihua.common.model.dtos.user.SysUserEditTipsDTO; |
| | | import com.panzhihua.common.model.dtos.user.SysUserFeedbackDTO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | R certUser = partyBuildingService.userCertification(userId); |
| | | |
| | | Object certUserInfo = certUser.getData(); |
| | | boolean userCertified = false; |
| | | if (certUserInfo != null) { |
| | | AtomicBoolean userCertified = new AtomicBoolean(false); |
| | | if (R.isOk(certUser) && certUserInfo != null) { |
| | | try { |
| | | PartyBuildingMemberVO certUserVo = JSONObject.parseObject(JSONObject.toJSONString(certUser.getData()), PartyBuildingMemberVO.class); |
| | | List<PartyBuildingMemberVO> partyBuildingMemberVOList = JSONArray.parseArray(JSONArray.toJSONString(certUser.getData()), PartyBuildingMemberVO.class); |
| | | //已认证党员身份,直接返回 |
| | | userCertified = certUserVo.getAuditResult() == 1; |
| | | if(partyBuildingMemberVOList!=null && partyBuildingMemberVOList.size()>0) { |
| | | partyBuildingMemberVOList.forEach(vo -> { |
| | | userCertified.set(vo.getAuditResult() == 1); |
| | | }); |
| | | } |
| | | }catch (Exception e){} |
| | | } |
| | | //匹配手机,验证是否进行自动确认 |
| | | if (userCertified) { |
| | | if (userCertified.get()) { |
| | | return R.fail("您已审核通过,无需重复提交"); |
| | | } |
| | | |
| | |
| | | //党员认证查询 |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | return partyBuildingService.userCertification(userId); |
| | | R r = partyBuildingService.userCertification(userId); |
| | | |
| | | if(R.isOk(r)) { |
| | | List<PartyBuildingMemberVO> partyBuildingMemberVOList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), PartyBuildingMemberVO.class); |
| | | if(partyBuildingMemberVOList!=null && partyBuildingMemberVOList.size()>0){ |
| | | Optional<PartyBuildingMemberVO> ot = partyBuildingMemberVOList.stream().filter(partyBuildingMemberVO -> partyBuildingMemberVO.getAuditResult()==1).findFirst(); |
| | | if(ot.isPresent()){ |
| | | return R.ok(ot.get()); |
| | | }else{ |
| | | return R.ok(partyBuildingMemberVOList.get(0)); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |