| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.service_community.dao.ComActActSignDAO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageBackVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.PageComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.ResetComActMessageVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.ComPbServiceTeamVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyCommitteeVO; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.service_community.dao.ComActActSignDAO; |
| | | import com.panzhihua.service_community.dao.ComActMessageBackDAO; |
| | | import com.panzhihua.service_community.dao.ComActMessageDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoUserDO; |
| | | import com.panzhihua.service_community.model.dos.ComActMessageBackDO; |
| | | import com.panzhihua.service_community.model.dos.ComActMessageDO; |
| | | import com.panzhihua.service_community.service.ComActMessageService; |
| | |
| | | list.forEach(vo -> { |
| | | Long type = comActMessageVO1.getType(); |
| | | if (type == 1) { |
| | | ComPbServiceTeamVO team = comActMessageDAO.selectComPbServiceTeamById(comActMessageVO1.getSendtoUserId()); |
| | | ComPbServiceTeamVO team = |
| | | comActMessageDAO.selectComPbServiceTeamById(comActMessageVO1.getSendtoUserId()); |
| | | if (!ObjectUtils.isEmpty(team)) { |
| | | vo.setUserJob(team.getJob()); |
| | | } |
| | | } else if (type == 2) { |
| | | PartyCommitteeVO party = comActMessageDAO.selectPartyCommitteeById(comActMessageVO1.getSendtoUserId()); |
| | | PartyCommitteeVO party = |
| | | comActMessageDAO.selectPartyCommitteeById(comActMessageVO1.getSendtoUserId()); |
| | | if (!ObjectUtils.isEmpty(party)) { |
| | | vo.setUserJob(party.getPosition()); |
| | | } |
| | |
| | | String openid = map.get("openid"); |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | try { |
| | | WxUtil.sendSubscribeLYHF(openid,util.getAppAccessToken(),comActMessageBackVO.getUserName() |
| | | , DateUtils.format(new Date(),DateUtils.ymdhms_format),comActMessageBackVO.getMsgContent()); |
| | | WxUtil.sendSubscribeLYHF(openid, util.getAppAccessToken(), comActMessageBackVO.getUserName(), |
| | | DateUtils.format(new Date(), DateUtils.ymdhms_format), comActMessageBackVO.getMsgContent()); |
| | | }catch (Exception e){ |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public R resetMessagePublic(ResetComActMessageVO resetComActMessageVO) { |
| | | if(ObjectUtils.isEmpty(resetComActMessageVO)) return R.fail(); |
| | | if (ObjectUtils.isEmpty(resetComActMessageVO)) |
| | | return R.fail(); |
| | | Integer ispublic = resetComActMessageVO.getIspublic(); |
| | | if(ispublic==null||(ispublic!=1&&ispublic!=2)) return R.fail("状态错误"); |
| | | if (ispublic == null || (ispublic != 1 && ispublic != 2)) |
| | | return R.fail("状态错误"); |
| | | List<Long> list = resetComActMessageVO.getIds(); |
| | | for (Long id : list) { |
| | | comActMessageDAO.updatePublic(ispublic, id); |