| | |
| | | package com.panzhihua.service_dangjian.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | 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.dtos.partybuilding.UserRankDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiExperienceActivityVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.service_dangjian.dao.NeedProblemInventoryDAO; |
| | | import com.panzhihua.service_dangjian.dao.NewStriveForDAO; |
| | | import com.panzhihua.service_dangjian.service.NeedProblemInventoryService; |
| | | import com.panzhihua.service_dangjian.service.NewStriveForService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class NeedProblemInventoryServiceImpl extends ServiceImpl<NeedProblemInventoryDAO, NeedProblemInventoryDTO> |
| | | implements NeedProblemInventoryService |
| | | { |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @Override |
| | | public IPage<NeedProblemInventoryDTO> getList(int pageNum, int pageSize,String search,String classifyId,String status, |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int addData(NeedProblemInventoryDTO item) { |
| | | public int addData(NeedProblemInventoryDTO item) |
| | | { |
| | | item.setStatus("1"); |
| | | return baseMapper.addData(item); |
| | | |
| | | int num=baseMapper.addData(item); |
| | | //1问题清单 2需求清单 |
| | | if(num>0) |
| | | { |
| | | List<String> openIdList=baseMapper.getOpenIdList(item.getCommunityId()); |
| | | |
| | | if(openIdList==null || openIdList.size()<=0) |
| | | { |
| | | return num; |
| | | } |
| | | |
| | | if(item.getKind().equals("1")) |
| | | { |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | try { |
| | | for (String str:openIdList) |
| | | { |
| | | WxUtil.sendLongTimeTemplate(str,util.getAccessToken(),"问题清单发布提醒",item.getTitle(),"/packageH/pages/problemDetail/problemDetail?type=1&id="+item.getId()); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return num; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | try { |
| | | for (String str:openIdList) |
| | | { |
| | | WxUtil.sendLongTimeTemplate(str,util.getAccessToken(),"需求清单发布提醒",item.getTitle(),"/packageH/pages/problemDetail/problemDetail?type=2&id="+item.getId()); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return num; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return num; |
| | | } |
| | | |
| | | @Override |