935090232@qq.com
2022-02-22 bbe0a2fd03063316e50cf141986bda984599bbda
zq-erp/src/main/java/com/matrix/system/app/action/ApiFollowupAction.java
@@ -6,6 +6,8 @@
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;
@@ -113,18 +115,18 @@
        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.isEmpty(zaned)){
            if(CollectionUtils.isNotEmpty(zaned)){
                //取消赞
                List<Long> newZaned = zanIds.stream().filter(zanid -> !zanid.equals(user.getSuId())).collect(Collectors.toList());
                zans=StringUtils.collToStr(newZaned,",");
            }else{
                //点赞
                zaned.add(user.getSuId());
                zans=StringUtils.collToStr(zaned,",");
                zanIds.add(user.getSuId());
                zans=StringUtils.collToStr(zanIds,",");
            }
        }else{
            //直接点赞
@@ -157,7 +159,9 @@
    @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 需要设置跨店数据权限