前端-胡立永 3 weeks ago
parent
commit
7e2ae64e4f
7 changed files with 43 additions and 8 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. +3
    -3
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletProductSpec/entity/AppletProductSpec.java
  7. +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("设置默认地址成功!"); 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 setDefaultAddress(String addressId);
void delete(String addressId);
// /** // /**
// * 通过id删除 // * 通过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 cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.exception.JeecgBootException; 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Arrays;
@Service @Service
@Slf4j @Slf4j
public class AppletApiAddressServiceImpl implements AppletApiAddressService { public class AppletApiAddressServiceImpl implements AppletApiAddressService {
@ -135,4 +138,14 @@ public class AppletApiAddressServiceImpl implements AppletApiAddressService {
.update(); .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 lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.modules.demo.appletProduct.entity.AppletProduct; import org.jeecg.modules.demo.appletProduct.entity.AppletProduct;
import org.jeecg.modules.demo.appletProductSpec.entity.AppletProductSpec;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel; import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict; import org.jeecg.common.aspect.annotation.Dict;
@ -70,4 +71,7 @@ public class AppletCar implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private AppletProduct product; 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

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


+ 3
- 3
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletProductSpec/entity/AppletProductSpec.java View File

@ -70,7 +70,7 @@ public class AppletProductSpec implements Serializable {
@Schema(description = "产品") @Schema(description = "产品")
private java.lang.String productId; private java.lang.String productId;
/**价格*/ /**价格*/
// @Excel(name = "价格", width = 15)
// @Schema(description = "价格")
// private java.math.BigDecimal price;
@Excel(name = "价格", width = 15)
@Schema(description = "价格")
private java.math.BigDecimal price;
} }

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

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


Loading…
Cancel
Save