修改相关类。

master
Tom Li 4 months ago
parent af26fb95d7
commit 1b35e97451
  1. 14
      src/main/java/org/springblade/modules/jinchao/constant/ProductConst.java
  2. 4
      src/main/java/org/springblade/modules/jinchao/controller/BizPriceController.java
  3. 2
      src/main/java/org/springblade/modules/jinchao/controller/CatalogController.java
  4. 4
      src/main/java/org/springblade/modules/jinchao/controller/ContactController.java
  5. 4
      src/main/java/org/springblade/modules/jinchao/controller/CustomerController.java
  6. 8
      src/main/java/org/springblade/modules/jinchao/controller/ProductController.java
  7. 5
      src/main/java/org/springblade/modules/jinchao/controller/ProductObjController.java
  8. 3
      src/main/java/org/springblade/modules/jinchao/excel/BizPriceExcel.java
  9. 5
      src/main/java/org/springblade/modules/jinchao/excel/ProductExcel.java
  10. 1
      src/main/java/org/springblade/modules/jinchao/mapper/BizPriceMapper.xml
  11. 1
      src/main/java/org/springblade/modules/jinchao/mapper/ContactMapper.xml
  12. 1
      src/main/java/org/springblade/modules/jinchao/mapper/CustomerMapper.xml
  13. 1
      src/main/java/org/springblade/modules/jinchao/mapper/ProductObjMapper.xml
  14. 5
      src/main/java/org/springblade/modules/jinchao/pojo/entity/ProductEntity.java
  15. 73
      src/main/java/org/springblade/modules/jinchao/pojo/vo/ProductVO.java

@ -0,0 +1,14 @@
package org.springblade.modules.jinchao.constant;
public interface ProductConst {
/**
* 标准
*/
Integer TYPE_PRICE_STANDARD = 1;
/**
* 特定价格
*/
Integer TYPE_PRICE_CUS = 2;
}

@ -50,8 +50,10 @@ import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.constant.BladeConstant;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
/** /**
@ -78,6 +80,7 @@ public class BizPriceController extends BladeController {
BizPriceEntity detail = bizPriceService.getOne(Condition.getQueryWrapper(bizPrice)); BizPriceEntity detail = bizPriceService.getOne(Condition.getQueryWrapper(bizPrice));
return R.data(BizPriceWrapper.build().entityVO(detail)); return R.data(BizPriceWrapper.build().entityVO(detail));
} }
/** /**
* [业务价格] 分页 * [业务价格] 分页
*/ */
@ -107,6 +110,7 @@ public class BizPriceController extends BladeController {
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@Operation(summary = "新增", description = "传入bizPrice") @Operation(summary = "新增", description = "传入bizPrice")
public R save(@Valid @RequestBody BizPriceEntity bizPrice) { public R save(@Valid @RequestBody BizPriceEntity bizPrice) {
bizPrice.setId(null);
return R.status(bizPriceService.save(bizPrice)); return R.status(bizPriceService.save(bizPrice));
} }

@ -63,7 +63,7 @@ import jakarta.servlet.http.HttpServletResponse;
*/ */
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("jc/catalog") @RequestMapping("jinchao/catalog")
@Tag(name = "[产品目录]", description = "[产品目录]接口") @Tag(name = "[产品目录]", description = "[产品目录]接口")
public class CatalogController extends BladeController { public class CatalogController extends BladeController {

@ -50,8 +50,10 @@ import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.constant.BladeConstant;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
/** /**
@ -78,6 +80,7 @@ public class ContactController extends BladeController {
ContactEntity detail = contactService.getOne(Condition.getQueryWrapper(contact)); ContactEntity detail = contactService.getOne(Condition.getQueryWrapper(contact));
return R.data(ContactWrapper.build().entityVO(detail)); return R.data(ContactWrapper.build().entityVO(detail));
} }
/** /**
* [客户联系人] 分页 * [客户联系人] 分页
*/ */
@ -107,6 +110,7 @@ public class ContactController extends BladeController {
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@Operation(summary = "新增", description = "传入contact") @Operation(summary = "新增", description = "传入contact")
public R save(@Valid @RequestBody ContactEntity contact) { public R save(@Valid @RequestBody ContactEntity contact) {
contact.setId(null);
return R.status(contactService.save(contact)); return R.status(contactService.save(contact));
} }

@ -50,8 +50,10 @@ import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.constant.BladeConstant;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
/** /**
@ -78,6 +80,7 @@ public class CustomerController extends BladeController {
CustomerEntity detail = customerService.getOne(Condition.getQueryWrapper(customer)); CustomerEntity detail = customerService.getOne(Condition.getQueryWrapper(customer));
return R.data(CustomerWrapper.build().entityVO(detail)); return R.data(CustomerWrapper.build().entityVO(detail));
} }
/** /**
* [客户] 分页 * [客户] 分页
*/ */
@ -107,6 +110,7 @@ public class CustomerController extends BladeController {
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@Operation(summary = "新增", description = "传入customer") @Operation(summary = "新增", description = "传入customer")
public R save(@Valid @RequestBody CustomerEntity customer) { public R save(@Valid @RequestBody CustomerEntity customer) {
customer.setId(null);
return R.status(customerService.save(customer)); return R.status(customerService.save(customer));
} }

@ -38,20 +38,21 @@ import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springblade.modules.jinchao.pojo.vo.ProductVO;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
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 org.springblade.modules.jinchao.pojo.entity.ProductEntity; import org.springblade.modules.jinchao.pojo.entity.ProductEntity;
import org.springblade.modules.jinchao.pojo.vo.ProductVO;
import org.springblade.modules.jinchao.excel.ProductExcel; import org.springblade.modules.jinchao.excel.ProductExcel;
import org.springblade.modules.jinchao.wrapper.ProductWrapper; import org.springblade.modules.jinchao.wrapper.ProductWrapper;
import org.springblade.modules.jinchao.service.IProductService; import org.springblade.modules.jinchao.service.IProductService;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
/** /**
@ -78,6 +79,7 @@ public class ProductController extends BladeController {
ProductEntity detail = productService.getOne(Condition.getQueryWrapper(product)); ProductEntity detail = productService.getOne(Condition.getQueryWrapper(product));
return R.data(ProductWrapper.build().entityVO(detail)); return R.data(ProductWrapper.build().entityVO(detail));
} }
/** /**
* [产品] 分页 * [产品] 分页
*/ */
@ -107,6 +109,7 @@ public class ProductController extends BladeController {
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@Operation(summary = "新增", description = "传入product") @Operation(summary = "新增", description = "传入product")
public R save(@Valid @RequestBody ProductEntity product) { public R save(@Valid @RequestBody ProductEntity product) {
product.setId(null);
return R.status(productService.save(product)); return R.status(productService.save(product));
} }
@ -157,5 +160,4 @@ public class ProductController extends BladeController {
List<ProductExcel> list = productService.exportProduct(queryWrapper); List<ProductExcel> list = productService.exportProduct(queryWrapper);
ExcelUtil.export(response, "[产品]数据" + DateUtil.time(), "[产品]数据表", list, ProductExcel.class); ExcelUtil.export(response, "[产品]数据" + DateUtil.time(), "[产品]数据表", list, ProductExcel.class);
} }
} }

@ -50,8 +50,10 @@ import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.constant.BladeConstant;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
/** /**
@ -78,6 +80,7 @@ public class ProductObjController extends BladeController {
ProductObjEntity detail = productObjService.getOne(Condition.getQueryWrapper(productObj)); ProductObjEntity detail = productObjService.getOne(Condition.getQueryWrapper(productObj));
return R.data(ProductObjWrapper.build().entityVO(detail)); return R.data(ProductObjWrapper.build().entityVO(detail));
} }
/** /**
* [产品实物] 分页 * [产品实物] 分页
*/ */
@ -107,6 +110,7 @@ public class ProductObjController extends BladeController {
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@Operation(summary = "新增", description = "传入productObj") @Operation(summary = "新增", description = "传入productObj")
public R save(@Valid @RequestBody ProductObjEntity productObj) { public R save(@Valid @RequestBody ProductObjEntity productObj) {
productObj.setId(null);
return R.status(productObjService.save(productObj)); return R.status(productObjService.save(productObj));
} }
@ -157,5 +161,4 @@ public class ProductObjController extends BladeController {
List<ProductObjExcel> list = productObjService.exportProductObj(queryWrapper); List<ProductObjExcel> list = productObjService.exportProductObj(queryWrapper);
ExcelUtil.export(response, "[产品实物]数据" + DateUtil.time(), "[产品实物]数据表", list, ProductObjExcel.class); ExcelUtil.export(response, "[产品实物]数据" + DateUtil.time(), "[产品实物]数据表", list, ProductObjExcel.class);
} }
} }

@ -86,12 +86,11 @@ public class BizPriceExcel implements Serializable {
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("特定用户价格") @ExcelProperty("特定用户价格")
private BigDecimal bizPrice; private Double bizPrice;
/** /**
* 是否已删除 * 是否已删除
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("是否已删除") @ExcelProperty("是否已删除")
private Integer isDeleted; private Integer isDeleted;
} }

@ -122,13 +122,13 @@ public class ProductExcel implements Serializable {
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("倍率") @ExcelProperty("倍率")
private BigDecimal multiple; private Double multiple;
/** /**
* 公司指导价 * 公司指导价
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("公司指导价") @ExcelProperty("公司指导价")
private BigDecimal standardPrice; private Double standardPrice;
/** /**
* 中文备注 * 中文备注
*/ */
@ -141,5 +141,4 @@ public class ProductExcel implements Serializable {
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("英文备注") @ExcelProperty("英文备注")
private String remarkEn; private String remarkEn;
} }

@ -33,5 +33,4 @@
SELECT * SELECT *
FROM jc_biz_price ${ew.customSqlSegment} FROM jc_biz_price ${ew.customSqlSegment}
</select> </select>
</mapper> </mapper>

@ -35,5 +35,4 @@
SELECT * SELECT *
FROM jc_contact ${ew.customSqlSegment} FROM jc_contact ${ew.customSqlSegment}
</select> </select>
</mapper> </mapper>

@ -38,5 +38,4 @@
SELECT * SELECT *
FROM jc_customer ${ew.customSqlSegment} FROM jc_customer ${ew.customSqlSegment}
</select> </select>
</mapper> </mapper>

@ -40,5 +40,4 @@
SELECT * SELECT *
FROM jc_product_obj ${ew.customSqlSegment} FROM jc_product_obj ${ew.customSqlSegment}
</select> </select>
</mapper> </mapper>

@ -91,12 +91,12 @@ public class ProductEntity extends TenantEntity {
* 倍率 * 倍率
*/ */
@Schema(description = "倍率") @Schema(description = "倍率")
private BigDecimal multiple; private Double multiple;
/** /**
* 公司指导价 * 公司指导价
*/ */
@Schema(description = "公司指导价") @Schema(description = "公司指导价")
private BigDecimal standardPrice; private Double standardPrice;
/** /**
* 中文备注 * 中文备注
*/ */
@ -107,5 +107,4 @@ public class ProductEntity extends TenantEntity {
*/ */
@Schema(description = "英文备注") @Schema(description = "英文备注")
private String remarkEn; private String remarkEn;
} }

@ -0,0 +1,73 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.jinchao.pojo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.modules.jinchao.pojo.entity.ProductEntity;
import org.springblade.modules.jinchao.pojo.entity.ProductObjEntity;
import java.io.Serial;
/**
* [产品] 视图实体类
*
* @author BladeX
* @since 2025-12-01
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class ProductVO extends ProductEntity {
@Serial
private static final long serialVersionUID = 1L;
/**
* [1]标准;[2]客户特定价
*/
@Schema(description = "[1]标准;[2]客户特定价")
private Integer type;
/**
* [产品]id
*/
@Schema(description = "[产品]id")
private Long productId;
/**
* 业务员[用户]id
*/
@Schema(description = "业务员[用户]id")
private Long saleUserId;
/**
* [客户]id
*/
@Schema(description = "[客户]id")
private Long customerId;
/**
* 特定用户价格
*/
@Schema(description = "特定用户价格")
private Double bizPrice;
}
Loading…
Cancel
Save