diff --git a/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/product/DeleteCartRequest.java b/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/product/DeleteCartRequest.java new file mode 100644 index 000000000..659106579 --- /dev/null +++ b/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/request/product/DeleteCartRequest.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.shop.request.product; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; + +/** + * @Title:DelectCartRequest + * @Description: TODO + * @author: tangqian + * @date: 2023/5/25 13:03 + * @version: V1.0.0 + */ +@Data +public class DeleteCartRequest implements Serializable { + private static final long serialVersionUID = 8471460222619043734L; + @Schema(description = "商品id") + private List ids; +} diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/app/cart/CartController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/app/cart/CartController.java index 0867dbd9c..e0277e6d7 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/app/cart/CartController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/app/cart/CartController.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.module.shop.request.product.CartNumRequest; import cn.iocoder.yudao.module.shop.request.product.CartRequest; import cn.iocoder.yudao.module.shop.request.product.CartResetRequest; +import cn.iocoder.yudao.module.shop.request.product.DeleteCartRequest; import cn.iocoder.yudao.module.shop.response.product.CartInfoResponse; import cn.iocoder.yudao.module.shop.service.product.StoreCartService; import com.github.pagehelper.PageInfo; @@ -78,12 +79,11 @@ public class CartController { /** * 删除购物车表 - * @param ids 购物车ids */ @Operation(summary = "删除") @RequestMapping(value = "/delete", method = RequestMethod.POST) - public CommonResult delete(@RequestParam(value = "ids") List ids) { - if (storeCartService.deleteCartByIds(ids)) { + public CommonResult delete(@RequestBody @Validated DeleteCartRequest request) { + if (storeCartService.deleteCartByIds(request.getIds())) { return CommonResult.success("删除购物车成功"); } else { return CommonResult.error(GlobalErrorCodeConstants.OPERATION_ERROR.getCode(), "删除购物车失败"); diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/PhoneRecordServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/PhoneRecordServiceImpl.java index bbe6284c5..4d532996f 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/PhoneRecordServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/PhoneRecordServiceImpl.java @@ -7,7 +7,10 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.member.api.user.MemberUserApi; import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; import cn.iocoder.yudao.module.shop.controller.app.recharge.vo.PhoneRecordAdd; +import cn.iocoder.yudao.module.shop.dal.dataobject.order.StoreOrder; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; @@ -70,11 +73,12 @@ public class PhoneRecordServiceImpl implements PhoneRecordService { // 校验存在 validatePhoneRecordExists(id); // 删除 - phoneRecordMapper.deleteById(id); + phoneRecordMapper.delete(Wrappers.lambdaQuery().eq(PhoneRecordDO::getRechargeOrderId,id)); } private void validatePhoneRecordExists(Long id) { - if (phoneRecordMapper.selectById(id) == null) { + PhoneRecordDO phoneRecordDO = phoneRecordMapper.selectOne(Wrappers.lambdaQuery().eq(PhoneRecordDO::getRechargeOrderId, id)); + if (phoneRecordDO == null) { throw exception(PHONE_RECORD_NOT_EXISTS); } } diff --git a/yudao-ui-admin/src/views/deliverGoods/freightSet/creatTemplates.vue b/yudao-ui-admin/src/views/deliverGoods/freightSet/creatTemplates.vue index 2e151e6d6..9a1761ef2 100644 --- a/yudao-ui-admin/src/views/deliverGoods/freightSet/creatTemplates.vue +++ b/yudao-ui-admin/src/views/deliverGoods/freightSet/creatTemplates.vue @@ -6,7 +6,7 @@ width="70%" :before-close="handleClose" > - + @@ -31,7 +31,6 @@ collapse-tags clearable filterable - @change="changeRegion" /> @@ -306,9 +305,6 @@ export default { noRegion: [] } }, - changeRegion(value) { - console.log(value) - }, changeRadio(num) { this.columns = Object.assign({}, statusMap[num - 1]) }, @@ -346,8 +342,10 @@ export default { name: info.name, type: info.type, appoint: info.appoint, + noDelivery: info.noDelivery, sort: info.sort }) + console.log(this.ruleForm) this.columns = Object.assign({}, statusMap[this.ruleForm.type - 1]) this.$nextTick(() => { loadingInstance.close() @@ -394,11 +392,7 @@ export default { // 包邮 shippingNodelivery() { logistics.shippingNodelivery({ tempId: this.tempId }).then(res => { - res.data.forEach((item, index) => { - // item.title = JSON.parse(item.title) - item.city_ids = JSON.parse(item.title) - }) - this.ruleForm.noDelivery = res.data + this.ruleForm.noRegion = JSON.parse(res.data[0].title) }) }, removeChild(list){ diff --git a/yudao-ui-app/.hbuilderx/launch.json b/yudao-ui-app/.hbuilderx/launch.json index ee5be7746..4bbcf3cba 100644 --- a/yudao-ui-app/.hbuilderx/launch.json +++ b/yudao-ui-app/.hbuilderx/launch.json @@ -10,6 +10,10 @@ { "launchtype" : "local" }, + "h5" : + { + "launchtype" : "local" + }, "mp-weixin" : { "launchtype" : "local" diff --git a/yudao-ui-app/api/member.js b/yudao-ui-app/api/member.js index 6f93e6d05..5b62e3e21 100644 --- a/yudao-ui-app/api/member.js +++ b/yudao-ui-app/api/member.js @@ -15,6 +15,13 @@ export function memberOrderInfo(){ return request.get('api/order/member/memberOrderInfo', {}) } +/** + * 根据当前手机号获取账号的充值记录 + */ +export function memberOrderInfoByPhone(phone){ + return request.get(`api/order/member/memberOrderInfoByPhone?phone=${phone}`, {}) +} + /** * 查询权益档位信息 */ diff --git a/yudao-ui-app/config/app.js b/yudao-ui-app/config/app.js index 3f3bbf134..2932f77a1 100644 --- a/yudao-ui-app/config/app.js +++ b/yudao-ui-app/config/app.js @@ -1,14 +1,12 @@ -let domain = 'http://api.cyywl.top' -// let domain = 'http://192.168.1.147:48080' +let domain = process.env.APP_BASE_URL module.exports = { // 请求域名 格式: https://您的域名 // #ifdef MP HTTP_REQUEST_URL: domain, // #endif - HTTP_ADMIN_URL:'http://api.cyywl.top', //PC后台的API请求地址,上传图片用 - // HTTP_ADMIN_URL:'http://192.168.1.147:48080', //PC后台的API请求地址,上传图片用 + HTTP_ADMIN_URL: process.env.APP_BASE_URL, //PC后台的API请求地址,上传图片用 // #ifdef H5 //H5接口是浏览器地址 // HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host, diff --git a/yudao-ui-app/package.json b/yudao-ui-app/package.json index e147ae429..c33a2c9b1 100644 --- a/yudao-ui-app/package.json +++ b/yudao-ui-app/package.json @@ -13,5 +13,23 @@ "clipboard": "^2.0.11", "html-to-image": "^1.11.11", "qrcode": "^1.5.3" + }, + "uni-app": { + "scripts": { + "dev": { + "title": "开发版", + "env": { + "UNI_PLATFORM": "h5", + "APP_BASE_URL": "http://192.168.1.147:48080" + } + }, + "prod": { + "title": "生产版", + "env": { + "UNI_PLATFORM": "h5", + "APP_BASE_URL": "http://api.cyywl.top" + } + } + } } } diff --git a/yudao-ui-app/pages/member_back/index.vue b/yudao-ui-app/pages/member_back/index.vue index 6eded3d16..5e86d3abf 100644 --- a/yudao-ui-app/pages/member_back/index.vue +++ b/yudao-ui-app/pages/member_back/index.vue @@ -47,7 +47,7 @@ - + diff --git a/yudao-ui-app/pages/member_equity/index.vue b/yudao-ui-app/pages/member_equity/index.vue index 75592b662..48ba82993 100644 --- a/yudao-ui-app/pages/member_equity/index.vue +++ b/yudao-ui-app/pages/member_equity/index.vue @@ -10,7 +10,7 @@ 再升1级即可获得【XX】等6项权益 - 购买记录 + 购买记录 @@ -21,8 +21,8 @@ - 会员等级{{vipData.findIndex((item) => item == parseInt(memberDetail.grade)) +1}}级 - + 会员等级{{vipData.findIndex((item) => item == memberDetail.grade) +1}}级 + @@ -257,7 +257,7 @@ margin-bottom: 10rpx; } - button { + .right-button { border-radius: 18rpx; margin-top: 10rpx; padding: 7rpx 16rpx; diff --git a/yudao-ui-app/pages/member_record/index.vue b/yudao-ui-app/pages/member_record/index.vue index 447337b52..3e984fb51 100644 --- a/yudao-ui-app/pages/member_record/index.vue +++ b/yudao-ui-app/pages/member_record/index.vue @@ -9,7 +9,8 @@ 充值号码:{{item.userPhone}} - + + 申请退款中 充值档次:{{item.grade}} @@ -22,7 +23,7 @@