h5手机端-福利选择:关闭取货门店;

This commit is contained in:
dd3s_206
2026-06-02 10:33:43 +08:00
parent 2084f8dc21
commit 93eac307ec
5 changed files with 23 additions and 12 deletions
@@ -191,10 +191,13 @@ public class MWelfareController {
*/
@At
public Result validateUserIntegral(String projectId, String totalIntegral) {
BigDecimal totalIntegralBig = new BigDecimal(totalIntegral);
if (StrUtil.isBlank(projectId)) {
return Result.error("数据错误!");
}
if (StrUtil.isBlank(totalIntegral)) {
return Result.error("请选择后在提交!");
}
BigDecimal totalIntegralBig = new BigDecimal(totalIntegral);
WelfareList welfareList = dao.fetch(WelfareList.class, Cnd.where("projectId", "=", projectId).and("userId", "=", ShiroUtil.getPrincipalProperty("id")));
if (welfareList == null) {
return Result.error("您暂无此福利!");
@@ -631,6 +631,9 @@ public class WelfareCommonController {
//需要去查询最新的物流信息
String receiveAddress = userSelection.getReceiveAddress();
if (StrUtil.isBlank(receiveAddress) || receiveAddress.length() < 11) {
continue;
}
String mobile = receiveAddress.substring(receiveAddress.length() - 11);
JSONObject jsonObject = expressSelectUtil.getExpressInfo(courierNumber.getCourierNumber(), mobile);
@@ -195,6 +195,9 @@ public class WelfareMineController {
}
}
String receiveAddress = userSelection.getReceiveAddress();
if (StrUtil.isBlank(receiveAddress) || receiveAddress.length() < 11) {
return Result.error("收货信息为空,无法查询物流信息");
}
String mobile = receiveAddress.substring(receiveAddress.length() - 11);
JSONObject jsonObject = expressSelectUtil.getExpressInfo(courierNumber, mobile);
@@ -186,7 +186,10 @@ public class WelfareUserChooseController {
}
//如果是积分模式
if (project.getIsIntegralMode()) {
if (Boolean.TRUE.equals(project.getIsIntegralMode())) {
if (StrUtil.isBlank(totalIntegral)) {
return Result.error("请选择后在提交!");
}
BigDecimal totalIntegralBig = new BigDecimal(totalIntegral);
totalIntegralBig = totalIntegralBig.divide(BigDecimal.valueOf(100));
if (totalIntegralBig.compareTo(BigDecimal.ZERO) == 0) {
@@ -209,7 +212,10 @@ public class WelfareUserChooseController {
for (WelfareUserSelection welfareUserSelection : welfareUserSelections) {
welfareUserSelection.setSelectUserId(userId);
welfareUserSelection.setSelectTime(new Date());
if (welfareUserSelection.getSelectNum() > 1 && !project.getIsIntegralMode()) {
if (StrUtil.isBlank(welfareUserSelection.getReceiveAddress())) {
welfareUserSelection.setReceiveAddress("");
}
if (welfareUserSelection.getSelectNum() > 1 && !Boolean.TRUE.equals(project.getIsIntegralMode())) {
return Result.error("福利选择限制超过最大限制");
}
}
@@ -348,9 +348,12 @@ layout("/mobile/platform.html"){
<van-field label="联系方式" v-model="mobile" required placeholder="请输入联系方式" type="tel"
maxlength="11"></van-field>
</van-cell>
<!-- 取货门店改为非必填,手机端暂不展示门店选择入口 -->
<!--
<van-cell @click="openShoppingPopup(item,index)" is-link title="取货门店" v-if="item.shoppingId">
<template #label>{{item.receiveAddress?item.receiveAddress:'暂未选择'}}</template>
</van-cell>
-->
</van-cell>
</div>
@@ -676,13 +679,9 @@ layout("/mobile/platform.html"){
return
}
const notReceiveAddress = []
const formData = this.projectInfo.welfareProjectSubjects[0].options
.filter((v) => v.selectNum >= 1)
.map((v) => {
if (v.shoppingId && !v.receiveAddress) {
notReceiveAddress.push(v.optionName)
}
return {
welfareId: this.projectId,
subjectId: v.subjectId,
@@ -692,14 +691,11 @@ layout("/mobile/platform.html"){
selectNum: v.selectNum
}
})
if (notReceiveAddress.length > 0) {
this.$modal.msg("请选择取货门店:" + notReceiveAddress.join(","))
return
}
const {code, msg, data} = await $.post("/platform/welfare/userChoose/confirmSelect", {
welfareUserSelections: JSON.stringify(formData),
projectId: this.projectId,
mobile: this.mobile
mobile: this.mobile,
totalIntegral: this.totalIntegral
})
if (code === 0) {
this.getUserSelection(this.projectId)