From 4a5252a6d81d5139fa278d1458fc0bd513909289 Mon Sep 17 00:00:00 2001 From: Jack <46790855@qq.com> Date: Tue, 25 Mar 2025 23:15:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=B3=A8=E5=86=8C=E9=89=B4?= =?UTF-8?q?=E6=9D=83=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/AccountUserBaseController.java | 4 ++-- .../impl/AccountUserBaseServiceImpl.java | 12 ++++-------- .../common/modules/merch/ShopMerchEntry.java | 3 +++ .../service/impl/EsignContractServiceImpl.java | 4 +++- .../store/service/ShopMerchEntryService.java | 9 +++++++++ .../impl/ShopMerchEntryServiceImpl.java | 18 ++++++++++++++++++ .../service/impl/ShopStoreBaseServiceImpl.java | 1 + 7 files changed, 40 insertions(+), 11 deletions(-) diff --git a/mall-account/src/main/java/com/suisung/mall/account/controller/admin/AccountUserBaseController.java b/mall-account/src/main/java/com/suisung/mall/account/controller/admin/AccountUserBaseController.java index 9188513f..d0746aad 100644 --- a/mall-account/src/main/java/com/suisung/mall/account/controller/admin/AccountUserBaseController.java +++ b/mall-account/src/main/java/com/suisung/mall/account/controller/admin/AccountUserBaseController.java @@ -128,13 +128,13 @@ public class AccountUserBaseController extends BaseControllerImpl { return accountUserBaseService.loadUserByUsername(user_account); } - @ApiOperation(value = "登录以后返回token") // app 和 pc 的 登录最好分开,这样容易区分从哪个端进来,方便处理逻辑(验证码) + @ApiOperation(value = "后台管理员和商家登录,登录后返回token") // app 和 pc 的 登录最好分开,这样容易区分从哪个端进来,方便处理逻辑(验证码) @RequestMapping(value = "/doLogin", method = RequestMethod.POST) public CommonResult doLogin(@RequestParam(name = "user_account", required = false) String user_account, @RequestParam(name = "user_password", required = false) String user_password, @RequestParam(name = "verify_code") String verificationCode, @RequestParam(name = "verify_token") String verify_token) { - if (StrUtil.isEmpty(user_account) || StrUtil.isEmpty(user_password)) { + if (StrUtil.isBlank(user_account) || StrUtil.isBlank(user_password)) { return CommonResult.failed(I18nUtil._("用户名或密码不能为空!")); } Map params = new HashMap<>(); diff --git a/mall-account/src/main/java/com/suisung/mall/account/service/impl/AccountUserBaseServiceImpl.java b/mall-account/src/main/java/com/suisung/mall/account/service/impl/AccountUserBaseServiceImpl.java index b6274fa7..4abdb75e 100644 --- a/mall-account/src/main/java/com/suisung/mall/account/service/impl/AccountUserBaseServiceImpl.java +++ b/mall-account/src/main/java/com/suisung/mall/account/service/impl/AccountUserBaseServiceImpl.java @@ -2786,6 +2786,7 @@ public class AccountUserBaseServiceImpl extends BaseServiceImpl smsArgs = new HashMap<>(); smsArgs.put("password", user_password); diff --git a/mall-common/src/main/java/com/suisung/mall/common/modules/merch/ShopMerchEntry.java b/mall-common/src/main/java/com/suisung/mall/common/modules/merch/ShopMerchEntry.java index 1c301c60..9fd930cc 100644 --- a/mall-common/src/main/java/com/suisung/mall/common/modules/merch/ShopMerchEntry.java +++ b/mall-common/src/main/java/com/suisung/mall/common/modules/merch/ShopMerchEntry.java @@ -158,6 +158,9 @@ public class ShopMerchEntry implements Serializable { @ApiModelProperty(value = "合同签署状态:0-无任何签署;1-一方签署;2-双方已签署;") private Integer signed_status; + @ApiModelProperty(value = "店铺创建状态:1-已启用(入驻已审批,合同已生成);2-未启用") + private Integer store_status; + @ApiModelProperty(value = "该商家入驻记录是否有效,0:无效,1:有效") private Integer status; diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/esign/service/impl/EsignContractServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/esign/service/impl/EsignContractServiceImpl.java index 0b1d3b23..09dc6c39 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/esign/service/impl/EsignContractServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/esign/service/impl/EsignContractServiceImpl.java @@ -248,7 +248,6 @@ public class EsignContractServiceImpl extends BaseServiceImpl(new JSONObject().put("code", 400).put("msg", "appId 有误").toString(), HttpStatus.INTERNAL_SERVER_ERROR); } - //按照规则进行加密 String signData = timestamp + requestBody; String mySignature = getSignature(signData, appSecret, "HmacSHA256", "UTF-8"); @@ -296,7 +295,10 @@ public class EsignContractServiceImpl extends BaseServiceImpl 0) { // 更改合同记录表的店铺id updateContractStoreId(esignContract.getMch_mobile(), retPair.getFirst()); + // 填充合同模版表的店铺Id esignContractFillingFileService.updateContractFillingStoreId(esignContract.getMch_mobile(), retPair.getFirst()); + // 店铺创建状态已完成 + shopMerchEntryService.updateMerchEntryStoreStatus(esignContract.getMch_mobile(), CommonConstant.Enable); } }); 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 64454123..293dd699 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 @@ -118,5 +118,14 @@ public interface ShopMerchEntryService { */ Boolean updateMerchEntrySignedStatusAndContractDownloadUrl(String loginMobile, Integer signedStatus, String contractDownloadUrl); + /** + * 更改店铺创建状态 + * + * @param loginMobile + * @param storeStatus 1-已创建;2-未创建; + * @return + */ + Boolean updateMerchEntryStoreStatus(String loginMobile, Integer storeStatus); + } \ No newline at end of file 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 4e766e28..f5916d8c 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 @@ -631,4 +631,22 @@ public class ShopMerchEntryServiceImpl extends BaseServiceImpl updateWrapper = new UpdateWrapper<>(); + updateWrapper.eq("login_mobile", loginMobile).set("store_status", storeStatus); + return update(updateWrapper); + } } diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreBaseServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreBaseServiceImpl.java index f3db330f..f403fa98 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreBaseServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreBaseServiceImpl.java @@ -1598,6 +1598,7 @@ public class ShopStoreBaseServiceImpl extends BaseServiceImpl