Commit 3e78b881 by 徐高华

Merge branch 'developer' of http://git.gicdev.com/haoban3.0/haoban-manage3.0.git into developer

parents 3ce5715d f4aa2ca9
package com.gic.haoban.manage.api.dto.hm;
import java.io.Serializable;
/**
* @author xuwenqian
* @date 2022/7/15 14:40
*/
public class HmClerkDTO implements Serializable {
private static final long serialVersionUID = -5700709557914308777L;
private String clerkName;
private String clerkId;
private String clerkCode;
public String getClerkName() {
return clerkName;
}
public void setClerkName(String clerkName) {
this.clerkName = clerkName;
}
public String getClerkId() {
return clerkId;
}
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
public String getClerkCode() {
return clerkCode;
}
public void setClerkCode(String clerkCode) {
this.clerkCode = clerkCode;
}
}
...@@ -2,6 +2,7 @@ package com.gic.haoban.manage.api.dto.hm; ...@@ -2,6 +2,7 @@ package com.gic.haoban.manage.api.dto.hm;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 活码(TabHaobanHmQrcode)实体类 * 活码(TabHaobanHmQrcode)实体类
...@@ -93,6 +94,10 @@ public class HmQrcodeDTO implements Serializable { ...@@ -93,6 +94,10 @@ public class HmQrcodeDTO implements Serializable {
private String memberLabelName; private String memberLabelName;
private String hmGroupName; private String hmGroupName;
private List<HmClerkDTO> clerkList;
private List<HmStoreDTO> storeList;
public Long getHmId() { public Long getHmId() {
return hmId; return hmId;
} }
...@@ -340,5 +345,21 @@ public class HmQrcodeDTO implements Serializable { ...@@ -340,5 +345,21 @@ public class HmQrcodeDTO implements Serializable {
public void setHmGroupName(String hmGroupName) { public void setHmGroupName(String hmGroupName) {
this.hmGroupName = hmGroupName; this.hmGroupName = hmGroupName;
} }
public List<HmClerkDTO> getClerkList() {
return clerkList;
}
public void setClerkList(List<HmClerkDTO> clerkList) {
this.clerkList = clerkList;
}
public List<HmStoreDTO> getStoreList() {
return storeList;
}
public void setStoreList(List<HmStoreDTO> storeList) {
this.storeList = storeList;
}
} }
...@@ -2,6 +2,7 @@ package com.gic.haoban.manage.api.dto.hm; ...@@ -2,6 +2,7 @@ package com.gic.haoban.manage.api.dto.hm;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* @author mozhu * @author mozhu
...@@ -78,6 +79,14 @@ public class HmQrcodeListDTO implements Serializable { ...@@ -78,6 +79,14 @@ public class HmQrcodeListDTO implements Serializable {
* 活码分组 * 活码分组
*/ */
private Long hmGroupId; private Long hmGroupId;
/**
* 新增总人数
*/
private Integer addNumT;
private List<HmClerkDTO> clerkList;
private List<HmStoreDTO> storeList;
public Long getHmId() { public Long getHmId() {
return hmId; return hmId;
...@@ -286,4 +295,28 @@ public class HmQrcodeListDTO implements Serializable { ...@@ -286,4 +295,28 @@ public class HmQrcodeListDTO implements Serializable {
public void setHmGroupId(Long hmGroupId) { public void setHmGroupId(Long hmGroupId) {
this.hmGroupId = hmGroupId; this.hmGroupId = hmGroupId;
} }
public Integer getAddNumT() {
return addNumT;
}
public void setAddNumT(Integer addNumT) {
this.addNumT = addNumT;
}
public List<HmClerkDTO> getClerkList() {
return clerkList;
}
public void setClerkList(List<HmClerkDTO> clerkList) {
this.clerkList = clerkList;
}
public List<HmStoreDTO> getStoreList() {
return storeList;
}
public void setStoreList(List<HmStoreDTO> storeList) {
this.storeList = storeList;
}
} }
package com.gic.haoban.manage.api.dto.hm;
import java.io.Serializable;
/**
* @author xuwenqian
* @date 2022/7/15 14:40
*/
public class HmStoreDTO implements Serializable {
private static final long serialVersionUID = -5700709557914308777L;
private String storeId;
private String storeName;
private String storeCode;
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public String getStoreCode() {
return storeCode;
}
public void setStoreCode(String storeCode) {
this.storeCode = storeCode;
}
}
package com.gic.haoban.manage.api.service.hm; package com.gic.haoban.manage.api.service.hm;
import com.gic.api.base.commons.BasePageInfo;
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.hm.HmClerkRelationDTO; import com.gic.haoban.manage.api.dto.hm.HmClerkRelationDTO;
import com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO; import com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO;
...@@ -124,12 +126,13 @@ public interface HmQrcodeApiService { ...@@ -124,12 +126,13 @@ public interface HmQrcodeApiService {
/** /**
* 根据导购信息获取hmid * 根据导购信息获取hmid
* *
* @param hmId hm id * @param basePageInfo 基本信息页
* @param hmId hm id
* @return {@link List }<{@link HmClerkRelationDTO }> * @return {@link List }<{@link HmClerkRelationDTO }>
* @author mozhu * @author mozhu
* @date 2022-07-13 17:09:56 * @date 2022-07-15 14:31:03
*/ */
List<HmClerkRelationDTO> getHmClerkByHmId(Long hmId); Page<HmClerkRelationDTO> getHmClerkByHmId(BasePageInfo basePageInfo, Long hmId);
/** /**
......
...@@ -48,6 +48,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -48,6 +48,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.net.URLEncoder;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -405,7 +406,7 @@ public class EnterpriseController extends WebBaseController { ...@@ -405,7 +406,7 @@ public class EnterpriseController extends WebBaseController {
AuthcenterUserDetails loginUser = (AuthcenterUserDetails) SessionContextUtil.getUser(request) ; AuthcenterUserDetails loginUser = (AuthcenterUserDetails) SessionContextUtil.getUser(request) ;
String operationUserId = String.valueOf(loginUser.getId()); String operationUserId = String.valueOf(loginUser.getId());
//运维信息参数 //运维信息参数
String operationInfo = "&operationUserId=" + operationUserId + "&userName=" + loginUser.getRealName(); String operationInfo = "&operationUserId=" + operationUserId + "&userName=" + URLEncoder.encode(loginUser.getRealName(), "UTF-8");
String random = "ywLogin:" + UuidUtil.randomUUID(); String random = "ywLogin:" + UuidUtil.randomUUID();
RedisUtil.setCache(random, 1, 10L); RedisUtil.setCache(random, 1, 10L);
......
package com.gic.haoban.manage.service.pojo.bo.hm; package com.gic.haoban.manage.service.pojo.bo.hm;
import com.gic.haoban.manage.api.dto.hm.HmClerkDTO;
import com.gic.haoban.manage.api.dto.hm.HmStoreDTO;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 活码(TabHaobanHmQrcode)实体类 * 活码(TabHaobanHmQrcode)实体类
...@@ -94,6 +98,10 @@ public class HmQrcodeBO implements Serializable { ...@@ -94,6 +98,10 @@ public class HmQrcodeBO implements Serializable {
private String memberLabelName; private String memberLabelName;
private String hmGroupName; private String hmGroupName;
private List<HmClerkDTO> clerkList;
private List<HmStoreDTO> storeList;
public Long getHmId() { public Long getHmId() {
return hmId; return hmId;
} }
...@@ -357,5 +365,21 @@ public class HmQrcodeBO implements Serializable { ...@@ -357,5 +365,21 @@ public class HmQrcodeBO implements Serializable {
public void setHmGroupName(String hmGroupName) { public void setHmGroupName(String hmGroupName) {
this.hmGroupName = hmGroupName; this.hmGroupName = hmGroupName;
} }
public List<HmClerkDTO> getClerkList() {
return clerkList;
}
public void setClerkList(List<HmClerkDTO> clerkList) {
this.clerkList = clerkList;
}
public List<HmStoreDTO> getStoreList() {
return storeList;
}
public void setStoreList(List<HmStoreDTO> storeList) {
this.storeList = storeList;
}
} }
...@@ -2,6 +2,8 @@ package com.gic.haoban.manage.service.service.out.impl.hm; ...@@ -2,6 +2,8 @@ package com.gic.haoban.manage.service.service.out.impl.hm;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.clerk.api.dto.ClerkDTO; import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.clerk.api.service.ClerkService; import com.gic.clerk.api.service.ClerkService;
...@@ -10,8 +12,10 @@ import com.gic.commons.util.UniqueIdUtils; ...@@ -10,8 +12,10 @@ import com.gic.commons.util.UniqueIdUtils;
import com.gic.enterprise.api.dto.StoreDTO; import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.service.StoreService; import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.base.api.common.errCode.HaoBanErrCodeCommon; import com.gic.haoban.base.api.common.errCode.HaoBanErrCodeCommon;
import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO; import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.dto.WxEnterpriseDTO; import com.gic.haoban.manage.api.dto.WxEnterpriseDTO;
import com.gic.haoban.manage.api.dto.hm.HmClerkDTO;
import com.gic.haoban.manage.api.dto.hm.HmClerkRelationDTO; import com.gic.haoban.manage.api.dto.hm.HmClerkRelationDTO;
import com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO; import com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO;
import com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO; import com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO;
...@@ -49,6 +53,8 @@ import com.gic.wechat.api.dto.qywx.response.QywxResponseDTO; ...@@ -49,6 +53,8 @@ import com.gic.wechat.api.dto.qywx.response.QywxResponseDTO;
import com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactDTO; import com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactDTO;
import com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactResultDTO; import com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactResultDTO;
import com.gic.wechat.api.service.qywx.QywxUserApiService; import com.gic.wechat.api.service.qywx.QywxUserApiService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -446,6 +452,27 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -446,6 +452,27 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
if (memberTagDTO != null) { if (memberTagDTO != null) {
hmQrcodeBO.setMemberLabelName(memberTagDTO.getTagName()); hmQrcodeBO.setMemberLabelName(memberTagDTO.getTagName());
} }
Integer hmType = hmQrcodeBO.getHmType();
List<HmClerkDTO> clerkDTOList = new ArrayList<>();
if (hmType == 1) {
HmClerkDTO clerkDTO = new HmClerkDTO();
clerkDTO.setClerkName(hmQrcodeBO.getClerkName());
clerkDTO.setClerkId(hmQrcodeBO.getClerkId());
clerkDTO.setClerkCode(hmQrcodeBO.getClerkCode());
clerkDTOList.add(clerkDTO);
} else if (hmType == 2) {
List<HmClerkRelationBO> hmClerkRelationBOS = hmClerkRelationService.getHmClerkByHmId(hmId);
if (CollectionUtils.isNotEmpty(hmClerkRelationBOS)) {
for (HmClerkRelationBO hmClerkRelationBO : hmClerkRelationBOS) {
HmClerkDTO clerkDTO = new HmClerkDTO();
clerkDTO.setClerkName(hmClerkRelationBO.getClerkName());
clerkDTO.setClerkId(hmClerkRelationBO.getClerkId());
clerkDTO.setClerkCode(hmClerkRelationBO.getClerkCode());
clerkDTOList.add(clerkDTO);
}
}
}
hmQrcodeBO.setClerkList(clerkDTOList);
} }
return EntityUtil.changeEntityNew(HmQrcodeDTO.class, hmQrcodeBO); return EntityUtil.changeEntityNew(HmQrcodeDTO.class, hmQrcodeBO);
} }
...@@ -610,8 +637,10 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -610,8 +637,10 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
} }
@Override @Override
public List<HmClerkRelationDTO> getHmClerkByHmId(Long hmId) { public Page<HmClerkRelationDTO> getHmClerkByHmId(BasePageInfo basePageInfo, Long hmId) {
return EntityUtil.changeEntityListNew(HmClerkRelationDTO.class,hmClerkRelationService.getHmClerkByHmId(hmId)); PageHelper.startPage(basePageInfo);
List<HmClerkRelationBO> hmClerkByHmId = hmClerkRelationService.getHmClerkByHmId(hmId);
return PageUtil.changePageHelperToCurrentPage(new PageInfo<>(hmClerkByHmId),HmClerkRelationDTO.class);
} }
/** /**
......
...@@ -2,6 +2,7 @@ package com.gic.haoban.manage.web.controller; ...@@ -2,6 +2,7 @@ package com.gic.haoban.manage.web.controller;
import java.io.IOException; import java.io.IOException;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -200,7 +201,7 @@ public class LoginController extends WebBaseController { ...@@ -200,7 +201,7 @@ public class LoginController extends WebBaseController {
@IgnoreLogin @IgnoreLogin
@RequestMapping("yw-login") @RequestMapping("yw-login")
public HaobanResponse ywLogin(String wxEnterpriseId, String gicEnterpriseId, String random, public HaobanResponse ywLogin(String wxEnterpriseId, String gicEnterpriseId, String random,
HttpServletResponse response, String operationUserId, String userName) { HttpServletResponse response, String operationUserId, String userName) throws UnsupportedEncodingException {
// 判断是否存在random // 判断是否存在random
Object o = RedisUtil.getCache(random); Object o = RedisUtil.getCache(random);
if (o == null) { if (o == null) {
...@@ -210,6 +211,9 @@ public class LoginController extends WebBaseController { ...@@ -210,6 +211,9 @@ public class LoginController extends WebBaseController {
return this.fail("微信企业和gic商户参数为空"); return this.fail("微信企业和gic商户参数为空");
} }
String gicSuperPhone = clerkService.getSuperAdminPhoneNumber(gicEnterpriseId); String gicSuperPhone = clerkService.getSuperAdminPhoneNumber(gicEnterpriseId);
if (StringUtils.isNotBlank(userName)) {
userName = URLDecoder.decode(userName, "UTF-8");
}
logger.info("好办运维登录商户id={},超管手机={},运维信息:{}-{}", gicEnterpriseId, gicSuperPhone, operationUserId, userName); logger.info("好办运维登录商户id={},超管手机={},运维信息:{}-{}", gicEnterpriseId, gicSuperPhone, operationUserId, userName);
if (StringUtils.isBlank(gicSuperPhone)) { if (StringUtils.isBlank(gicSuperPhone)) {
return this.fail("商户超管的手机号未配置"); return this.fail("商户超管的手机号未配置");
...@@ -566,7 +570,7 @@ public class LoginController extends WebBaseController { ...@@ -566,7 +570,7 @@ public class LoginController extends WebBaseController {
*/ */
@RequestMapping("/gic-login-check") @RequestMapping("/gic-login-check")
@IgnoreLogin @IgnoreLogin
public ModelAndView gicLogin(String code, String hbEnt,String hbPage, String operationUserId, String userName) { public ModelAndView gicLogin(String code, String hbEnt,String hbPage, String operationUserId, String userName) throws UnsupportedEncodingException {
logger.info("gic登录clerkId={},hbEnt={},operationUserId={},userName={}", code, hbEnt, operationUserId, userName); logger.info("gic登录clerkId={},hbEnt={},operationUserId={},userName={}", code, hbEnt, operationUserId, userName);
PowerClerkDTO clerkDTO = this.userService.haobanLoginBack(code); PowerClerkDTO clerkDTO = this.userService.haobanLoginBack(code);
if (clerkDTO == null) { if (clerkDTO == null) {
...@@ -584,6 +588,9 @@ public class LoginController extends WebBaseController { ...@@ -584,6 +588,9 @@ public class LoginController extends WebBaseController {
retMap.put("timestamp", System.currentTimeMillis()+"") ; retMap.put("timestamp", System.currentTimeMillis()+"") ;
//运维登录信息 //运维登录信息
retMap.put("operationUserId", operationUserId) ; retMap.put("operationUserId", operationUserId) ;
if (StringUtils.isNotBlank(userName)) {
userName = URLDecoder.decode(userName, "UTF-8");
}
retMap.put("userName", userName) ; retMap.put("userName", userName) ;
String ret = JSONObject.toJSONString(retMap); String ret = JSONObject.toJSONString(retMap);
AES aes = SecureUtil.aes(LOGIN_KEY.getBytes()); AES aes = SecureUtil.aes(LOGIN_KEY.getBytes());
......
...@@ -10,9 +10,7 @@ import com.gic.commons.webapi.reponse.RestResponse; ...@@ -10,9 +10,7 @@ import com.gic.commons.webapi.reponse.RestResponse;
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.manage.api.constants.StatisticsApolloKeyConstant; import com.gic.haoban.manage.api.constants.StatisticsApolloKeyConstant;
import com.gic.haoban.manage.api.dto.hm.HmClerkRelationDTO; import com.gic.haoban.manage.api.dto.hm.*;
import com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO;
import com.gic.haoban.manage.api.dto.hm.WxUserAddLogDTO;
import com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO; import com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO;
import com.gic.haoban.manage.api.dto.qdto.hm.WxUserAddLogSearchQDTO; import com.gic.haoban.manage.api.dto.qdto.hm.WxUserAddLogSearchQDTO;
import com.gic.haoban.manage.api.dto.statistics.StatisticsDTO; import com.gic.haoban.manage.api.dto.statistics.StatisticsDTO;
...@@ -22,6 +20,7 @@ import com.gic.haoban.manage.api.service.hm.WxUserAddLogApiService; ...@@ -22,6 +20,7 @@ import com.gic.haoban.manage.api.service.hm.WxUserAddLogApiService;
import com.gic.haoban.manage.api.util.DataHttpUtil; import com.gic.haoban.manage.api.util.DataHttpUtil;
import com.gic.haoban.manage.web.dto.HmOverviewDTO; import com.gic.haoban.manage.web.dto.HmOverviewDTO;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode; import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.qo.hm.HmQrcodeDetailQO;
import com.gic.haoban.manage.web.qo.hm.HmQrcodeUpdateQO; import com.gic.haoban.manage.web.qo.hm.HmQrcodeUpdateQO;
import com.gic.haoban.manage.web.qo.hm.data.HmDetailClerkListQO; import com.gic.haoban.manage.web.qo.hm.data.HmDetailClerkListQO;
import com.gic.haoban.manage.web.qo.hm.data.HmQrcodeListQO; import com.gic.haoban.manage.web.qo.hm.data.HmQrcodeListQO;
...@@ -127,7 +126,51 @@ public class HmQrcodeController { ...@@ -127,7 +126,51 @@ public class HmQrcodeController {
if (!storeList.contains("-1")) { if (!storeList.contains("-1")) {
hmQrcodeListQO.getInFields().setStoreId(storeList); hmQrcodeListQO.getInFields().setStoreId(storeList);
} }
StatisticsDTO statisticsDTO = DataHttpUtil.post(StatisticsApolloKeyConstant.data_haoban_hm_list, hmQrcodeListQO); StatisticsDTO statisticsDTO = DataHttpUtil.post(StatisticsApolloKeyConstant.data_haoban_hm_list, hmQrcodeListQO);
List<HmQrcodeListDTO> data = statisticsDTO.getData();
List<HmStoreDTO> storeDTOList = new ArrayList<>();
List<HmClerkDTO> clerkDTOList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(data)) {
for (HmQrcodeListDTO hmQrcodeListDTO : data) {
Long hmId = hmQrcodeListDTO.getHmId();
Integer hmType = hmQrcodeListDTO.getHmType();
if (hmType == 1) {
HmClerkDTO clerkDTO = new HmClerkDTO();
clerkDTO.setClerkName(hmQrcodeListDTO.getClerkName());
clerkDTO.setClerkId(hmQrcodeListDTO.getClerkId());
clerkDTO.setClerkCode(hmQrcodeListDTO.getClerkCode());
clerkDTOList.add(clerkDTO);
HmStoreDTO storeDTO = new HmStoreDTO();
storeDTO.setStoreId(hmQrcodeListDTO.getStoreId());
storeDTO.setStoreName(hmQrcodeListDTO.getStoreName());
storeDTO.setStoreCode(hmQrcodeListDTO.getStoreCode());
storeDTOList.add(storeDTO);
} else if (hmType == 2) {
BasePageInfo basePageInfo = new BasePageInfo();
basePageInfo.setPageNum(1);
basePageInfo.setPageNum(1000);
Page<HmClerkRelationDTO> hmClerkByHmId = hmQrcodeApiService.getHmClerkByHmId(basePageInfo, hmId);
List<HmClerkRelationDTO> hmClerkRelationDTOList = hmClerkByHmId.getResult();
if (CollectionUtils.isNotEmpty(hmClerkRelationDTOList)) {
for (HmClerkRelationDTO hmClerkRelationDTO : hmClerkRelationDTOList) {
HmClerkDTO clerkDTO = new HmClerkDTO();
clerkDTO.setClerkName(hmClerkRelationDTO.getClerkName());
clerkDTO.setClerkId(hmClerkRelationDTO.getClerkId());
clerkDTO.setClerkCode(hmClerkRelationDTO.getClerkCode());
clerkDTOList.add(clerkDTO);
HmStoreDTO storeDTO = new HmStoreDTO();
storeDTO.setStoreId(hmClerkRelationDTO.getStoreId());
storeDTO.setStoreName(hmClerkRelationDTO.getStoreName());
storeDTO.setStoreCode(hmClerkRelationDTO.getStoreCode());
storeDTOList.add(storeDTO);
}
}
}
hmQrcodeListDTO.setClerkList(clerkDTOList);
hmQrcodeListDTO.setStoreList(storeDTOList);
}
}
return RestResponse.successResult(statisticsDTO); return RestResponse.successResult(statisticsDTO);
} }
...@@ -189,22 +232,28 @@ public class HmQrcodeController { ...@@ -189,22 +232,28 @@ public class HmQrcodeController {
* 使用成员 * 使用成员
* @return * @return
*/ */
@RequestMapping(value = "detail-clerk-list", method = RequestMethod.GET) @RequestMapping(value = "detail-clerk-list", method = RequestMethod.POST)
public RestResponse detailClerkList(Long hmId) { public RestResponse detailClerkList(@RequestBody HmQrcodeDetailQO hmQrcodeDetailQO) {
Long hmId = hmQrcodeDetailQO.getHmId();
HmQrcodeDTO hmQrcodeDTO = hmQrcodeApiService.queryById(hmId); HmQrcodeDTO hmQrcodeDTO = hmQrcodeApiService.queryById(hmId);
if (hmQrcodeDTO == null) { if (hmQrcodeDTO == null) {
return RestResponse.failure(Convert.toStr(HaoBanErrCode.ERR_8.getCode()),HaoBanErrCode.ERR_8.getMsg()); return RestResponse.failure(Convert.toStr(HaoBanErrCode.ERR_8.getCode()),HaoBanErrCode.ERR_8.getMsg());
} }
Integer hmType = hmQrcodeDTO.getHmType(); Integer hmType = hmQrcodeDTO.getHmType();
Page page = new Page();
List<HmDetailClerkListVO> list = new ArrayList<>(); List<HmDetailClerkListVO> list = new ArrayList<>();
if (hmType == 1) { if (hmType == 1) {
HmDetailClerkListVO hmDetailClerkListVO = EntityUtil.changeEntityNew(HmDetailClerkListVO.class,hmQrcodeDTO); HmDetailClerkListVO hmDetailClerkListVO = EntityUtil.changeEntityNew(HmDetailClerkListVO.class,hmQrcodeDTO);
list.add(hmDetailClerkListVO); list.add(hmDetailClerkListVO);
page.setResult(list);
page.setTotalCount(list.size());
} else if (hmType == 2) { } else if (hmType == 2) {
List<HmClerkRelationDTO> hmClerkByHmId = hmQrcodeApiService.getHmClerkByHmId(hmId); BasePageInfo basePageInfo = new BasePageInfo();
list = EntityUtil.changeEntityListNew(HmDetailClerkListVO.class, hmClerkByHmId); basePageInfo.setPageNum(hmQrcodeDetailQO.getPageNum());
basePageInfo.setPageSize(hmQrcodeDetailQO.getPageSize());
page = hmQrcodeApiService.getHmClerkByHmId(basePageInfo, hmId);
} }
return RestResponse.successResult(list); return RestResponse.successResult(page);
} }
......
package com.gic.haoban.manage.web.qo.hm;
import com.gic.api.base.commons.BasePageInfo;
import java.io.Serializable;
/**
* @author xuwenqian
* @date 2022/7/15 14:27
*/
public class HmQrcodeDetailQO extends BasePageInfo implements Serializable {
private static final long serialVersionUID = 6305747368824904637L;
private Long hmId;
public Long getHmId() {
return hmId;
}
public void setHmId(Long hmId) {
this.hmId = hmId;
}
}
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