|
|
|
@@ -2,6 +2,9 @@ package com.xueyi.system.staff.graphql; |
|
|
|
|
|
|
|
import com.alibaba.excel.util.BooleanUtils; |
|
|
|
import com.xueyi.system.api.digitalmans.domain.po.DmVisitorsPo; |
|
|
|
import com.xueyi.system.api.resource.domain.po.DmResourcesPo; |
|
|
|
import com.xueyi.system.resource.domain.dto.DmResourcesDto; |
|
|
|
import com.xueyi.system.resource.mapper.DmResourcesMapper; |
|
|
|
import com.xueyi.system.staff.domain.model.DmVisitorsConverter; |
|
|
|
import com.xueyi.system.staff.mapper.DmVisitorsMapper; |
|
|
|
import graphql.kickstart.tools.GraphQLMutationResolver; |
|
|
|
@@ -23,8 +26,11 @@ class VisitorGraphQLMutationResolver implements GraphQLMutationResolver { |
|
|
|
@Autowired |
|
|
|
private DmVisitorsConverter converter; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private DmResourcesMapper resourcesMapper; |
|
|
|
|
|
|
|
|
|
|
|
public boolean saveVisitor( String name, String nickname, String phone, Integer type, Boolean isVip, Boolean flexVisit, Boolean isBlock){ |
|
|
|
public boolean saveVisitor(String name, String nickname, String phone, Boolean isVip, Boolean flexVisit, Boolean isBlock, Long resourceId){ |
|
|
|
DmVisitorsPo dto =new DmVisitorsPo(); |
|
|
|
dto.setPhone(phone); |
|
|
|
dto.setNickname(nickname); |
|
|
|
@@ -37,6 +43,13 @@ class VisitorGraphQLMutationResolver implements GraphQLMutationResolver { |
|
|
|
} |
|
|
|
dto.setFlexVisit(flexVisit); |
|
|
|
dto.setIsBlock(isBlock); |
|
|
|
dto.setResourceId(resourceId); |
|
|
|
if (null != resourceId) { |
|
|
|
DmResourcesPo resourcesPo = resourcesMapper.selectById(resourceId); |
|
|
|
if (null != resourcesPo) { |
|
|
|
dto.setAvatar(resourcesPo.getUrl()); |
|
|
|
} |
|
|
|
} |
|
|
|
return mapper.updateById(dto) > 0; |
|
|
|
} |
|
|
|
|
|
|
|
|