|  |  |  | 
|---|
|  |  |  | import com.matrix.core.tools.WebUtil; | 
|---|
|  |  |  | import com.matrix.system.app.dto.*; | 
|---|
|  |  |  | import com.matrix.system.common.bean.SysUsers; | 
|---|
|  |  |  | import com.matrix.system.common.tools.DataAuthUtil; | 
|---|
|  |  |  | import com.matrix.system.hive.action.util.QueryUtil; | 
|---|
|  |  |  | import com.matrix.system.hive.bean.*; | 
|---|
|  |  |  | import com.matrix.system.hive.dao.*; | 
|---|
|  |  |  | import com.matrix.system.hive.plugin.util.CollectionUtils; | 
|---|
|  |  |  | 
|---|
|  |  |  | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); | 
|---|
|  |  |  | SysFollowup followup = followupDao.selectById(id); | 
|---|
|  |  |  | String zans=followup.getZans(); | 
|---|
|  |  |  | if(StringUtils.isBlank(zans)){ | 
|---|
|  |  |  | if(StringUtils.isNotBlank(zans)){ | 
|---|
|  |  |  | List<Long> zanIds = StringUtils.strToCollToLong(zans, ","); | 
|---|
|  |  |  | List<Long> zaned = zanIds.stream().filter(zanid -> zanid.equals(user.getSuId())).collect(Collectors.toList()); | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(zaned)){ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | //点赞 | 
|---|
|  |  |  | zaned.add(user.getSuId()); | 
|---|
|  |  |  | zans=StringUtils.collToStr(zaned,","); | 
|---|
|  |  |  | zanIds.add(user.getSuId()); | 
|---|
|  |  |  | zans=StringUtils.collToStr(zanIds,","); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | //直接点赞 | 
|---|
|  |  |  | 
|---|
|  |  |  | @PostMapping(value = "/findFollowup") | 
|---|
|  |  |  | public AjaxResult findFollowup(@RequestBody @Validated FollowupListDto followupListDto) { | 
|---|
|  |  |  | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); | 
|---|
|  |  |  | followupListDto.setShopId(user.getShopId()); | 
|---|
|  |  |  | if(!DataAuthUtil.hasAllShopAuth()){ | 
|---|
|  |  |  | followupListDto.setShopId(user.getShopId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | followupListDto.setCompanyId(user.getCompanyId()); | 
|---|
|  |  |  | followupListDto.setSelfStaff(user.getSuId()); | 
|---|
|  |  |  | //TODO 需要设置跨店数据权限 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|