From b2d360d9113b6955287108ca9e90d76a1f3c1419 Mon Sep 17 00:00:00 2001 From: liukangdong <898885815@qq.com> Date: 星期日, 29 九月 2024 15:05:11 +0800 Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia --- server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java | 98 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 93 insertions(+), 5 deletions(-) diff --git a/server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java b/server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java index 1e284a3..4b2d588 100644 --- a/server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java +++ b/server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java @@ -1,17 +1,48 @@ 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.LoginUserInfo; +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.business.model.Users; +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.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +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. @@ -32,11 +63,68 @@ @Autowired public SmsEmailService smsEmailService; + @Autowired + public ZbomCRMService zbomCRMService; - @ApiOperation(value = "C绔皬绋嬪簭-鑾峰彇棣栭〉蹇楄瑁呬慨鍥涗釜妯″潡绫荤洰鏁版嵁", notes = "鑾峰彇棣栭〉蹇楄瑁呬慨鍥涗釜妯″潡绫荤洰鏁版嵁") + @Autowired + public NewsService newsService; + + @Autowired + public GetZhongTaiDataService getZhongTaiDataService; + + @Autowired + public UsersService usersService; + + @Autowired + public SystemDictDataBiz systemDictDataBiz; + + + @UserLoginRequired + @LoginRequired + @ApiOperation(value = "銆怌绔皬绋嬪簭銆戣幏鍙栭椤靛織璇磋淇洓涓ā鍧楃被鐩暟鎹�", notes = "鑾峰彇棣栭〉蹇楄瑁呬慨鍥涗釜妯″潡绫荤洰鏁版嵁锛岃儗鏅浘鏆傛椂鍐欐锛屽弬鑰僓I") @PostMapping("/getZSZXCatalogs") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true) + }) public ApiResponse<ZSZXCatalogResponse> getZSZXCatalogs() { - return ApiResponse.success(zbomZhongTaiService.getZSZXCatalogs()); + return ApiResponse.success(getZhongTaiDataService.getZSZXCatalogs(getMemberId(),getUserType())); } + + @UserLoginRequired + @ApiOperation(value = "銆怋绔皬绋嬪簭銆戞瘡鏃ヤ笂鏂版暟鎹�") + @GetMapping("/getDailyUpdates") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true) + }) + public ApiResponse<DailyUpdatesResponse> getDailyUpdates() { + return ApiResponse.success(newsService.getDailyUpdatesResponse()); + } + + + @UserLoginRequired + @ApiOperation("銆怋绔皬绋嬪簭銆� 鎺ㄥ箍鍜ㄨ鍒嗛〉") + @PostMapping("/newsPage") + @ApiImplicitParams({ + @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 = "鑾峰彇瀹㈡埛绠$悊鎺堟潈璺宠浆鍦板潃") + @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) { + Users users = this.getLoginUserInfo(); + return ApiResponse.success(zbomCRMService.getCrmGoUrl(users.getIamUsername(),type,users.getIamId())); + } + + } -- Gitblit v1.9.3