| | |
| | | boolean bindCustomerFavorites(ZTBindCusFavoriteDoRequest param); |
| | | ZSZXCatalogResponse getZSZXCatalogs(); |
| | | ZTBasePageResponse<ZTCusFavoritesInfoResponse> pageCusFavoriteList(ZTContentListRequest param); |
| | | |
| | | ZTBasePageResponse<ZTCusCarouselImageResponse> carouselImageList(ZTContentListRequest param); |
| | | } |
| | |
| | | */ |
| | | private String pid; |
| | | |
| | | private String level; |
| | | |
| | | } |
| | |
| | | String BIND_CUSTOMER_FAVORITES_URL ="/behavior/api/bindCustomerFavorites"; |
| | | String CUSTOMER_FAVORITES_LIST_URL ="/behavior/api/customerFavorites"; |
| | | String BEHAVIOR_LIST_URL ="/behavior/api/customerBehaviors"; |
| | | String CUSTOMER_CAROUSEL_IMAGE_URL ="/content/api/carouselAdList"; |
| | | String CUSTOMER_CAROUSEL_IMAGE_DETAIL_URL ="/content/api/carouselAdDetail"; |
| | | } |
| | | public interface IntegerName{ |
| | | String USER_UPDATE_NAME ="ç¨æ·ä¿¡æ¯åæ¥"; |
| | |
| | | String CUSTOMER_FAVORITES_LIST_NAME ="è·å客æ·å欢"; |
| | | String BEHAVIOR_LIST_NAME ="è·åè¡ä¸ºè½¨è¿¹"; |
| | | |
| | | String CUSTOMER_CAROUSEL_IMAGE_NAME ="C端轮æå¾å表"; |
| | | String CUSTOMER_CAROUSEL_IMAGE_DETAIL_NAME ="C端轮æå¾è¯¦æ
"; |
| | | |
| | | String AREA_TREE_NAME ="å
¨éçå¸åºæ å½¢æ°æ®"; |
| | | String AREA_ALL_NAME ="å
¨éçå¸åºè¯çº§æ°æ®"; |
| | | } |
| | |
| | | package com.doumee.biz.zbom.model.zhongtai.response; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | /** |
| | | * ç®å½å¯ä¸ç¼ç |
| | | */ |
| | | @ApiModelProperty(value = "ç®å½å¯ä¸ç¼ç ") |
| | | private String code; |
| | | /** |
| | | * ç®å½é¢å¤ä¿¡æ¯ |
| | | */ |
| | | @ApiModelProperty(value = "ç®å½é¢å¤ä¿¡æ¯") |
| | | private String expandInfo; |
| | | /** |
| | | * ç®å½ID |
| | | */ |
| | | @ApiModelProperty(value = "ç®å½ID") |
| | | private String id; |
| | | /** |
| | | * ç®å½åç§° |
| | | */ |
| | | @ApiModelProperty(value = "ç®å½åç§°") |
| | | private String name; |
| | | /** |
| | | * å°é¢å¾URL |
| | | */ |
| | | @ApiModelProperty(value = "å°é¢å¾URL") |
| | | private String picture; |
| | | /** |
| | | * ç¶çº§ç®å½ID |
| | | */ |
| | | @ApiModelProperty(value = "ç¶çº§ç®å½ID") |
| | | private String pid; |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | /** |
| | | * ç®å½æåº |
| | | */ |
| | | @ApiModelProperty(value = "ç®å½æåº") |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * åç®å½ |
| | | */ |
| | | @ApiModelProperty(value = "åç®å½") |
| | | private List<ZTTagInfoResponse> childTagList; |
| | | |
| | | } |
| | |
| | | package com.doumee.biz.zbom.model.zhongtai.response; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | /** |
| | | * ä½è
|
| | | */ |
| | | @ApiModelProperty(value = "author") |
| | | private String author; |
| | | /** |
| | | * å
容详æ
|
| | | */ |
| | | @ApiModelProperty(value = "å
容详æ
") |
| | | private Map<String, Object> content; |
| | | /** |
| | | * æç« ç±»å |
| | | */ |
| | | @ApiModelProperty(value = "æç« ç±»å") |
| | | private String contentType; |
| | | /** |
| | | * æç« ID |
| | | */ |
| | | @ApiModelProperty(value = "æç« ID") |
| | | private String id; |
| | | /** |
| | | * è¯è¨ç¼ç |
| | | */ |
| | | @ApiModelProperty(value = "è¯è¨ç¼ç ") |
| | | private String langCode; |
| | | /** |
| | | * å¤å¾çå表 |
| | | */ |
| | | @ApiModelProperty(value = "å¤å¾çå表") |
| | | private String picUrls; |
| | | /** |
| | | * å叿¥æ |
| | | */ |
| | | @ApiModelProperty(value = "å叿¥æ") |
| | | private String publishDate; |
| | | /** |
| | | * åå¸ç»ç» |
| | | */ |
| | | @ApiModelProperty(value = "åå¸ç»ç»") |
| | | private String publishDepartment; |
| | | /** |
| | | * åæ é¢ |
| | | */ |
| | | @ApiModelProperty(value = "åæ é¢") |
| | | private String subtitle; |
| | | /** |
| | | * æç« æ é¢ |
| | | */ |
| | | @ApiModelProperty(value = "æç« æ é¢") |
| | | private String title; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.biz.zbom.model.zhongtai.response; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | |
| | | /** |
| | | * Cç«¯å½æå¾ |
| | | */ |
| | | @Data |
| | | public class ZTCusCarouselImageResponse implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "æç« ID") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "è¯è¨ç¼ç ") |
| | | private String langCode; |
| | | |
| | | @ApiModelProperty(value = "æç« æ é¢") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "æç« 坿 é¢") |
| | | private String subtitle; |
| | | |
| | | @ApiModelProperty(value = "æç« ä½è
") |
| | | private String author; |
| | | |
| | | @ApiModelProperty(value = "å叿¥æ") |
| | | private String publishDate; |
| | | |
| | | @ApiModelProperty(value = "åå¸ç»ç»") |
| | | private String publishDepartment; |
| | | |
| | | @ApiModelProperty(value = "openType") |
| | | private String openType; |
| | | |
| | | @ApiModelProperty(value = "pageUrl") |
| | | private String pageUrl; |
| | | |
| | | @ApiModelProperty(value = "videoUrl") |
| | | private String videoUrl; |
| | | |
| | | @ApiModelProperty(value = "content") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "linkUrl") |
| | | private String linkUrl; |
| | | |
| | | @ApiModelProperty(value = "coverImage") |
| | | private String coverImage; |
| | | |
| | | @ApiModelProperty(value = "infoProTypeName") |
| | | private String infoProTypeName; |
| | | |
| | | } |
| | |
| | | package com.doumee.biz.zbom.model.zhongtai.response; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | /** |
| | | * æ ç¾å¼CODE |
| | | */ |
| | | @ApiModelProperty(value = "æ ç¾å¼CODE") |
| | | private String labelValueCode; |
| | | /** |
| | | * æ ç¾å¼ID |
| | | */ |
| | | @ApiModelProperty(value = "æ ç¾å¼ID") |
| | | private String labelValueId; |
| | | /** |
| | | * æ ç¾å¼NAME |
| | | */ |
| | | @ApiModelProperty(value = "æ ç¾å¼NAME") |
| | | private String labelValueName; |
| | | /** |
| | | * æ ç¾å¼æåº |
| | | */ |
| | | @ApiModelProperty(value = "æ ç¾å¼æåº") |
| | | private String labelValueSort; |
| | | |
| | | } |
| | |
| | | package com.doumee.biz.zbom.model.zhongtai.response; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | /** |
| | | * æ ç¾CODE |
| | | */ |
| | | @ApiModelProperty(value = "æ ç¾CODE") |
| | | private String labelCode; |
| | | /** |
| | | * æ ç¾ID |
| | | */ |
| | | @ApiModelProperty(value = "æ ç¾ID") |
| | | private String labelId; |
| | | /** |
| | | * æ ç¾NAME |
| | | */ |
| | | @ApiModelProperty(value = "æ ç¾NAME") |
| | | private String labelName; |
| | | /** |
| | | * æ ç¾æåº |
| | | */ |
| | | @ApiModelProperty(value = "æ ç¾æåº") |
| | | private String labelSort; |
| | | |
| | | /** |
| | | * åç®å½ |
| | | */ |
| | | @ApiModelProperty(value = "åç®å½") |
| | | private List<ZTTagChildInfoResponse> valueVos; |
| | | |
| | | } |
| | |
| | | String ZBOM_SMS_API_KEY ="ZBOM_SMS_API_KEY"; |
| | | String ZBOM_ZHONGTAI_API_URL ="ZBOM_ZHONGTAI_API_URL"; |
| | | String ZBOM_CRM_POSTCUS_API_KEY ="ZBOM_CRM_POSTCUS_API_KEY"; |
| | | String ZBOM_AREA_REDIS_KEY ="ZBOM_AREA_REDIS_KEY"; |
| | | String ZBOM_SMS_API_URL ="ZBOM_SMS_API_URL"; |
| | | String IAM_APPKEY ="IAM_APPKEY"; |
| | | String SHOP_TREE ="SHOP_TREE"; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response; |
| | | |
| | | import com.doumee.biz.zbom.model.zhongtai.response.ZTCatalogInfoResponse; |
| | | import com.doumee.dao.business.model.News; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/7/17 14:19 |
| | | */ |
| | | @Data |
| | | public class DailyUpdatesResponse { |
| | | |
| | | @ApiModelProperty(value = "仿¥ä¸æ°æ°é") |
| | | private Long dailyUpdateNum; |
| | | |
| | | @ApiModelProperty(value = "è½¬åæ°é") |
| | | private Long shareNum; |
| | | |
| | | @ApiModelProperty(value = "å¨è¯¢å表") |
| | | private List<News> newsList; |
| | | |
| | | } |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.biz.zbom.model.zhongtai.ZTAreaListRequest; |
| | | import com.doumee.biz.zbom.model.zhongtai.ZTBaseRequst; |
| | | import com.doumee.biz.zbom.model.zhongtai.ZTCatalogListRequest; |
| | | import com.doumee.biz.zbom.model.zhongtai.ZTContentListRequest; |
| | | import com.doumee.biz.zbom.model.zhongtai.response.*; |
| | |
| | | * @param ztCatalogListRequest |
| | | * @return |
| | | */ |
| | | List<ZTCatalogInfoResponse> getZTCatalogInfoResponse(ZTCatalogListRequest ztCatalogListRequest); |
| | | // List<ZTCatalogInfoResponse> getZTCatalogInfoResponse(ZTCatalogListRequest ztCatalogListRequest); |
| | | |
| | | /** |
| | | * å
容å页 |
| | |
| | | * @param articleId |
| | | */ |
| | | void viewContent(Long userId,String userType,String articleId); |
| | | |
| | | /** |
| | | * 注éç¨æ· |
| | | * @param ztBaseRequst |
| | | */ |
| | | void userLogout(ZTBaseRequst ztBaseRequst); |
| | | |
| | | /** |
| | | * è·åä¸å°æ°æ®ä¿¡æ¯ |
| | | * @param ztAreaListRequest |
| | | * @return |
| | | */ |
| | | List<ZTAreaTreeResponse> getZhongTaiAreaTree(ZTAreaListRequest ztAreaListRequest); |
| | | |
| | | /** |
| | | * C端 æç忬¢å表 |
| | | * @param ztContentListRequest |
| | | * @return |
| | | */ |
| | | ZTBasePageResponse<ZTCusFavoritesInfoResponse> getZhongTaiCusFavorite(ZTContentListRequest ztContentListRequest); |
| | | |
| | | /** |
| | | * C端 è½®æå¾å表 |
| | | * @param ztContentListRequest |
| | | * @return |
| | | */ |
| | | ZTBasePageResponse<ZTCusCarouselImageResponse> getZhongTaiCarouselImage(ZTContentListRequest ztContentListRequest); |
| | | } |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.biz.zbom.model.zhongtai.ZTBaseRequst; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Member; |
| | |
| | | * ç¨æ·æ³¨é |
| | | * @param memberId |
| | | */ |
| | | void logOff(Long memberId); |
| | | ZTBaseRequst logOff(Long memberId); |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.News; |
| | | import com.doumee.dao.web.response.DailyUpdatesResponse; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return long |
| | | */ |
| | | long count(News news); |
| | | |
| | | /** |
| | | * å®å¶æå¡å表 |
| | | * @return |
| | | */ |
| | | List<News> getCustomizedNewsList(Integer type,Integer num,Integer fileType); |
| | | |
| | | |
| | | /** |
| | | * å®å¶æå¡ä¿¡æ¯è¯¦æ
å¢å æµè§é |
| | | * @param id |
| | | * @return |
| | | */ |
| | | News getCustomizedNewsDetail(Long id); |
| | | |
| | | /** |
| | | * è·åæ¯æ¥ä¸æ°æ°æ® |
| | | * @return |
| | | */ |
| | | DailyUpdatesResponse getDailyUpdatesResponse(Integer fileType); |
| | | |
| | | /** |
| | | * ä¿åæ¨å¹¿å¨è¯¢åäº«è®°å½ |
| | | * @param id |
| | | * @param userId |
| | | */ |
| | | void saveShareRecord(Long id,Long userId); |
| | | } |
| | |
| | | |
| | | 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.ActionsMapper; |
| | | import com.doumee.dao.business.model.Actions; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°ç¨æ·ä¿¡æ¯"); |
| | | } |
| | | if(StringUtils.isEmpty(member.getPhone())){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªææææºå·"); |
| | | member.setPhone(freeCustomizationDTO.getPhone()); |
| | | memberMapper.updateById(member); |
| | | } |
| | | Customer customer = customerMapper.selectOne(new QueryWrapper<Customer>().lambda() |
| | | .eq(Customer::getPhone,freeCustomizationDTO.getPhone()).eq(Customer::getIsdeleted, Constants.ZERO).last("limit 1")); |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.biz.zbom.ZbomZhongTaiService; |
| | |
| | | import com.doumee.biz.zbom.model.zhongtai.response.*; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.IamInterfaceLogMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.UsersMapper; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.web.response.ZTBaseInfoResponse; |
| | | import com.doumee.service.business.GetZhongTaiDataService; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.google.gson.JsonArray; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.xpath.operations.Bool; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | |
| | | |
| | |
| | | * è·åç¶åçº§ç»ææ°æ® |
| | | * @return |
| | | */ |
| | | @Override |
| | | /* @Override |
| | | public List<ZTCatalogInfoResponse> getZTCatalogInfoResponse(ZTCatalogListRequest ztCatalogListRequest){ |
| | | if(Objects.isNull(ztCatalogListRequest) |
| | | || StringUtils.isBlank(ztCatalogListRequest.getCatalogCode())){ |
| | |
| | | } |
| | | } |
| | | return ztCatalogInfoResponseList; |
| | | } |
| | | }*/ |
| | | |
| | | |
| | | /** |
| | |
| | | || Objects.isNull(ztContentListRequest.getPageNum()) |
| | | || Objects.isNull(ztContentListRequest.getPageSize()) |
| | | || StringUtils.isBlank(ztContentListRequest.getCatalogCode()) |
| | | // || StringUtils.isBlank(ztContentListRequest.getTagCodes()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | |
| | | ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz, |
| | | Long.valueOf(ztContentListRequest.getUserId()),ztContentListRequest.getUserType()); |
| | | ztContentListRequest.setToken(ztBaseInfoResponse.getToken()); |
| | | String catalogCode = ztContentListRequest.getCatalogCode(); |
| | | ZTBasePageResponse<ZTContentListResponse> response = zbomZhongTaiService.pageContentList(ztContentListRequest); |
| | | |
| | | List<ZTContentListResponse> ztContentListResponseList = new ArrayList<>(); |
| | | |
| | | ZTContentListResponse ztContentListResponse = new ZTContentListResponse(); |
| | | ztContentListResponse.setAuthor("æµè¯äººå"); |
| | | ztContentListResponse.setCoverImage("https://yjszhfn.jiangsu-10.zos.ctyun.cn/news/20240711/16f0490c-3ab1-4b66-aad8-be167476572c.jpg"); |
| | | ztContentListResponse.setFavoriteCount(1998); |
| | | ztContentListResponse.setLikeCount(2223); |
| | | ztContentListResponse.setPublishDepartment("æµè¯ç»ç»"); |
| | | ztContentListResponse.setReadCount(10209); |
| | | ztContentListResponse.setId("1"); |
| | | ztContentListResponse.setTitle("ææ¯æ é¢ä½ 好å"); |
| | | ztContentListResponse.setSubtitle("ææ¯å¯æ é¢ä½ 们好å"); |
| | | if(CollectionUtils.isNotEmpty(response.getRecords())){ |
| | | ztContentListResponseList.add(ztContentListResponse); |
| | | response.setRecords(ztContentListResponseList); |
| | | }else{ |
| | | response.getRecords().add(0, ztContentListResponse); |
| | | } |
| | | return response; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType()); |
| | | ztContentListRequest.setId(id); |
| | | ZTContentInfoResponse response = zbomZhongTaiService.getContentInfo(ztContentListRequest); |
| | | if(Objects.isNull(response)){ |
| | | response = new ZTContentInfoResponse(); |
| | | response.setAuthor("æµè¯äººå"); |
| | | // response.set("https://yjszhfn.jiangsu-10.zos.ctyun.cn/news/20240711/16f0490c-3ab1-4b66-aad8-be167476572c.jpg"); |
| | | // response.setFavoriteCount(1998); |
| | | // response.setLikeCount(2223); |
| | | response.setPublishDepartment("æµè¯ç»ç»"); |
| | | // response.setReadCount(10209); |
| | | response.setTitle("ææ¯æ é¢ä½ 好å"); |
| | | response.setPicUrls("https://yjszhfn.jiangsu-10.zos.ctyun.cn/news/20240711/16f0490c-3ab1-4b66-aad8-be167476572c.jpg"); |
| | | response.setSubtitle("ææ¯å¯æ é¢ä½ 们好å"); |
| | | } |
| | | return response; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | // public ZTBasePageResponse<ZTCollectInfoResponse> viewContent(Long userId,String userType,String articleId) { |
| | | // ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService, memberMapper, usersMapper, systemDictDataBiz, userId, userType); |
| | | // ZTActionDoRequest param = new ZTActionDoRequest(); |
| | | // param.setArticleId(articleId); |
| | | // param.setOpenId(ztBaseInfoResponse.getOpenId()); |
| | | // param.setUserType(userType); |
| | | // param.setToken(ztBaseInfoResponse.getToken()); |
| | | // ZTBaseResponse ztBaseResponse = zbomZhongTaiService.viewDo(param); |
| | | // if (Objects.isNull(ztBaseResponse)) { |
| | | // throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "ä¸å°æ¥å£ååºå¤±è´¥"); |
| | | // } else { |
| | | // if (!ztBaseResponse.getSuccess()) { |
| | | // throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "ä¸å°è¯·æ±ä¿¡æ¯å¼å¸¸ï¼" + ztBaseResponse.getMsg()); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | @Override |
| | | public ZTBasePageResponse<ZTCusFavoritesInfoResponse> getZhongTaiCusFavorite(ZTContentListRequest ztContentListRequest){ |
| | | ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,Long.valueOf(ztContentListRequest.getUserId()),ztContentListRequest.getUserType()); |
| | | ztContentListRequest.setOpenId(ztBaseInfoResponse.getOpenId()); |
| | | ztContentListRequest.setToken(ztBaseInfoResponse.getToken()); |
| | | ZTBasePageResponse ztAreaTreeResponses = zbomZhongTaiService.pageCusFavoriteList(ztContentListRequest); |
| | | return ztAreaTreeResponses; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Async |
| | | public void userLogout(ZTBaseRequst ztBaseRequst){ |
| | | zbomZhongTaiService.userLogout(ztBaseRequst); |
| | | } |
| | | |
| | | @Override |
| | | public List<ZTAreaTreeResponse> getZhongTaiAreaTree(ZTAreaListRequest ztAreaListRequest){ |
| | | String data = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_AREA_REDIS_KEY); |
| | | List<ZTAreaTreeResponse> ztAreaTreeResponses = new ArrayList<>(); |
| | | if(StringUtils.isBlank(data)){ |
| | | ztAreaTreeResponses = zbomZhongTaiService.getAreaTreeList(ztAreaListRequest); |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_AREA_REDIS_KEY,JSONArray.toJSONString(ztAreaTreeResponses)); |
| | | }else{ |
| | | ztAreaTreeResponses = JSONArray.parseArray(data,ZTAreaTreeResponse.class); |
| | | } |
| | | return ztAreaTreeResponses; |
| | | } |
| | | |
| | | @Override |
| | | public ZTBasePageResponse<ZTCusCarouselImageResponse> getZhongTaiCarouselImage(ZTContentListRequest ztContentListRequest){ |
| | | ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,Long.valueOf(ztContentListRequest.getUserId()),ztContentListRequest.getUserType()); |
| | | ztContentListRequest.setOpenId(ztBaseInfoResponse.getOpenId()); |
| | | ztContentListRequest.setToken(ztBaseInfoResponse.getToken()); |
| | | ZTBasePageResponse ztAreaTreeResponses = zbomZhongTaiService.carouselImageList(ztContentListRequest); |
| | | return ztAreaTreeResponses; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public void logOff(Long memberId){ |
| | | public ZTBaseRequst logOff(Long memberId){ |
| | | Member member = memberMapper.selectById(memberId); |
| | | if(Objects.isNull(member)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | |
| | | ztBaseRequst.setUserType(Constants.CUSTOMER); |
| | | ztBaseRequst.setOpenId(member.getOpenid()); |
| | | ztBaseRequst.setToken(member.getToken()); |
| | | Boolean logoutFlag = zbomZhongTaiService.userLogout(ztBaseRequst); |
| | | if(logoutFlag){ |
| | | memberMapper.update(new UpdateWrapper<Member>().lambda() |
| | | .set(Member::getPhone,null) |
| | | .set(Member::getEditDate,new Date()) |
| | | .eq(Member::getId,member.getId()) |
| | | ); |
| | | return; |
| | | } |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸å°æ³¨é失败ï¼è¯·è系管çå"); |
| | | memberMapper.update(new UpdateWrapper<Member>().lambda() |
| | | .set(Member::getPhone,null) |
| | | .set(Member::getEditDate,new Date()) |
| | | .eq(Member::getId,member.getId()) |
| | | ); |
| | | return ztBaseRequst; |
| | | } |
| | | |
| | | |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.ActionsMapper; |
| | | import com.doumee.dao.business.MultifileMapper; |
| | | import com.doumee.dao.business.NewsMapper; |
| | | import com.doumee.dao.business.model.Actions; |
| | | import com.doumee.dao.business.model.BjParam; |
| | | import com.doumee.dao.business.model.Multifile; |
| | | import com.doumee.dao.business.model.News; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.web.response.DailyUpdatesResponse; |
| | | import com.doumee.service.business.NewsService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import javax.swing.*; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * èµè®¯åå®å¶æå¡ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | private MultifileMapper multifileMapper; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Autowired |
| | | private ActionsMapper actionsMapper; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | param.setCreateDate(new Date()); |
| | | param.setEditDate(param.getCreateDate()); |
| | | param.setPublishUserid(param.getCreator()); |
| | | param.setLookNum(Constants.ZERO); |
| | | param.setDonwloadNum(Constants.ZERO); |
| | | param.setFileType(Constants.formatIntegerNum(param.getFileType())); |
| | | newsMapper.insert(param); |
| | | if(param.getFileList()!=null && param.getFileList().size()>0){ |
| | |
| | | if (pageWrap.getModel().getType() != null) { |
| | | queryWrapper.eq(News::getType, pageWrap.getModel().getType()); |
| | | } |
| | | queryWrapper.orderByDesc(News::getCreateDate); |
| | | |
| | | PageData<News> pageData = PageData.from(newsMapper.selectJoinPage(page, News.class,queryWrapper)); |
| | | if(pageData!=null && pageData.getRecords()!=null && pageData.getRecords().size()>0){ |
| | |
| | | QueryWrapper<News> wrapper = new QueryWrapper<>(news); |
| | | return newsMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢å®å¶æå¡å表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<News> getCustomizedNewsList(Integer type,Integer num,Integer fileType){ |
| | | List<News> list = newsMapper.selectList(new QueryWrapper<News>().lambda() |
| | | .eq(News::getIsdeleted,Constants.ZERO) |
| | | .eq(News::getType,type) |
| | | .eq(News::getStatus,Constants.ZERO) |
| | | .eq(Objects.nonNull(fileType),News::getFileType,fileType) |
| | | .last(Objects.nonNull(num),"limit " + num) |
| | | .orderByAsc(News::getSortnum) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(list)){ |
| | | List<Long> idList = list.stream().map(i->i.getId()).collect(Collectors.toList()); |
| | | List<Multifile> files = dealMultifileList(idList); |
| | | for(News model : list){ |
| | | setFilelistById(model,files); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public News getCustomizedNewsDetail(Long id){ |
| | | News news = newsMapper.selectById(id); |
| | | if(Objects.isNull(news)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | List<Long> idList = new ArrayList<>(); |
| | | idList.add(id); |
| | | List<Multifile> files = dealMultifileList(idList); |
| | | setFilelistById(news,files); |
| | | //å¢å æµè§é |
| | | newsMapper.update(new UpdateWrapper<News>().lambda() |
| | | .setSql( " LOOK_NUM = ( LOOK_NUM + 1 ) ").eq(News::getId,id)); |
| | | return news; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¯æ¥ä¸æ° |
| | | * @return |
| | | */ |
| | | @Override |
| | | public DailyUpdatesResponse getDailyUpdatesResponse(Integer fileType){ |
| | | DailyUpdatesResponse dailyUpdatesResponse = new DailyUpdatesResponse(); |
| | | dailyUpdatesResponse.setDailyUpdateNum( |
| | | newsMapper.selectCount(new QueryWrapper<News>().lambda() |
| | | .eq(News::getIsdeleted,Constants.ZERO) |
| | | .like(News::getCreateDate, DateUtil.getDateLong(new Date())) |
| | | .eq(News::getType,Constants.ONE) |
| | | )); |
| | | dailyUpdatesResponse.setShareNum( |
| | | actionsMapper.selectCount(new QueryWrapper<Actions>()) |
| | | ); |
| | | dailyUpdatesResponse.setNewsList( |
| | | this.getCustomizedNewsList(Constants.ZERO,Constants.THREE,fileType) |
| | | ); |
| | | return dailyUpdatesResponse; |
| | | } |
| | | |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | @Override |
| | | public void saveShareRecord(Long id,Long userId){ |
| | | News news = newsMapper.selectById(id); |
| | | if(Objects.isNull(news)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | Actions actions = new Actions(); |
| | | actions.setCreateDate(new Date()); |
| | | actions.setIsDeleted(Constants.ZERO); |
| | | actions.setType(Constants.ZERO); |
| | | actions.setObjId(id); |
| | | actions.setObjType(Constants.ZERO); |
| | | actions.setMemberId(userId); |
| | | actions.setTitle(news.getTitle()); |
| | | actions.setContent(news.getContent()); |
| | | actions.setSubTitle(news.getSubTitle()); |
| | | actionsMapper.insert(actions); |
| | | //å¢å å享é |
| | | newsMapper.update(new UpdateWrapper<News>().lambda() |
| | | .setSql( " DONWLOAD_NUM = ( DONWLOAD_NUM + 1 ) ").eq(News::getId,id)); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å½åè´¦æ·å·²åç¨ï¼è¯·è系管çå"); |
| | | } |
| | | //éªè¯çä¿¡ |
| | | SmsEmail model = smsEmailMapper.selectOne(new QueryWrapper<SmsEmail>().lambda() |
| | | .eq(SmsEmail::getType, Constants.ZERO) |
| | | .eq(SmsEmail::getPhone, phone) |
| | | .eq(SmsEmail::getRemark, code) |
| | | .eq(SmsEmail::getIsdeleted, Constants.ZERO) |
| | | ); |
| | | if(model == null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼éªè¯ç 䏿£ç¡®ï¼è¯·éæ°åéåè¯ï¼"); |
| | | } |
| | | if(!Constants.equalsInteger(model.getStatus(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼éªè¯ç 已失æï¼è¯·éæ°åéåè¯ï¼"); |
| | | } |
| | | model.setStatus(Constants.ONE); |
| | | model.setEditDate(new Date()); |
| | | if(model.getCreateDate() !=null && |
| | | System.currentTimeMillis() - model.getCreateDate().getTime() > 3*60*1000){ |
| | | smsEmailMapper.updateById(model); |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼éªè¯ç 已失æï¼è¯·éæ°åéåè¯~"); |
| | | } |
| | | smsEmailMapper.updateById(model); |
| | | // SmsEmail model = smsEmailMapper.selectOne(new QueryWrapper<SmsEmail>().lambda() |
| | | // .eq(SmsEmail::getType, Constants.ZERO) |
| | | // .eq(SmsEmail::getPhone, phone) |
| | | // .eq(SmsEmail::getRemark, code) |
| | | // .eq(SmsEmail::getIsdeleted, Constants.ZERO) |
| | | // ); |
| | | // if(model == null){ |
| | | // throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼éªè¯ç 䏿£ç¡®ï¼è¯·éæ°åéåè¯ï¼"); |
| | | // } |
| | | // if(!Constants.equalsInteger(model.getStatus(),Constants.ZERO)){ |
| | | // throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼éªè¯ç 已失æï¼è¯·éæ°åéåè¯ï¼"); |
| | | // } |
| | | // model.setStatus(Constants.ONE); |
| | | // model.setEditDate(new Date()); |
| | | // if(model.getCreateDate() !=null && |
| | | // System.currentTimeMillis() - model.getCreateDate().getTime() > 3*60*1000){ |
| | | // smsEmailMapper.updateById(model); |
| | | // throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼éªè¯ç 已失æï¼è¯·éæ°åéåè¯~"); |
| | | // } |
| | | // smsEmailMapper.updateById(model); |
| | | //å建token |
| | | JwtPayLoad payLoad = new JwtPayLoad(users.getId(),Constants.ONE); |
| | | String token = JwtTokenUtil.generateToken(payLoad); |
| | |
| | | @Autowired |
| | | private ZbomZhongTaiService zbomZhongTaiService; |
| | | |
| | | @Autowired |
| | | private GetZhongTaiDataService getZhongTaiDataService; |
| | | |
| | | @ApiOperation(value = "è·ååºåä¿¡æ¯", notes = "客æ·ç«¯å°ç¨åº") |
| | | @PostMapping("/getArea") |
| | | public ApiResponse<List<ZTAreaInfoResponse>> getArea(@RequestBody ZTAreaListRequest ztAreaListRequest) { |
| | |
| | | if(StringUtils.isBlank(ztAreaListRequest.getPid())){ |
| | | ztAreaListRequest.setPid("1"); |
| | | } |
| | | List<ZTAreaTreeResponse> ztAreaInfoResponses = zbomZhongTaiService.getAreaTreeList(ztAreaListRequest); |
| | | if(StringUtils.isBlank(ztAreaListRequest.getLevel())){ |
| | | ztAreaListRequest.setLevel("5"); |
| | | } |
| | | List<ZTAreaTreeResponse> ztAreaInfoResponses = getZhongTaiDataService.getZhongTaiAreaTree(ztAreaListRequest); |
| | | return ApiResponse.success(ztAreaInfoResponses); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.CustomerLog; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Shop; |
| | | import com.doumee.dao.business.model.Users; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.web.reqeust.*; |
| | | import com.doumee.dao.web.response.AccountResponse; |
| | | import com.doumee.dao.web.response.BjParamConfigResponse; |
| | |
| | | import javax.imageio.ImageIO; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.beans.Customizer; |
| | | import java.io.InputStream; |
| | | import java.util.List; |
| | | |
| | |
| | | @RequestMapping("/web/customer") |
| | | @Slf4j |
| | | public class CustomerApi extends ApiController{ |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private MemberService memberService; |
| | |
| | | |
| | | @Autowired |
| | | private CustomerUserService customerUserService; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private CustomerLogService customerLogService; |
| | | |
| | | @Autowired |
| | | private NewsService newsService; |
| | | |
| | | @Autowired |
| | | private ActionsService actionsService; |
| | | |
| | | @ApiOperation(value = "客æ·ç«¯å°ç¨åºç»é", notes = "客æ·ç«¯å°ç¨åº") |
| | | @GetMapping("/wxLoginCustomer") |
| | |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | @LoginRequired |
| | | /* @LoginRequired |
| | | @ApiOperation(value = "æµè¯è£
ä¿®é£æ ¼", notes = "客æ·ç«¯å°ç¨åº") |
| | | @PostMapping("/saveTestTrimStyle") |
| | | @ApiImplicitParams({ |
| | |
| | | public ApiResponse saveTestTrimStyle(@RequestBody TestTrimStyleDTO testTrimStyleDTO) { |
| | | testTrimStyleDTO.setMemberId(getMemberId()); |
| | | CustomerLog customerLog = customerService.saveTestTrimStyle(testTrimStyleDTO); |
| | | // zbomCRMService.dealCustomerLogData(customerLog); |
| | | zbomCRMService.dealCustomerLogData(customerLog); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | }*/ |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "ç¨æ·æ³¨é", notes = "客æ·ç«¯å°ç¨åº") |
| | | @GetMapping("/logOff") |
| | | public ApiResponse logOff() { |
| | | memberService.logOff(getMemberId()); |
| | | getZhongTaiDataService.userLogout(memberService.logOff(getMemberId())); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "æçé¢çº¦å页æ¥è¯¢",notes = "客æ·ç«¯å°ç¨åº") |
| | | @ApiOperation(value = "æçé¢çº¦ å页æ¥è¯¢",notes = "客æ·ç«¯å°ç¨åº") |
| | | @PostMapping("/customerLogPage") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | |
| | | } |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "å®å¶æå¡å表", notes = "客æ·ç«¯å°ç¨åº") |
| | | @GetMapping("/getCustomizedNewsList") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<List<News>> getCustomizedNewsList() { |
| | | return ApiResponse.success("æ¥è¯¢æå",newsService.getCustomizedNewsList(Constants.ONE,null,null)); |
| | | } |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "å®å¶æå¡è¯¦æ
", notes = "客æ·ç«¯å°ç¨åº") |
| | | @GetMapping("/getCustomizedNewsDetail") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Long", name = "id", value = "ä¸å¡æ°æ®ä¸»é®", required = true), |
| | | }) |
| | | public ApiResponse<News> getCustomizedNewsDetail(@RequestParam Long id) { |
| | | return ApiResponse.success("æ¥è¯¢æå",newsService.getCustomizedNewsDetail(id)); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "ä¿åæ¨å¹¿å¨è¯¢å享记å½", notes = "客æ·ç«¯å°ç¨åº") |
| | | @GetMapping("/saveShareRecord") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Long", name = "id", value = "æ¨å¹¿å¨è¯¢ä¸»é®", required = true), |
| | | }) |
| | | public ApiResponse saveShareRecord(@RequestParam Long id) { |
| | | newsService.saveShareRecord(id,getMemberId()); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "æç忬¢å表", notes = "客æ·ç«¯å°ç¨åº") |
| | | @PostMapping("/getZhongTaiCusFavorite") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<ZTBasePageResponse<ZTCusFavoritesInfoResponse>> getZhongTaiCusFavorite(@RequestBody ZTContentListRequest ztContentListRequest) { |
| | | ztContentListRequest.setUserId(getMemberId()+""); |
| | | ztContentListRequest.setUserType(Constants.CUSTOMER); |
| | | ZTBasePageResponse<ZTCusFavoritesInfoResponse> ztBasePageResponse = getZhongTaiDataService.getZhongTaiCusFavorite(ztContentListRequest); |
| | | return ApiResponse.success("è·åæå",ztBasePageResponse); |
| | | } |
| | | |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "è½®æå¾å表", notes = "客æ·ç«¯å°ç¨åº") |
| | | @PostMapping("/getZhongTaiCarouselImage") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<ZTBasePageResponse<ZTCusCarouselImageResponse>> getZhongTaiCarouselImage(@RequestBody ZTContentListRequest ztContentListRequest) { |
| | | ztContentListRequest.setUserId(getMemberId()+""); |
| | | ztContentListRequest.setUserType(Constants.CUSTOMER); |
| | | ZTBasePageResponse<ZTCusCarouselImageResponse> ztBasePageResponse = getZhongTaiDataService.getZhongTaiCarouselImage(ztContentListRequest); |
| | | return ApiResponse.success("è·åæå",ztBasePageResponse); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.doumee.biz.zbom.ZbomZhongTaiService; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.News; |
| | | import com.doumee.dao.web.response.DailyUpdatesResponse; |
| | | import com.doumee.dao.web.response.ZSZXCatalogResponse; |
| | | import com.doumee.service.business.NewsService; |
| | | import com.doumee.service.business.SmsEmailService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @Autowired |
| | | public ZbomCRMService zbomCRMService; |
| | | |
| | | @Autowired |
| | | public NewsService newsService; |
| | | |
| | | |
| | | @ApiOperation(value = "ãC端å°ç¨åºãè·åé¦é¡µå¿è¯´è£
ä¿®å个模åç±»ç®æ°æ®", notes = "è·åé¦é¡µå¿è¯´è£
ä¿®å个模åç±»ç®æ°æ®ï¼èæ¯å¾ææ¶åæ»ï¼åèUI") |
| | | @PostMapping("/getZSZXCatalogs") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<ZSZXCatalogResponse> getZSZXCatalogs() { |
| | | return ApiResponse.success(zbomZhongTaiService.getZSZXCatalogs()); |
| | | } |
| | | @ApiOperation(value = "ã端å°ç¨åºãè·å客æ·ç®¡çææ-å表跳转å°å", notes = "è·å客æ·ç®¡çææè·³è½¬å°å") |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "ãB端å°ç¨åºãæ¯æ¥ä¸æ°æ°æ®") |
| | | @GetMapping("/getDailyUpdates") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "fileType", value = "éä»¶ç±»å 0å¾ç 1è§é¢", required = false) |
| | | }) |
| | | public ApiResponse<DailyUpdatesResponse> getDailyUpdates(Integer fileType) { |
| | | return ApiResponse.success(newsService.getDailyUpdatesResponse(fileType)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("ãB端å°ç¨åºã æ¨å¹¿å¨è¯¢å页") |
| | | @PostMapping("/newsPage") |
| | | public ApiResponse<PageData<News>> newsPage (@RequestBody PageWrap<News> pageWrap) { |
| | | return ApiResponse.success(newsService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "è·å客æ·ç®¡çææ-å表跳转å°å", notes = "è·å客æ·ç®¡çææè·³è½¬å°å") |
| | | @GetMapping("/getCrmAuthUrl") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "ç±»å 0客æ·å表 1跳转æ°å¢æå客æ·", required = true) |
| | | }) |
| | | public ApiResponse<String> getCrmAuthUrl(@RequestParam Integer type) { |
| | |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "微信code", required = true), |
| | | }) |
| | | public ApiResponse bindingOpenid(@RequestParam String code) { |
| | | usersService.bindingOpenid(code,getMemberId()); |
| | | usersService.bindingOpenid(code,getUserId()); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse getUserDetail() { |
| | | usersService.usersDetailById(getMemberId()); |
| | | usersService.usersDetailById(getUserId()); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse editUsers(@RequestBody EditUsersRequest editUsersRequest) { |
| | | editUsersRequest.setUserId(getMemberId()); |
| | | editUsersRequest.setUserId(getUserId()); |
| | | usersService.editUserInfo(editUsersRequest); |
| | | return ApiResponse.success("æ´æ°æå"); |
| | | } |
| | |
| | | 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 = "客æ·ç«¯å°ç¨åº") |
| | |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "å
容主é®", required = true), |
| | | }) |
| | | public ApiResponse<ZTContentInfoResponse> getContentInfo(@RequestParam String id) { |
| | | ZTContentInfoResponse ztContentInfoResponse= getZhongTaiDataService.getContentInfo(id,Constants.BUSINESS,getMemberId()); |
| | | ZTContentInfoResponse ztContentInfoResponse= getZhongTaiDataService.getContentInfo(id,Constants.BUSINESS,getUserId()); |
| | | return ApiResponse.success("æ¥è¯¢æå",ztContentInfoResponse); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "å
容主é®", required = true), |
| | | }) |
| | | public ApiResponse collectContent(@RequestParam String id) { |
| | | getZhongTaiDataService.collectContent(getMemberId(),Constants.BUSINESS,id); |
| | | getZhongTaiDataService.collectContent(getUserId(),Constants.BUSINESS,id); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "å
容主é®", required = true), |
| | | }) |
| | | public ApiResponse likeContent(@RequestParam String id) { |
| | | getZhongTaiDataService.likeContent(getMemberId(),Constants.BUSINESS,id); |
| | | getZhongTaiDataService.likeContent(getUserId(),Constants.BUSINESS,id); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "å
容主é®", required = true), |
| | | }) |
| | | public ApiResponse shareContent(@RequestParam String id) { |
| | | getZhongTaiDataService.shareContent(getMemberId(),Constants.BUSINESS,id); |
| | | getZhongTaiDataService.shareContent(getUserId(),Constants.BUSINESS,id); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "å
容主é®", required = true), |
| | | }) |
| | | public ApiResponse viewContent(@RequestParam String id) { |
| | | getZhongTaiDataService.viewContent(getMemberId(),Constants.BUSINESS,id); |
| | | getZhongTaiDataService.viewContent(getUserId(),Constants.BUSINESS,id); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | } |