| | |
| | | ZTBaseResponse<ZTUserGetTokenResponse> result = sendHttpRequest( |
| | | ZTConstants.IntegerUrl.USER_UPDATE_URL, |
| | | ZTConstants.IntegerName.USER_UPDATE_NAME, |
| | | param.getToken(), |
| | | param.getUserType(), |
| | | null, |
| | | null, |
| | | JSONObject.toJSONString(param ), |
| | | new TypeReference<ZTBaseResponse<ZTUserGetTokenResponse>>(){}); |
| | | // if(result!=null){ |
| | |
| | | */ |
| | | private String msg; |
| | | private int total; |
| | | private Boolean hasMore; |
| | | /** |
| | | * æ°æ® |
| | | */ |
| | |
| | | String JIADE_ID ="zb_deco_jdid"; |
| | | } |
| | | public interface IntegerUrl{ |
| | | String USER_UPDATE_URL ="customer/api/sync"; |
| | | String USER_UPDATE_URL ="/customer/api/sync"; |
| | | String USER_GET_TOKEN_URL ="/customer/api/login"; |
| | | String USER_LOGOUT_URL ="/customer/api/disable"; |
| | | String CATALOG_LIST_URL ="/content/api/catalog"; |
| | |
| | | @TableField(exist = false) |
| | | private String openid; |
| | | |
| | | @ApiModelProperty(value = "Cç«¯ç¨æ·ä¸»é®") |
| | | @TableField(exist = false) |
| | | private Long memberId; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.biz.zbom.model.crm.CrmCustomerListRequest; |
| | | import com.doumee.biz.zbom.model.crm.response.CRMBaseResponse; |
| | | import com.doumee.biz.zbom.model.crm.response.CRMCustomerListResponse; |
| | | import com.doumee.biz.zbom.model.zhongtai.ZTCatalogListRequest; |
| | | import com.doumee.biz.zbom.model.zhongtai.ZTContentListRequest; |
| | | import com.doumee.biz.zbom.model.zhongtai.response.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç¨æ·è¡ä¸ºæ°æ®ä¿¡æ¯è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/07/04 14:40 |
| | | */ |
| | | public interface GetCrmDataService { |
| | | |
| | | /** |
| | | * è·åCRM 客æ·å表/æ½å®¢å表 |
| | | * @param crmCustomerListRequest |
| | | * @return |
| | | */ |
| | | CRMBaseResponse<List<CRMCustomerListResponse>> getCrmCustomerList(CrmCustomerListRequest crmCustomerListRequest); |
| | | |
| | | } |
| | |
| | | void collectContent(Long userId,String userType,String articleId); |
| | | |
| | | /** |
| | | * æ¶èä¸å¡ |
| | | * 忬¢ä¸å¡ |
| | | * @param userId |
| | | * @param userType |
| | | * @param articleId |
| | |
| | | |
| | | String importBatch(MultipartFile file); |
| | | |
| | | Users usersDetail(Long userId); |
| | | Users usersDetailByIamId(String iamId); |
| | | |
| | | Users usersDetailById(Long id); |
| | | |
| | | String getUserCard(Users users); |
| | | |
| | | void editUserInfo(EditUsersRequest editUsersRequest); |
| | | |
| | | |
| | | String getContentShareImg(Users loginUserInfo, ContentShareImgDto param); |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | List<BjParam> bjParamList = bjParamMapper.selectList(new QueryWrapper<BjParam>() |
| | | .lambda().eq(BjParam::getIsdeleted,Constants.ZERO)); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(bjParamList)){ |
| | | List<BjParam> roughList = bjParamList.stream().filter(i->i.getType().equals(Constants.ZERO+"")).collect(Collectors.toList()); |
| | | List<BjParam> exquisiteList = bjParamList.stream().filter(i->i.getType().equals(Constants.ONE+"")).collect(Collectors.toList()); |
| | | List<BjParam> roughList = bjParamList.stream().filter(i->i.getType().equals(Constants.ZERO+"")&& StringUtils.isEmpty(i.getParentId())).collect(Collectors.toList()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(roughList)){ |
| | | for (BjParam bjParam:roughList) { |
| | | bjParam.setChildren( |
| | | bjParamList.stream().filter(i->i.getType().equals(Constants.ZERO+"") |
| | | && Objects.nonNull(i.getParentId()) |
| | | && i.getParentId().equals(bjParam.getId())).collect(Collectors.toList()) |
| | | ); |
| | | } |
| | | } |
| | | List<BjParam> exquisiteList = bjParamList.stream().filter(i->i.getType().equals(Constants.ONE+"")&& StringUtils.isEmpty(i.getParentId())).collect(Collectors.toList()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(exquisiteList)){ |
| | | for (BjParam bjParam:exquisiteList) { |
| | | bjParam.setChildren( |
| | | bjParamList.stream().filter(i->i.getType().equals(Constants.ONE+"") |
| | | && Objects.nonNull(i.getParentId()) |
| | | && i.getParentId().equals(bjParam.getId())).collect(Collectors.toList()) |
| | | ); |
| | | } |
| | | } |
| | | bjParamConfigResponse.setRoughList(roughList); |
| | | bjParamConfigResponse.setExquisiteList(exquisiteList); |
| | | } |
| | |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.CustomerLogMapper; |
| | | import com.doumee.dao.business.model.CustomerLog; |
| | | import com.doumee.dao.business.model.IamInterfaceLog; |
| | | import com.doumee.dao.business.model.InterfaceLog; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.CustomerLogService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 客æ·çèµè®°å½ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | @Override |
| | | public PageData<CustomerLog> findPage(PageWrap<CustomerLog> pageWrap) { |
| | | IPage<CustomerLog> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<CustomerLog> queryWrapper = new QueryWrapper<>(); |
| | | MPJLambdaWrapper<CustomerLog> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getId, pageWrap.getModel().getId()); |
| | | queryWrapper.selectAll(CustomerLog.class) |
| | | .leftJoin(Customer.class,Customer::getId,CustomerLog::getCostomerId) |
| | | .eq(CustomerLog::getIsdeleted, Constants.ZERO) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getType()),CustomerLog::getType, pageWrap.getModel().getType()) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getMemberId()),Customer::getMemberId, pageWrap.getModel().getMemberId()); |
| | | queryWrapper.orderByDesc(CustomerLog::getCreateDate); |
| | | PageData<CustomerLog> pageData = PageData.from(customerLogMapper.selectJoinPage(page,CustomerLog.class, queryWrapper)); |
| | | for (CustomerLog customerLog:pageData.getRecords()) { |
| | | customerLog.setPhone( |
| | | customerLog.getPhone().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2") |
| | | ); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(CustomerLog::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(CustomerLog::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(CustomerLog::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(CustomerLog::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getOrderDate() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getOrderDate, pageWrap.getModel().getOrderDate()); |
| | | } |
| | | if (pageWrap.getModel().getPlaDate() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getPlaDate, pageWrap.getModel().getPlaDate()); |
| | | } |
| | | if (pageWrap.getModel().getDesignType() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getDesignType, pageWrap.getModel().getDesignType()); |
| | | } |
| | | if (pageWrap.getModel().getHouseStatus() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getHouseStatus, pageWrap.getModel().getHouseStatus()); |
| | | } |
| | | if (pageWrap.getModel().getDistrict() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getDistrict, pageWrap.getModel().getDistrict()); |
| | | } |
| | | if (pageWrap.getModel().getArea() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getArea, pageWrap.getModel().getArea()); |
| | | } |
| | | if (pageWrap.getModel().getInfo() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getInfo, pageWrap.getModel().getInfo()); |
| | | } |
| | | if (pageWrap.getModel().getCostomerId() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getCostomerId, pageWrap.getModel().getCostomerId()); |
| | | } |
| | | if (pageWrap.getModel().getHouseType() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getHouseType, pageWrap.getModel().getHouseType()); |
| | | } |
| | | if (pageWrap.getModel().getSex() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getSex, pageWrap.getModel().getSex()); |
| | | } |
| | | if (pageWrap.getModel().getAgeInfo() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getAgeInfo, pageWrap.getModel().getAgeInfo()); |
| | | } |
| | | if (pageWrap.getModel().getStyleInfo() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getStyleInfo, pageWrap.getModel().getStyleInfo()); |
| | | } |
| | | if (pageWrap.getModel().getProvinceName() != null) { |
| | | queryWrapper.lambda().like(CustomerLog::getProvinceName, pageWrap.getModel().getProvinceName()); |
| | | } |
| | | if (pageWrap.getModel().getCityName() != null) { |
| | | queryWrapper.lambda().like(CustomerLog::getCityName, pageWrap.getModel().getCityName()); |
| | | } |
| | | if (pageWrap.getModel().getProvicneCode() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getProvicneCode, pageWrap.getModel().getProvicneCode()); |
| | | } |
| | | if (pageWrap.getModel().getCityCode() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getCityCode, pageWrap.getModel().getCityCode()); |
| | | } |
| | | if (pageWrap.getModel().getPhone() != null) { |
| | | queryWrapper.lambda().like(CustomerLog::getPhone, pageWrap.getModel().getPhone()); |
| | | } |
| | | if (pageWrap.getModel().getType() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getType, pageWrap.getModel().getType()); |
| | | } |
| | | if (pageWrap.getModel().getBudget() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getBudget, pageWrap.getModel().getBudget()); |
| | | } |
| | | if (pageWrap.getModel().getCrmStatus() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getCrmStatus, pageWrap.getModel().getCrmStatus()); |
| | | } |
| | | if (pageWrap.getModel().getCrmDate() != null) { |
| | | queryWrapper.lambda().ge(CustomerLog::getCrmDate, Utils.Date.getStart(pageWrap.getModel().getCrmDate())); |
| | | queryWrapper.lambda().le(CustomerLog::getCrmDate, Utils.Date.getEnd(pageWrap.getModel().getCrmDate())); |
| | | } |
| | | if (pageWrap.getModel().getCrmInfo() != null) { |
| | | queryWrapper.lambda().eq(CustomerLog::getCrmInfo, pageWrap.getModel().getCrmInfo()); |
| | | } |
| | | if (pageWrap.getModel().getQueryStartDate() != null) { |
| | | queryWrapper.lambda().ge(CustomerLog::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getQueryStartDate())); |
| | | } |
| | | if (pageWrap.getModel().getQueryEndDate() != null) { |
| | | queryWrapper.lambda().le(CustomerLog::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getQueryEndDate())); |
| | | } |
| | | queryWrapper.lambda().orderByDesc(CustomerLog::getCreateDate); |
| | | return PageData.from(customerLogMapper.selectPage(page, queryWrapper)); |
| | | return pageData; |
| | | } |
| | | |
| | | @Override |
| | |
| | | customerLog.setIsdeleted(Constants.ZERO); |
| | | customerLog.setType(Constants.TWO); |
| | | customerLog.setCrmStatus(Constants.ZERO); |
| | | customerLog.setName(StringUtils.isEmpty(member.getName())?member.getNickname():member.getName()); |
| | | customerLog.setPhone(customer.getPhone()); |
| | | customerLog.setBudget(renovationCalculatorDTO.getBudget().multiply(new BigDecimal(10000)).toString()); |
| | | customerLog.setHouseStatus(renovationCalculatorDTO.getHouseStatus()); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.biz.zbom.ZbomCRMService; |
| | | import com.doumee.biz.zbom.ZbomZhongTaiService; |
| | | import com.doumee.biz.zbom.model.crm.CrmCustomerListRequest; |
| | | import com.doumee.biz.zbom.model.crm.response.CRMBaseResponse; |
| | | import com.doumee.biz.zbom.model.crm.response.CRMCustomerListResponse; |
| | | import com.doumee.biz.zbom.model.zhongtai.*; |
| | | import com.doumee.biz.zbom.model.zhongtai.response.*; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.UsersMapper; |
| | | import com.doumee.dao.web.response.ZTBaseInfoResponse; |
| | | import com.doumee.service.business.GetCrmDataService; |
| | | import com.doumee.service.business.GetZhongTaiDataService; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/7/15 14:12 |
| | | */ |
| | | @Service |
| | | public class GetCrmDataServiceImpl implements GetCrmDataService { |
| | | |
| | | @Autowired |
| | | private ZbomCRMService zbomCRMService; |
| | | |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | |
| | | @Autowired |
| | | private UsersMapper usersMapper; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | |
| | | @Override |
| | | public CRMBaseResponse<List<CRMCustomerListResponse>> getCrmCustomerList(CrmCustomerListRequest crmCustomerListRequest){ |
| | | if(Objects.isNull(crmCustomerListRequest) |
| | | || Objects.isNull(crmCustomerListRequest.getPage()) |
| | | || Objects.isNull(crmCustomerListRequest.getPageSize()) |
| | | || StringUtils.isBlank(crmCustomerListRequest.getFlag()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | CRMBaseResponse<List<CRMCustomerListResponse>> crmBaseResponse = zbomCRMService.getCustomerList(crmCustomerListRequest); |
| | | if(Objects.isNull(crmBaseResponse)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"CRMæ¥å£è¯·æ±å¤±è´¥!"); |
| | | } |
| | | return crmBaseResponse; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | @Override |
| | | public AccountResponse wxLogin(String code){ |
| | | try { |
| | | // try { |
| | | //è·åå¾®ä¿¡æææ°æ® |
| | | WxMaJscode2SessionResult session = WxMiniConfig.wxCustomerService.getUserService().getSessionInfo(code); |
| | | String openId = session.getOpenid(); |
| | | if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isBlank(openId)) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"è·åopenid失败ï¼è¯·è系管çå"); |
| | | } |
| | | // WxMaJscode2SessionResult session = WxMiniConfig.wxCustomerService.getUserService().getSessionInfo(code); |
| | | // String openId = session.getOpenid(); |
| | | // if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isBlank(openId)) { |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"è·åopenid失败ï¼è¯·è系管çå"); |
| | | // } |
| | | String openId = code; |
| | | Member member = memberMapper.selectOne(new QueryWrapper<Member>().eq("OPENID", openId)); |
| | | String appId = systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_APPID_CUSTOMER).getCode(); |
| | | if (member == null) { |
| | | member = new Member(); |
| | | member.setNickname("å¾®ä¿¡ç¨æ·"+ CodeVerifyUtils.createVerificationCode(4)); |
| | |
| | | member.setOpenid(openId); |
| | | member.setType(Constants.ZERO); |
| | | member.setAuthStatus(Constants.ZERO); |
| | | // ZTUserGetTokenResponse ztUserGetTokenResponse = this.syncZhongTaiUser(memberDto); |
| | | // if(Objects.isNull(ztUserGetTokenResponse)){ |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸å°æå¡è°èµ·å¤±è´¥!"); |
| | | // }else{ |
| | | // member.setToken(ztUserGetTokenResponse.getToken()); |
| | | // } |
| | | ZTUserGetTokenResponse ztUserGetTokenResponse = this.syncZhongTaiUser(member); |
| | | if(Objects.isNull(ztUserGetTokenResponse)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸å°æå¡è°èµ·å¤±è´¥!"); |
| | | }else{ |
| | | member.setToken(ztUserGetTokenResponse.getToken()); |
| | | } |
| | | memberMapper.insert(member); |
| | | member = this.getMemberInfo(member.getId()); |
| | | }else{ |
| | | // ZTUserGetTokenResponse ztUserGetTokenResponse = this.syncZhongTaiUser(memberDto); |
| | | // if(Objects.isNull(ztUserGetTokenResponse)){ |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸å°æå¡è°èµ·å¤±è´¥!"); |
| | | // }else{ |
| | | // member.setToken(ztUserGetTokenResponse.getToken()); |
| | | // } |
| | | ZTUserGetTokenResponse ztUserGetTokenResponse = this.syncZhongTaiUser(member); |
| | | if(Objects.isNull(ztUserGetTokenResponse)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸å°æå¡è°èµ·å¤±è´¥!"); |
| | | }else{ |
| | | member.setToken(ztUserGetTokenResponse.getToken()); |
| | | } |
| | | member = this.getMemberInfo(member.getId()); |
| | | } |
| | | //å建token |
| | |
| | | String token = JwtTokenUtil.generateToken(payLoad); |
| | | AccountResponse accountResponse = new AccountResponse(); |
| | | accountResponse.setToken(token); |
| | | accountResponse.setSessionKey(session.getSessionKey()); |
| | | // accountResponse.setSessionKey(session.getSessionKey()); |
| | | accountResponse.setMember(member); |
| | | return accountResponse; |
| | | } catch (WxErrorException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"微信ç»å½å¼å¸¸ï¼è¯·è系管çå"); |
| | | // } catch (WxErrorException e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"微信ç»å½å¼å¸¸ï¼è¯·è系管çå"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | ztUserInfoUpdateRequest.setPlatform(Constants.PLATFORM); |
| | | ztUserInfoUpdateRequest.setPhone(member.getPhone()); |
| | | ztUserInfoUpdateRequest.setName(member.getNickname()); |
| | | ztUserInfoUpdateRequest.setAddress(member.getProvinceName()+member.getCityName()+member.getAreaName()); |
| | | // ztUserInfoUpdateRequest.setAddress(member.getProvinceName()+member.getCityName()+member.getAreaName()); |
| | | ztUserInfoUpdateRequest.setFullAddress(member.getAddress()); |
| | | String prefix = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.MEMBER).getCode(); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Users usersDetail(Long userId){ |
| | | Users users = usersMapper.selectById(userId); |
| | | public Users usersDetailByIamId(String iamId){ |
| | | Users users = usersMapper.selectOne(new QueryWrapper<Users>().lambda().eq(Users::getIamId,iamId).last("limit 1")); |
| | | if(Objects.isNull(users)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(Constants.equalsInteger(users.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"ç¨æ·å·²ç¦ç¨"); |
| | | } |
| | | getUsersDetail(users); |
| | | return users; |
| | | } |
| | | |
| | | @Override |
| | | public Users usersDetailById(Long id){ |
| | | Users users = usersMapper.selectById(id); |
| | | if(Objects.isNull(users)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(Constants.equalsInteger(users.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"ç¨æ·å·²ç¦ç¨"); |
| | | } |
| | | getUsersDetail(users); |
| | | return users; |
| | | } |
| | | |
| | | public void getUsersDetail(Users users){ |
| | | String prefix = StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode()) + |
| | | StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.USERS_FILE).getCode()); |
| | | if(StringUtils.isNotBlank(users.getImgurl())){ |
| | |
| | | } |
| | | } |
| | | } |
| | | return users; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.biz.zbom.ZbomCRMService; |
| | | import com.doumee.biz.zbom.model.zhongtai.ZTCatalogListRequest; |
| | | import com.doumee.biz.zbom.model.zhongtai.ZTContentListRequest; |
| | | import com.doumee.biz.zbom.model.zhongtai.response.*; |
| | | import com.doumee.config.annotation.LoginRequired; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.InputStream; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | |
| | | public class CustomerApi extends ApiController{ |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private MemberService memberService; |
| | | |
| | |
| | | private CustomerService customerService; |
| | | |
| | | @Autowired |
| | | private ZbomCRMService zbomCRMService; |
| | | private GetZhongTaiDataService getZhongTaiDataService; |
| | | |
| | | @Autowired |
| | | private ShopService shopService; |
| | |
| | | private CustomerUserService customerUserService; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private CustomerLogService customerLogService; |
| | | |
| | | @ApiOperation(value = "客æ·ç«¯å°ç¨åºç»é", notes = "客æ·ç«¯å°ç¨åº") |
| | | @GetMapping("/wxLoginCustomer") |
| | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "导è´è¯¦æ
", notes = "客æ·ç«¯å°ç¨åº") |
| | | @GetMapping("/usersDetail") |
| | | @GetMapping("/usersDetailByIamId") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Long", name = "userId", value = "导è´ä¸»é®", required = true) |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "iamId", value = "导è´IAMç¼ç ", required = true) |
| | | }) |
| | | public ApiResponse<Users> usersDetail (@RequestParam Long userId) { |
| | | return ApiResponse.success(usersService.usersDetail(userId)); |
| | | public ApiResponse<Users> usersDetailByIamId (@RequestParam String iamId) { |
| | | return ApiResponse.success(usersService.usersDetailByIamId(iamId)); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "æçé¢çº¦å页æ¥è¯¢",notes = "客æ·ç«¯å°ç¨åº") |
| | | @PostMapping("/customerLogPage") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<PageData<CustomerLog>> customerLogPage(@RequestBody PageWrap<CustomerLog> pageWrap) { |
| | | pageWrap.getModel().setCostomerId(getMemberId().toString()); |
| | | return ApiResponse.success(customerLogService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "åç±»æ°æ® - ä¸å°", notes = "客æ·ç«¯å°ç¨åº") |
| | | @PostMapping("/getCatalogList") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<List<ZTCatalogInfoResponse>> getCatalogList (@RequestBody ZTCatalogListRequest ztCatalogListRequest ) { |
| | | List<ZTCatalogInfoResponse> ztCatalogInfoResponseList = getZhongTaiDataService.getCatalogList(ztCatalogListRequest); |
| | | return ApiResponse.success("æ¥è¯¢æå",ztCatalogInfoResponseList); |
| | | } |
| | | |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "æ ç¾æ°æ® - ä¸å°", notes = "客æ·ç«¯å°ç¨åº") |
| | | @PostMapping("/getCataLogTagList") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<List<ZTTagInfoResponse>> getCataLogTagList(@RequestBody ZTCatalogListRequest ztCatalogListRequest ) { |
| | | List<ZTTagInfoResponse> ztTagInfoResponseList = getZhongTaiDataService.getCataLogTagList(ztCatalogListRequest); |
| | | return ApiResponse.success("æ¥è¯¢æå",ztTagInfoResponseList); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "æ ç¾æ°æ® - ä¸å°", notes = "客æ·ç«¯å°ç¨åº") |
| | | @PostMapping("/getZTCatalogInfoResponse") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<List<ZTCatalogInfoResponse>> getZTCatalogInfoResponse(@RequestBody ZTCatalogListRequest ztCatalogListRequest) { |
| | | List<ZTCatalogInfoResponse> ztCatalogInfoResponse = getZhongTaiDataService.getZTCatalogInfoResponse(ztCatalogListRequest); |
| | | return ApiResponse.success("æ¥è¯¢æå",ztCatalogInfoResponse); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "å
容å页 - ä¸å°", notes = "客æ·ç«¯å°ç¨åº") |
| | | @PostMapping("/pageContentList") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<ZTBasePageResponse<ZTContentListResponse>> pageContentList(@RequestBody ZTContentListRequest ztContentListRequest) { |
| | | ZTBasePageResponse<ZTContentListResponse> ztBasePageResponse= getZhongTaiDataService.pageContentList(ztContentListRequest); |
| | | return ApiResponse.success("æ¥è¯¢æå",ztBasePageResponse); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "å
容详æ
- ä¸å°", notes = "客æ·ç«¯å°ç¨åº") |
| | | @GetMapping("/getContentInfo") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "å
容主é®", required = true), |
| | | }) |
| | | public ApiResponse<ZTContentInfoResponse> getContentInfo(@RequestParam String id) { |
| | | ZTContentInfoResponse ztContentInfoResponse= getZhongTaiDataService.getContentInfo(id,Constants.CUSTOMER,getMemberId()); |
| | | return ApiResponse.success("æ¥è¯¢æå",ztContentInfoResponse); |
| | | } |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "å
容æ¶è - ä¸å°", notes = "客æ·ç«¯å°ç¨åº") |
| | | @GetMapping("/collectContent") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "å
容主é®", required = true), |
| | | }) |
| | | public ApiResponse collectContent(@RequestParam String id) { |
| | | getZhongTaiDataService.collectContent(getMemberId(),Constants.CUSTOMER,id); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "å
容忬¢ - ä¸å°", notes = "客æ·ç«¯å°ç¨åº") |
| | | @GetMapping("/likeContent") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "å
容主é®", required = true), |
| | | }) |
| | | public ApiResponse likeContent(@RequestParam String id) { |
| | | getZhongTaiDataService.likeContent(getMemberId(),Constants.CUSTOMER,id); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "å
容å享 - ä¸å°", notes = "客æ·ç«¯å°ç¨åº") |
| | | @GetMapping("/shareContent") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "å
容主é®", required = true), |
| | | }) |
| | | public ApiResponse shareContent(@RequestParam String id) { |
| | | getZhongTaiDataService.shareContent(getMemberId(),Constants.CUSTOMER,id); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "å
容æµè§ - ä¸å°", notes = "客æ·ç«¯å°ç¨åº") |
| | | @GetMapping("/viewContent") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "å
容主é®", required = true), |
| | | }) |
| | | public ApiResponse viewContent(@RequestParam String id) { |
| | | getZhongTaiDataService.viewContent(getMemberId(),Constants.CUSTOMER,id); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse getUserDetail() { |
| | | usersService.usersDetail(getMemberId()); |
| | | usersService.usersDetailById(getMemberId()); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |