Browse Source

Merge remote-tracking branch 'origin/master'

master
前端-胡立永 3 weeks ago
parent
commit
e5f8e97490
6 changed files with 40 additions and 5 deletions
  1. +11
    -0
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/controller/AppletApiAddressController.java
  2. +2
    -0
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/AppletApiAddressService.java
  3. +13
    -0
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/impl/AppletApiAddressServiceImpl.java
  4. +4
    -0
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletCar/entity/AppletCar.java
  5. +5
    -0
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletProduct/entity/AppletProduct.java
  6. +5
    -5
      jeecgboot-vue3/src/views/applet/product/AppletProductSpec.data.ts

+ 11
- 0
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/controller/AppletApiAddressController.java View File

@ -108,6 +108,17 @@ public class AppletApiAddressController {
return Result.OK("设置默认地址成功!");
}
/**
* 删除地址
* @param addressId 地址ID
* @return
*/
@Operation(summary="删除地址,多个用,分割")
@PostMapping(value = "/delete")
public Result<String> delete(@RequestParam String addressId) {
appletAddressService.delete(addressId);
return Result.OK("删除地址成功!");
}
}

+ 2
- 0
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/AppletApiAddressService.java View File

@ -46,6 +46,8 @@ public interface AppletApiAddressService {
*/
void setDefaultAddress(String addressId);
void delete(String addressId);
// /**
// * 通过id删除


+ 13
- 0
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/impl/AppletApiAddressServiceImpl.java View File

@ -3,6 +3,7 @@ package org.jeecg.modules.applet.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.exception.JeecgBootException;
@ -14,6 +15,8 @@ import org.jeecg.modules.demo.appletShippingAddress.service.IAppletShippingAddre
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
@Service
@Slf4j
public class AppletApiAddressServiceImpl implements AppletApiAddressService {
@ -135,4 +138,14 @@ public class AppletApiAddressServiceImpl implements AppletApiAddressService {
.update();
}
@Override
public void delete(String addressId) {
if (StringUtils.isBlank(addressId)){
throw new JeecgBootException("addressId不能为空");
}
appletShippingAddressService.removeBatchByIds(
Arrays.asList(addressId.split(","))
);
}
}

+ 4
- 0
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletCar/entity/AppletCar.java View File

@ -11,6 +11,7 @@ import org.jeecg.common.util.SpringContextUtils;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.modules.demo.appletProduct.entity.AppletProduct;
import org.jeecg.modules.demo.appletProductSpec.entity.AppletProductSpec;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
@ -70,4 +71,7 @@ public class AppletCar implements Serializable {
@TableField(exist = false)
private AppletProduct product;
@TableField(exist = false)
private AppletProductSpec sku;
}

+ 5
- 0
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletProduct/entity/AppletProduct.java View File

@ -105,6 +105,11 @@ public class AppletProduct implements Serializable {
@Schema(description = "跨境商品")
private String isCrossBorder;
/**图片*/
@Excel(name = "图片", width = 15)
@Schema(description = "图片,多张用,分割")
private String image;
/**首页推荐*/
@Excel(name = "首页推荐", width = 15)
@Schema(description = "首页推荐")


+ 5
- 5
jeecgboot-vue3/src/views/applet/product/AppletProductSpec.data.ts View File

@ -15,11 +15,11 @@ export const columns: BasicColumn[] = [
// align:"center",
// dataIndex: 'specValue'
// },
// {
// title: '价格',
// align:"center",
// dataIndex: 'price'
// },
{
title: '价格',
align:"center",
dataIndex: 'price'
},
{
title: '排序',
align:"center",


Loading…
Cancel
Save