修改相关类。

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

@ -63,7 +63,7 @@ import jakarta.servlet.http.HttpServletResponse;
*/
@RestController
@AllArgsConstructor
@RequestMapping("jc/catalog")
@RequestMapping("jinchao/catalog")
@Tag(name = "[产品目录]", description = "[产品目录]接口")
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.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import java.util.Map;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
/**
@ -78,6 +80,7 @@ public class ContactController extends BladeController {
ContactEntity detail = contactService.getOne(Condition.getQueryWrapper(contact));
return R.data(ContactWrapper.build().entityVO(detail));
}
/**
* [客户联系人] 分页
*/
@ -107,6 +110,7 @@ public class ContactController extends BladeController {
@ApiOperationSupport(order = 4)
@Operation(summary = "新增", description = "传入contact")
public R save(@Valid @RequestBody ContactEntity contact) {
contact.setId(null);
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.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import java.util.Map;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
/**
@ -78,6 +80,7 @@ public class CustomerController extends BladeController {
CustomerEntity detail = customerService.getOne(Condition.getQueryWrapper(customer));
return R.data(CustomerWrapper.build().entityVO(detail));
}
/**
* [客户] 分页
*/
@ -107,6 +110,7 @@ public class CustomerController extends BladeController {
@ApiOperationSupport(order = 4)
@Operation(summary = "新增", description = "传入customer")
public R save(@Valid @RequestBody CustomerEntity customer) {
customer.setId(null);
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.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.jinchao.pojo.vo.ProductVO;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
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.wrapper.ProductWrapper;
import org.springblade.modules.jinchao.service.IProductService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import java.util.Map;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
/**
@ -78,6 +79,7 @@ public class ProductController extends BladeController {
ProductEntity detail = productService.getOne(Condition.getQueryWrapper(product));
return R.data(ProductWrapper.build().entityVO(detail));
}
/**
* [产品] 分页
*/
@ -107,6 +109,7 @@ public class ProductController extends BladeController {
@ApiOperationSupport(order = 4)
@Operation(summary = "新增", description = "传入product")
public R save(@Valid @RequestBody ProductEntity product) {
product.setId(null);
return R.status(productService.save(product));
}
@ -157,5 +160,4 @@ public class ProductController extends BladeController {
List<ProductExcel> list = productService.exportProduct(queryWrapper);
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.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import java.util.Map;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
/**
@ -78,6 +80,7 @@ public class ProductObjController extends BladeController {
ProductObjEntity detail = productObjService.getOne(Condition.getQueryWrapper(productObj));
return R.data(ProductObjWrapper.build().entityVO(detail));
}
/**
* [产品实物] 分页
*/
@ -107,6 +110,7 @@ public class ProductObjController extends BladeController {
@ApiOperationSupport(order = 4)
@Operation(summary = "新增", description = "传入productObj")
public R save(@Valid @RequestBody ProductObjEntity productObj) {
productObj.setId(null);
return R.status(productObjService.save(productObj));
}
@ -157,5 +161,4 @@ public class ProductObjController extends BladeController {
List<ProductObjExcel> list = productObjService.exportProductObj(queryWrapper);
ExcelUtil.export(response, "[产品实物]数据" + DateUtil.time(), "[产品实物]数据表", list, ProductObjExcel.class);
}
}

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

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

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

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

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

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

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