| | |
| | | package com.doumee.api.web; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.biz.zbom.ZbomCRMService; |
| | | import com.doumee.config.annotation.LoginRequired; |
| | | 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.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 org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.InputStream; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | |
| | | public ApiResponse saveRenovationCalculator(@RequestBody RenovationCalculatorDTO renovationCalculatorDTO) { |
| | | renovationCalculatorDTO.setMemberId(getMemberId()); |
| | | CustomerLog customerLog =customerService.saveRenovationCalculator(renovationCalculatorDTO); |
| | | zbomCRMService.dealCustomerLogData(customerLog); |
| | | // zbomCRMService.dealCustomerLogData(customerLog); |
| | | return ApiResponse.success("操作成功"); |
| | | } |
| | | |
| | |
| | | public ApiResponse saveFreeCustomizationApply(@RequestBody FreeCustomizationDTO freeCustomizationDTO) { |
| | | freeCustomizationDTO.setMemberId(getMemberId()); |
| | | CustomerLog customerLog = customerService.saveFreeCustomizationApply(freeCustomizationDTO); |
| | | zbomCRMService.dealCustomerLogData(customerLog); |
| | | // zbomCRMService.dealCustomerLogData(customerLog); |
| | | return ApiResponse.success("操作成功"); |
| | | } |
| | | |
| | |
| | | public ApiResponse saveTestTrimStyle(@RequestBody TestTrimStyleDTO testTrimStyleDTO) { |
| | | testTrimStyleDTO.setMemberId(getMemberId()); |
| | | CustomerLog customerLog = customerService.saveTestTrimStyle(testTrimStyleDTO); |
| | | zbomCRMService.dealCustomerLogData(customerLog); |
| | | // zbomCRMService.dealCustomerLogData(customerLog); |
| | | return ApiResponse.success("操作成功"); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "获取分享小程序二维码(图片流,img标签src指定)", notes = "客户端小程序") |
| | | @GetMapping("/generateImg") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public void generateImg(HttpServletResponse response) { |
| | | try{ |
| | | response.setHeader("Cache-Control", "no-store, no-cache"); |
| | | response.setContentType("image/jpeg"); |
| | | InputStream inputStream = Constants.generateWxMiniImgStream( |
| | | systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG,Constants.WX_TOKEN_CUSTOMER).getCode(),"123","" |
| | | ); |
| | | ImageIO.write(ImageIO.read(inputStream),"png",response.getOutputStream()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |