From adf7566f482080d9fff9dd4429f308433a0e2c2f Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期五, 07 一月 2022 16:20:22 +0800 Subject: [PATCH] 商业街代码提交 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MicroCommercialStreetApi.java | 81 ++++++++++++++++++++++++++++++---------- 1 files changed, 61 insertions(+), 20 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MicroCommercialStreetApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MicroCommercialStreetApi.java index 9b69c11..90b2cc1 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MicroCommercialStreetApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MicroCommercialStreetApi.java @@ -1,10 +1,23 @@ package com.panzhihua.service_community.api; +import java.util.List; + import javax.annotation.Resource; + +import com.panzhihua.common.model.dtos.community.microCommercialStreet.LoginWithPhoneDTO; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; import com.panzhihua.common.model.dtos.community.microCommercialStreet.DisableOrEnableMcsMerchantDTO; import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsGameDTO; import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsInfoDTO; +import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO; import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsProductDTO; import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsEvaluateDTO; import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsGameDTO; @@ -15,33 +28,15 @@ import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForGameDTO; import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForInfoDTO; import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForProductDTO; +import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.microCommercialStreet.McsConfigVO; import com.panzhihua.service_community.service.McsConfigService; import com.panzhihua.service_community.service.McsEvaluateService; import com.panzhihua.service_community.service.McsGameService; import com.panzhihua.service_community.service.McsInformationService; +import com.panzhihua.service_community.service.McsLabelService; import com.panzhihua.service_community.service.McsMerchantService; import com.panzhihua.service_community.service.McsProductService; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import com.panzhihua.common.controller.BaseController; -import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO; -import com.panzhihua.common.model.vos.R; -import com.panzhihua.common.service.community.CommunityService; -import com.panzhihua.common.validated.AddGroup; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; - -import java.util.List; /** * @title: MicroCommercialStreetApi @@ -66,6 +61,8 @@ private McsEvaluateService mcsEvaluateService; @Resource private McsProductService mcsProductService; + @Resource + private McsLabelService mcsLabelService; /** * 新增数字商业街商家 @@ -391,4 +388,48 @@ public R pageMcsProduct(@RequestBody PageMcsProductDTO pageMcsProductDTO) { return mcsProductService.pageMcsProduct(pageMcsProductDTO); } + + /** + * 获取产品标签列表 + * @param userId + * @return + */ + @GetMapping("/label/list") + public R getMcsLabelList(@RequestParam("userId") Long userId) { + return mcsLabelService.getMcsLabelList(userId); + } + + /** + * 根据account查询微商业街商家信息 + * @param account + * @return + */ + @GetMapping("/getMcsMerchantByAccount") + public R getMcsMerchantByAccount(@RequestParam("account") String account) { + return mcsMerchantService.getMcsMerchantByAccount(account); + } + + /** + * 完成订单更新/新增商家信息 + * @param merchantName + * @param configId + * @param userId + * @return + */ + @GetMapping("/updateAfterOrder") + public R updateMcsMerchantAfterOrder(@RequestParam(value = "merchantName", required = false) String merchantName, + @RequestParam("configId") Long configId, + @RequestParam("userId") Long userId) { + return mcsMerchantService.updateOrAddMcsMerchantAfterOrder(merchantName, configId, userId); + } + + /** + * 验证码登录 + * @param loginDTO + * @return + */ + @PostMapping("/loginWithPhone") + public R loginWithPhone(@RequestBody LoginWithPhoneDTO loginDTO) { + return mcsMerchantService.loginWithPhone(loginDTO); + } } -- Gitblit v1.7.1