| | |
| | | |
| | | 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; |
| | | |
| | | @Autowired |
| | | private UsersService usersService; |
| | | @Autowired |
| | | private ZbomCRMService zbomCRMService; |
| | | |
| | | @Autowired |
| | | private CustomerUserService customerUserService; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private CustomerLogService customerLogService; |
| | | |
| | | @ApiOperation(value = "客户端小程序登陆", notes = "客户端小程序") |
| | | @GetMapping("/wxLoginCustomer") |
| | |
| | | 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("操作成功"); |
| | | } |
| | | |
| | |
| | | |
| | | @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("/pageContentList") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse<ZTBasePageResponse<ZTContentListResponse>> pageContentList(@RequestBody ZTContentListRequest ztContentListRequest) { |
| | | ztContentListRequest.setUserId(getMemberId()+""); |
| | | ztContentListRequest.setUserType(Constants.CUSTOMER); |
| | | 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("操作成功"); |
| | | } |
| | | |
| | | |
| | | } |