|  |  |  | 
|---|
|  |  |  | package com.doumee.api.web; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import cn.hutool.http.HttpRequest; | 
|---|
|  |  |  | import com.amazonaws.util.Md5Utils; | 
|---|
|  |  |  | import com.doumee.biz.system.SystemDataPermissionBiz; | 
|---|
|  |  |  | import com.doumee.biz.system.SystemDictDataBiz; | 
|---|
|  |  |  | import com.doumee.biz.zbom.ZbomCRMService; | 
|---|
|  |  |  | import com.doumee.biz.zbom.ZbomZhongTaiService; | 
|---|
|  |  |  | import com.doumee.config.annotation.LoginRequired; | 
|---|
|  |  |  | import com.doumee.config.annotation.UserLoginRequired; | 
|---|
|  |  |  | import com.doumee.core.annotation.pr.PreventRepeat; | 
|---|
|  |  |  | import com.doumee.core.annotation.trace.Trace; | 
|---|
|  |  |  | import com.doumee.core.constants.ResponseStatus; | 
|---|
|  |  |  | import com.doumee.core.exception.BusinessException; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.business.model.News; | 
|---|
|  |  |  | import com.doumee.dao.web.reqeust.GenerateQRCodeRequest; | 
|---|
|  |  |  | import com.doumee.dao.web.response.DailyUpdatesResponse; | 
|---|
|  |  |  | import com.doumee.dao.web.response.ZSZXCatalogResponse; | 
|---|
|  |  |  | import com.doumee.service.business.GetZhongTaiDataService; | 
|---|
|  |  |  | import com.doumee.service.business.NewsService; | 
|---|
|  |  |  | import com.doumee.service.business.SmsEmailService; | 
|---|
|  |  |  | import com.doumee.service.business.UsersService; | 
|---|
|  |  |  | 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.commons.codec.digest.DigestUtils; | 
|---|
|  |  |  | import org.apache.commons.codec.digest.Md5Crypt; | 
|---|
|  |  |  | import org.apache.commons.lang3.StringUtils; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.apache.tomcat.util.security.MD5Encoder; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.imageio.ImageIO; | 
|---|
|  |  |  | import javax.servlet.http.HttpServletRequest; | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | import java.io.InputStream; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * Created by IntelliJ IDEA. | 
|---|
|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | public GetZhongTaiDataService getZhongTaiDataService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | public UsersService usersService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | public SystemDictDataBiz systemDictDataBiz; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @UserLoginRequired | 
|---|
|  |  |  | @LoginRequired | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @UserLoginRequired | 
|---|
|  |  |  | @ApiOperation(value = "【B端小程序】每日上新数据") | 
|---|
|  |  |  | @GetMapping("/getDailyUpdates") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "fileType", value = "附件类型 0图片 1视频", required = false) | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse<DailyUpdatesResponse> getDailyUpdates(Integer fileType) { | 
|---|
|  |  |  | return  ApiResponse.success(newsService.getDailyUpdatesResponse(fileType)); | 
|---|
|  |  |  | public ApiResponse<DailyUpdatesResponse> getDailyUpdates() { | 
|---|
|  |  |  | return  ApiResponse.success(newsService.getDailyUpdatesResponse()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse<PageData<News>> newsPage (@RequestBody PageWrap<News> pageWrap) { | 
|---|
|  |  |  | pageWrap.getModel().setIsPublish(Constants.ONE); | 
|---|
|  |  |  | pageWrap.getModel().setStatus(Constants.ZERO); | 
|---|
|  |  |  | return ApiResponse.success(newsService.findPage(pageWrap)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @UserLoginRequired | 
|---|
|  |  |  | @ApiOperation(value = "获取客户管理授权-列表跳转地址", notes = "获取客户管理授权跳转地址") | 
|---|
|  |  |  | 
|---|
|  |  |  | public ApiResponse<String> getCrmAuthUrl(@RequestParam Integer type) { | 
|---|
|  |  |  | return  ApiResponse.success(zbomCRMService.getCrmGoUrl(this.getLoginUserInfo().getIamUsername(),type)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|