Commit 9906744d by 徐高华

企微托管

parent a320443e
...@@ -23,9 +23,6 @@ public class OpenStaffDTO implements Serializable { ...@@ -23,9 +23,6 @@ public class OpenStaffDTO implements Serializable {
* 成员id * 成员id
*/ */
private String staffId; private String staffId;
private String wxUserId ;
private String wxOpenUserId ;
private String staffName ;
/** /**
* 创建时间 * 创建时间
...@@ -113,47 +110,10 @@ public class OpenStaffDTO implements Serializable { ...@@ -113,47 +110,10 @@ public class OpenStaffDTO implements Serializable {
private String loginRemark ; private String loginRemark ;
/** /**
* 关联导购
*/
List<StoreClerkDTO> clerkList ;
/**
* tab_haoban_open_staff * tab_haoban_open_staff
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public List<StoreClerkDTO> getClerkList() {
return clerkList;
}
public void setClerkList(List<StoreClerkDTO> clerkList) {
this.clerkList = clerkList;
}
public String getWxOpenUserId() {
return wxOpenUserId;
}
public void setWxOpenUserId(String wxOpenUserId) {
this.wxOpenUserId = wxOpenUserId;
}
public String getWxUserId() {
return wxUserId;
}
public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId;
}
public String getStaffName() {
return staffName;
}
public void setStaffName(String staffName) {
this.staffName = staffName;
}
public String getLoginRemark() { public String getLoginRemark() {
return loginRemark; return loginRemark;
} }
......
package com.gic.haoban.manage.api.dto;
import java.io.Serializable;
import java.util.List;
/**
* tab_haoban_open_staff
*/
public class OpenStaffListDTO extends OpenStaffDTO implements Serializable {
private String wxUserId ;
private String wxOpenUserId ;
private String staffName ;
/**
* 关联导购
*/
List<StoreClerkDTO> clerkList ;
public String getWxUserId() {
return wxUserId;
}
public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId;
}
public String getWxOpenUserId() {
return wxOpenUserId;
}
public void setWxOpenUserId(String wxOpenUserId) {
this.wxOpenUserId = wxOpenUserId;
}
public String getStaffName() {
return staffName;
}
public void setStaffName(String staffName) {
this.staffName = staffName;
}
public List<StoreClerkDTO> getClerkList() {
return clerkList;
}
public void setClerkList(List<StoreClerkDTO> clerkList) {
this.clerkList = clerkList;
}
}
\ No newline at end of file
...@@ -5,6 +5,7 @@ import com.gic.api.base.commons.Page; ...@@ -5,6 +5,7 @@ import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.dto.OpenStaffDTO; import com.gic.haoban.manage.api.dto.OpenStaffDTO;
import com.gic.haoban.manage.api.dto.OpenStaffLicenseDTO; import com.gic.haoban.manage.api.dto.OpenStaffLicenseDTO;
import com.gic.haoban.manage.api.dto.OpenStaffListDTO;
import com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO;
import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO;
...@@ -84,5 +85,5 @@ public interface OpenStaffApiService { ...@@ -84,5 +85,5 @@ public interface OpenStaffApiService {
ServiceResponse<OpenStaffLicenseDTO> getLicenseInfo(String wxEnterpriseId, String enterpriseId); ServiceResponse<OpenStaffLicenseDTO> getLicenseInfo(String wxEnterpriseId, String enterpriseId);
ServiceResponse<Page<OpenStaffDTO>> page(OpenStaffPageQDTO qdto, BasePageInfo basePageInfo); ServiceResponse<Page<OpenStaffListDTO>> page(OpenStaffPageQDTO qdto, BasePageInfo basePageInfo);
} }
...@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.dao.mapper; ...@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.api.dto.OpenStaffDTO; import com.gic.haoban.manage.api.dto.OpenStaffDTO;
import com.gic.haoban.manage.api.dto.OpenStaffListDTO;
import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO;
import com.gic.haoban.manage.service.entity.TabOpenStaff; import com.gic.haoban.manage.service.entity.TabOpenStaff;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -36,7 +37,7 @@ public interface OpenStaffMapper { ...@@ -36,7 +37,7 @@ public interface OpenStaffMapper {
void updateLoginStep(@Param("id")Long openStaffId, @Param("step")int step); void updateLoginStep(@Param("id")Long openStaffId, @Param("step")int step);
List<OpenStaffDTO> list(OpenStaffPageQDTO qdto); List<OpenStaffListDTO> list(OpenStaffPageQDTO qdto);
TabOpenStaff getByQwUserId(@Param("qwUserId")Long qwUserId); TabOpenStaff getByQwUserId(@Param("qwUserId")Long qwUserId);
......
...@@ -4,6 +4,7 @@ import com.gic.api.base.commons.BasePageInfo; ...@@ -4,6 +4,7 @@ import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.dto.OpenStaffDTO; import com.gic.haoban.manage.api.dto.OpenStaffDTO;
import com.gic.haoban.manage.api.dto.OpenStaffListDTO;
import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO;
import com.gic.haoban.manage.service.entity.TabOpenStaff; import com.gic.haoban.manage.service.entity.TabOpenStaff;
...@@ -17,7 +18,7 @@ public interface OpenStaffService { ...@@ -17,7 +18,7 @@ public interface OpenStaffService {
public void logout(String uuid, String loginRemark, int step) ; public void logout(String uuid, String loginRemark, int step) ;
ServiceResponse<Page<OpenStaffDTO>> page(OpenStaffPageQDTO qdto, BasePageInfo basePageInfo); ServiceResponse<Page<OpenStaffListDTO>> page(OpenStaffPageQDTO qdto, BasePageInfo basePageInfo);
List<String> listAllStaffId(String wxEnterpriseId) ; List<String> listAllStaffId(String wxEnterpriseId) ;
} }
...@@ -13,6 +13,7 @@ import com.gic.enterprise.api.dto.StoreSearchDTO; ...@@ -13,6 +13,7 @@ import com.gic.enterprise.api.dto.StoreSearchDTO;
import com.gic.enterprise.api.service.StoreGroupService; import com.gic.enterprise.api.service.StoreGroupService;
import com.gic.enterprise.api.service.StoreService; import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.manage.api.dto.OpenStaffDTO; import com.gic.haoban.manage.api.dto.OpenStaffDTO;
import com.gic.haoban.manage.api.dto.OpenStaffListDTO;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO; import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.dto.StoreClerkDTO; import com.gic.haoban.manage.api.dto.StoreClerkDTO;
import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO;
...@@ -93,7 +94,7 @@ public class OpenStaffServiceImpl implements OpenStaffService { ...@@ -93,7 +94,7 @@ public class OpenStaffServiceImpl implements OpenStaffService {
} }
@Override @Override
public ServiceResponse<Page<OpenStaffDTO>> page(OpenStaffPageQDTO qdto, BasePageInfo basePageInfo) { public ServiceResponse<Page<OpenStaffListDTO>> page(OpenStaffPageQDTO qdto, BasePageInfo basePageInfo) {
log.info("分页查询条件={}",JSONObject.toJSONString(qdto)); log.info("分页查询条件={}",JSONObject.toJSONString(qdto));
String wxEnterpriseId = qdto.getWxEnterpriseId(); String wxEnterpriseId = qdto.getWxEnterpriseId();
String enterpriseId = qdto.getEnterpriseId(); String enterpriseId = qdto.getEnterpriseId();
...@@ -109,7 +110,7 @@ public class OpenStaffServiceImpl implements OpenStaffService { ...@@ -109,7 +110,7 @@ public class OpenStaffServiceImpl implements OpenStaffService {
qdto.setStaffIds(staffIds); qdto.setStaffIds(staffIds);
} }
PageHelper.startPage(basePageInfo); PageHelper.startPage(basePageInfo);
List<OpenStaffDTO> list = this.openStaffMapper.list(qdto); List<OpenStaffListDTO> list = this.openStaffMapper.list(qdto);
Set<String> staffIdList = list.stream().map(dto -> dto.getStaffId()).collect(Collectors.toSet()); Set<String> staffIdList = list.stream().map(dto -> dto.getStaffId()).collect(Collectors.toSet());
List<StaffClerkRelationDTO> relationDTOList = staffClerkRelationService.listByWxEnterpriseIdAndStaffId(wxEnterpriseId, staffIdList); List<StaffClerkRelationDTO> relationDTOList = staffClerkRelationService.listByWxEnterpriseIdAndStaffId(wxEnterpriseId, staffIdList);
relationDTOList = relationDTOList.stream().filter(o->o.getEnterpriseId().equals(enterpriseId)).collect(Collectors.toList()) ; relationDTOList = relationDTOList.stream().filter(o->o.getEnterpriseId().equals(enterpriseId)).collect(Collectors.toList()) ;
...@@ -122,7 +123,7 @@ public class OpenStaffServiceImpl implements OpenStaffService { ...@@ -122,7 +123,7 @@ public class OpenStaffServiceImpl implements OpenStaffService {
} }
} }
log.info("导购={}", JSONObject.toJSONString(clerkMap)); log.info("导购={}", JSONObject.toJSONString(clerkMap));
for(OpenStaffDTO item : list) { for(OpenStaffListDTO item : list) {
String staffId = item.getStaffId() ; String staffId = item.getStaffId() ;
List<StoreClerkDTO> clerkList = new ArrayList<>() ; List<StoreClerkDTO> clerkList = new ArrayList<>() ;
for (StaffClerkRelationDTO clerkRelation : relationDTOList){ for (StaffClerkRelationDTO clerkRelation : relationDTOList){
...@@ -147,7 +148,7 @@ public class OpenStaffServiceImpl implements OpenStaffService { ...@@ -147,7 +148,7 @@ public class OpenStaffServiceImpl implements OpenStaffService {
} }
item.setClerkList(clerkList); item.setClerkList(clerkList);
} }
Page<OpenStaffDTO> retPage = PageHelperUtils.changePageHelperToCurrentPage(list, OpenStaffDTO.class); Page<OpenStaffListDTO> retPage = PageHelperUtils.changePageHelperToCurrentPage(list, OpenStaffListDTO.class);
log.info("分页查询结果={}",JSONObject.toJSONString(retPage,true)); log.info("分页查询结果={}",JSONObject.toJSONString(retPage,true));
return ServiceResponse.success(retPage); return ServiceResponse.success(retPage);
} }
......
...@@ -7,6 +7,7 @@ import com.gic.api.base.commons.ServiceResponse; ...@@ -7,6 +7,7 @@ import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil; import com.gic.commons.util.EntityUtil;
import com.gic.haoban.manage.api.dto.OpenStaffDTO; import com.gic.haoban.manage.api.dto.OpenStaffDTO;
import com.gic.haoban.manage.api.dto.OpenStaffLicenseDTO; import com.gic.haoban.manage.api.dto.OpenStaffLicenseDTO;
import com.gic.haoban.manage.api.dto.OpenStaffListDTO;
import com.gic.haoban.manage.api.enums.QwOpenStepEnum; import com.gic.haoban.manage.api.enums.QwOpenStepEnum;
import com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO;
import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO;
...@@ -215,7 +216,7 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService { ...@@ -215,7 +216,7 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
} }
@Override @Override
public ServiceResponse<Page<OpenStaffDTO>> page(OpenStaffPageQDTO qdto, BasePageInfo basePageInfo) { public ServiceResponse<Page<OpenStaffListDTO>> page(OpenStaffPageQDTO qdto, BasePageInfo basePageInfo) {
return this.openStaffService.page(qdto,basePageInfo); return this.openStaffService.page(qdto,basePageInfo);
} }
} }
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
from tab_haoban_open_staff where uuid = #{uuid} and delete_flag = 0 from tab_haoban_open_staff where uuid = #{uuid} and delete_flag = 0
</select> </select>
<select id="list" resultType="com.gic.haoban.manage.api.dto.OpenStaffDTO" parameterType="com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO"> <select id="list" resultType="com.gic.haoban.manage.api.dto.OpenStaffListDTO" parameterType="com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO">
select a.open_staff_id openStaffId , select a.open_staff_id openStaffId ,
a.wx_enterprise_id wxEnterpriseId , a.wx_enterprise_id wxEnterpriseId ,
a.enterprise_id enterpriseId , a.enterprise_id enterpriseId ,
......
...@@ -10,10 +10,7 @@ import com.gic.enterprise.api.service.EnterpriseService; ...@@ -10,10 +10,7 @@ import com.gic.enterprise.api.service.EnterpriseService;
import com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO; import com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO;
import com.gic.haoban.common.utils.AuthWebRequestUtil; import com.gic.haoban.common.utils.AuthWebRequestUtil;
import com.gic.haoban.common.utils.EntityUtil; import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.manage.api.dto.OpenStaffDTO; import com.gic.haoban.manage.api.dto.*;
import com.gic.haoban.manage.api.dto.OpenStaffLicenseDTO;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO;
import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO;
import com.gic.haoban.manage.api.service.OpenStaffApiService; import com.gic.haoban.manage.api.service.OpenStaffApiService;
...@@ -63,8 +60,8 @@ public class QywxOpenController { ...@@ -63,8 +60,8 @@ public class QywxOpenController {
BasePageInfo basePageInfo = new BasePageInfo() ; BasePageInfo basePageInfo = new BasePageInfo() ;
basePageInfo.setPageNum(qo.getPageNum()); basePageInfo.setPageNum(qo.getPageNum());
basePageInfo.setPageSize(qo.getPageSize()); basePageInfo.setPageSize(qo.getPageSize());
ServiceResponse<Page<OpenStaffDTO>> pageResp = this.openStaffApiService.page(qdto, basePageInfo); ServiceResponse<Page<OpenStaffListDTO>> pageResp = this.openStaffApiService.page(qdto, basePageInfo);
Page<OpenStaffDTO> page = pageResp.getResult(); Page<OpenStaffListDTO> page = pageResp.getResult();
Page<OpenStaffVO> retPage = PageHelperUtils.changePageToCurrentPage(page, OpenStaffVO.class); Page<OpenStaffVO> retPage = PageHelperUtils.changePageToCurrentPage(page, OpenStaffVO.class);
if(CollectionUtils.isNotEmpty(retPage.getResult())) { if(CollectionUtils.isNotEmpty(retPage.getResult())) {
EnterpriseDTO en = this.enterpriseService.getEnterpriseById(enterpriseId) ; EnterpriseDTO en = this.enterpriseService.getEnterpriseById(enterpriseId) ;
...@@ -160,6 +157,15 @@ public class QywxOpenController { ...@@ -160,6 +157,15 @@ public class QywxOpenController {
return RestResponse.successResult(); return RestResponse.successResult();
} }
@RequestMapping("check-code")
public RestResponse<Void> checkCode(Long openStaffId) {
ServiceResponse<OpenStaffDTO> resp = this.openStaffApiService.get2Qrcode(openStaffId) ;
if(!resp.isSuccess()) {
return RestResponse.failure("9999",resp.getMessage()) ;
}
return RestResponse.successResult();
}
/** /**
* 许可数量查询 * 许可数量查询
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment