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); } /**