From 15def95223ea91b343cca1de349cefe3e552ccf2 Mon Sep 17 00:00:00 2001 From: Jack <46790855@qq.com> Date: Thu, 6 Mar 2025 09:10:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=95=86=E5=AE=B6=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E5=85=A5=E9=A9=BB=E7=94=B3=E8=AF=B7=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E6=9F=A5=E8=AF=A2=E5=AE=A1=E6=A0=B8=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/EsignPlatformInfoServiceImpl.java | 4 +- .../mobile/ShopMerchEntryController.java | 39 ++++++- .../store/service/ShopMerchEntryService.java | 12 +- .../impl/ShopMerchEntryServiceImpl.java | 105 +++++++++++++++--- 4 files changed, 137 insertions(+), 23 deletions(-) diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/esign/service/impl/EsignPlatformInfoServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/esign/service/impl/EsignPlatformInfoServiceImpl.java index ed8be048..77a53159 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/esign/service/impl/EsignPlatformInfoServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/esign/service/impl/EsignPlatformInfoServiceImpl.java @@ -58,7 +58,7 @@ public class EsignPlatformInfoServiceImpl extends BaseServiceImpl getEsignPlatformMobileAndLicenseNumber() { QueryWrapper queryWrapper = new QueryWrapper(); - queryWrapper.eq("type", 0).select("mobile", "license_number", "legal_person_mobile"); + queryWrapper.eq("type", 0).select("telephone", "license_number", "legal_person_mobile"); List esignPlatformInfos = list(queryWrapper); if (CollectionUtil.isEmpty(esignPlatformInfos)) { return null; @@ -69,7 +69,7 @@ public class EsignPlatformInfoServiceImpl extends BaseServiceImpl result = new HashMap<>(); + if (record == null || record.getApproval_status() == null) { + result.put("id", 0L); + result.put("approval_status", 4); + result.put("approval_remark", ""); + result.put("approval_invalid_col", "[]"); + } else { + result.put("id", record.getId()); + result.put("approval_status", record.getApproval_status()); + result.put("approval_remark", record.getApproval_remark()); + result.put("approval_invalid_col", record.getApproval_invalid_col()); + } + + return CommonResult.success(result); + } + + @ApiOperation(value = "商家重新申请入驻商城平台", notes = "商家申请入驻材料被驳回的时候,修正材料,重新申请入驻") + @RequestMapping(value = "/re-apply", method = RequestMethod.POST) + public CommonResult shopMerchEntryReApply(@RequestBody JSONObject shopMerchEntryJSON) { + return shopMerchEntryService.shopMerchEntryReApply(shopMerchEntryJSON); } } diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/ShopMerchEntryService.java b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/ShopMerchEntryService.java index f1adbc10..29b8320a 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/ShopMerchEntryService.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/ShopMerchEntryService.java @@ -24,13 +24,21 @@ public interface ShopMerchEntryService { CommonResult storeBusinessCategoryList(); /** - * 商品入驻申请 + * 商家(第一次)申请入驻商城平台 * * @param shopMerchEntryJSON * @return */ CommonResult shopMerchEntryApply(JSONObject shopMerchEntryJSON); + /** + * 商家重新申请入驻商城平台 + * + * @param shopMerchEntryJSON + * @return + */ + CommonResult shopMerchEntryReApply(JSONObject shopMerchEntryJSON); + /** * 商家入驻申请列表 * @@ -79,7 +87,7 @@ public interface ShopMerchEntryService { * @param loginMobile * @return */ - Integer shopMerchEntryApprovalStatus(String loginMobile); + ShopMerchEntry shopMerchEntryApprovalInfo(String loginMobile); /** * 根据商家手机号、营业执照、审批状态获取有效的商家入驻申请记录 diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopMerchEntryServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopMerchEntryServiceImpl.java index 1fa4b87d..2d02f964 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopMerchEntryServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopMerchEntryServiceImpl.java @@ -33,6 +33,7 @@ import org.springframework.data.util.Pair; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -76,7 +77,7 @@ public class ShopMerchEntryServiceImpl extends BaseServiceImpl mobileAndLicenseNumber = esignPlatformInfoService.getEsignPlatformMobileAndLicenseNumber(); + if (mobileAndLicenseNumber != null) { + Map tmplArgs = new HashMap<>(1); + tmplArgs.put("name", "重新修正再"); // 商家公司名称 + // 所有店铺管理员的发送邮件, 提醒商家:您有一笔新的订单 ${order_id},请及时处理。 + shopMessageTemplateService.aliyunSmsSend(mobileAndLicenseNumber.getFirst(), "SMS_479760276", tmplArgs); + } + + return CommonResult.success(); + } + /** * 商家入驻申请列表 * @@ -343,27 +412,29 @@ public class ShopMerchEntryServiceImpl extends BaseServiceImpl queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("login_mobile", loginMobile).orderByAsc("id"); + queryWrapper.eq("login_mobile", loginMobile) + .select("id", "approval_status", "approval_remark", "approval_invalid_col") + .orderByAsc("id"); List recordList = list(queryWrapper); if (CollectionUtil.isEmpty(recordList)) { - return 4; + return null; } - return recordList.get(0).getApproval_status(); + return recordList.get(0); } /**